]> git.eshelyaron.com Git - emacs.git/commit
Fix bug #40992 whilst still allowing breakpoint highlights in edebug
authorAlan Mackenzie <acm@muc.de>
Mon, 11 May 2020 20:05:54 +0000 (20:05 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 11 May 2020 20:05:54 +0000 (20:05 +0000)
commitdd0b910f1a9d08e65f59cc7ebc10fb6cd0fecfc9
tree31eaeb137ab17686894888366afc132ec617d687
parenta69ef94e22716f9cbb7cf8d78b89e7be4a4c60eb
Fix bug #40992 whilst still allowing breakpoint highlights in edebug

Strategy: when an instrumented function gets re-evaluated, save the former
value of its symbol's `edebug' property in the new propery `ghost-edebug'.  If
this function is still being edebugged, edebug will then access its info from
this new property.

Also fix the bug whereby compile-defun'ing an instrumented function prevents
the function being re-instrumented by I (edebug-instrument-callee).

* lisp/emacs-lisp/edebug.el (edebug-get-edebug-or-ghost): New function.
(edebug-read-and-maybe-wrap-form1): save value of `edebug' property in
'ghost-edebug'.
(edebug-make-form-wrapper): Set value of `ghost-edebug' to nil.
(edebug-make-form-wrapper, edebug-find-stop-point, edebug-next-break-point)
(edebug-modify-breakpoint, edebug--overlay-breakpoints, edebug-set-breakpoint)
(edebug-unset-breakpoints, edebug-toggle-disable-breakpoint)
(edebug--backtrace-goto-source, edebug-display-freq-count)
(edebug-set-conditional-breakpoint): Use edebug-get-edebug-or-ghost to access
edebug information.
(edebug-instrument-function): Also check a function is a cons before declaring
it "already instrumented".
lisp/emacs-lisp/edebug.el