Skip to content

Commit

Permalink
manual: Document how to autoload transient commands
Browse files Browse the repository at this point in the history
Closes #280.
  • Loading branch information
tarsius committed May 25, 2024
1 parent 99a6857 commit 0dd6438
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/transient.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0dd6438

Please sign in to comment.