summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2014-08-05 17:09:20 +0100
committerAlan Pearce2014-08-05 17:09:20 +0100
commit1bebc85ea521154eafc7c392d5e11de623edb1dc (patch)
treef39525add208121c8aa8211aa4900a86773e3280 /tag-emacs
parent7942162da58d88216323006e99c1aab49f1e004c (diff)
downloaddotfiles-1bebc85ea521154eafc7c392d5e11de623edb1dc.tar.lz
dotfiles-1bebc85ea521154eafc7c392d5e11de623edb1dc.tar.zst
dotfiles-1bebc85ea521154eafc7c392d5e11de623edb1dc.zip
Emacs: Fix init error with paredit+cedit
paredit-space-for-delimiter-predicates isn't declared until paredit is
loaded properly, so add to it after it's been loaded
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 4f80ec4..2c619ca 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -1044,14 +1044,15 @@ mouse-1: Display Line and Column Mode Menu"))))))
 (req-package paredit
   :diminish "()"
   :commands (paredit-mode)
+  :config (progn
+            (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))
   :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"