From cabf1cac90043cd356d7adf1d6885687ab01964c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 4 Jul 2011 14:31:29 -0400 Subject: [PATCH] * 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. --- src/ChangeLog | 8 ++++++++ src/textprop.c | 10 ++++++++-- src/w32fns.c | 4 ---- src/xfns.c | 4 ---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8e208565bde..17a6179f356 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-07-04 Stefan Monnier + + * 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 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. 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) { 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); diff --git a/src/w32fns.c b/src/w32fns.c index e4b11b70441..cba0b91e685 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -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))); diff --git a/src/xfns.c b/src/xfns.c index e5d10ce905e..c70f4bb9a82 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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, -- 2.39.2