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 | |
| 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')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/textprop.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9947ba4b070..123feaffae0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * textprop.c (text_property_stickiness): Fix front-stickiness at BOB. | ||
| 4 | |||
| 3 | * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el. | 5 | * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el. |
| 4 | (syms_of_frame): Don't defsubr them. | 6 | (syms_of_frame): Don't defsubr them. |
| 5 | 7 | ||
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) |