[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111316: * buffer.h (BUF_COMPACT): Ne
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111316: * buffer.h (BUF_COMPACT): New macro to follow the common style. |
Date: |
Mon, 24 Dec 2012 15:41:28 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111316
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-12-24 15:41:28 +0400
message:
* buffer.h (BUF_COMPACT): New macro to follow the common style.
* buffer.c (Fget_buffer_create): Use it to set compact field of
struct buffer_text to avoid accessing an uninitialized value
when compact_buffer is called for the first time.
(compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
modified:
src/ChangeLog
src/buffer.c
src/buffer.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-12-23 17:16:33 +0000
+++ b/src/ChangeLog 2012-12-24 11:41:28 +0000
@@ -1,3 +1,11 @@
+2012-12-24 Dmitry Antipov <address@hidden>
+
+ * buffer.h (BUF_COMPACT): New macro to follow the common style.
+ * buffer.c (Fget_buffer_create): Use it to set compact field of
+ struct buffer_text to avoid accessing an uninitialized value
+ when compact_buffer is called for the first time.
+ (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
+
2012-12-23 Eli Zaretskii <address@hidden>
* w32.c (acl_set_file): If setting the file security descriptor
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2012-12-21 19:32:43 +0000
+++ b/src/buffer.c 2012-12-24 11:41:28 +0000
@@ -575,6 +575,7 @@
BUF_CHARS_MODIFF (b) = 1;
BUF_OVERLAY_MODIFF (b) = 1;
BUF_SAVE_MODIFF (b) = 1;
+ BUF_COMPACT (b) = 1;
set_buffer_intervals (b, NULL);
BUF_UNCHANGED_MODIFIED (b) = 1;
BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1;
@@ -1669,7 +1670,7 @@
which aren't changed since last compaction. */
if (BUFFER_LIVE_P (buffer)
&& (buffer->base_buffer == NULL)
- && (buffer->text->compact != buffer->text->modiff))
+ && (BUF_COMPACT (buffer) != BUF_MODIFF (buffer)))
{
/* If a buffer's undo list is Qt, that means that undo is
turned off in that buffer. Calling truncate_undo_list on
@@ -1694,7 +1695,7 @@
current_buffer = save_current;
}
}
- buffer->text->compact = buffer->text->modiff;
+ BUF_COMPACT (buffer) = BUF_MODIFF (buffer);
}
}
=== modified file 'src/buffer.h'
--- a/src/buffer.h 2012-12-10 17:34:47 +0000
+++ b/src/buffer.h 2012-12-24 11:41:28 +0000
@@ -193,6 +193,9 @@
/* FIXME: should we move this into ->text->auto_save_modiff? */
#define BUF_AUTOSAVE_MODIFF(buf) ((buf)->auto_save_modified)
+/* Compaction count. */
+#define BUF_COMPACT(buf) ((buf)->text->compact)
+
/* Marker chain of buffer. */
#define BUF_MARKERS(buf) ((buf)->text->markers)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111316: * buffer.h (BUF_COMPACT): New macro to follow the common style.,
Dmitry Antipov <=