aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-03-14 21:21:41 +0000
committerChong Yidong2009-03-14 21:21:41 +0000
commit260d5efc91a1fb81d79b4f42d961b5ccbded11e6 (patch)
tree91c874774a0778f1cfb35aaa4eb37b302076e562
parentb1f23349eb103eba22f9e2181f97a5fc939f86e0 (diff)
downloademacs-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.texi32
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
80error. Many commands frequently cause Lisp errors when invoked 80error. Many commands frequently cause Lisp errors when invoked
81inappropriately (such as @kbd{C-f} at the end of the buffer), and during 81inappropriately, and during ordinary editing it would be very
82ordinary editing it would be very inconvenient to enter the debugger 82inconvenient to enter the debugger each time this happens. So if you
83each time this happens. So if you want errors to enter the debugger, set 83want errors to enter the debugger, set the variable
84the 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
88This variable determines whether the debugger is called when an error is 88This variable determines whether the debugger is called when an error
89signaled and not handled. If @code{debug-on-error} is @code{t}, all 89is signaled and not handled. If @code{debug-on-error} is @code{t},
90kinds of errors call the debugger (except those listed in 90all 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
92debugger. (Note that @code{eval-expression-debug-on-error} affects the 92call the debugger. (Note that @code{eval-expression-debug-on-error}
93setting of this variable in some cases; see below.) 93affects the setting of this variable in some cases; see below.)
94 94
95The value can also be a list of error conditions that should call the 95The value can also be a list of error conditions that should call the
96debugger. For example, if you set it to the list 96debugger. For example, if you set it to the list
@@ -155,18 +155,6 @@ file, use the option @samp{--debug-init}. This binds
155bypasses the @code{condition-case} which normally catches errors in the 155bypasses the @code{condition-case} which normally catches errors in the
156init file. 156init file.
157 157
158 If your init file sets @code{debug-on-error}, the effect may
159not last past the end of loading the init file. (This is an undesirable
160byproduct of the code that implements the @samp{--debug-init} command
161line option.) The best way to make the init file set
162@code{debug-on-error} permanently is with @code{after-init-hook}, like
163this:
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