1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

Replace underscores in bind-and* with fresh symbols

* lisp/emacs-lisp/cond-star.el (cond*-convert-condition): Bind
unused values to fresh symbols, to avoid the compiler warning
that a symbol starting with an underscore is accessed later on.
This mirrors the behaviour of `if-let*' and family.
This commit is contained in:
Philip Kaludercic 2025-11-23 21:48:32 +01:00
parent 33d813c63b
commit 4ea81f359c
No known key found for this signature in database

View file

@ -311,7 +311,9 @@ This is used for conditional exit clauses."
(dolist (bind (cdr condition))
(push (list (car bind) (list 'and last (cadr bind)))
checks)
(setq last (car bind)))
(when (eq (caar checks) '_)
(setcar (car checks) (make-symbol "s")))
(setq last (caar checks)))
(cond
;; For explanations on these cases, see "Ordinary
;; Lisp expression is the condition." below.