bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#22066: 24.5; documentation for "values" is not accurate
Date: Mon, 08 Feb 2021 17:15:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]