to be run later by report_interval_modification. */
Lisp_Object interval_insert_behind_hooks;
Lisp_Object interval_insert_in_front_hooks;
+
+
+/* Signal a `text-read-only' error. This function makes it easier
+ to capture that error in GDB by putting a breakpoint on it. */
+
+static void
+text_read_only ()
+{
+ Fsignal (Qtext_read_only, Qnil);
+}
+
+
\f
/* Extract the interval at the position pointed to by BEGIN from
OBJECT, a string or buffer. Additionally, check that the positions
/* For an insert operation, check the two chars around the position. */
if (start == end)
{
- INTERVAL prev;
+ INTERVAL prev = NULL;
Lisp_Object before, after;
/* Set I to the interval containing the char after START,
if (TMEM (Qread_only, tem)
|| (NILP (Fplist_get (i->plist, Qread_only))
&& TMEM (Qcategory, tem)))
- Fsignal (Qtext_read_only, Qnil);
+ text_read_only ();
}
}
if (! TMEM (Qread_only, tem)
&& (! NILP (Fplist_get (prev->plist,Qread_only))
|| ! TMEM (Qcategory, tem)))
- Fsignal (Qtext_read_only, Qnil);
+ text_read_only ();
}
}
}
if (TMEM (Qread_only, tem)
|| (NILP (Fplist_get (i->plist, Qread_only))
&& TMEM (Qcategory, tem)))
- Fsignal (Qtext_read_only, Qnil);
+ text_read_only ();
tem = textget (prev->plist, Qrear_nonsticky);
if (! TMEM (Qread_only, tem)
&& (! NILP (Fplist_get (prev->plist, Qread_only))
|| ! TMEM (Qcategory, tem)))
- Fsignal (Qtext_read_only, Qnil);
+ text_read_only ();
}
}
}
do
{
if (! INTERVAL_WRITABLE_P (i))
- Fsignal (Qtext_read_only, Qnil);
+ text_read_only ();
mod_hooks = textget (i->plist, Qmodification_hooks);
if (! NILP (mod_hooks) && ! EQ (mod_hooks, prev_mod_hooks))