diff options
| author | Chong Yidong | 2009-03-14 21:21:41 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-03-14 21:21:41 +0000 |
| commit | 260d5efc91a1fb81d79b4f42d961b5ccbded11e6 (patch) | |
| tree | 91c874774a0778f1cfb35aaa4eb37b302076e562 | |
| parent | b1f23349eb103eba22f9e2181f97a5fc939f86e0 (diff) | |
| download | emacs-260d5efc91a1fb81d79b4f42d961b5ccbded11e6.tar.gz emacs-260d5efc91a1fb81d79b4f42d961b5ccbded11e6.zip | |
(Error Debugging): Don't mislead the reader into
thinking that debug-on-error enters debugger for C-f at EOB.
(Error Debugging): Setting debug-on-init within the init file
works, and has for some time.
| -rw-r--r-- | doc/lispref/debugging.texi | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index afdd302e9c7..c768bbd93cc 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -78,19 +78,19 @@ error. | |||
| 78 | 78 | ||
| 79 | However, entry to the debugger is not a normal consequence of an | 79 | However, entry to the debugger is not a normal consequence of an |
| 80 | error. Many commands frequently cause Lisp errors when invoked | 80 | error. Many commands frequently cause Lisp errors when invoked |
| 81 | inappropriately (such as @kbd{C-f} at the end of the buffer), and during | 81 | inappropriately, and during ordinary editing it would be very |
| 82 | ordinary editing it would be very inconvenient to enter the debugger | 82 | inconvenient to enter the debugger each time this happens. So if you |
| 83 | each time this happens. So if you want errors to enter the debugger, set | 83 | want errors to enter the debugger, set the variable |
| 84 | the variable @code{debug-on-error} to non-@code{nil}. (The command | 84 | @code{debug-on-error} to non-@code{nil}. (The command |
| 85 | @code{toggle-debug-on-error} provides an easy way to do this.) | 85 | @code{toggle-debug-on-error} provides an easy way to do this.) |
| 86 | 86 | ||
| 87 | @defopt debug-on-error | 87 | @defopt debug-on-error |
| 88 | This variable determines whether the debugger is called when an error is | 88 | This variable determines whether the debugger is called when an error |
| 89 | signaled and not handled. If @code{debug-on-error} is @code{t}, all | 89 | is signaled and not handled. If @code{debug-on-error} is @code{t}, |
| 90 | kinds of errors call the debugger (except those listed in | 90 | all kinds of errors call the debugger, except those listed in |
| 91 | @code{debug-ignored-errors}). If it is @code{nil}, none call the | 91 | @code{debug-ignored-errors} (see below). If it is @code{nil}, none |
| 92 | debugger. (Note that @code{eval-expression-debug-on-error} affects the | 92 | call the debugger. (Note that @code{eval-expression-debug-on-error} |
| 93 | setting of this variable in some cases; see below.) | 93 | affects the setting of this variable in some cases; see below.) |
| 94 | 94 | ||
| 95 | The value can also be a list of error conditions that should call the | 95 | The value can also be a list of error conditions that should call the |
| 96 | debugger. For example, if you set it to the list | 96 | debugger. For example, if you set it to the list |
| @@ -155,18 +155,6 @@ file, use the option @samp{--debug-init}. This binds | |||
| 155 | bypasses the @code{condition-case} which normally catches errors in the | 155 | bypasses the @code{condition-case} which normally catches errors in the |
| 156 | init file. | 156 | init file. |
| 157 | 157 | ||
| 158 | If your init file sets @code{debug-on-error}, the effect may | ||
| 159 | not last past the end of loading the init file. (This is an undesirable | ||
| 160 | byproduct of the code that implements the @samp{--debug-init} command | ||
| 161 | line option.) The best way to make the init file set | ||
| 162 | @code{debug-on-error} permanently is with @code{after-init-hook}, like | ||
| 163 | this: | ||
| 164 | |||
| 165 | @example | ||
| 166 | (add-hook 'after-init-hook | ||
| 167 | (lambda () (setq debug-on-error t))) | ||
| 168 | @end example | ||
| 169 | |||
| 170 | @node Infinite Loops | 158 | @node Infinite Loops |
| 171 | @subsection Debugging Infinite Loops | 159 | @subsection Debugging Infinite Loops |
| 172 | @cindex infinite loops | 160 | @cindex infinite loops |