@comment -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1992-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc.
+@c Copyright (C) 1992-1994, 1998-1999, 2001-2016 Free Software
+@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@c This file can also be used by an independent Edebug User
In general, the execution modes earlier in the above list run the
program more slowly or stop sooner than the modes later in the list.
+When you enter a new Edebug level, Edebug will normally stop at the
+first instrumented function it encounters. If you prefer to stop only
+at a break point, or not at all (for example, when gathering coverage
+data), change the value of @code{edebug-initial-mode} from its default
+@code{step} to @code{go}, or @code{Go-nonstop}, or one of its other
+values (@pxref{Edebug Options}). You can do this readily with
+@kbd{C-x C-a C-m} (@code{edebug-set-initial-mode}):
+
+@deffn Command edebug-set-initial-mode
+@kindex C-x C-a C-m
+This command, bound to @kbd{C-x C-a C-m}, sets
+@code{edebug-initial-mode}. It prompts you for a key to indicate the
+mode. You should enter one of the eight keys listed above, which sets
+the corresponding mode.
+@end deffn
+
+Note that you may reenter the same Edebug level several times if, for
+example, an instrumented function is called several times from one
+command.
+
While executing or tracing, you can interrupt the execution by typing
any Edebug command. Edebug stops the program at the next stop point and
then executes the command you typed. For example, typing @kbd{t} during
inside Edebug. This is usually an advantage. See also the
@code{edebug-continue-kbd-macro} option in @ref{Edebug Options}.
-When you enter a new Edebug level, the initial execution mode comes
-from the value of the variable @code{edebug-initial-mode}
-(@pxref{Edebug Options}). By default, this specifies step mode. Note
-that you may reenter the same Edebug level several times if, for
-example, an instrumented function is called several times from one
-command.
-
@defopt edebug-sit-for-seconds
This option specifies how many seconds to wait between execution steps
in trace mode or continue mode. The default is 1 second.
expression @emph{from the current stop point}, first type @kbd{w}
(@code{edebug-where}) to move point there, and then type @kbd{f}.
-The @kbd{o} command continues ``out of'' an expression. It places a
+The @kbd{o} command continues out of an expression. It places a
temporary breakpoint at the end of the sexp containing point. If the
containing sexp is a function definition itself, @kbd{o} continues until
just before the last sexp in the definition. If that is where you are
frequency.
Coverage testing works by comparing the result of each expression with
-the previous result; each form in the program is considered ``covered''
+the previous result; each form in the program is considered covered
if it has returned two different values since you began testing coverage
in the current Emacs session. Thus, to do coverage testing on your
program, execute it under various conditions and note whether it behaves
The character @samp{=} following the count for an expression says that
the expression has returned the same value each time it was evaluated.
-In other words, it is not yet ``covered'' for coverage testing purposes.
+In other words, it is not yet covered for coverage testing purposes.
To clear the frequency count and coverage data for a definition,
simply reinstrument it with @code{eval-defun}.
@c This paragraph is not filled, because LaLiberte's conversion script
@c needs an xref to be on just one line.
When Edebug needs to display something (e.g., in trace mode), it saves
-the current window configuration from ``outside'' Edebug
+the current window configuration from outside Edebug
(@pxref{Window Configurations}). When you exit Edebug, it restores
the previous window configuration.
Emacs redisplays only when it pauses. Usually, when you continue
execution, the program re-enters Edebug at a breakpoint or after
stepping, without pausing or reading input in between. In such cases,
-Emacs never gets a chance to redisplay the ``outside'' configuration.
+Emacs never gets a chance to redisplay the outside configuration.
Consequently, what you see is the same window configuration as the last
time Edebug was active, with no interruption.
arguments. @xref{Defining Macros}, for more explanation of
the @code{declare} form.
-@c See eg http://debbugs.gnu.org/10577
+@c See, e.g., http://debbugs.gnu.org/10577
@c FIXME Maybe there should be an Edebug option to get it to
@c automatically load the entire source file containing the function
@c being instrumented. That would avoid this.
definitions in Lisp, but @code{def-edebug-spec} makes it possible to
define Edebug specifications for special forms implemented in C.
-@deffn Macro def-edebug-spec macro specification
+@defmac def-edebug-spec macro specification
Specify which expressions of a call to macro @var{macro} are forms to be
evaluated. @var{specification} should be the edebug specification.
Neither argument is evaluated.
The @var{macro} argument can actually be any symbol, not just a macro
name.
-@end deffn
+@end defmac
Here is a table of the possibilities for @var{specification} and how each
directs processing of arguments.
@code{step}, @code{next}, @code{go}, @code{Go-nonstop}, @code{trace},
@code{Trace-fast}, @code{continue}, and @code{Continue-fast}.
-The default value is @code{step}.
+The default value is @code{step}. This variable can be set
+interactively with @kbd{C-x C-a C-m} (@code{edebug-set-initial-mode}).
@xref{Edebug Execution Modes}.
@end defopt
If you instrument the @code{test} macro and step through it, then by
default the result of the @code{symbol-function} call has numerous
@code{edebug-after} and @code{edebug-before} forms, which can make it
-difficult to see the ``actual'' result. If
+difficult to see the actual result. If
@code{edebug-unwrap-results} is non-@code{nil}, Edebug tries to remove
these forms from the result.
@end defopt