aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorJonas Bernoulli2025-09-03 17:11:44 +0200
committerJonas Bernoulli2025-09-03 17:11:44 +0200
commit5f70ff65a79f32933e9b4eef46774eb3081c91ce (patch)
treef2e7307209a2cf415724dc4e088186b038b4bdf1 /doc/misc
parent5db70442e52c93f8bb8f6532a81d2cf4f30a7ad2 (diff)
downloademacs-5f70ff65a79f32933e9b4eef46774eb3081c91ce.tar.gz
emacs-5f70ff65a79f32933e9b4eef46774eb3081c91ce.zip
Update to Transient v0.10.0-8-g5efa5c6e
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/transient.texi83
1 files changed, 75 insertions, 8 deletions
diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi
index 4aa0ebf97d6..f2e06009771 100644
--- a/doc/misc/transient.texi
+++ b/doc/misc/transient.texi
@@ -31,7 +31,7 @@ General Public License for more details.
31@finalout 31@finalout
32@titlepage 32@titlepage
33@title Transient User and Developer Manual 33@title Transient User and Developer Manual
34@subtitle for version 0.9.4 34@subtitle for version 0.10.0
35@author Jonas Bernoulli 35@author Jonas Bernoulli
36@page 36@page
37@vskip 0pt plus 1filll 37@vskip 0pt plus 1filll
@@ -53,7 +53,7 @@ resource to get over that hurdle is Psionic K's interactive tutorial,
53available at @uref{https://github.com/positron-solutions/transient-showcase}. 53available at @uref{https://github.com/positron-solutions/transient-showcase}.
54 54
55@noindent 55@noindent
56This manual is for Transient version 0.9.4. 56This manual is for Transient version 0.10.0.
57 57
58@insertcopying 58@insertcopying
59@end ifnottex 59@end ifnottex
@@ -1692,15 +1692,28 @@ If the current command was invoked from the transient prefix command
1692@var{PREFIX}, then it returns the active infix arguments. If the current 1692@var{PREFIX}, then it returns the active infix arguments. If the current
1693command was not invoked from @var{PREFIX}, then it returns the set, saved 1693command was not invoked from @var{PREFIX}, then it returns the set, saved
1694or default value for @var{PREFIX}. 1694or default value for @var{PREFIX}.
1695
1696PREFIX may also be a list of prefixes. If no prefix is active, the
1697fallback value of the first of these prefixes is used.
1698
1699The generic function @code{transient-prefix-value} is used to determine the
1700returned value.
1701
1702This function is intended to be used by suffix commands, whether they
1703are invoked from a menu or not. It is not intended to be used when
1704setting up a menu and its suffixes, in which case @code{transient-get-value}
1705should be used.
1695@end defun 1706@end defun
1696 1707
1697@defun transient-get-value 1708@defun transient-get-value
1698This function returns the value of the current prefix. 1709This function returns the value of the erant prefix.
1699 1710
1700This is mostly intended for internal use, but may also be of use 1711This function is intended to be used when setting up a menu and its
1701in @code{transient-set-value} and @code{transient-save-value} methods. Unlike 1712suffixes. It is not intended to be used when a suffix command is
1702@code{transient-args}, this does not include the values of suffixes whose 1713invoked, whether from a menu or not, in which case @code{transient-args}
1703@code{unsavable} slot is non-@code{nil}. 1714should be used. In other words, use this, e.g., in a suffixes @code{:if*}
1715or @code{:inapt-if*} predicate and @code{:description} function, but never in its
1716@code{interactive} form or function body.
1704@end defun 1717@end defun
1705 1718
1706@defun transient-arg-value arg args 1719@defun transient-arg-value arg args
@@ -2406,6 +2419,21 @@ function, that is called to get the value. If the slot is unbound,
2406 2419
2407@defun transient-prefix-value obj 2420@defun transient-prefix-value obj
2408This generic function returns the value of the prefix object @var{OBJ}. 2421This generic function returns the value of the prefix object @var{OBJ}.
2422
2423OBJ is a prototype object and is only used to select the appropriate
2424method of this generic function. This function does not return the
2425value of that object. Instead it extracts the name of the respective
2426command from the object and uses that to collect the current values
2427from the suffixes of the prefix from which the current command was
2428invoked. If the current command was not invoked from the identified
2429prefix, then this method returns the set, save or default value, as
2430described for @code{transient-args}.
2431
2432This function is only intended to be used by @code{transient-args}. It is
2433not defined as an internal function because third-party packages may
2434define their own methods. That does not mean that it would be a good
2435idea to call it for any other purpose.
2436
2409The respective generic function for infix and suffix objects is 2437The respective generic function for infix and suffix objects is
2410named @code{transient-infix-value}. 2438named @code{transient-infix-value}.
2411@end defun 2439@end defun
@@ -2613,6 +2641,45 @@ then this slot has to be set to the same value for all of them. You
2613probably don't want that. 2641probably don't want that.
2614 2642
2615@item 2643@item
2644@code{remember-value} When a suffix command is invoked, which can consume
2645the prefix's value (which depends on the suffix slot @code{transient} and
2646the prefix slots @code{transient-suffix} and @code{transient-non-suffix}), then
2647the value is automatically pushed to the prefix's value history.
2648
2649This slot allows additionally setting or even saving the value, so
2650that it becomes the initial value when the menu is invoked again.
2651
2652Beside @code{nil}, the value can be one of these symbols:
2653
2654@itemize
2655@item
2656@code{export} Set the value when it is exported. That is the time when
2657the value would ordinarily just be pushed to the history stack.
2658
2659@item
2660@code{exit} Set the value when the menu is exited, except when that is
2661done using a command whose sole purpose is to quit the menu.
2662
2663@item
2664@code{quit} Set the value when the menu is quit, using a command whose
2665sole purpose is to do so.
2666@end itemize
2667
2668The value can also be a list of one or more of these symbols and
2669optionally also the symbol @code{save}.
2670
2671@itemize
2672@item
2673@code{save} Instead of merely setting the value, save it, so that it will
2674be used in future Emacs sessions. At least one other symbol has
2675to be used together with this.
2676@end itemize
2677
2678The value can also be a (quoted) variable, whose value is a list of
2679symbols as described above. Ideally an option should be used, since
2680not all users will find the automatic saving of the value desirable.
2681
2682@item
2616@code{incompatible} A list of lists. Each sub-list specifies a set of 2683@code{incompatible} A list of lists. Each sub-list specifies a set of
2617mutually exclusive arguments. Enabling one of these arguments 2684mutually exclusive arguments. Enabling one of these arguments
2618causes the others to be disabled. An argument may appear in 2685causes the others to be disabled. An argument may appear in