Mercurial > emacs
changeset 48840:b6981c46191d
(text_read_only): New arg `propval'.
(get_char_property_and_overlay): Remove unused var `next_overlay'.
(verify_interval_modification): Use text_read_only's new arg.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 14 Dec 2002 00:11:38 +0000 |
parents | b4f252602421 |
children | 24ee0d16711c |
files | src/textprop.c |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/textprop.c Fri Dec 13 23:58:55 2002 +0000 +++ b/src/textprop.c Sat Dec 14 00:11:38 2002 +0000 @@ -83,9 +83,10 @@ to capture that error in GDB by putting a breakpoint on it. */ static void -text_read_only () +text_read_only (propval) + Lisp_Object propval; { - Fsignal (Qtext_read_only, Qnil); + Fsignal (Qtext_read_only, STRINGP (propval) ? Fcons (propval, Qnil) : Qnil); } @@ -604,7 +605,7 @@ return textget (Ftext_properties_at (position, object), prop); } -/* Return the value of POSITION's property PROP, in OBJECT. +/* Return the value of char's property PROP, in OBJECT at POSITION. OBJECT is optional and defaults to the current buffer. If OVERLAY is non-0, then in the case that the returned property is from an overlay, the overlay found is returned in *OVERLAY, otherwise nil is @@ -638,7 +639,6 @@ int posn = XINT (position); int noverlays; Lisp_Object *overlay_vec, tem; - int next_overlay; int len; struct buffer *obuf = current_buffer; @@ -649,7 +649,7 @@ overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); noverlays = overlays_at (posn, 0, &overlay_vec, &len, - &next_overlay, NULL, 0); + NULL, NULL, 0); /* If there are more than 40, make enough space for all, and try again. */ @@ -658,7 +658,7 @@ len = noverlays; overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); noverlays = overlays_at (posn, 0, &overlay_vec, &len, - &next_overlay, NULL, 0); + NULL, NULL, 0); } noverlays = sort_overlays (overlay_vec, noverlays, w); @@ -2051,7 +2051,7 @@ if (TMEM (Qread_only, tem) || (NILP (Fplist_get (i->plist, Qread_only)) && TMEM (Qcategory, tem))) - text_read_only (); + text_read_only (after); } } @@ -2071,7 +2071,7 @@ if (! TMEM (Qread_only, tem) && (! NILP (Fplist_get (prev->plist,Qread_only)) || ! TMEM (Qcategory, tem))) - text_read_only (); + text_read_only (before); } } } @@ -2090,13 +2090,13 @@ if (TMEM (Qread_only, tem) || (NILP (Fplist_get (i->plist, Qread_only)) && TMEM (Qcategory, tem))) - text_read_only (); + text_read_only (after); tem = textget (prev->plist, Qrear_nonsticky); if (! TMEM (Qread_only, tem) && (! NILP (Fplist_get (prev->plist, Qread_only)) || ! TMEM (Qcategory, tem))) - text_read_only (); + text_read_only (after); } } } @@ -2118,7 +2118,7 @@ do { if (! INTERVAL_WRITABLE_P (i)) - text_read_only (); + text_read_only (textget (i->plist, Qread_only)); if (!inhibit_modification_hooks) {