emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src keyboard.c


From: Kenichi Handa
Subject: [Emacs-diffs] emacs/src keyboard.c
Date: Fri, 25 Dec 2009 02:41:59 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   09/12/25 02:41:59

Modified files:
        src            : keyboard.c 

Log message:
        (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.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/keyboard.c?cvsroot=emacs&r1=1.1024&r2=1.1025

Patches:
Index: keyboard.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v
retrieving revision 1.1024
retrieving revision 1.1025
diff -u -b -r1.1024 -r1.1025
--- keyboard.c  17 Nov 2009 08:21:35 -0000      1.1024
+++ keyboard.c  25 Dec 2009 02:41:59 -0000      1.1025
@@ -1976,9 +1976,20 @@
       if (current_buffer == prev_buffer
          && last_point_position != PT
          && NILP (Vdisable_point_adjustment)
-         && NILP (Vglobal_disable_point_adjustment)
-         && !already_adjusted)
-       adjust_point_for_property (last_point_position, MODIFF != prev_modiff);
+         && NILP (Vglobal_disable_point_adjustment))
+       {
+         if (composition_adjust_point (last_point_position,
+                                       last_point_position)
+             != last_point_position)
+           /* The last point was temporarily set within a grapheme
+              cluster to prevent automatic composition.  To recover
+              the automatic composition, we must update the
+              display.  */
+           windows_or_buffers_changed++;
+         if (!already_adjusted)
+           adjust_point_for_property (last_point_position,
+                                      MODIFF != prev_modiff);
+       }
 
       /* Install chars successfully executed in kbd macro.  */
 
@@ -2009,7 +2020,11 @@
 {
   EMACS_INT beg, end;
   Lisp_Object val, overlay, tmp;
-  int check_composition = 1, check_display = 1, check_invisible = 1;
+  /* When called after buffer modification, we should temporarily
+     suppress the point adjustment for automatic composition so that a
+     user can keep inserting another character at point or keep
+     deleting characters around point.  */
+  int check_composition = ! modified, check_display = 1, check_invisible = 1;
   int orig_pt = PT;
 
   /* FIXME: cycling is probably not necessary because these properties
@@ -2019,7 +2034,7 @@
       /* FIXME: check `intangible'.  */
       if (check_composition
          && PT > BEGV && PT < ZV
-         && (beg = composition_adjust_point (last_pt)) != PT)
+         && (beg = composition_adjust_point (last_pt, PT)) != PT)
        {
          SET_PT (beg);
          check_display = check_invisible = 1;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]