summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el2
-rw-r--r--lisp/km-magit.el6
2 files changed, 7 insertions, 1 deletions
diff --git a/init.el b/init.el
index beea3cd..e6ff37e 100644
--- a/init.el
+++ b/init.el
@@ -996,7 +996,7 @@
(lambda ()
(add-hook 'with-editor-pre-finish-hook
#'git-commit-save-message nil t)))
- (add-hook 'git-commit-setup-hook #'git-commit-turn-on-flyspell))
+ (add-hook 'git-commit-setup-hook #'km/git-commit-turn-on-flyspell))
(use-package orgit
:load-path "~/src/emacs/orgit/"
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index e96996c..91a6e6c 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -589,6 +589,12 @@ argument. Interactively, this can be accessed using the command
(interactive "P")
(km/magit-diff-visit-file prev-rev t))
+(defun km/git-commit-turn-on-flyspell ()
+ "Like `git-commit-turn-on-flyspell', but don't check buffer initially."
+ (setq flyspell-generic-check-word-predicate
+ 'git-commit-flyspell-verify)
+ (turn-on-flyspell))
+
;;; Git Rebase mode