Subject: Re: bug#22066: 24.5; documentation for "values" is not accurate

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 01 Aug 2019 19:21:06 +0200

Shiyao Ma <[email-masked]> writes:

> the documentation of "values" (c-h v values) is not accurate.
>
> (setq x 1) C-x C-e
> values C-x C-e
>
> In the above form, values is "nil". However, per the doc, "values"
> should be (1).
>
> On the other side, M-: does work.

(I'm going through old bug reports that have unfortunately not gotten
any responses.)

---
values is a variable defined in ‘lread.c’.

[...]

List of values of all expressions which were read, evaluated and printed.
Order is reverse chronological.
---

Yes, that seems inaccurate.  It set in the readevalloop function, which
is probably what whoever wrote this meant to refer to, but that's not
very useful information.

But I'm not quite sure what the actual semantics are.  `eval-expression'
definitely sets it, but are there other functions that do?

`eval-last-sexp' doesn't, even when given a prefix (when it does read,
evaluate and print something).

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