mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
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'.
This commit is contained in:
parent
ec8d82f53b
commit
01d8abea04
1 changed files with 4 additions and 2 deletions
|
|
@ -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))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue