Skip to content

Commit

Permalink
transient--parse-suffix: Clarify clause, removing dead code
Browse files Browse the repository at this point in the history
The only command left to be handled in this clause are `lambda'
expressions.  Keep `commandp' so we continue to signal an error
if that lacks an `interactive' form.
  • Loading branch information
monnier authored and tarsius committed Sep 2, 2024
1 parent bdb37f5 commit fb88f80
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ commands are aliases for."
((symbolp car)
(setq args (plist-put args :command (macroexp-quote pop))))
((and (commandp car)
(not (stringp car)))
(eq (car-safe car) 'lambda))
(let ((cmd pop)
(sym (intern
(format
Expand All @@ -1200,10 +1200,7 @@ commands are aliases for."
`(prog1 ',sym
(put ',sym 'interactive-only t)
(put ',sym 'completion-predicate #'transient--suffix-only)
(defalias ',sym
,(if (eq (car-safe cmd) 'lambda)
cmd
(macroexp-quote cmd))))))))
(defalias ',sym ,cmd))))))
((or (stringp car)
(and car (listp car)))
(let ((arg pop)
Expand Down

0 comments on commit fb88f80

Please # to comment.