summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2014-07-27 16:47:02 +0100
committerAlan Pearce2014-07-27 16:47:02 +0100
commitc9994d8bda08e4a9f582c07808122a8362431370 (patch)
tree66582a0253ab0496b7e392cfd3fb06076575c45b /tag-emacs
parente88eb66d9a6789c550537fa1ceb51f956f2d3d65 (diff)
downloadnixfiles-c9994d8bda08e4a9f582c07808122a8362431370.tar.lz
nixfiles-c9994d8bda08e4a9f582c07808122a8362431370.tar.zst
nixfiles-c9994d8bda08e4a9f582c07808122a8362431370.zip
Emacs: Move cedit's c-mode hook to cedit init
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 58cc8cf5..0ea80fb1 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-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 @@
             :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)