Skip to content

Commit

Permalink
Rename transient-get-{predicate-for => pre-command}
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Nov 23, 2023
1 parent f23f51e commit 4c1cda9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -2146,8 +2146,8 @@ value. Otherwise return CHILDREN as is."
;; lead to a suffix being remapped to a non-suffix. We have to undo
;; the remapping in that case. However, remapping a non-suffix to
;; another should remain possible.
(when (and (transient--get-predicate-for this-original-command 'suffix)
(not (transient--get-predicate-for this-command 'suffix)))
(when (and (transient--get-pre-command this-original-command 'suffix)
(not (transient--get-pre-command this-command 'suffix)))
(setq this-command this-original-command))
(cond
((memq this-command '(transient-update transient-quit-seq))
Expand Down Expand Up @@ -2505,7 +2505,7 @@ nil) then do nothing."
;;; Pre-Commands

(defun transient--call-pre-command ()
(if-let ((fn (transient--get-predicate-for this-command)))
(if-let ((fn (transient--get-pre-command this-command)))
(let ((action (funcall fn)))
(when (eq action transient--exit)
(setq transient--exitp (or transient--exitp t)))
Expand All @@ -2517,7 +2517,7 @@ nil) then do nothing."
(setq this-command 'transient-undefined)))
transient--stay))

(defun transient--get-predicate-for (cmd &optional suffix-only)
(defun transient--get-pre-command (cmd &optional suffix-only)
(or (ignore-errors
(lookup-key transient--predicate-map (vector cmd)))
(and (not suffix-only)
Expand Down Expand Up @@ -4208,7 +4208,7 @@ search instead."

(defun transient--suffix-color (command)
(or (get command 'transient-color)
(get (transient--get-predicate-for command) 'transient-color)))
(get (transient--get-pre-command command) 'transient-color)))

(defun transient--prefix-color (command)
(let* ((nonsuf (or (oref command transient-non-suffix)
Expand Down

0 comments on commit 4c1cda9

Please sign in to comment.