1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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:
Lars Ingebrigtsen 2019-07-28 14:14:46 +02:00
parent 5289170ead
commit f82ae2fc87
2 changed files with 12 additions and 4 deletions

View file

@ -536,6 +536,10 @@ be functions.
*** 'cl-defstruct' has a new ':noinline' argument to prevent inlining *** 'cl-defstruct' has a new ':noinline' argument to prevent inlining
its functions. its functions.
---
*** `cl-values-list' will now signal an error if its argument isn't a
list.
** doc-view.el ** doc-view.el
*** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'. *** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'.
*** Added support for password-protected PDF files *** Added support for password-protected PDF files

View file

@ -189,12 +189,16 @@ that the containing function should return.
\(fn &rest VALUES)") \(fn &rest VALUES)")
(cl--defalias 'cl-values-list #'identity (defun cl-values-list (list)
"Return multiple values, Common Lisp style, taken from a list. "Return multiple values, Common Lisp style, taken from a list.
LIST specifies the list of values LIST specifies the list of values that the containing function
that the containing function should return. 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) (defsubst cl-multiple-value-list (expression)
"Return a list of the multiple values produced by EXPRESSION. "Return a list of the multiple values produced by EXPRESSION.