aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/debugging.texi
diff options
context:
space:
mode:
authorRichard M. Stallman1999-09-17 06:59:04 +0000
committerRichard M. Stallman1999-09-17 06:59:04 +0000
commit8241495da57ca0efed1b2e86ff693b5614e0aebd (patch)
treeee1fca7ca3eafe24dbbf651622196bc849203e69 /lispref/debugging.texi
parent106217c6600b3049f1c62afaf198b9382206acba (diff)
downloademacs-8241495da57ca0efed1b2e86ff693b5614e0aebd.tar.gz
emacs-8241495da57ca0efed1b2e86ff693b5614e0aebd.zip
*** empty log message ***
Diffstat (limited to 'lispref/debugging.texi')
-rw-r--r--lispref/debugging.texi47
1 files changed, 22 insertions, 25 deletions
diff --git a/lispref/debugging.texi b/lispref/debugging.texi
index 4bc3d07d69b..8946cf0baab 100644
--- a/lispref/debugging.texi
+++ b/lispref/debugging.texi
@@ -510,9 +510,9 @@ debugger.
510 510
511@defvar debugger 511@defvar debugger
512The value of this variable is the function to call to invoke the 512The value of this variable is the function to call to invoke the
513debugger. Its value must be a function of any number of arguments (or, 513debugger. Its value must be a function of any number of arguments, or,
514more typically, the name of a function). Presumably this function will 514more typically, the name of a function. This function should invoke
515enter some kind of debugger. The default value of the variable is 515some kind of debugger. The default value of the variable is
516@code{debug}. 516@code{debug}.
517 517
518The first argument that Lisp hands to the function indicates why it 518The first argument that Lisp hands to the function indicates why it
@@ -531,11 +531,13 @@ value is always @code{nil}.
531 531
532In the following example, a Lisp expression calls @code{backtrace} 532In the following example, a Lisp expression calls @code{backtrace}
533explicitly. This prints the backtrace to the stream 533explicitly. This prints the backtrace to the stream
534@code{standard-output}: in this case, to the buffer 534@code{standard-output}, which, in this case, is the buffer
535@samp{backtrace-output}. Each line of the backtrace represents one 535@samp{backtrace-output}.
536function call. The line shows the values of the function's arguments if 536
537they are all known. If they are still being computed, the line says so. 537Each line of the backtrace represents one function call. The line shows
538The arguments of special forms are elided. 538the values of the function's arguments if they are all known; if they
539are still being computed, the line says so. The arguments of special
540forms are elided.
539 541
540@smallexample 542@smallexample
541@group 543@group
@@ -620,9 +622,9 @@ bound to @code{nil}. The debugger can set this variable to leave
620information for future debugger invocations during the same command 622information for future debugger invocations during the same command
621invocation. 623invocation.
622 624
623The advantage, for the debugger, of using this variable rather than an 625The advantage of using this variable rather than an ordinary global
624ordinary global variable is that the data will never carry over to a 626variable is that the data will never carry over to a subsequent command
625subsequent command invocation. 627invocation.
626@end defvar 628@end defvar
627 629
628@defun backtrace-frame frame-number 630@defun backtrace-frame frame-number
@@ -630,11 +632,11 @@ The function @code{backtrace-frame} is intended for use in Lisp
630debuggers. It returns information about what computation is happening 632debuggers. It returns information about what computation is happening
631in the stack frame @var{frame-number} levels down. 633in the stack frame @var{frame-number} levels down.
632 634
633If that frame has not evaluated the arguments yet (or is a special 635If that frame has not evaluated the arguments yet, or is a special
634form), the value is @code{(nil @var{function} @var{arg-forms}@dots{})}. 636form, the value is @code{(nil @var{function} @var{arg-forms}@dots{})}.
635 637
636If that frame has evaluated its arguments and called its function 638If that frame has evaluated its arguments and called its function
637already, the value is @code{(t @var{function} 639already, the return value is @code{(t @var{function}
638@var{arg-values}@dots{})}. 640@var{arg-values}@dots{})}.
639 641
640In the return value, @var{function} is whatever was supplied as the 642In the return value, @var{function} is whatever was supplied as the
@@ -679,12 +681,9 @@ find the mismatch.)
679@subsection Excess Open Parentheses 681@subsection Excess Open Parentheses
680 682
681 The first step is to find the defun that is unbalanced. If there is 683 The first step is to find the defun that is unbalanced. If there is
682an excess open parenthesis, the way to do this is to insert a 684an excess open parenthesis, the way to do this is to go to the end of
683close parenthesis at the end of the file and type @kbd{C-M-b} 685the file and type @kbd{C-u C-M-u}. This will move you to the beginning
684(@code{backward-sexp}). This will move you to the beginning of the 686of the defun that is unbalanced.
685defun that is unbalanced. (Then type @kbd{C-@key{SPC} C-_ C-u
686C-@key{SPC}} to set the mark there, undo the insertion of the
687close parenthesis, and finally return to the mark.)
688 687
689 The next step is to determine precisely what is wrong. There is no 688 The next step is to determine precisely what is wrong. There is no
690way to be sure of this except by studying the program, but often the 689way to be sure of this except by studying the program, but often the
@@ -715,11 +714,9 @@ anything.
715@node Excess Close 714@node Excess Close
716@subsection Excess Close Parentheses 715@subsection Excess Close Parentheses
717 716
718 To deal with an excess close parenthesis, first insert an open 717 To deal with an excess close parenthesis, first go to the beginning of
719parenthesis at the beginning of the file, back up over it, and type 718the file, then type @kbd{C-u -1 C-M-u} to find the end of the unbalanced
720@kbd{C-M-f} to find the end of the unbalanced defun. (Then type 719defun.
721@kbd{C-@key{SPC} C-_ C-u C-@key{SPC}} to set the mark there, undo the
722insertion of the open parenthesis, and finally return to the mark.)
723 720
724 Then find the actual matching close parenthesis by typing @kbd{C-M-f} 721 Then find the actual matching close parenthesis by typing @kbd{C-M-f}
725at the beginning of that defun. This will leave you somewhere short of 722at the beginning of that defun. This will leave you somewhere short of