aboutsummaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 87f1675047b..29425f7a550 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1707,10 +1707,14 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
1707{ 1707{
1708 Lisp_Object prev_pos, front_sticky; 1708 Lisp_Object prev_pos, front_sticky;
1709 int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */ 1709 int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
1710 Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky);
1710 1711
1711 if (NILP (buffer)) 1712 if (NILP (buffer))
1712 XSETBUFFER (buffer, current_buffer); 1713 XSETBUFFER (buffer, current_buffer);
1713 1714
1715 if (CONSP (defalt) && !NILP (XCDR (defalt)))
1716 is_rear_sticky = 0;
1717
1714 if (XINT (pos) > BUF_BEGV (XBUFFER (buffer))) 1718 if (XINT (pos) > BUF_BEGV (XBUFFER (buffer)))
1715 /* Consider previous character. */ 1719 /* Consider previous character. */
1716 { 1720 {
@@ -2230,9 +2234,11 @@ If a character in a buffer has PROPERTY, new text inserted adjacent to
2230the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, 2234the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil,
2231inherits it if NONSTICKINESS is nil. The `front-sticky' and 2235inherits it if NONSTICKINESS is nil. The `front-sticky' and
2232`rear-nonsticky' properties of the character override NONSTICKINESS. */); 2236`rear-nonsticky' properties of the character override NONSTICKINESS. */);
2233 /* Text property `syntax-table' should be nonsticky by default. */ 2237 /* Text properties `syntax-table'and `display' should be nonsticky
2238 by default. */
2234 Vtext_property_default_nonsticky 2239 Vtext_property_default_nonsticky
2235 = Fcons (Fcons (intern_c_string ("syntax-table"), Qt), Qnil); 2240 = Fcons (Fcons (intern_c_string ("syntax-table"), Qt),
2241 Fcons (Fcons (intern_c_string ("display"), Qt), Qnil));
2236 2242
2237 staticpro (&interval_insert_behind_hooks); 2243 staticpro (&interval_insert_behind_hooks);
2238 staticpro (&interval_insert_in_front_hooks); 2244 staticpro (&interval_insert_in_front_hooks);