From 29d365f7b0c97c35aa5fd7ff7139a30c0119f2f7 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 20 Oct 2013 18:36:29 +0100 Subject: [PATCH] Write commit messages with git-commit-mode in style ^_^ --- mode-customizations.el | 1 + mode-customizations/git-commit-mode.el | 10 ++++++++++ mode-customizations/magit-mode.el | 12 ------------ 3 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 mode-customizations/git-commit-mode.el diff --git a/mode-customizations.el b/mode-customizations.el index 6a358c0..db80b68 100644 --- a/mode-customizations.el +++ b/mode-customizations.el @@ -11,6 +11,7 @@ (load-file (config-path "mode-customizations/emacs-lisp-mode.el")) (load-file (config-path "mode-customizations/erlang-mode.el")) (load-file (config-path "mode-customizations/feature-mode.el")) +(load-file (config-path "mode-customizations/git-commit-mode.el")) (load-file (config-path "mode-customizations/haml-mode.el")) (load-file (config-path "mode-customizations/html-mode.el")) (load-file (config-path "mode-customizations/js-mode.el")) diff --git a/mode-customizations/git-commit-mode.el b/mode-customizations/git-commit-mode.el new file mode 100644 index 0000000..7664193 --- /dev/null +++ b/mode-customizations/git-commit-mode.el @@ -0,0 +1,10 @@ +;; Write commit messages in style +(defun customizations-for-git-commit-mode () + (interactive) + (flyspell-mode) + (linum-mode t) + (auto-fill-mode) + (subword-mode) + (fci-mode)) + +(add-hook 'git-commit-mode-hook 'customizations-for-git-commit-mode) diff --git a/mode-customizations/magit-mode.el b/mode-customizations/magit-mode.el index b68ee8d..dd242b0 100644 --- a/mode-customizations/magit-mode.el +++ b/mode-customizations/magit-mode.el @@ -4,15 +4,3 @@ (linum-mode t)) (add-hook 'magit-mode-hook 'customizations-for-magit-mode) - -;; Write commit messages in style -(defun customizations-for-magit-log-edit-mode () - (interactive) - (flyspell-mode) - (linum-mode t) - (auto-fill-mode) - (subword-mode) - (setq fill-column 72) - (fci-mode)) - -(add-hook 'magit-log-edit-mode-hook 'customizations-for-magit-log-edit-mode)