diff options
| author | Gemini Lasswell | 2018-07-18 08:30:45 -0700 |
|---|---|---|
| committer | Gemini Lasswell | 2018-08-03 08:54:08 -0700 |
| commit | 83af893fc0e7cc87c0fb0626fb48ef96e00b3f8b (patch) | |
| tree | a20e2e5731a619f1268519deb2392d39f5bcfe87 /doc/lispref/debugging.texi | |
| parent | ca98377280005344fb07c816997b9bc2a737056a (diff) | |
| download | emacs-83af893fc0e7cc87c0fb0626fb48ef96e00b3f8b.tar.gz emacs-83af893fc0e7cc87c0fb0626fb48ef96e00b3f8b.zip | |
Move 'backtrace' from subr.el to backtrace.el
* lisp/subr.el (backtrace, backtrace--print-frame): Remove functions.
* lisp/emacs-lisp/backtrace.el (backtrace-backtrace): Remove function.
(backtrace): New function.
(backtrace-to-string): Make argument optional.
* doc/lispref/debugging.texi (Internals of Debugger): Update
description of 'backtrace' function.
Diffstat (limited to 'doc/lispref/debugging.texi')
| -rw-r--r-- | doc/lispref/debugging.texi | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 87429a67ba9..841b16eaf95 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -678,20 +678,19 @@ of @code{debug} (@pxref{Invoking the Debugger}). | |||
| 678 | @cindex run time stack | 678 | @cindex run time stack |
| 679 | @cindex call stack | 679 | @cindex call stack |
| 680 | This function prints a trace of Lisp function calls currently active. | 680 | This function prints a trace of Lisp function calls currently active. |
| 681 | This is the function used by @code{debug} to fill up the | 681 | The trace is identical to the one that @code{debug} would show in the |
| 682 | @file{*Backtrace*} buffer. It is written in C, since it must have access | 682 | @file{*Backtrace*} buffer. The return value is always nil. |
| 683 | to the stack to determine which function calls are active. The return | ||
| 684 | value is always @code{nil}. | ||
| 685 | 683 | ||
| 686 | In the following example, a Lisp expression calls @code{backtrace} | 684 | In the following example, a Lisp expression calls @code{backtrace} |
| 687 | explicitly. This prints the backtrace to the stream | 685 | explicitly. This prints the backtrace to the stream |
| 688 | @code{standard-output}, which, in this case, is the buffer | 686 | @code{standard-output}, which, in this case, is the buffer |
| 689 | @samp{backtrace-output}. | 687 | @samp{backtrace-output}. |
| 690 | 688 | ||
| 691 | Each line of the backtrace represents one function call. The line shows | 689 | Each line of the backtrace represents one function call. The line |
| 692 | the values of the function's arguments if they are all known; if they | 690 | shows the function followed by a list of the values of the function's |
| 693 | are still being computed, the line says so. The arguments of special | 691 | arguments if they are all known; if they are still being computed, the |
| 694 | forms are elided. | 692 | line consists of a list containing the function and its unevaluated |
| 693 | arguments. Long lists or deeply nested structures may be elided. | ||
| 695 | 694 | ||
| 696 | @smallexample | 695 | @smallexample |
| 697 | @group | 696 | @group |
| @@ -708,7 +707,7 @@ forms are elided. | |||
| 708 | @group | 707 | @group |
| 709 | ----------- Buffer: backtrace-output ------------ | 708 | ----------- Buffer: backtrace-output ------------ |
| 710 | backtrace() | 709 | backtrace() |
| 711 | (list ...computing arguments...) | 710 | (list 'testing (backtrace)) |
| 712 | @end group | 711 | @end group |
| 713 | (progn ...) | 712 | (progn ...) |
| 714 | eval((progn (1+ var) (list 'testing (backtrace)))) | 713 | eval((progn (1+ var) (list 'testing (backtrace)))) |
| @@ -739,7 +738,7 @@ example would look as follows: | |||
| 739 | @group | 738 | @group |
| 740 | ----------- Buffer: backtrace-output ------------ | 739 | ----------- Buffer: backtrace-output ------------ |
| 741 | (backtrace) | 740 | (backtrace) |
| 742 | (list ...computing arguments...) | 741 | (list 'testing (backtrace)) |
| 743 | @end group | 742 | @end group |
| 744 | (progn ...) | 743 | (progn ...) |
| 745 | (eval (progn (1+ var) (list 'testing (backtrace)))) | 744 | (eval (progn (1+ var) (list 'testing (backtrace)))) |