aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-12-25 02:41:59 +0000
committerKenichi Handa2009-12-25 02:41:59 +0000
commit4abd35cb643b6c18207955a9615e8993eed74b88 (patch)
tree3fa329eaf38cd74757393f9a7f24fcd784c875b6 /src
parent7450fd364a0cb12a849c0806808658972b2e3646 (diff)
downloademacs-4abd35cb643b6c18207955a9615e8993eed74b88.tar.gz
emacs-4abd35cb643b6c18207955a9615e8993eed74b88.zip
(command_loop_1): Force redisplay if the last point
was within a composition. (adjust_point_for_property): Don't adjust point for automatic composition when called after buffer modification.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index f15b7971c45..37f0ca8c83a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1976,9 +1976,20 @@ command_loop_1 ()
1976 if (current_buffer == prev_buffer 1976 if (current_buffer == prev_buffer
1977 && last_point_position != PT 1977 && last_point_position != PT
1978 && NILP (Vdisable_point_adjustment) 1978 && NILP (Vdisable_point_adjustment)
1979 && NILP (Vglobal_disable_point_adjustment) 1979 && NILP (Vglobal_disable_point_adjustment))
1980 && !already_adjusted) 1980 {
1981 adjust_point_for_property (last_point_position, MODIFF != prev_modiff); 1981 if (composition_adjust_point (last_point_position,
1982 last_point_position)
1983 != last_point_position)
1984 /* The last point was temporarily set within a grapheme
1985 cluster to prevent automatic composition. To recover
1986 the automatic composition, we must update the
1987 display. */
1988 windows_or_buffers_changed++;
1989 if (!already_adjusted)
1990 adjust_point_for_property (last_point_position,
1991 MODIFF != prev_modiff);
1992 }
1982 1993
1983 /* Install chars successfully executed in kbd macro. */ 1994 /* Install chars successfully executed in kbd macro. */
1984 1995
@@ -2009,7 +2020,11 @@ adjust_point_for_property (last_pt, modified)
2009{ 2020{
2010 EMACS_INT beg, end; 2021 EMACS_INT beg, end;
2011 Lisp_Object val, overlay, tmp; 2022 Lisp_Object val, overlay, tmp;
2012 int check_composition = 1, check_display = 1, check_invisible = 1; 2023 /* When called after buffer modification, we should temporarily
2024 suppress the point adjustment for automatic composition so that a
2025 user can keep inserting another character at point or keep
2026 deleting characters around point. */
2027 int check_composition = ! modified, check_display = 1, check_invisible = 1;
2013 int orig_pt = PT; 2028 int orig_pt = PT;
2014 2029
2015 /* FIXME: cycling is probably not necessary because these properties 2030 /* FIXME: cycling is probably not necessary because these properties
@@ -2019,7 +2034,7 @@ adjust_point_for_property (last_pt, modified)
2019 /* FIXME: check `intangible'. */ 2034 /* FIXME: check `intangible'. */
2020 if (check_composition 2035 if (check_composition
2021 && PT > BEGV && PT < ZV 2036 && PT > BEGV && PT < ZV
2022 && (beg = composition_adjust_point (last_pt)) != PT) 2037 && (beg = composition_adjust_point (last_pt, PT)) != PT)
2023 { 2038 {
2024 SET_PT (beg); 2039 SET_PT (beg);
2025 check_display = check_invisible = 1; 2040 check_display = check_invisible = 1;