1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

Add new function `ensure-list'

* doc/lispref/lists.texi (Building Lists): Document it.

* lisp/subr.el (ensure-list): New function.

* lisp/emacs-lisp/shortdoc.el (list): Mention it.
This commit is contained in:
Lars Ingebrigtsen 2021-09-21 20:30:57 +02:00
parent a08bb1f682
commit be4f858498
5 changed files with 35 additions and 0 deletions

View file

@ -495,6 +495,9 @@ There can be any number of :example/:result elements."
:eval (list 1 2 3))
(number-sequence
:eval (number-sequence 5 8))
(ensure-list
:eval (ensure-list "foo")
:eval (ensure-list '(1 2 3)))
"Operations on Lists"
(append
:eval (append '("foo" "bar") '("zot")))