diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-10-13 05:00:10 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-10-13 05:04:34 +0200 |
commit | 4e9452a399c878ab110811b4f890c350d3cb9c36 (patch) | |
tree | 91bd95242f09e8144d89dac67bbe753176f625d9 /lisp/emacs-lisp/shortdoc.el | |
parent | f223ac6ef92b7cf69048c81ff58b5c983c7d25da (diff) | |
download | emacs-4e9452a399c878ab110811b4f890c350d3cb9c36.tar.gz emacs-4e9452a399c878ab110811b4f890c350d3cb9c36.tar.bz2 emacs-4e9452a399c878ab110811b4f890c350d3cb9c36.zip |
Improve shortdoc for vector
* lisp/emacs-lisp/shortdoc.el (vector): Improve shortdoc with titles.
Add mapc. Fix typo where 'seq-reduce' is incorrectly written as
'reduce'.
Diffstat (limited to 'lisp/emacs-lisp/shortdoc.el')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 25bd17bdb96..17ac3e471c0 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -647,10 +647,12 @@ There can be any number of :example/:result elements." (define-short-documentation-group vector + "Making Vectors" (make-vector :eval (make-vector 5 "foo")) (vector :eval (vector 1 "b" 3)) + "Operations on Vectors" (vectorp :eval (vectorp [1]) :eval (vectorp "1")) @@ -660,13 +662,16 @@ There can be any number of :example/:result elements." :eval (append [1 2] nil)) (length :eval (length [1 2 3])) - (mapcar - :eval (mapcar #'identity [1 2 3])) - (reduce - :eval (reduce #'+ [1 2 3])) + (seq-reduce + :eval (seq-reduce #'+ [1 2 3] 0)) (seq-subseq :eval (seq-subseq [1 2 3 4 5] 1 3) - :eval (seq-subseq [1 2 3 4 5] 1))) + :eval (seq-subseq [1 2 3 4 5] 1)) + "Mapping Over Vectors" + (mapcar + :eval (mapcar #'identity [1 2 3])) + (mapc + :eval (mapc #'insert ["1" "2" "3"]))) (define-short-documentation-group regexp "Matching Strings" |