branch: externals/transient commit 0dd64387d3847d63298fbe10bf73f20aeef0cf2a Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
manual: Document how to autoload transient commands Closes #280. --- docs/transient.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/transient.org b/docs/transient.org index 8d4c676a71..2e6970ddeb 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -2054,6 +2054,19 @@ the transient popup, you will be able to yank it in another buffer. #'transient--do-stay) #+end_src +** How can I autoload prefix and suffix commands? + +If your package only supports Emacs 30, just prefix the definition +with ~;;;###autoload~. If your package supports released versions of +Emacs, you unfortunately have to use a long form autoload comment +as described in [[info:elisp#Autoload]]. + +#+begin_src emacs-lisp + ;;;###autoload (autoload 'magit-dispatch "magit" nil t) + (transient-define-prefix magit-dispatch () + ...) +#+end_src + ** How does Transient compare to prefix keys and universal arguments? :PROPERTIES: :UNNUMBERED: notoc