Don't enable smartparens-mode in minibuffer if global mode is off

This commit is contained in:
Henrik Lissner 2020-05-01 16:01:21 -04:00
parent 03ecfed1a7
commit e4f24fd150
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -479,8 +479,9 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(defun doom-init-smartparens-in-minibuffer-maybe-h ()
"Enable `smartparens-mode' in the minibuffer, during `eval-expression',
`pp-eval-expression' or `evil-ex'."
(when (memq this-command '(eval-expression pp-eval-expression evil-ex))
(smartparens-mode))))
(and (memq this-command '(eval-expression pp-eval-expression evil-ex))
smartparens-global-mode
(smartparens-mode))))
;; You're likely writing lisp in the minibuffer, therefore, disable these
;; quote pairs, which lisps doesn't use for strings: