Skip to content

Commit

Permalink
Add after! example to docs/api.org
Browse files Browse the repository at this point in the history
  • Loading branch information
hlissner committed Sep 10, 2019
1 parent 1eb8be9 commit 49b5274
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/api.org
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,33 @@ It is integrated into Helpful, in Doom.
#+END_SRC

*** TODO add-transient-hook!
*** TODO after!
*** after!
#+BEGIN_SRC elisp :eval no
;;; `after!' will take:

;; An unquoted package symbol (the name of a package)
(after! helm ...)

;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
;; and git-gutter have loaded)
(after! (magit git-gutter) ...)

;; An unquoted, nested list of compound package lists, using any combination of
;; :or/:any and :and/:all
(after! (:or package-a package-b ...) ...)
(after! (:and package-a package-b ...) ...)
(after! (:and package-a (:or package-b package-c) ...) ...)
;; (Without :or/:any/:and/:all, :and/:all are implied.)

;; A common mistake is to pass it the names of major or minor modes, e.g.
(after! rustic-mode ...)
(after! python-mode ...)
;; But the code in them will never run! rustic-mode is in the `rustic' package
;; and python-mode is in the `python' package. This is what you want:
(after! rustic ...)
(after! python ...)
#+END_SRC

*** custom-set-faces!
#+BEGIN_SRC elisp :eval no
(custom-set-faces!
Expand Down

0 comments on commit 49b5274

Please sign in to comment.