diff options
| author | Eli Zaretskii | 2018-01-27 12:01:54 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-01-27 12:01:54 +0200 |
| commit | 085ee439bfe78b78ed50f58dc56285b839153322 (patch) | |
| tree | 7583c989977d90be67da769a0e809290624de3ea | |
| parent | 4dd1b33a488782ef3890d37ce1303761ed827c88 (diff) | |
| download | emacs-085ee439bfe78b78ed50f58dc56285b839153322.tar.gz emacs-085ee439bfe78b78ed50f58dc56285b839153322.zip | |
Improve documentation of 'edebug-defun'
* doc/lispref/edebug.texi (Instrumenting): Document a workaround
for a failure to instrument due to unknown macros. (Bug#30243)
(Bug#10577)
| -rw-r--r-- | doc/lispref/edebug.texi | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 1b0d314ee71..39430deb48e 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi | |||
| @@ -209,6 +209,20 @@ session, it runs the hook @code{edebug-setup-hook}, then sets it to | |||
| 209 | @code{nil}. You can use this to load Edebug specifications | 209 | @code{nil}. You can use this to load Edebug specifications |
| 210 | associated with a package you are using, but only when you use Edebug. | 210 | associated with a package you are using, but only when you use Edebug. |
| 211 | 211 | ||
| 212 | @cindex edebug, failure to instrument | ||
| 213 | If Edebug detects a syntax error while instrumenting, it leaves point | ||
| 214 | at the erroneous code and signals an @code{invalid-read-syntax} error. | ||
| 215 | @c FIXME? I can't see that it "leaves point at the erroneous code". | ||
| 216 | Example: | ||
| 217 | |||
| 218 | @example | ||
| 219 | @error{} Invalid read syntax: "Expected lambda expression" | ||
| 220 | @end example | ||
| 221 | |||
| 222 | One potential reason for such a failure to instrument is that some | ||
| 223 | macro definitions are not yet known to Emacs. To work around this, | ||
| 224 | load the file which defines the function you are about to instrument. | ||
| 225 | |||
| 212 | @findex eval-expression @r{(Edebug)} | 226 | @findex eval-expression @r{(Edebug)} |
| 213 | To remove instrumentation from a definition, simply re-evaluate its | 227 | To remove instrumentation from a definition, simply re-evaluate its |
| 214 | definition in a way that does not instrument. There are two ways of | 228 | definition in a way that does not instrument. There are two ways of |
| @@ -216,10 +230,6 @@ evaluating forms that never instrument them: from a file with | |||
| 216 | @code{load}, and from the minibuffer with @code{eval-expression} | 230 | @code{load}, and from the minibuffer with @code{eval-expression} |
| 217 | (@kbd{M-:}). | 231 | (@kbd{M-:}). |
| 218 | 232 | ||
| 219 | If Edebug detects a syntax error while instrumenting, it leaves point | ||
| 220 | at the erroneous code and signals an @code{invalid-read-syntax} error. | ||
| 221 | @c FIXME? I can't see that it "leaves point at the erroneous code". | ||
| 222 | |||
| 223 | @xref{Edebug Eval}, for other evaluation functions available | 233 | @xref{Edebug Eval}, for other evaluation functions available |
| 224 | inside of Edebug. | 234 | inside of Edebug. |
| 225 | 235 | ||