diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-03-07 23:30:01 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-03-07 23:30:01 +0000 |
commit | dc70cea7815c4464cb237df1cee36d4cb7e5f7c0 (patch) | |
tree | c836334d59860c2b372eedc4fb34e1182175e8a9 | |
parent | 5f1d59f437a54ee6d8ad28f92b0dd4ea7ba8281d (diff) | |
download | emacs-dc70cea7815c4464cb237df1cee36d4cb7e5f7c0.tar.gz emacs-dc70cea7815c4464cb237df1cee36d4cb7e5f7c0.tar.bz2 emacs-dc70cea7815c4464cb237df1cee36d4cb7e5f7c0.zip |
(Fget_text_property): Use textget.
(Fnext_single_property_change): Likewise.
(Fprevious_single_property_change): Likewise.
(syms_of_textprop): Set up Qcategory, Qlocal_map.
-rw-r--r-- | src/textprop.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/textprop.c b/src/textprop.c index f0e69f7496f..871bd8875a7 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -44,6 +44,8 @@ Lisp_Object Qmouse_entered; Lisp_Object Qpoint_left; Lisp_Object Qpoint_entered; Lisp_Object Qmodification_hooks; +Lisp_Object Qcategory; +Lisp_Object Qlocal_map; /* Visual properties text (including strings) may have. */ Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; @@ -467,14 +469,7 @@ If POSITION is at the end of OBJECT, the value is nil.") if (XINT (pos) == LENGTH (i) + i->position) return Qnil; - for (tail = i->plist; !NILP (tail); tail = Fcdr (Fcdr (tail))) - { - register Lisp_Object tem; - tem = Fcar (tail); - if (EQ (prop, tem)) - return Fcar (Fcdr (tail)); - } - return Qnil; + return textget (i->plist, prop); } DEFUN ("next-property-change", Fnext_property_change, @@ -529,9 +524,9 @@ If the value is non-nil, it is a position greater than POS, never equal.") if (NULL_INTERVAL_P (i)) return Qnil; - here_val = Fget (prop, i->plist); + here_val = textget (prop, i->plist); next = next_interval (i); - while (! NULL_INTERVAL_P (next) && EQ (here_val, Fget (prop, next->plist))) + while (! NULL_INTERVAL_P (next) && EQ (here_val, textget (prop, next->plist))) next = next_interval (next); if (NULL_INTERVAL_P (next)) @@ -591,10 +586,10 @@ If the value is non-nil, it is a position less than POS, never equal.") if (NULL_INTERVAL_P (i)) return Qnil; - here_val = Fget (prop, i->plist); + here_val = textget (prop, i->plist); previous = previous_interval (i); while (! NULL_INTERVAL_P (previous) - && EQ (here_val, Fget (prop, previous->plist))) + && EQ (here_val, textget (prop, previous->plist))) previous = previous_interval (previous); if (NULL_INTERVAL_P (previous)) return Qnil; @@ -1012,6 +1007,10 @@ percentage by which the left interval tree should not differ from the right."); Qread_only = intern ("read-only"); staticpro (&Qinvisible); Qinvisible = intern ("invisible"); + staticpro (&Qcategory); + Qcategory = intern ("category"); + staticpro (&Qlocal_map); + Qlocal_map = intern ("local-map"); /* Properties that text might use to specify certain actions */ |