diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-08-07 12:08:49 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-08-07 12:08:49 +0200 |
| commit | 8b6ac3253f68a01aadd2871832c51e6d294ae808 (patch) | |
| tree | 4ed0daf9159a5ec1442f9f9aec3b130002133bd4 /lisp/magit-refs.el | |
| parent | 92020002b3f162e26af11f1a01c21bb18111b1cc (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/magit-refs.el')
| -rw-r--r-- | lisp/magit-refs.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el index 2ffa12e..47bcf1e 100644 --- a/lisp/magit-refs.el +++ b/lisp/magit-refs.el @@ -508,8 +508,8 @@ Branch %s already exists. "<1>" (magit-menu-item "Visit %s" #'magit-visit-ref)) (defun magit--painted-branch-as-menu-section (section) - (and-let* ((branch (and (magit-section-match 'commit) - (magit--painted-branch-at-point)))) + (and-let* ((_(magit-section-match 'commit)) + (branch (magit--painted-branch-at-point))) (let ((dummy (magit-section :type 'branch :value branch))) (oset dummy keymap magit-branch-section-map) (dolist (slot '(start content hidden parent children)) @@ -747,7 +747,7 @@ line is inserted at all." (magit--propertize-face push 'magit-branch-remote) " ")) - (if-let ((magit-refs-show-branch-descriptions) + (if-let ((_ magit-refs-show-branch-descriptions) (desc (magit-get "branch" branch "description"))) (magit--propertize-face desc 'bold) (and msg (magit-log--wash-summary msg)))))))) |
