Commit 39eb03f1 authored by Paul Eggert's avatar Paul Eggert

* 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
parent 2170b1bd
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.
......
This diff is collapsed.
......@@ -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. */
......
......@@ -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;
......
......@@ -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);
......
......@@ -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))
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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 ();
......
......@@ -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 ();
......
......@@ -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)
......
......@@ -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);
......
......@@ -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,