Skip to content

Commit 30d9747

Browse files
committed
Use _ in all non-binding entries in the varlist of COND-let forms
This was not done until now because doing so results 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 fixes the issue for that package and packages that depend on it. It doesn't remove the warning when compiling this package, but I have decided I *always* want to use `_' when appropriate, and that I can live with users seeing warnings, if they do not bother to update to the latest Emacs release in a timely manner. Alternatively they can add the backport early in their init file. 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.
1 parent fec8743 commit 30d9747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elx.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ The value is a cons of the form (FULLNAME . ADDRESS)."
12601260
(when-let*
12611261
((parts (match-string 2 x))
12621262
(parts (split-string parts " " t))
1263-
((seq-every-p (##string-match-p "\\`\".+\"\\'" %) parts)))
1263+
(_(seq-every-p (##string-match-p "\\`\".+\"\\'" %) parts)))
12641264
(setq mail (mapconcat (##substring % 1 -1) parts ""))))
12651265
((string-match (concat "\\(\\S-+@\\S-+\\) "
12661266
"[(<]\\(.*\\)[>)]") x)

0 commit comments

Comments
 (0)