]> git.eshelyaron.com Git - emacs.git/commitdiff
(verify_interval_modification): Signal text-read-only
authorGerd Moellmann <gerd@gnu.org>
Mon, 1 Nov 1999 14:14:52 +0000 (14:14 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 1 Nov 1999 14:14:52 +0000 (14:14 +0000)
instead of calling error.

src/textprop.c

index 14cebd69d6438bfe63254c1cc46ce2ddc12b2025..9e86594cad795f815a7ed3d94f994afe7a8c56d4 100644 (file)
@@ -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))