GNU bug report logs - #26947
Preserve read-only when debugger with let-bound inhibit-read-only t.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 16 May 2017 00:01:01 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 26947 <at> debbugs.gnu.org
Subject: bug#26947: Preserve read-only when debugger with let-bound inhibit-read-only t.
Date: Wed, 17 May 2017 09:34:15 -0400
> 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




This bug report was last modified 3 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.