diff options
| author | Richard M. Stallman | 1993-03-07 23:30:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-03-07 23:30:01 +0000 |
| commit | dc70cea7815c4464cb237df1cee36d4cb7e5f7c0 (patch) | |
| tree | c836334d59860c2b372eedc4fb34e1182175e8a9 /src | |
| parent | 5f1d59f437a54ee6d8ad28f92b0dd4ea7ba8281d (diff) | |
| download | emacs-dc70cea7815c4464cb237df1cee36d4cb7e5f7c0.tar.gz 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.
Diffstat (limited to 'src')
| -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; | |||
| 44 | Lisp_Object Qpoint_left; | 44 | Lisp_Object Qpoint_left; |
| 45 | Lisp_Object Qpoint_entered; | 45 | Lisp_Object Qpoint_entered; |
| 46 | Lisp_Object Qmodification_hooks; | 46 | Lisp_Object Qmodification_hooks; |
| 47 | Lisp_Object Qcategory; | ||
| 48 | Lisp_Object Qlocal_map; | ||
| 47 | 49 | ||
| 48 | /* Visual properties text (including strings) may have. */ | 50 | /* Visual properties text (including strings) may have. */ |
| 49 | Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; | 51 | Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; |
| @@ -467,14 +469,7 @@ If POSITION is at the end of OBJECT, the value is nil.") | |||
| 467 | if (XINT (pos) == LENGTH (i) + i->position) | 469 | if (XINT (pos) == LENGTH (i) + i->position) |
| 468 | return Qnil; | 470 | return Qnil; |
| 469 | 471 | ||
| 470 | for (tail = i->plist; !NILP (tail); tail = Fcdr (Fcdr (tail))) | 472 | return textget (i->plist, prop); |
| 471 | { | ||
| 472 | register Lisp_Object tem; | ||
| 473 | tem = Fcar (tail); | ||
| 474 | if (EQ (prop, tem)) | ||
| 475 | return Fcar (Fcdr (tail)); | ||
| 476 | } | ||
| 477 | return Qnil; | ||
| 478 | } | 473 | } |
| 479 | 474 | ||
| 480 | DEFUN ("next-property-change", Fnext_property_change, | 475 | 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.") | |||
| 529 | if (NULL_INTERVAL_P (i)) | 524 | if (NULL_INTERVAL_P (i)) |
| 530 | return Qnil; | 525 | return Qnil; |
| 531 | 526 | ||
| 532 | here_val = Fget (prop, i->plist); | 527 | here_val = textget (prop, i->plist); |
| 533 | next = next_interval (i); | 528 | next = next_interval (i); |
| 534 | while (! NULL_INTERVAL_P (next) && EQ (here_val, Fget (prop, next->plist))) | 529 | while (! NULL_INTERVAL_P (next) && EQ (here_val, textget (prop, next->plist))) |
| 535 | next = next_interval (next); | 530 | next = next_interval (next); |
| 536 | 531 | ||
| 537 | if (NULL_INTERVAL_P (next)) | 532 | if (NULL_INTERVAL_P (next)) |
| @@ -591,10 +586,10 @@ If the value is non-nil, it is a position less than POS, never equal.") | |||
| 591 | if (NULL_INTERVAL_P (i)) | 586 | if (NULL_INTERVAL_P (i)) |
| 592 | return Qnil; | 587 | return Qnil; |
| 593 | 588 | ||
| 594 | here_val = Fget (prop, i->plist); | 589 | here_val = textget (prop, i->plist); |
| 595 | previous = previous_interval (i); | 590 | previous = previous_interval (i); |
| 596 | while (! NULL_INTERVAL_P (previous) | 591 | while (! NULL_INTERVAL_P (previous) |
| 597 | && EQ (here_val, Fget (prop, previous->plist))) | 592 | && EQ (here_val, textget (prop, previous->plist))) |
| 598 | previous = previous_interval (previous); | 593 | previous = previous_interval (previous); |
| 599 | if (NULL_INTERVAL_P (previous)) | 594 | if (NULL_INTERVAL_P (previous)) |
| 600 | return Qnil; | 595 | return Qnil; |
| @@ -1012,6 +1007,10 @@ percentage by which the left interval tree should not differ from the right."); | |||
| 1012 | Qread_only = intern ("read-only"); | 1007 | Qread_only = intern ("read-only"); |
| 1013 | staticpro (&Qinvisible); | 1008 | staticpro (&Qinvisible); |
| 1014 | Qinvisible = intern ("invisible"); | 1009 | Qinvisible = intern ("invisible"); |
| 1010 | staticpro (&Qcategory); | ||
| 1011 | Qcategory = intern ("category"); | ||
| 1012 | staticpro (&Qlocal_map); | ||
| 1013 | Qlocal_map = intern ("local-map"); | ||
| 1015 | 1014 | ||
| 1016 | /* Properties that text might use to specify certain actions */ | 1015 | /* Properties that text might use to specify certain actions */ |
| 1017 | 1016 | ||