Move git-commit style settings to hook

+vc|enforce-git-commit-conventions

Also, use fill-column instead of git-commit-fill-column, which magit has
deprecated.
This commit is contained in:
Henrik Lissner
2018-06-24 15:12:46 +02:00
parent 0ee42c1df0
commit 3284356fc2

View File

@ -22,10 +22,12 @@
;; `git-commit-mode'
;; see https://chris.beams.io/posts/git-commit/
(setq git-commit-fill-column 72
git-commit-summary-max-length 50
git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line))
(defun +vc|enforce-git-commit-conventions ()
"See https://chris.beams.io/posts/git-commit/"
(setq fill-column 72
git-commit-summary-max-length 50
git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line)))
(add-hook 'git-commit-mode-hook #'+vc|enforce-git-commit-conventions)
(when (featurep! :feature evil)
(add-hook 'git-commit-mode-hook #'evil-insert-state))