diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-06-20 08:48:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-06-20 08:48:58 +0000 |
commit | ad552a9a9b706b0e727338e17b643f683546e8f4 (patch) | |
tree | eceba91af3767009e55239fb567f4e79b34f233e /src/intervals.c | |
parent | 3250954ce21bae87f6fa607b41f0cf849a782c64 (diff) | |
download | emacs-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.c | 11 |
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"); } |