emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5c07cd0: * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)


From: Stefan Monnier
Subject: master 5c07cd0: * lisp/emacs-lisp/debug.el (debug): Fix (bug#47588)
Date: Sun, 18 Apr 2021 01:03:49 -0400 (EDT)

branch: master
commit 5c07cd0f156217db268ccb9fa64566fb429c4257
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * 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.
---
 lisp/emacs-lisp/debug.el  | 2 +-
 lisp/emacs-lisp/edebug.el | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index b2d54c7..069c7a9 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -213,7 +213,7 @@ the debugger will not be entered."
              last-input-event last-command-event last-nonmenu-event
              last-event-frame
              overriding-local-map
-             load-read-function
+             (load-read-function #'read)
              ;; If we are inside a minibuffer, allow nesting
              ;; so that we don't get an error from the `e' command.
              (enable-recursive-minibuffers
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index cbc4019..b08ee3c 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]