summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-17 23:06:39 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-08-17 23:06:39 -0700
commit39eb03f1b023ae3d94e311f6f5d9f913f75c42c4 (patch)
tree454b784e6ccc782a6f3c16d67e01cc8a1e5051be
parent2170b1bdd500484349deec2d946119e6a653e198 (diff)
downloademacs-39eb03f1b023ae3d94e311f6f5d9f913f75c42c4.tar.gz
* buffer.h (BSET): Remove.
Replace all uses with calls to new setter functions. (bset_bidi_paragraph_direction, bset_case_canon_table) (bset_case_eqv_table, bset_directory, bset_display_count) (bset_display_time, bset_downcase_table) (bset_enable_multibyte_characters, bset_filename, bset_keymap) (bset_last_selected_window, bset_local_var_alist) (bset_mark_active, bset_point_before_scroll, bset_read_only) (bset_truncate_lines, bset_undo_list, bset_upcase_table) (bset_width_table): * buffer.c (bset_abbrev_mode, bset_abbrev_table) (bset_auto_fill_function, bset_auto_save_file_format) (bset_auto_save_file_name, bset_backed_up, bset_begv_marker) (bset_bidi_display_reordering, bset_buffer_file_coding_system) (bset_cache_long_line_scans, bset_case_fold_search) (bset_ctl_arrow, bset_cursor_in_non_selected_windows) (bset_cursor_type, bset_display_table, bset_extra_line_spacing) (bset_file_format, bset_file_truename, bset_fringe_cursor_alist) (bset_fringe_indicator_alist, bset_fringes_outside_margins) (bset_header_line_format, bset_indicate_buffer_boundaries) (bset_indicate_empty_lines, bset_invisibility_spec) (bset_left_fringe_width, bset_major_mode, bset_mark) (bset_minor_modes, bset_mode_line_format, bset_mode_name) (bset_name, bset_overwrite_mode, bset_pt_marker) (bset_right_fringe_width, bset_save_length) (bset_scroll_bar_width, bset_scroll_down_aggressively) (bset_scroll_up_aggressively, bset_selective_display) (bset_selective_display_ellipses, bset_vertical_scroll_bar_type) (bset_word_wrap, bset_zv_marker): * category.c (bset_category_table): * syntax.c (bset_syntax_table): New setter functions. Fixes: debbugs:12215
-rw-r--r--src/ChangeLog33
-rw-r--r--src/buffer.c502
-rw-r--r--src/buffer.h99
-rw-r--r--src/casetab.c8
-rw-r--r--src/category.c9
-rw-r--r--src/cmds.c2
-rw-r--r--src/coding.c8
-rw-r--r--src/data.c17
-rw-r--r--src/editfns.c14
-rw-r--r--src/fileio.c34
-rw-r--r--src/frame.c2
-rw-r--r--src/indent.c4
-rw-r--r--src/insdel.c2
-rw-r--r--src/intervals.c2
-rw-r--r--src/keymap.c2
-rw-r--r--src/minibuf.c14
-rw-r--r--src/print.c12
-rw-r--r--src/process.c8
-rw-r--r--src/syntax.c9
-rw-r--r--src/undo.c45
-rw-r--r--src/w32fns.c4
-rw-r--r--src/window.c12
-rw-r--r--src/xdisp.c16
-rw-r--r--src/xfns.c4
24 files changed, 621 insertions, 241 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c5f3f4b5e3e..28143d43b23 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,38 @@
2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
+ * buffer.h (BSET): Remove (Bug#12215).
+ Replace all uses with calls to new setter functions.
+ (bset_bidi_paragraph_direction, bset_case_canon_table)
+ (bset_case_eqv_table, bset_directory, bset_display_count)
+ (bset_display_time, bset_downcase_table)
+ (bset_enable_multibyte_characters, bset_filename, bset_keymap)
+ (bset_last_selected_window, bset_local_var_alist)
+ (bset_mark_active, bset_point_before_scroll, bset_read_only)
+ (bset_truncate_lines, bset_undo_list, bset_upcase_table)
+ (bset_width_table):
+ * buffer.c (bset_abbrev_mode, bset_abbrev_table)
+ (bset_auto_fill_function, bset_auto_save_file_format)
+ (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
+ (bset_bidi_display_reordering, bset_buffer_file_coding_system)
+ (bset_cache_long_line_scans, bset_case_fold_search)
+ (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
+ (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
+ (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
+ (bset_fringe_indicator_alist, bset_fringes_outside_margins)
+ (bset_header_line_format, bset_indicate_buffer_boundaries)
+ (bset_indicate_empty_lines, bset_invisibility_spec)
+ (bset_left_fringe_width, bset_major_mode, bset_mark)
+ (bset_minor_modes, bset_mode_line_format, bset_mode_name)
+ (bset_name, bset_overwrite_mode, bset_pt_marker)
+ (bset_right_fringe_width, bset_save_length)
+ (bset_scroll_bar_width, bset_scroll_down_aggressively)
+ (bset_scroll_up_aggressively, bset_selective_display)
+ (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
+ (bset_word_wrap, bset_zv_marker):
+ * category.c (bset_category_table):
+ * syntax.c (bset_syntax_table):
+ New setter functions.
+
* process.h (PSET): Remove (Bug#12215).
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
diff --git a/src/buffer.c b/src/buffer.c
index 476f2e363b9..9373e3cd363 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -157,6 +157,228 @@ static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay
static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t);
static Lisp_Object buffer_lisp_local_variables (struct buffer *, int);
+/* These setters are used only in this file, so they can be private. */
+static inline void
+bset_abbrev_mode (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (abbrev_mode) = val;
+}
+static inline void
+bset_abbrev_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (abbrev_table) = val;
+}
+static inline void
+bset_auto_fill_function (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (auto_fill_function) = val;
+}
+static inline void
+bset_auto_save_file_format (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (auto_save_file_format) = val;
+}
+static inline void
+bset_auto_save_file_name (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (auto_save_file_name) = val;
+}
+static inline void
+bset_backed_up (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (backed_up) = val;
+}
+static inline void
+bset_begv_marker (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (begv_marker) = val;
+}
+static inline void
+bset_bidi_display_reordering (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (bidi_display_reordering) = val;
+}
+static inline void
+bset_buffer_file_coding_system (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (buffer_file_coding_system) = val;
+}
+static inline void
+bset_cache_long_line_scans (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (cache_long_line_scans) = val;
+}
+static inline void
+bset_case_fold_search (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (case_fold_search) = val;
+}
+static inline void
+bset_ctl_arrow (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (ctl_arrow) = val;
+}
+static inline void
+bset_cursor_in_non_selected_windows (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (cursor_in_non_selected_windows) = val;
+}
+static inline void
+bset_cursor_type (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (cursor_type) = val;
+}
+static inline void
+bset_display_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (display_table) = val;
+}
+static inline void
+bset_extra_line_spacing (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (extra_line_spacing) = val;
+}
+static inline void
+bset_file_format (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (file_format) = val;
+}
+static inline void
+bset_file_truename (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (file_truename) = val;
+}
+static inline void
+bset_fringe_cursor_alist (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (fringe_cursor_alist) = val;
+}
+static inline void
+bset_fringe_indicator_alist (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (fringe_indicator_alist) = val;
+}
+static inline void
+bset_fringes_outside_margins (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (fringes_outside_margins) = val;
+}
+static inline void
+bset_header_line_format (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (header_line_format) = val;
+}
+static inline void
+bset_indicate_buffer_boundaries (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (indicate_buffer_boundaries) = val;
+}
+static inline void
+bset_indicate_empty_lines (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (indicate_empty_lines) = val;
+}
+static inline void
+bset_invisibility_spec (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (invisibility_spec) = val;
+}
+static inline void
+bset_left_fringe_width (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (left_fringe_width) = val;
+}
+static inline void
+bset_major_mode (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (major_mode) = val;
+}
+static inline void
+bset_mark (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (mark) = val;
+}
+static inline void
+bset_minor_modes (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (minor_modes) = val;
+}
+static inline void
+bset_mode_line_format (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (mode_line_format) = val;
+}
+static inline void
+bset_mode_name (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (mode_name) = val;
+}
+static inline void
+bset_name (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (name) = val;
+}
+static inline void
+bset_overwrite_mode (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (overwrite_mode) = val;
+}
+static inline void
+bset_pt_marker (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (pt_marker) = val;
+}
+static inline void
+bset_right_fringe_width (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (right_fringe_width) = val;
+}
+static inline void
+bset_save_length (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (save_length) = val;
+}
+static inline void
+bset_scroll_bar_width (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (scroll_bar_width) = val;
+}
+static inline void
+bset_scroll_down_aggressively (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (scroll_down_aggressively) = val;
+}
+static inline void
+bset_scroll_up_aggressively (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (scroll_up_aggressively) = val;
+}
+static inline void
+bset_selective_display (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (selective_display) = val;
+}
+static inline void
+bset_selective_display_ellipses (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (selective_display_ellipses) = val;
+}
+static inline void
+bset_vertical_scroll_bar_type (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (vertical_scroll_bar_type) = val;
+}
+static inline void
+bset_word_wrap (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (word_wrap) = val;
+}
+static inline void
+bset_zv_marker (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (zv_marker) = val;
+}
+
/* For debugging; temporary. See set_buffer_internal. */
/* Lisp_Object Qlisp_mode, Vcheck_symbol; */
@@ -370,7 +592,7 @@ even if it is dead. The return value is never nil. */)
b->newline_cache = 0;
b->width_run_cache = 0;
- BSET (b, width_table, Qnil);
+ bset_width_table (b, Qnil);
b->prevent_redisplay_optimizations_p = 1;
/* Put this on the chain of all buffers including killed ones. */
@@ -379,20 +601,20 @@ even if it is dead. The return value is never nil. */)
/* An ordinary buffer normally doesn't need markers
to handle BEGV and ZV. */
- BSET (b, pt_marker, Qnil);
- BSET (b, begv_marker, Qnil);
- BSET (b, zv_marker, Qnil);
+ bset_pt_marker (b, Qnil);
+ bset_begv_marker (b, Qnil);
+ bset_zv_marker (b, Qnil);
name = Fcopy_sequence (buffer_or_name);
set_string_intervals (name, NULL);
- BSET (b, name, name);
+ bset_name (b, name);
- BSET (b, undo_list, (SREF (name, 0) != ' ') ? Qnil : Qt);
+ bset_undo_list (b, SREF (name, 0) != ' ' ? Qnil : Qt);
reset_buffer (b);
reset_buffer_local_variables (b, 1);
- BSET (b, mark, Fmake_marker ());
+ bset_mark (b, Fmake_marker ());
BUF_MARKERS (b) = NULL;
/* Put this in the alist of all live buffers. */
@@ -492,7 +714,7 @@ clone_per_buffer_values (struct buffer *from, struct buffer *to)
/* Get (a copy of) the alist of Lisp-level local variables of FROM
and install that in TO. */
- BSET (to, local_var_alist, buffer_lisp_local_variables (from, 1));
+ bset_local_var_alist (to, buffer_lisp_local_variables (from, 1));
}
@@ -595,7 +817,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
b->newline_cache = 0;
b->width_run_cache = 0;
- BSET (b, width_table, Qnil);
+ bset_width_table (b, Qnil);
/* Put this on the chain of all buffers including killed ones. */
b->header.next.buffer = all_buffers;
@@ -603,7 +825,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
name = Fcopy_sequence (name);
set_string_intervals (name, NULL);
- BSET (b, name, name);
+ bset_name (b, name);
reset_buffer (b);
reset_buffer_local_variables (b, 1);
@@ -612,10 +834,11 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
XSETBUFFER (buf, b);
Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil));
- BSET (b, mark, Fmake_marker ());
+ bset_mark (b, Fmake_marker ());
/* The multibyte status belongs to the base buffer. */
- BSET (b, enable_multibyte_characters, BVAR (b->base_buffer, enable_multibyte_characters));
+ bset_enable_multibyte_characters
+ (b, 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)))
@@ -623,14 +846,17 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
eassert (NILP (BVAR (b->base_buffer, begv_marker)));
eassert (NILP (BVAR (b->base_buffer, zv_marker)));
- BSET (b->base_buffer, pt_marker,
- build_marker (b->base_buffer, b->base_buffer->pt, b->base_buffer->pt_byte));
+ bset_pt_marker (b->base_buffer,
+ 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_begv_marker (b->base_buffer,
+ 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));
+ bset_zv_marker (b->base_buffer,
+ build_marker (b->base_buffer, b->base_buffer->zv,
+ b->base_buffer->zv_byte));
XMARKER (BVAR (b->base_buffer, zv_marker))->insertion_type = 1;
}
@@ -638,9 +864,9 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
if (NILP (clone))
{
/* Give the indirect buffer markers for its narrowing. */
- 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));
+ bset_pt_marker (b, build_marker (b, b->pt, b->pt_byte));
+ bset_begv_marker (b, build_marker (b, b->begv, b->begv_byte));
+ bset_zv_marker (b, build_marker (b, b->zv, b->zv_byte));
XMARKER (BVAR (b, zv_marker))->insertion_type = 1;
}
else
@@ -648,11 +874,11 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
struct buffer *old_b = current_buffer;
clone_per_buffer_values (b->base_buffer, b);
- 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);
+ bset_filename (b, Qnil);
+ bset_file_truename (b, Qnil);
+ bset_display_count (b, make_number (0));
+ bset_backed_up (b, Qnil);
+ bset_auto_save_file_name (b, Qnil);
set_buffer_internal_1 (b);
Fset (intern ("buffer-save-without-query"), Qnil);
Fset (intern ("buffer-file-number"), Qnil);
@@ -715,10 +941,9 @@ delete_all_overlays (struct buffer *b)
void
reset_buffer (register struct buffer *b)
{
- BSET (b, filename, Qnil);
- BSET (b, file_truename, Qnil);
- BSET (b, directory,
- (current_buffer) ? BVAR (current_buffer, directory) : Qnil);
+ bset_filename (b, Qnil);
+ bset_file_truename (b, Qnil);
+ bset_directory (b, 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);
@@ -726,25 +951,25 @@ reset_buffer (register struct buffer *b)
/* It is more conservative to start out "changed" than "unchanged". */
b->clip_changed = 0;
b->prevent_redisplay_optimizations_p = 1;
- BSET (b, backed_up, Qnil);
+ bset_backed_up (b, Qnil);
BUF_AUTOSAVE_MODIFF (b) = 0;
b->auto_save_failure_time = 0;
- BSET (b, auto_save_file_name, Qnil);
- BSET (b, read_only, Qnil);
+ bset_auto_save_file_name (b, Qnil);
+ bset_read_only (b, Qnil);
set_buffer_overlays_before (b, NULL);
set_buffer_overlays_after (b, NULL);
b->overlay_center = BEG;
- 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));
+ bset_mark_active (b, Qnil);
+ bset_point_before_scroll (b, Qnil);
+ bset_file_format (b, Qnil);
+ bset_auto_save_file_format (b, Qt);
+ bset_last_selected_window (b, Qnil);
+ bset_display_count (b, make_number (0));
+ bset_display_time (b, Qnil);
+ bset_enable_multibyte_characters
+ (b, BVAR (&buffer_defaults, enable_multibyte_characters));
+ bset_cursor_type (b, BVAR (&buffer_defaults, cursor_type));
+ bset_extra_line_spacing (b, BVAR (&buffer_defaults, extra_line_spacing));
b->display_error_modiff = 0;
}
@@ -768,10 +993,10 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too)
things that depend on the major mode.
default-major-mode is handled at a higher level.
We ignore it here. */
- BSET (b, major_mode, Qfundamental_mode);
- BSET (b, keymap, Qnil);
- BSET (b, mode_name, QSFundamental);
- BSET (b, minor_modes, Qnil);
+ bset_major_mode (b, Qfundamental_mode);
+ bset_keymap (b, Qnil);
+ bset_mode_name (b, QSFundamental);
+ bset_minor_modes (b, Qnil);
/* If the standard case table has been altered and invalidated,
fix up its insides first. */
@@ -780,15 +1005,15 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too)
&& CHAR_TABLE_P (XCHAR_TABLE (Vascii_downcase_table)->extras[2])))
Fset_standard_case_table (Vascii_downcase_table);
- 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);
+ bset_downcase_table (b, Vascii_downcase_table);
+ bset_upcase_table (b, XCHAR_TABLE (Vascii_downcase_table)->extras[0]);
+ bset_case_canon_table (b, XCHAR_TABLE (Vascii_downcase_table)->extras[1]);
+ bset_case_eqv_table (b, XCHAR_TABLE (Vascii_downcase_table)->extras[2]);
+ bset_invisibility_spec (b, Qt);
/* Reset all (or most) per-buffer variables to their defaults. */
if (permanent_too)
- BSET (b, local_var_alist, Qnil);
+ bset_local_var_alist (b, Qnil);
else
{
Lisp_Object tmp, prop, last = Qnil;
@@ -822,7 +1047,7 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too)
}
/* Delete this local variable. */
else if (NILP (last))
- BSET (b, local_var_alist, XCDR (tmp));
+ bset_local_var_alist (b, XCDR (tmp));
else
XSETCDR (last, XCDR (tmp));
}
@@ -1299,7 +1524,7 @@ This does not change the name of the visited file (if any). */)
error ("Buffer name `%s' is in use", SDATA (newname));
}
- BSET (current_buffer, name, newname);
+ bset_name (current_buffer, newname);
/* Catch redisplay's attention. Unless we do this, the mode lines for
any windows displaying current_buffer will stay unchanged. */
@@ -1444,7 +1669,7 @@ No argument or nil as argument means do this for the current buffer. */)
}
if (EQ (BVAR (XBUFFER (real_buffer), undo_list), Qt))
- BSET (XBUFFER (real_buffer), undo_list, Qnil);
+ bset_undo_list (XBUFFER (real_buffer), Qnil);
return Qnil;
}
@@ -1716,7 +1941,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
swap_out_buffer_local_variables (b);
reset_buffer_local_variables (b, 1);
- BSET (b, name, Qnil);
+ bset_name (b, Qnil);
BLOCK_INPUT;
if (b->base_buffer)
@@ -1740,9 +1965,9 @@ cleaning up all windows currently displaying the buffer to be killed. */)
free_region_cache (b->width_run_cache);
b->width_run_cache = 0;
}
- BSET (b, width_table, Qnil);
+ bset_width_table (b, Qnil);
UNBLOCK_INPUT;
- BSET (b, undo_list, Qnil);
+ bset_undo_list (b, Qnil);
/* Run buffer-list-update-hook. */
if (!NILP (Vrun_hooks))
@@ -1923,7 +2148,7 @@ set_buffer_internal_1 (register struct buffer *b)
/* 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)
- BSET (old_buf->base_buffer, undo_list, BVAR (old_buf, undo_list));
+ bset_undo_list (old_buf->base_buffer, 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. */
@@ -1933,7 +2158,7 @@ set_buffer_internal_1 (register struct buffer *b)
/* 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)
- BSET (b, undo_list, BVAR (b->base_buffer, undo_list));
+ bset_undo_list (b, 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. */
@@ -2131,8 +2356,8 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
#define swapfield_(field, type) \
do { \
type tmp##field = BVAR (other_buffer, field); \
- BSET (other_buffer, field, BVAR (current_buffer, field)); \
- BSET (current_buffer, field, tmp##field); \
+ bset_##field (other_buffer, BVAR (current_buffer, field)); \
+ bset_##field (current_buffer, tmp##field); \
} while (0)
swapfield (own_text, struct buffer_text);
@@ -2172,8 +2397,8 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
swapfield_ (pt_marker, Lisp_Object);
swapfield_ (begv_marker, Lisp_Object);
swapfield_ (zv_marker, Lisp_Object);
- BSET (current_buffer, point_before_scroll, Qnil);
- BSET (other_buffer, point_before_scroll, Qnil);
+ bset_point_before_scroll (current_buffer, Qnil);
+ bset_point_before_scroll (other_buffer, Qnil);
current_buffer->text->modiff++; other_buffer->text->modiff++;
current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++;
@@ -2262,7 +2487,7 @@ current buffer is cleared. */)
/* Don't record these buffer changes. We will put a special undo entry
instead. */
- BSET (current_buffer, undo_list, Qt);
+ bset_undo_list (current_buffer, Qt);
/* If the cached position is for this buffer, clear it out. */
clear_charpos_cache (current_buffer);
@@ -2284,7 +2509,7 @@ current buffer is cleared. */)
to calculate the old correspondences. */
set_intervals_multibyte (0);
- BSET (current_buffer, enable_multibyte_characters, Qnil);
+ bset_enable_multibyte_characters (current_buffer, Qnil);
Z = Z_BYTE;
BEGV = BEGV_BYTE;
@@ -2422,7 +2647,7 @@ current buffer is cleared. */)
/* Do this first, so that chars_in_text asks the right question.
set_intervals_multibyte needs it too. */
- BSET (current_buffer, enable_multibyte_characters, Qt);
+ bset_enable_multibyte_characters (current_buffer, Qt);
GPT_BYTE = advance_to_char_boundary (GPT_BYTE);
GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG;
@@ -2480,11 +2705,11 @@ current buffer is cleared. */)
if (!EQ (old_undo, Qt))
{
/* Represent all the above changes by a special undo entry. */
- BSET (current_buffer, undo_list,
- Fcons (list3 (Qapply,
- intern ("set-buffer-multibyte"),
- NILP (flag) ? Qt : Qnil),
- old_undo));
+ bset_undo_list (current_buffer,
+ Fcons (list3 (Qapply,
+ intern ("set-buffer-multibyte"),
+ NILP (flag) ? Qt : Qnil),
+ old_undo));
}
UNGCPRO;
@@ -4937,55 +5162,55 @@ init_buffer_once (void)
/* Must do these before making the first buffer! */
/* real setup is done in bindings.el */
- 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);
+ bset_mode_line_format (&buffer_defaults, build_pure_c_string ("%-"));
+ bset_header_line_format (&buffer_defaults, Qnil);
+ bset_abbrev_mode (&buffer_defaults, Qnil);
+ bset_overwrite_mode (&buffer_defaults, Qnil);
+ bset_case_fold_search (&buffer_defaults, Qt);
+ bset_auto_fill_function (&buffer_defaults, Qnil);
+ bset_selective_display (&buffer_defaults, Qnil);
+ bset_selective_display_ellipses (&buffer_defaults, Qt);
+ bset_abbrev_table (&buffer_defaults, Qnil);
+ bset_display_table (&buffer_defaults, Qnil);
+ bset_undo_list (&buffer_defaults, Qnil);
+ bset_mark_active (&buffer_defaults, Qnil);
+ bset_file_format (&buffer_defaults, Qnil);
+ bset_auto_save_file_format (&buffer_defaults, Qt);
set_buffer_overlays_before (&buffer_defaults, NULL);
set_buffer_overlays_after (&buffer_defaults, NULL);
buffer_defaults.overlay_center = BEG;
XSETFASTINT (BVAR (&buffer_defaults, tab_width), 8);
- 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);
-
- BSET (&buffer_defaults, enable_multibyte_characters, Qt);
- BSET (&buffer_defaults, buffer_file_coding_system, Qnil);
+ bset_truncate_lines (&buffer_defaults, Qnil);
+ bset_word_wrap (&buffer_defaults, Qnil);
+ bset_ctl_arrow (&buffer_defaults, Qt);
+ bset_bidi_display_reordering (&buffer_defaults, Qt);
+ bset_bidi_paragraph_direction (&buffer_defaults, Qnil);
+ bset_cursor_type (&buffer_defaults, Qt);
+ bset_extra_line_spacing (&buffer_defaults, Qnil);
+ bset_cursor_in_non_selected_windows (&buffer_defaults, Qt);
+
+ bset_enable_multibyte_characters (&buffer_defaults, Qt);
+ bset_buffer_file_coding_system (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
- BSET (&buffer_defaults, cache_long_line_scans, Qnil);
- BSET (&buffer_defaults, file_truename, Qnil);
+ bset_cache_long_line_scans (&buffer_defaults, Qnil);
+ bset_file_truename (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);
XSETFASTINT (BVAR (&buffer_defaults, left_margin_cols), 0);
XSETFASTINT (BVAR (&buffer_defaults, right_margin_cols), 0);
- 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);
+ bset_left_fringe_width (&buffer_defaults, Qnil);
+ bset_right_fringe_width (&buffer_defaults, Qnil);
+ bset_fringes_outside_margins (&buffer_defaults, Qnil);
+ bset_scroll_bar_width (&buffer_defaults, Qnil);
+ bset_vertical_scroll_bar_type (&buffer_defaults, Qt);
+ bset_indicate_empty_lines (&buffer_defaults, Qnil);
+ bset_indicate_buffer_boundaries (&buffer_defaults, Qnil);
+ bset_fringe_indicator_alist (&buffer_defaults, Qnil);
+ bset_fringe_cursor_alist (&buffer_defaults, Qnil);
+ bset_scroll_up_aggressively (&buffer_defaults, Qnil);
+ bset_scroll_down_aggressively (&buffer_defaults, Qnil);
+ bset_display_time (&buffer_defaults, Qnil);
/* Assign the local-flags to the slots that have default values.
The local flag is a bit that is used in the buffer
@@ -4997,24 +5222,24 @@ init_buffer_once (void)
/* 0 means not a lisp var, -1 means always local, else mask */
memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
- 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));
+ bset_filename (&buffer_local_flags, make_number (-1));
+ bset_directory (&buffer_local_flags, make_number (-1));
+ bset_backed_up (&buffer_local_flags, make_number (-1));
+ bset_save_length (&buffer_local_flags, make_number (-1));
+ bset_auto_save_file_name (&buffer_local_flags, make_number (-1));
+ bset_read_only (&buffer_local_flags, make_number (-1));
+ bset_major_mode (&buffer_local_flags, make_number (-1));
+ bset_mode_name (&buffer_local_flags, make_number (-1));
+ bset_undo_list (&buffer_local_flags, make_number (-1));
+ bset_mark_active (&buffer_local_flags, make_number (-1));
+ bset_point_before_scroll (&buffer_local_flags, make_number (-1));
+ bset_file_truename (&buffer_local_flags, make_number (-1));
+ bset_invisibility_spec (&buffer_local_flags, make_number (-1));
+ bset_file_format (&buffer_local_flags, make_number (-1));
+ bset_auto_save_file_format (&buffer_local_flags, make_number (-1));
+ bset_display_count (&buffer_local_flags, make_number (-1));
+ bset_display_time (&buffer_local_flags, make_number (-1));
+ bset_enable_multibyte_characters (&buffer_local_flags, make_number (-1));
idx = 1;
XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx;
@@ -5070,7 +5295,7 @@ init_buffer_once (void)
QSFundamental = build_pure_c_string ("Fundamental");
Qfundamental_mode = intern_c_string ("fundamental-mode");
- BSET (&buffer_defaults, major_mode, Qfundamental_mode);
+ bset_major_mode (&buffer_defaults, Qfundamental_mode);
Qmode_class = intern_c_string ("mode-class");
@@ -5133,13 +5358,13 @@ init_buffer (void)
len++;
}
- BSET (current_buffer, directory, make_unibyte_string (pwd, len));
+ bset_directory (current_buffer, 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. */
- BSET (current_buffer, directory,
- string_to_multibyte (BVAR (current_buffer, directory)));
+ bset_directory
+ (current_buffer, string_to_multibyte (BVAR (current_buffer, directory)));
/* Add /: to the front of the name
if it would otherwise be treated as magic. */
@@ -5150,11 +5375,12 @@ init_buffer (void)
However, it is not necessary to turn / into /:/.
So avoid doing that. */
&& strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
- BSET (current_buffer, directory,
- concat2 (build_string ("/:"), BVAR (current_buffer, directory)));
+ bset_directory
+ (current_buffer,
+ concat2 (build_string ("/:"), BVAR (current_buffer, directory)));
temp = get_minibuffer (0);
- BSET (XBUFFER (temp), directory, BVAR (current_buffer, directory));
+ bset_directory (XBUFFER (temp), BVAR (current_buffer, directory));
free (pwd);
}
diff --git a/src/buffer.h b/src/buffer.h
index 507b15e8b4a..510a8e55682 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -477,7 +477,6 @@ struct buffer_text
/* 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. */
@@ -862,6 +861,104 @@ struct buffer
Lisp_Object INTERNAL_FIELD (undo_list);
};
+/* Most code should use these functions to set Lisp fields in struct
+ buffer. */
+BUFFER_INLINE void
+bset_bidi_paragraph_direction (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (bidi_paragraph_direction) = val;
+}
+BUFFER_INLINE void
+bset_case_canon_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (case_canon_table) = val;
+}
+BUFFER_INLINE void
+bset_case_eqv_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (case_eqv_table) = val;
+}
+BUFFER_INLINE void
+bset_directory (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (directory) = val;
+}
+BUFFER_INLINE void
+bset_display_count (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (display_count) = val;
+}
+BUFFER_INLINE void
+bset_display_time (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (display_time) = val;
+}
+BUFFER_INLINE void
+bset_downcase_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (downcase_table) = val;
+}
+BUFFER_INLINE void
+bset_enable_multibyte_characters (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (enable_multibyte_characters) = val;
+}
+BUFFER_INLINE void
+bset_filename (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (filename) = val;
+}
+BUFFER_INLINE void
+bset_keymap (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (keymap) = val;
+}
+BUFFER_INLINE void
+bset_last_selected_window (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (last_selected_window) = val;
+}
+BUFFER_INLINE void
+bset_local_var_alist (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (local_var_alist) = val;
+}
+BUFFER_INLINE void
+bset_mark_active (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (mark_active) = val;
+}
+BUFFER_INLINE void
+bset_point_before_scroll (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (point_before_scroll) = val;
+}
+BUFFER_INLINE void
+bset_read_only (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (read_only) = val;
+}
+BUFFER_INLINE void
+bset_truncate_lines (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (truncate_lines) = val;
+}
+BUFFER_INLINE void
+bset_undo_list (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (undo_list) = val;
+}
+BUFFER_INLINE void
+bset_upcase_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (upcase_table) = val;
+}
+BUFFER_INLINE void
+bset_width_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (width_table) = val;
+}
+
/* Chain of all buffers, including killed ones. */
diff --git a/src/casetab.c b/src/casetab.c
index a7dcaada5a2..a163d5204f8 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -158,10 +158,10 @@ set_case_table (Lisp_Object table, int standard)
}
else
{
- 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);
+ bset_downcase_table (current_buffer, table);
+ bset_upcase_table (current_buffer, up);
+ bset_case_canon_table (current_buffer, canon);
+ bset_case_eqv_table (current_buffer, eqv);
}
return table;
diff --git a/src/category.c b/src/category.c
index ee48ce442e3..a9bbf596abc 100644
--- a/src/category.c
+++ b/src/category.c
@@ -40,6 +40,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "category.h"
#include "keymap.h"
+/* This setter is used only in this file, so it can be private. */
+static inline void
+bset_category_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (category_table) = val;
+}
+
/* The version number of the latest category table. Each category
table has a unique version number. It is assigned a new number
also when it is modified. When a regular expression is compiled
@@ -285,7 +292,7 @@ Return TABLE. */)
{
int idx;
table = check_category_table (table);
- BSET (current_buffer, category_table, table);
+ bset_category_table (current_buffer, table);
/* Indicate that this buffer now has a specified category table. */
idx = PER_BUFFER_VAR_IDX (category_table);
SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1);
diff --git a/src/cmds.c b/src/cmds.c
index 24778fae6e3..b416135ee9e 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -301,7 +301,7 @@ At the end, it runs `post-self-insert-hook'. */)
added be explicit calls to undo-boundary. */
&& EQ (BVAR (current_buffer, undo_list), last_undo_boundary))
/* Remove the undo_boundary that was just pushed. */
- BSET (current_buffer, undo_list, XCDR (BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer, XCDR (BVAR (current_buffer, undo_list)));
/* Barf if the key that invoked this was not a character. */
if (!CHARACTERP (last_command_event))
diff --git a/src/coding.c b/src/coding.c
index 290b9a5dbb6..971686dc180 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7112,7 +7112,7 @@ decode_coding (struct coding_system *coding)
record_first_change ();
undo_list = BVAR (current_buffer, undo_list);
- BSET (current_buffer, undo_list, Qt);
+ bset_undo_list (current_buffer, Qt);
}
coding->consumed = coding->consumed_char = 0;
@@ -7209,7 +7209,7 @@ decode_coding (struct coding_system *coding)
decode_eol (coding);
if (BUFFERP (coding->dst_object))
{
- BSET (current_buffer, undo_list, undo_list);
+ bset_undo_list (current_buffer, undo_list);
record_insert (coding->dst_pos, coding->produced_char);
}
return coding->result;
@@ -7577,8 +7577,8 @@ make_conversion_work_buffer (int multibyte)
doesn't compile new regexps. */
Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt);
Ferase_buffer ();
- BSET (current_buffer, undo_list, Qt);
- BSET (current_buffer, enable_multibyte_characters, multibyte ? Qt : Qnil);
+ bset_undo_list (current_buffer, Qt);
+ bset_enable_multibyte_characters (current_buffer, multibyte ? Qt : Qnil);
set_buffer_internal (current);
return workbuf;
}
diff --git a/src/data.c b/src/data.c
index 6cd3649d45f..ea511824e6d 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1213,8 +1213,9 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register
bindings, not for frame-local bindings. */
eassert (!blv->frame_local);
tem1 = Fcons (symbol, XCDR (blv->defcell));
- BSET (XBUFFER (where), local_var_alist,
- Fcons (tem1, BVAR (XBUFFER (where), local_var_alist)));
+ bset_local_var_alist
+ (XBUFFER (where),
+ Fcons (tem1, BVAR (XBUFFER (where), local_var_alist)));
}
}
@@ -1653,9 +1654,10 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
default value. */
find_symbol_value (variable);
- BSET (current_buffer, local_var_alist,
- Fcons (Fcons (variable, XCDR (blv->defcell)),
- BVAR (current_buffer, local_var_alist)));
+ bset_local_var_alist
+ (current_buffer,
+ 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 +1723,9 @@ From now on the default value will apply in this buffer. Return VARIABLE. */)
XSETSYMBOL (variable, sym); /* Propagate variable indirection. */
tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
if (!NILP (tem))
- BSET (current_buffer, local_var_alist,
- Fdelq (tem, BVAR (current_buffer, local_var_alist)));
+ bset_local_var_alist
+ (current_buffer,
+ 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
diff --git a/src/editfns.c b/src/editfns.c
index 5445561fad3..c4725aa0ff3 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -881,7 +881,7 @@ save_excursion_restore (Lisp_Object info)
info = XCDR (info);
tem = XCAR (info);
tem1 = BVAR (current_buffer, mark_active);
- BSET (current_buffer, mark_active, tem);
+ bset_mark_active (current_buffer, tem);
/* If mark is active now, and either was not active
or was at a different place, run the activate hook. */
@@ -2815,13 +2815,15 @@ determines whether case is significant or ignored. */)
static Lisp_Object
subst_char_in_region_unwind (Lisp_Object arg)
{
- return BSET (current_buffer, undo_list, arg);
+ bset_undo_list (current_buffer, arg);
+ return arg;
}
static Lisp_Object
subst_char_in_region_unwind_1 (Lisp_Object arg)
{
- return BSET (current_buffer, filename, arg);
+ bset_filename (current_buffer, arg);
+ return arg;
}
DEFUN ("subst-char-in-region", Fsubst_char_in_region,
@@ -2895,11 +2897,11 @@ Both characters must have the same length of multi-byte form. */)
{
record_unwind_protect (subst_char_in_region_unwind,
BVAR (current_buffer, undo_list));
- BSET (current_buffer, undo_list, Qt);
+ bset_undo_list (current_buffer, Qt);
/* Don't do file-locking. */
record_unwind_protect (subst_char_in_region_unwind_1,
BVAR (current_buffer, filename));
- BSET (current_buffer, filename, Qnil);
+ bset_filename (current_buffer, Qnil);
}
if (pos_byte < GPT_BYTE)
@@ -2981,7 +2983,7 @@ Both characters must have the same length of multi-byte form. */)
INC_POS (pos_byte_next);
if (! NILP (noundo))
- BSET (current_buffer, undo_list, tem);
+ bset_undo_list (current_buffer, tem);
UNGCPRO;
}
diff --git a/src/fileio.c b/src/fileio.c
index 5d3ba6a14ae..2f4a2ad2314 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3150,8 +3150,8 @@ decide_coding_unwind (Lisp_Object unwind_data)
TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
/* Now we are safe to change the buffer's multibyteness directly. */
- BSET (current_buffer, enable_multibyte_characters, multibyte);
- BSET (current_buffer, undo_list, undo_list);
+ bset_enable_multibyte_characters (current_buffer, multibyte);
+ bset_undo_list (current_buffer, undo_list);
return Qnil;
}
@@ -3487,16 +3487,16 @@ variable `last-coding-system-used' to the coding system actually used. */)
buf = XBUFFER (workbuf);
delete_all_overlays (buf);
- BSET (buf, directory, BVAR (current_buffer, directory));
- BSET (buf, read_only, Qnil);
- BSET (buf, filename, Qnil);
- BSET (buf, undo_list, Qt);
+ bset_directory (buf, BVAR (current_buffer, directory));
+ bset_read_only (buf, Qnil);
+ bset_filename (buf, Qnil);
+ bset_undo_list (buf, Qt);
eassert (buf->overlays_before == NULL);
eassert (buf->overlays_after == NULL);
set_buffer_internal (buf);
Ferase_buffer ();
- BSET (buf, enable_multibyte_characters, Qnil);
+ bset_enable_multibyte_characters (buf, Qnil);
insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0);
TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
@@ -4105,8 +4105,8 @@ variable `last-coding-system-used' to the coding system actually used. */)
unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters),
Fcons (BVAR (current_buffer, undo_list),
Fcurrent_buffer ()));
- BSET (current_buffer, enable_multibyte_characters, Qnil);
- BSET (current_buffer, undo_list, Qt);
+ bset_enable_multibyte_characters (current_buffer, Qnil);
+ bset_undo_list (current_buffer, Qt);
record_unwind_protect (decide_coding_unwind, unwind_data);
if (inserted > 0 && ! NILP (Vset_auto_coding_function))
@@ -4154,7 +4154,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
&& NILP (replace))
/* Visiting a file with these coding system makes the buffer
unibyte. */
- BSET (current_buffer, enable_multibyte_characters, Qnil);
+ bset_enable_multibyte_characters (current_buffer, Qnil);
}
coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
@@ -4197,13 +4197,13 @@ variable `last-coding-system-used' to the coding system actually used. */)
if (!NILP (visit))
{
if (!EQ (BVAR (current_buffer, undo_list), Qt) && !nochange)
- BSET (current_buffer, undo_list, Qnil);
+ bset_undo_list (current_buffer, Qnil);
if (NILP (handler))
{
current_buffer->modtime = mtime;
current_buffer->modtime_size = st.st_size;
- BSET (current_buffer, filename, orig_filename);
+ bset_filename (current_buffer, orig_filename);
}
SAVE_MODIFF = MODIFF;
@@ -4248,7 +4248,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
/* Save old undo list and don't record undo for decoding. */
old_undo = BVAR (current_buffer, undo_list);
- BSET (current_buffer, undo_list, Qt);
+ bset_undo_list (current_buffer, Qt);
if (NILP (replace))
{
@@ -4340,7 +4340,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
if (NILP (visit))
{
- BSET (current_buffer, undo_list, old_undo);
+ bset_undo_list (current_buffer, old_undo);
if (CONSP (old_undo) && inserted != old_inserted)
{
/* Adjust the last undo record for the size change during
@@ -4355,7 +4355,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
else
/* If undo_list was Qt before, keep it that way.
Otherwise start with an empty undo_list. */
- BSET (current_buffer, undo_list, EQ (old_undo, Qt) ? Qt : Qnil);
+ bset_undo_list (current_buffer, EQ (old_undo, Qt) ? Qt : Qnil);
unbind_to (count1, Qnil);
}
@@ -4595,7 +4595,7 @@ This calls `write-region-annotate-functions' at the start, and
{
SAVE_MODIFF = MODIFF;
XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
- BSET (current_buffer, filename, visit_file);
+ bset_filename (current_buffer, visit_file);
}
UNGCPRO;
return val;
@@ -4811,7 +4811,7 @@ This calls `write-region-annotate-functions' at the start, and
{
SAVE_MODIFF = MODIFF;
XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
- BSET (current_buffer, filename, visit_file);
+ bset_filename (current_buffer, visit_file);
update_mode_lines++;
}
else if (quietly)
diff --git a/src/frame.c b/src/frame.c
index 217c20b9d5e..a00f44a1e5a 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1700,7 +1700,7 @@ make_frame_visible_1 (Lisp_Object window)
w = XWINDOW (window);
if (!NILP (w->buffer))
- BSET (XBUFFER (w->buffer), display_time, Fcurrent_time ());
+ bset_display_time (XBUFFER (w->buffer), Fcurrent_time ());
if (!NILP (w->vchild))
make_frame_visible_1 (w->vchild);
diff --git a/src/indent.c b/src/indent.c
index 84cda7b47fa..160b8c7479e 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -141,7 +141,7 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab)
struct Lisp_Vector *widthtab;
if (!VECTORP (BVAR (buf, width_table)))
- BSET (buf, width_table, Fmake_vector (make_number (256), make_number (0)));
+ bset_width_table (buf, Fmake_vector (make_number (256), make_number (0)));
widthtab = XVECTOR (BVAR (buf, width_table));
if (widthtab->header.size != 256)
abort ();
@@ -166,7 +166,7 @@ width_run_cache_on_off (void)
{
free_region_cache (current_buffer->width_run_cache);
current_buffer->width_run_cache = 0;
- BSET (current_buffer, width_table, Qnil);
+ bset_width_table (current_buffer, Qnil);
}
}
else
diff --git a/src/insdel.c b/src/insdel.c
index fe10879b9f8..1dceb67bffa 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1792,7 +1792,7 @@ modify_region (struct buffer *buffer, ptrdiff_t start, ptrdiff_t end,
if (! preserve_chars_modiff)
CHARS_MODIFF = MODIFF;
- BSET (buffer, point_before_scroll, Qnil);
+ bset_point_before_scroll (buffer, Qnil);
if (buffer != old_buffer)
set_buffer_internal (old_buffer);
diff --git a/src/intervals.c b/src/intervals.c
index 2dcf208a676..0a85e20e5d9 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1887,7 +1887,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
int have_overlays;
ptrdiff_t original_position;
- BSET (current_buffer, point_before_scroll, Qnil);
+ bset_point_before_scroll (current_buffer, Qnil);
if (charpos == PT)
return;
diff --git a/src/keymap.c b/src/keymap.c
index c550b37c1d6..21f7dcb5d37 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1854,7 +1854,7 @@ If KEYMAP is nil, that means no local keymap. */)
if (!NILP (keymap))
keymap = get_keymap (keymap, 1, 1);
- BSET (current_buffer, keymap, keymap);
+ bset_keymap (current_buffer, keymap);
return Qnil;
}
diff --git a/src/minibuf.c b/src/minibuf.c
index 06ea415db62..2154d1654df 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -565,11 +565,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
/* Defeat (setq-default truncate-lines t), since truncated lines do
not work correctly in minibuffers. (Bug#5715, etc) */
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
/* If appropriate, copy enable-multibyte-characters into the minibuffer. */
if (inherit_input_method)
- BSET (current_buffer, enable_multibyte_characters, enable_multibyte);
+ bset_enable_multibyte_characters (current_buffer, 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
@@ -580,7 +580,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
you think of something better to do? Find another buffer with a
better directory, and use that one instead. */
if (STRINGP (ambient_dir))
- BSET (current_buffer, directory, ambient_dir);
+ bset_directory (current_buffer, ambient_dir);
else
{
Lisp_Object buf_list;
@@ -594,8 +594,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
other_buf = XCDR (XCAR (buf_list));
if (STRINGP (BVAR (XBUFFER (other_buf), directory)))
{
- BSET (current_buffer, directory,
- BVAR (XBUFFER (other_buf), directory));
+ bset_directory (current_buffer,
+ BVAR (XBUFFER (other_buf), directory));
break;
}
}
@@ -672,7 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
}
clear_message (1, 1);
- BSET (current_buffer, keymap, map);
+ bset_keymap (current_buffer, map);
/* Turn on an input method stored in INPUT_METHOD if any. */
if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method)))
@@ -681,7 +681,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
Frun_hooks (1, &Qminibuffer_setup_hook);
/* Don't allow the user to undo past this point. */
- BSET (current_buffer, undo_list, Qnil);
+ bset_undo_list (current_buffer, Qnil);
recursive_edit_1 ();
diff --git a/src/print.c b/src/print.c
index 9d633ecce51..223a79dc552 100644
--- a/src/print.c
+++ b/src/print.c
@@ -494,14 +494,14 @@ temp_output_buffer_setup (const char *bufname)
Fkill_all_local_variables ();
delete_all_overlays (current_buffer);
- BSET (current_buffer, directory, BVAR (old, directory));
- BSET (current_buffer, read_only, Qnil);
- BSET (current_buffer, filename, Qnil);
- BSET (current_buffer, undo_list, Qt);
+ bset_directory (current_buffer, BVAR (old, directory));
+ bset_read_only (current_buffer, Qnil);
+ bset_filename (current_buffer, Qnil);
+ bset_undo_list (current_buffer, Qt);
eassert (current_buffer->overlays_before == NULL);
eassert (current_buffer->overlays_after == NULL);
- BSET (current_buffer, enable_multibyte_characters,
- BVAR (&buffer_defaults, enable_multibyte_characters));
+ bset_enable_multibyte_characters
+ (current_buffer, BVAR (&buffer_defaults, enable_multibyte_characters));
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
diff --git a/src/process.c b/src/process.c
index 66cc6a103bd..ea463cd9187 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5330,7 +5330,7 @@ read_process_output (Lisp_Object proc, register int channel)
old_begv_byte = BEGV_BYTE;
old_zv_byte = ZV_BYTE;
- BSET (current_buffer, read_only, Qnil);
+ bset_read_only (current_buffer, Qnil);
/* Insert new output into buffer
at the current end-of-output marker,
@@ -5421,7 +5421,7 @@ read_process_output (Lisp_Object proc, register int channel)
Fnarrow_to_region (make_number (old_begv), make_number (old_zv));
- BSET (current_buffer, read_only, old_read_only);
+ bset_read_only (current_buffer, old_read_only);
SET_PT_BOTH (opoint, opoint_byte);
}
/* Handling the process output should not deactivate the mark. */
@@ -6755,13 +6755,13 @@ status_notify (struct Lisp_Process *deleting_process)
before_byte = PT_BYTE;
tem = BVAR (current_buffer, read_only);
- BSET (current_buffer, read_only, Qnil);
+ bset_read_only (current_buffer, Qnil);
insert_string ("\nProcess ");
{ /* FIXME: temporary kludge */
Lisp_Object tem2 = p->name; Finsert (1, &tem2); }
insert_string (" ");
Finsert (1, &msg);
- BSET (current_buffer, read_only, tem);
+ bset_read_only (current_buffer, tem);
set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
if (opoint >= before)
diff --git a/src/syntax.c b/src/syntax.c
index b8b1bb2ed9c..f995b8f2cac 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -149,6 +149,13 @@ static void scan_sexps_forward (struct lisp_parse_state *,
ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT,
int, Lisp_Object, int);
static int in_classes (int, Lisp_Object);
+
+/* This setter is used only in this file, so it can be private. */
+static inline void
+bset_syntax_table (struct buffer *b, Lisp_Object val)
+{
+ b->INTERNAL_FIELD (syntax_table) = val;
+}
/* Whether the syntax of the character C has the prefix flag set. */
int syntax_prefix_flag_p (int c)
@@ -835,7 +842,7 @@ One argument, a syntax table. */)
{
int idx;
check_syntax_table (table);
- BSET (current_buffer, syntax_table, table);
+ bset_syntax_table (current_buffer, 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);
diff --git a/src/undo.c b/src/undo.c
index cfb67ba5bc8..777e3291806 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -104,9 +104,9 @@ record_point (ptrdiff_t pt)
if (at_boundary
&& current_buffer == last_boundary_buffer
&& last_boundary_position != pt)
- BSET (current_buffer, undo_list,
- Fcons (make_number (last_boundary_position),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (make_number (last_boundary_position),
+ BVAR (current_buffer, undo_list)));
}
/* Record an insertion that just happened or is about to happen,
@@ -142,8 +142,8 @@ record_insert (ptrdiff_t beg, ptrdiff_t length)
XSETFASTINT (lbeg, beg);
XSETINT (lend, beg + length);
- BSET (current_buffer, undo_list,
- Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));
}
/* Record that a deletion is about to take place,
@@ -168,8 +168,9 @@ record_delete (ptrdiff_t beg, Lisp_Object string)
record_point (beg);
}
- BSET (current_buffer, undo_list,
- Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));
}
/* Record the fact that MARKER is about to be adjusted by ADJUSTMENT.
@@ -191,9 +192,10 @@ record_marker_adjustment (Lisp_Object marker, ptrdiff_t adjustment)
Fundo_boundary ();
last_undo_buffer = current_buffer;
- BSET (current_buffer, undo_list,
- Fcons (Fcons (marker, make_number (adjustment)),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (marker, make_number (adjustment)),
+ BVAR (current_buffer, undo_list)));
}
/* Record that a replacement is about to take place,
@@ -226,9 +228,10 @@ record_first_change (void)
if (base_buffer->base_buffer)
base_buffer = base_buffer->base_buffer;
- BSET (current_buffer, undo_list,
- Fcons (Fcons (Qt, make_lisp_time (base_buffer->modtime)),
- BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ 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)
@@ -266,8 +269,8 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
XSETINT (lbeg, beg);
XSETINT (lend, beg + length);
entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));
- BSET (current_buffer, undo_list,
- Fcons (entry, BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (entry, BVAR (current_buffer, undo_list)));
current_buffer = obuf;
}
@@ -290,11 +293,12 @@ but another undo command will undo to the previous boundary. */)
/* If we have preallocated the cons cell to use here,
use that one. */
XSETCDR (pending_boundary, BVAR (current_buffer, undo_list));
- BSET (current_buffer, undo_list, pending_boundary);
+ bset_undo_list (current_buffer, pending_boundary);
pending_boundary = Qnil;
}
else
- BSET (current_buffer, undo_list, Fcons (Qnil, BVAR (current_buffer, undo_list)));
+ bset_undo_list (current_buffer,
+ Fcons (Qnil, BVAR (current_buffer, undo_list)));
}
last_boundary_position = PT;
last_boundary_buffer = current_buffer;
@@ -435,7 +439,7 @@ truncate_undo_list (struct buffer *b)
XSETCDR (last_boundary, Qnil);
/* There's nothing we decided to keep, so clear it out. */
else
- BSET (b, undo_list, Qnil);
+ bset_undo_list (b, Qnil);
unbind_to (count, Qnil);
}
@@ -650,8 +654,9 @@ Return what remains of the list. */)
will work right. */
if (did_apply
&& EQ (oldlist, BVAR (current_buffer, undo_list)))
- BSET (current_buffer, undo_list,
- Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list)));
+ bset_undo_list
+ (current_buffer,
+ Fcons (list3 (Qapply, Qcdr, Qnil), BVAR (current_buffer, undo_list)));
UNGCPRO;
return unbind_to (count, list);
diff --git a/src/w32fns.c b/src/w32fns.c
index 0156027a656..9c5231f9d93 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5242,7 +5242,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (buffer));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
@@ -5672,7 +5672,7 @@ Text larger than the specified size is clipped. */)
/* Display the tooltip text in a temporary buffer. */
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
clear_glyph_matrix (w->desired_matrix);
clear_glyph_matrix (w->current_matrix);
SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
diff --git a/src/window.c b/src/window.c
index bb601db1d4c..b379eecabdd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -512,7 +512,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
Fset_buffer (w->buffer);
- BSET (XBUFFER (w->buffer), last_selected_window, window);
+ bset_last_selected_window (XBUFFER (w->buffer), window);
/* Go to the point recorded in the window.
This is important when the buffer is in more
@@ -1972,7 +1972,7 @@ unshow_buffer (register struct window *w)
if (WINDOWP (BVAR (b, last_selected_window))
&& w == XWINDOW (BVAR (b, last_selected_window)))
- BSET (b, last_selected_window, Qnil);
+ bset_last_selected_window (b, Qnil);
}
/* Put NEW into the window structure in place of OLD. SETFLAG zero
@@ -3148,15 +3148,15 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int
wset_buffer (w, buffer);
if (EQ (window, selected_window))
- BSET (b, last_selected_window, window);
+ bset_last_selected_window (b, window);
/* Let redisplay errors through. */
b->display_error_modiff = 0;
/* Update time stamps of buffer display. */
if (INTEGERP (BVAR (b, display_count)))
- BSET (b, display_count, make_number (XINT (BVAR (b, display_count)) + 1));
- BSET (b, display_time, Fcurrent_time ());
+ bset_display_count (b, make_number (XINT (BVAR (b, display_count)) + 1));
+ bset_display_time (b, Fcurrent_time ());
wset_window_end_pos (w, make_number (0));
wset_window_end_vpos (w, make_number (0));
@@ -3347,7 +3347,7 @@ temp_output_buffer_show (register Lisp_Object buf)
register Lisp_Object window;
register struct window *w;
- BSET (XBUFFER (buf), directory, BVAR (current_buffer, directory));
+ bset_directory (XBUFFER (buf), BVAR (current_buffer, directory));
Fset_buffer (buf);
BUF_SAVE_MODIFF (XBUFFER (buf)) = MODIFF;
diff --git a/src/xdisp.c b/src/xdisp.c
index fce9952c518..03fb94ca1b3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9340,7 +9340,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte)
old_deactivate_mark = Vdeactivate_mark;
oldbuf = current_buffer;
Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
- BSET (current_buffer, undo_list, Qt);
+ bset_undo_list (current_buffer, Qt);
oldpoint = message_dolog_marker1;
set_marker_restricted (oldpoint, make_number (PT), Qnil);
@@ -9902,7 +9902,7 @@ ensure_echo_area_buffers (void)
old_buffer = echo_buffer[i];
echo_buffer[i] = Fget_buffer_create
(make_formatted_string (name, " *Echo Area %d*", i));
- BSET (XBUFFER (echo_buffer[i]), truncate_lines, Qnil);
+ bset_truncate_lines (XBUFFER (echo_buffer[i]), Qnil);
/* to force word wrap in echo area -
it was decided to postpone this*/
/* XBUFFER (echo_buffer[i])->word_wrap = Qt; */
@@ -9995,8 +9995,8 @@ with_echo_area_buffer (struct window *w, int which,
set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
}
- BSET (current_buffer, undo_list, Qt);
- BSET (current_buffer, read_only, Qnil);
+ bset_undo_list (current_buffer, Qt);
+ bset_read_only (current_buffer, Qnil);
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
@@ -10109,7 +10109,7 @@ setup_echo_area_for_printing (int multibyte_p)
/* Switch to that buffer and clear it. */
set_buffer_internal (XBUFFER (echo_area_buffer[0]));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
if (Z > BEG)
{
@@ -10152,7 +10152,7 @@ setup_echo_area_for_printing (int multibyte_p)
{
/* Someone switched buffers between print requests. */
set_buffer_internal (XBUFFER (echo_area_buffer[0]));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
}
}
}
@@ -10604,9 +10604,9 @@ set_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t nbytes, ptrdiff_t multiby
!= !NILP (BVAR (current_buffer, enable_multibyte_characters)))
Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil);
- BSET (current_buffer, truncate_lines, message_truncate_lines ? Qt : Qnil);
+ bset_truncate_lines (current_buffer, message_truncate_lines ? Qt : Qnil);
if (!NILP (BVAR (current_buffer, bidi_display_reordering)))
- BSET (current_buffer, bidi_paragraph_direction, Qleft_to_right);
+ bset_bidi_paragraph_direction (current_buffer, Qleft_to_right);
/* Insert new message at BEG. */
TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
diff --git a/src/xfns.c b/src/xfns.c
index 53891188727..90b54d12345 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4590,7 +4590,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (buffer));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
@@ -5087,7 +5087,7 @@ Text larger than the specified size is clipped. */)
/* Display the tooltip text in a temporary buffer. */
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
- BSET (current_buffer, truncate_lines, Qnil);
+ bset_truncate_lines (current_buffer, Qnil);
clear_glyph_matrix (w->desired_matrix);
clear_glyph_matrix (w->current_matrix);
SET_TEXT_POS (pos, BEGV, BEGV_BYTE);