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
Message #35 received at 67196 <at> debbugs.gnu.org (full text, mbox):
> + (let* ((debug-from--eval-expression eval-expression-debug-on-error)
> + (result (values--store-value
> + (eval (let ((lexical-binding t)) (macroexpand-all exp)) t)))
> + (print-length (unless no-truncate eval-expression-print-length))
> + (print-level (unless no-truncate eval-expression-print-level))
> + (eval-expression-print-maximum-character char-print-limit)
> + (deactivate-mark)
> + (out (if insert-value (current-buffer) t)))
> + (prog1
> + (prin1 result out)
> + (let ((str (and char-print-limit
> + (eval-expression-print-format result))))
> + (when str (princ str out))))))
So you kicked the can a bit further down the road.
The next bug report will be that `M-: debug-from--eval-expression` does
not return the expected value.
FWIW, the other way I came up to circumvent the problem is to test the
shape of the expression to evaluate and only use
`eval-expression-debug-on-error` when the expression is not a mere
symbol (for which the backtrace would presumably not be interesting anyway).
But then we get the weird situation where `M-x debug-on-error` can
return nil but `M-x (list debug-on-error ...)` returns a list that
starts with t.
I think I'd rather keep the current code, whose semantics is
actually simpler.
Stefan
This bug report was last modified 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.