summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-03-15 06:03:33 +0000
committerRichard M. Stallman <rms@gnu.org>1993-03-15 06:03:33 +0000
commitfdf15a96ce6f9cce88fea1508762054b3bf6f202 (patch)
treec7a4f4a57cd8fcfd293800f8c061a0427815b383 /src/undo.c
parent4e03165f8bf6c4a24a4b1d7ade5a29db7fc67715 (diff)
downloademacs-fdf15a96ce6f9cce88fea1508762054b3bf6f202.tar.gz
(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)
{
Lisp_Object lbeg, lend;
+ 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);
- if (EQ (current_buffer->undo_list, Qt))
- return;
if (MODIFF <= current_buffer->save_modified)
record_first_change ();
@@ -75,12 +76,13 @@ record_delete (beg, length)
{
Lisp_Object lbeg, lend, sbeg;
+ 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);
- if (EQ (current_buffer->undo_list, Qt))
- return;
if (MODIFF <= current_buffer->save_modified)
record_first_change ();
@@ -135,13 +137,13 @@ record_property_change (beg, length, prop, value, buffer)
struct buffer *obuf = current_buffer;
int boundary = 0;
+ if (EQ (current_buffer->undo_list, Qt))
+ return;
+
if (!EQ (buffer, last_undo_buffer))
boundary = 1;
last_undo_buffer = buffer;
- if (EQ (current_buffer->undo_list, Qt))
- return;
-
/* Switch temporarily to the buffer that was changed. */
current_buffer = XBUFFER (buffer);