Subject: bug#23597: 24.5; `cl-values-list' should not be an alias for `identity'

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 28 Jul 2019 14:15:31 +0200

Drew Adams <[email-masked]> writes:

> Emacs Lisp does not support multiple values for its Common Lisp
> emulation.  OK, fine.
>
> But that is not a reason for this kind of definition.
>
> `cl-values-list' should at least raise an error if its arg is not a
> list.  That too is part of the Common Lisp definition of `values-list':
> "Should signal type-error if its argument is not a proper list."
>
> (cl-values-list 5) should not return 5.  It should raise a wrong-type
> arg error.

I agree.

I've gone through the Emacs trunk to see whether tightening up the
definition would lead to any problems, but all the usages are on the
form

  (cl-multiple-value-bind (tree header tree-buffer)
      (cl-values-list (ebrowse-choose-tree))

which would already bug out if what's returned is not a list.

So I've now made this change on the trunk.  In the unlikely case that
this leads to problems with out-of-tree code, we should be open to
reverting it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no