diff options
| author | Stefan Monnier | 2011-07-04 14:31:29 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-07-04 14:31:29 -0400 |
| commit | cabf1cac90043cd356d7adf1d6885687ab01964c (patch) | |
| tree | b1b9f411dbef7255b37faf1e5a44485ad71f9461 /src | |
| parent | f932a347844c88e1586ffe3995c9a60ccd74668e (diff) | |
| download | emacs-cabf1cac90043cd356d7adf1d6885687ab01964c.tar.gz emacs-cabf1cac90043cd356d7adf1d6885687ab01964c.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/textprop.c | 10 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * textprop.c (text_property_stickiness): | ||
| 4 | Obey Vtext_property_default_nonsticky. | ||
| 5 | (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky. | ||
| 6 | * w32fns.c (syms_of_w32fns): | ||
| 7 | * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default. | ||
| 8 | |||
| 1 | 2011-07-04 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2011-07-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR. | 11 | * 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) | |||
| 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 | |||
| 2230 | the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, | 2234 | the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, |
| 2231 | inherits it if NONSTICKINESS is nil. The `front-sticky' and | 2235 | inherits 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); |
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) | |||
| 6805 | DEFSYM (Qfont_param, "font-parameter"); | 6805 | DEFSYM (Qfont_param, "font-parameter"); |
| 6806 | /* This is the end of symbol initialization. */ | 6806 | /* This is the end of symbol initialization. */ |
| 6807 | 6807 | ||
| 6808 | /* Text property `display' should be nonsticky by default. */ | ||
| 6809 | Vtext_property_default_nonsticky | ||
| 6810 | = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); | ||
| 6811 | |||
| 6812 | 6808 | ||
| 6813 | Fput (Qundefined_color, Qerror_conditions, | 6809 | Fput (Qundefined_color, Qerror_conditions, |
| 6814 | pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); | 6810 | 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) | |||
| 5805 | DEFSYM (Qfont_param, "font-parameter"); | 5805 | DEFSYM (Qfont_param, "font-parameter"); |
| 5806 | /* This is the end of symbol initialization. */ | 5806 | /* This is the end of symbol initialization. */ |
| 5807 | 5807 | ||
| 5808 | /* Text property `display' should be nonsticky by default. */ | ||
| 5809 | Vtext_property_default_nonsticky | ||
| 5810 | = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); | ||
| 5811 | |||
| 5812 | Fput (Qundefined_color, Qerror_conditions, | 5808 | Fput (Qundefined_color, Qerror_conditions, |
| 5813 | pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); | 5809 | pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); |
| 5814 | Fput (Qundefined_color, Qerror_message, | 5810 | Fput (Qundefined_color, Qerror_message, |