[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109161: * buffer.h (FOR_EACH_BUFFER)
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109161: * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'. |
Date: |
Thu, 19 Jul 2012 15:35:58 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109161
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2012-07-19 15:35:58 -0700
message:
* buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
(FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
'for_each_per_buffer_object_at'.
All uses changed. It's better to use upper-case for macros that
cannot be implemented as functions, to give the reader a clue
that they're special.
modified:
src/ChangeLog
src/alloc.c
src/buffer.c
src/buffer.h
src/data.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-19 11:39:38 +0000
+++ b/src/ChangeLog 2012-07-19 22:35:58 +0000
@@ -1,3 +1,12 @@
+2012-07-19 Paul Eggert <address@hidden>
+
+ * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
+ (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
+ 'for_each_per_buffer_object_at'.
+ All uses changed. It's better to use upper-case for macros that
+ cannot be implemented as functions, to give the reader a clue
+ that they're special.
+
2012-07-19 Stefan Monnier <address@hidden>
* alloc.c (Fgarbage_collect): Tweak docstring.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2012-07-19 11:39:38 +0000
+++ b/src/alloc.c 2012-07-19 22:35:58 +0000
@@ -5412,7 +5412,7 @@
/* Don't keep undo information around forever.
Do this early on, so it is no problem if the user quits. */
- for_each_buffer (nextb)
+ FOR_EACH_BUFFER (nextb)
compact_buffer (nextb);
t1 = current_emacs_time ();
@@ -5527,7 +5527,7 @@
Look thru every buffer's undo list
for elements that update markers that were not marked,
and delete them. */
- for_each_buffer (nextb)
+ FOR_EACH_BUFFER (nextb)
{
/* If a buffer's undo list is Qt, that means that undo is
turned off in that buffer. Calling truncate_undo_list on
@@ -5955,7 +5955,7 @@
if (po != &buffer_defaults && po != &buffer_local_symbols)
{
struct buffer *b;
- for_each_buffer (b)
+ FOR_EACH_BUFFER (b)
if (b == po)
break;
if (b == NULL)
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2012-07-19 08:56:53 +0000
+++ b/src/buffer.c 2012-07-19 22:35:58 +0000
@@ -460,7 +460,7 @@
{
int offset;
- for_each_per_buffer_object_at (offset)
+ FOR_EACH_PER_BUFFER_OBJECT_AT (offset)
{
Lisp_Object obj;
@@ -612,7 +612,7 @@
eassert (NILP (BVAR (b->base_buffer, begv_marker)));
eassert (NILP (BVAR (b->base_buffer, zv_marker)));
- BVAR (b->base_buffer, pt_marker)
+ BVAR (b->base_buffer, pt_marker)
= build_marker (b->base_buffer, b->base_buffer->pt,
b->base_buffer->pt_byte);
BVAR (b->base_buffer, begv_marker)
@@ -817,7 +817,7 @@
SET_PER_BUFFER_VALUE_P (b, i, 0);
/* For each slot that has a default value, copy that into the slot. */
- for_each_per_buffer_object_at (offset)
+ FOR_EACH_PER_BUFFER_OBJECT_AT (offset)
{
int idx = PER_BUFFER_IDX (offset);
if ((idx > 0
@@ -862,7 +862,7 @@
{
/* Note fileio.c:make_temp_name does random differently. */
tem2 = concat2 (name, make_formatted_string
- (number, "-%"pI"d",
+ (number, "-%"pI"d",
XFASTINT (Frandom (make_number (999999)))));
tem = Fget_buffer (tem2);
if (NILP (tem))
@@ -1072,7 +1072,7 @@
{
int offset, idx;
- for_each_per_buffer_object_at (offset)
+ FOR_EACH_PER_BUFFER_OBJECT_AT (offset)
{
idx = PER_BUFFER_IDX (offset);
if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
@@ -1577,7 +1577,7 @@
GCPRO1 (buffer);
- for_each_buffer (other)
+ FOR_EACH_BUFFER (other)
if (other->base_buffer == b)
{
Lisp_Object buf;
@@ -2095,7 +2095,7 @@
{ /* This is probably harder to make work. */
struct buffer *other;
- for_each_buffer (other)
+ FOR_EACH_BUFFER (other)
if (other->base_buffer == other_buffer
|| other->base_buffer == current_buffer)
error ("One of the buffers to swap has indirect buffers");
@@ -2472,7 +2472,7 @@
/* Copy this buffer's new multibyte status
into all of its indirect buffers. */
- for_each_buffer (other)
+ FOR_EACH_BUFFER (other)
if (other->base_buffer == current_buffer && !NILP (BVAR (other, name)))
{
BVAR (other, enable_multibyte_characters)
@@ -5078,7 +5078,7 @@
Map new memory. */
struct buffer *b;
- for_each_buffer (b)
+ FOR_EACH_BUFFER (b)
if (b->text->beg == NULL)
enlarge_buffer_text (b, 0);
}
=== modified file 'src/buffer.h'
--- a/src/buffer.h 2012-07-19 08:56:53 +0000
+++ b/src/buffer.h 2012-07-19 22:35:58 +0000
@@ -866,7 +866,7 @@
/* Used to iterate over the chain above. */
-#define for_each_buffer(b) \
+#define FOR_EACH_BUFFER(b) \
for ((b) = all_buffers; (b); (b) = (b)->header.next.buffer)
/* This points to the current buffer. */
@@ -1021,7 +1021,7 @@
Lisp_Objects except undo_list). If you add, remove, or reorder
Lisp_Objects in a struct buffer, make sure that this is still correct. */
-#define for_each_per_buffer_object_at(offset) \
+#define FOR_EACH_PER_BUFFER_OBJECT_AT(offset) \
for (offset = PER_BUFFER_VAR_OFFSET (name); \
offset <= PER_BUFFER_VAR_OFFSET (cursor_in_non_selected_windows); \
offset += sizeof (Lisp_Object))
=== modified file 'src/data.c'
--- a/src/data.c 2012-07-19 03:55:59 +0000
+++ b/src/data.c 2012-07-19 22:35:58 +0000
@@ -1401,7 +1401,7 @@
{
struct buffer *b;
- for_each_buffer (b)
+ FOR_EACH_BUFFER (b)
if (!PER_BUFFER_VALUE_P (b, idx))
PER_BUFFER_VALUE (b, offset) = value;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109161: * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.,
Paul Eggert <=