summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-02-03 19:39:21 +0000
committerRichard M. Stallman <rms@gnu.org>1994-02-03 19:39:21 +0000
commitc1eea555a6899a21bc0db74043fa0ebd5b1d7e41 (patch)
treeaae78dc1ea85835903a15eb034e002391a4ddc3b /src/undo.c
parent26bd37721755ba731483d9329396ca455f9dfabf (diff)
downloademacs-c1eea555a6899a21bc0db74043fa0ebd5b1d7e41.tar.gz
(record_first_change): Check for buffer-undo-list = t.
Make an undo boundary if appropriate. Set last_undo_buffer. (record_property_change): Use BUFFER, not current_buffer, when testing undo_list.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c
index 3d71516e2be..a0e9f84f7c9 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -123,6 +123,14 @@ record_change (beg, length)
record_first_change ()
{
Lisp_Object high, low;
+
+ if (EQ (current_buffer->undo_list, Qt))
+ return;
+
+ if (current_buffer != XBUFFER (last_undo_buffer))
+ Fundo_boundary ();
+ XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
+
XFASTINT (high) = (current_buffer->modtime >> 16) & 0xffff;
XFASTINT (low) = current_buffer->modtime & 0xffff;
current_buffer->undo_list = Fcons (Fcons (Qt, Fcons (high, low)), current_buffer->undo_list);
@@ -139,7 +147,7 @@ record_property_change (beg, length, prop, value, buffer)
struct buffer *obuf = current_buffer;
int boundary = 0;
- if (EQ (current_buffer->undo_list, Qt))
+ if (EQ (XBUFFER (buffer)->undo_list, Qt))
return;
if (!EQ (buffer, last_undo_buffer))