From: Stefan Monnier Date: Thu, 27 Jun 2024 18:39:27 +0000 (-0400) Subject: (eval-last-sexp): Fix bug#71774 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5f26395c8f5dc7b7c0f30bdd8877fbfe3d7c51f;p=emacs.git (eval-last-sexp): Fix bug#71774 * lisp/progmodes/elisp-mode.el (eval-last-sexp): Set `values` only when `eval-expression-debug-on-error` is nil. (cherry picked from commit bf8c9f702ba7cba8f835996d49cad01865e2813e) --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index a8bb45a4dce..b365a0adb2b 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1632,7 +1632,10 @@ integer value is also printed as a character of that codepoint. If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." (interactive "P") - (values--store-value + (funcall + ;; Not sure why commit 4428c27c1ae7d stored into `values' only when + ;; `eval-expression-debug-on-error' was nil, but let's preserve that. + (if eval-expression-debug-on-error #'identity #'values--store-value) (handler-bind ((error (if eval-expression-debug-on-error #'eval-expression--debug #'ignore))) (elisp--eval-last-sexp eval-last-sexp-arg-internal))))