all repos — nixfiles @ c9994d8bda08e4a9f582c07808122a8362431370

System and user configuration, managed by nix and home-manager

Emacs: Move cedit's c-mode hook to cedit init
Alan Pearce alan@alanpearce.co.uk
Sun, 27 Jul 2014 16:47:02 +0100
commit

c9994d8bda08e4a9f582c07808122a8362431370

parent

e88eb66d9a6789c550537fa1ceb51f956f2d3d65

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -730,8 +730,7 @@ (req-package cc-mode
   :defer t
   :init (progn
-          (add-hook 'c-mode-common-hook #'electric-indent-mode)
-          (add-hook 'c-mode-common-hook #'turn-on-cedit-mode))
+          (add-hook 'c-mode-common-hook #'electric-indent-mode))
   :config (progn
               (setq c-default-style '((java-mode . "java")
                                     (awk-mode . "awk")
@@ -954,7 +953,8 @@ "Minor mode for paredit-style editing in c-style modes."             :lighter " Cedit")
           (defun turn-on-cedit-mode ()
             (enable-paredit-mode)
-            (cedit-mode 1)))
+            (cedit-mode 1))
+          (add-hook #'c-mode-common-hook #'turn-on-cedit-mode))
   :config (progn
             (bind-key "M-a" #'cedit-beginning-of-statement cedit-mode-map)
             (bind-key "M-e" #'cedit-end-of-statement cedit-mode-map)