Skip to content

Commit

Permalink
transient--refreshp: New variable
Browse files Browse the repository at this point in the history
This makes it possible for a command to enable a complete transient
refresh, just for itself.
  • Loading branch information
tarsius committed Oct 30, 2023
1 parent 02607dd commit 59d602a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,9 @@ variable instead.")
(defvar transient--helpp nil "Whether help-mode is active.")
(defvar transient--editp nil "Whether edit-mode is active.")

(defvar transient--refreshp nil
"Whether to refresh the transient completely.")

(defvar transient--active-infix nil "The active infix awaiting user input.")

(defvar transient--timer nil)
Expand Down Expand Up @@ -1869,6 +1872,7 @@ value. Otherwise return CHILDREN as is."
(if name
(setq transient--prefix (transient--init-prefix name params))
(setq name (oref transient--prefix command)))
(setq transient--refreshp (oref transient--prefix refresh-suffixes))
(setq transient--layout (or layout (transient--init-suffixes name)))
(setq transient--suffixes (transient--flatten-suffixes transient--layout)))

Expand Down Expand Up @@ -2329,7 +2333,7 @@ value. Otherwise return CHILDREN as is."
;; would have to be used to record that a universal
;; argument is in effect.
(not prefix-arg)))
((oref transient--prefix refresh-suffixes)
(transient--refreshp
(transient--refresh-transient))
((let ((old transient--redisplay-map)
(new (transient--make-redisplay-map)))
Expand Down

0 comments on commit 59d602a

Please sign in to comment.