diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-28 14:41:32 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-28 14:43:03 +0200 |
commit | 98c9105f059085da8ebbbf4d50fc43abcb7a2d32 (patch) | |
tree | e52c36bb6824d9c0f2e2bcb9f6db4bdc1404d5b5 /lisp/emacs-lisp/shortdoc.el | |
parent | 1dfd8a10af953cf3f4ad6a52800991eb3c53a312 (diff) | |
download | emacs-98c9105f059085da8ebbbf4d50fc43abcb7a2d32.tar.gz emacs-98c9105f059085da8ebbbf4d50fc43abcb7a2d32.tar.bz2 emacs-98c9105f059085da8ebbbf4d50fc43abcb7a2d32.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp/shortdoc.el')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index d0f06358872..c82aa3365cd 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -41,10 +41,12 @@ '((t :inherit variable-pitch)) "Face used for a section.") -(defvar shortdoc--groups nil) +;;;###autoload +(progn + (defvar shortdoc--groups nil) -(defmacro define-short-documentation-group (group &rest functions) - "Add GROUP to the list of defined documentation groups. + (defmacro define-short-documentation-group (group &rest functions) + "Add GROUP to the list of defined documentation groups. FUNCTIONS is a list of elements on the form: (FUNC @@ -88,8 +90,7 @@ string will be `read' and evaluated. (FUNC :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'. @@ -102,17 +103,16 @@ execution of the documented form depends on some conditions. (FUNC :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'), `:no-eval*', `:result', `:result-string', `:eg-result' and `:eg-result-string' properties." - (declare (indent defun)) - `(progn - (setq shortdoc--groups (delq (assq ',group shortdoc--groups) - shortdoc--groups)) - (push (cons ',group ',functions) shortdoc--groups))) + (declare (indent defun)) + `(progn + (setq shortdoc--groups (delq (assq ',group shortdoc--groups) + shortdoc--groups)) + (push (cons ',group ',functions) shortdoc--groups)))) (define-short-documentation-group alist "Alist Basics" |