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

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 08 Feb 2021 17:15:37 +0100

Stefan Monnier <[email-masked]> writes:

> FWIW, I think this `values` thingy should die.

I agree -- we could mark it obsolete now, but we'd have to rewrite the
one place where it's actually used:

(defun elisp--eval-defun ()
[...]
          (eval-region beg end standard-output
                       (lambda (_ignore)
                         ;; Skipping to the end of the specified region
                         ;; will make eval-region return.
                         (goto-char end)
                         form))))))
  (let ((str (eval-expression-print-format (car values))))
    (if str (princ str)))
  ;; The result of evaluation has been put onto VALUES.  So return it.
  (car values))

`eval-region' just returns nil, but that `lambda' could just capture the
value instead of the functoin then looking in `values', I think?  So the
one usage looks like it could be trivially rewritten.

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