[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 06e452a 1/3: Allow Edebug's instrumentation to
Re: [Emacs-diffs] master 06e452a 1/3: Allow Edebug's instrumentation to be used for other purposes
Wed, 11 Oct 2017 12:11:10 -0400
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
>> This seems a bit awkward.
>> How 'bout something like the 100% untested patch below?
> OK with me. I'll test the patch and make the change. Do you think
> edebug-after-instrumentation-functions should also be changed to
I guess we could use a patch like below, indeed, which would make it
possible to change the instrumented code (i.e. it would be slightly
It's not as important, tho, because
edebug-after-instrumentation-functions starts as nil, so it works OK,
contrarily to edebug-new-definition-functions where we need to
remove-hook its default value, which is really ugly.
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index a070ff25d1..3381543f0a 100644
@@ -1067,8 +1067,8 @@ edebug-best-error
;; Hooks which may be used to extend Edebug's functionality. See
;; Testcover for an example.
-(defvar edebug-after-instrumentation-functions nil
- "Abnormal hook run on code after instrumentation for debugging.
+(defvar edebug-after-instrumentation-function #'identity
+ "FIXME Abnormal hook run on code after instrumentation for debugging.
Each function is called with one argument, a form which has just
been instrumented for Edebugging.")
@@ -1189,8 +1189,7 @@ edebug-read-and-maybe-wrap-form1
;; Not a defining form, and not edebugging.
- (run-hook-with-args 'edebug-after-instrumentation-functions result)
+ (funcall edebug-after-instrumentation-function result))))
(defvar edebug-def-args) ; args of defining form.
(defvar edebug-def-interactive) ; is it an emacs interactive function?