diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2023-03-26 23:53:03 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-03-26 23:53:03 +0200 |
commit | 0337131bfa194856234ddfe70ee38b3165d66289 (patch) | |
tree | 96e9b218a0ab7a05c1757f1d2cb70d6d69cfd314 /lisp/transient.el | |
parent | a8c23677d3939b8af1bcddb63244fe7b5bb384a4 (diff) | |
download | emacs-0337131bfa194856234ddfe70ee38b3165d66289.tar.gz emacs-0337131bfa194856234ddfe70ee38b3165d66289.tar.bz2 emacs-0337131bfa194856234ddfe70ee38b3165d66289.zip |
Update to Transient v0.3.7-218-g3dbb22a
Diffstat (limited to 'lisp/transient.el')
-rw-r--r-- | lisp/transient.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index 96e711e950c..4affc414fa6 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2516,17 +2516,22 @@ prefix argument and pivot to `transient-update'." (defun transient--invalid (msg) (ding) - (message "%s: `%s' (Use `%s' to abort, `%s' for help) [%s]" + (message "%s: `%s' (Use `%s' to abort, `%s' for help)%s" msg (propertize (key-description (this-single-command-keys)) 'face 'font-lock-warning-face) (propertize "C-g" 'face 'transient-key) (propertize "?" 'face 'transient-key) - ;; `this-command' is `transient--undefined' or similar at this - ;; point. Show the command the user actually tried to invoke. - (propertize (symbol-name (transient--suffix-symbol - this-original-command)) - 'face 'font-lock-warning-face)) + ;; `this-command' is `transient-undefined' or `transient-inapt'. + ;; Show the command (`this-original-command') the user actually + ;; tried to invoke. For an anonymous inapt command that is a + ;; lambda expression, which cannot be mapped to a symbol, so + ;; forgo displaying the command. + (if-let ((cmd (ignore-errors + (symbol-name (transient--suffix-symbol + this-original-command))))) + (format " [%s]" (propertize cmd 'face 'font-lock-warning-face)) + "")) (unless (and transient--transient-map (memq transient--transient-map overriding-terminal-local-map)) (let ((transient--prefix (or transient--prefix 'sic))) |