diff options
| author | Jonas Bernoulli | 2025-09-03 17:11:44 +0200 |
|---|---|---|
| committer | Jonas Bernoulli | 2025-09-03 17:11:44 +0200 |
| commit | 5f70ff65a79f32933e9b4eef46774eb3081c91ce (patch) | |
| tree | f2e7307209a2cf415724dc4e088186b038b4bdf1 /doc/misc | |
| parent | 5db70442e52c93f8bb8f6532a81d2cf4f30a7ad2 (diff) | |
| download | emacs-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.texi | 83 |
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, | |||
| 53 | available at @uref{https://github.com/positron-solutions/transient-showcase}. | 53 | available at @uref{https://github.com/positron-solutions/transient-showcase}. |
| 54 | 54 | ||
| 55 | @noindent | 55 | @noindent |
| 56 | This manual is for Transient version 0.9.4. | 56 | This 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 |
| 1693 | command was not invoked from @var{PREFIX}, then it returns the set, saved | 1693 | command was not invoked from @var{PREFIX}, then it returns the set, saved |
| 1694 | or default value for @var{PREFIX}. | 1694 | or default value for @var{PREFIX}. |
| 1695 | |||
| 1696 | PREFIX may also be a list of prefixes. If no prefix is active, the | ||
| 1697 | fallback value of the first of these prefixes is used. | ||
| 1698 | |||
| 1699 | The generic function @code{transient-prefix-value} is used to determine the | ||
| 1700 | returned value. | ||
| 1701 | |||
| 1702 | This function is intended to be used by suffix commands, whether they | ||
| 1703 | are invoked from a menu or not. It is not intended to be used when | ||
| 1704 | setting up a menu and its suffixes, in which case @code{transient-get-value} | ||
| 1705 | should be used. | ||
| 1695 | @end defun | 1706 | @end defun |
| 1696 | 1707 | ||
| 1697 | @defun transient-get-value | 1708 | @defun transient-get-value |
| 1698 | This function returns the value of the current prefix. | 1709 | This function returns the value of the erant prefix. |
| 1699 | 1710 | ||
| 1700 | This is mostly intended for internal use, but may also be of use | 1711 | This function is intended to be used when setting up a menu and its |
| 1701 | in @code{transient-set-value} and @code{transient-save-value} methods. Unlike | 1712 | suffixes. 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 | 1713 | invoked, whether from a menu or not, in which case @code{transient-args} |
| 1703 | @code{unsavable} slot is non-@code{nil}. | 1714 | should be used. In other words, use this, e.g., in a suffixes @code{:if*} |
| 1715 | or @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 |
| 2408 | This generic function returns the value of the prefix object @var{OBJ}. | 2421 | This generic function returns the value of the prefix object @var{OBJ}. |
| 2422 | |||
| 2423 | OBJ is a prototype object and is only used to select the appropriate | ||
| 2424 | method of this generic function. This function does not return the | ||
| 2425 | value of that object. Instead it extracts the name of the respective | ||
| 2426 | command from the object and uses that to collect the current values | ||
| 2427 | from the suffixes of the prefix from which the current command was | ||
| 2428 | invoked. If the current command was not invoked from the identified | ||
| 2429 | prefix, then this method returns the set, save or default value, as | ||
| 2430 | described for @code{transient-args}. | ||
| 2431 | |||
| 2432 | This function is only intended to be used by @code{transient-args}. It is | ||
| 2433 | not defined as an internal function because third-party packages may | ||
| 2434 | define their own methods. That does not mean that it would be a good | ||
| 2435 | idea to call it for any other purpose. | ||
| 2436 | |||
| 2409 | The respective generic function for infix and suffix objects is | 2437 | The respective generic function for infix and suffix objects is |
| 2410 | named @code{transient-infix-value}. | 2438 | named @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 | |||
| 2613 | probably don't want that. | 2641 | probably don't want that. |
| 2614 | 2642 | ||
| 2615 | @item | 2643 | @item |
| 2644 | @code{remember-value} When a suffix command is invoked, which can consume | ||
| 2645 | the prefix's value (which depends on the suffix slot @code{transient} and | ||
| 2646 | the prefix slots @code{transient-suffix} and @code{transient-non-suffix}), then | ||
| 2647 | the value is automatically pushed to the prefix's value history. | ||
| 2648 | |||
| 2649 | This slot allows additionally setting or even saving the value, so | ||
| 2650 | that it becomes the initial value when the menu is invoked again. | ||
| 2651 | |||
| 2652 | Beside @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 | ||
| 2657 | the 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 | ||
| 2661 | done 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 | ||
| 2665 | sole purpose is to do so. | ||
| 2666 | @end itemize | ||
| 2667 | |||
| 2668 | The value can also be a list of one or more of these symbols and | ||
| 2669 | optionally 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 | ||
| 2674 | be used in future Emacs sessions. At least one other symbol has | ||
| 2675 | to be used together with this. | ||
| 2676 | @end itemize | ||
| 2677 | |||
| 2678 | The value can also be a (quoted) variable, whose value is a list of | ||
| 2679 | symbols as described above. Ideally an option should be used, since | ||
| 2680 | not 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 |
| 2617 | mutually exclusive arguments. Enabling one of these arguments | 2684 | mutually exclusive arguments. Enabling one of these arguments |
| 2618 | causes the others to be disabled. An argument may appear in | 2685 | causes the others to be disabled. An argument may appear in |