diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2023-01-24 21:13:35 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-01-24 21:13:35 +0100 |
| commit | 4a823dbf7f57f97877a519d12b949b5b202d517c (patch) | |
| tree | f5387fb01cfe6bebf7dead3b749b1312441f7038 /docs | |
| parent | d800ce01e62c896f4aef8ad14a03f49f781c5b38 (diff) | |
manual: Add an example for transient-append-suffix
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/transient.org | 11 | ||||
| -rw-r--r-- | docs/transient.texi | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/docs/transient.org b/docs/transient.org index a28e906..1551230 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -736,7 +736,16 @@ These options are mainly intended for developers. To an extent, transients can be customized interactively, see [[*Enabling and Disabling Suffixes]]. This section explains how existing -transients can be further modified non-interactively. +transients can be further modified non-interactively. Let's begin +with an example: + +#+begin_src emacs-lisp + (transient-append-suffix 'magit-patch-apply "-3" + '("-R" "Apply in reverse" "--reverse")) +#+end_src + +This inserts a new infix argument to toggle the ~--reverse~ argument +after the infix argument that toggles ~-3~ in ~magit-patch-apply~. The following functions share a few arguments: diff --git a/docs/transient.texi b/docs/transient.texi index deca28c..281c97e 100644 --- a/docs/transient.texi +++ b/docs/transient.texi @@ -900,7 +900,16 @@ same customization. To an extent, transients can be customized interactively, see @ref{Enabling and Disabling Suffixes}. This section explains how existing -transients can be further modified non-interactively. +transients can be further modified non-interactively. Let's begin +with an example: + +@lisp +(transient-append-suffix 'magit-patch-apply "-3" + '("-R" "Apply in reverse" "--reverse")) +@end lisp + +This inserts a new infix argument to toggle the @code{--reverse} argument +after the infix argument that toggles @code{-3} in @code{magit-patch-apply}. The following functions share a few arguments: |
