aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorRichard M. Stallman1993-03-15 06:03:33 +0000
committerRichard M. Stallman1993-03-15 06:03:33 +0000
commitbdbe6f28567c2bd4aa86bd171111821e597f11ea (patch)
tree749a9b5fc0145078c458e6f6551ef1f66ce73822 /src/undo.c
parentcdaa87fd065ddd2431ce9ff21c5b9de4f4b6419b (diff)
downloademacs-bdbe6f28567c2bd4aa86bd171111821e597f11ea.tar.gz
emacs-bdbe6f28567c2bd4aa86bd171111821e597f11ea.zip
(record_property_change, record_delete, record_insert):
Don't make boundary or touch last_undo_buffer if cur buf has no undo.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/undo.c b/src/undo.c
index d004410a71e..c8ba54580cb 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -36,12 +36,13 @@ record_insert (beg, length)
36{ 36{
37 Lisp_Object lbeg, lend; 37 Lisp_Object lbeg, lend;
38 38
39 if (EQ (current_buffer->undo_list, Qt))
40 return;
41
39 if (current_buffer != XBUFFER (last_undo_buffer)) 42 if (current_buffer != XBUFFER (last_undo_buffer))
40 Fundo_boundary (); 43 Fundo_boundary ();
41 XSET (last_undo_buffer, Lisp_Buffer, current_buffer); 44 XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
42 45
43 if (EQ (current_buffer->undo_list, Qt))
44 return;
45 if (MODIFF <= current_buffer->save_modified) 46 if (MODIFF <= current_buffer->save_modified)
46 record_first_change (); 47 record_first_change ();
47 48
@@ -75,12 +76,13 @@ record_delete (beg, length)
75{ 76{
76 Lisp_Object lbeg, lend, sbeg; 77 Lisp_Object lbeg, lend, sbeg;
77 78
79 if (EQ (current_buffer->undo_list, Qt))
80 return;
81
78 if (current_buffer != XBUFFER (last_undo_buffer)) 82 if (current_buffer != XBUFFER (last_undo_buffer))
79 Fundo_boundary (); 83 Fundo_boundary ();
80 XSET (last_undo_buffer, Lisp_Buffer, current_buffer); 84 XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
81 85
82 if (EQ (current_buffer->undo_list, Qt))
83 return;
84 if (MODIFF <= current_buffer->save_modified) 86 if (MODIFF <= current_buffer->save_modified)
85 record_first_change (); 87 record_first_change ();
86 88
@@ -135,13 +137,13 @@ record_property_change (beg, length, prop, value, buffer)
135 struct buffer *obuf = current_buffer; 137 struct buffer *obuf = current_buffer;
136 int boundary = 0; 138 int boundary = 0;
137 139
140 if (EQ (current_buffer->undo_list, Qt))
141 return;
142
138 if (!EQ (buffer, last_undo_buffer)) 143 if (!EQ (buffer, last_undo_buffer))
139 boundary = 1; 144 boundary = 1;
140 last_undo_buffer = buffer; 145 last_undo_buffer = buffer;
141 146
142 if (EQ (current_buffer->undo_list, Qt))
143 return;
144
145 /* Switch temporarily to the buffer that was changed. */ 147 /* Switch temporarily to the buffer that was changed. */
146 current_buffer = XBUFFER (buffer); 148 current_buffer = XBUFFER (buffer);
147 149