aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-31 21:54:10 +0000
committerRichard M. Stallman1993-07-31 21:54:10 +0000
commit19e1c4260a37d64f4533d30524a767fb4c4d9807 (patch)
tree3d30ffebac2ad8d31c32e5bdd31ebee4b3a21207 /src
parent964141f28950bc7571eebb2c92d1d3c70c5f2cb0 (diff)
downloademacs-19e1c4260a37d64f4533d30524a767fb4c4d9807.tar.gz
emacs-19e1c4260a37d64f4533d30524a767fb4c4d9807.zip
(Qfront_sticky, Qrear_nonsticky): New variables.
(syms_of_textprop): Set them up. (Qhidden): New variable. (syms_of_textprop): Set up Qhidden. (property_change_between_p): New function.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index a007e4eb3b2..b324217907e 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -48,7 +48,10 @@ Lisp_Object Qlocal_map;
48 48
49/* Visual properties text (including strings) may have. */ 49/* Visual properties text (including strings) may have. */
50Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; 50Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple;
51Lisp_Object Qinvisible, Qread_only; 51Lisp_Object Qinvisible, Qread_only, Qhidden;
52
53/* Sticky properties */
54Lisp_Object Qfront_sticky, Qrear_nonsticky;
52 55
53/* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to 56/* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to
54 the o1's cdr. Otherwise, return zero. This is handy for 57 the o1's cdr. Otherwise, return zero. This is handy for
@@ -543,7 +546,36 @@ If the value is non-nil, it is a position greater than POS, never equal.")
543 return Qnil; 546 return Qnil;
544 547
545 return next->position - (XTYPE (object) == Lisp_String); 548 return next->position - (XTYPE (object) == Lisp_String);
546; 549}
550
551/* Return 1 if there's a change in some property between BEG and END. */
552
553int
554property_change_between_p (beg, end)
555 int beg, end;
556{
557 register INTERVAL i, next;
558 Lisp_Object object, pos;
559
560 XSET (object, Lisp_Buffer, current_buffer);
561 XFASTINT (pos) = beg;
562
563 i = validate_interval_range (object, &pos, &pos, soft);
564 if (NULL_INTERVAL_P (i))
565 return 0;
566
567 next = next_interval (i);
568 while (! NULL_INTERVAL_P (next) && intervals_equal (i, next))
569 {
570 next = next_interval (next);
571 if (next->position >= end)
572 return 0;
573 }
574
575 if (NULL_INTERVAL_P (next))
576 return 0;
577
578 return 1;
547} 579}
548 580
549DEFUN ("next-single-property-change", Fnext_single_property_change, 581DEFUN ("next-single-property-change", Fnext_single_property_change,
@@ -1201,10 +1233,16 @@ percentage by which the left interval tree should not differ from the right.");
1201 Qread_only = intern ("read-only"); 1233 Qread_only = intern ("read-only");
1202 staticpro (&Qinvisible); 1234 staticpro (&Qinvisible);
1203 Qinvisible = intern ("invisible"); 1235 Qinvisible = intern ("invisible");
1236 staticpro (&Qhidden);
1237 Qhidden = intern ("hidden");
1204 staticpro (&Qcategory); 1238 staticpro (&Qcategory);
1205 Qcategory = intern ("category"); 1239 Qcategory = intern ("category");
1206 staticpro (&Qlocal_map); 1240 staticpro (&Qlocal_map);
1207 Qlocal_map = intern ("local-map"); 1241 Qlocal_map = intern ("local-map");
1242 staticpro (&Qfront_sticky);
1243 Qfront_sticky = intern ("front-sticky");
1244 staticpro (&Qrear_nonsticky);
1245 Qrear_nonsticky = intern ("rear-nonsticky");
1208 1246
1209 /* Properties that text might use to specify certain actions */ 1247 /* Properties that text might use to specify certain actions */
1210 1248