From e28c666e3c0b85fb98e6ea64284b7f2c84d448c8 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 1 Nov 1999 14:14:52 +0000 Subject: [PATCH] (verify_interval_modification): Signal text-read-only instead of calling error. --- src/textprop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/textprop.c b/src/textprop.c index 14cebd69d64..9e86594cad7 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1693,7 +1693,7 @@ verify_interval_modification (buf, start, end) if (TMEM (Qread_only, tem) || (NILP (Fplist_get (i->plist, Qread_only)) && TMEM (Qcategory, tem))) - error ("Attempt to insert within read-only text"); + Fsignal (Qtext_read_only, Qnil); } } @@ -1713,7 +1713,7 @@ verify_interval_modification (buf, start, end) if (! TMEM (Qread_only, tem) && (! NILP (Fplist_get (prev->plist,Qread_only)) || ! TMEM (Qcategory, tem))) - error ("Attempt to insert within read-only text"); + Fsignal (Qtext_read_only, Qnil); } } } @@ -1732,13 +1732,13 @@ verify_interval_modification (buf, start, end) if (TMEM (Qread_only, tem) || (NILP (Fplist_get (i->plist, Qread_only)) && TMEM (Qcategory, tem))) - error ("Attempt to insert within read-only text"); + Fsignal (Qtext_read_only, Qnil); tem = textget (prev->plist, Qrear_nonsticky); if (! TMEM (Qread_only, tem) && (! NILP (Fplist_get (prev->plist, Qread_only)) || ! TMEM (Qcategory, tem))) - error ("Attempt to insert within read-only text"); + Fsignal (Qtext_read_only, Qnil); } } } @@ -1760,7 +1760,7 @@ verify_interval_modification (buf, start, end) do { if (! INTERVAL_WRITABLE_P (i)) - error ("Attempt to modify read-only text"); + Fsignal (Qtext_read_only, Qnil); mod_hooks = textget (i->plist, Qmodification_hooks); if (! NILP (mod_hooks) && ! EQ (mod_hooks, prev_mod_hooks)) -- 2.39.5