From 8fbb8700831742c28d351e4fd79373dea0002649 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 13 Aug 2021 15:50:14 +0200 Subject: [PATCH] Make `debug' reset `inhibit-read-only' while running * lisp/emacs-lisp/debug.el (debug): Bind `inhibit-read-only' to nil in case we're in a context that has bound it to t (bug#26947). --- lisp/emacs-lisp/debug.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 069c7a90ad0..2007f79634d 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -182,7 +182,11 @@ the debugger will not be entered." (equal "initial_terminal" (terminal-name))))) ;; Don't let `inhibit-message' get in our way (especially important if ;; `non-interactive-frame' evaluated to a non-nil value. - (inhibit-message nil)) + (inhibit-message nil) + ;; We may be entering the debugger from a context that has + ;; let-bound `inhibit-read-only', which means that all + ;; buffers would be read/write while the debugger is running. + (inhibit-read-only nil)) (unless non-interactive-frame (message "Entering debugger...")) (let (debugger-value -- 2.39.5