Emacs: Remove paredit spaces when cedit enabled
Alan Pearce alan@alanpearce.co.uk
Mon, 04 Aug 2014 20:02:49 +0100
1 files changed, 4 insertions(+), 0 deletions(-)
jump to
M tag-emacs/emacs.d/init.el → tag-emacs/emacs.d/init.el
@@ -1048,6 +1048,10 @@ :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) + (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"