💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit, we change the naming conventions for hook functions and variable functions: 1. Replace the bar | to indicate a hook function with a -h suffix, e.g. doom|init-ui -> doom-init-ui-h doom|run-local-var-hooks -> doom-run-local-var-hooks-h 2. And add a -fn suffix for functions meant to be set on variables, e.g. (setq magit-display-buffer-function #'+magit-display-buffer-fn) See ccf327f8 for the reasoning behind these changes.
This commit is contained in:
parent
51d3b1b424
commit
149b2617b0
58 changed files with 521 additions and 517 deletions
|
@ -41,20 +41,20 @@
|
|||
(global-git-commit-mode +1)
|
||||
(set-yas-minor-mode! 'git-commit-mode)
|
||||
|
||||
(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)
|
||||
(add-hook 'git-commit-mode-hook
|
||||
(defun +vc--enforce-git-commit-conventions-h ()
|
||||
"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))))
|
||||
|
||||
(defun +vc|start-in-insert-state-maybe ()
|
||||
"Start git-commit-mode in insert state if in a blank commit message,
|
||||
(add-hook 'git-commit-setup-hook
|
||||
(defun +vc--start-in-insert-state-maybe ()
|
||||
"Start git-commit-mode in insert state if in a blank commit message,
|
||||
otherwise in default state."
|
||||
(when (and (bound-and-true-p evil-mode)
|
||||
(bobp) (eolp))
|
||||
(evil-insert-state)))
|
||||
(add-hook 'git-commit-setup-hook #'+vc|start-in-insert-state-maybe))
|
||||
(when (and (bound-and-true-p evil-mode)
|
||||
(bobp) (eolp))
|
||||
(evil-insert-state)))))
|
||||
|
||||
(after! vc-annotate
|
||||
(set-popup-rules!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue