[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 338f7942a7 01/38: Various debug improvements
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 338f7942a7 01/38: Various debug improvements |
Date: |
Tue, 11 Jan 2022 05:37:43 -0500 (EST) |
branch: externals/transient
commit 338f7942a7819f29dbf6e9766e6a196c86fd03a6
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Various debug improvements
---
lisp/transient.el | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index bfe0da356d..6897811b5a 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1581,12 +1581,12 @@ of the corresponding object.")
(defvar transient--redisplay-key nil)
(defun transient--push-keymap (map)
- (transient--debug " push %s%s" map (if (symbol-value map) "" " VOID"))
+ (transient--debug " push %s%s" map (if (symbol-value map) "" " VOID"))
(with-demoted-errors "transient--push-keymap: %S"
(internal-push-keymap (symbol-value map) 'overriding-terminal-local-map)))
(defun transient--pop-keymap (map)
- (transient--debug " pop %s%s" map (if (symbol-value map) "" " VOID"))
+ (transient--debug " pop %s%s" map (if (symbol-value map) "" " VOID"))
(with-demoted-errors "transient--pop-keymap: %S"
(internal-pop-keymap (symbol-value map) 'overriding-terminal-local-map)))
@@ -2106,14 +2106,20 @@ value. Otherwise return CHILDREN as is."
(defun transient--debug (arg &rest args)
(when transient--debug
- (if (symbolp arg)
- (message "-- %-16s (cmd: %s, event: %S, exit: %s)"
- arg
- (or (transient--suffix-symbol this-command)
- (list this-command this-original-command last-command))
- (key-description (this-command-keys-vector))
- transient--exitp)
- (apply #'message arg args))))
+ (let ((inhibit-message (not (eq transient--debug 'message))))
+ (if (symbolp arg)
+ (message "-- %-16s (cmd: %s, event: %S, exit: %s%s)"
+ arg
+ (or (transient--suffix-symbol this-command)
+ (list this-command this-original-command last-command))
+ (key-description (this-command-keys-vector))
+ transient--exitp
+ (cond ((stringp (car args))
+ (concat ", " (apply #'format args)))
+ (args
+ (concat ", " (apply (car args) (cdr args))))
+ (t "")))
+ (apply #'message arg args)))))
(defun transient--emergency-exit ()
"Exit the current transient command after an error occurred.
- [elpa] externals/transient updated (51c50d8c82 -> 3de8d9b256), Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 338f7942a7 01/38: Various debug improvements,
Jonas Bernoulli <=
- [elpa] externals/transient 28491e1f8e 02/38: Properly deal with stealth undefined command, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 1a1ae03600 05/38: Remove transient--pre-command later, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 41521a5c93 12/38: transient--get-predicate-for: Always return a function, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 143a13938c 04/38: transient-infix-read: Always enable-recursive-minibuffers, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 69f42f9e89 15/38: transient--make-predicate-map: Cosmetics, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient e90f7a165e 16/38: Add support for returning from a sub-prefix to the parent prefix, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 714e348296 18/38: No longer always suspend when handle-switch-frame is called, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient c19ff84355 19/38: manual: Rearrange and group options, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 5762bd9a06 22/38: transient-hide-during-minibuffer-read: New option, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 8d8ed1965f 26/38: Hide infix commands from execute-extended-command, Jonas Bernoulli, 2022/01/11