GNU bug report logs -
#67196
M-: uses a wrong value of debug-on-error when it is nil.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Wed, 15 Nov 2023 17:03:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Sat, 25 Nov 2023 12:40:03 +0000
> Cc: monnier <at> iro.umontreal.ca, 67196 <at> debbugs.gnu.org, acm <at> muc.de
> From: Alan Mackenzie <acm <at> muc.de>
>
> > What I had in mind was a function exposed to Lisp that would set an
> > internal variable not exposed to Lisp.
>
> The would still require an unwind-protect somewhere.
We can unwind-protect in C as well.
> > > Sorry, I wasn't clear enough. During those 10 hours, I was under the
> > > impression that debug-on-error was t, because M-: debug-on-error said so.
> > > It actually was nil. That's why I submitted this bug report.
>
> > So maybe instead of changing how this stuff works we should improve
> > how debug-on-error's value is reported by M-: and other eval commands?
>
> Yes, but that might be complicated, and won't help the user trying to
> debug something which depends on debug-on-error, who is using M-: to try
> to test it.
I don't see how that could happen.
> > Note that (AFAIU) your change doesn't just solve the problem you
> > bumped into, it also changes the value of debug-on-error inside
> > eval-expression etc., when eval-expression-debug-on-error's value is
> > non-nil, but not t. I wonder what is the reason for that?
>
> I don't see that in my current version of the patch (below). To test
> this, I used the following:
>
> (defun foo ()
> (interactive)
> (message "debug-on-error is %s" debug-on-error)
> (message "eval-expression-debug-on-error is %s" eval-expression-debug-on-error)
> (car 'foo))
>
> , and called it with various settings of debug-on-error and
> eval-expression-debug-on-error. In particular, with
>
> (setq eval-expression-debug-on-error '(wrong-type-argument))
>
> , I still see debug-on-error reported as nil.
No, I meant with the current code debug-on-error is set to t whenever
eval-expression-debug-on-error is non-nil, and your change sets it to
the same value as eval-expression-debug-on-error instead.
This bug report was last modified 212 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.