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

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

bug#41002: Undo breaks inhibit-read-only text property


From: Eli Zaretskii
Subject: bug#41002: Undo breaks inhibit-read-only text property
Date: Sat, 09 May 2020 10:37:52 +0300

> From: Filipp Gunbin <fgunbin@fastmail.fm>
> Date: Sun, 03 May 2020 06:22:20 +0300
> Cc: 41002@debbugs.gnu.org, larsi@gnus.org
> 
> --- a/src/textprop.c
> +++ b/src/textprop.c
> @@ -2301,0 +2301,4 @@
> +       if (i->position + LENGTH (i) < end
> +           && (!NILP (BVAR (current_buffer, read_only))
> +               && NILP (Vinhibit_read_only)))
> +         xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
> 
> So if there happens to be an (writeable) interval ending before "end"
> (the end of the region we're killing with C-w), we will signal that the
> buffer is read-only.  This may be read as "if we're going over the
> boundary of an interval, then check the _buffer_ read-onliness".  Maybe
> Lars, as the author of this code, could comment on this.

I think you are right: we need to augment this with something that
pays attention to the inhibit-read-only property.  Would you like to
suggest a patch?

Btw, how is this related to undo?

Thanks.





reply via email to

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