@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Building, Abbrevs, Programs, Top
@chapter Compiling and Testing Programs
the buffer, it remains fixed while more compilation output is added at
the end of the buffer.
+@cindex compilation buffer, keeping current position at the end
@vindex compilation-scroll-output
If you set the variable @code{compilation-scroll-output} to a
non-@code{nil} value, then the compilation buffer always scrolls to
mode, whose main feature is to provide a convenient way to look at the
source line where the error happened.
+ If you set the variable @code{compilation-scroll-output} to a
+non-@code{nil} value, then the compilation buffer always scrolls to
+follow output as it comes in.
+
@table @kbd
@item C-x `
Visit the locus of the next compiler error message or @code{grep} match.
GDB, which is free software, but you can also run DBX, SDB or XDB if you
have them. GUD can also serve as an interface to the Perl's debugging
mode, the Python debugger PDB, and to JDB, the Java Debugger.
+@xref{Debugger,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual},
+for information on debugging Emacs Lisp programs.
@menu
* Starting GUD:: How to start a debugger subprocess.
* Debugger Operation:: Connection between the debugger and source buffers.
* Commands of GUD:: Key bindings for common commands.
* GUD Customization:: Defining your own commands for GUD.
+* GUD Tooltips:: Showing variable values by pointing with the mouse.
@end menu
@node Starting GUD
for its ordinary input and output. This is called the GUD buffer. The
debugger displays the source files of the program by visiting them in
Emacs buffers. An arrow (@samp{=>}) in one of these buffers indicates
-the current execution line. Moving point in this buffer does not move
-the arrow.
+the current execution line.@footnote{Under a window system the arrow is
+displayed in the marginal area of the Emacs window.} Moving point in
+this buffer does not move the arrow.
You can start editing these source files at any time in the buffers
that were made to display them. The arrow is not part of the file's
ignores any numeric argument.
@end table
+@node GUD Tooltips
+@subsection GUD Tooltips
+
+@cindex tooltips with GUD
+The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. If
+GUD support is activated by customizing the @code{tooltip} group,
+variable values can be displayed in tooltips by pointing at them with
+the mouse in the GUD buffer or in source buffers with major modes in the
+customizable list @code{tooltip-gud-modes}.
+
@node Executing Lisp
@section Executing Lisp Expressions
Thus, the compiled code for @file{foo.el} goes in @file{foo.elc}.
That's why @code{load-library} searches for @samp{.elc} files first.
+@vindex load-dangerous-libraries
+@cindex Lisp files byte-compiled by XEmacs
+ By default, Emacs refuses to load compiled Lisp files which were
+compiled with XEmacs, a modified versions of Emacs---they can cause
+Emacs to crash. Set the variable @code{load-dangerous-libraries} to
+@code{t} if you want to try loading them.
+
@node Lisp Eval
@section Evaluating Emacs-Lisp Expressions
@cindex Emacs-Lisp mode
evaluating a @code{defvar} expression does nothing if the variable it
defines already has a value. But @kbd{C-M-x} unconditionally resets the
variable to the initial value specified in the @code{defvar} expression.
+@code{defcustom} expressions are treated similarly.
This special feature is convenient for debugging Lisp programs.
@kindex C-x C-e
change individual functions, use @kbd{C-M-x} on each function that you
change. This keeps the Lisp world in step with the source file.
+@vindex eval-expression-print-level
+@vindex eval-expression-print-length
+@vindex eval-expression-debug-on-error
+The customizable variables @code{eval-expression-print-level} and
+@code{eval-expression-print-length} control the maximum depth and length
+of lists to print in the result of the evaluation commands before
+abbreviating them. @code{eval-expression-debug-on-error} controls
+whether evaluation errors invoke the debugger when these commands are
+used.
+
@node Lisp Interaction
@section Lisp Interaction Buffers