[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit e4afa6c830 2/4: git-commit-setup-*: Cosmetics
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit e4afa6c830 2/4: git-commit-setup-*: Cosmetics |
Date: |
Mon, 21 Aug 2023 12:59:46 -0400 (EDT) |
branch: elpa/git-commit
commit e4afa6c830e7fc16d868679355700fa945076769
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@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)