summaryrefslogtreecommitdiff
path: root/src/intervals.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-20 08:48:58 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-20 08:48:58 +0000
commitad552a9a9b706b0e727338e17b643f683546e8f4 (patch)
treeeceba91af3767009e55239fb567f4e79b34f233e /src/intervals.c
parent3250954ce21bae87f6fa607b41f0cf849a782c64 (diff)
downloademacs-ad552a9a9b706b0e727338e17b643f683546e8f4.tar.gz
(verify_interval_modification): Don't just test
Qread_only prop; use INTERVAL_WRITABLE_P.
Diffstat (limited to 'src/intervals.c')
-rw-r--r--src/intervals.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/intervals.c b/src/intervals.c
index a737e9dceef..3d30e21c3ee 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -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");
}