]> code.delx.au - gnu-emacs/commitdiff
* textprop.c (text_property_stickiness): Obey Vtext_property_default_nonsticky.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Jul 2011 18:31:29 +0000 (14:31 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Jul 2011 18:31:29 +0000 (14:31 -0400)
(syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
* w32fns.c (syms_of_w32fns):
* xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.

src/ChangeLog
src/textprop.c
src/w32fns.c
src/xfns.c

index 8e208565bde74bcd313e7bb1668bff67a56a754e..17a6179f356b459833bacc5d0424eab346ffa445 100644 (file)
@@ -1,3 +1,11 @@
+2011-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * textprop.c (text_property_stickiness):
+       Obey Vtext_property_default_nonsticky.
+       (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
+       * w32fns.c (syms_of_w32fns):
+       * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
+
 2011-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
index 87f1675047b08823ccac633a99b41f8cf87b3165..29425f7a55064b093bbbf9d9fae06a7421c7f501 100644 (file)
@@ -1707,10 +1707,14 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
 {
   Lisp_Object prev_pos, front_sticky;
   int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
+  Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky);
 
   if (NILP (buffer))
     XSETBUFFER (buffer, current_buffer);
 
+  if (CONSP (defalt) && !NILP (XCDR (defalt)))
+    is_rear_sticky = 0;
+
   if (XINT (pos) > BUF_BEGV (XBUFFER (buffer)))
     /* Consider previous character.  */
     {
@@ -2230,9 +2234,11 @@ If a character in a buffer has PROPERTY, new text inserted adjacent to
 the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil,
 inherits it if NONSTICKINESS is nil.  The `front-sticky' and
 `rear-nonsticky' properties of the character override NONSTICKINESS.  */);
-  /* Text property `syntax-table' should be nonsticky by default.  */
+  /* Text properties `syntax-table'and `display' should be nonsticky
+     by default.  */
   Vtext_property_default_nonsticky
-    = Fcons (Fcons (intern_c_string ("syntax-table"), Qt), Qnil);
+    = Fcons (Fcons (intern_c_string ("syntax-table"), Qt),
+            Fcons (Fcons (intern_c_string ("display"), Qt), Qnil));
 
   staticpro (&interval_insert_behind_hooks);
   staticpro (&interval_insert_in_front_hooks);
index e4b11b70441fe0930c8cc87bc0a60e9cfb480e35..cba0b91e68566605c76de07d3b165c3075e14e12 100644 (file)
@@ -6805,10 +6805,6 @@ syms_of_w32fns (void)
   DEFSYM (Qfont_param, "font-parameter");
   /* This is the end of symbol initialization.  */
 
-  /* Text property `display' should be nonsticky by default.  */
-  Vtext_property_default_nonsticky
-    = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky);
-
 
   Fput (Qundefined_color, Qerror_conditions,
        pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
index e5d10ce905ef806fe7b1f87f048490b1a92ec51a..c70f4bb9a8203791a5ab1d4e90207f07c4035e31 100644 (file)
@@ -5805,10 +5805,6 @@ syms_of_xfns (void)
   DEFSYM (Qfont_param, "font-parameter");
   /* This is the end of symbol initialization.  */
 
-  /* Text property `display' should be nonsticky by default.  */
-  Vtext_property_default_nonsticky
-    = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky);
-
   Fput (Qundefined_color, Qerror_conditions,
        pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
   Fput (Qundefined_color, Qerror_message,