Enable smartparens-mode in eval-expression
This commit is contained in:
parent
b3f5952e66
commit
c063df796c
15
README.org
15
README.org
@ -3112,25 +3112,20 @@ contrary to for instance [[https://github.com/Fanael/rainbow-delimiters#readme][
|
||||
'(sp-override-key-bindings '(("C-(" . sp-backward-barf-sexp)
|
||||
("C-)" . sp-forward-slurp-sexp))))
|
||||
|
||||
(dolist (hook '(prog-mode-hook text-mode-hook))
|
||||
(add-hook hook #'smartparens-mode))
|
||||
|
||||
;; Hook on the specific `eval-expression-minibuffer-setup-hook'
|
||||
;; and not on the general `minibuffer-setup-hook'.
|
||||
(dolist (hook '(eval-expression-minibuffer-setup-hook
|
||||
prog-mode-hook
|
||||
text-mode-hook))
|
||||
(add-hook hook #'smartparens-mode))
|
||||
|
||||
(dolist (hook '(emacs-lisp-mode-hook
|
||||
eval-expression-minibuffer-setup-hook
|
||||
ielm-mode-hook
|
||||
lisp-mode-hook
|
||||
python-mode-hook
|
||||
sly-mrepl-mode-hook))
|
||||
(add-hook hook #'smartparens-strict-mode))
|
||||
|
||||
;; Tweak for the call to `smartparens-strict-mode' hooked on
|
||||
;; `eval-expression-minibuffer-setup-hook'.
|
||||
(sp-with-modes '(fundamental-mode ; first usage.
|
||||
minibuffer-inactive-mode) ; later usage.
|
||||
(sp-local-pair "'" nil :actions nil))
|
||||
|
||||
;; https://xenodium.com/emacs-smartparens-auto-indent/index.html
|
||||
(defun indent-between-pair (&rest _ignored)
|
||||
(newline)
|
||||
|
Loading…
Reference in New Issue
Block a user