Mercurial > emacs
changeset 3847:a58e981e2582
(verify_interval_modification): Don't just test
Qread_only prop; use INTERVAL_WRITABLE_P.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 20 Jun 1993 08:48:58 +0000 |
parents | 8808695cc15b |
children | 73eb72de291d |
files | src/intervals.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/intervals.c Sun Jun 20 08:48:12 1993 +0000 +++ b/src/intervals.c Sun Jun 20 08:48:58 1993 +0000 @@ -1479,21 +1479,22 @@ 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"); }