Make cl-values-list signal an error if its argument isn't a list
* lisp/emacs-lisp/cl-lib.el (cl-values-list): Signal an error if LIST isn't a list (bug#23597).
This commit is contained in:
parent
5289170ead
commit
f82ae2fc87
2 changed files with 12 additions and 4 deletions
|
@ -189,12 +189,16 @@ that the containing function should return.
|
|||
|
||||
\(fn &rest VALUES)")
|
||||
|
||||
(cl--defalias 'cl-values-list #'identity
|
||||
(defun cl-values-list (list)
|
||||
"Return multiple values, Common Lisp style, taken from a list.
|
||||
LIST specifies the list of values
|
||||
that the containing function should return.
|
||||
LIST specifies the list of values that the containing function
|
||||
should return.
|
||||
|
||||
\(fn LIST)")
|
||||
Note that Emacs Lisp doesn't really support multiple values, so
|
||||
all this function does is return LIST."
|
||||
(unless (listp list)
|
||||
(signal 'wrong-type-argument list))
|
||||
list)
|
||||
|
||||
(defsubst cl-multiple-value-list (expression)
|
||||
"Return a list of the multiple values produced by EXPRESSION.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue