From 01d8abea0453fe4f0ffdf85c0a37f3fb33c7e1dd Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 8 Feb 2026 15:28:37 +0000 Subject: [PATCH] cond*: Fix handling of :non-exit keywords * lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p): Don't return nil for clauses ending with ':non-exit'. (cond*-non-exit-clause-substance): Don't accept just any keyword, require ':non-exit'. --- lisp/emacs-lisp/cond-star.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el index 6995f24eac3..dfb08459506 100644 --- a/lisp/emacs-lisp/cond-star.el +++ b/lisp/emacs-lisp/cond-star.el @@ -199,7 +199,9 @@ CONDITION of a `cond*' clause. See `cond*' for details." (or (eq (car clause) t) ;; Starts with a `bind*' or `bind-and*' pseudo-form. (and (consp (car clause)) - (memq (caar clause) '(bind* bind-and*))))))) + (memq (caar clause) '(bind* bind-and*))))) + ;; Ends with keyword. + (eq (car (last clause)) :non-exit))) (defun cond*-non-exit-clause-substance (clause) "For a non-exit cond* clause CLAUSE, return its substance. @@ -218,7 +220,7 @@ This removes a final keyword if that's what makes CLAUSE non-exit." (cons t (cdr clause))) ;; Ends with keyword. - ((keywordp (car (last clause))) + ((eq (car (last clause)) :non-exit) ;; Do NOT include the final keyword. (butlast clause))))