summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-04-18 01:03:43 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2021-04-18 01:03:43 -0400
commit5c07cd0f156217db268ccb9fa64566fb429c4257 (patch)
tree9c0d424613ef717f1d8af00fdab9e3c5ba563887 /lisp/emacs-lisp/edebug.el
parent568ce6826fa0aaa4d5dc95880cbdc0965dc07521 (diff)
downloademacs-5c07cd0f156217db268ccb9fa64566fb429c4257.tar.gz
emacs-5c07cd0f156217db268ccb9fa64566fb429c4257.tar.bz2
emacs-5c07cd0f156217db268ccb9fa64566fb429c4257.zip
* lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)
Don't bind `load-read-function` to nil but to its actual default value. Actually, I'm not sure it's worth the trouble rebinding this var, but if we do, then we should bind it to a valid value rather than to nil. * lisp/emacs-lisp/edebug.el (edebug--eval-defun): Re-install our advice if needed.
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r--lisp/emacs-lisp/edebug.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index cbc40193125..b08ee3c4a17 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -459,6 +459,9 @@ invoked without a prefix argument.
If acting on a `defun' for FUNCTION, and the function was instrumented,
`Edebug: FUNCTION' is printed in the minibuffer. If not instrumented,
just FUNCTION is printed."
+ ;; Re-install our advice, in case `debug' re-bound `load-read-function' to
+ ;; its default value.
+ (add-function :around load-read-function #'edebug--read)
(let* ((edebug-all-forms (not (eq (not edebug-it) (not edebug-all-defs))))
(edebug-all-defs edebug-all-forms))
(funcall orig-fun nil)))