bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26947: Preserve read-only when debugger with let-bound inhibit-read-


From: Stefan Monnier
Subject: bug#26947: Preserve read-only when debugger with let-bound inhibit-read-only t.
Date: Wed, 17 May 2017 09:34:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> Entering the debugger when inhibit-read-only is let-bound to `t` causes all
> buffers to be read/write even though they may have `buffer-read-only` set to
> `t`.
[...]
> (when inhibit-read-only
>   (setq inhibit-read-only nil))

Actually, the better option is probably to

    (let ((inhibit-read-only nil))

around debug, like we already do with various other variables.

Of course, this is a general problem with dynamic scoping.

Maybe a better solution would be for `debug` to use another thread, so
it's not affected by those dynamic bindings of the debugged code.


        Stefan





reply via email to

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