diff --git a/core/core-editor.el b/core/core-editor.el index 08db8e25e..357169599 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -505,10 +505,19 @@ files, so we replace calls to `pp' with the much faster `prin1'." (setf (alist-get key sp-message-alist) nil)) (add-hook! 'eval-expression-minibuffer-setup-hook - (defun doom-init-smartparens-in-minibuffer-maybe-h () + (defun doom-init-smartparens-in-eval-expression-h () "Enable `smartparens-mode' in the minibuffer for `eval-expression'. -Only enable it if `smartparens-global-mode' is on." - (when smartparens-global-mode (smartparens-mode)))) +This includes everything that calls `read--expression', e.g. +`edebug-eval-expression' Only enable it if +`smartparens-global-mode' is on." + (when smartparens-global-mode (smartparens-mode +1)))) + (add-hook! 'minibuffer-setup-hook + (defun doom-init-smartparens-in-minibuffer-maybe-h () + "Enable `smartparens' for non-`eval-expression' commands. +Only enable `smartparens-mode' if `smartparens-global-mode' is +on." + (when (and smartparens-global-mode (memq this-command '(evil-ex))) + (smartparens-mode +1)))) ;; You're likely writing lisp in the minibuffer, therefore, disable these ;; quote pairs, which lisps doesn't use for strings: