Skip to content

Commit f64f024

Browse files
committed
transient-common-commands: Cosmetics
1 parent 909e5da commit f64f024

1 file changed

Lines changed: 18 additions & 23 deletions

File tree

lisp/transient.el

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,39 +1968,34 @@ to `transient-predicate-map'. See also `transient-base-map'.")
19681968
"C-g" #'transient-quit-seq)
19691969

19701970
(defvar transient--common-command-prefixes '(?\C-x))
1971-
19721971
(put 'transient-common-commands
19731972
'transient--layout
19741973
(list
19751974
(eval
19761975
(car (transient--parse-child
19771976
'transient-common-commands
1978-
(vector
1979-
:hide
1977+
[:hide
19801978
(lambda ()
1981-
(and (not (memq
1982-
(car (bound-and-true-p transient--redisplay-key))
1983-
transient--common-command-prefixes))
1979+
(defvar transient--redisplay-key)
1980+
(and (not (memq (car transient--redisplay-key)
1981+
transient--common-command-prefixes))
19841982
(not transient-show-common-commands)))
1985-
(vector
1986-
"Value commands"
1987-
(list "C-x s " "Set" #'transient-set)
1988-
(list "C-x C-s" "Save" #'transient-save)
1989-
(list "C-x C-k" "Reset" #'transient-reset)
1990-
(list "C-x p " "Previous value" #'transient-history-prev)
1991-
(list "C-x n " "Next value" #'transient-history-next))
1992-
(vector
1993-
"Sticky commands"
1983+
["Value commands"
1984+
("C-x s " "Set" transient-set)
1985+
("C-x C-s" "Save" transient-save)
1986+
("C-x C-k" "Reset" transient-reset)
1987+
("C-x p " "Previous value" transient-history-prev)
1988+
("C-x n " "Next value" transient-history-next)]
1989+
["Sticky commands"
19941990
;; Like `transient-sticky-map' except that
19951991
;; "C-g" has to be bound to a different command.
1996-
(list "C-g" "Quit prefix or transient" #'transient-quit-one)
1997-
(list "C-q" "Quit transient stack" #'transient-quit-all)
1998-
(list "C-z" "Suspend transient stack" #'transient-suspend))
1999-
(vector
2000-
"Customize"
2001-
(list "C-x t" #'transient-toggle-common)
2002-
(list "C-x l" "Show/hide suffixes" #'transient-set-level)
2003-
(list "C-x a" #'transient-toggle-level-limit)))))
1992+
("C-g" "Quit prefix or transient" transient-quit-one)
1993+
("C-q" "Quit transient stack" transient-quit-all)
1994+
("C-z" "Suspend transient stack" transient-suspend)]
1995+
["Customize"
1996+
("C-x t" transient-toggle-common)
1997+
("C-x l" "Show/hide suffixes" transient-set-level)
1998+
("C-x a" transient-toggle-level-limit)]]))
20041999
t)))
20052000

20062001
(defvar-keymap transient-popup-navigation-map

0 commit comments

Comments
 (0)