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

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

bug#71774: 31.0.50; Hash table weakness broken?


From: Stefan Monnier
Subject: bug#71774: 31.0.50; Hash table weakness broken?
Date: Wed, 26 Jun 2024 09:23:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>> gets me nil too. So to make such tests work one has to tinker with
>> that obsolete variable 'values'. Worrisome.
> I believe that change, in commit 84f72f19e514db8f8f6e469340fb5fa0719d40b6,
> might have been unintentional. Stefan: is it intentional that the default
> behavior was changed to modify "values", even if
> eval-expression-debug-on-error is `t`?

No, indeed, it was an oversight.
The patch below should get us back to the previous behavior, tho I can't
see why we'd set `values` when `eval-expression-debug-on-error` is nil
and not when it's not.

Martin, can you confirm that it fixes the problem for you (so I can
install it on `emacs-30`)?

Apparently this was introduced by

    commit 4428c27c1ae7d5fe5233e8d7b001a8cd2fcdc56f
    Author: Lars Ingebrigtsen <larsi@gnus.org>
    Date:   Mon Feb 8 08:15:45 2021 +0100
    
        Record the value of `C-x C-e' in `values'
        
        * lisp/progmodes/elisp-mode.el (eval-last-sexp): Record the value
        in `values' (bug#22066) since we're messaging it.

I'd be in favor of just removing the call to `values--store-value` as
suggested by Matthias.


        Stefan


diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 7d0312eb2a4..3423b9493f0 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1633,7 +1633,8 @@ eval-last-sexp
 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
+   (if eval-expression-debug-on-error #'values--store-value #'identity)
    (handler-bind ((error (if eval-expression-debug-on-error
                              #'eval-expression--debug #'ignore)))
      (elisp--eval-last-sexp eval-last-sexp-arg-internal))))






reply via email to

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