mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Allow using define-short-documentation-group without loading shortdoc
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Allow using without loading shortdoc.el (bug#56260).
This commit is contained in:
parent
1dfd8a10af
commit
98c9105f05
1 changed files with 12 additions and 12 deletions
|
|
@ -41,10 +41,12 @@
|
||||||
'((t :inherit variable-pitch))
|
'((t :inherit variable-pitch))
|
||||||
"Face used for a section.")
|
"Face used for a section.")
|
||||||
|
|
||||||
(defvar shortdoc--groups nil)
|
;;;###autoload
|
||||||
|
(progn
|
||||||
|
(defvar shortdoc--groups nil)
|
||||||
|
|
||||||
(defmacro define-short-documentation-group (group &rest functions)
|
(defmacro define-short-documentation-group (group &rest functions)
|
||||||
"Add GROUP to the list of defined documentation groups.
|
"Add GROUP to the list of defined documentation groups.
|
||||||
FUNCTIONS is a list of elements on the form:
|
FUNCTIONS is a list of elements on the form:
|
||||||
|
|
||||||
(FUNC
|
(FUNC
|
||||||
|
|
@ -88,8 +90,7 @@ string will be `read' and evaluated.
|
||||||
|
|
||||||
(FUNC
|
(FUNC
|
||||||
:no-eval EXAMPLE-FORM
|
:no-eval EXAMPLE-FORM
|
||||||
:result RESULT-FORM ;Use `:result-string' if value is in string form
|
:result RESULT-FORM) ;Use `:result-string' if value is in string form
|
||||||
)
|
|
||||||
|
|
||||||
Using `:no-value' is the same as using `:no-eval'.
|
Using `:no-value' is the same as using `:no-eval'.
|
||||||
|
|
||||||
|
|
@ -102,17 +103,16 @@ execution of the documented form depends on some conditions.
|
||||||
|
|
||||||
(FUNC
|
(FUNC
|
||||||
:no-eval EXAMPLE-FORM
|
:no-eval EXAMPLE-FORM
|
||||||
:eg-result RESULT-FORM ;Use `:eg-result-string' if value is in string form
|
:eg-result RESULT-FORM) ;Use `:eg-result-string' if value is in string form
|
||||||
)
|
|
||||||
|
|
||||||
A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
||||||
`:no-eval*', `:result', `:result-string', `:eg-result' and
|
`:no-eval*', `:result', `:result-string', `:eg-result' and
|
||||||
`:eg-result-string' properties."
|
`:eg-result-string' properties."
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
`(progn
|
`(progn
|
||||||
(setq shortdoc--groups (delq (assq ',group shortdoc--groups)
|
(setq shortdoc--groups (delq (assq ',group shortdoc--groups)
|
||||||
shortdoc--groups))
|
shortdoc--groups))
|
||||||
(push (cons ',group ',functions) shortdoc--groups)))
|
(push (cons ',group ',functions) shortdoc--groups))))
|
||||||
|
|
||||||
(define-short-documentation-group alist
|
(define-short-documentation-group alist
|
||||||
"Alist Basics"
|
"Alist Basics"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue