diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2021-06-21 16:00:39 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2021-06-21 16:20:22 +0100 |
commit | 3b1d69efc32c8929281f38d55cef773e4680f2ad (patch) | |
tree | 12dc2807a8a035e0436b09655758d16a22d6c553 /lisp/emacs-lisp | |
parent | 09f17ac4752e18bf834d2f20ceef561cc516d917 (diff) | |
download | emacs-3b1d69efc32c8929281f38d55cef773e4680f2ad.tar.gz emacs-3b1d69efc32c8929281f38d55cef773e4680f2ad.tar.bz2 emacs-3b1d69efc32c8929281f38d55cef773e4680f2ad.zip |
Fix shortdoc-add-function section creation
* lisp/emacs-lisp/shortdoc.el (shortdoc-add-function): Use nconc to
actually append a new section to the list of groups while avoiding a
previous OBOE. Push a new group to the front of shortdoc--groups
without copying it, just like define-short-documentation-group does.
(buffer): Fix copypasta in unlock-buffer example.
* test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-examples): Also
check that :no-value forms demonstrate the right function.
* doc/lispref/help.texi (Documentation Groups): Clarify that @dots
in the define-short-documentation-group arglist refer to whole
key-value pairs. Fix typo in :eg-result-string description.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 16e83074764..4ff7cee623c 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -887,7 +887,7 @@ There can be any number of :example/:result elements." (lock-buffer :no-value (lock-buffer "/tmp/foo")) (unlock-buffer - :no-value (lock-buffer))) + :no-value (unlock-buffer))) (define-short-documentation-group overlay "Predicates" @@ -1283,11 +1283,11 @@ Example: (let ((glist (assq group shortdoc--groups))) (unless glist (setq glist (list group)) - (setq shortdoc--groups (append shortdoc--groups (list glist)))) + (push glist shortdoc--groups)) (let ((slist (member section glist))) (unless slist (setq slist (list section)) - (setq slist (append glist slist))) + (nconc glist slist)) (while (and (cdr slist) (not (stringp (cadr slist)))) (setq slist (cdr slist))) |