X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d99fb284f7ccb502ce12d7bd96350d0e2d3af1b4..c644523bd8a23e518c91b61a1b8520e866b715b9:/src/cmds.c
diff --git a/src/cmds.c b/src/cmds.c
index 3d43c2447a..c06a9edd16 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,6 +1,6 @@
/* Simple built-in editing commands.
-Copyright (C) 1985, 1993-1998, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1998, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -22,8 +22,8 @@ along with GNU Emacs. If not, see . */
#include
#include "lisp.h"
#include "commands.h"
-#include "buffer.h"
#include "character.h"
+#include "buffer.h"
#include "syntax.h"
#include "window.h"
#include "keyboard.h"
@@ -296,7 +296,10 @@ At the end, it runs `post-self-insert-hook'. */)
if (remove_boundary
&& CONSP (BVAR (current_buffer, undo_list))
- && NILP (XCAR (BVAR (current_buffer, undo_list))))
+ && NILP (XCAR (BVAR (current_buffer, undo_list)))
+ /* Only remove auto-added boundaries, not boundaries
+ added be explicit calls to undo-boundary. */
+ && EQ (BVAR (current_buffer, undo_list), last_undo_boundary))
/* Remove the undo_boundary that was just pushed. */
BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list));
@@ -443,7 +446,8 @@ internal_self_insert (int c, EMACS_INT n)
/* If we expanded an abbrev which has a hook,
and the hook has a non-nil `no-self-insert' property,
return right away--don't really self-insert. */
- if (SYMBOLP (sym) && ! NILP (sym) && ! NILP (XSYMBOL (sym)->function)
+ if (SYMBOLP (sym) && ! NILP (sym)
+ && ! NILP (XSYMBOL (sym)->function)
&& SYMBOLP (XSYMBOL (sym)->function))
{
Lisp_Object prop;