summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-03-24 05:41:38 +0000
committerKenichi Handa <handa@m17n.org>1998-03-24 05:41:38 +0000
commitcbc1b668f313eac593d1de971d9c425629a41e28 (patch)
treedb7587705cd190124bdf4ea5d69ece7b5f502a85 /src/undo.c
parent80e79e3e7ce845090eaa7ad7b632f35ed14422d4 (diff)
downloademacs-cbc1b668f313eac593d1de971d9c425629a41e28.tar.gz
emacs-cbc1b668f313eac593d1de971d9c425629a41e28.tar.bz2
emacs-cbc1b668f313eac593d1de971d9c425629a41e28.zip
(record_delete): Record last_point_position when there's
no record other than marker adjustment before undo boundary.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/undo.c b/src/undo.c
index af57c4352b1..ceaf3b421d2 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -105,8 +105,24 @@ record_delete (beg, string)
Fundo_boundary ();
XSETBUFFER (last_undo_buffer, current_buffer);
- at_boundary = (CONSP (current_buffer->undo_list)
- && NILP (XCONS (current_buffer->undo_list)->car));
+ if (CONSP (current_buffer->undo_list))
+ {
+ /* Set AT_BOUNDARY to 1 only when we have nothing other than
+ marker adjustment before undo boundary. */
+
+ Lisp_Object tail = current_buffer->undo_list, elt;
+
+ while (1)
+ {
+ elt = XCONS (tail)->car;
+ if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car)))
+ break;
+ tail = XCONS (tail)->cdr;
+ }
+ at_boundary = NILP (elt);
+ }
+ else
+ at_boundary = 0;
if (MODIFF <= SAVE_MODIFF)
record_first_change ();