From 98e453c640f322176a3bb0e2d1967313ab38ffbf Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 4 Sep 2013 12:14:43 +0300 Subject: [PATCH] Enable smartparens in the minubuffer during eval-expression --- modules/prelude-emacs-lisp.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 6c528ed..d173e34 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -94,6 +94,13 @@ Start `ielm' if it's not already running." (dolist (hook '(emacs-lisp-mode-hook ielm-mode-hook)) (add-hook hook 'elisp-slime-nav-mode)) +(defun conditionally-enable-smartparens-mode () + "Enable `smartparens-mode' in the minibuffer, during `eval-expression'." + (if (eq this-command 'eval-expression) + (smartparens-mode 1))) + +(add-hook 'minibuffer-setup-hook 'conditionally-enable-smartparens-mode) + (provide 'prelude-emacs-lisp) ;;; prelude-emacs-lisp.el ends here