diff options
author | Alan Pearce | 2014-08-04 20:02:49 +0100 |
---|---|---|
committer | Alan Pearce | 2014-08-04 20:02:49 +0100 |
commit | 7942162da58d88216323006e99c1aab49f1e004c (patch) | |
tree | 49b3c6196e65924146f63dbe811ea1223ea706e1 /tag-emacs | |
parent | 6dd0c929aac847aab92bee26fd93d67e8b8620a3 (diff) | |
download | nixfiles-7942162da58d88216323006e99c1aab49f1e004c.tar.lz nixfiles-7942162da58d88216323006e99c1aab49f1e004c.tar.zst nixfiles-7942162da58d88216323006e99c1aab49f1e004c.zip |
Emacs: Remove paredit spaces when cedit enabled
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 0e8f1e3b..4f80ec4a 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1048,6 +1048,10 @@ mouse-1: Display Line and Column Mode Menu")))))) (add-hook 'lisp-mode-common-hook #'enable-paredit-mode) (put #'paredit-forward-delete 'delete-selection 'supersede) (put #'paredit-backward-delete 'delete-selection 'supersede) + (defun ap/cedit-space-delimiter-p (endp delimiter) + "Don't insert a space before delimiters in c-style modes" + (not cedit-mode)) + (add-to-list 'paredit-space-for-delimiter-predicates #'ap/cedit-space-delimiter-p) (add-hook 'minibuffer-setup-hook #'conditionally-enable-paredit-mode) (defun conditionally-enable-paredit-mode () "enable paredit-mode during eval-expression" |