1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 08:10:21 -08:00

* 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.
This commit is contained in:
Stefan Monnier 2021-04-18 01:03:43 -04:00
parent 568ce6826f
commit 5c07cd0f15
2 changed files with 4 additions and 1 deletions

View file

@ -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)))