diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-28 14:14:46 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-28 14:14:46 +0200 |
commit | f82ae2fc87e948f173941981e48da3daf7e65e96 (patch) | |
tree | 9c350d7397ac1be0c6905a4cb380593536bf8f3e /lisp/emacs-lisp/cl-lib.el | |
parent | 5289170ead27a168d41a12f09da6d9548729ec88 (diff) | |
download | emacs-f82ae2fc87e948f173941981e48da3daf7e65e96.tar.gz emacs-f82ae2fc87e948f173941981e48da3daf7e65e96.tar.bz2 emacs-f82ae2fc87e948f173941981e48da3daf7e65e96.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp/cl-lib.el')
-rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index f014f8e0104..7b22fa8483a 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -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. - -\(fn LIST)") +LIST specifies the list of values that the containing function +should return. + +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. |