From c063df796c326d4c205075e1a1d43e06c8f930c1 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 17 Apr 2022 19:36:57 +0200 Subject: [PATCH] Enable smartparens-mode in eval-expression --- README.org | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.org b/README.org index 4691b39..8aecdb2 100644 --- a/README.org +++ b/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)