Elisp API Demos
Showing an Elisp demo of mapcar
in C-h f mapcar
:
Usage
To inject elisp demos into *Help*
, such as C-h f
(M-x describe-function
), use
(advice-add 'describe-function-1 :after #'elisp-demos-advice-describe-function-1)
If you use Helpful, use
(advice-add 'helpful-update :after #'elisp-demos-advice-helpful-update)
Contributing
Put your awesome Elisp demos into elisp-demos.org. A demo is simply an Org heading. Here is mapcar
's.
* mapcar
#+BEGIN_SRC elisp
(mapcar #'1+ '(1 2 3))
#+END_SRC
#+RESULTS:
: (2 3 4)
You can use M-x elisp-demos-add-demo
to insert a new demo or edit an existing one.