]> git.eshelyaron.com Git - emacs.git/commit
Add functions to query Emacs Lisp examples registered in shortdoc
authorDaniel Martín <mardani29@yahoo.es>
Tue, 28 Feb 2023 22:15:40 +0000 (23:15 +0100)
committerEli Zaretskii <eliz@gnu.org>
Sun, 12 Mar 2023 07:54:06 +0000 (09:54 +0200)
commit29227e7c19100bed30b3410b399ee6a2c1ca7213
tree4cfde01d3e6841d9ea54194c1e3bb785d464c8b7
parent31f18480ca7291070837a305c64685c3e76afde3
Add functions to query Emacs Lisp examples registered in shortdoc

* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Add
a new shortdoc-example text property so that ELisp examples can
be searched for later.
(shortdoc--insert-group-in-buffer): New function extracted from
the buffer insertion code in 'shortdoc-display-group'.
(shortdoc-display-group): Implement in terms of
'shortdoc--insert-group-in-buffer'.
(shortdoc-function-examples): New function that returns an alist
of Emacs Lisp examples from shortdoc.
(shortdoc-help-fns-examples-function): New function to insert
Emacs Lisp function examples in *Help* buffers, if added to
'help-fns-describe-function-functions'.
*
test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-function-examples-test):
Test it.
* doc/emacs/help.texi (Name Help): Document in the user manual.
* doc/lispref/help.texi (Documentation Groups): Document it.
* etc/NEWS: Advertise it. (Bug#61877)
doc/emacs/help.texi
doc/lispref/help.texi
etc/NEWS
lisp/emacs-lisp/shortdoc.el
test/lisp/emacs-lisp/shortdoc-tests.el