Skip to content

Commit

Permalink
transient-echo-arguments: New command
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Oct 26, 2023
1 parent 1625ec4 commit faa3d09
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,22 @@ around `scroll-down-command' (which see)."
(t
(message "No suspended transient command"))))

(transient-define-suffix transient-echo-arguments (arguments)
"Show the transient's active ARGUMENTS in the echo area.
Intended for use in prefixes used for demonstration purposes,
such as when suggesting a new feature or reporting an issue."
:transient t
:description "Echo arguments"
:key "x"
(interactive (list (transient-args transient-current-command)))
(message "Arguments: %s"
(mapconcat (lambda (arg)
(propertize (if (string-match-p " " arg)
(format "%S" arg)
arg)
'face 'transient-argument))
arguments " ")))

;;; Value
;;;; Init

Expand Down

0 comments on commit faa3d09

Please sign in to comment.