diff options
author | Alan Pearce | 2016-03-24 23:11:44 +0100 |
---|---|---|
committer | Alan Pearce | 2016-03-24 23:11:44 +0100 |
commit | ce50593b3cc4898915c260aaf356adf533868e67 (patch) | |
tree | a9156c4f93dc80c3fb83e4282cfba5b8632181bc /tag-emacs/emacs.d | |
parent | 94fa9d4f837d1363bf4aaa0f2afb5fbc9a91b81f (diff) | |
download | dotfiles-ce50593b3cc4898915c260aaf356adf533868e67.tar.lz dotfiles-ce50593b3cc4898915c260aaf356adf533868e67.tar.zst dotfiles-ce50593b3cc4898915c260aaf356adf533868e67.zip |
Emacs: Simplify paredit eval-expression setup
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 20 |
1 files changed, 8 insertions, 12 deletions
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 |