aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2012-03-31 12:58:05 -0700
committerGlenn Morris2012-03-31 12:58:05 -0700
commit0b0210946b093bcabae9b6bbd06b28b494d1188d (patch)
tree3252291c0b4f2af3789ebcffd57e8f67cab1dc95 /doc
parent979022ef177beb0022838f6b49da6632cd0d3414 (diff)
downloademacs-0b0210946b093bcabae9b6bbd06b28b494d1188d.tar.gz
emacs-0b0210946b093bcabae9b6bbd06b28b494d1188d.zip
Edebug doc fixes
* doc/lispref/edebug.texi (Instrumenting Macro Calls): Mention defining macros at instrumentation time. (Edebug Options): Mention edebug-unwrap-results. * lisp/emacs-lisp/edebug.el (edebug-unwrap-results): Doc fix. Comments. * admin/FOR-RELEASE: Markup.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/edebug.texi44
2 files changed, 48 insertions, 2 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index b0f9b7c586e..cb7a5c48e15 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12012-03-31 Glenn Morris <rgm@gnu.org>
2
3 * edebug.texi (Instrumenting Macro Calls):
4 Mention defining macros at instrumentation time.
5 (Edebug Options): Mention edebug-unwrap-results.
6
12012-03-31 Eli Zaretskii <eliz@gnu.org> 72012-03-31 Eli Zaretskii <eliz@gnu.org>
2 8
3 * text.texi (Special Properties): Clarify the description of the 9 * text.texi (Special Properties): Clarify the description of the
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 33e5e54f1c6..245aaf94c6d 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1113,6 +1113,15 @@ definition, but specifications are much more general than macro
1113arguments. @xref{Defining Macros}, for more explanation of 1113arguments. @xref{Defining Macros}, for more explanation of
1114the @code{declare} form. 1114the @code{declare} form.
1115 1115
1116@c See eg http://debbugs.gnu.org/10577
1117@c FIXME Maybe there should be an Edebug option to get it to
1118@c automatically load the entire source file containing the function
1119@c being instrumented. That would avoid this.
1120 Take care to ensure that the specifications are known to Edebug when
1121you instrument code. If you are instrumenting a function from a file
1122that uses @code{eval-when-compile} to require another file containing
1123macro definitions, you may need to explicitly load that file.
1124
1116 You can also define an edebug specification for a macro separately 1125 You can also define an edebug specification for a macro separately
1117from the macro definition with @code{def-edebug-spec}. Adding 1126from the macro definition with @code{def-edebug-spec}. Adding
1118@code{debug} declarations is preferred, and more convenient, for macro 1127@code{debug} declarations is preferred, and more convenient, for macro
@@ -1255,6 +1264,8 @@ Each of the following elements is matched as alternatives as if by using
1255of them match, nothing is matched, but the @code{&not} specification 1264of them match, nothing is matched, but the @code{&not} specification
1256succeeds. 1265succeeds.
1257 1266
1267@c FIXME &key?
1268
1258@item &define 1269@item &define
1259@c @kindex &define @r{(Edebug)} 1270@c @kindex &define @r{(Edebug)}
1260Indicates that the specification is for a defining form. The defining 1271Indicates that the specification is for a defining form. The defining
@@ -1422,7 +1433,15 @@ of the bindings is either a symbol or a sublist with a symbol and
1422optional expression. In the specification below, notice the @code{gate} 1433optional expression. In the specification below, notice the @code{gate}
1423inside of the sublist to prevent backtracking once a sublist is found. 1434inside of the sublist to prevent backtracking once a sublist is found.
1424 1435
1425@c FIXME? The actual definition in edebug.el does not have a gate. 1436@ignore
1437@c FIXME? The actual definition in edebug.el looks like this (and always
1438@c has AFAICS). In fact, nothing in edebug.el uses gate. So maybe
1439@c this is just an example for illustration?
1440(def-edebug-spec let
1441 ((&rest
1442 &or (symbolp &optional form) symbolp)
1443 body))
1444@end ignore
1426@example 1445@example
1427(def-edebug-spec let 1446(def-edebug-spec let
1428 ((&rest 1447 ((&rest
@@ -1566,7 +1585,28 @@ debugged.
1566@xref{Edebug Execution Modes}. 1585@xref{Edebug Execution Modes}.
1567@end defopt 1586@end defopt
1568 1587
1569@c FIXME edebug-unwrap-results 1588@defopt edebug-unwrap-results
1589If non-@code{nil}, Edebug tries to remove any of its own
1590instrumentation when showing the results of expressions. This is
1591relevant when debugging macros where the results of expressions are
1592themselves instrumented expressions. As a very artificial example,
1593suppose that the example function @code{fac} has been instrumented,
1594and consider a macro of the form:
1595
1596@c FIXME find a less silly example.
1597@smallexample
1598(defmacro test () "Edebug example."
1599 (if (symbol-function 'fac)
1600 @dots{}))
1601@end smallexample
1602
1603If you instrument the @code{test} macro and step through it, then by
1604default the result of the @code{symbol-function} call has numerous
1605@code{edebug-after} and @code{edebug-before} forms, which can make it
1606difficult to see the ``actual'' result. If
1607@code{edebug-unwrap-results} is non-@code{nil}, Edebug tries to remove
1608these forms from the result.
1609@end defopt
1570 1610
1571@defopt edebug-on-error 1611@defopt edebug-on-error
1572Edebug binds @code{debug-on-error} to this value, if 1612Edebug binds @code{debug-on-error} to this value, if