From: Richard M. Stallman Date: Mon, 13 Jan 2003 08:20:09 +0000 (+0000) Subject: (command_loop_1): Don't redisplay directly if there's a post-command-hook. X-Git-Tag: ttn-vms-21-2-B4~11701 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d86ba5c511933cc55c0fd35614d95cea28e993f3;p=emacs.git (command_loop_1): Don't redisplay directly if there's a post-command-hook. --- diff --git a/src/keyboard.c b/src/keyboard.c index f4593bdfbdd..bde6ac354a2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -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))