diff options
| author | Stephen Gildea | 2021-10-21 20:10:53 -0700 |
|---|---|---|
| committer | Stephen Gildea | 2021-10-21 20:12:49 -0700 |
| commit | 9529e1d2fbec706dad9d126a8678bbfc6063ba79 (patch) | |
| tree | e8b1e9644fbb28940b4925ed0fffbf81a05f46bc | |
| parent | 5bc522b4f45f17c44449a05df562d8f0ae00bcb4 (diff) | |
| download | emacs-9529e1d2fbec706dad9d126a8678bbfc6063ba79.tar.gz emacs-9529e1d2fbec706dad9d126a8678bbfc6063ba79.zip | |
Update doc of Edebug specification for macros
doc/lispref/edebug.texi: Update documentation of Edebug specification:
- Do not document "0" as a recommended shortcut for non-instrumented
arguments; nobody knows about nor uses this, so don't encourage it.
- Add an example equivalent to (declare (debug (&rest sexp))).
| -rw-r--r-- | doc/lispref/edebug.texi | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 323130f2378..7d67cc3af11 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi | |||
| @@ -1216,9 +1216,7 @@ directs processing of arguments. | |||
| 1216 | @table @asis | 1216 | @table @asis |
| 1217 | @item @code{t} | 1217 | @item @code{t} |
| 1218 | All arguments are instrumented for evaluation. | 1218 | All arguments are instrumented for evaluation. |
| 1219 | 1219 | This is short for @code{(body)}. | |
| 1220 | @item @code{0} | ||
| 1221 | None of the arguments is instrumented. | ||
| 1222 | 1220 | ||
| 1223 | @item a symbol | 1221 | @item a symbol |
| 1224 | The symbol must have an Edebug specification, which is used instead. | 1222 | The symbol must have an Edebug specification, which is used instead. |
| @@ -1528,6 +1526,16 @@ example of the @code{let} specification. | |||
| 1528 | It may be easier to understand Edebug specifications by studying | 1526 | It may be easier to understand Edebug specifications by studying |
| 1529 | the examples provided here. | 1527 | the examples provided here. |
| 1530 | 1528 | ||
| 1529 | Consider a hypothetical macro @code{my-test-generator} that runs | ||
| 1530 | tests on supplied lists of data. Although it is Edebug's default | ||
| 1531 | behavior to not instrument arguments as code, as controlled by | ||
| 1532 | @code{edebug-eval-macro-args} (@pxref{Instrumenting Macro Calls}), | ||
| 1533 | it can be useful to explicitly document that the arguments are data: | ||
| 1534 | |||
| 1535 | @example | ||
| 1536 | (def-edebug-spec my-test-generator (&rest sexp)) | ||
| 1537 | @end example | ||
| 1538 | |||
| 1531 | A @code{let} special form has a sequence of bindings and a body. Each | 1539 | A @code{let} special form has a sequence of bindings and a body. Each |
| 1532 | of the bindings is either a symbol or a sublist with a symbol and | 1540 | of the bindings is either a symbol or a sublist with a symbol and |
| 1533 | optional expression. In the specification below, notice the @code{gate} | 1541 | optional expression. In the specification below, notice the @code{gate} |