branch: elpa/git-commit commit e4afa6c830e7fc16d868679355700fa945076769 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
git-commit-setup-*: Cosmetics Use `when' instead of (or rather in a addition to) `and', because the value does not matter. These functions are called for side-effects. --- lisp/git-commit.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/git-commit.el b/lisp/git-commit.el index 61e71999c5..2b39bba00c 100644 --- a/lisp/git-commit.el +++ b/lisp/git-commit.el @@ -446,16 +446,16 @@ This is only used if Magit is available." (add-to-list 'with-editor-file-name-history-exclude git-commit-filename-regexp) (defun git-commit-setup-font-lock-in-buffer () - (and buffer-file-name - (string-match-p git-commit-filename-regexp buffer-file-name) - (git-commit-setup-font-lock))) + (when (and buffer-file-name + (string-match-p git-commit-filename-regexp buffer-file-name)) + (git-commit-setup-font-lock))) (add-hook 'after-change-major-mode-hook #'git-commit-setup-font-lock-in-buffer) (defun git-commit-setup-check-buffer () - (and buffer-file-name - (string-match-p git-commit-filename-regexp buffer-file-name) - (git-commit-setup))) + (when (and buffer-file-name + (string-match-p git-commit-filename-regexp buffer-file-name)) + (git-commit-setup))) (defvar git-commit-mode)