[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: debugger entered when debug-on-error = nil
From: |
Drew Adams |
Subject: |
RE: debugger entered when debug-on-error = nil |
Date: |
Sat, 29 Apr 2006 13:05:38 -0700 |
> M-: (setq 4 5)
> The debugger is entered, even though `debug-on-error' is nil
> (by default):
| M-: runs the command eval-expression
|
| [...]
|
| If `eval-expression-debug-on-error' is non-nil, which is the default,
| this command arranges for all errors to enter the debugger.
1. Oh, that's a new one on me: `eval-expression-debug-on-error'. Is it
supposed to overrule `debug-on-error' this way (apparently so)? And its
default value is non-nil - is that the appropriate default value?
2. The doc string you quote says that `eval-expression-debug-on-error'
non-nil means that *all* errors enter the debugger. If so, and if the
default value is non-nil, then *all* errors enter the debugger. If that were
the case, then what would be the point of `debug-on-error'?
3. Is `eval-expression-debug-on-error' perhaps designed (in spite of what
the doc string says) to apply only to errors during execution of
`eval-expression'? That's what the Emacs-Lisp manual says: "If this variable
has a non-`nil' value, then `debug-on-error' is set to `t' when evaluating
with the command `eval-expression'."
4. In buffer *scratch*, type "(setq 4 5)" and then use `C-x C-e'
(`eval-last-sexp'). The debugger is entered, just as for `M-:'. So perhaps
`eval-expression-debug-on-error' is *not* just for command
`eval-expression', in spite of both its doc string and its Emacs Lisp-manual
entry? So just what is its scope? The Emacs manual says this, which I'm
guessing is more correct (where "these commands" refers to *all* of the Lisp
evaluation commands): "`eval-expression-debug-on-error' controls whether
evaluation errors invoke the debugger when *these commands* are used; its
default is `t'."
5. According to the convention that emacs-devel is frequently touting, the
option name should end in "-flag": `eval-expression-debug-on-error-flag'.
(Likewise, `debug-on-error', BTW.)
6. The behavior and doc should be reconsidered and clarified.