aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorStefan Monnier2012-07-18 09:20:59 -0400
committerStefan Monnier2012-07-18 09:20:59 -0400
commit464d5a5e1f95378b8fef2b70dd6aee4486a352da (patch)
treec530fadef545533b1f04c8c121cf51e39446f69b /src/cmds.c
parenta4acb88d3582144556a668c6cc35082e4d6a82f1 (diff)
downloademacs-464d5a5e1f95378b8fef2b70dd6aee4486a352da.tar.gz
emacs-464d5a5e1f95378b8fef2b70dd6aee4486a352da.zip
* src/lisp.h (last_undo_boundary): Declare new var.
* src/keyboard.c (command_loop_1): Set it. * src/cmds.c (Fself_insert_command): Use it to only remove boundaries that were auto-added by the command loop. Fixes: debbugs:11774
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmds.c b/src/cmds.c
index d617c7f81d9..a7a2eb6f528 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -296,7 +296,10 @@ At the end, it runs `post-self-insert-hook'. */)
296 296
297 if (remove_boundary 297 if (remove_boundary
298 && CONSP (BVAR (current_buffer, undo_list)) 298 && CONSP (BVAR (current_buffer, undo_list))
299 && NILP (XCAR (BVAR (current_buffer, undo_list)))) 299 && NILP (XCAR (BVAR (current_buffer, undo_list)))
300 /* Only remove auto-added boundaries, not boundaries
301 added be explicit calls to undo-boundary. */
302 && EQ (BVAR (current_buffer, undo_list), last_undo_boundary))
300 /* Remove the undo_boundary that was just pushed. */ 303 /* Remove the undo_boundary that was just pushed. */
301 BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list)); 304 BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list));
302 305