From f82ae2fc87e948f173941981e48da3daf7e65e96 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 28 Jul 2019 14:14:46 +0200 Subject: 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). --- lisp/emacs-lisp/cl-lib.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lisp/emacs-lisp') 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. -- cgit v1.2.3