diff options
| author | Joakim Verona | 2011-07-15 04:39:29 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-07-15 04:39:29 +0200 |
| commit | 4f616a2e7ed1db28da98df90266e9751a8ae9ee1 (patch) | |
| tree | 74a9dcbe13e945e712ae04a4a94c2202ca720591 /src/textprop.c | |
| parent | ff2be00005c3aeda6e11d7ed264ce86f02b60958 (diff) | |
| parent | ec2bc542a4d0127425625e8cb458684bd825675a (diff) | |
| download | emacs-4f616a2e7ed1db28da98df90266e9751a8ae9ee1.tar.gz emacs-4f616a2e7ed1db28da98df90266e9751a8ae9ee1.zip | |
merge from upstream
Diffstat (limited to 'src/textprop.c')
| -rw-r--r-- | src/textprop.c | 10 |
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 | |||
| 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); |