diff options
| author | Stefan Monnier | 2013-11-25 10:42:06 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-11-25 10:42:06 -0500 |
| commit | a5fa8eb4848e64455cf1aa47198285f9fa8baca0 (patch) | |
| tree | 33bbbf9fed5fb1301488f1c0c29c7469146ab08e /src/textprop.c | |
| parent | 5f5b128d48afce520ddb675849224977ea253294 (diff) | |
| download | emacs-a5fa8eb4848e64455cf1aa47198285f9fa8baca0.tar.gz emacs-a5fa8eb4848e64455cf1aa47198285f9fa8baca0.zip | |
* src/textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
Diffstat (limited to 'src/textprop.c')
| -rw-r--r-- | src/textprop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/textprop.c b/src/textprop.c index b804f345047..6a750f1361f 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1820,7 +1820,7 @@ int | |||
| 1820 | text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) | 1820 | text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) |
| 1821 | { | 1821 | { |
| 1822 | Lisp_Object prev_pos, front_sticky; | 1822 | Lisp_Object prev_pos, front_sticky; |
| 1823 | bool is_rear_sticky = 1, is_front_sticky = 0; /* defaults */ | 1823 | bool is_rear_sticky = true, is_front_sticky = false; /* defaults */ |
| 1824 | Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky); | 1824 | Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky); |
| 1825 | 1825 | ||
| 1826 | if (NILP (buffer)) | 1826 | if (NILP (buffer)) |
| @@ -1841,10 +1841,10 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) | |||
| 1841 | ? Fmemq (prop, rear_non_sticky) | 1841 | ? Fmemq (prop, rear_non_sticky) |
| 1842 | : rear_non_sticky)) | 1842 | : rear_non_sticky)) |
| 1843 | /* PROP is rear-non-sticky. */ | 1843 | /* PROP is rear-non-sticky. */ |
| 1844 | is_rear_sticky = 0; | 1844 | is_rear_sticky = false; |
| 1845 | } | 1845 | } |
| 1846 | else | 1846 | else |
| 1847 | return 0; | 1847 | is_rear_sticky = false; |
| 1848 | 1848 | ||
| 1849 | /* Consider following character. */ | 1849 | /* Consider following character. */ |
| 1850 | /* This signals an arg-out-of-range error if pos is outside the | 1850 | /* This signals an arg-out-of-range error if pos is outside the |
| @@ -1855,7 +1855,7 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) | |||
| 1855 | || (CONSP (front_sticky) | 1855 | || (CONSP (front_sticky) |
| 1856 | && !NILP (Fmemq (prop, front_sticky)))) | 1856 | && !NILP (Fmemq (prop, front_sticky)))) |
| 1857 | /* PROP is inherited from after. */ | 1857 | /* PROP is inherited from after. */ |
| 1858 | is_front_sticky = 1; | 1858 | is_front_sticky = true; |
| 1859 | 1859 | ||
| 1860 | /* Simple cases, where the properties are consistent. */ | 1860 | /* Simple cases, where the properties are consistent. */ |
| 1861 | if (is_rear_sticky && !is_front_sticky) | 1861 | if (is_rear_sticky && !is_front_sticky) |