Mercurial > emacs
changeset 2058:a43d0bb1b7d8
(Fget_text_property): Use textget.
(Fnext_single_property_change): Likewise.
(Fprevious_single_property_change): Likewise.
(syms_of_textprop): Set up Qcategory, Qlocal_map.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 07 Mar 1993 23:30:01 +0000 |
parents | 265b81ff7eee |
children | 3eaba0d9797c |
files | src/textprop.c |
diffstat | 1 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/textprop.c Sun Mar 07 20:57:30 1993 +0000 +++ b/src/textprop.c Sun Mar 07 23:30:01 1993 +0000 @@ -44,6 +44,8 @@ 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 (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 (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 (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 @@ 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 */