Function: transient-set-default-level
transient-set-default-level is a byte-compiled function defined in
transient.el.
Signature
(transient-set-default-level COMMAND LEVEL)
Documentation
Set the default level of suffix COMMAND to LEVEL.
See transient-default-level for an introduction to how levels work.
A suffix command is made available if its level is smaller than or equal to the level of the menu. The level of a suffix command is determined as follows:
1. The default level for all suffix commands, which is always 1.
2. The level set when the suffix command was defined using
transient-define-suffix, transient-define-infix or
transient-define-argument.
3. The level set using this function. Use this to override the
value set using (2) or the default from (1). (4) and (5)
override the value set here. This function can only be used for
commands defined using the functions mentioned in (2); else you
have to use (5). Unless a command appears in multiple menus, it
is better to use (5).
4. The level set when binding the suffix command in a specific menu.
Package authors should avoid this, and prefer (2); unless they
want to place a command on different levels in different menus.
5. The level interactively set for an individual suffix command in an
individual menu, using M-x transient-set-level (transient-set-level).
Source Code
;; Defined in ~/.emacs.d/elpa/transient-20261101.1108/transient.el
(defun transient-set-default-level (command level)
"Set the default level of suffix COMMAND to LEVEL.
See `transient-default-level' for an introduction to how levels work.
A suffix command is made available if its level is smaller than or
equal to the level of the menu. The level of a suffix command is
determined as follows:
1. The default level for all suffix commands, which is always 1.
2. The level set when the suffix command was defined using
`transient-define-suffix', `transient-define-infix' or
`transient-define-argument'.
3. The level set using this function. Use this to override the
value set using (2) or the default from (1). (4) and (5)
override the value set here. This function can only be used for
commands defined using the functions mentioned in (2); else you
have to use (5). Unless a command appears in multiple menus, it
is better to use (5).
4. The level set when binding the suffix command in a specific menu.
Package authors should avoid this, and prefer (2); unless they
want to place a command on different levels in different menus.
5. The level interactively set for an individual suffix command in an
individual menu, using \\<transient--docstr-hint-2>\\[transient-set-level]."
(if-let ((proto (transient--suffix-prototype command)))
(oset proto level level)
(user-error "Cannot set level for `%s'; no prototype object exists"
command)))