diff options
| author | Stefan Monnier | 2002-12-14 00:11:38 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-12-14 00:11:38 +0000 |
| commit | bcf9734920b1aa59ec7e7d1860b7744eedbf2520 (patch) | |
| tree | 59927e9e830abb7724ae5b21ca73a1a04b7b8b95 /src | |
| parent | 37554efff5f195d760000a900a285b03c494d66e (diff) | |
| download | emacs-bcf9734920b1aa59ec7e7d1860b7744eedbf2520.tar.gz emacs-bcf9734920b1aa59ec7e7d1860b7744eedbf2520.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/textprop.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/textprop.c b/src/textprop.c index 84479fc39e3..745f6b7fb90 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -83,9 +83,10 @@ Lisp_Object interval_insert_in_front_hooks; | |||
| 83 | to capture that error in GDB by putting a breakpoint on it. */ | 83 | to capture that error in GDB by putting a breakpoint on it. */ |
| 84 | 84 | ||
| 85 | static void | 85 | static void |
| 86 | text_read_only () | 86 | text_read_only (propval) |
| 87 | Lisp_Object propval; | ||
| 87 | { | 88 | { |
| 88 | Fsignal (Qtext_read_only, Qnil); | 89 | Fsignal (Qtext_read_only, STRINGP (propval) ? Fcons (propval, Qnil) : Qnil); |
| 89 | } | 90 | } |
| 90 | 91 | ||
| 91 | 92 | ||
| @@ -604,7 +605,7 @@ If POSITION is at the end of OBJECT, the value is nil. */) | |||
| 604 | return textget (Ftext_properties_at (position, object), prop); | 605 | return textget (Ftext_properties_at (position, object), prop); |
| 605 | } | 606 | } |
| 606 | 607 | ||
| 607 | /* Return the value of POSITION's property PROP, in OBJECT. | 608 | /* Return the value of char's property PROP, in OBJECT at POSITION. |
| 608 | OBJECT is optional and defaults to the current buffer. | 609 | OBJECT is optional and defaults to the current buffer. |
| 609 | If OVERLAY is non-0, then in the case that the returned property is from | 610 | If OVERLAY is non-0, then in the case that the returned property is from |
| 610 | an overlay, the overlay found is returned in *OVERLAY, otherwise nil is | 611 | an overlay, the overlay found is returned in *OVERLAY, otherwise nil is |
| @@ -638,7 +639,6 @@ get_char_property_and_overlay (position, prop, object, overlay) | |||
| 638 | int posn = XINT (position); | 639 | int posn = XINT (position); |
| 639 | int noverlays; | 640 | int noverlays; |
| 640 | Lisp_Object *overlay_vec, tem; | 641 | Lisp_Object *overlay_vec, tem; |
| 641 | int next_overlay; | ||
| 642 | int len; | 642 | int len; |
| 643 | struct buffer *obuf = current_buffer; | 643 | struct buffer *obuf = current_buffer; |
| 644 | 644 | ||
| @@ -649,7 +649,7 @@ get_char_property_and_overlay (position, prop, object, overlay) | |||
| 649 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | 649 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); |
| 650 | 650 | ||
| 651 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, | 651 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, |
| 652 | &next_overlay, NULL, 0); | 652 | NULL, NULL, 0); |
| 653 | 653 | ||
| 654 | /* If there are more than 40, | 654 | /* If there are more than 40, |
| 655 | make enough space for all, and try again. */ | 655 | make enough space for all, and try again. */ |
| @@ -658,7 +658,7 @@ get_char_property_and_overlay (position, prop, object, overlay) | |||
| 658 | len = noverlays; | 658 | len = noverlays; |
| 659 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | 659 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); |
| 660 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, | 660 | noverlays = overlays_at (posn, 0, &overlay_vec, &len, |
| 661 | &next_overlay, NULL, 0); | 661 | NULL, NULL, 0); |
| 662 | } | 662 | } |
| 663 | noverlays = sort_overlays (overlay_vec, noverlays, w); | 663 | noverlays = sort_overlays (overlay_vec, noverlays, w); |
| 664 | 664 | ||
| @@ -2051,7 +2051,7 @@ verify_interval_modification (buf, start, end) | |||
| 2051 | if (TMEM (Qread_only, tem) | 2051 | if (TMEM (Qread_only, tem) |
| 2052 | || (NILP (Fplist_get (i->plist, Qread_only)) | 2052 | || (NILP (Fplist_get (i->plist, Qread_only)) |
| 2053 | && TMEM (Qcategory, tem))) | 2053 | && TMEM (Qcategory, tem))) |
| 2054 | text_read_only (); | 2054 | text_read_only (after); |
| 2055 | } | 2055 | } |
| 2056 | } | 2056 | } |
| 2057 | 2057 | ||
| @@ -2071,7 +2071,7 @@ verify_interval_modification (buf, start, end) | |||
| 2071 | if (! TMEM (Qread_only, tem) | 2071 | if (! TMEM (Qread_only, tem) |
| 2072 | && (! NILP (Fplist_get (prev->plist,Qread_only)) | 2072 | && (! NILP (Fplist_get (prev->plist,Qread_only)) |
| 2073 | || ! TMEM (Qcategory, tem))) | 2073 | || ! TMEM (Qcategory, tem))) |
| 2074 | text_read_only (); | 2074 | text_read_only (before); |
| 2075 | } | 2075 | } |
| 2076 | } | 2076 | } |
| 2077 | } | 2077 | } |
| @@ -2090,13 +2090,13 @@ verify_interval_modification (buf, start, end) | |||
| 2090 | if (TMEM (Qread_only, tem) | 2090 | if (TMEM (Qread_only, tem) |
| 2091 | || (NILP (Fplist_get (i->plist, Qread_only)) | 2091 | || (NILP (Fplist_get (i->plist, Qread_only)) |
| 2092 | && TMEM (Qcategory, tem))) | 2092 | && TMEM (Qcategory, tem))) |
| 2093 | text_read_only (); | 2093 | text_read_only (after); |
| 2094 | 2094 | ||
| 2095 | tem = textget (prev->plist, Qrear_nonsticky); | 2095 | tem = textget (prev->plist, Qrear_nonsticky); |
| 2096 | if (! TMEM (Qread_only, tem) | 2096 | if (! TMEM (Qread_only, tem) |
| 2097 | && (! NILP (Fplist_get (prev->plist, Qread_only)) | 2097 | && (! NILP (Fplist_get (prev->plist, Qread_only)) |
| 2098 | || ! TMEM (Qcategory, tem))) | 2098 | || ! TMEM (Qcategory, tem))) |
| 2099 | text_read_only (); | 2099 | text_read_only (after); |
| 2100 | } | 2100 | } |
| 2101 | } | 2101 | } |
| 2102 | } | 2102 | } |
| @@ -2118,7 +2118,7 @@ verify_interval_modification (buf, start, end) | |||
| 2118 | do | 2118 | do |
| 2119 | { | 2119 | { |
| 2120 | if (! INTERVAL_WRITABLE_P (i)) | 2120 | if (! INTERVAL_WRITABLE_P (i)) |
| 2121 | text_read_only (); | 2121 | text_read_only (textget (i->plist, Qread_only)); |
| 2122 | 2122 | ||
| 2123 | if (!inhibit_modification_hooks) | 2123 | if (!inhibit_modification_hooks) |
| 2124 | { | 2124 | { |