aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-20 08:48:58 +0000
committerRichard M. Stallman1993-06-20 08:48:58 +0000
commit7c92db56e023d20be00bb60a4d0e5814e9f334d7 (patch)
treeb8ff340903afc4f6fc8c3bbada721ab39e725d40 /src
parentaf4d5234ee5b3e90828d27df6aca986fabeea3d8 (diff)
downloademacs-7c92db56e023d20be00bb60a4d0e5814e9f334d7.tar.gz
emacs-7c92db56e023d20be00bb60a4d0e5814e9f334d7.zip
(verify_interval_modification): Don't just test
Qread_only prop; use INTERVAL_WRITABLE_P.
Diffstat (limited to 'src')
-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)
1479 1479
1480 if (NULL_INTERVAL_P (prev)) 1480 if (NULL_INTERVAL_P (prev))
1481 { 1481 {
1482 after = textget (i->plist, Qread_only); 1482 if (! INTERVAL_WRITABLE_P (i))
1483 if (! NILP (after))
1484 error ("Attempt to insert within read-only text"); 1483 error ("Attempt to insert within read-only text");
1485 } 1484 }
1486 else if (NULL_INTERVAL_P (i)) 1485 else if (NULL_INTERVAL_P (i))
1487 { 1486 {
1488 before = textget (prev->plist, Qread_only); 1487 if (! INTERVAL_WRITABLE_P (prev))
1489 if (! NILP (before))
1490 error ("Attempt to insert within read-only text"); 1488 error ("Attempt to insert within read-only text");
1491 } 1489 }
1492 else 1490 else
1493 { 1491 {
1494 before = textget (prev->plist, Qread_only); 1492 before = textget (prev->plist, Qread_only);
1495 after = textget (i->plist, Qread_only); 1493 after = textget (i->plist, Qread_only);
1496 if (! NILP (before) && EQ (before, after)) 1494 if (! NILP (before) && EQ (before, after)
1495 /* This checks Vinhibit_read_only properly
1496 for the common value of the read-only property. */
1497 && ! INTERVAL_WRITABLE_P (i))
1497 error ("Attempt to insert within read-only text"); 1498 error ("Attempt to insert within read-only text");
1498 } 1499 }
1499 1500