diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-24 09:19:24 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2026-03-24 09:19:24 +0100 |
| commit | 0a7b90b0fead27a6b6750b89efcbdb3ab1ad35dc (patch) | |
| tree | e4558f00dc73957ac78c9717b5f194747ecf8fa9 /lisp/git-commit.el | |
| parent | 26042bab16f75ca932c9edfa1ce60fbf28137636 (diff) | |
Rename two internal git-commit functions to mark them as private
Users only encounter these if they look at the hooks to which we add
them, in which case it would be nice to know what they do, so add
basic docstrings.
Diffstat (limited to 'lisp/git-commit.el')
| -rw-r--r-- | lisp/git-commit.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/git-commit.el b/lisp/git-commit.el index d6b6832..3d871f6 100644 --- a/lisp/git-commit.el +++ b/lisp/git-commit.el @@ -635,9 +635,10 @@ Ensure auto filling happens everywhere, except in the summary line." (auto-fill-mode 1) (setq-local comment-auto-fill-only-comments nil) (when git-commit-need-summary-line - (setq-local auto-fill-function #'git-commit-auto-fill-except-summary))) + (setq-local auto-fill-function #'git-commit--auto-fill-except-summary))) -(defun git-commit-auto-fill-except-summary () +(defun git-commit--auto-fill-except-summary () + "Do not fill summary line." (unless (eq (line-beginning-position) 1) (do-auto-fill))) @@ -658,8 +659,7 @@ most text that Git will strip from the final message, such as the last comment and anything below the cut line (\"--- >8 ---\")." (require 'flyspell) (flyspell-mode 1) - (setq flyspell-generic-check-word-predicate - #'git-commit-flyspell-verify) + (setq flyspell-generic-check-word-predicate #'git-commit--flyspell-verify) (let ((end nil) ;; The "cut line" is defined in "git/wt-status.c". It appears ;; in the commit message when `commit.verbose' is set to true. @@ -675,7 +675,8 @@ comment and anything below the cut line (\"--- >8 ---\")." (setq end (point))) (flyspell-region (point-min) end))) -(defun git-commit-flyspell-verify () +(defun git-commit--flyspell-verify () + "Do not check spelling in comments." (not (= (char-after (line-beginning-position)) (aref comment-start 0)))) |
