summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-08-07 12:33:54 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-08-07 12:33:54 +0200
commita6c8e215af56afc311e155e2104662caa8d16312 (patch)
tree4387831a15528d7b27904e6826667c04a5de69b1
parent0cc2daffded18eea7f00a318cfa3e216977ffe50 (diff)
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.
-rw-r--r--llama.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/llama.el b/llama.el
index c1d6558..f777506 100644
--- a/llama.el
+++ b/llama.el
@@ -352,7 +352,7 @@ expansion, and the looks of this face should hint at that.")
(prog1 t
(save-excursion
(goto-char (match-beginning 0))
- (when-let (((save-match-data (not (nth 8 (syntax-ppss)))))
+ (when-let ((_(save-match-data (not (nth 8 (syntax-ppss)))))
(expr (ignore-errors
(read-positioning-symbols (current-buffer)))))
(put-text-property (match-beginning 0) (point)