From faa3d09d1ba849a47be8790f37a0b55006e17984 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 26 Oct 2023 12:48:59 +0200 Subject: [PATCH] transient-echo-arguments: New command --- lisp/transient.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lisp/transient.el b/lisp/transient.el index afc6dff4..ca8e8cce 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -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