aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGemini Lasswell2017-10-01 09:12:29 -0700
committerGemini Lasswell2017-10-08 16:08:49 -0700
commit06e452a57287c797cb96a6d4b45220358daab379 (patch)
treea6f70550cec840c08b6d95dc039991d67757de20 /doc
parent85b4e88194cae541a0093a9166f4306e6fd3109e (diff)
downloademacs-06e452a57287c797cb96a6d4b45220358daab379.tar.gz
emacs-06e452a57287c797cb96a6d4b45220358daab379.zip
Allow Edebug's instrumentation to be used for other purposes
* lisp/emacs-lisp/edebug.el: (edebug-after-instrumentation-functions) (edebug-new-definition-functions): New hook variables. (edebug-behavior-alist): New variable. (edebug-read-and-maybe-wrap-form): Run a hook after a form is wrapped. (edebug-make-form-wrapper): Run a hook after a definition is wrapped. Remove message for each definition. (edebug-announce-definition): New function. (edebug-enter): Rewritten to change behavior of Edebug based on symbol property `edebug-behavior' and `edebug-behavior-alist'. (edebug-default-enter): New function which does what `edebug-enter' used to do. (edebug-run-slow, edebug-run-fast): Modify edebug-behavior-alist. (edebug-before, edebug-after): Function definitions are now set by `edebug-enter'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/edebug.texi35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index cebf0a3af3d..94d61480f10 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1690,3 +1690,38 @@ Whether or not to pause for @code{edebug-sit-for-seconds} on reaching
1690a breakpoint. Set to @code{nil} to prevent the pause, non-@code{nil} 1690a breakpoint. Set to @code{nil} to prevent the pause, non-@code{nil}
1691to allow it. 1691to allow it.
1692@end defopt 1692@end defopt
1693
1694@defopt edebug-behavior-alist
1695By default, this alist contains one entry with the key @code{edebug}
1696and a list of three functions, which are the default implementations
1697of the functions inserted in instrumented code: @code{edebug-enter},
1698@code{edebug-before} and @code{edebug-after}. To change Edebug's
1699behavior globally, modify the default entry.
1700
1701Edebug's behavior may also be changed on a per-definition basis by
1702adding an entry to this alist, with a key of your choice and three
1703functions. Then set the @code{edebug-behavior} symbol property of an
1704instrumented definition to the key of the new entry, and Edebug will
1705call the new functions in place of its own for that definition.
1706@end defopt
1707
1708@defopt edebug-new-definition-functions
1709An abnormal hook run by Edebug after it wraps the body of a definition
1710or closure. After Edebug has initialized its own data, each function
1711is called with one argument, the symbol associated with the
1712definition, which may be the actual symbol defined or one generated by
1713Edebug. This hook may be used to set the @code{edebug-behavior}
1714symbol property of each definition instrumented by Edebug.
1715
1716By default @code{edebug-new-definition-functions} contains
1717@code{edebug-announce-definition} which prints a message each time a
1718definition is instrumented. If you are instrumenting a lot of code
1719and find the messages excessive, remove
1720@code{edebug-announce-definition}.
1721@end defopt
1722
1723@defopt edebug-after-instrumentation-functions
1724An abnormal hook run by Edebug after it instruments a form.
1725Each function is called with one argument, a form which has
1726just been instrumented by Edebug.
1727@end defopt