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

Fix 'bind*' in 'cond*'

* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-substance):
Fix 'bind*' to match the documentation.  (Bug#79247)

Copyright-paperwork-exempt: yes
This commit is contained in:
Lester Longley 2025-09-15 09:35:03 -04:00 committed by Eli Zaretskii
parent ef9860588a
commit cc4de67bd2

View file

@ -178,7 +178,9 @@ only in the CONDITION of a `cond*' clause."
(defun cond*-non-exit-clause-substance (clause)
"For a non-exit cond* clause CLAUSE, return its substance.
This removes a final keyword if that's what makes CLAUSE non-exit."
(cond ((null (cdr-safe clause)) ;; clause has only one element.
(cond ((or (null (cdr-safe clause)) ;; either clause has only one element
(and (consp (car clause)) ;; or it starts with `bind*'
(eq (caar clause) 'bind*)))
clause)
;; Starts with t or a keyword.
;; Include t as the first element of the substance