From ce50593b3cc4898915c260aaf356adf533868e67 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 24 Mar 2016 23:11:44 +0100 Subject: Emacs: Simplify paredit eval-expression setup --- tag-emacs/emacs.d/init.org | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index a38eede..395ff53 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -2216,18 +2216,14 @@ Balanced parentheses in lisps are nice, but all the refactoring and movement commands are much more interesting. #+BEGIN_SRC emacs-lisp -(use-package paredit - :diminish "()" - :commands (paredit-mode) - :init (progn - (add-hook 'lisp-mode-common-hook #'enable-paredit-mode) - (put #'paredit-forward-delete 'delete-selection 'supersede) - (put #'paredit-backward-delete 'delete-selection 'supersede) - (add-hook 'minibuffer-setup-hook #'conditionally-enable-paredit-mode) - (defun conditionally-enable-paredit-mode () - "enable paredit-mode during eval-expression" - (if (eq this-command 'eval-expression) - (paredit-mode 1))))) + (use-package paredit + :diminish "()" + :commands (paredit-mode) + :init (progn + (add-hook 'lisp-mode-common-hook #'enable-paredit-mode) + (put #'paredit-forward-delete 'delete-selection 'supersede) + (put #'paredit-backward-delete 'delete-selection 'supersede) + (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode))) #+END_SRC ** smartparens -- cgit 1.4.1