branch: externals/transient commit 73178e00b645be29c9282aafc0b8e7a6c4851ec6 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
manual: Update how to prevent C-g from returning to the parent prefix Nowadays we have more explicit pre-commands for prefixes we can choose from, and don't have to rely on `transient' being unbound. The documented behavior no longer worked; nil has been a shorthand for `stack' (itself a shorthand for `transient--do-stack') for a long time, and leaving the slot unbound meant that the default was used, which is also `transient--do-stack'. Now `replace' prevents even "C-g" from returning to the parent, and `recurse' makes all suffixes of the sub-prefix default to returning to the parent, not just "C-g". Closes #356. --- docs/transient.org | 13 +++---------- docs/transient.texi | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/docs/transient.org b/docs/transient.org index c32822cc13..64e546db70 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -1657,16 +1657,9 @@ For completeness sake, some notes about complications: - While a sub-prefix is active we nearly always want {{{kbd(C-g)}}} to take the user back to the “super-prefix”, even when the other suffixes don't - do that. However, in rare cases this may not be desirable, and that - makes the following complication necessary: - - For ~transient-suffix~ objects the ~transient~ slot is unbound. We can - ignore that for the most part because ~nil~ and the slot being unbound - are treated as equivalent, and mean “do exit”. That isn't actually - true for suffixes that are sub-prefixes though. For such suffixes - unbound means “do exit but allow going back”, which is the default, - while ~nil~ means “do exit permanently”, which requires that slot to - be explicitly set to that value. + do that. However, in rare cases this may not be desirable, in which + case ~replace~ can be used as the value of the sub-prefix's ~transient~ + slot. *** Pre-commands for Infixes :PROPERTIES: diff --git a/docs/transient.texi b/docs/transient.texi index 80dc4511e3..12d18cd162 100644 --- a/docs/transient.texi +++ b/docs/transient.texi @@ -1875,16 +1875,9 @@ the suffix's @code{transient} slot. @item While a sub-prefix is active we nearly always want @kbd{C-g} to take the user back to the ``super-prefix'', even when the other suffixes don't -do that. However, in rare cases this may not be desirable, and that -makes the following complication necessary: - -For @code{transient-suffix} objects the @code{transient} slot is unbound. We can -ignore that for the most part because @code{nil} and the slot being unbound -are treated as equivalent, and mean ``do exit''. That isn't actually -true for suffixes that are sub-prefixes though. For such suffixes -unbound means ``do exit but allow going back'', which is the default, -while @code{nil} means ``do exit permanently'', which requires that slot to -be explicitly set to that value. +do that. However, in rare cases this may not be desirable, in which +case @code{replace} can be used as the value of the sub-prefix's @code{transient} +slot. @end itemize @anchor{Pre-commands for Infixes}