diff options
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 5f8667586c4..1f08e1f23ed 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1278,9 +1278,6 @@ static int read_key_sequence (Lisp_Object *, int, Lisp_Object, bool, bool, bool, bool); static void adjust_point_for_property (ptrdiff_t, bool); -/* The last boundary auto-added to buffer-undo-list. */ -Lisp_Object last_undo_boundary; - /* FIXME: This is wrong rather than test window-system, we should call a new set-selection, which will then dispatch to x-set-selection, or tty-set-selection, or w32-set-selection, ... */ @@ -1505,14 +1502,10 @@ command_loop_1 (void) } #endif - if (NILP (KVAR (current_kboard, Vprefix_arg))) /* FIXME: Why? --Stef */ - { - Lisp_Object undo = BVAR (current_buffer, undo_list); - Fundo_boundary (); - last_undo_boundary - = (EQ (undo, BVAR (current_buffer, undo_list)) - ? Qnil : BVAR (current_buffer, undo_list)); - } + /* Ensure that we have added appropriate undo-boundaries as a + result of changes from the last command. */ + call0 (Qundo_auto__add_boundary); + call1 (Qcommand_execute, Vthis_command); #ifdef HAVE_WINDOW_SYSTEM @@ -11095,6 +11088,8 @@ syms_of_keyboard (void) DEFSYM (Qpre_command_hook, "pre-command-hook"); DEFSYM (Qpost_command_hook, "post-command-hook"); + DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary"); + DEFSYM (Qdeferred_action_function, "deferred-action-function"); DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); DEFSYM (Qfunction_key, "function-key"); |
