Closed Emiluren closed 4 years ago
Ok, I managed to fix my own problem by changing my :init/:hook to this:
:init
(defun conditionally-enable-smartparens ()
"enable paredit-mode during eval-expression"
(if (eq this-command 'eval-expression)
;; Prevent single quote ' from pairing in minibuffer eval
(sp-local-pair 'minibuffer-inactive-mode "'" nil
:actions nil)
(smartparens-strict-mode 1)
(smartparens-strict-mode 0)))
:hook (minibuffer-setup . conditionally-enable-smartparens)
Interestingly things have stopped working for me in minibuffer so I'll probably borrow some of your config. Thanks! :)
Expected behavior
I have a
turn-on-smartparens-strict-mode
in myeval-expression-minibuffer-setup-hook
and(sp-local-pair 'minibuffer-inactive-mode "'" nil :actions nil)
to prevent'
from creating a pair when I useeval-expression
M-:
.Actual behavior
If I press
M-:
immediately after starting Emacs I get two quotes''
. Any other time it actually works which makes me think that something does not run in the order I expect.Steps to reproduce the problem
This is the configuration I have for smartparens
I use
straight.el
anduse-package
. https://github.com/Emiluren/.emacs.d/blob/0a492767f6e6e9e9953de2db6d10d19e89fc09ba/init.el#L570Environment & version information
smartparens
version: Commit be8d5c9major-mode
:minibuffer-inactive-mode
M-x emacs-version
): GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-29