aboutsummaryrefslogtreecommitdiff
path: root/lisp/git-commit.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-08-07 12:08:49 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-08-07 12:08:49 +0200
commit8b6ac3253f68a01aadd2871832c51e6d294ae808 (patch)
tree4ed0daf9159a5ec1442f9f9aec3b130002133bd4 /lisp/git-commit.el
parent92020002b3f162e26af11f1a01c21bb18111b1cc (diff)
Use _ in all non-binding entries in the varlist of COND-let forms
This was not done until now because doing so resulted in a warning because the macro expansion did not actually leave any variables unused. This was fixed in Emacs 30.1 and I've added a backport to Transient, which this package can also take advantage of. Without consistently using `_' one would always have to count parens to be sure whether a member of the varlist does or does not bind a variable. It is very easy to make mistake when writing or reading such forms, if `_' is not consistently used in the non-binding cases.
Diffstat (limited to 'lisp/git-commit.el')
-rw-r--r--lisp/git-commit.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index 140e058..6494e41 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -502,7 +502,7 @@ the redundant bindings, then set this to nil, before loading
(not (file-accessible-directory-p
(file-name-directory buffer-file-name)))
(magit-expand-git-file-name (substring buffer-file-name 2))))
- ((file-accessible-directory-p (file-name-directory file)))
+ (_(file-accessible-directory-p (file-name-directory file)))
(inhibit-read-only t))
(insert-file-contents file t)
t))
@@ -748,7 +748,7 @@ With a numeric prefix ARG, go back ARG messages."
;; non-empty and newly written comment, because otherwise
;; it would be irreversibly lost.
(when-let* ((message (git-commit-buffer-message))
- ((not (ring-member log-edit-comment-ring message))))
+ (_(not (ring-member log-edit-comment-ring message))))
(ring-insert log-edit-comment-ring message)
(cl-incf arg)
(setq len (ring-length log-edit-comment-ring)))