aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-02-03 19:39:21 +0000
committerRichard M. Stallman1994-02-03 19:39:21 +0000
commit0736cafe0d5fbd2f432f3bae6eb73ef68e79109a (patch)
tree313436984afc23ffac243efb80c1ccd1d999bdae /src
parentc9a73a9be7a682286f74223990c9cb5622bd3b37 (diff)
downloademacs-0736cafe0d5fbd2f432f3bae6eb73ef68e79109a.tar.gz
emacs-0736cafe0d5fbd2f432f3bae6eb73ef68e79109a.zip
(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')
-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)
123record_first_change () 123record_first_change ()
124{ 124{
125 Lisp_Object high, low; 125 Lisp_Object high, low;
126
127 if (EQ (current_buffer->undo_list, Qt))
128 return;
129
130 if (current_buffer != XBUFFER (last_undo_buffer))
131 Fundo_boundary ();
132 XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
133
126 XFASTINT (high) = (current_buffer->modtime >> 16) & 0xffff; 134 XFASTINT (high) = (current_buffer->modtime >> 16) & 0xffff;
127 XFASTINT (low) = current_buffer->modtime & 0xffff; 135 XFASTINT (low) = current_buffer->modtime & 0xffff;
128 current_buffer->undo_list = Fcons (Fcons (Qt, Fcons (high, low)), current_buffer->undo_list); 136 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)
139 struct buffer *obuf = current_buffer; 147 struct buffer *obuf = current_buffer;
140 int boundary = 0; 148 int boundary = 0;
141 149
142 if (EQ (current_buffer->undo_list, Qt)) 150 if (EQ (XBUFFER (buffer)->undo_list, Qt))
143 return; 151 return;
144 152
145 if (!EQ (buffer, last_undo_buffer)) 153 if (!EQ (buffer, last_undo_buffer))