emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109578: Use BSET for write access to


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109578: Use BSET for write access to Lisp_Object members of struct buffer.
Date: Mon, 13 Aug 2012 07:39:07 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109578
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-13 07:39:07 +0400
message:
  Use BSET for write access to Lisp_Object members of struct buffer.
  * buffer.h (BSET): New macro.
  * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
  * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
  * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
  * window.c, xdisp.c, xfns.c: Adjust users.
modified:
  src/ChangeLog
  src/buffer.c
  src/buffer.h
  src/casetab.c
  src/cmds.c
  src/coding.c
  src/data.c
  src/editfns.c
  src/fileio.c
  src/frame.c
  src/indent.c
  src/insdel.c
  src/intervals.c
  src/keymap.c
  src/minibuf.c
  src/print.c
  src/process.c
  src/syntax.c
  src/undo.c
  src/w32fns.c
  src/window.c
  src/xdisp.c
  src/xfns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-11 15:34:01 +0000
+++ b/src/ChangeLog     2012-08-13 03:39:07 +0000
@@ -1,3 +1,12 @@
+2012-08-13  Dmitry Antipov  <address@hidden>
+
+       Use BSET for write access to Lisp_Object members of struct buffer.
+       * buffer.h (BSET): New macro.
+       * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
+       * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
+       * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
+       * window.c, xdisp.c, xfns.c: Adjust users.
+
 2012-08-11  BT Templeton  <address@hidden>  (tiny change)
 
        * lread.c (syms_of_lread): Initialize Vlexical_binding.

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2012-08-08 14:47:11 +0000
+++ b/src/buffer.c      2012-08-13 03:39:07 +0000
@@ -370,7 +370,7 @@
 
   b->newline_cache = 0;
   b->width_run_cache = 0;
-  BVAR (b, width_table) = Qnil;
+  BSET (b, width_table, Qnil);
   b->prevent_redisplay_optimizations_p = 1;
 
   /* Put this on the chain of all buffers including killed ones.  */
@@ -379,20 +379,20 @@
 
   /* An ordinary buffer normally doesn't need markers
      to handle BEGV and ZV.  */
-  BVAR (b, pt_marker) = Qnil;
-  BVAR (b, begv_marker) = Qnil;
-  BVAR (b, zv_marker) = Qnil;
+  BSET (b, pt_marker, Qnil);
+  BSET (b, begv_marker, Qnil);
+  BSET (b, zv_marker, Qnil);
 
   name = Fcopy_sequence (buffer_or_name);
   string_set_intervals (name, NULL);
-  BVAR (b, name) = name;
+  BSET (b, name, name);
 
-  BVAR (b, undo_list) = (SREF (name, 0) != ' ') ? Qnil : Qt;
+  BSET (b, undo_list, (SREF (name, 0) != ' ') ? Qnil : Qt);
 
   reset_buffer (b);
   reset_buffer_local_variables (b, 1);
 
-  BVAR (b, mark) = Fmake_marker ();
+  BSET (b, mark, Fmake_marker ());
   BUF_MARKERS (b) = NULL;
 
   /* Put this in the alist of all live buffers.  */
@@ -481,7 +481,7 @@
 
   /* Get (a copy of) the alist of Lisp-level local variables of FROM
      and install that in TO.  */
-  BVAR (to, local_var_alist) = buffer_lisp_local_variables (from, 1);
+  BSET (to, local_var_alist, buffer_lisp_local_variables (from, 1));
 }
 
 
@@ -584,7 +584,7 @@
 
   b->newline_cache = 0;
   b->width_run_cache = 0;
-  BVAR (b, width_table) = Qnil;
+  BSET (b, width_table, Qnil);
 
   /* Put this on the chain of all buffers including killed ones.  */
   b->header.next.buffer = all_buffers;
@@ -592,7 +592,7 @@
 
   name = Fcopy_sequence (name);
   string_set_intervals (name, NULL);
-  BVAR (b, name) = name;
+  BSET (b, name, name);
 
   reset_buffer (b);
   reset_buffer_local_variables (b, 1);
@@ -601,10 +601,10 @@
   XSETBUFFER (buf, b);
   Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil));
 
-  BVAR (b, mark) = Fmake_marker ();
+  BSET (b, mark, Fmake_marker ());
 
   /* The multibyte status belongs to the base buffer.  */
-  BVAR (b, enable_multibyte_characters) = BVAR (b->base_buffer, 
enable_multibyte_characters);
+  BSET (b, enable_multibyte_characters, BVAR (b->base_buffer, 
enable_multibyte_characters));
 
   /* Make sure the base buffer has markers for its narrowing.  */
   if (NILP (BVAR (b->base_buffer, pt_marker)))
@@ -612,14 +612,14 @@
       eassert (NILP (BVAR (b->base_buffer, begv_marker)));
       eassert (NILP (BVAR (b->base_buffer, zv_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)
-       = build_marker (b->base_buffer, b->base_buffer->begv, 
b->base_buffer->begv_byte);
-
-      BVAR (b->base_buffer, zv_marker)
-       = build_marker (b->base_buffer, b->base_buffer->zv, 
b->base_buffer->zv_byte);
+      BSET (b->base_buffer, pt_marker,
+           build_marker (b->base_buffer, b->base_buffer->pt, 
b->base_buffer->pt_byte));
+
+      BSET (b->base_buffer, begv_marker,
+           build_marker (b->base_buffer, b->base_buffer->begv, 
b->base_buffer->begv_byte));
+
+      BSET (b->base_buffer, zv_marker,
+           build_marker (b->base_buffer, b->base_buffer->zv, 
b->base_buffer->zv_byte));
 
       XMARKER (BVAR (b->base_buffer, zv_marker))->insertion_type = 1;
     }
@@ -627,9 +627,9 @@
   if (NILP (clone))
     {
       /* Give the indirect buffer markers for its narrowing.  */
-      BVAR (b, pt_marker) = build_marker (b, b->pt, b->pt_byte);
-      BVAR (b, begv_marker) = build_marker (b, b->begv, b->begv_byte);
-      BVAR (b, zv_marker) = build_marker (b, b->zv, b->zv_byte);
+      BSET (b, pt_marker, build_marker (b, b->pt, b->pt_byte));
+      BSET (b, begv_marker, build_marker (b, b->begv, b->begv_byte));
+      BSET (b, zv_marker, build_marker (b, b->zv, b->zv_byte));
       XMARKER (BVAR (b, zv_marker))->insertion_type = 1;
     }
   else
@@ -637,11 +637,11 @@
       struct buffer *old_b = current_buffer;
 
       clone_per_buffer_values (b->base_buffer, b);
-      BVAR (b, filename) = Qnil;
-      BVAR (b, file_truename) = Qnil;
-      BVAR (b, display_count) = make_number (0);
-      BVAR (b, backed_up) = Qnil;
-      BVAR (b, auto_save_file_name) = Qnil;
+      BSET (b, filename, Qnil);
+      BSET (b, file_truename, Qnil);
+      BSET (b, display_count, make_number (0));
+      BSET (b, backed_up, Qnil);
+      BSET (b, auto_save_file_name, Qnil);
       set_buffer_internal_1 (b);
       Fset (intern ("buffer-save-without-query"), Qnil);
       Fset (intern ("buffer-file-number"), Qnil);
@@ -704,9 +704,10 @@
 void
 reset_buffer (register struct buffer *b)
 {
-  BVAR (b, filename) = Qnil;
-  BVAR (b, file_truename) = Qnil;
-  BVAR (b, directory) = (current_buffer) ? BVAR (current_buffer, directory) : 
Qnil;
+  BSET (b, filename, Qnil);
+  BSET (b, file_truename, Qnil);
+  BSET (b, directory,
+       (current_buffer) ? BVAR (current_buffer, directory) : Qnil);
   b->modtime = make_emacs_time (0, UNKNOWN_MODTIME_NSECS);
   b->modtime_size = -1;
   XSETFASTINT (BVAR (b, save_length), 0);
@@ -714,24 +715,25 @@
   /* It is more conservative to start out "changed" than "unchanged".  */
   b->clip_changed = 0;
   b->prevent_redisplay_optimizations_p = 1;
-  BVAR (b, backed_up) = Qnil;
+  BSET (b, backed_up, Qnil);
   BUF_AUTOSAVE_MODIFF (b) = 0;
   b->auto_save_failure_time = 0;
-  BVAR (b, auto_save_file_name) = Qnil;
-  BVAR (b, read_only) = Qnil;
+  BSET (b, auto_save_file_name, Qnil);
+  BSET (b, read_only, Qnil);
   buffer_set_overlays (b, NULL, OV_BEFORE);
   buffer_set_overlays (b, NULL, OV_AFTER);
   b->overlay_center = BEG;
-  BVAR (b, mark_active) = Qnil;
-  BVAR (b, point_before_scroll) = Qnil;
-  BVAR (b, file_format) = Qnil;
-  BVAR (b, auto_save_file_format) = Qt;
-  BVAR (b, last_selected_window) = Qnil;
-  XSETINT (BVAR (b, display_count), 0);
-  BVAR (b, display_time) = Qnil;
-  BVAR (b, enable_multibyte_characters) = BVAR (&buffer_defaults, 
enable_multibyte_characters);
-  BVAR (b, cursor_type) = BVAR (&buffer_defaults, cursor_type);
-  BVAR (b, extra_line_spacing) = BVAR (&buffer_defaults, extra_line_spacing);
+  BSET (b, mark_active, Qnil);
+  BSET (b, point_before_scroll, Qnil);
+  BSET (b, file_format, Qnil);
+  BSET (b, auto_save_file_format, Qt);
+  BSET (b, last_selected_window, Qnil);
+  BSET (b, display_count, make_number (0));
+  BSET (b, display_time, Qnil);
+  BSET (b, enable_multibyte_characters,
+       BVAR (&buffer_defaults, enable_multibyte_characters));
+  BSET (b, cursor_type, BVAR (&buffer_defaults, cursor_type));
+  BSET (b, extra_line_spacing, BVAR (&buffer_defaults, extra_line_spacing));
 
   b->display_error_modiff = 0;
 }
@@ -755,10 +757,10 @@
      things that depend on the major mode.
      default-major-mode is handled at a higher level.
      We ignore it here.  */
-  BVAR (b, major_mode) = Qfundamental_mode;
-  BVAR (b, keymap) = Qnil;
-  BVAR (b, mode_name) = QSFundamental;
-  BVAR (b, minor_modes) = Qnil;
+  BSET (b, major_mode, Qfundamental_mode);
+  BSET (b, keymap, Qnil);
+  BSET (b, mode_name, QSFundamental);
+  BSET (b, minor_modes, Qnil);
 
   /* If the standard case table has been altered and invalidated,
      fix up its insides first.  */
@@ -767,15 +769,15 @@
         && CHAR_TABLE_P (XCHAR_TABLE (Vascii_downcase_table)->extras[2])))
     Fset_standard_case_table (Vascii_downcase_table);
 
-  BVAR (b, downcase_table) = Vascii_downcase_table;
-  BVAR (b, upcase_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[0];
-  BVAR (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1];
-  BVAR (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2];
-  BVAR (b, invisibility_spec) = Qt;
+  BSET (b, downcase_table, Vascii_downcase_table);
+  BSET (b, upcase_table, XCHAR_TABLE (Vascii_downcase_table)->extras[0]);
+  BSET (b, case_canon_table, XCHAR_TABLE (Vascii_downcase_table)->extras[1]);
+  BSET (b, case_eqv_table, XCHAR_TABLE (Vascii_downcase_table)->extras[2]);
+  BSET (b, invisibility_spec, Qt);
 
   /* Reset all (or most) per-buffer variables to their defaults.  */
   if (permanent_too)
-    BVAR (b, local_var_alist) = Qnil;
+    BSET (b, local_var_alist, Qnil);
   else
     {
       Lisp_Object tmp, prop, last = Qnil;
@@ -809,7 +811,7 @@
          }
        /* Delete this local variable.  */
        else if (NILP (last))
-         BVAR (b, local_var_alist) = XCDR (tmp);
+         BSET (b, local_var_alist, XCDR (tmp));
        else
          XSETCDR (last, XCDR (tmp));
     }
@@ -1286,7 +1288,7 @@
        error ("Buffer name `%s' is in use", SDATA (newname));
     }
 
-  BVAR (current_buffer, name) = newname;
+  BSET (current_buffer, name, newname);
 
   /* Catch redisplay's attention.  Unless we do this, the mode lines for
      any windows displaying current_buffer will stay unchanged.  */
@@ -1431,7 +1433,7 @@
     }
 
   if (EQ (BVAR (XBUFFER (real_buffer), undo_list), Qt))
-    BVAR (XBUFFER (real_buffer), undo_list) = Qnil;
+    BSET (XBUFFER (real_buffer), undo_list, Qnil);
 
   return Qnil;
 }
@@ -1703,7 +1705,7 @@
   swap_out_buffer_local_variables (b);
   reset_buffer_local_variables (b, 1);
 
-  BVAR (b, name) = Qnil;
+  BSET (b, name, Qnil);
 
   BLOCK_INPUT;
   if (b->base_buffer)
@@ -1727,9 +1729,9 @@
       free_region_cache (b->width_run_cache);
       b->width_run_cache = 0;
     }
-  BVAR (b, width_table) = Qnil;
+  BSET (b, width_table, Qnil);
   UNBLOCK_INPUT;
-  BVAR (b, undo_list) = Qnil;
+  BSET (b, undo_list, Qnil);
 
   /* Run buffer-list-update-hook.  */
   if (!NILP (Vrun_hooks))
@@ -1910,7 +1912,7 @@
       /* Put the undo list back in the base buffer, so that it appears
         that an indirect buffer shares the undo list of its base.  */
       if (old_buf->base_buffer)
-       BVAR (old_buf->base_buffer, undo_list) = BVAR (old_buf, undo_list);
+       BSET (old_buf->base_buffer, undo_list, BVAR (old_buf, undo_list));
 
       /* If the old current buffer has markers to record PT, BEGV and ZV
         when it is not current, update them now.  */
@@ -1920,7 +1922,7 @@
   /* Get the undo list from the base buffer, so that it appears
      that an indirect buffer shares the undo list of its base.  */
   if (b->base_buffer)
-    BVAR (b, undo_list) = BVAR (b->base_buffer, undo_list);
+    BSET (b, undo_list, BVAR (b->base_buffer, undo_list));
 
   /* If the new current buffer has markers to record PT, BEGV and ZV
      when it is not current, fetch them now.  */
@@ -2118,8 +2120,8 @@
 #define swapfield_(field, type) \
   do {                                                 \
     type tmp##field = BVAR (other_buffer, field);              \
-    BVAR (other_buffer, field) = BVAR (current_buffer, field); \
-    BVAR (current_buffer, field) = tmp##field;                 \
+    BSET (other_buffer, field, BVAR (current_buffer, field));  \
+    BSET (current_buffer, field, tmp##field);                  \
   } while (0)
 
   swapfield (own_text, struct buffer_text);
@@ -2159,8 +2161,8 @@
   swapfield_ (pt_marker, Lisp_Object);
   swapfield_ (begv_marker, Lisp_Object);
   swapfield_ (zv_marker, Lisp_Object);
-  BVAR (current_buffer, point_before_scroll) = Qnil;
-  BVAR (other_buffer, point_before_scroll) = Qnil;
+  BSET (current_buffer, point_before_scroll, Qnil);
+  BSET (other_buffer, point_before_scroll, Qnil);
 
   current_buffer->text->modiff++;        other_buffer->text->modiff++;
   current_buffer->text->chars_modiff++;          
other_buffer->text->chars_modiff++;
@@ -2249,7 +2251,7 @@
 
   /* Don't record these buffer changes.  We will put a special undo entry
      instead.  */
-  BVAR (current_buffer, undo_list) = Qt;
+  BSET (current_buffer, undo_list, Qt);
 
   /* If the cached position is for this buffer, clear it out.  */
   clear_charpos_cache (current_buffer);
@@ -2271,7 +2273,7 @@
         to calculate the old correspondences.  */
       set_intervals_multibyte (0);
 
-      BVAR (current_buffer, enable_multibyte_characters) = Qnil;
+      BSET (current_buffer, enable_multibyte_characters, Qnil);
 
       Z = Z_BYTE;
       BEGV = BEGV_BYTE;
@@ -2409,7 +2411,7 @@
 
       /* Do this first, so that chars_in_text asks the right question.
         set_intervals_multibyte needs it too.  */
-      BVAR (current_buffer, enable_multibyte_characters) = Qt;
+      BSET (current_buffer, enable_multibyte_characters, Qt);
 
       GPT_BYTE = advance_to_char_boundary (GPT_BYTE);
       GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG;
@@ -2467,10 +2469,11 @@
   if (!EQ (old_undo, Qt))
     {
       /* Represent all the above changes by a special undo entry.  */
-      BVAR (current_buffer, undo_list) = Fcons (list3 (Qapply,
-                                               intern ("set-buffer-multibyte"),
-                                               NILP (flag) ? Qt : Qnil),
-                                        old_undo);
+      BSET (current_buffer, undo_list,
+           Fcons (list3 (Qapply,
+                         intern ("set-buffer-multibyte"),
+                         NILP (flag) ? Qt : Qnil),
+                  old_undo));
     }
 
   UNGCPRO;
@@ -4929,55 +4932,55 @@
   /* Must do these before making the first buffer! */
 
   /* real setup is done in bindings.el */
-  BVAR (&buffer_defaults, mode_line_format) = build_pure_c_string ("%-");
-  BVAR (&buffer_defaults, header_line_format) = Qnil;
-  BVAR (&buffer_defaults, abbrev_mode) = Qnil;
-  BVAR (&buffer_defaults, overwrite_mode) = Qnil;
-  BVAR (&buffer_defaults, case_fold_search) = Qt;
-  BVAR (&buffer_defaults, auto_fill_function) = Qnil;
-  BVAR (&buffer_defaults, selective_display) = Qnil;
-  BVAR (&buffer_defaults, selective_display_ellipses) = Qt;
-  BVAR (&buffer_defaults, abbrev_table) = Qnil;
-  BVAR (&buffer_defaults, display_table) = Qnil;
-  BVAR (&buffer_defaults, undo_list) = Qnil;
-  BVAR (&buffer_defaults, mark_active) = Qnil;
-  BVAR (&buffer_defaults, file_format) = Qnil;
-  BVAR (&buffer_defaults, auto_save_file_format) = Qt;
+  BSET (&buffer_defaults, mode_line_format, build_pure_c_string ("%-"));
+  BSET (&buffer_defaults, header_line_format, Qnil);
+  BSET (&buffer_defaults, abbrev_mode, Qnil);
+  BSET (&buffer_defaults, overwrite_mode, Qnil);
+  BSET (&buffer_defaults, case_fold_search, Qt);
+  BSET (&buffer_defaults, auto_fill_function, Qnil);
+  BSET (&buffer_defaults, selective_display, Qnil);
+  BSET (&buffer_defaults, selective_display_ellipses, Qt);
+  BSET (&buffer_defaults, abbrev_table, Qnil);
+  BSET (&buffer_defaults, display_table, Qnil);
+  BSET (&buffer_defaults, undo_list, Qnil);
+  BSET (&buffer_defaults, mark_active, Qnil);
+  BSET (&buffer_defaults, file_format, Qnil);
+  BSET (&buffer_defaults, auto_save_file_format, Qt);
   buffer_defaults.overlays_before = NULL;
   buffer_defaults.overlays_after = NULL;
   buffer_defaults.overlay_center = BEG;
 
   XSETFASTINT (BVAR (&buffer_defaults, tab_width), 8);
-  BVAR (&buffer_defaults, truncate_lines) = Qnil;
-  BVAR (&buffer_defaults, word_wrap) = Qnil;
-  BVAR (&buffer_defaults, ctl_arrow) = Qt;
-  BVAR (&buffer_defaults, bidi_display_reordering) = Qt;
-  BVAR (&buffer_defaults, bidi_paragraph_direction) = Qnil;
-  BVAR (&buffer_defaults, cursor_type) = Qt;
-  BVAR (&buffer_defaults, extra_line_spacing) = Qnil;
-  BVAR (&buffer_defaults, cursor_in_non_selected_windows) = Qt;
+  BSET (&buffer_defaults, truncate_lines, Qnil);
+  BSET (&buffer_defaults, word_wrap, Qnil);
+  BSET (&buffer_defaults, ctl_arrow, Qt);
+  BSET (&buffer_defaults, bidi_display_reordering, Qt);
+  BSET (&buffer_defaults, bidi_paragraph_direction, Qnil);
+  BSET (&buffer_defaults, cursor_type, Qt);
+  BSET (&buffer_defaults, extra_line_spacing, Qnil);
+  BSET (&buffer_defaults, cursor_in_non_selected_windows, Qt);
 
-  BVAR (&buffer_defaults, enable_multibyte_characters) = Qt;
-  BVAR (&buffer_defaults, buffer_file_coding_system) = Qnil;
+  BSET (&buffer_defaults, enable_multibyte_characters, Qt);
+  BSET (&buffer_defaults, buffer_file_coding_system, Qnil);
   XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
   XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
-  BVAR (&buffer_defaults, cache_long_line_scans) = Qnil;
-  BVAR (&buffer_defaults, file_truename) = Qnil;
+  BSET (&buffer_defaults, cache_long_line_scans, Qnil);
+  BSET (&buffer_defaults, file_truename, Qnil);
   XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);
   XSETFASTINT (BVAR (&buffer_defaults, left_margin_cols), 0);
   XSETFASTINT (BVAR (&buffer_defaults, right_margin_cols), 0);
-  BVAR (&buffer_defaults, left_fringe_width) = Qnil;
-  BVAR (&buffer_defaults, right_fringe_width) = Qnil;
-  BVAR (&buffer_defaults, fringes_outside_margins) = Qnil;
-  BVAR (&buffer_defaults, scroll_bar_width) = Qnil;
-  BVAR (&buffer_defaults, vertical_scroll_bar_type) = Qt;
-  BVAR (&buffer_defaults, indicate_empty_lines) = Qnil;
-  BVAR (&buffer_defaults, indicate_buffer_boundaries) = Qnil;
-  BVAR (&buffer_defaults, fringe_indicator_alist) = Qnil;
-  BVAR (&buffer_defaults, fringe_cursor_alist) = Qnil;
-  BVAR (&buffer_defaults, scroll_up_aggressively) = Qnil;
-  BVAR (&buffer_defaults, scroll_down_aggressively) = Qnil;
-  BVAR (&buffer_defaults, display_time) = Qnil;
+  BSET (&buffer_defaults, left_fringe_width, Qnil);
+  BSET (&buffer_defaults, right_fringe_width, Qnil);
+  BSET (&buffer_defaults, fringes_outside_margins, Qnil);
+  BSET (&buffer_defaults, scroll_bar_width, Qnil);
+  BSET (&buffer_defaults, vertical_scroll_bar_type, Qt);
+  BSET (&buffer_defaults, indicate_empty_lines, Qnil);
+  BSET (&buffer_defaults, indicate_buffer_boundaries, Qnil);
+  BSET (&buffer_defaults, fringe_indicator_alist, Qnil);
+  BSET (&buffer_defaults, fringe_cursor_alist, Qnil);
+  BSET (&buffer_defaults, scroll_up_aggressively, Qnil);
+  BSET (&buffer_defaults, scroll_down_aggressively, Qnil);
+  BSET (&buffer_defaults, display_time, Qnil);
 
   /* Assign the local-flags to the slots that have default values.
      The local flag is a bit that is used in the buffer
@@ -4989,24 +4992,24 @@
 
   /* 0 means not a lisp var, -1 means always local, else mask */
   memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
-  XSETINT (BVAR (&buffer_local_flags, filename), -1);
-  XSETINT (BVAR (&buffer_local_flags, directory), -1);
-  XSETINT (BVAR (&buffer_local_flags, backed_up), -1);
-  XSETINT (BVAR (&buffer_local_flags, save_length), -1);
-  XSETINT (BVAR (&buffer_local_flags, auto_save_file_name), -1);
-  XSETINT (BVAR (&buffer_local_flags, read_only), -1);
-  XSETINT (BVAR (&buffer_local_flags, major_mode), -1);
-  XSETINT (BVAR (&buffer_local_flags, mode_name), -1);
-  XSETINT (BVAR (&buffer_local_flags, undo_list), -1);
-  XSETINT (BVAR (&buffer_local_flags, mark_active), -1);
-  XSETINT (BVAR (&buffer_local_flags, point_before_scroll), -1);
-  XSETINT (BVAR (&buffer_local_flags, file_truename), -1);
-  XSETINT (BVAR (&buffer_local_flags, invisibility_spec), -1);
-  XSETINT (BVAR (&buffer_local_flags, file_format), -1);
-  XSETINT (BVAR (&buffer_local_flags, auto_save_file_format), -1);
-  XSETINT (BVAR (&buffer_local_flags, display_count), -1);
-  XSETINT (BVAR (&buffer_local_flags, display_time), -1);
-  XSETINT (BVAR (&buffer_local_flags, enable_multibyte_characters), -1);
+  BSET (&buffer_local_flags, filename, make_number (-1));
+  BSET (&buffer_local_flags, directory, make_number (-1));
+  BSET (&buffer_local_flags, backed_up, make_number (-1));
+  BSET (&buffer_local_flags, save_length, make_number (-1));
+  BSET (&buffer_local_flags, auto_save_file_name, make_number (-1));
+  BSET (&buffer_local_flags, read_only, make_number (-1));
+  BSET (&buffer_local_flags, major_mode, make_number (-1));
+  BSET (&buffer_local_flags, mode_name, make_number (-1));
+  BSET (&buffer_local_flags, undo_list, make_number (-1));
+  BSET (&buffer_local_flags, mark_active, make_number (-1));
+  BSET (&buffer_local_flags, point_before_scroll, make_number (-1));
+  BSET (&buffer_local_flags, file_truename, make_number (-1));
+  BSET (&buffer_local_flags, invisibility_spec, make_number (-1));
+  BSET (&buffer_local_flags, file_format, make_number (-1));
+  BSET (&buffer_local_flags, auto_save_file_format, make_number (-1));
+  BSET (&buffer_local_flags, display_count, make_number (-1));
+  BSET (&buffer_local_flags, display_time, make_number (-1));
+  BSET (&buffer_local_flags, enable_multibyte_characters, make_number (-1));
 
   idx = 1;
   XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx;
@@ -5062,7 +5065,7 @@
   QSFundamental = build_pure_c_string ("Fundamental");
 
   Qfundamental_mode = intern_c_string ("fundamental-mode");
-  BVAR (&buffer_defaults, major_mode) = Qfundamental_mode;
+  BSET (&buffer_defaults, major_mode, Qfundamental_mode);
 
   Qmode_class = intern_c_string ("mode-class");
 
@@ -5125,13 +5128,13 @@
       len++;
     }
 
-  BVAR (current_buffer, directory) = make_unibyte_string (pwd, len);
+  BSET (current_buffer, directory, make_unibyte_string (pwd, len));
   if (! NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
     /* At this moment, we still don't know how to decode the
        directory name.  So, we keep the bytes in multibyte form so
        that ENCODE_FILE correctly gets the original bytes.  */
-    BVAR (current_buffer, directory)
-      = string_to_multibyte (BVAR (current_buffer, directory));
+    BSET (current_buffer, directory,
+         string_to_multibyte (BVAR (current_buffer, directory)));
 
   /* Add /: to the front of the name
      if it would otherwise be treated as magic.  */
@@ -5142,11 +5145,11 @@
         However, it is not necessary to turn / into /:/.
         So avoid doing that.  */
       && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
-    BVAR (current_buffer, directory)
-      = concat2 (build_string ("/:"), BVAR (current_buffer, directory));
+    BSET (current_buffer, directory,
+         concat2 (build_string ("/:"), BVAR (current_buffer, directory)));
 
   temp = get_minibuffer (0);
-  BVAR (XBUFFER (temp), directory) = BVAR (current_buffer, directory);
+  BSET (XBUFFER (temp), directory, BVAR (current_buffer, directory));
 
   free (pwd);
 }

=== modified file 'src/buffer.h'
--- a/src/buffer.h      2012-08-08 14:47:11 +0000
+++ b/src/buffer.h      2012-08-13 03:39:07 +0000
@@ -477,6 +477,7 @@
 /* Most code should use this macro to access Lisp fields in struct buffer.  */
 
 #define BVAR(buf, field) ((buf)->INTERNAL_FIELD (field))
+#define BSET(buf, field, value) ((buf)->INTERNAL_FIELD (field) = (value))
 
 /* This is the structure that the buffer Lisp object points to.  */
 

=== modified file 'src/casetab.c'
--- a/src/casetab.c     2012-06-16 12:24:15 +0000
+++ b/src/casetab.c     2012-08-13 03:39:07 +0000
@@ -158,10 +158,10 @@
     }
   else
     {
-      BVAR (current_buffer, downcase_table) = table;
-      BVAR (current_buffer, upcase_table) = up;
-      BVAR (current_buffer, case_canon_table) = canon;
-      BVAR (current_buffer, case_eqv_table) = eqv;
+      BSET (current_buffer, downcase_table, table);
+      BSET (current_buffer, upcase_table, up);
+      BSET (current_buffer, case_canon_table, canon);
+      BSET (current_buffer, case_eqv_table, eqv);
     }
 
   return table;

=== modified file 'src/cmds.c'
--- a/src/cmds.c        2012-08-07 13:37:21 +0000
+++ b/src/cmds.c        2012-08-13 03:39:07 +0000
@@ -301,7 +301,7 @@
         added be explicit calls to undo-boundary.  */
       && EQ (BVAR (current_buffer, undo_list), last_undo_boundary))
     /* Remove the undo_boundary that was just pushed.  */
-    BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list));
+    BSET (current_buffer, undo_list, XCDR (BVAR (current_buffer, undo_list)));
 
   /* Barf if the key that invoked this was not a character.  */
   if (!CHARACTERP (last_command_event))

=== modified file 'src/coding.c'
--- a/src/coding.c      2012-08-09 05:14:23 +0000
+++ b/src/coding.c      2012-08-13 03:39:07 +0000
@@ -7103,7 +7103,7 @@
       if (GPT != PT)
        move_gap_both (PT, PT_BYTE);
       undo_list = BVAR (current_buffer, undo_list);
-      BVAR (current_buffer, undo_list) = Qt;
+      BSET (current_buffer, undo_list, Qt);
     }
 
   coding->consumed = coding->consumed_char = 0;
@@ -7200,7 +7200,7 @@
     decode_eol (coding);
   if (BUFFERP (coding->dst_object))
     {
-      BVAR (current_buffer, undo_list) = undo_list;
+      BSET (current_buffer, undo_list, undo_list);
       record_insert (coding->dst_pos, coding->produced_char);
     }
   return coding->result;
@@ -7568,8 +7568,8 @@
      doesn't compile new regexps.  */
   Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt);
   Ferase_buffer ();
-  BVAR (current_buffer, undo_list) = Qt;
-  BVAR (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil;
+  BSET (current_buffer, undo_list, Qt);
+  BSET (current_buffer, enable_multibyte_characters, multibyte ? Qt : Qnil);
   set_buffer_internal (current);
   return workbuf;
 }

=== modified file 'src/data.c'
--- a/src/data.c        2012-08-07 13:37:21 +0000
+++ b/src/data.c        2012-08-13 03:39:07 +0000
@@ -1211,8 +1211,8 @@
                       bindings, not for frame-local bindings.  */
                    eassert (!blv->frame_local);
                    tem1 = Fcons (symbol, XCDR (blv->defcell));
-                   BVAR (XBUFFER (where), local_var_alist)
-                     = Fcons (tem1, BVAR (XBUFFER (where), local_var_alist));
+                   BSET (XBUFFER (where), local_var_alist,
+                         Fcons (tem1, BVAR (XBUFFER (where), 
local_var_alist)));
                  }
              }
 
@@ -1651,9 +1651,9 @@
         default value.  */
       find_symbol_value (variable);
 
-      BVAR (current_buffer, local_var_alist)
-        = Fcons (Fcons (variable, XCDR (blv->defcell)),
-                BVAR (current_buffer, local_var_alist));
+      BSET (current_buffer, local_var_alist,
+           Fcons (Fcons (variable, XCDR (blv->defcell)),
+                  BVAR (current_buffer, local_var_alist)));
 
       /* Make sure symbol does not think it is set up for this buffer;
         force it to look once again for this buffer's value.  */
@@ -1721,8 +1721,8 @@
   XSETSYMBOL (variable, sym);  /* Propagate variable indirection.  */
   tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
   if (!NILP (tem))
-    BVAR (current_buffer, local_var_alist)
-      = Fdelq (tem, BVAR (current_buffer, local_var_alist));
+    BSET (current_buffer, local_var_alist,
+         Fdelq (tem, BVAR (current_buffer, local_var_alist)));
 
   /* If the symbol is set up with the current buffer's binding
      loaded, recompute its value.  We have to do it now, or else

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2012-08-08 14:47:11 +0000
+++ b/src/editfns.c     2012-08-13 03:39:07 +0000
@@ -882,7 +882,7 @@
   info = XCDR (info);
   tem = XCAR (info);
   tem1 = BVAR (current_buffer, mark_active);
-  BVAR (current_buffer, mark_active) = tem;
+  BSET (current_buffer, mark_active, tem);
 
   /* If mark is active now, and either was not active
      or was at a different place, run the activate hook.  */
@@ -2816,13 +2816,13 @@
 static Lisp_Object
 subst_char_in_region_unwind (Lisp_Object arg)
 {
-  return BVAR (current_buffer, undo_list) = arg;
+  return BSET (current_buffer, undo_list, arg);
 }
 
 static Lisp_Object
 subst_char_in_region_unwind_1 (Lisp_Object arg)
 {
-  return BVAR (current_buffer, filename) = arg;
+  return BSET (current_buffer, filename, arg);
 }
 
 DEFUN ("subst-char-in-region", Fsubst_char_in_region,
@@ -2896,11 +2896,11 @@
     {
       record_unwind_protect (subst_char_in_region_unwind,
                             BVAR (current_buffer, undo_list));
-      BVAR (current_buffer, undo_list) = Qt;
+      BSET (current_buffer, undo_list, Qt);
       /* Don't do file-locking.  */
       record_unwind_protect (subst_char_in_region_unwind_1,
                             BVAR (current_buffer, filename));
-      BVAR (current_buffer, filename) = Qnil;
+      BSET (current_buffer, filename, Qnil);
     }
 
   if (pos_byte < GPT_BYTE)
@@ -2982,7 +2982,7 @@
                INC_POS (pos_byte_next);
 
              if (! NILP (noundo))
-               BVAR (current_buffer, undo_list) = tem;
+               BSET (current_buffer, undo_list, tem);
 
              UNGCPRO;
            }

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-08-08 14:47:11 +0000
+++ b/src/fileio.c      2012-08-13 03:39:07 +0000
@@ -3149,8 +3149,8 @@
   TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
 
   /* Now we are safe to change the buffer's multibyteness directly.  */
-  BVAR (current_buffer, enable_multibyte_characters) = multibyte;
-  BVAR (current_buffer, undo_list) = undo_list;
+  BSET (current_buffer, enable_multibyte_characters, multibyte);
+  BSET (current_buffer, undo_list, undo_list);
 
   return Qnil;
 }
@@ -3486,16 +3486,16 @@
                  buf = XBUFFER (workbuf);
 
                  delete_all_overlays (buf);
-                 BVAR (buf, directory) = BVAR (current_buffer, directory);
-                 BVAR (buf, read_only) = Qnil;
-                 BVAR (buf, filename) = Qnil;
-                 BVAR (buf, undo_list) = Qt;
+                 BSET (buf, directory, BVAR (current_buffer, directory));
+                 BSET (buf, read_only, Qnil);
+                 BSET (buf, filename, Qnil);
+                 BSET (buf, undo_list, Qt);
                  eassert (buffer_get_overlays (buf, OV_BEFORE) == NULL);
                  eassert (buffer_get_overlays (buf, OV_AFTER) == NULL);
 
                  set_buffer_internal (buf);
                  Ferase_buffer ();
-                 BVAR (buf, enable_multibyte_characters) = Qnil;
+                 BSET (buf, enable_multibyte_characters, Qnil);
 
                  insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0);
                  TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
@@ -4104,8 +4104,8 @@
          unwind_data = Fcons (BVAR (current_buffer, 
enable_multibyte_characters),
                               Fcons (BVAR (current_buffer, undo_list),
                                      Fcurrent_buffer ()));
-         BVAR (current_buffer, enable_multibyte_characters) = Qnil;
-         BVAR (current_buffer, undo_list) = Qt;
+         BSET (current_buffer, enable_multibyte_characters, Qnil);
+         BSET (current_buffer, undo_list, Qt);
          record_unwind_protect (decide_coding_unwind, unwind_data);
 
          if (inserted > 0 && ! NILP (Vset_auto_coding_function))
@@ -4153,7 +4153,7 @@
          && NILP (replace))
        /* Visiting a file with these coding system makes the buffer
           unibyte. */
-       BVAR (current_buffer, enable_multibyte_characters) = Qnil;
+       BSET (current_buffer, enable_multibyte_characters, Qnil);
     }
 
   coding.dst_multibyte = ! NILP (BVAR (current_buffer, 
enable_multibyte_characters));
@@ -4196,13 +4196,13 @@
   if (!NILP (visit))
     {
       if (!EQ (BVAR (current_buffer, undo_list), Qt) && !nochange)
-       BVAR (current_buffer, undo_list) = Qnil;
+       BSET (current_buffer, undo_list, Qnil);
 
       if (NILP (handler))
        {
          current_buffer->modtime = mtime;
          current_buffer->modtime_size = st.st_size;
-         BVAR (current_buffer, filename) = orig_filename;
+         BSET (current_buffer, filename, orig_filename);
        }
 
       SAVE_MODIFF = MODIFF;
@@ -4247,7 +4247,7 @@
 
       /* Save old undo list and don't record undo for decoding.  */
       old_undo = BVAR (current_buffer, undo_list);
-      BVAR (current_buffer, undo_list) = Qt;
+      BSET (current_buffer, undo_list, Qt);
 
       if (NILP (replace))
        {
@@ -4339,7 +4339,7 @@
 
       if (NILP (visit))
        {
-         BVAR (current_buffer, undo_list) = old_undo;
+         BSET (current_buffer, undo_list, old_undo);
          if (CONSP (old_undo) && inserted != old_inserted)
            {
              /* Adjust the last undo record for the size change during
@@ -4354,7 +4354,7 @@
       else
        /* If undo_list was Qt before, keep it that way.
           Otherwise start with an empty undo_list.  */
-       BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil;
+       BSET (current_buffer, undo_list, EQ (old_undo, Qt) ? Qt : Qnil);
 
       unbind_to (count1, Qnil);
     }
@@ -4594,7 +4594,7 @@
        {
          SAVE_MODIFF = MODIFF;
          XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
-         BVAR (current_buffer, filename) = visit_file;
+         BSET (current_buffer, filename, visit_file);
        }
       UNGCPRO;
       return val;
@@ -4810,7 +4810,7 @@
     {
       SAVE_MODIFF = MODIFF;
       XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
-      BVAR (current_buffer, filename) = visit_file;
+      BSET (current_buffer, filename, visit_file);
       update_mode_lines++;
     }
   else if (quietly)

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-08-10 09:24:03 +0000
+++ b/src/frame.c       2012-08-13 03:39:07 +0000
@@ -1677,7 +1677,7 @@
       w = XWINDOW (window);
 
       if (!NILP (w->buffer))
-       BVAR (XBUFFER (w->buffer), display_time) = Fcurrent_time ();
+       BSET (XBUFFER (w->buffer), display_time, Fcurrent_time ());
 
       if (!NILP (w->vchild))
        make_frame_visible_1 (w->vchild);

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-08-08 14:47:11 +0000
+++ b/src/indent.c      2012-08-13 03:39:07 +0000
@@ -141,7 +141,7 @@
   struct Lisp_Vector *widthtab;
 
   if (!VECTORP (BVAR (buf, width_table)))
-    BVAR (buf, width_table) = Fmake_vector (make_number (256), make_number 
(0));
+    BSET (buf, width_table, Fmake_vector (make_number (256), make_number (0)));
   widthtab = XVECTOR (BVAR (buf, width_table));
   if (widthtab->header.size != 256)
     abort ();
@@ -166,7 +166,7 @@
         {
           free_region_cache (current_buffer->width_run_cache);
           current_buffer->width_run_cache = 0;
-          BVAR (current_buffer, width_table) = Qnil;
+          BSET (current_buffer, width_table, Qnil);
         }
     }
   else

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2012-08-08 14:47:11 +0000
+++ b/src/insdel.c      2012-08-13 03:39:07 +0000
@@ -1792,7 +1792,7 @@
   if (! preserve_chars_modiff)
     CHARS_MODIFF = MODIFF;
 
-  BVAR (buffer, point_before_scroll) = Qnil;
+  BSET (buffer, point_before_scroll, Qnil);
 
   if (buffer != old_buffer)
     set_buffer_internal (old_buffer);

=== modified file 'src/intervals.c'
--- a/src/intervals.c   2012-08-10 13:24:20 +0000
+++ b/src/intervals.c   2012-08-13 03:39:07 +0000
@@ -1858,7 +1858,7 @@
   int have_overlays;
   ptrdiff_t original_position;
 
-  BVAR (current_buffer, point_before_scroll) = Qnil;
+  BSET (current_buffer, point_before_scroll, Qnil);
 
   if (charpos == PT)
     return;

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-08-07 07:33:18 +0000
+++ b/src/keymap.c      2012-08-13 03:39:07 +0000
@@ -1854,7 +1854,7 @@
   if (!NILP (keymap))
     keymap = get_keymap (keymap, 1, 1);
 
-  BVAR (current_buffer, keymap) = keymap;
+  BSET (current_buffer, keymap, keymap);
 
   return Qnil;
 }

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2012-08-07 07:33:18 +0000
+++ b/src/minibuf.c     2012-08-13 03:39:07 +0000
@@ -562,11 +562,11 @@
 
   /* Defeat (setq-default truncate-lines t), since truncated lines do
      not work correctly in minibuffers.  (Bug#5715, etc)  */
-  BVAR (current_buffer, truncate_lines) = Qnil;
+  BSET (current_buffer, truncate_lines, Qnil);
 
   /* If appropriate, copy enable-multibyte-characters into the minibuffer.  */
   if (inherit_input_method)
-    BVAR (current_buffer, enable_multibyte_characters) = enable_multibyte;
+    BSET (current_buffer, enable_multibyte_characters, enable_multibyte);
 
   /* The current buffer's default directory is usually the right thing
      for our minibuffer here.  However, if you're typing a command at
@@ -577,7 +577,7 @@
      you think of something better to do?  Find another buffer with a
      better directory, and use that one instead.  */
   if (STRINGP (ambient_dir))
-    BVAR (current_buffer, directory) = ambient_dir;
+    BSET (current_buffer, directory, ambient_dir);
   else
     {
       Lisp_Object buf_list;
@@ -591,7 +591,8 @@
          other_buf = XCDR (XCAR (buf_list));
          if (STRINGP (BVAR (XBUFFER (other_buf), directory)))
            {
-             BVAR (current_buffer, directory) = BVAR (XBUFFER (other_buf), 
directory);
+             BSET (current_buffer, directory,
+                   BVAR (XBUFFER (other_buf), directory));
              break;
            }
        }
@@ -664,7 +665,7 @@
     }
 
   clear_message (1, 1);
-  BVAR (current_buffer, keymap) = map;
+  BSET (current_buffer, keymap, map);
 
   /* Turn on an input method stored in INPUT_METHOD if any.  */
   if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method)))
@@ -673,7 +674,7 @@
   Frun_hooks (1, &Qminibuffer_setup_hook);
 
   /* Don't allow the user to undo past this point.  */
-  BVAR (current_buffer, undo_list) = Qnil;
+  BSET (current_buffer, undo_list, Qnil);
 
   recursive_edit_1 ();
 

=== modified file 'src/print.c'
--- a/src/print.c       2012-08-08 14:47:11 +0000
+++ b/src/print.c       2012-08-13 03:39:07 +0000
@@ -494,14 +494,14 @@
 
   Fkill_all_local_variables ();
   delete_all_overlays (current_buffer);
-  BVAR (current_buffer, directory) = BVAR (old, directory);
-  BVAR (current_buffer, read_only) = Qnil;
-  BVAR (current_buffer, filename) = Qnil;
-  BVAR (current_buffer, undo_list) = Qt;
+  BSET (current_buffer, directory, BVAR (old, directory));
+  BSET (current_buffer, read_only, Qnil);
+  BSET (current_buffer, filename, Qnil);
+  BSET (current_buffer, undo_list, Qt);
   eassert (buffer_get_overlays (NULL, OV_BEFORE) == NULL);
   eassert (buffer_get_overlays (NULL, OV_AFTER) == NULL);
-  BVAR (current_buffer, enable_multibyte_characters)
-    = BVAR (&buffer_defaults, enable_multibyte_characters);
+  BSET (current_buffer, enable_multibyte_characters,
+       BVAR (&buffer_defaults, enable_multibyte_characters));
   specbind (Qinhibit_read_only, Qt);
   specbind (Qinhibit_modification_hooks, Qt);
   Ferase_buffer ();

=== modified file 'src/process.c'
--- a/src/process.c     2012-08-07 07:42:34 +0000
+++ b/src/process.c     2012-08-13 03:39:07 +0000
@@ -5246,7 +5246,7 @@
       old_begv_byte = BEGV_BYTE;
       old_zv_byte = ZV_BYTE;
 
-      BVAR (current_buffer, read_only) = Qnil;
+      BSET (current_buffer, read_only, Qnil);
 
       /* Insert new output into buffer
         at the current end-of-output marker,
@@ -5337,7 +5337,7 @@
        Fnarrow_to_region (make_number (old_begv), make_number (old_zv));
 
 
-      BVAR (current_buffer, read_only) = old_read_only;
+      BSET (current_buffer, read_only, old_read_only);
       SET_PT_BOTH (opoint, opoint_byte);
     }
   /* Handling the process output should not deactivate the mark.  */
@@ -6671,13 +6671,13 @@
              before_byte = PT_BYTE;
 
              tem = BVAR (current_buffer, read_only);
-             BVAR (current_buffer, read_only) = Qnil;
+             BSET (current_buffer, read_only, Qnil);
              insert_string ("\nProcess ");
              { /* FIXME: temporary kludge */
                Lisp_Object tem2 = p->name; Finsert (1, &tem2); }
              insert_string (" ");
              Finsert (1, &msg);
-             BVAR (current_buffer, read_only) = tem;
+             BSET (current_buffer, read_only, tem);
              set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
 
              if (opoint >= before)

=== modified file 'src/syntax.c'
--- a/src/syntax.c      2012-08-08 06:11:29 +0000
+++ b/src/syntax.c      2012-08-13 03:39:07 +0000
@@ -836,7 +836,7 @@
 {
   int idx;
   check_syntax_table (table);
-  BVAR (current_buffer, syntax_table) = table;
+  BSET (current_buffer, syntax_table, table);
   /* Indicate that this buffer now has a specified syntax table.  */
   idx = PER_BUFFER_VAR_IDX (syntax_table);
   SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1);

=== modified file 'src/undo.c'
--- a/src/undo.c        2012-07-10 23:24:36 +0000
+++ b/src/undo.c        2012-08-13 03:39:07 +0000
@@ -104,8 +104,9 @@
   if (at_boundary
       && current_buffer == last_boundary_buffer
       && last_boundary_position != pt)
-    BVAR (current_buffer, undo_list)
-      = Fcons (make_number (last_boundary_position), BVAR (current_buffer, 
undo_list));
+    BSET (current_buffer, undo_list,
+         Fcons (make_number (last_boundary_position),
+                BVAR (current_buffer, undo_list)));
 }
 
 /* Record an insertion that just happened or is about to happen,
@@ -141,8 +142,8 @@
 
   XSETFASTINT (lbeg, beg);
   XSETINT (lend, beg + length);
-  BVAR (current_buffer, undo_list) = Fcons (Fcons (lbeg, lend),
-                                     BVAR (current_buffer, undo_list));
+  BSET (current_buffer, undo_list,
+       Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));
 }
 
 /* Record that a deletion is about to take place,
@@ -167,8 +168,8 @@
       record_point (beg);
     }
 
-  BVAR (current_buffer, undo_list)
-    = Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list));
+  BSET (current_buffer, undo_list,
+       Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));
 }
 
 /* Record the fact that MARKER is about to be adjusted by ADJUSTMENT.
@@ -190,9 +191,9 @@
     Fundo_boundary ();
   last_undo_buffer = current_buffer;
 
-  BVAR (current_buffer, undo_list)
-    = Fcons (Fcons (marker, make_number (adjustment)),
-            BVAR (current_buffer, undo_list));
+  BSET (current_buffer, undo_list,
+       Fcons (Fcons (marker, make_number (adjustment)),
+              BVAR (current_buffer, undo_list)));
 }
 
 /* Record that a replacement is about to take place,
@@ -225,9 +226,9 @@
   if (base_buffer->base_buffer)
     base_buffer = base_buffer->base_buffer;
 
-  BVAR (current_buffer, undo_list) =
-    Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)),
-          BVAR (current_buffer, undo_list));
+  BSET (current_buffer, undo_list,
+       Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)),
+              BVAR (current_buffer, undo_list)));
 }
 
 /* Record a change in property PROP (whose old value was VAL)
@@ -265,7 +266,8 @@
   XSETINT (lbeg, beg);
   XSETINT (lend, beg + length);
   entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));
-  BVAR (current_buffer, undo_list) = Fcons (entry, BVAR (current_buffer, 
undo_list));
+  BSET (current_buffer, undo_list,
+       Fcons (entry, BVAR (current_buffer, undo_list)));
 
   current_buffer = obuf;
 }
@@ -288,11 +290,11 @@
          /* If we have preallocated the cons cell to use here,
             use that one.  */
          XSETCDR (pending_boundary, BVAR (current_buffer, undo_list));
-         BVAR (current_buffer, undo_list) = pending_boundary;
+         BSET (current_buffer, undo_list, pending_boundary);
          pending_boundary = Qnil;
        }
       else
-       BVAR (current_buffer, undo_list) = Fcons (Qnil, BVAR (current_buffer, 
undo_list));
+       BSET (current_buffer, undo_list, Fcons (Qnil, BVAR (current_buffer, 
undo_list)));
     }
   last_boundary_position = PT;
   last_boundary_buffer = current_buffer;
@@ -433,7 +435,7 @@
     XSETCDR (last_boundary, Qnil);
   /* There's nothing we decided to keep, so clear it out.  */
   else
-    BVAR (b, undo_list) = Qnil;
+    BSET (b, undo_list, Qnil);
 
   unbind_to (count, Qnil);
 }
@@ -648,8 +650,8 @@
      will work right.  */
   if (did_apply
       && EQ (oldlist, BVAR (current_buffer, undo_list)))
-    BVAR (current_buffer, undo_list)
-      = Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list));
+    BSET (current_buffer, undo_list,
+         Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list)));
 
   UNGCPRO;
   return unbind_to (count, list);

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-08-10 09:24:03 +0000
+++ b/src/w32fns.c      2012-08-13 03:39:07 +0000
@@ -5240,7 +5240,7 @@
   Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
   old_buffer = current_buffer;
   set_buffer_internal_1 (XBUFFER (buffer));
-  BVAR (current_buffer, truncate_lines) = Qnil;
+  BSET (current_buffer, truncate_lines, Qnil);
   specbind (Qinhibit_read_only, Qt);
   specbind (Qinhibit_modification_hooks, Qt);
   Ferase_buffer ();
@@ -5670,7 +5670,7 @@
   /* Display the tooltip text in a temporary buffer.  */
   old_buffer = current_buffer;
   set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
-  BVAR (current_buffer, truncate_lines) = Qnil;
+  BSET (current_buffer, truncate_lines, Qnil);
   clear_glyph_matrix (w->desired_matrix);
   clear_glyph_matrix (w->current_matrix);
   SET_TEXT_POS (pos, BEGV, BEGV_BYTE);

=== modified file 'src/window.c'
--- a/src/window.c      2012-08-07 07:33:18 +0000
+++ b/src/window.c      2012-08-13 03:39:07 +0000
@@ -373,7 +373,7 @@
 
   Fset_buffer (w->buffer);
 
-  BVAR (XBUFFER (w->buffer), last_selected_window) = window;
+  BSET (XBUFFER (w->buffer), last_selected_window, window);
 
   /* Go to the point recorded in the window.
      This is important when the buffer is in more
@@ -1812,7 +1812,7 @@
 
   if (WINDOWP (BVAR (b, last_selected_window))
       && w == XWINDOW (BVAR (b, last_selected_window)))
-    BVAR (b, last_selected_window) = Qnil;
+    BSET (b, last_selected_window, Qnil);
 }
 
 /* Put NEW into the window structure in place of OLD.  SETFLAG zero
@@ -2990,15 +2990,15 @@
   WSET (w, buffer, buffer);
 
   if (EQ (window, selected_window))
-    BVAR (b, last_selected_window) = window;
+    BSET (b, last_selected_window, window);
 
   /* Let redisplay errors through.  */
   b->display_error_modiff = 0;
 
   /* Update time stamps of buffer display.  */
   if (INTEGERP (BVAR (b, display_count)))
-    XSETINT (BVAR (b, display_count), XINT (BVAR (b, display_count)) + 1);
-  BVAR (b, display_time) = Fcurrent_time ();
+    BSET (b, display_count, make_number (XINT (BVAR (b, display_count)) + 1));
+  BSET (b, display_time, Fcurrent_time ());
 
   WSET (w, window_end_pos, make_number (0));
   WSET (w, window_end_vpos, make_number (0));
@@ -3189,7 +3189,7 @@
   register Lisp_Object window;
   register struct window *w;
 
-  BVAR (XBUFFER (buf), directory) = BVAR (current_buffer, directory);
+  BSET (XBUFFER (buf), directory, BVAR (current_buffer, directory));
 
   Fset_buffer (buf);
   BUF_SAVE_MODIFF (XBUFFER (buf)) = MODIFF;

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-08-08 19:53:44 +0000
+++ b/src/xdisp.c       2012-08-13 03:39:07 +0000
@@ -9318,7 +9318,7 @@
       old_deactivate_mark = Vdeactivate_mark;
       oldbuf = current_buffer;
       Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
-      BVAR (current_buffer, undo_list) = Qt;
+      BSET (current_buffer, undo_list, Qt);
 
       oldpoint = message_dolog_marker1;
       set_marker_restricted (oldpoint, make_number (PT), Qnil);
@@ -9880,7 +9880,7 @@
        old_buffer = echo_buffer[i];
        echo_buffer[i] = Fget_buffer_create
          (make_formatted_string (name, " *Echo Area %d*", i));
-       BVAR (XBUFFER (echo_buffer[i]), truncate_lines) = Qnil;
+       BSET (XBUFFER (echo_buffer[i]), truncate_lines, Qnil);
        /* to force word wrap in echo area -
           it was decided to postpone this*/
        /* XBUFFER (echo_buffer[i])->word_wrap = Qt; */
@@ -9973,8 +9973,8 @@
       set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
     }
 
-  BVAR (current_buffer, undo_list) = Qt;
-  BVAR (current_buffer, read_only) = Qnil;
+  BSET (current_buffer, undo_list, Qt);
+  BSET (current_buffer, read_only, Qnil);
   specbind (Qinhibit_read_only, Qt);
   specbind (Qinhibit_modification_hooks, Qt);
 
@@ -10087,7 +10087,7 @@
 
       /* Switch to that buffer and clear it.  */
       set_buffer_internal (XBUFFER (echo_area_buffer[0]));
-      BVAR (current_buffer, truncate_lines) = Qnil;
+      BSET (current_buffer, truncate_lines, Qnil);
 
       if (Z > BEG)
        {
@@ -10130,7 +10130,7 @@
        {
          /* Someone switched buffers between print requests.  */
          set_buffer_internal (XBUFFER (echo_area_buffer[0]));
-         BVAR (current_buffer, truncate_lines) = Qnil;
+         BSET (current_buffer, truncate_lines, Qnil);
        }
     }
 }
@@ -10582,9 +10582,9 @@
       != !NILP (BVAR (current_buffer, enable_multibyte_characters)))
     Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil);
 
-  BVAR (current_buffer, truncate_lines) = message_truncate_lines ? Qt : Qnil;
+  BSET (current_buffer, truncate_lines, message_truncate_lines ? Qt : Qnil);
   if (!NILP (BVAR (current_buffer, bidi_display_reordering)))
-    BVAR (current_buffer, bidi_paragraph_direction) = Qleft_to_right;
+    BSET (current_buffer, bidi_paragraph_direction, Qleft_to_right);
 
   /* Insert new message at BEG.  */
   TEMP_SET_PT_BOTH (BEG, BEG_BYTE);

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2012-08-10 09:24:03 +0000
+++ b/src/xfns.c        2012-08-13 03:39:07 +0000
@@ -4594,7 +4594,7 @@
   Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
   old_buffer = current_buffer;
   set_buffer_internal_1 (XBUFFER (buffer));
-  BVAR (current_buffer, truncate_lines) = Qnil;
+  BSET (current_buffer, truncate_lines, Qnil);
   specbind (Qinhibit_read_only, Qt);
   specbind (Qinhibit_modification_hooks, Qt);
   Ferase_buffer ();
@@ -5091,7 +5091,7 @@
   /* Display the tooltip text in a temporary buffer.  */
   old_buffer = current_buffer;
   set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
-  BVAR (current_buffer, truncate_lines) = Qnil;
+  BSET (current_buffer, truncate_lines, Qnil);
   clear_glyph_matrix (w->desired_matrix);
   clear_glyph_matrix (w->current_matrix);
   SET_TEXT_POS (pos, BEGV, BEGV_BYTE);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]