(command_loop_1): Don't redisplay directly if there's a post-command-hook.
authorRichard M. Stallman <rms@gnu.org>
Mon, 13 Jan 2003 08:20:09 +0000 (08:20 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 13 Jan 2003 08:20:09 +0000 (08:20 +0000)
src/keyboard.c

index f4593bd..bde6ac3 100644 (file)
@@ -1583,6 +1583,10 @@ command_loop_1 ()
                    = window_display_table (XWINDOW (selected_window));
                  lose = FETCH_CHAR (PT_BYTE);
                  SET_PT (PT + 1);
+                 if (! NILP (Vpost_command_hook))
+                   /* Put this before calling adjust_point_for_property
+                      so it will only get called once in any case.  */
+                   goto directly_done;
                  adjust_point_for_property (last_point_position);
                  already_adjusted = 1;
                  if (PT == last_point_position + 1
@@ -1615,6 +1619,8 @@ command_loop_1 ()
                    = window_display_table (XWINDOW (selected_window));
                  SET_PT (PT - 1);
                  lose = FETCH_CHAR (PT_BYTE);
+                 if (! NILP (Vpost_command_hook))
+                   goto directly_done;
                  adjust_point_for_property (last_point_position);
                  already_adjusted = 1;
                  if (PT == last_point_position - 1
@@ -1643,9 +1649,9 @@ command_loop_1 ()
                       && NATNUMP (last_command_char)
                       && CHAR_VALID_P (XFASTINT (last_command_char), 0))
                {
-                 unsigned int c =
-                   translate_char (Vtranslation_table_for_input,
-                                   XFASTINT (last_command_char), 0, 0, 0);
+                 unsigned int c
+                   translate_char (Vtranslation_table_for_input,
+                                     XFASTINT (last_command_char), 0, 0, 0);
                  int value;
                  if (NILP (Vexecuting_macro)
                      && !EQ (minibuf_window, selected_window))