emacs/vc: refactor enforcement of git-commit conventions
To make it easier for users to customize.
This commit is contained in:
parent
ea34b11194
commit
5b656ec56c
1 changed files with 5 additions and 6 deletions
|
@ -34,12 +34,11 @@
|
||||||
(global-git-commit-mode +1)
|
(global-git-commit-mode +1)
|
||||||
(set-yas-minor-mode! 'git-commit-mode)
|
(set-yas-minor-mode! 'git-commit-mode)
|
||||||
|
|
||||||
(add-hook! 'git-commit-mode-hook
|
;; Enforce git commit conventions.
|
||||||
(defun +vc-enforce-git-commit-conventions-h ()
|
;; See https://chris.beams.io/posts/git-commit/
|
||||||
"See https://chris.beams.io/posts/git-commit/"
|
(setq git-commit-summary-max-length 50
|
||||||
(setq fill-column 72
|
git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line))
|
||||||
git-commit-summary-max-length 50
|
(setq-hook! 'git-commit-mode-hook fill-column 72)
|
||||||
git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line))))
|
|
||||||
|
|
||||||
(add-hook! 'git-commit-setup-hook
|
(add-hook! 'git-commit-setup-hook
|
||||||
(defun +vc-start-in-insert-state-maybe ()
|
(defun +vc-start-in-insert-state-maybe ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue