diff options
| author | Stefan Monnier | 2014-07-08 14:24:39 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-07-08 14:24:39 -0400 |
| commit | c838708452e293d8d55f1476f599eff28b94f255 (patch) | |
| tree | ba300b854a8b30e587e1eb4cbc34ccbb78ff1e05 | |
| parent | 9aac592d887c360c9cae88db350ec69019ded573 (diff) | |
| download | emacs-c838708452e293d8d55f1476f599eff28b94f255.tar.gz emacs-c838708452e293d8d55f1476f599eff28b94f255.zip | |
* doc/lispref/debugging.texi (Function Debugging, Debugger Commands):
Update debug-on-entry w.r.t behavior after redefinitions.
Fixes: debbugs:17902
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/debugging.texi | 19 |
2 files changed, 7 insertions, 17 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2464eda28cb..a3353c66f71 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-07-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * debugging.texi (Function Debugging, Debugger Commands): | ||
| 4 | Update debug-on-entry w.r.t behavior after redefinitions (bug#17902). | ||
| 5 | |||
| 1 | 2014-06-29 Glenn Morris <rgm@gnu.org> | 6 | 2014-06-29 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * help.texi (Help Functions): "Online" help doesn't mean what it | 8 | * help.texi (Help Functions): "Online" help doesn't mean what it |
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index a9d0c1c4ed0..66f12a022cb 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -226,9 +226,7 @@ function, and then step through its caller. | |||
| 226 | 226 | ||
| 227 | @deffn Command debug-on-entry function-name | 227 | @deffn Command debug-on-entry function-name |
| 228 | This function requests @var{function-name} to invoke the debugger each | 228 | This function requests @var{function-name} to invoke the debugger each |
| 229 | time it is called. It works by inserting the form | 229 | time it is called. |
| 230 | @code{(implement-debug-on-entry)} into the function definition as the | ||
| 231 | first form. | ||
| 232 | 230 | ||
| 233 | Any function or macro defined as Lisp code may be set to break on | 231 | Any function or macro defined as Lisp code may be set to break on |
| 234 | entry, regardless of whether it is interpreted code or compiled code. | 232 | entry, regardless of whether it is interpreted code or compiled code. |
| @@ -244,11 +242,6 @@ When @code{debug-on-entry} is called interactively, it prompts for | |||
| 244 | up to invoke the debugger on entry, @code{debug-on-entry} does nothing. | 242 | up to invoke the debugger on entry, @code{debug-on-entry} does nothing. |
| 245 | @code{debug-on-entry} always returns @var{function-name}. | 243 | @code{debug-on-entry} always returns @var{function-name}. |
| 246 | 244 | ||
| 247 | @strong{Warning:} if you redefine a function after using | ||
| 248 | @code{debug-on-entry} on it, the code to enter the debugger is | ||
| 249 | discarded by the redefinition. In effect, redefining the function | ||
| 250 | cancels the break-on-entry feature for that function. | ||
| 251 | |||
| 252 | Here's an example to illustrate use of this function: | 245 | Here's an example to illustrate use of this function: |
| 253 | 246 | ||
| 254 | @example | 247 | @example |
| @@ -277,12 +270,6 @@ Debugger entered--entering a function: | |||
| 277 | ------ Buffer: *Backtrace* ------ | 270 | ------ Buffer: *Backtrace* ------ |
| 278 | @end group | 271 | @end group |
| 279 | 272 | ||
| 280 | @group | ||
| 281 | (symbol-function 'fact) | ||
| 282 | @result{} (lambda (n) | ||
| 283 | (debug (quote debug)) | ||
| 284 | (if (zerop n) 1 (* n (fact (1- n))))) | ||
| 285 | @end group | ||
| 286 | @end example | 273 | @end example |
| 287 | @end deffn | 274 | @end deffn |
| 288 | 275 | ||
| @@ -461,9 +448,7 @@ You can't use @kbd{r} when the debugger was entered due to an error. | |||
| 461 | @item l | 448 | @item l |
| 462 | Display a list of functions that will invoke the debugger when called. | 449 | Display a list of functions that will invoke the debugger when called. |
| 463 | This is a list of functions that are set to break on entry by means of | 450 | This is a list of functions that are set to break on entry by means of |
| 464 | @code{debug-on-entry}. @strong{Warning:} if you redefine such a | 451 | @code{debug-on-entry}. |
| 465 | function and thus cancel the effect of @code{debug-on-entry}, it may | ||
| 466 | erroneously show up in this list. | ||
| 467 | 452 | ||
| 468 | @item v | 453 | @item v |
| 469 | Toggle the display of local variables of the current stack frame. | 454 | Toggle the display of local variables of the current stack frame. |