@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000 Free Software Foundation, Inc.
+@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Building, Maintaining, Programs, Top
@chapter Compiling and Testing Programs
@item M-x compile
Run a compiler asynchronously under Emacs, with error messages going to
the @samp{*compilation*} buffer.
+@item M-x recompile
+Invoke a compiler with the same command as in the last invocation of
+@kbd{M-x compile}.
@item M-x grep
Run @code{grep} asynchronously under Emacs, with matching lines
listed in the buffer named @samp{*grep*}.
compile} asks for confirmation before actually killing a compilation
that is running.
+@findex recompile
+ To rerun the last compilation with the same command, type @kbd{M-x
+recompile}. This automatically reuses the compilation command from the
+last invocation of @kbd{M-x compile}.
+
@node Grep Searching
@section Searching with Grep under Emacs
@node Debugger Operation
@subsection Debugger Operation
+@cindex fringes, and current execution line in GUD
When you run a debugger with GUD, the debugger uses an Emacs buffer
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.@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.
+the current execution line.@footnote{Under a window system, the arrow
+appears in the left fringe 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 display them. The arrow is not part of the file's
@findex gud-finish
Run the program until the selected stack frame returns (or until it
stops for some other reason).
+
+@item C-c C-j
+@kindex C-c C-j @r{(GUD)}
+@itemx C-x C-a C-j
+@findex gud-jump
+Only useful in a source buffer, (@code{gud-jump}) relocates the next
+instruction to the current line at point in a source buffer. If the
+new execution line is in a different function from the previously one,
+you will be prompted for confirmation since the results may be
+bizarre. See the GDB manual entry regarding @cod{jump} for details.
@end table
These commands interpret a numeric argument as a repeat count, when
This defines a command named @var{function} which sends
@var{cmdstring} to the debugger process, and gives it the documentation
-string @var{docstring}. You can then use the command thus defined in any
+string @var{docstring}. You can then use the command @var{function} in any
buffer. If @var{binding} is non-@code{nil}, @code{gud-def} also binds
the command to @kbd{C-c @var{binding}} in the GUD buffer's mode and to
@kbd{C-x C-a @var{binding}} generally.
compiled file, since it will load and run faster.
If @code{load-library} finds that @file{@var{lib}.el} is newer than
-@file{@var{lib}.elc} file, it prints a warning, because it's likely that
+@file{@var{lib}.elc} file, it issues a warning, because it's likely that
somebody made changes to the @file{.el} file and forgot to recompile
it.