Commit 7c92db56 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(verify_interval_modification): Don't just test

Qread_only prop; use INTERVAL_WRITABLE_P.
parent af4d5234
......@@ -1479,21 +1479,22 @@ verify_interval_modification (buf, start, end)
if (NULL_INTERVAL_P (prev))
{
after = textget (i->plist, Qread_only);
if (! NILP (after))
if (! INTERVAL_WRITABLE_P (i))
error ("Attempt to insert within read-only text");
}
else if (NULL_INTERVAL_P (i))
{
before = textget (prev->plist, Qread_only);
if (! NILP (before))
if (! INTERVAL_WRITABLE_P (prev))
error ("Attempt to insert within read-only text");
}
else
{
before = textget (prev->plist, Qread_only);
after = textget (i->plist, Qread_only);
if (! NILP (before) && EQ (before, after))
if (! NILP (before) && EQ (before, after)
/* This checks Vinhibit_read_only properly
for the common value of the read-only property. */
&& ! INTERVAL_WRITABLE_P (i))
error ("Attempt to insert within read-only text");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment