diff options
author | Tom Tromey <tromey@redhat.com> | 2011-02-16 08:02:50 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-02-16 08:02:50 -0700 |
commit | 4b4deea229a39c94762dcf49da538b639df59148 (patch) | |
tree | ec77e02136d2b8991a34d50438d9457bd2fe11fb | |
parent | 16d2ff891446b821ef348d451f73683a0d3a21f6 (diff) | |
download | emacs-4b4deea229a39c94762dcf49da538b639df59148.tar.gz |
Change B_ to BVAR
* xfns.c (x_create_tip_frame, Fx_show_tip): Replace B_ with BVAR.
* xfaces.c (compute_char_face): Replace B_ with BVAR.
* xdisp.c (pos_visible_p, init_iterator, reseat_1)
(message_dolog, update_echo_area, ensure_echo_area_buffers)
(with_echo_area_buffer, setup_echo_area_for_printing)
(set_message_1, update_menu_bar, update_tool_bar)
(text_outside_line_unchanged_p, redisplay_internal)
(try_scrolling, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, row_containing_pos)
(try_window_id, get_overlay_arrow_glyph_row, display_line)
(Fcurrent_bidi_paragraph_direction, display_mode_lines)
(decode_mode_spec_coding, decode_mode_spec, display_count_lines)
(get_window_cursor_type, note_mouse_highlight): Replace B_ with
BVAR.
* window.c (window_display_table, unshow_buffer, window_loop)
(window_min_size_2, set_window_buffer, Fset_window_buffer)
(select_window, Fforce_window_update, temp_output_buffer_show)
(Fset_window_configuration, save_window_save): Replace B_ with
BVAR.
* w32fns.c (x_create_tip_frame, Fx_show_tip, Fw32_shell_execute):
Replace B_ with BVAR.
* undo.c (record_point, record_insert, record_delete)
(record_marker_adjustment, record_first_change)
(record_property_change, Fundo_boundary, truncate_undo_list)
(Fprimitive_undo): Replace B_ with BVAR.
* syntax.h (Vstandard_syntax_table, CURRENT_SYNTAX_TABLE)
(SETUP_BUFFER_SYNTAX_TABLE): Replace B_ with BVAR.
* syntax.c (update_syntax_table, dec_bytepos, Fsyntax_table)
(Fset_syntax_table, Fmodify_syntax_entry, skip_chars)
(skip_syntaxes, scan_lists): Replace B_ with BVAR.
* search.c (compile_pattern_1, compile_pattern, looking_at_1)
(string_match_1, fast_looking_at, newline_cache_on_off)
(search_command, search_buffer, simple_search, boyer_moore)
(Freplace_match): Replace B_ with BVAR.
* process.c (get_process, list_processes_1, Fstart_process)
(Fmake_serial_process, Fmake_network_process)
(read_process_output, send_process, exec_sentinel)
(status_notify, setup_process_coding_systems): Replace B_ with
BVAR.
* print.c (PRINTDECLARE, PRINTPREPARE, PRINTFINISH, printchar)
(strout, print_string, temp_output_buffer_setup, print_object):
Replace B_ with BVAR.
* msdos.c (IT_frame_up_to_date): Replace B_ with BVAR.
* minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Replace
B_ with BVAR.
* marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted)
(set_marker_both, set_marker_restricted_both, unchain_marker):
Replace B_ with BVAR.
* lread.c (readchar, unreadchar, openp, readevalloop)
(Feval_buffer, Feval_region): Replace B_ with BVAR.
* lisp.h (DOWNCASE_TABLE, UPCASE_TABLE): Replace B_ with BVAR.
* keymap.c (Flocal_key_binding, Fuse_local_map)
(Fcurrent_local_map, push_key_description)
(Fdescribe_buffer_bindings): Replace B_ with BVAR.
* keyboard.c (command_loop_1, read_char_minibuf_menu_prompt)
(read_key_sequence): Replace B_ with BVAR.
* intervals.h (TEXT_PROP_MEANS_INVISIBLE): Replace B_ with BVAR.
* intervals.c (set_point_both, get_local_map): Replace B_ with
BVAR.
* insdel.c (check_markers, insert_char, insert_1_both)
(insert_from_string_1, insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, del_range_2)
(modify_region, prepare_to_modify_buffer)
(Fcombine_after_change_execute): Replace B_ with BVAR.
* indent.c (buffer_display_table, recompute_width_table)
(width_run_cache_on_off, current_column, scan_for_column)
(Findent_to, position_indentation, compute_motion, vmotion):
Replace B_ with BVAR.
* fringe.c (get_logical_cursor_bitmap)
(get_logical_fringe_bitmap, update_window_fringes): Replace B_
with BVAR.
* frame.c (make_frame_visible_1): Replace B_ with BVAR.
* font.c (font_at): Replace B_ with BVAR.
* fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5):
Replace B_ with BVAR.
* filelock.c (unlock_all_files, Flock_buffer, Funlock_buffer)
(unlock_buffer): Replace B_ with BVAR.
* fileio.c (Fexpand_file_name, Ffile_directory_p)
(Ffile_regular_p, Ffile_selinux_context)
(Fset_file_selinux_context, Ffile_modes, Fset_file_modes)
(Fset_file_times, Ffile_newer_than_file_p, decide_coding_unwind)
(Finsert_file_contents, choose_write_coding_system)
(Fwrite_region, build_annotations, Fverify_visited_file_modtime)
(Fset_visited_file_modtime, auto_save_error, auto_save_1)
(Fdo_auto_save, Fset_buffer_auto_saved): Replace B_ with BVAR.
* editfns.c (region_limit, Fmark_marker, save_excursion_save)
(save_excursion_restore, Fprevious_char, Fchar_before)
(general_insert_function, Finsert_char, Finsert_byte)
(make_buffer_string_both, Finsert_buffer_substring)
(Fcompare_buffer_substrings, subst_char_in_region_unwind)
(subst_char_in_region_unwind_1, Fsubst_char_in_region)
(Ftranslate_region_internal, save_restriction_restore)
(Fchar_equal): Replace B_ with BVAR.
* dispnew.c (Fframe_or_buffer_changed_p): Replace B_ with BVAR.
* dispextern.h (WINDOW_WANTS_MODELINE_P)
(WINDOW_WANTS_HEADER_LINE_P): Replace B_ with BVAR.
* dired.c (directory_files_internal): Replace B_ with BVAR.
* data.c (swap_in_symval_forwarding, set_internal)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
Replace B_ with BVAR.
* composite.c (fill_gstring_header)
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Replace B_ with BVAR.
* coding.c (decode_coding, encode_coding)
(make_conversion_work_buffer, decode_coding_gap)
(decode_coding_object, encode_coding_object)
(Fdetect_coding_region, Ffind_coding_systems_region_internal)
(Funencodable_char_position, Fcheck_coding_systems_region):
Replace B_ with BVAR.
* cmds.c (Fself_insert_command, internal_self_insert): Replace B_
with BVAR.
* charset.c (Ffind_charset_region): Replace B_ with BVAR.
* character.h (FETCH_CHAR_ADVANCE, INC_BOTH, DEC_BOTH)
(ASCII_CHAR_WIDTH): Replace B_ with BVAR.
* character.c (chars_in_text, Fget_byte): Replace B_ with BVAR.
* category.h (Vstandard_category_table): Replace B_ with BVAR.
* category.c (check_category_table, Fcategory_table)
(Fset_category_table, char_category_set): Replace B_ with BVAR.
* casetab.c (Fcurrent_case_table, set_case_table): Replace B_ with
BVAR.
* casefiddle.c (casify_object, casify_region): Replace B_ with
BVAR.
* callproc.c (Fcall_process, Fcall_process_region): Replace B_
with BVAR.
* callint.c (check_mark, Fcall_interactively): Replace B_ with
BVAR.
* bytecode.c (Fbyte_code): Replace B_ with BVAR.
* buffer.h (FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE, BVAR): Replace B_
with BVAR.
* buffer.c (Fbuffer_live_p, Fget_file_buffer)
(get_truename_buffer, Fget_buffer_create)
(clone_per_buffer_values, Fmake_indirect_buffer, reset_buffer)
(reset_buffer_local_variables, Fbuffer_name, Fbuffer_file_name)
(Fbuffer_local_value, buffer_lisp_local_variables)
(Fset_buffer_modified_p, Frestore_buffer_modified_p)
(Frename_buffer, Fother_buffer, Fbuffer_enable_undo)
(Fkill_buffer, Fset_buffer_major_mode, set_buffer_internal_1)
(set_buffer_temp, Fset_buffer, set_buffer_if_live)
(Fbarf_if_buffer_read_only, Fbury_buffer, Ferase_buffer)
(Fbuffer_swap_text, swapfield_, Fbuffer_swap_text)
(Fset_buffer_multibyte, swap_out_buffer_local_variables)
(record_overlay_string, overlay_strings, init_buffer_once)
(init_buffer, syms_of_buffer): Replace B_ with BVAR.
-rw-r--r-- | src/ChangeLog | 146 | ||||
-rw-r--r-- | src/buffer.c | 670 | ||||
-rw-r--r-- | src/buffer.h | 8 | ||||
-rw-r--r-- | src/bytecode.c | 2 | ||||
-rw-r--r-- | src/callint.c | 16 | ||||
-rw-r--r-- | src/callproc.c | 12 | ||||
-rw-r--r-- | src/casefiddle.c | 12 | ||||
-rw-r--r-- | src/casetab.c | 10 | ||||
-rw-r--r-- | src/category.c | 8 | ||||
-rw-r--r-- | src/category.h | 2 | ||||
-rw-r--r-- | src/character.c | 4 | ||||
-rw-r--r-- | src/character.h | 12 | ||||
-rw-r--r-- | src/charset.c | 2 | ||||
-rw-r--r-- | src/cmds.c | 22 | ||||
-rw-r--r-- | src/coding.c | 34 | ||||
-rw-r--r-- | src/composite.c | 8 | ||||
-rw-r--r-- | src/data.c | 24 | ||||
-rw-r--r-- | src/dired.c | 2 | ||||
-rw-r--r-- | src/dispextern.h | 6 | ||||
-rw-r--r-- | src/dispnew.c | 8 | ||||
-rw-r--r-- | src/editfns.c | 74 | ||||
-rw-r--r-- | src/fileio.c | 178 | ||||
-rw-r--r-- | src/filelock.c | 14 | ||||
-rw-r--r-- | src/fns.c | 12 | ||||
-rw-r--r-- | src/font.c | 2 | ||||
-rw-r--r-- | src/frame.c | 2 | ||||
-rw-r--r-- | src/fringe.c | 18 | ||||
-rw-r--r-- | src/indent.c | 62 | ||||
-rw-r--r-- | src/insdel.c | 62 | ||||
-rw-r--r-- | src/intervals.c | 4 | ||||
-rw-r--r-- | src/intervals.h | 4 | ||||
-rw-r--r-- | src/keyboard.c | 10 | ||||
-rw-r--r-- | src/keymap.c | 12 | ||||
-rw-r--r-- | src/lisp.h | 4 | ||||
-rw-r--r-- | src/lread.c | 16 | ||||
-rw-r--r-- | src/marker.c | 12 | ||||
-rw-r--r-- | src/minibuf.c | 22 | ||||
-rw-r--r-- | src/msdos.c | 6 | ||||
-rw-r--r-- | src/print.c | 40 | ||||
-rw-r--r-- | src/process.c | 58 | ||||
-rw-r--r-- | src/search.c | 48 | ||||
-rw-r--r-- | src/syntax.c | 16 | ||||
-rw-r--r-- | src/syntax.h | 6 | ||||
-rw-r--r-- | src/undo.c | 62 | ||||
-rw-r--r-- | src/w32fns.c | 6 | ||||
-rw-r--r-- | src/window.c | 60 | ||||
-rw-r--r-- | src/xdisp.c | 186 | ||||
-rw-r--r-- | src/xfaces.c | 2 | ||||
-rw-r--r-- | src/xfns.c | 4 |
49 files changed, 1078 insertions, 932 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d70da316ba9..58f2d9b0c6e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,149 @@ +2011-02-16 Tom Tromey <tromey@parfait> + + * xfns.c (x_create_tip_frame, Fx_show_tip): Replace B_ with BVAR. + * xfaces.c (compute_char_face): Replace B_ with BVAR. + * xdisp.c (pos_visible_p, init_iterator, reseat_1) + (message_dolog, update_echo_area, ensure_echo_area_buffers) + (with_echo_area_buffer, setup_echo_area_for_printing) + (set_message_1, update_menu_bar, update_tool_bar) + (text_outside_line_unchanged_p, redisplay_internal) + (try_scrolling, try_cursor_movement, redisplay_window) + (try_window_reusing_current_matrix, row_containing_pos) + (try_window_id, get_overlay_arrow_glyph_row, display_line) + (Fcurrent_bidi_paragraph_direction, display_mode_lines) + (decode_mode_spec_coding, decode_mode_spec, display_count_lines) + (get_window_cursor_type, note_mouse_highlight): Replace B_ with + BVAR. + * window.c (window_display_table, unshow_buffer, window_loop) + (window_min_size_2, set_window_buffer, Fset_window_buffer) + (select_window, Fforce_window_update, temp_output_buffer_show) + (Fset_window_configuration, save_window_save): Replace B_ with + BVAR. + * w32fns.c (x_create_tip_frame, Fx_show_tip, Fw32_shell_execute): + Replace B_ with BVAR. + * undo.c (record_point, record_insert, record_delete) + (record_marker_adjustment, record_first_change) + (record_property_change, Fundo_boundary, truncate_undo_list) + (Fprimitive_undo): Replace B_ with BVAR. + * syntax.h (Vstandard_syntax_table, CURRENT_SYNTAX_TABLE) + (SETUP_BUFFER_SYNTAX_TABLE): Replace B_ with BVAR. + * syntax.c (update_syntax_table, dec_bytepos, Fsyntax_table) + (Fset_syntax_table, Fmodify_syntax_entry, skip_chars) + (skip_syntaxes, scan_lists): Replace B_ with BVAR. + * search.c (compile_pattern_1, compile_pattern, looking_at_1) + (string_match_1, fast_looking_at, newline_cache_on_off) + (search_command, search_buffer, simple_search, boyer_moore) + (Freplace_match): Replace B_ with BVAR. + * process.c (get_process, list_processes_1, Fstart_process) + (Fmake_serial_process, Fmake_network_process) + (read_process_output, send_process, exec_sentinel) + (status_notify, setup_process_coding_systems): Replace B_ with + BVAR. + * print.c (PRINTDECLARE, PRINTPREPARE, PRINTFINISH, printchar) + (strout, print_string, temp_output_buffer_setup, print_object): + Replace B_ with BVAR. + * msdos.c (IT_frame_up_to_date): Replace B_ with BVAR. + * minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Replace + B_ with BVAR. + * marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted) + (set_marker_both, set_marker_restricted_both, unchain_marker): + Replace B_ with BVAR. + * lread.c (readchar, unreadchar, openp, readevalloop) + (Feval_buffer, Feval_region): Replace B_ with BVAR. + * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE): Replace B_ with BVAR. + * keymap.c (Flocal_key_binding, Fuse_local_map) + (Fcurrent_local_map, push_key_description) + (Fdescribe_buffer_bindings): Replace B_ with BVAR. + * keyboard.c (command_loop_1, read_char_minibuf_menu_prompt) + (read_key_sequence): Replace B_ with BVAR. + * intervals.h (TEXT_PROP_MEANS_INVISIBLE): Replace B_ with BVAR. + * intervals.c (set_point_both, get_local_map): Replace B_ with + BVAR. + * insdel.c (check_markers, insert_char, insert_1_both) + (insert_from_string_1, insert_from_gap, insert_from_buffer_1) + (adjust_after_replace, replace_range, del_range_2) + (modify_region, prepare_to_modify_buffer) + (Fcombine_after_change_execute): Replace B_ with BVAR. + * indent.c (buffer_display_table, recompute_width_table) + (width_run_cache_on_off, current_column, scan_for_column) + (Findent_to, position_indentation, compute_motion, vmotion): + Replace B_ with BVAR. + * fringe.c (get_logical_cursor_bitmap) + (get_logical_fringe_bitmap, update_window_fringes): Replace B_ + with BVAR. + * frame.c (make_frame_visible_1): Replace B_ with BVAR. + * font.c (font_at): Replace B_ with BVAR. + * fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): + Replace B_ with BVAR. + * filelock.c (unlock_all_files, Flock_buffer, Funlock_buffer) + (unlock_buffer): Replace B_ with BVAR. + * fileio.c (Fexpand_file_name, Ffile_directory_p) + (Ffile_regular_p, Ffile_selinux_context) + (Fset_file_selinux_context, Ffile_modes, Fset_file_modes) + (Fset_file_times, Ffile_newer_than_file_p, decide_coding_unwind) + (Finsert_file_contents, choose_write_coding_system) + (Fwrite_region, build_annotations, Fverify_visited_file_modtime) + (Fset_visited_file_modtime, auto_save_error, auto_save_1) + (Fdo_auto_save, Fset_buffer_auto_saved): Replace B_ with BVAR. + * editfns.c (region_limit, Fmark_marker, save_excursion_save) + (save_excursion_restore, Fprevious_char, Fchar_before) + (general_insert_function, Finsert_char, Finsert_byte) + (make_buffer_string_both, Finsert_buffer_substring) + (Fcompare_buffer_substrings, subst_char_in_region_unwind) + (subst_char_in_region_unwind_1, Fsubst_char_in_region) + (Ftranslate_region_internal, save_restriction_restore) + (Fchar_equal): Replace B_ with BVAR. + * dispnew.c (Fframe_or_buffer_changed_p): Replace B_ with BVAR. + * dispextern.h (WINDOW_WANTS_MODELINE_P) + (WINDOW_WANTS_HEADER_LINE_P): Replace B_ with BVAR. + * dired.c (directory_files_internal): Replace B_ with BVAR. + * data.c (swap_in_symval_forwarding, set_internal) + (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p): + Replace B_ with BVAR. + * composite.c (fill_gstring_header) + (composition_compute_stop_pos, composition_adjust_point) + (Ffind_composition_internal): Replace B_ with BVAR. + * coding.c (decode_coding, encode_coding) + (make_conversion_work_buffer, decode_coding_gap) + (decode_coding_object, encode_coding_object) + (Fdetect_coding_region, Ffind_coding_systems_region_internal) + (Funencodable_char_position, Fcheck_coding_systems_region): + Replace B_ with BVAR. + * cmds.c (Fself_insert_command, internal_self_insert): Replace B_ + with BVAR. + * charset.c (Ffind_charset_region): Replace B_ with BVAR. + * character.h (FETCH_CHAR_ADVANCE, INC_BOTH, DEC_BOTH) + (ASCII_CHAR_WIDTH): Replace B_ with BVAR. + * character.c (chars_in_text, Fget_byte): Replace B_ with BVAR. + * category.h (Vstandard_category_table): Replace B_ with BVAR. + * category.c (check_category_table, Fcategory_table) + (Fset_category_table, char_category_set): Replace B_ with BVAR. + * casetab.c (Fcurrent_case_table, set_case_table): Replace B_ with + BVAR. + * casefiddle.c (casify_object, casify_region): Replace B_ with + BVAR. + * callproc.c (Fcall_process, Fcall_process_region): Replace B_ + with BVAR. + * callint.c (check_mark, Fcall_interactively): Replace B_ with + BVAR. + * bytecode.c (Fbyte_code): Replace B_ with BVAR. + * buffer.h (FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE, BVAR): Replace B_ + with BVAR. + * buffer.c (Fbuffer_live_p, Fget_file_buffer) + (get_truename_buffer, Fget_buffer_create) + (clone_per_buffer_values, Fmake_indirect_buffer, reset_buffer) + (reset_buffer_local_variables, Fbuffer_name, Fbuffer_file_name) + (Fbuffer_local_value, buffer_lisp_local_variables) + (Fset_buffer_modified_p, Frestore_buffer_modified_p) + (Frename_buffer, Fother_buffer, Fbuffer_enable_undo) + (Fkill_buffer, Fset_buffer_major_mode, set_buffer_internal_1) + (set_buffer_temp, Fset_buffer, set_buffer_if_live) + (Fbarf_if_buffer_read_only, Fbury_buffer, Ferase_buffer) + (Fbuffer_swap_text, swapfield_, Fbuffer_swap_text) + (Fset_buffer_multibyte, swap_out_buffer_local_variables) + (record_overlay_string, overlay_strings, init_buffer_once) + (init_buffer, syms_of_buffer): Replace B_ with BVAR. + 2011-02-16 Eli Zaretskii <eliz@gnu.org> * xdisp.c (redisplay_internal): Resynchronize `w' if the selected diff --git a/src/buffer.c b/src/buffer.c index 49ae4bbede2..d05fe1754c2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -162,7 +162,7 @@ DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, Value is nil if OBJECT is not a buffer or if it has been killed. */) (Lisp_Object object) { - return ((BUFFERP (object) && ! NILP (B_ (XBUFFER (object), name))) + return ((BUFFERP (object) && ! NILP (BVAR (XBUFFER (object), name))) ? Qt : Qnil); } @@ -266,8 +266,8 @@ See also `find-buffer-visiting'. */) { buf = Fcdr (XCAR (tail)); if (!BUFFERP (buf)) continue; - if (!STRINGP (B_ (XBUFFER (buf), filename))) continue; - tem = Fstring_equal (B_ (XBUFFER (buf), filename), filename); + if (!STRINGP (BVAR (XBUFFER (buf), filename))) continue; + tem = Fstring_equal (BVAR (XBUFFER (buf), filename), filename); if (!NILP (tem)) return buf; } @@ -283,8 +283,8 @@ get_truename_buffer (register Lisp_Object filename) { buf = Fcdr (XCAR (tail)); if (!BUFFERP (buf)) continue; - if (!STRINGP (B_ (XBUFFER (buf), file_truename))) continue; - tem = Fstring_equal (B_ (XBUFFER (buf), file_truename), filename); + if (!STRINGP (BVAR (XBUFFER (buf), file_truename))) continue; + tem = Fstring_equal (BVAR (XBUFFER (buf), file_truename), filename); if (!NILP (tem)) return buf; } @@ -353,7 +353,7 @@ even if it is dead. The return value is never nil. */) b->newline_cache = 0; b->width_run_cache = 0; - B_ (b, width_table) = Qnil; + BVAR (b, width_table) = Qnil; b->prevent_redisplay_optimizations_p = 1; /* Put this on the chain of all buffers including killed ones. */ @@ -362,22 +362,22 @@ even if it is dead. The return value is never nil. */) /* An ordinary buffer normally doesn't need markers to handle BEGV and ZV. */ - B_ (b, pt_marker) = Qnil; - B_ (b, begv_marker) = Qnil; - B_ (b, zv_marker) = Qnil; + BVAR (b, pt_marker) = Qnil; + BVAR (b, begv_marker) = Qnil; + BVAR (b, zv_marker) = Qnil; name = Fcopy_sequence (buffer_or_name); STRING_SET_INTERVALS (name, NULL_INTERVAL); - B_ (b, name) = name; + BVAR (b, name) = name; - B_ (b, undo_list) = (SREF (name, 0) != ' ') ? Qnil : Qt; + BVAR (b, undo_list) = (SREF (name, 0) != ' ') ? Qnil : Qt; reset_buffer (b); reset_buffer_local_variables (b, 1); - B_ (b, mark) = Fmake_marker (); + BVAR (b, mark) = Fmake_marker (); BUF_MARKERS (b) = NULL; - B_ (b, name) = name; + BVAR (b, name) = name; /* Put this in the alist of all live buffers. */ XSETBUFFER (buffer, b); @@ -486,7 +486,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. */ - B_ (to, local_var_alist) = buffer_lisp_local_variables (from); + BVAR (to, local_var_alist) = buffer_lisp_local_variables (from); } DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, @@ -512,7 +512,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) base_buffer = Fget_buffer (base_buffer); if (NILP (base_buffer)) error ("No such buffer: `%s'", SDATA (tem)); - if (NILP (B_ (XBUFFER (base_buffer), name))) + if (NILP (BVAR (XBUFFER (base_buffer), name))) error ("Base buffer has been killed"); if (SCHARS (name) == 0) @@ -536,7 +536,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) b->newline_cache = 0; b->width_run_cache = 0; - B_ (b, width_table) = Qnil; + BVAR (b, width_table) = Qnil; /* Put this on the chain of all buffers including killed ones. */ b->next = all_buffers; @@ -544,7 +544,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) name = Fcopy_sequence (name); STRING_SET_INTERVALS (name, NULL_INTERVAL); - B_ (b, name) = name; + BVAR (b, name) = name; reset_buffer (b); reset_buffer_local_variables (b, 1); @@ -553,57 +553,57 @@ 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)); - B_ (b, mark) = Fmake_marker (); - B_ (b, name) = name; + BVAR (b, mark) = Fmake_marker (); + BVAR (b, name) = name; /* The multibyte status belongs to the base buffer. */ - B_ (b, enable_multibyte_characters) = B_ (b->base_buffer, enable_multibyte_characters); + BVAR (b, enable_multibyte_characters) = BVAR (b->base_buffer, enable_multibyte_characters); /* Make sure the base buffer has markers for its narrowing. */ - if (NILP (B_ (b->base_buffer, pt_marker))) + if (NILP (BVAR (b->base_buffer, pt_marker))) { - B_ (b->base_buffer, pt_marker) = Fmake_marker (); - set_marker_both (B_ (b->base_buffer, pt_marker), base_buffer, + BVAR (b->base_buffer, pt_marker) = Fmake_marker (); + set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer, BUF_PT (b->base_buffer), BUF_PT_BYTE (b->base_buffer)); } - if (NILP (B_ (b->base_buffer, begv_marker))) + if (NILP (BVAR (b->base_buffer, begv_marker))) { - B_ (b->base_buffer, begv_marker) = Fmake_marker (); - set_marker_both (B_ (b->base_buffer, begv_marker), base_buffer, + BVAR (b->base_buffer, begv_marker) = Fmake_marker (); + set_marker_both (BVAR (b->base_buffer, begv_marker), base_buffer, BUF_BEGV (b->base_buffer), BUF_BEGV_BYTE (b->base_buffer)); } - if (NILP (B_ (b->base_buffer, zv_marker))) + if (NILP (BVAR (b->base_buffer, zv_marker))) { - B_ (b->base_buffer, zv_marker) = Fmake_marker (); - set_marker_both (B_ (b->base_buffer, zv_marker), base_buffer, + BVAR (b->base_buffer, zv_marker) = Fmake_marker (); + set_marker_both (BVAR (b->base_buffer, zv_marker), base_buffer, BUF_ZV (b->base_buffer), BUF_ZV_BYTE (b->base_buffer)); - XMARKER (B_ (b->base_buffer, zv_marker))->insertion_type = 1; + XMARKER (BVAR (b->base_buffer, zv_marker))->insertion_type = 1; } if (NILP (clone)) { /* Give the indirect buffer markers for its narrowing. */ - B_ (b, pt_marker) = Fmake_marker (); - set_marker_both (B_ (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b)); - B_ (b, begv_marker) = Fmake_marker (); - set_marker_both (B_ (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); - B_ (b, zv_marker) = Fmake_marker (); - set_marker_both (B_ (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b)); - XMARKER (B_ (b, zv_marker))->insertion_type = 1; + BVAR (b, pt_marker) = Fmake_marker (); + set_marker_both (BVAR (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b)); + BVAR (b, begv_marker) = Fmake_marker (); + set_marker_both (BVAR (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); + BVAR (b, zv_marker) = Fmake_marker (); + set_marker_both (BVAR (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b)); + XMARKER (BVAR (b, zv_marker))->insertion_type = 1; } else { struct buffer *old_b = current_buffer; clone_per_buffer_values (b->base_buffer, b); - B_ (b, filename) = Qnil; - B_ (b, file_truename) = Qnil; - B_ (b, display_count) = make_number (0); - B_ (b, backed_up) = Qnil; - B_ (b, auto_save_file_name) = Qnil; + 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; set_buffer_internal_1 (b); Fset (intern ("buffer-save-without-query"), Qnil); Fset (intern ("buffer-file-number"), Qnil); @@ -647,34 +647,34 @@ delete_all_overlays (struct buffer *b) void reset_buffer (register struct buffer *b) { - B_ (b, filename) = Qnil; - B_ (b, file_truename) = Qnil; - B_ (b, directory) = (current_buffer) ? B_ (current_buffer, directory) : Qnil; + BVAR (b, filename) = Qnil; + BVAR (b, file_truename) = Qnil; + BVAR (b, directory) = (current_buffer) ? BVAR (current_buffer, directory) : Qnil; b->modtime = 0; b->modtime_size = -1; - XSETFASTINT (B_ (b, save_length), 0); + XSETFASTINT (BVAR (b, save_length), 0); b->last_window_start = 1; /* It is more conservative to start out "changed" than "unchanged". */ b->clip_changed = 0; b->prevent_redisplay_optimizations_p = 1; - B_ (b, backed_up) = Qnil; + BVAR (b, backed_up) = Qnil; BUF_AUTOSAVE_MODIFF (b) = 0; b->auto_save_failure_time = -1; - B_ (b, auto_save_file_name) = Qnil; - B_ (b, read_only) = Qnil; + BVAR (b, auto_save_file_name) = Qnil; + BVAR (b, read_only) = Qnil; b->overlays_before = NULL; b->overlays_after = NULL; b->overlay_center = BEG; - B_ (b, mark_active) = Qnil; - B_ (b, point_before_scroll) = Qnil; - B_ (b, file_format) = Qnil; - B_ (b, auto_save_file_format) = Qt; - B_ (b, last_selected_window) = Qnil; - XSETINT (B_ (b, display_count), 0); - B_ (b, display_time) = Qnil; - B_ (b, enable_multibyte_characters) = B_ (&buffer_defaults, enable_multibyte_characters); - B_ (b, cursor_type) = B_ (&buffer_defaults, cursor_type); - B_ (b, extra_line_spacing) = B_ (&buffer_defaults, extra_line_spacing); + 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); b->display_error_modiff = 0; } @@ -698,10 +698,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. */ - B_ (b, major_mode) = Qfundamental_mode; - B_ (b, keymap) = Qnil; - B_ (b, mode_name) = QSFundamental; - B_ (b, minor_modes) = Qnil; + BVAR (b, major_mode) = Qfundamental_mode; + BVAR (b, keymap) = Qnil; + BVAR (b, mode_name) = QSFundamental; + BVAR (b, minor_modes) = Qnil; /* If the standard case table has been altered and invalidated, fix up its insides first. */ @@ -710,22 +710,22 @@ 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); - B_ (b, downcase_table) = Vascii_downcase_table; - B_ (b, upcase_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[0]; - B_ (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1]; - B_ (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2]; - B_ (b, invisibility_spec) = Qt; + 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; #ifndef DOS_NT - B_ (b, buffer_file_type) = Qnil; + BVAR (b, buffer_file_type) = Qnil; #endif /* Reset all (or most) per-buffer variables to their defaults. */ if (permanent_too) - B_ (b, local_var_alist) = Qnil; + BVAR (b, local_var_alist) = Qnil; else { Lisp_Object tmp, prop, last = Qnil; - for (tmp = B_ (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp)) + for (tmp = BVAR (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp)) if (!NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local))) { /* If permanent-local, keep it. */ @@ -755,7 +755,7 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) } /* Delete this local variable. */ else if (NILP (last)) - B_ (b, local_var_alist) = XCDR (tmp); + BVAR (b, local_var_alist) = XCDR (tmp); else XSETCDR (last, XCDR (tmp)); } @@ -830,9 +830,9 @@ Return nil if BUFFER has been killed. */) (register Lisp_Object buffer) { if (NILP (buffer)) - return B_ (current_buffer, name); + return BVAR (current_buffer, name); CHECK_BUFFER (buffer); - return B_ (XBUFFER (buffer), name); + return BVAR (XBUFFER (buffer), name); } DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, @@ -841,9 +841,9 @@ No argument or nil as argument means use the current buffer. */) (register Lisp_Object buffer) { if (NILP (buffer)) - return B_ (current_buffer, filename); + return BVAR (current_buffer, filename); CHECK_BUFFER (buffer); - return B_ (XBUFFER (buffer), filename); + return BVAR (XBUFFER (buffer), filename); } DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, @@ -895,7 +895,7 @@ is the default binding of the variable. */) { /* Look in local_var_alist. */ struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); XSETSYMBOL (variable, sym); /* Update In case of aliasing. */ - result = Fassoc (variable, B_ (buf, local_var_alist)); + result = Fassoc (variable, BVAR (buf, local_var_alist)); if (!NILP (result)) { if (blv->fwd) @@ -944,7 +944,7 @@ buffer_lisp_local_variables (struct buffer *buf) { Lisp_Object result = Qnil; register Lisp_Object tail; - for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) + for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) { Lisp_Object val, elt; @@ -1043,9 +1043,9 @@ A non-nil FLAG means mark the buffer modified. */) /* If buffer becoming modified, lock the file. If buffer becoming unmodified, unlock the file. */ - fn = B_ (current_buffer, file_truename); + fn = BVAR (current_buffer, file_truename); /* Test buffer-file-name so that binding it to nil is effective. */ - if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) + if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) { already = SAVE_MODIFF < MODIFF; if (!already && !NILP (flag)) @@ -1110,9 +1110,9 @@ state of the current buffer. Use with care. */) /* If buffer becoming modified, lock the file. If buffer becoming unmodified, unlock the file. */ - fn = B_ (current_buffer, file_truename); + fn = BVAR (current_buffer, file_truename); /* Test buffer-file-name so that binding it to nil is effective. */ - if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) + if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) { int already = SAVE_MODIFF < MODIFF; if (!already && !NILP (flag)) @@ -1199,14 +1199,14 @@ This does not change the name of the visited file (if any). */) with the original name. It makes UNIQUE equivalent to (rename-buffer (generate-new-buffer-name NEWNAME)). */ if (NILP (unique) && XBUFFER (tem) == current_buffer) - return B_ (current_buffer, name); + return BVAR (current_buffer, name); if (!NILP (unique)) - newname = Fgenerate_new_buffer_name (newname, B_ (current_buffer, name)); + newname = Fgenerate_new_buffer_name (newname, BVAR (current_buffer, name)); else error ("Buffer name `%s' is in use", SDATA (newname)); } - B_ (current_buffer, name) = newname; + BVAR (current_buffer, name) = newname; /* Catch redisplay's attention. Unless we do this, the mode lines for any windows displaying current_buffer will stay unchanged. */ @@ -1214,11 +1214,11 @@ This does not change the name of the visited file (if any). */) XSETBUFFER (buf, current_buffer); Fsetcar (Frassq (buf, Vbuffer_alist), newname); - if (NILP (B_ (current_buffer, filename)) - && !NILP (B_ (current_buffer, auto_save_file_name))) + if (NILP (BVAR (current_buffer, filename)) + && !NILP (BVAR (current_buffer, auto_save_file_name))) call0 (intern ("rename-auto-save-file")); /* Refetch since that last call may have done GC. */ - return B_ (current_buffer, name); + return BVAR (current_buffer, name); } DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, @@ -1263,9 +1263,9 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) continue; if (NILP (buf)) continue; - if (NILP (B_ (XBUFFER (buf), name))) + if (NILP (BVAR (XBUFFER (buf), name))) continue; - if (SREF (B_ (XBUFFER (buf), name), 0) == ' ') + if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') continue; /* If the selected frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ @@ -1313,8 +1313,8 @@ No argument or nil as argument means do this for the current buffer. */) nsberror (buffer); } - if (EQ (B_ (XBUFFER (real_buffer), undo_list), Qt)) - B_ (XBUFFER (real_buffer), undo_list) = Qnil; + if (EQ (BVAR (XBUFFER (real_buffer), undo_list), Qt)) + BVAR (XBUFFER (real_buffer), undo_list) = Qnil; return Qnil; } @@ -1359,16 +1359,16 @@ with SIGHUP. */) b = XBUFFER (buffer); /* Avoid trouble for buffer already dead. */ - if (NILP (B_ (b, name))) + if (NILP (BVAR (b, name))) return Qnil; /* Query if the buffer is still modified. */ - if (INTERACTIVE && !NILP (B_ (b, filename)) + if (INTERACTIVE && !NILP (BVAR (b, filename)) && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) { GCPRO1 (buffer); tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", - B_ (b, name), make_number (0))); + BVAR (b, name), make_number (0))); UNGCPRO; if (NILP (tem)) return Qnil; @@ -1402,7 +1402,7 @@ with SIGHUP. */) if (EQ (buffer, XWINDOW (minibuf_window)->buffer)) return Qnil; - if (NILP (B_ (b, name))) + if (NILP (BVAR (b, name))) return Qnil; /* When we kill a base buffer, kill all its indirect buffers. @@ -1417,7 +1417,7 @@ with SIGHUP. */) for (other = all_buffers; other; other = other->next) /* all_buffers contains dead buffers too; don't re-kill them. */ - if (other->base_buffer == b && !NILP (B_ (other, name))) + if (other->base_buffer == b && !NILP (BVAR (other, name))) { Lisp_Object buffer; XSETBUFFER (buffer, other); @@ -1462,7 +1462,7 @@ with SIGHUP. */) /* Killing buffer processes may run sentinels which may have called kill-buffer. */ - if (NILP (B_ (b, name))) + if (NILP (BVAR (b, name))) return Qnil; clear_charpos_cache (b); @@ -1476,7 +1476,7 @@ with SIGHUP. */) /* Delete any auto-save file, if we saved it in this session. But not if the buffer is modified. */ - if (STRINGP (B_ (b, auto_save_file_name)) + if (STRINGP (BVAR (b, auto_save_file_name)) && BUF_AUTOSAVE_MODIFF (b) != 0 && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) @@ -1485,7 +1485,7 @@ with SIGHUP. */) Lisp_Object tem; tem = Fsymbol_value (intern ("delete-auto-save-files")); if (! NILP (tem)) - internal_delete_file (B_ (b, auto_save_file_name)); + internal_delete_file (BVAR (b, auto_save_file_name)); } if (b->base_buffer) @@ -1525,7 +1525,7 @@ with SIGHUP. */) swap_out_buffer_local_variables (b); reset_buffer_local_variables (b, 1); - B_ (b, name) = Qnil; + BVAR (b, name) = Qnil; BLOCK_INPUT; if (! b->base_buffer) @@ -1541,9 +1541,9 @@ with SIGHUP. */) free_region_cache (b->width_run_cache); b->width_run_cache = 0; } - B_ (b, width_table) = Qnil; + BVAR (b, width_table) = Qnil; UNBLOCK_INPUT; - B_ (b, undo_list) = Qnil; + BVAR (b, undo_list) = Qnil; return Qt; } @@ -1637,15 +1637,15 @@ the current buffer's major mode. */) CHECK_BUFFER (buffer); - if (STRINGP (B_ (XBUFFER (buffer), name)) - && strcmp (SSDATA (B_ (XBUFFER (buffer), name)), "*scratch*") == 0) + if (STRINGP (BVAR (XBUFFER (buffer), name)) + && strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) function = find_symbol_value (intern ("initial-major-mode")); else { - function = B_ (&buffer_defaults, major_mode); + function = BVAR (&buffer_defaults, major_mode); if (NILP (function) - && NILP (Fget (B_ (current_buffer, major_mode), Qmode_class))) - function = B_ (current_buffer, major_mode); + && NILP (Fget (BVAR (current_buffer, major_mode), Qmode_class))) + function = BVAR (current_buffer, major_mode); } if (NILP (function) || EQ (function, Qfundamental_mode)) @@ -1795,29 +1795,29 @@ 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) - B_ (old_buf->base_buffer, undo_list) = B_ (old_buf, undo_list); + BVAR (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. */ - if (! NILP (B_ (old_buf, pt_marker))) + if (! NILP (BVAR (old_buf, pt_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, pt_marker), obuf, + set_marker_both (BVAR (old_buf, pt_marker), obuf, BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); } - if (! NILP (B_ (old_buf, begv_marker))) + if (! NILP (BVAR (old_buf, begv_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, begv_marker), obuf, + set_marker_both (BVAR (old_buf, begv_marker), obuf, BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); } - if (! NILP (B_ (old_buf, zv_marker))) + if (! NILP (BVAR (old_buf, zv_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, zv_marker), obuf, + set_marker_both (BVAR (old_buf, zv_marker), obuf, BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); } } @@ -1825,24 +1825,24 @@ 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) - B_ (b, undo_list) = B_ (b->base_buffer, undo_list); + BVAR (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. */ - if (! NILP (B_ (b, pt_marker))) + if (! NILP (BVAR (b, pt_marker))) { - BUF_PT (b) = marker_position (B_ (b, pt_marker)); - BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); + BUF_PT (b) = marker_position (BVAR (b, pt_marker)); + BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker)); } - if (! NILP (B_ (b, begv_marker))) + if (! NILP (BVAR (b, begv_marker))) { - BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); - BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); + BUF_BEGV (b) = marker_position (BVAR (b, begv_marker)); + BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker)); } - if (! NILP (B_ (b, zv_marker))) + if (! NILP (BVAR (b, zv_marker))) { - BUF_ZV (b) = marker_position (B_ (b, zv_marker)); - BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); + BUF_ZV (b) = marker_position (BVAR (b, zv_marker)); + BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker)); } /* Look down buffer's list of local Lisp variables @@ -1850,7 +1850,7 @@ set_buffer_internal_1 (register struct buffer *b) do { - for (tail = B_ (b, local_var_alist); CONSP (tail); tail = XCDR (tail)) + for (tail = BVAR (b, local_var_alist); CONSP (tail); tail = XCDR (tail)) { Lisp_Object var = XCAR (XCAR (tail)); struct Lisp_Symbol *sym = XSYMBOL (var); @@ -1883,45 +1883,45 @@ set_buffer_temp (struct buffer *b) { /* If the old current buffer has markers to record PT, BEGV and ZV when it is not current, update them now. */ - if (! NILP (B_ (old_buf, pt_marker))) + if (! NILP (BVAR (old_buf, pt_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, pt_marker), obuf, + set_marker_both (BVAR (old_buf, pt_marker), obuf, BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); } - if (! NILP (B_ (old_buf, begv_marker))) + if (! NILP (BVAR (old_buf, begv_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, begv_marker), obuf, + set_marker_both (BVAR (old_buf, begv_marker), obuf, BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); } - if (! NILP (B_ (old_buf, zv_marker))) + if (! NILP (BVAR (old_buf, zv_marker))) { Lisp_Object obuf; XSETBUFFER (obuf, old_buf); - set_marker_both (B_ (old_buf, zv_marker), obuf, + set_marker_both (BVAR (old_buf, zv_marker), obuf, BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); } } /* If the new current buffer has markers to record PT, BEGV and ZV when it is not current, fetch them now. */ - if (! NILP (B_ (b, pt_marker))) + if (! NILP (BVAR (b, pt_marker))) { - BUF_PT (b) = marker_position (B_ (b, pt_marker)); - BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); + BUF_PT (b) = marker_position (BVAR (b, pt_marker)); + BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker)); } - if (! NILP (B_ (b, begv_marker))) + if (! NILP (BVAR (b, begv_marker))) { - BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); - BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); + BUF_BEGV (b) = marker_position (BVAR (b, begv_marker)); + BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker)); } - if (! NILP (B_ (b, zv_marker))) + if (! NILP (BVAR (b, zv_marker))) { - BUF_ZV (b) = marker_position (B_ (b, zv_marker)); - BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); + BUF_ZV (b) = marker_position (BVAR (b, zv_marker)); + BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker)); } } @@ -1938,7 +1938,7 @@ ends when the current command terminates. Use `switch-to-buffer' or buffer = Fget_buffer (buffer_or_name); if (NILP (buffer)) nsberror (buffer_or_name); - if (NILP (B_ (XBUFFER (buffer), name))) + if (NILP (BVAR (XBUFFER (buffer), name))) error ("Selecting deleted buffer"); set_buffer_internal (XBUFFER (buffer)); return buffer; @@ -1949,7 +1949,7 @@ ends when the current command terminates. Use `switch-to-buffer' or Lisp_Object set_buffer_if_live (Lisp_Object buffer) { - if (! NILP (B_ (XBUFFER (buffer), name))) + if (! NILP (BVAR (XBUFFER (buffer), name))) Fset_buffer (buffer); return Qnil; } @@ -1959,7 +1959,7 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) (void) { - if (!NILP (B_ (current_buffer, read_only)) + if (!NILP (BVAR (current_buffer, read_only)) && NILP (Vinhibit_read_only)) xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); return Qnil; @@ -2008,7 +2008,7 @@ its frame, iconify that frame. */) /* Move buffer to the end of the buffer list. Do nothing if the buffer is killed. */ - if (!NILP (B_ (XBUFFER (buffer), name))) + if (!NILP (BVAR (XBUFFER (buffer), name))) { Lisp_Object aelt, link; @@ -2041,7 +2041,7 @@ so the buffer is truly empty after this. */) /* Prevent warnings, or suspension of auto saving, that would happen if future size is less than past size. Use of erase-buffer implies that the future text is not really related to the past text. */ - XSETFASTINT (B_ (current_buffer, save_length), 0); + XSETFASTINT (BVAR (current_buffer, save_length), 0); return Qnil; } @@ -2111,7 +2111,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, CHECK_BUFFER (buffer); other_buffer = XBUFFER (buffer); - if (NILP (B_ (other_buffer, name))) + if (NILP (BVAR (other_buffer, name))) error ("Cannot swap a dead buffer's text"); /* Actually, it probably works just fine. @@ -2140,9 +2140,9 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, } while (0) #define swapfield_(field, type) \ do { \ - type tmp##field = B_ (other_buffer, field); \ - B_ (other_buffer, field) = B_ (current_buffer, field); \ - B_ (current_buffer, field) = tmp##field; \ + type tmp##field = BVAR (other_buffer, field); \ + BVAR (other_buffer, field) = BVAR (current_buffer, field); \ + BVAR (current_buffer, field) = tmp##field; \ } while (0) swapfield (own_text, struct buffer_text); @@ -2181,8 +2181,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); - B_ (current_buffer, point_before_scroll) = Qnil; - B_ (other_buffer, point_before_scroll) = Qnil; + BVAR (current_buffer, point_before_scroll) = Qnil; + BVAR (other_buffer, point_before_scroll) = Qnil; current_buffer->text->modiff++; other_buffer->text->modiff++; current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++; @@ -2256,21 +2256,21 @@ current buffer is cleared. */) EMACS_INT begv, zv; int narrowed = (BEG != BEGV || Z != ZV); int modified_p = !NILP (Fbuffer_modified_p (Qnil)); - Lisp_Object old_undo = B_ (current_buffer, undo_list); + Lisp_Object old_undo = BVAR (current_buffer, undo_list); struct gcpro gcpro1; if (current_buffer->base_buffer) error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); /* Do nothing if nothing actually changes. */ - if (NILP (flag) == NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (flag) == NILP (BVAR (current_buffer, enable_multibyte_characters))) return flag; GCPRO1 (old_undo); /* Don't record these buffer changes. We will put a special undo entry instead. */ - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, undo_list) = Qt; /* If the cached position is for this buffer, clear it out. */ clear_charpos_cache (current_buffer); @@ -2292,7 +2292,7 @@ current buffer is cleared. */) to calculate the old correspondences. */ set_intervals_multibyte (0); - B_ (current_buffer, enable_multibyte_characters) = Qnil; + BVAR (current_buffer, enable_multibyte_characters) = Qnil; Z = Z_BYTE; BEGV = BEGV_BYTE; @@ -2430,7 +2430,7 @@ current buffer is cleared. */) /* Do this first, so that chars_in_text asks the right question. set_intervals_multibyte needs it too. */ - B_ (current_buffer, enable_multibyte_characters) = Qt; + BVAR (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; @@ -2488,7 +2488,7 @@ current buffer is cleared. */) if (!EQ (old_undo, Qt)) { /* Represent all the above changes by a special undo entry. */ - B_ (current_buffer, undo_list) = Fcons (list3 (Qapply, + BVAR (current_buffer, undo_list) = Fcons (list3 (Qapply, intern ("set-buffer-multibyte"), NILP (flag) ? Qt : Qnil), old_undo); @@ -2504,10 +2504,10 @@ current buffer is cleared. */) /* Copy this buffer's new multibyte status into all of its indirect buffers. */ for (other = all_buffers; other; other = other->next) - if (other->base_buffer == current_buffer && !NILP (B_ (other, name))) + if (other->base_buffer == current_buffer && !NILP (BVAR (other, name))) { - B_ (other, enable_multibyte_characters) - = B_ (current_buffer, enable_multibyte_characters); + BVAR (other, enable_multibyte_characters) + = BVAR (current_buffer, enable_multibyte_characters); other->prevent_redisplay_optimizations_p = 1; } @@ -2574,7 +2574,7 @@ swap_out_buffer_local_variables (struct buffer *b) Lisp_Object oalist, alist, buffer; XSETBUFFER (buffer, b); - oalist = B_ (b, local_var_alist); + oalist = BVAR (b, local_var_alist); for (alist = oalist; CONSP (alist); alist = XCDR (alist)) { @@ -3078,7 +3078,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0); ssl->used++; - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) nbytes = SCHARS (str); else if (! STRING_MULTIBYTE (str)) nbytes = count_size_as_multibyte (SDATA (str), @@ -3090,7 +3090,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str if (STRINGP (str2)) { - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) nbytes = SCHARS (str2); else if (! STRING_MULTIBYTE (str2)) nbytes = count_size_as_multibyte (SDATA (str2), @@ -3120,7 +3120,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) Lisp_Object overlay, window, str; struct Lisp_Overlay *ov; EMACS_INT startpos, endpos; - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); overlay_heads.used = overlay_heads.bytes = 0; overlay_tails.used = overlay_tails.bytes = 0; @@ -4991,9 +4991,9 @@ init_buffer_once (void) /* Make sure all markable slots in buffer_defaults are initialized reasonably, so mark_buffer won't choke. */ reset_buffer (&buffer_defaults); - eassert (EQ (B_ (&buffer_defaults, name), make_number (0))); + eassert (EQ (BVAR (&buffer_defaults, name), make_number (0))); reset_buffer_local_variables (&buffer_defaults, 1); - eassert (EQ (B_ (&buffer_local_symbols, name), make_number (0))); + eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0))); reset_buffer (&buffer_local_symbols); reset_buffer_local_variables (&buffer_local_symbols, 1); /* Prevent GC from getting confused. */ @@ -5010,60 +5010,60 @@ init_buffer_once (void) /* Must do these before making the first buffer! */ /* real setup is done in bindings.el */ - B_ (&buffer_defaults, mode_line_format) = make_pure_c_string ("%-"); - B_ (&buffer_defaults, header_line_format) = Qnil; - B_ (&buffer_defaults, abbrev_mode) = Qnil; - B_ (&buffer_defaults, overwrite_mode) = Qnil; - B_ (&buffer_defaults, case_fold_search) = Qt; - B_ (&buffer_defaults, auto_fill_function) = Qnil; - B_ (&buffer_defaults, selective_display) = Qnil; + BVAR (&buffer_defaults, mode_line_format) = make_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; #ifndef old - B_ (&buffer_defaults, selective_display_ellipses) = Qt; + BVAR (&buffer_defaults, selective_display_ellipses) = Qt; #endif - B_ (&buffer_defaults, abbrev_table) = Qnil; - B_ (&buffer_defaults, display_table) = Qnil; - B_ (&buffer_defaults, undo_list) = Qnil; - B_ (&buffer_defaults, mark_active) = Qnil; - B_ (&buffer_defaults, file_format) = Qnil; - B_ (&buffer_defaults, auto_save_file_format) = 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; buffer_defaults.overlays_before = NULL; buffer_defaults.overlays_after = NULL; buffer_defaults.overlay_center = BEG; - XSETFASTINT (B_ (&buffer_defaults, tab_width), 8); - B_ (&buffer_defaults, truncate_lines) = Qnil; - B_ (&buffer_defaults, word_wrap) = Qnil; - B_ (&buffer_defaults, ctl_arrow) = Qt; - B_ (&buffer_defaults, bidi_display_reordering) = Qnil; - B_ (&buffer_defaults, bidi_paragraph_direction) = Qnil; - B_ (&buffer_defaults, cursor_type) = Qt; - B_ (&buffer_defaults, extra_line_spacing) = Qnil; - B_ (&buffer_defaults, cursor_in_non_selected_windows) = Qt; + 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) = Qnil; + 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; #ifdef DOS_NT - B_ (&buffer_defaults, buffer_file_type) = Qnil; /* TEXT */ + BVAR (&buffer_defaults, buffer_file_type) = Qnil; /* TEXT */ #endif - B_ (&buffer_defaults, enable_multibyte_characters) = Qt; - B_ (&buffer_defaults, buffer_file_coding_system) = Qnil; - XSETFASTINT (B_ (&buffer_defaults, fill_column), 70); - XSETFASTINT (B_ (&buffer_defaults, left_margin), 0); - B_ (&buffer_defaults, cache_long_line_scans) = Qnil; - B_ (&buffer_defaults, file_truename) = Qnil; - XSETFASTINT (B_ (&buffer_defaults, display_count), 0); - XSETFASTINT (B_ (&buffer_defaults, left_margin_cols), 0); - XSETFASTINT (B_ (&buffer_defaults, right_margin_cols), 0); - B_ (&buffer_defaults, left_fringe_width) = Qnil; - B_ (&buffer_defaults, right_fringe_width) = Qnil; - B_ (&buffer_defaults, fringes_outside_margins) = Qnil; - B_ (&buffer_defaults, scroll_bar_width) = Qnil; - B_ (&buffer_defaults, vertical_scroll_bar_type) = Qt; - B_ (&buffer_defaults, indicate_empty_lines) = Qnil; - B_ (&buffer_defaults, indicate_buffer_boundaries) = Qnil; - B_ (&buffer_defaults, fringe_indicator_alist) = Qnil; - B_ (&buffer_defaults, fringe_cursor_alist) = Qnil; - B_ (&buffer_defaults, scroll_up_aggressively) = Qnil; - B_ (&buffer_defaults, scroll_down_aggressively) = Qnil; - B_ (&buffer_defaults, display_time) = Qnil; + BVAR (&buffer_defaults, enable_multibyte_characters) = Qt; + BVAR (&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; + 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; /* Assign the local-flags to the slots that have default values. The local flag is a bit that is used in the buffer @@ -5075,73 +5075,73 @@ 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); - XSETINT (B_ (&buffer_local_flags, filename), -1); - XSETINT (B_ (&buffer_local_flags, directory), -1); - XSETINT (B_ (&buffer_local_flags, backed_up), -1); - XSETINT (B_ (&buffer_local_flags, save_length), -1); - XSETINT (B_ (&buffer_local_flags, auto_save_file_name), -1); - XSETINT (B_ (&buffer_local_flags, read_only), -1); - XSETINT (B_ (&buffer_local_flags, major_mode), -1); - XSETINT (B_ (&buffer_local_flags, mode_name), -1); - XSETINT (B_ (&buffer_local_flags, undo_list), -1); - XSETINT (B_ (&buffer_local_flags, mark_active), -1); - XSETINT (B_ (&buffer_local_flags, point_before_scroll), -1); - XSETINT (B_ (&buffer_local_flags, file_truename), -1); - XSETINT (B_ (&buffer_local_flags, invisibility_spec), -1); - XSETINT (B_ (&buffer_local_flags, file_format), -1); - XSETINT (B_ (&buffer_local_flags, auto_save_file_format), -1); - XSETINT (B_ (&buffer_local_flags, display_count), -1); - XSETINT (B_ (&buffer_local_flags, display_time), -1); - XSETINT (B_ (&buffer_local_flags, enable_multibyte_characters), -1); + 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); idx = 1; - XSETFASTINT (B_ (&buffer_local_flags, mode_line_format), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, abbrev_mode), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, overwrite_mode), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, case_fold_search), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, auto_fill_function), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, selective_display), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, abbrev_mode), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, overwrite_mode), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, case_fold_search), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, auto_fill_function), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, selective_display), idx); ++idx; #ifndef old - XSETFASTINT (B_ (&buffer_local_flags, selective_display_ellipses), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, selective_display_ellipses), idx); ++idx; #endif - XSETFASTINT (B_ (&buffer_local_flags, tab_width), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, truncate_lines), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, word_wrap), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, ctl_arrow), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, fill_column), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, left_margin), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, abbrev_table), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, display_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, tab_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, word_wrap), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, ctl_arrow), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fill_column), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, left_margin), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, abbrev_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, display_table), idx); ++idx; #ifdef DOS_NT - XSETFASTINT (B_ (&buffer_local_flags, buffer_file_type), idx); + XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_type), idx); /* Make this one a permanent local. */ buffer_permanent_local_flags[idx++] = 1; #endif - XSETFASTINT (B_ (&buffer_local_flags, syntax_table), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, cache_long_line_scans), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, category_table), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, bidi_display_reordering), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, buffer_file_coding_system), idx); + XSETFASTINT (BVAR (&buffer_local_flags, syntax_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cache_long_line_scans), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx); /* Make this one a permanent local. */ buffer_permanent_local_flags[idx++] = 1; - XSETFASTINT (B_ (&buffer_local_flags, left_margin_cols), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, right_margin_cols), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, left_fringe_width), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, right_fringe_width), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, fringes_outside_margins), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, scroll_bar_width), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, indicate_empty_lines), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, header_line_format), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, cursor_type), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, extra_line_spacing), idx); ++idx; - XSETFASTINT (B_ (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, left_margin_cols), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, right_margin_cols), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, left_fringe_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, right_fringe_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringes_outside_margins), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_width), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, indicate_empty_lines), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, header_line_format), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cursor_type), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, extra_line_spacing), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; /* Need more room? */ if (idx >= MAX_PER_BUFFER_VARS) @@ -5155,7 +5155,7 @@ init_buffer_once (void) QSFundamental = make_pure_c_string ("Fundamental"); Qfundamental_mode = intern_c_string ("fundamental-mode"); - B_ (&buffer_defaults, major_mode) = Qfundamental_mode; + BVAR (&buffer_defaults, major_mode) = Qfundamental_mode; Qmode_class = intern_c_string ("mode-class"); @@ -5198,7 +5198,7 @@ init_buffer (void) #endif /* USE_MMAP_FOR_BUFFERS */ Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); - if (NILP (B_ (&buffer_defaults, enable_multibyte_characters))) + if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters))) Fset_buffer_multibyte (Qnil); pwd = get_current_dir_name (); @@ -5219,28 +5219,28 @@ init_buffer (void) pwd[len + 1] = '\0'; } - B_ (current_buffer, directory) = make_unibyte_string (pwd, strlen (pwd)); - if (! NILP (B_ (&buffer_defaults, enable_multibyte_characters))) + BVAR (current_buffer, directory) = make_unibyte_string (pwd, strlen (pwd)); + 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. */ - B_ (current_buffer, directory) - = string_to_multibyte (B_ (current_buffer, directory)); + BVAR (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. */ - temp = Ffind_file_name_handler (B_ (current_buffer, directory), Qt); + temp = Ffind_file_name_handler (BVAR (current_buffer, directory), Qt); if (! NILP (temp) /* If the default dir is just /, TEMP is non-nil because of the ange-ftp completion handler. However, it is not necessary to turn / into /:/. So avoid doing that. */ - && strcmp ("/", SSDATA (B_ (current_buffer, directory)))) - B_ (current_buffer, directory) - = concat2 (build_string ("/:"), B_ (current_buffer, directory)); + && strcmp ("/", SSDATA (BVAR (current_buffer, directory)))) + BVAR (current_buffer, directory) + = concat2 (build_string ("/:"), BVAR (current_buffer, directory)); temp = get_minibuffer (0); - B_ (XBUFFER (temp), directory) = B_ (current_buffer, directory); + BVAR (XBUFFER (temp), directory) = BVAR (current_buffer, directory); free (pwd); } @@ -5491,13 +5491,13 @@ This value applies in buffers that don't have their own local values. This is the same as (default-value 'scroll-down-aggressively). */); DEFVAR_PER_BUFFER ("header-line-format", - &B_ (current_buffer, header_line_format), + &BVAR (current_buffer, header_line_format), Qnil, doc: /* Analogous to `mode-line-format', but controls the header line. The header line appears, optionally, at the top of a window; the mode line appears at the bottom. */); - DEFVAR_PER_BUFFER ("mode-line-format", &B_ (current_buffer, mode_line_format), + DEFVAR_PER_BUFFER ("mode-line-format", &BVAR (current_buffer, mode_line_format), Qnil, doc: /* Template for displaying mode line for current buffer. Each buffer has its own value of this variable. @@ -5554,7 +5554,7 @@ Decimal digits after the % specify field width to which to pad. */); DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, doc: /* *Value of `major-mode' for new buffers. */); - DEFVAR_PER_BUFFER ("major-mode", &B_ (current_buffer, major_mode), + DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), make_number (Lisp_Symbol), doc: /* Symbol for current buffer's major mode. The default value (normally `fundamental-mode') affects new buffers. @@ -5567,46 +5567,46 @@ the buffer. Thus, the mode and its hooks should not expect certain variables such as `buffer-read-only' and `buffer-file-coding-system' to be set up. */); - DEFVAR_PER_BUFFER ("mode-name", &B_ (current_buffer, mode_name), + DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name), Qnil, doc: /* Pretty name of current buffer's major mode. Usually a string, but can use any of the constructs for `mode-line-format', which see. Format with `format-mode-line' to produce a string value. */); - DEFVAR_PER_BUFFER ("local-abbrev-table", &B_ (current_buffer, abbrev_table), Qnil, + DEFVAR_PER_BUFFER ("local-abbrev-table", &BVAR (current_buffer, abbrev_table), Qnil, doc: /* Local (mode-specific) abbrev table of current buffer. */); - DEFVAR_PER_BUFFER ("abbrev-mode", &B_ (current_buffer, abbrev_mode), Qnil, + DEFVAR_PER_BUFFER ("abbrev-mode", &BVAR (current_buffer, abbrev_mode), Qnil, doc: /* Non-nil if Abbrev mode is enabled. Use the command `abbrev-mode' to change this variable. */); - DEFVAR_PER_BUFFER ("case-fold-search", &B_ (current_buffer, case_fold_search), + DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search), Qnil, doc: /* *Non-nil if searches and matches should ignore case. */); - DEFVAR_PER_BUFFER ("fill-column", &B_ (current_buffer, fill_column), + DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), make_number (LISP_INT_TAG), doc: /* *Column beyond which automatic line-wrapping should happen. Interactively, you can set the buffer local value using \\[set-fill-column]. */); - DEFVAR_PER_BUFFER ("left-margin", &B_ (current_buffer, left_margin), + DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), make_number (LISP_INT_TAG), doc: /* *Column for the default `indent-line-function' to indent to. Linefeed indents to this column in Fundamental mode. */); - DEFVAR_PER_BUFFER ("tab-width", &B_ (current_buffer, tab_width), + DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), make_number (LISP_INT_TAG), doc: /* *Distance between tab stops (for display of tab characters), in columns. */); - DEFVAR_PER_BUFFER ("ctl-arrow", &B_ (current_buffer, ctl_arrow), Qnil, + DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, doc: /* *Non-nil means display control chars with uparrow. A value of nil means use backslash and octal digits. This variable does not apply to characters whose display is specified in the current display table (if there is one). */); DEFVAR_PER_BUFFER ("enable-multibyte-characters", - &B_ (current_buffer, enable_multibyte_characters), + &BVAR (current_buffer, enable_multibyte_characters), Qnil, doc: /* Non-nil means the buffer contents are regarded as multi-byte characters. Otherwise they are regarded as unibyte. This affects the display, @@ -5620,7 +5620,7 @@ See also variable `default-enable-multibyte-characters' and Info node XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; DEFVAR_PER_BUFFER ("buffer-file-coding-system", - &B_ (current_buffer, buffer_file_coding_system), Qnil, + &BVAR (current_buffer, buffer_file_coding_system), Qnil, doc: /* Coding system to be used for encoding the buffer contents on saving. This variable applies to saving the buffer, and also to `write-region' and other functions that use `write-region'. @@ -5638,11 +5638,11 @@ The variable `coding-system-for-write', if non-nil, overrides this variable. This variable is never applied to a way of decoding a file while reading it. */); DEFVAR_PER_BUFFER ("bidi-display-reordering", - &B_ (current_buffer, bidi_display_reordering), Qnil, + &BVAR (current_buffer, bidi_display_reordering), Qnil, doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); DEFVAR_PER_BUFFER ("bidi-paragraph-direction", - &B_ (current_buffer, bidi_paragraph_direction), Qnil, + &BVAR (current_buffer, bidi_paragraph_direction), Qnil, doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. If this is nil (the default), the direction of each paragraph is @@ -5653,7 +5653,7 @@ Any other value is treated as nil. This variable has no effect unless the buffer's value of \`bidi-display-reordering' is non-nil. */); - DEFVAR_PER_BUFFER ("truncate-lines", &B_ (current_buffer, truncate_lines), Qnil, + DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil, doc: /* *Non-nil means do not display continuation lines. Instead, give each line of text just one screen line. @@ -5661,7 +5661,7 @@ Note that this is overridden by the variable `truncate-partial-width-windows' if that variable is non-nil and this buffer is not full-frame width. */); - DEFVAR_PER_BUFFER ("word-wrap", &B_ (current_buffer, word_wrap), Qnil, + DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil, doc: /* *Non-nil means to use word-wrapping for continuation lines. When word-wrapping is on, continuation lines are wrapped at the space or tab character nearest to the right window edge. @@ -5674,7 +5674,7 @@ word-wrapping, you might want to reduce the value of in narrower windows. */); #ifdef DOS_NT - DEFVAR_PER_BUFFER ("buffer-file-type", &B_ (current_buffer, buffer_file_type), + DEFVAR_PER_BUFFER ("buffer-file-type", &BVAR (current_buffer, buffer_file_type), Qnil, doc: /* Non-nil if the visited file is a binary file. This variable is meaningful on MS-DOG and Windows NT. @@ -5682,12 +5682,12 @@ On those systems, it is automatically local in every buffer. On other systems, this variable is normally always nil. */); #endif - DEFVAR_PER_BUFFER ("default-directory", &B_ (current_buffer, directory), + DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory), make_number (Lisp_String), doc: /* Name of default directory of current buffer. Should end with slash. To interactively change the default directory, use command `cd'. */); - DEFVAR_PER_BUFFER ("auto-fill-function", &B_ (current_buffer, auto_fill_function), + DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function), Qnil, doc: /* Function called (if non-nil) to perform auto-fill. It is called after self-inserting any character specified in @@ -5695,30 +5695,30 @@ the `auto-fill-chars' table. NOTE: This variable is not a hook; its value may not be a list of functions. */); - DEFVAR_PER_BUFFER ("buffer-file-name", &B_ (current_buffer, filename), + DEFVAR_PER_BUFFER ("buffer-file-name", &BVAR (current_buffer, filename), make_number (Lisp_String), doc: /* Name of file visited in current buffer, or nil if not visiting a file. */); - DEFVAR_PER_BUFFER ("buffer-file-truename", &B_ (current_buffer, file_truename), + DEFVAR_PER_BUFFER ("buffer-file-truename", &BVAR (current_buffer, file_truename), make_number (Lisp_String), doc: /* Abbreviated truename of file visited in current buffer, or nil if none. The truename of a file is calculated by `file-truename' and then abbreviated with `abbreviate-file-name'. */); DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", - &B_ (current_buffer, auto_save_file_name), + &BVAR (current_buffer, auto_save_file_name), make_number (Lisp_String), doc: /* Name of file for auto-saving current buffer. If it is nil, that means don't auto-save this buffer. */); - DEFVAR_PER_BUFFER ("buffer-read-only", &B_ (current_buffer, read_only), Qnil, + DEFVAR_PER_BUFFER ("buffer-read-only", &BVAR (current_buffer, read_only), Qnil, doc: /* Non-nil if this buffer is read-only. */); - DEFVAR_PER_BUFFER ("buffer-backed-up", &B_ (current_buffer, backed_up), Qnil, + DEFVAR_PER_BUFFER ("buffer-backed-up", &BVAR (current_buffer, backed_up), Qnil, doc: /* Non-nil if this buffer's file has been backed up. Backing up is done before the first time the file is saved. */); - DEFVAR_PER_BUFFER ("buffer-saved-size", &B_ (current_buffer, save_length), + DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length), make_number (LISP_INT_TAG), doc: /* Length of current buffer when last read in, saved or auto-saved. 0 initially. @@ -5728,7 +5728,7 @@ If you set this to -2, that means don't turn off auto-saving in this buffer if its text size shrinks. If you use `buffer-swap-text' on a buffer, you probably should set this to -2 in that buffer. */); - DEFVAR_PER_BUFFER ("selective-display", &B_ (current_buffer, selective_display), + DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer, selective_display), Qnil, doc: /* Non-nil enables selective display. An integer N as value means display only lines @@ -5739,12 +5739,12 @@ in a file, save the ^M as a newline. */); #ifndef old DEFVAR_PER_BUFFER ("selective-display-ellipses", - &B_ (current_buffer, selective_display_ellipses), + &BVAR (current_buffer, selective_display_ellipses), Qnil, doc: /* Non-nil means display ... on previous line when a line is invisible. */); #endif - DEFVAR_PER_BUFFER ("overwrite-mode", &B_ (current_buffer, overwrite_mode), Qnil, + DEFVAR_PER_BUFFER ("overwrite-mode", &BVAR (current_buffer, overwrite_mode), Qnil, doc: /* Non-nil if self-insertion should replace existing text. The value should be one of `overwrite-mode-textual', `overwrite-mode-binary', or nil. @@ -5753,7 +5753,7 @@ inserts at the end of a line, and inserts when point is before a tab, until the tab is filled in. If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */); - DEFVAR_PER_BUFFER ("buffer-display-table", &B_ (current_buffer, display_table), + DEFVAR_PER_BUFFER ("buffer-display-table", &BVAR (current_buffer, display_table), Qnil, doc: /* Display table that controls display of the contents of current buffer. @@ -5790,39 +5790,39 @@ In addition, a char-table has six extra slots to control the display of: See also the functions `display-table-slot' and `set-display-table-slot'. */); - DEFVAR_PER_BUFFER ("left-margin-width", &B_ (current_buffer, left_margin_cols), + DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), Qnil, doc: /* *Width of left marginal area for display of a buffer. A value of nil means no marginal area. */); - DEFVAR_PER_BUFFER ("right-margin-width", &B_ (current_buffer, right_margin_cols), + DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), Qnil, doc: /* *Width of right marginal area for display of a buffer. A value of nil means no marginal area. */); - DEFVAR_PER_BUFFER ("left-fringe-width", &B_ (current_buffer, left_fringe_width), + DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width), Qnil, doc: /* *Width of this buffer's left fringe (in pixels). A value of 0 means no left fringe is shown in this buffer's window. A value of nil means to use the left fringe width from the window's frame. */); - DEFVAR_PER_BUFFER ("right-fringe-width", &B_ (current_buffer, right_fringe_width), + DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width), Qnil, doc: /* *Width of this buffer's right fringe (in pixels). A value of 0 means no right fringe is shown in this buffer's window. A value of nil means to use the right fringe width from the window's frame. */); - DEFVAR_PER_BUFFER ("fringes-outside-margins", &B_ (current_buffer, fringes_outside_margins), + DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins), Qnil, doc: /* *Non-nil means to display fringes outside display margins. A value of nil means to display fringes between margins and buffer text. */); - DEFVAR_PER_BUFFER ("scroll-bar-width", &B_ (current_buffer, scroll_bar_width), + DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), Qnil, doc: /* *Width of this buffer's scroll bars in pixels. A value of nil means to use the scroll bar width from the window's frame. */); - DEFVAR_PER_BUFFER ("vertical-scroll-bar", &B_ (current_buffer, vertical_scroll_bar_type), + DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), Qnil, doc: /* *Position of this buffer's vertical scroll bar. The value takes effect whenever you tell a window to display this buffer; @@ -5833,13 +5833,13 @@ of the window; a value of nil means don't show any vertical scroll bars. A value of t (the default) means do whatever the window's frame specifies. */); DEFVAR_PER_BUFFER ("indicate-empty-lines", - &B_ (current_buffer, indicate_empty_lines), Qnil, + &BVAR (current_buffer, indicate_empty_lines), Qnil, doc: /* *Visually indicate empty lines after the buffer end. If non-nil, a bitmap is displayed in the left fringe of a window on window-systems. */); DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", - &B_ (current_buffer, indicate_buffer_boundaries), Qnil, + &BVAR (current_buffer, indicate_buffer_boundaries), Qnil, doc: /* *Visually indicate buffer boundaries and scrolling. If non-nil, the first and last line of the buffer are marked in the fringe of a window on window-systems with angle bitmaps, or if the window can be @@ -5864,7 +5864,7 @@ bitmaps in right fringe. To show just the angle bitmaps in the left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); DEFVAR_PER_BUFFER ("fringe-indicator-alist", - &B_ (current_buffer, fringe_indicator_alist), Qnil, + &BVAR (current_buffer, fringe_indicator_alist), Qnil, doc: /* *Mapping from logical to physical fringe indicator bitmaps. The value is an alist where each element (INDICATOR . BITMAPS) specifies the fringe bitmaps used to display a specific logical @@ -5883,7 +5883,7 @@ last (only) line has no final newline. BITMAPS may also be a single symbol which is used in both left and right fringes. */); DEFVAR_PER_BUFFER ("fringe-cursor-alist", - &B_ (current_buffer, fringe_cursor_alist), Qnil, + &BVAR (current_buffer, fringe_cursor_alist), Qnil, doc: /* *Mapping from logical to physical fringe cursor bitmaps. The value is an alist where each element (CURSOR . BITMAP) specifies the fringe bitmaps used to display a specific logical @@ -5898,7 +5898,7 @@ BITMAP is the corresponding fringe bitmap shown for the logical cursor type. */); DEFVAR_PER_BUFFER ("scroll-up-aggressively", - &B_ (current_buffer, scroll_up_aggressively), Qnil, + &BVAR (current_buffer, scroll_up_aggressively), Qnil, doc: /* How far to scroll windows upward. If you move point off the bottom, the window scrolls automatically. This variable controls how far it scrolls. The value nil, the default, @@ -5911,7 +5911,7 @@ window scrolls by a full window height. Meaningful values are between 0.0 and 1.0, inclusive. */); DEFVAR_PER_BUFFER ("scroll-down-aggressively", - &B_ (current_buffer, scroll_down_aggressively), Qnil, + &BVAR (current_buffer, scroll_down_aggressively), Qnil, doc: /* How far to scroll windows downward. If you move point off the top, the window scrolls automatically. This variable controls how far it scrolls. The value nil, the default, @@ -5966,7 +5966,7 @@ from happening repeatedly and making Emacs nonfunctional. */); The functions are run using the `run-hooks' function. */); Vfirst_change_hook = Qnil; - DEFVAR_PER_BUFFER ("buffer-undo-list", &B_ (current_buffer, undo_list), Qnil, + DEFVAR_PER_BUFFER ("buffer-undo-list", &BVAR (current_buffer, undo_list), Qnil, doc: /* List of undo entries in current buffer. Recent changes come first; older changes follow newer. @@ -6007,10 +6007,10 @@ the changes between two undo boundaries as a single step to be undone. If the value of the variable is t, undo information is not recorded. */); - DEFVAR_PER_BUFFER ("mark-active", &B_ (current_buffer, mark_active), Qnil, + DEFVAR_PER_BUFFER ("mark-active", &BVAR (current_buffer, mark_active), Qnil, doc: /* Non-nil means the mark and region are currently active in this buffer. */); - DEFVAR_PER_BUFFER ("cache-long-line-scans", &B_ (current_buffer, cache_long_line_scans), Qnil, + DEFVAR_PER_BUFFER ("cache-long-line-scans", &BVAR (current_buffer, cache_long_line_scans), Qnil, doc: /* Non-nil means that Emacs should use caches to handle long lines more quickly. Normally, the line-motion functions work by scanning the buffer for @@ -6038,23 +6038,23 @@ maintained internally by the Emacs primitives. Enabling or disabling the cache should not affect the behavior of any of the motion functions; it should only affect their performance. */); - DEFVAR_PER_BUFFER ("point-before-scroll", &B_ (current_buffer, point_before_scroll), Qnil, + DEFVAR_PER_BUFFER ("point-before-scroll", &BVAR (current_buffer, point_before_scroll), Qnil, doc: /* Value of point before the last series of scroll operations, or nil. */); - DEFVAR_PER_BUFFER ("buffer-file-format", &B_ (current_buffer, file_format), Qnil, + DEFVAR_PER_BUFFER ("buffer-file-format", &BVAR (current_buffer, file_format), Qnil, doc: /* List of formats to use when saving this buffer. Formats are defined by `format-alist'. This variable is set when a file is visited. */); DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", - &B_ (current_buffer, auto_save_file_format), Qnil, + &BVAR (current_buffer, auto_save_file_format), Qnil, doc: /* *Format in which to write auto-save files. Should be a list of symbols naming formats that are defined in `format-alist'. If it is t, which is the default, auto-save files are written in the same format as a regular save would use. */); DEFVAR_PER_BUFFER ("buffer-invisibility-spec", - &B_ (current_buffer, invisibility_spec), Qnil, + &BVAR (current_buffer, invisibility_spec), Qnil, doc: /* Invisibility spec of this buffer. The default is t, which means that text is invisible if it has a non-nil `invisible' property. @@ -6065,12 +6065,12 @@ then characters with property value PROP are invisible, and they have an ellipsis as well if ELLIPSIS is non-nil. */); DEFVAR_PER_BUFFER ("buffer-display-count", - &B_ (current_buffer, display_count), Qnil, + &BVAR (current_buffer, display_count), Qnil, doc: /* A number incremented each time this buffer is displayed in a window. The function `set-window-buffer' increments it. */); DEFVAR_PER_BUFFER ("buffer-display-time", - &B_ (current_buffer, display_time), Qnil, + &BVAR (current_buffer, display_time), Qnil, doc: /* Time stamp updated each time this buffer is displayed in a window. The function `set-window-buffer' updates this variable to the value obtained by calling `current-time'. @@ -6105,7 +6105,7 @@ and disregard a `read-only' text property if the property value is a member of the list. */); Vinhibit_read_only = Qnil; - DEFVAR_PER_BUFFER ("cursor-type", &B_ (current_buffer, cursor_type), Qnil, + DEFVAR_PER_BUFFER ("cursor-type", &BVAR (current_buffer, cursor_type), Qnil, doc: /* Cursor to use when this buffer is in the selected window. Values are interpreted as follows: @@ -6124,7 +6124,7 @@ cursor's appearance is instead controlled by the variable `cursor-in-non-selected-windows'. */); DEFVAR_PER_BUFFER ("line-spacing", - &B_ (current_buffer, extra_line_spacing), Qnil, + &BVAR (current_buffer, extra_line_spacing), Qnil, doc: /* Additional space to put between lines when displaying a buffer. The space is measured in pixels, and put below lines on graphic displays, see `display-graphic-p'. @@ -6132,7 +6132,7 @@ If value is a floating point number, it specifies the spacing relative to the default frame line height. A value of nil means add no extra space. */); DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", - &B_ (current_buffer, cursor_in_non_selected_windows), Qnil, + &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil, doc: /* *Non-nil means show a cursor in non-selected windows. If nil, only shows a cursor in the selected window. If t, displays a cursor related to the usual cursor type diff --git a/src/buffer.h b/src/buffer.h index 36cb5fe9dda..19a7c0b4632 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -321,7 +321,7 @@ while (0) /* Return character at byte position POS. */ #define FETCH_CHAR(pos) \ - (!NILP (B_ (current_buffer, enable_multibyte_characters)) \ + (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \ ? FETCH_MULTIBYTE_CHAR ((pos)) \ : FETCH_BYTE ((pos))) @@ -346,7 +346,7 @@ extern unsigned char *_fetch_multibyte_char_p; multibyte. */ #define FETCH_CHAR_AS_MULTIBYTE(pos) \ - (!NILP (B_ (current_buffer, enable_multibyte_characters)) \ + (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \ ? FETCH_MULTIBYTE_CHAR ((pos)) \ : UNIBYTE_TO_CHAR (FETCH_BYTE ((pos)))) @@ -465,13 +465,13 @@ struct buffer_text }; /* Lisp fields in struct buffer are hidden from most code and accessed - via the B_ macro, below. Only select pieces of code, like the GC, + via the BVAR macro, below. Only select pieces of code, like the GC, are allowed to use BUFFER_INTERNAL_FIELD. */ #define BUFFER_INTERNAL_FIELD(field) field ## _ /* Most code should use this macro to access Lisp fields in struct buffer. */ -#define B_(buf, field) ((buf)->BUFFER_INTERNAL_FIELD (field)) +#define BVAR(buf, field) ((buf)->BUFFER_INTERNAL_FIELD (field)) /* This is the structure that the buffer Lisp object points to. */ diff --git a/src/bytecode.c b/src/bytecode.c index a470eca16a9..a88df080c5a 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1398,7 +1398,7 @@ If the third argument is incorrect, Emacs may crash. */) CHECK_CHARACTER (TOP); AFTER_POTENTIAL_GC (); c = XFASTINT (TOP); - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) MAKE_CHAR_MULTIBYTE (c); XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (c)]); } diff --git a/src/callint.c b/src/callint.c index 154659490b8..b998c70187d 100644 --- a/src/callint.c +++ b/src/callint.c @@ -149,12 +149,12 @@ static void check_mark (int for_region) { Lisp_Object tem; - tem = Fmarker_buffer (B_ (current_buffer, mark)); + tem = Fmarker_buffer (BVAR (current_buffer, mark)); if (NILP (tem) || (XBUFFER (tem) != current_buffer)) error (for_region ? "The mark is not set now, so there is no region" : "The mark is not set now"); if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive) - && NILP (B_ (current_buffer, mark_active))) + && NILP (BVAR (current_buffer, mark_active))) xsignal0 (Qmark_inactive); } @@ -385,7 +385,7 @@ invoke it. If KEYS is omitted or nil, the return value of else if (*string == '*') { string++; - if (!NILP (B_ (current_buffer, read_only))) + if (!NILP (BVAR (current_buffer, read_only))) { if (!NILP (record_flag)) { @@ -543,7 +543,7 @@ invoke it. If KEYS is omitted or nil, the return value of case 'D': /* Directory name. */ args[i] = Fread_file_name (callint_message, Qnil, - B_ (current_buffer, directory), Qlambda, Qnil, + BVAR (current_buffer, directory), Qlambda, Qnil, Qfile_directory_p); break; @@ -661,7 +661,7 @@ invoke it. If KEYS is omitted or nil, the return value of case 'm': /* Value of mark. Does not do I/O. */ check_mark (0); /* visargs[i] = Qnil; */ - args[i] = B_ (current_buffer, mark); + args[i] = BVAR (current_buffer, mark); varies[i] = 2; break; @@ -717,11 +717,11 @@ invoke it. If KEYS is omitted or nil, the return value of check_mark (1); set_marker_both (point_marker, Qnil, PT, PT_BYTE); /* visargs[i+1] = Qnil; */ - foo = marker_position (B_ (current_buffer, mark)); + foo = marker_position (BVAR (current_buffer, mark)); /* visargs[i] = Qnil; */ - args[i] = PT < foo ? point_marker : B_ (current_buffer, mark); + args[i] = PT < foo ? point_marker : BVAR (current_buffer, mark); varies[i] = 3; - args[++i] = PT > foo ? point_marker : B_ (current_buffer, mark); + args[++i] = PT > foo ? point_marker : BVAR (current_buffer, mark); varies[i] = 4; break; diff --git a/src/callproc.c b/src/callproc.c index bdd3060bef1..20018c688c9 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -265,7 +265,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (nargs >= 2 && ! NILP (args[1])) { - infile = Fexpand_file_name (args[1], B_ (current_buffer, directory)); + infile = Fexpand_file_name (args[1], BVAR (current_buffer, directory)); CHECK_STRING (infile); } else @@ -322,7 +322,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) { struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; - current_dir = B_ (current_buffer, directory); + current_dir = BVAR (current_buffer, directory); GCPRO4 (infile, buffer, current_dir, error_file); @@ -336,7 +336,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (NILP (Ffile_accessible_directory_p (current_dir))) report_file_error ("Setting current directory", - Fcons (B_ (current_buffer, directory), Qnil)); + Fcons (BVAR (current_buffer, directory), Qnil)); if (STRING_MULTIBYTE (infile)) infile = ENCODE_FILE (infile); @@ -663,7 +663,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) /* In unibyte mode, character code conversion should not take place but EOL conversion should. So, setup raw-text or one of the subsidiary according to the information just setup. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && !NILP (val)) val = raw_text_coding_system (val); setup_coding_system (val, &process_coding); @@ -713,7 +713,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (!NILP (buffer)) { - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! CODING_MAY_REQUIRE_DECODING (&process_coding)) insert_1_both (buf, nread, nread, 0, 1, 0); else @@ -926,7 +926,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r /* Decide coding-system of the contents of the temporary file. */ if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; - else if (NILP (B_ (current_buffer, enable_multibyte_characters))) + else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) val = Qraw_text; else { diff --git a/src/casefiddle.c b/src/casefiddle.c index 6c05aecffe8..26fa0db2d77 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -39,15 +39,15 @@ casify_object (enum case_action flag, Lisp_Object obj) register int inword = flag == CASE_DOWN; /* If the case table is flagged as modified, rescan it. */ - if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1])) - Fset_case_table (B_ (current_buffer, downcase_table)); + if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1])) + Fset_case_table (BVAR (current_buffer, downcase_table)); if (INTEGERP (obj)) { int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER | CHAR_SHIFT | CHAR_CTL | CHAR_META); int flags = XINT (obj) & flagbits; - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); /* If the character has higher bits set above the flags, return it unchanged. @@ -198,7 +198,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) { register int c; register int inword = flag == CASE_DOWN; - register int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + register int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); EMACS_INT start, end; EMACS_INT start_byte, end_byte; EMACS_INT first = -1, last; /* Position of first and last changes. */ @@ -210,8 +210,8 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) return; /* If the case table is flagged as modified, rescan it. */ - if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1])) - Fset_case_table (B_ (current_buffer, downcase_table)); + if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1])) + Fset_case_table (BVAR (current_buffer, downcase_table)); validate_region (&b, &e); start = XFASTINT (b); diff --git a/src/casetab.c b/src/casetab.c index 85c2d6e1581..5207e5315ae 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -71,7 +71,7 @@ DEFUN ("current-case-table", Fcurrent_case_table, Scurrent_case_table, 0, 0, 0, doc: /* Return the case table of the current buffer. */) (void) { - return B_ (current_buffer, downcase_table); + return BVAR (current_buffer, downcase_table); } DEFUN ("standard-case-table", Fstandard_case_table, Sstandard_case_table, 0, 0, 0, @@ -160,10 +160,10 @@ set_case_table (Lisp_Object table, int standard) } else { - B_ (current_buffer, downcase_table) = table; - B_ (current_buffer, upcase_table) = up; - B_ (current_buffer, case_canon_table) = canon; - B_ (current_buffer, case_eqv_table) = eqv; + 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; } return table; diff --git a/src/category.c b/src/category.c index bf8269ffd75..bcd73d3a487 100644 --- a/src/category.c +++ b/src/category.c @@ -190,7 +190,7 @@ Lisp_Object check_category_table (Lisp_Object table) { if (NILP (table)) - return B_ (current_buffer, category_table); + return BVAR (current_buffer, category_table); CHECK_TYPE (!NILP (Fcategory_table_p (table)), Qcategory_table_p, table); return table; } @@ -200,7 +200,7 @@ DEFUN ("category-table", Fcategory_table, Scategory_table, 0, 0, 0, This is the one specified by the current buffer. */) (void) { - return B_ (current_buffer, category_table); + return BVAR (current_buffer, category_table); } DEFUN ("standard-category-table", Fstandard_category_table, @@ -281,7 +281,7 @@ Return TABLE. */) { int idx; table = check_category_table (table); - B_ (current_buffer, category_table) = table; + BVAR (current_buffer, category_table) = 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); @@ -292,7 +292,7 @@ Return TABLE. */) Lisp_Object char_category_set (int c) { - return CHAR_TABLE_REF (B_ (current_buffer, category_table), c); + return CHAR_TABLE_REF (BVAR (current_buffer, category_table), c); } DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0, diff --git a/src/category.h b/src/category.h index 16b31da0819..b279f3d9c59 100644 --- a/src/category.h +++ b/src/category.h @@ -91,7 +91,7 @@ extern Lisp_Object _temp_category_set; /* The standard category table is stored where it will automatically be used in all new buffers. */ -#define Vstandard_category_table B_ (&buffer_defaults, category_table) +#define Vstandard_category_table BVAR (&buffer_defaults, category_table) /* Return the category set of character C in the current category table. */ #define CATEGORY_SET(c) char_category_set (c) diff --git a/src/character.c b/src/character.c index e4ff3d7922c..f12c4f28d31 100644 --- a/src/character.c +++ b/src/character.c @@ -521,7 +521,7 @@ chars_in_text (const unsigned char *ptr, EMACS_INT nbytes) { /* current_buffer is null at early stages of Emacs initialization. */ if (current_buffer == 0 - || NILP (B_ (current_buffer, enable_multibyte_characters))) + || NILP (BVAR (current_buffer, enable_multibyte_characters))) return nbytes; return multibyte_chars_in_text (ptr, nbytes); @@ -987,7 +987,7 @@ character is not ASCII nor 8-bit character, an error is signalled. */) pos = XFASTINT (position); p = CHAR_POS_ADDR (pos); } - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) return make_number (*p); } else diff --git a/src/character.h b/src/character.h index f2d06102f62..fb29ced66b7 100644 --- a/src/character.h +++ b/src/character.h @@ -417,7 +417,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ do \ { \ CHARIDX++; \ - if (!NILP (B_ (current_buffer, enable_multibyte_characters))) \ + if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \ { \ unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ int len; \ @@ -484,7 +484,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ do \ { \ (charpos)++; \ - if (NILP (B_ (current_buffer, enable_multibyte_characters))) \ + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) \ (bytepos)++; \ else \ INC_POS ((bytepos)); \ @@ -498,7 +498,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ do \ { \ (charpos)--; \ - if (NILP (B_ (current_buffer, enable_multibyte_characters))) \ + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) \ (bytepos)--; \ else \ DEC_POS ((bytepos)); \ @@ -561,11 +561,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define ASCII_CHAR_WIDTH(c) \ (c < 0x20 \ ? (c == '\t' \ - ? XFASTINT (B_ (current_buffer, tab_width)) \ - : (c == '\n' ? 0 : (NILP (B_ (current_buffer, ctl_arrow)) ? 4 : 2))) \ + ? XFASTINT (BVAR (current_buffer, tab_width)) \ + : (c == '\n' ? 0 : (NILP (BVAR (current_buffer, ctl_arrow)) ? 4 : 2))) \ : (c < 0x7f \ ? 1 \ - : ((NILP (B_ (current_buffer, ctl_arrow)) ? 4 : 2)))) + : ((NILP (BVAR (current_buffer, ctl_arrow)) ? 4 : 2)))) /* Return the width of character C. The width is measured by how many columns C will occupy on the screen when displayed in the current diff --git a/src/charset.c b/src/charset.c index 80e6a114197..3624e740acb 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1554,7 +1554,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) EMACS_INT from, from_byte, to, stop, stop_byte; int i; Lisp_Object val; - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); validate_region (&beg, &end); from = XFASTINT (beg); diff --git a/src/cmds.c b/src/cmds.c index e82ada6f03c..253b8d6a5ec 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -292,10 +292,10 @@ After insertion, the value of `auto-fill-function' is called if the } if (remove_boundary - && CONSP (B_ (current_buffer, undo_list)) - && NILP (XCAR (B_ (current_buffer, undo_list)))) + && CONSP (BVAR (current_buffer, undo_list)) + && NILP (XCAR (BVAR (current_buffer, undo_list)))) /* Remove the undo_boundary that was just pushed. */ - B_ (current_buffer, undo_list) = XCDR (B_ (current_buffer, undo_list)); + BVAR (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)) @@ -335,12 +335,12 @@ internal_self_insert (int c, EMACS_INT n) EMACS_INT chars_to_delete = 0; EMACS_INT spaces_to_insert = 0; - overwrite = B_ (current_buffer, overwrite_mode); + overwrite = BVAR (current_buffer, overwrite_mode); if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions)) hairy = 1; /* At first, get multi-byte form of C in STR. */ - if (!NILP (B_ (current_buffer, enable_multibyte_characters))) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) { len = CHAR_STRING (c, str); if (len == 1) @@ -416,11 +416,11 @@ internal_self_insert (int c, EMACS_INT n) synt = SYNTAX (c); - if (!NILP (B_ (current_buffer, abbrev_mode)) + if (!NILP (BVAR (current_buffer, abbrev_mode)) && synt != Sword - && NILP (B_ (current_buffer, read_only)) + && NILP (BVAR (current_buffer, read_only)) && PT > BEGV - && (SYNTAX (!NILP (B_ (current_buffer, enable_multibyte_characters)) + && (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters)) ? XFASTINT (Fprevious_char ()) : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) == Sword)) @@ -448,7 +448,7 @@ internal_self_insert (int c, EMACS_INT n) if (chars_to_delete) { - int mc = ((NILP (B_ (current_buffer, enable_multibyte_characters)) + int mc = ((NILP (BVAR (current_buffer, enable_multibyte_characters)) && SINGLE_BYTE_CHAR_P (c)) ? UNIBYTE_TO_CHAR (c) : c); Lisp_Object string = Fmake_string (make_number (n), make_number (mc)); @@ -479,7 +479,7 @@ internal_self_insert (int c, EMACS_INT n) if ((CHAR_TABLE_P (Vauto_fill_chars) ? !NILP (CHAR_TABLE_REF (Vauto_fill_chars, c)) : (c == ' ' || c == '\n')) - && !NILP (B_ (current_buffer, auto_fill_function))) + && !NILP (BVAR (current_buffer, auto_fill_function))) { Lisp_Object tem; @@ -488,7 +488,7 @@ internal_self_insert (int c, EMACS_INT n) that. Must have the newline in place already so filling and justification, if any, know where the end is going to be. */ SET_PT_BOTH (PT - 1, PT_BYTE - 1); - tem = call0 (B_ (current_buffer, auto_fill_function)); + tem = call0 (BVAR (current_buffer, auto_fill_function)); /* Test PT < ZV in case the auto-fill-function is strange. */ if (c == '\n' && PT < ZV) SET_PT_BOTH (PT + 1, PT_BYTE + 1); diff --git a/src/coding.c b/src/coding.c index 899cca6d5aa..f6310369ad3 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7038,8 +7038,8 @@ decode_coding (struct coding_system *coding) set_buffer_internal (XBUFFER (coding->dst_object)); if (GPT != PT) move_gap_both (PT, PT_BYTE); - undo_list = B_ (current_buffer, undo_list); - B_ (current_buffer, undo_list) = Qt; + undo_list = BVAR (current_buffer, undo_list); + BVAR (current_buffer, undo_list) = Qt; } coding->consumed = coding->consumed_char = 0; @@ -7136,7 +7136,7 @@ decode_coding (struct coding_system *coding) decode_eol (coding); if (BUFFERP (coding->dst_object)) { - B_ (current_buffer, undo_list) = undo_list; + BVAR (current_buffer, undo_list) = undo_list; record_insert (coding->dst_pos, coding->produced_char); } return coding->result; @@ -7433,7 +7433,7 @@ encode_coding (struct coding_system *coding) { set_buffer_internal (XBUFFER (coding->dst_object)); coding->dst_multibyte - = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); } coding->consumed = coding->consumed_char = 0; @@ -7504,8 +7504,8 @@ make_conversion_work_buffer (int multibyte) doesn't compile new regexps. */ Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt); Ferase_buffer (); - B_ (current_buffer, undo_list) = Qt; - B_ (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil; + BVAR (current_buffer, undo_list) = Qt; + BVAR (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil; set_buffer_internal (current); return workbuf; } @@ -7562,7 +7562,7 @@ decode_coding_gap (struct coding_system *coding, coding->dst_object = coding->src_object; coding->dst_pos = PT; coding->dst_pos_byte = PT_BYTE; - coding->dst_multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + coding->dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); if (CODING_REQUIRE_DETECTION (coding)) detect_coding (coding); @@ -7728,7 +7728,7 @@ decode_coding_object (struct coding_system *coding, coding->dst_pos = BUF_PT (XBUFFER (dst_object)); coding->dst_pos_byte = BUF_PT_BYTE (XBUFFER (dst_object)); coding->dst_multibyte - = ! NILP (B_ (XBUFFER (dst_object), enable_multibyte_characters)); + = ! NILP (BVAR (XBUFFER (dst_object), enable_multibyte_characters)); } else { @@ -7798,7 +7798,7 @@ decode_coding_object (struct coding_system *coding, TEMP_SET_PT_BOTH (saved_pt, saved_pt_byte); else if (saved_pt < from + chars) TEMP_SET_PT_BOTH (from, from_byte); - else if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + else if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) TEMP_SET_PT_BOTH (saved_pt + (coding->produced_char - chars), saved_pt_byte + (coding->produced - bytes)); else @@ -7822,7 +7822,7 @@ decode_coding_object (struct coding_system *coding, { tail->bytepos = from_byte + coding->produced; tail->charpos - = (NILP (B_ (current_buffer, enable_multibyte_characters)) + = (NILP (BVAR (current_buffer, enable_multibyte_characters)) ? tail->bytepos : from + coding->produced_char); } } @@ -7960,7 +7960,7 @@ encode_coding_object (struct coding_system *coding, set_buffer_temp (current); } coding->dst_multibyte - = ! NILP (B_ (XBUFFER (dst_object), enable_multibyte_characters)); + = ! NILP (BVAR (XBUFFER (dst_object), enable_multibyte_characters)); } else if (EQ (dst_object, Qt)) { @@ -8003,7 +8003,7 @@ encode_coding_object (struct coding_system *coding, TEMP_SET_PT_BOTH (saved_pt, saved_pt_byte); else if (saved_pt < from + chars) TEMP_SET_PT_BOTH (from, from_byte); - else if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + else if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) TEMP_SET_PT_BOTH (saved_pt + (coding->produced_char - chars), saved_pt_byte + (coding->produced - bytes)); else @@ -8027,7 +8027,7 @@ encode_coding_object (struct coding_system *coding, { tail->bytepos = from_byte + coding->produced; tail->charpos - = (NILP (B_ (current_buffer, enable_multibyte_characters)) + = (NILP (BVAR (current_buffer, enable_multibyte_characters)) ? tail->bytepos : from + coding->produced_char); } } @@ -8481,7 +8481,7 @@ highest priority. */) return detect_coding_system (BYTE_POS_ADDR (from_byte), to - from, to_byte - from_byte, !NILP (highest), - !NILP (B_ (current_buffer + !NILP (BVAR (current_buffer , enable_multibyte_characters)), Qnil); } @@ -8564,7 +8564,7 @@ DEFUN ("find-coding-systems-region-internal", CHECK_NUMBER_COERCE_MARKER (end); if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end)) args_out_of_range (start, end); - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) return Qt; start_byte = CHAR_TO_BYTE (XINT (start)); end_byte = CHAR_TO_BYTE (XINT (end)); @@ -8698,7 +8698,7 @@ to the string. */) validate_region (&start, &end); from = XINT (start); to = XINT (end); - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) || (ascii_compatible && (to - from) == (CHAR_TO_BYTE (to) - (CHAR_TO_BYTE (from))))) return Qnil; @@ -8814,7 +8814,7 @@ is nil. */) CHECK_NUMBER_COERCE_MARKER (end); if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end)) args_out_of_range (start, end); - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) return Qnil; start_byte = CHAR_TO_BYTE (XINT (start)); end_byte = CHAR_TO_BYTE (XINT (end)); diff --git a/src/composite.c b/src/composite.c index 3c941ea6614..0b0602bf283 100644 --- a/src/composite.c +++ b/src/composite.c @@ -796,7 +796,7 @@ fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lis if (NILP (string)) { - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) error ("Attempt to shape unibyte text"); validate_region (&start, &end); from = XFASTINT (start); @@ -1028,7 +1028,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, cmp_it->stop_pos = endpos = start; cmp_it->ch = -1; } - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) || NILP (Vauto_composition_mode)) return; if (bytepos < 0) @@ -1674,7 +1674,7 @@ composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) return new_pt; } - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) || NILP (Vauto_composition_mode)) return new_pt; @@ -1851,7 +1851,7 @@ See `find-composition' for more details. */) if (!find_composition (from, to, &start, &end, &prop, string)) { - if (!NILP (B_ (current_buffer, enable_multibyte_characters)) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! NILP (Vauto_composition_mode) && find_automatic_composition (from, to, &start, &end, &gstring, string)) diff --git a/src/data.c b/src/data.c index c0557d5c735..d0afca6a09f 100644 --- a/src/data.c +++ b/src/data.c @@ -1009,7 +1009,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_ } else { - tem1 = assq_no_quit (var, B_ (current_buffer, local_var_alist)); + tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); XSETBUFFER (blv->where, current_buffer); } } @@ -1178,7 +1178,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register tem1 = Fassq (symbol, (blv->frame_local ? XFRAME (where)->param_alist - : B_ (XBUFFER (where), local_var_alist))); + : BVAR (XBUFFER (where), local_var_alist))); blv->where = where; blv->found = 1; @@ -1209,8 +1209,8 @@ 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)); - B_ (XBUFFER (where), local_var_alist) - = Fcons (tem1, B_ (XBUFFER (where), local_var_alist)); + BVAR (XBUFFER (where), local_var_alist) + = Fcons (tem1, BVAR (XBUFFER (where), local_var_alist)); } } @@ -1632,13 +1632,13 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) if (let_shadows_global_binding_p (symbol)) message ("Making %s local to %s while let-bound!", SDATA (SYMBOL_NAME (variable)), - SDATA (B_ (current_buffer, name))); + SDATA (BVAR (current_buffer, name))); } } /* Make sure this buffer has its own value of symbol. */ XSETSYMBOL (variable, sym); /* Update in case of aliasing. */ - tem = Fassq (variable, B_ (current_buffer, local_var_alist)); + tem = Fassq (variable, BVAR (current_buffer, local_var_alist)); if (NILP (tem)) { if (let_shadows_buffer_binding_p (sym)) @@ -1650,9 +1650,9 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) default value. */ find_symbol_value (variable); - B_ (current_buffer, local_var_alist) + BVAR (current_buffer, local_var_alist) = Fcons (Fcons (variable, XCDR (blv->defcell)), - B_ (current_buffer, local_var_alist)); + 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. */ @@ -1718,10 +1718,10 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) /* Get rid of this buffer's alist element, if any. */ XSETSYMBOL (variable, sym); /* Propagate variable indirection. */ - tem = Fassq (variable, B_ (current_buffer, local_var_alist)); + tem = Fassq (variable, BVAR (current_buffer, local_var_alist)); if (!NILP (tem)) - B_ (current_buffer, local_var_alist) - = Fdelq (tem, B_ (current_buffer, local_var_alist)); + BVAR (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 @@ -1848,7 +1848,7 @@ BUFFER defaults to the current buffer. */) XSETBUFFER (tmp, buf); XSETSYMBOL (variable, sym); /* Update in case of aliasing. */ - for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) + for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) { elt = XCAR (tail); if (EQ (variable, XCAR (elt))) diff --git a/src/dired.c b/src/dired.c index f1dc03b56d0..7b4b83cbe54 100644 --- a/src/dired.c +++ b/src/dired.c @@ -158,7 +158,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m # ifdef WINDOWSNT /* Windows users want case-insensitive wildcards. */ bufp = compile_pattern (match, 0, - B_ (&buffer_defaults, case_canon_table), 0, 1); + BVAR (&buffer_defaults, case_canon_table), 0, 1); # else /* !WINDOWSNT */ bufp = compile_pattern (match, 0, Qnil, 0, 1); # endif /* !WINDOWSNT */ diff --git a/src/dispextern.h b/src/dispextern.h index e01c1a961f7..6bb0c3a6aae 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1416,7 +1416,7 @@ struct glyph_string && !(W)->pseudo_window_p \ && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ && BUFFERP ((W)->buffer) \ - && !NILP (B_ (XBUFFER ((W)->buffer), mode_line_format)) \ + && !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)) \ && WINDOW_TOTAL_LINES (W) > 1) /* Value is non-zero if window W wants a header line. */ @@ -1426,8 +1426,8 @@ struct glyph_string && !(W)->pseudo_window_p \ && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ && BUFFERP ((W)->buffer) \ - && !NILP (B_ (XBUFFER ((W)->buffer), header_line_format)) \ - && WINDOW_TOTAL_LINES (W) > 1 + !NILP (B_ (XBUFFER ((W)->buffer), mode_line_format))) + && !NILP (BVAR (XBUFFER ((W)->buffer), header_line_format)) \ + && WINDOW_TOTAL_LINES (W) > 1 + !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format))) /* Return proper value to be used as baseline offset of font that has diff --git a/src/dispnew.c b/src/dispnew.c index 2aa3d9208b3..4e068bde536 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6129,7 +6129,7 @@ pass nil for VARIABLE. */) { buf = XCDR (XCAR (tail)); /* Ignore buffers that aren't included in buffer lists. */ - if (SREF (B_ (XBUFFER (buf), name), 0) == ' ') + if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') continue; if (vecp == end) goto changed; @@ -6137,7 +6137,7 @@ pass nil for VARIABLE. */) goto changed; if (vecp == end) goto changed; - if (!EQ (*vecp++, B_ (XBUFFER (buf), read_only))) + if (!EQ (*vecp++, BVAR (XBUFFER (buf), read_only))) goto changed; if (vecp == end) goto changed; @@ -6184,10 +6184,10 @@ pass nil for VARIABLE. */) { buf = XCDR (XCAR (tail)); /* Ignore buffers that aren't included in buffer lists. */ - if (SREF (B_ (XBUFFER (buf), name), 0) == ' ') + if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ') continue; *vecp++ = buf; - *vecp++ = B_ (XBUFFER (buf), read_only); + *vecp++ = BVAR (XBUFFER (buf), read_only); *vecp++ = Fbuffer_modified_p (buf); } /* Fill up the vector with lambdas (always at least one). */ diff --git a/src/editfns.c b/src/editfns.c index a3de4907efc..5d6189f2a3c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -306,10 +306,10 @@ region_limit (int beginningp) if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive) - && NILP (B_ (current_buffer, mark_active))) + && NILP (BVAR (current_buffer, mark_active))) xsignal0 (Qmark_inactive); - m = Fmarker_position (B_ (current_buffer, mark)); + m = Fmarker_position (BVAR (current_buffer, mark)); if (NILP (m)) error ("The mark is not set now, so there is no region"); @@ -338,7 +338,7 @@ Watch out! Moving this marker changes the mark position. If you set the marker not to point anywhere, the buffer will have no mark. */) (void) { - return B_ (current_buffer, mark); + return BVAR (current_buffer, mark); } @@ -866,9 +866,9 @@ save_excursion_save (void) == current_buffer); return Fcons (Fpoint_marker (), - Fcons (Fcopy_marker (B_ (current_buffer, mark), Qnil), + Fcons (Fcopy_marker (BVAR (current_buffer, mark), Qnil), Fcons (visible ? Qt : Qnil, - Fcons (B_ (current_buffer, mark_active), + Fcons (BVAR (current_buffer, mark_active), selected_window)))); } @@ -900,8 +900,8 @@ save_excursion_restore (Lisp_Object info) /* Mark marker. */ info = XCDR (info); tem = XCAR (info); - omark = Fmarker_position (B_ (current_buffer, mark)); - Fset_marker (B_ (current_buffer, mark), tem, Fcurrent_buffer ()); + omark = Fmarker_position (BVAR (current_buffer, mark)); + Fset_marker (BVAR (current_buffer, mark), tem, Fcurrent_buffer ()); nmark = Fmarker_position (tem); unchain_marker (XMARKER (tem)); @@ -922,14 +922,14 @@ save_excursion_restore (Lisp_Object info) /* Mark active */ info = XCDR (info); tem = XCAR (info); - tem1 = B_ (current_buffer, mark_active); - B_ (current_buffer, mark_active) = tem; + tem1 = BVAR (current_buffer, mark_active); + BVAR (current_buffer, mark_active) = tem; if (!NILP (Vrun_hooks)) { /* If mark is active now, and either was not active or was at a different place, run the activate hook. */ - if (! NILP (B_ (current_buffer, mark_active))) + if (! NILP (BVAR (current_buffer, mark_active))) { if (! EQ (omark, nmark)) call1 (Vrun_hooks, intern ("activate-mark-hook")); @@ -1114,7 +1114,7 @@ At the beginning of the buffer or accessible region, return 0. */) Lisp_Object temp; if (PT <= BEGV) XSETFASTINT (temp, 0); - else if (!NILP (B_ (current_buffer, enable_multibyte_characters))) + else if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) { EMACS_INT pos = PT_BYTE; DEC_POS (pos); @@ -1228,7 +1228,7 @@ If POS is out of range, the value is nil. */) pos_byte = CHAR_TO_BYTE (XINT (pos)); } - if (!NILP (B_ (current_buffer, enable_multibyte_characters))) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) { DEC_POS (pos_byte); XSETFASTINT (val, FETCH_CHAR (pos_byte)); @@ -2135,7 +2135,7 @@ general_insert_function (void (*insert_func) unsigned char str[MAX_MULTIBYTE_LENGTH]; int len; - if (!NILP (B_ (current_buffer, enable_multibyte_characters))) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) len = CHAR_STRING (XFASTINT (val), str); else { @@ -2267,7 +2267,7 @@ from adjoining text, if those properties are sticky. */) CHECK_NUMBER (character); CHECK_NUMBER (count); - if (!NILP (B_ (current_buffer, enable_multibyte_characters))) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) len = CHAR_STRING (XFASTINT (character), str); else str[0] = XFASTINT (character), len = 1; @@ -2316,7 +2316,7 @@ from adjoining text, if those properties are sticky. */) if (XINT (byte) < 0 || XINT (byte) > 255) args_out_of_range_3 (byte, make_number (0), make_number (255)); if (XINT (byte) >= 128 - && ! NILP (B_ (current_buffer, enable_multibyte_characters))) + && ! NILP (BVAR (current_buffer, enable_multibyte_characters))) XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte))); return Finsert_char (byte, count, inherit); } @@ -2370,7 +2370,7 @@ make_buffer_string_both (EMACS_INT start, EMACS_INT start_byte, if (start < GPT && GPT < end) move_gap (start); - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) result = make_uninit_multibyte_string (end - start, end_byte - start_byte); else result = make_uninit_string (end - start); @@ -2485,7 +2485,7 @@ They default to the values of (point-min) and (point-max) in BUFFER. */) if (NILP (buf)) nsberror (buffer); bp = XBUFFER (buf); - if (NILP (B_ (bp, name))) + if (NILP (BVAR (bp, name))) error ("Selecting deleted buffer"); if (NILP (start)) @@ -2533,8 +2533,8 @@ determines whether case is significant or ignored. */) register EMACS_INT begp1, endp1, begp2, endp2, temp; register struct buffer *bp1, *bp2; register Lisp_Object trt - = (!NILP (B_ (current_buffer, case_fold_search)) - ? B_ (current_buffer, case_canon_table) : Qnil); + = (!NILP (BVAR (current_buffer, case_fold_search)) + ? BVAR (current_buffer, case_canon_table) : Qnil); EMACS_INT chars = 0; EMACS_INT i1, i2, i1_byte, i2_byte; @@ -2549,7 +2549,7 @@ determines whether case is significant or ignored. */) if (NILP (buf1)) nsberror (buffer1); bp1 = XBUFFER (buf1); - if (NILP (B_ (bp1, name))) + if (NILP (BVAR (bp1, name))) error ("Selecting deleted buffer"); } @@ -2587,7 +2587,7 @@ determines whether case is significant or ignored. */) if (NILP (buf2)) nsberror (buffer2); bp2 = XBUFFER (buf2); - if (NILP (B_ (bp2, name))) + if (NILP (BVAR (bp2, name))) error ("Selecting deleted buffer"); } @@ -2627,7 +2627,7 @@ determines whether case is significant or ignored. */) QUIT; - if (! NILP (B_ (bp1, enable_multibyte_characters))) + if (! NILP (BVAR (bp1, enable_multibyte_characters))) { c1 = BUF_FETCH_MULTIBYTE_CHAR (bp1, i1_byte); BUF_INC_POS (bp1, i1_byte); @@ -2640,7 +2640,7 @@ determines whether case is significant or ignored. */) i1++; } - if (! NILP (B_ (bp2, enable_multibyte_characters))) + if (! NILP (BVAR (bp2, enable_multibyte_characters))) { c2 = BUF_FETCH_MULTIBYTE_CHAR (bp2, i2_byte); BUF_INC_POS (bp2, i2_byte); @@ -2680,13 +2680,13 @@ determines whether case is significant or ignored. */) static Lisp_Object subst_char_in_region_unwind (Lisp_Object arg) { - return B_ (current_buffer, undo_list) = arg; + return BVAR (current_buffer, undo_list) = arg; } static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object arg) { - return B_ (current_buffer, filename) = arg; + return BVAR (current_buffer, filename) = arg; } DEFUN ("subst-char-in-region", Fsubst_char_in_region, @@ -2712,7 +2712,7 @@ Both characters must have the same length of multi-byte form. */) #define COMBINING_BOTH (COMBINING_BEFORE | COMBINING_AFTER) int maybe_byte_combining = COMBINING_NO; EMACS_INT last_changed = 0; - int multibyte_p = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); restart: @@ -2756,12 +2756,12 @@ Both characters must have the same length of multi-byte form. */) if (!changed && !NILP (noundo)) { record_unwind_protect (subst_char_in_region_unwind, - B_ (current_buffer, undo_list)); - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = Qt; /* Don't do file-locking. */ record_unwind_protect (subst_char_in_region_unwind_1, - B_ (current_buffer, filename)); - B_ (current_buffer, filename) = Qnil; + BVAR (current_buffer, filename)); + BVAR (current_buffer, filename) = Qnil; } if (pos_byte < GPT_BYTE) @@ -2824,7 +2824,7 @@ Both characters must have the same length of multi-byte form. */) struct gcpro gcpro1; - tem = B_ (current_buffer, undo_list); + tem = BVAR (current_buffer, undo_list); GCPRO1 (tem); /* Make a multibyte string containing this single character. */ @@ -2843,7 +2843,7 @@ Both characters must have the same length of multi-byte form. */) INC_POS (pos_byte_next); if (! NILP (noundo)) - B_ (current_buffer, undo_list) = tem; + BVAR (current_buffer, undo_list) = tem; UNGCPRO; } @@ -2945,7 +2945,7 @@ It returns the number of characters changed. */) int cnt; /* Number of changes made. */ EMACS_INT size; /* Size of translate table. */ EMACS_INT pos, pos_byte, end_pos; - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); int string_multibyte; Lisp_Object val; @@ -3206,7 +3206,7 @@ save_restriction_restore (Lisp_Object data) ? XMARKER (XCAR (data))->buffer : XBUFFER (data)); - if (buf && buf != current_buffer && !NILP (B_ (buf, pt_marker))) + if (buf && buf != current_buffer && !NILP (BVAR (buf, pt_marker))) { /* If `buf' uses markers to keep track of PT, BEGV, and ZV (as is the case if it is or has an indirect buffer), then make sure it is current before we update BEGV, so @@ -4136,20 +4136,20 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) if (XINT (c1) == XINT (c2)) return Qt; - if (NILP (B_ (current_buffer, case_fold_search))) + if (NILP (BVAR (current_buffer, case_fold_search))) return Qnil; /* Do these in separate statements, then compare the variables. because of the way DOWNCASE uses temp variables. */ i1 = XFASTINT (c1); - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! ASCII_CHAR_P (i1)) { MAKE_CHAR_MULTIBYTE (i1); } i2 = XFASTINT (c2); - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! ASCII_CHAR_P (i2)) { MAKE_CHAR_MULTIBYTE (i2); diff --git a/src/fileio.c b/src/fileio.c index 4a4935b43a2..3112d7620c6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -770,7 +770,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* Use the buffer's default-directory if DEFAULT_DIRECTORY is omitted. */ if (NILP (default_directory)) - default_directory = B_ (current_buffer, directory); + default_directory = BVAR (current_buffer, directory); if (! STRINGP (default_directory)) { #ifdef DOS_NT @@ -2669,7 +2669,7 @@ See `file-symlink-p' to distinguish symlinks. */) struct stat st; Lisp_Object handler; - absname = expand_and_dir_to_file (filename, B_ (current_buffer, directory)); + absname = expand_and_dir_to_file (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -2722,7 +2722,7 @@ See `file-symlink-p' to distinguish symlinks. */) struct stat st; Lisp_Object handler; - absname = expand_and_dir_to_file (filename, B_ (current_buffer, directory)); + absname = expand_and_dir_to_file (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -2769,7 +2769,7 @@ if file does not exist, is not accessible, or SELinux is disabled */) context_t context; #endif - absname = expand_and_dir_to_file (filename, B_ (current_buffer, directory)); + absname = expand_and_dir_to_file (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -2827,7 +2827,7 @@ is disabled. */) context_t parsed_con; #endif - absname = Fexpand_file_name (filename, B_ (current_buffer, directory)); + absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -2894,7 +2894,7 @@ Return nil, if file does not exist or is not accessible. */) struct stat st; Lisp_Object handler; - absname = expand_and_dir_to_file (filename, B_ (current_buffer, directory)); + absname = expand_and_dir_to_file (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -2923,7 +2923,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) Lisp_Object absname, encoded_absname; Lisp_Object handler; - absname = Fexpand_file_name (filename, B_ (current_buffer, directory)); + absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); CHECK_NUMBER (mode); /* If the file name has special constructs in it, @@ -2985,7 +2985,7 @@ Use the current time if TIME is nil. TIME is in the format of if (! lisp_time_argument (time, &sec, &usec)) error ("Invalid time specification"); - absname = Fexpand_file_name (filename, B_ (current_buffer, directory)); + absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -3047,8 +3047,8 @@ otherwise, if FILE2 does not exist, the answer is t. */) absname1 = Qnil; GCPRO2 (absname1, file2); - absname1 = expand_and_dir_to_file (file1, B_ (current_buffer, directory)); - absname2 = expand_and_dir_to_file (file2, B_ (current_buffer, directory)); + absname1 = expand_and_dir_to_file (file1, BVAR (current_buffer, directory)); + absname2 = expand_and_dir_to_file (file2, BVAR (current_buffer, directory)); UNGCPRO; /* If the file name has special constructs in it, @@ -3116,8 +3116,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. */ - B_ (current_buffer, enable_multibyte_characters) = multibyte; - B_ (current_buffer, undo_list) = undo_list; + BVAR (current_buffer, enable_multibyte_characters) = multibyte; + BVAR (current_buffer, undo_list) = undo_list; return Qnil; } @@ -3212,7 +3212,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (current_buffer->base_buffer && ! NILP (visit)) error ("Cannot do file visiting in an indirect buffer"); - if (!NILP (B_ (current_buffer, read_only))) + if (!NILP (BVAR (current_buffer, read_only))) Fbarf_if_buffer_read_only (); val = Qnil; @@ -3403,16 +3403,16 @@ variable `last-coding-system-used' to the coding system actually used. */) buf = XBUFFER (buffer); delete_all_overlays (buf); - B_ (buf, directory) = B_ (current_buffer, directory); - B_ (buf, read_only) = Qnil; - B_ (buf, filename) = Qnil; - B_ (buf, undo_list) = Qt; + BVAR (buf, directory) = BVAR (current_buffer, directory); + BVAR (buf, read_only) = Qnil; + BVAR (buf, filename) = Qnil; + BVAR (buf, undo_list) = Qt; eassert (buf->overlays_before == NULL); eassert (buf->overlays_after == NULL); set_buffer_internal (buf); Ferase_buffer (); - B_ (buf, enable_multibyte_characters) = Qnil; + BVAR (buf, enable_multibyte_characters) = Qnil; insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0); TEMP_SET_PT_BOTH (BEG, BEG_BYTE); @@ -3450,7 +3450,7 @@ variable `last-coding-system-used' to the coding system actually used. */) else CHECK_CODING_SYSTEM (coding_system); - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) /* We must suppress all character code conversion except for end-of-line conversion. */ coding_system = raw_text_coding_system (coding_system); @@ -3598,7 +3598,7 @@ variable `last-coding-system-used' to the coding system actually used. */) we cannot use this method; giveup and try the other. */ if (same_at_end > same_at_start && FETCH_BYTE (same_at_end - 1) >= 0200 - && ! NILP (B_ (current_buffer, enable_multibyte_characters)) + && ! NILP (BVAR (current_buffer, enable_multibyte_characters)) && (CODING_MAY_REQUIRE_DECODING (&coding))) giveup_match_end = 1; break; @@ -3617,14 +3617,14 @@ variable `last-coding-system-used' to the coding system actually used. */) /* Extend the start of non-matching text area to multibyte character boundary. */ - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) while (same_at_start > BEGV_BYTE && ! CHAR_HEAD_P (FETCH_BYTE (same_at_start))) same_at_start--; /* Extend the end of non-matching text area to multibyte character boundary. */ - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) while (same_at_end < ZV_BYTE && ! CHAR_HEAD_P (FETCH_BYTE (same_at_end))) same_at_end++; @@ -3673,7 +3673,7 @@ variable `last-coding-system-used' to the coding system actually used. */) unsigned char *decoded; EMACS_INT temp; int this_count = SPECPDL_INDEX (); - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); Lisp_Object conversion_buffer; conversion_buffer = code_conversion_save (1, multibyte); @@ -3778,7 +3778,7 @@ variable `last-coding-system-used' to the coding system actually used. */) /* Extend the start of non-matching text area to the previous multibyte character boundary. */ - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) while (same_at_start > BEGV_BYTE && ! CHAR_HEAD_P (FETCH_BYTE (same_at_start))) same_at_start--; @@ -3795,7 +3795,7 @@ variable `last-coding-system-used' to the coding system actually used. */) /* Extend the end of non-matching text area to the next multibyte character boundary. */ - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) while (same_at_end < ZV_BYTE && ! CHAR_HEAD_P (FETCH_BYTE (same_at_end))) same_at_end++; @@ -3870,9 +3870,9 @@ variable `last-coding-system-used' to the coding system actually used. */) if (NILP (visit) && inserted > 0) { #ifdef CLASH_DETECTION - if (!NILP (B_ (current_buffer, file_truename)) + if (!NILP (BVAR (current_buffer, file_truename)) /* Make binding buffer-file-name to nil effective. */ - && !NILP (B_ (current_buffer, filename)) + && !NILP (BVAR (current_buffer, filename)) && SAVE_MODIFF >= MODIFF) we_locked_file = 1; #endif /* CLASH_DETECTION */ @@ -3977,7 +3977,7 @@ variable `last-coding-system-used' to the coding system actually used. */) { #ifdef CLASH_DETECTION if (we_locked_file) - unlock_file (B_ (current_buffer, file_truename)); + unlock_file (BVAR (current_buffer, file_truename)); #endif Vdeactivate_mark = old_Vdeactivate_mark; } @@ -4028,11 +4028,11 @@ variable `last-coding-system-used' to the coding system actually used. */) Lisp_Object unwind_data; int count = SPECPDL_INDEX (); - unwind_data = Fcons (B_ (current_buffer, enable_multibyte_characters), - Fcons (B_ (current_buffer, undo_list), + unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters), + Fcons (BVAR (current_buffer, undo_list), Fcurrent_buffer ())); - B_ (current_buffer, enable_multibyte_characters) = Qnil; - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, enable_multibyte_characters) = Qnil; + BVAR (current_buffer, undo_list) = Qt; record_unwind_protect (decide_coding_unwind, unwind_data); if (inserted > 0 && ! NILP (Vset_auto_coding_function)) @@ -4062,7 +4062,7 @@ variable `last-coding-system-used' to the coding system actually used. */) else CHECK_CODING_SYSTEM (coding_system); - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) /* We must suppress all character code conversion except for end-of-line conversion. */ coding_system = raw_text_coding_system (coding_system); @@ -4080,10 +4080,10 @@ variable `last-coding-system-used' to the coding system actually used. */) && NILP (replace)) /* Visiting a file with these coding system makes the buffer unibyte. */ - B_ (current_buffer, enable_multibyte_characters) = Qnil; + BVAR (current_buffer, enable_multibyte_characters) = Qnil; } - coding.dst_multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); if (CODING_MAY_REQUIRE_DECODING (&coding) && (inserted > 0 || CODING_REQUIRE_FLUSHING (&coding))) { @@ -4110,9 +4110,9 @@ variable `last-coding-system-used' to the coding system actually used. */) if ((VECTORP (CODING_ID_EOL_TYPE (coding.id)) || EQ (CODING_ID_EOL_TYPE (coding.id), Qunix)) && ! CODING_REQUIRE_DECODING (&coding)) - B_ (current_buffer, buffer_file_type) = Qt; + BVAR (current_buffer, buffer_file_type) = Qt; else - B_ (current_buffer, buffer_file_type) = Qnil; + BVAR (current_buffer, buffer_file_type) = Qnil; #endif handled: @@ -4124,24 +4124,24 @@ variable `last-coding-system-used' to the coding system actually used. */) if (!NILP (visit)) { - if (!EQ (B_ (current_buffer, undo_list), Qt) && !nochange) - B_ (current_buffer, undo_list) = Qnil; + if (!EQ (BVAR (current_buffer, undo_list), Qt) && !nochange) + BVAR (current_buffer, undo_list) = Qnil; if (NILP (handler)) { current_buffer->modtime = st.st_mtime; current_buffer->modtime_size = st.st_size; - B_ (current_buffer, filename) = orig_filename; + BVAR (current_buffer, filename) = orig_filename; } SAVE_MODIFF = MODIFF; BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF; - XSETFASTINT (B_ (current_buffer, save_length), Z - BEG); + XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); #ifdef CLASH_DETECTION if (NILP (handler)) { - if (!NILP (B_ (current_buffer, file_truename))) - unlock_file (B_ (current_buffer, file_truename)); + if (!NILP (BVAR (current_buffer, file_truename))) + unlock_file (BVAR (current_buffer, file_truename)); unlock_file (filename); } #endif /* CLASH_DETECTION */ @@ -4174,8 +4174,8 @@ variable `last-coding-system-used' to the coding system actually used. */) specbind (Qinhibit_modification_hooks, Qt); /* Save old undo list and don't record undo for decoding. */ - old_undo = B_ (current_buffer, undo_list); - B_ (current_buffer, undo_list) = Qt; + old_undo = BVAR (current_buffer, undo_list); + BVAR (current_buffer, undo_list) = Qt; if (NILP (replace)) { @@ -4263,7 +4263,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (NILP (visit)) { - B_ (current_buffer, undo_list) = old_undo; + BVAR (current_buffer, undo_list) = old_undo; if (CONSP (old_undo) && inserted != old_inserted) { /* Adjust the last undo record for the size change during @@ -4278,7 +4278,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. */ - B_ (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil; + BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil; unbind_to (count, Qnil); } @@ -4332,8 +4332,8 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file Lisp_Object eol_parent = Qnil; if (auto_saving - && NILP (Fstring_equal (B_ (current_buffer, filename), - B_ (current_buffer, auto_save_file_name)))) + && NILP (Fstring_equal (BVAR (current_buffer, filename), + BVAR (current_buffer, auto_save_file_name)))) { val = Qutf_8_emacs; eol_parent = Qunix; @@ -4362,12 +4362,12 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file int using_default_coding = 0; int force_raw_text = 0; - val = B_ (current_buffer, buffer_file_coding_system); + val = BVAR (current_buffer, buffer_file_coding_system); if (NILP (val) || NILP (Flocal_variable_p (Qbuffer_file_coding_system, Qnil))) { val = Qnil; - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) force_raw_text = 1; } @@ -4388,7 +4388,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file { /* If we still have not decided a coding system, use the default value of buffer-file-coding-system. */ - val = B_ (current_buffer, buffer_file_coding_system); + val = BVAR (current_buffer, buffer_file_coding_system); using_default_coding = 1; } @@ -4412,9 +4412,9 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file format, we use that of `default-buffer-file-coding-system'. */ if (! using_default_coding - && ! NILP (B_ (&buffer_defaults, buffer_file_coding_system))) + && ! NILP (BVAR (&buffer_defaults, buffer_file_coding_system))) val = (coding_inherit_eol_type - (val, B_ (&buffer_defaults, buffer_file_coding_system))); + (val, BVAR (&buffer_defaults, buffer_file_coding_system))); /* If we decide not to encode text, use `raw-text' or one of its subsidiaries. */ @@ -4425,7 +4425,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file val = coding_inherit_eol_type (val, eol_parent); setup_coding_system (val, coding); - if (!STRINGP (start) && !NILP (B_ (current_buffer, selective_display))) + if (!STRINGP (start) && !NILP (BVAR (current_buffer, selective_display))) coding->mode |= CODING_MODE_SELECTIVE_DISPLAY; return val; } @@ -4529,8 +4529,8 @@ This calls `write-region-annotate-functions' at the start, and if (visiting) { SAVE_MODIFF = MODIFF; - XSETFASTINT (B_ (current_buffer, save_length), Z - BEG); - B_ (current_buffer, filename) = visit_file; + XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); + BVAR (current_buffer, filename) = visit_file; } UNGCPRO; return val; @@ -4743,15 +4743,15 @@ This calls `write-region-annotate-functions' at the start, and if (visiting) { SAVE_MODIFF = MODIFF; - XSETFASTINT (B_ (current_buffer, save_length), Z - BEG); - B_ (current_buffer, filename) = visit_file; + XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); + BVAR (current_buffer, filename) = visit_file; update_mode_lines++; } else if (quietly) { if (auto_saving - && ! NILP (Fstring_equal (B_ (current_buffer, filename), - B_ (current_buffer, auto_save_file_name)))) + && ! NILP (Fstring_equal (BVAR (current_buffer, filename), + BVAR (current_buffer, auto_save_file_name)))) SAVE_MODIFF = MODIFF; return Qnil; @@ -4833,10 +4833,10 @@ build_annotations (Lisp_Object start, Lisp_Object end) } /* Now do the same for annotation functions implied by the file-format */ - if (auto_saving && (!EQ (B_ (current_buffer, auto_save_file_format), Qt))) - p = B_ (current_buffer, auto_save_file_format); + if (auto_saving && (!EQ (BVAR (current_buffer, auto_save_file_format), Qt))) + p = BVAR (current_buffer, auto_save_file_format); else - p = B_ (current_buffer, file_format); + p = BVAR (current_buffer, file_format); for (i = 0; CONSP (p); p = XCDR (p), ++i) { struct buffer *given_buffer = current_buffer; @@ -5015,17 +5015,17 @@ See Info node `(elisp)Modification Time' for more details. */) b = XBUFFER (buf); } - if (!STRINGP (B_ (b, filename))) return Qt; + if (!STRINGP (BVAR (b, filename))) return Qt; if (b->modtime == 0) return Qt; /* If the file name has special constructs in it, call the corresponding file handler. */ - handler = Ffind_file_name_handler (B_ (b, filename), + handler = Ffind_file_name_handler (BVAR (b, filename), Qverify_visited_file_modtime); if (!NILP (handler)) return call2 (handler, Qverify_visited_file_modtime, buf); - filename = ENCODE_FILE (B_ (b, filename)); + filename = ENCODE_FILE (BVAR (b, filename)); if (stat (SSDATA (filename), &st) < 0) { @@ -5093,7 +5093,7 @@ An argument specifies the modification time value to use struct stat st; Lisp_Object handler; - filename = Fexpand_file_name (B_ (current_buffer, filename), Qnil); + filename = Fexpand_file_name (BVAR (current_buffer, filename), Qnil); /* If the file name has special constructs in it, call the corresponding file handler. */ @@ -5128,7 +5128,7 @@ auto_save_error (Lisp_Object error) ring_bell (XFRAME (selected_frame)); args[0] = build_string ("Auto-saving %s: %s"); - args[1] = B_ (current_buffer, name); + args[1] = BVAR (current_buffer, name); args[2] = Ferror_message_string (error); msg = Fformat (3, args); GCPRO1 (msg); @@ -5159,19 +5159,19 @@ auto_save_1 (void) auto_save_mode_bits = 0666; /* Get visited file's mode to become the auto save file's mode. */ - if (! NILP (B_ (current_buffer, filename))) + if (! NILP (BVAR (current_buffer, filename))) { - if (stat (SSDATA (B_ (current_buffer, filename)), &st) >= 0) + if (stat (SSDATA (BVAR (current_buffer, filename)), &st) >= 0) /* But make sure we can overwrite it later! */ auto_save_mode_bits = st.st_mode | 0600; - else if ((modes = Ffile_modes (B_ (current_buffer, filename)), + else if ((modes = Ffile_modes (BVAR (current_buffer, filename)), INTEGERP (modes))) /* Remote files don't cooperate with stat. */ auto_save_mode_bits = XINT (modes) | 0600; } return - Fwrite_region (Qnil, Qnil, B_ (current_buffer, auto_save_file_name), Qnil, + Fwrite_region (Qnil, Qnil, BVAR (current_buffer, auto_save_file_name), Qnil, NILP (Vauto_save_visited_file_name) ? Qlambda : Qt, Qnil, Qnil); } @@ -5312,18 +5312,18 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) /* Record all the buffers that have auto save mode in the special file that lists them. For each of these buffers, Record visited name (if any) and auto save name. */ - if (STRINGP (B_ (b, auto_save_file_name)) + if (STRINGP (BVAR (b, auto_save_file_name)) && stream != NULL && do_handled_files == 0) { BLOCK_INPUT; - if (!NILP (B_ (b, filename))) + if (!NILP (BVAR (b, filename))) { - fwrite (SDATA (B_ (b, filename)), 1, - SBYTES (B_ (b, filename)), stream); + fwrite (SDATA (BVAR (b, filename)), 1, + SBYTES (BVAR (b, filename)), stream); } putc ('\n', stream); - fwrite (SDATA (B_ (b, auto_save_file_name)), 1, - SBYTES (B_ (b, auto_save_file_name)), stream); + fwrite (SDATA (BVAR (b, auto_save_file_name)), 1, + SBYTES (BVAR (b, auto_save_file_name)), stream); putc ('\n', stream); UNBLOCK_INPUT; } @@ -5340,13 +5340,13 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) /* Check for auto save enabled and file changed since last auto save and file changed since last real save. */ - if (STRINGP (B_ (b, auto_save_file_name)) + if (STRINGP (BVAR (b, auto_save_file_name)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) && BUF_AUTOSAVE_MODIFF (b) < BUF_MODIFF (b) /* -1 means we've turned off autosaving for a while--see below. */ - && XINT (B_ (b, save_length)) >= 0 + && XINT (BVAR (b, save_length)) >= 0 && (do_handled_files - || NILP (Ffind_file_name_handler (B_ (b, auto_save_file_name), + || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name), Qwrite_region)))) { EMACS_TIME before_time, after_time; @@ -5360,23 +5360,23 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) set_buffer_internal (b); if (NILP (Vauto_save_include_big_deletions) - && (XFASTINT (B_ (b, save_length)) * 10 + && (XFASTINT (BVAR (b, save_length)) * 10 > (BUF_Z (b) - BUF_BEG (b)) * 13) /* A short file is likely to change a large fraction; spare the user annoying messages. */ - && XFASTINT (B_ (b, save_length)) > 5000 + && XFASTINT (BVAR (b, save_length)) > 5000 /* These messages are frequent and annoying for `*mail*'. */ - && !EQ (B_ (b, filename), Qnil) + && !EQ (BVAR (b, filename), Qnil) && NILP (no_message)) { /* It has shrunk too much; turn off auto-saving here. */ minibuffer_auto_raise = orig_minibuffer_auto_raise; message_with_string ("Buffer %s has shrunk a lot; auto save disabled in that buffer until next real save", - B_ (b, name), 1); + BVAR (b, name), 1); minibuffer_auto_raise = 0; /* Turn off auto-saving until there's a real save, and prevent any more warnings. */ - XSETINT (B_ (b, save_length), -1); + XSETINT (BVAR (b, save_length), -1); Fsleep_for (make_number (1), Qnil); continue; } @@ -5385,7 +5385,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) internal_condition_case (auto_save_1, Qt, auto_save_error); auto_saved++; BUF_AUTOSAVE_MODIFF (b) = BUF_MODIFF (b); - XSETFASTINT (B_ (current_buffer, save_length), Z - BEG); + XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); set_buffer_internal (old); EMACS_GET_TIME (after_time); @@ -5432,7 +5432,7 @@ No auto-save file will be written until the buffer changes again. */) /* FIXME: This should not be called in indirect buffers, since they're not autosaved. */ BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF; - XSETFASTINT (B_ (current_buffer, save_length), Z - BEG); + XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG); current_buffer->auto_save_failure_time = -1; return Qnil; } diff --git a/src/filelock.c b/src/filelock.c index 6802880c985..8e18bb7b650 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -637,9 +637,9 @@ unlock_all_files (void) for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { b = XBUFFER (XCDR (XCAR (tail))); - if (STRINGP (B_ (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) + if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) { - unlock_file(B_ (b, file_truename)); + unlock_file(BVAR (b, file_truename)); } } } @@ -652,7 +652,7 @@ or else nothing is done if current buffer isn't visiting a file. */) (Lisp_Object file) { if (NILP (file)) - file = B_ (current_buffer, file_truename); + file = BVAR (current_buffer, file_truename); else CHECK_STRING (file); if (SAVE_MODIFF < MODIFF @@ -669,8 +669,8 @@ should not be locked in that case. */) (void) { if (SAVE_MODIFF < MODIFF - && STRINGP (B_ (current_buffer, file_truename))) - unlock_file (B_ (current_buffer, file_truename)); + && STRINGP (BVAR (current_buffer, file_truename))) + unlock_file (BVAR (current_buffer, file_truename)); return Qnil; } @@ -680,8 +680,8 @@ void unlock_buffer (struct buffer *buffer) { if (BUF_SAVE_MODIFF (buffer) < BUF_MODIFF (buffer) - && STRINGP (B_ (buffer, file_truename))) - unlock_file (B_ (buffer, file_truename)); + && STRINGP (BVAR (buffer, file_truename))) + unlock_file (BVAR (buffer, file_truename)); } DEFUN ("file-locked-p", Ffile_locked_p, Sfile_locked_p, 1, 1, 0, diff --git a/src/fns.c b/src/fns.c index a9632914d67..b54d52e3003 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2984,7 +2984,7 @@ into shorter lines. */) SAFE_ALLOCA (encoded, char *, allength); encoded_length = base64_encode_1 ((char *) BYTE_POS_ADDR (ibeg), encoded, length, NILP (no_line_break), - !NILP (B_ (current_buffer, enable_multibyte_characters))); + !NILP (BVAR (current_buffer, enable_multibyte_characters))); if (encoded_length > allength) abort (); @@ -3166,7 +3166,7 @@ If the region can't be decoded, signal an error and don't modify the buffer. */ EMACS_INT old_pos = PT; EMACS_INT decoded_length; EMACS_INT inserted_chars; - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); USE_SAFE_ALLOCA; validate_region (&beg, &end); @@ -4684,12 +4684,12 @@ guesswork fails. Normally, an error is signaled in such case. */) { int force_raw_text = 0; - coding_system = B_ (XBUFFER (object), buffer_file_coding_system); + coding_system = BVAR (XBUFFER (object), buffer_file_coding_system); if (NILP (coding_system) || NILP (Flocal_variable_p (Qbuffer_file_coding_system, Qnil))) { coding_system = Qnil; - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) force_raw_text = 1; } @@ -4706,11 +4706,11 @@ guesswork fails. Normally, an error is signaled in such case. */) } if (NILP (coding_system) - && !NILP (B_ (XBUFFER (object), buffer_file_coding_system))) + && !NILP (BVAR (XBUFFER (object), buffer_file_coding_system))) { /* If we still have not decided a coding system, use the default value of buffer-file-coding-system. */ - coding_system = B_ (XBUFFER (object), buffer_file_coding_system); + coding_system = BVAR (XBUFFER (object), buffer_file_coding_system); } if (!force_raw_text diff --git a/src/font.c b/src/font.c index d67e8465b6a..d77eafb6ad2 100644 --- a/src/font.c +++ b/src/font.c @@ -3637,7 +3637,7 @@ font_at (int c, EMACS_INT pos, struct face *face, struct window *w, Lisp_Object font_object; multibyte = (NILP (string) - ? ! NILP (B_ (current_buffer, enable_multibyte_characters)) + ? ! NILP (BVAR (current_buffer, enable_multibyte_characters)) : STRING_MULTIBYTE (string)); if (c < 0) { diff --git a/src/frame.c b/src/frame.c index ac223ac4da0..edbd45a2a34 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1817,7 +1817,7 @@ make_frame_visible_1 (Lisp_Object window) w = XWINDOW (window); if (!NILP (w->buffer)) - B_ (XBUFFER (w->buffer), display_time) = Fcurrent_time (); + BVAR (XBUFFER (w->buffer), display_time) = Fcurrent_time (); if (!NILP (w->vchild)) make_frame_visible_1 (w->vchild); diff --git a/src/fringe.c b/src/fringe.c index 5b7f8833069..d42d6467f31 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -660,7 +660,7 @@ get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor) { Lisp_Object cmap, bm = Qnil; - if ((cmap = B_ (XBUFFER (w->buffer), fringe_cursor_alist)), !NILP (cmap)) + if ((cmap = BVAR (XBUFFER (w->buffer), fringe_cursor_alist)), !NILP (cmap)) { bm = Fassq (cursor, cmap); if (CONSP (bm)) @@ -670,9 +670,9 @@ get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor) return lookup_fringe_bitmap (bm); } } - if (EQ (cmap, B_ (&buffer_defaults, fringe_cursor_alist))) + if (EQ (cmap, BVAR (&buffer_defaults, fringe_cursor_alist))) return NO_FRINGE_BITMAP; - bm = Fassq (cursor, B_ (&buffer_defaults, fringe_cursor_alist)); + bm = Fassq (cursor, BVAR (&buffer_defaults, fringe_cursor_alist)); if (!CONSP (bm) || ((bm = XCDR (bm)), NILP (bm))) return NO_FRINGE_BITMAP; return lookup_fringe_bitmap (bm); @@ -697,7 +697,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in If partial, lookup partial bitmap in default value if not found here. If not partial, or no partial spec is present, use non-partial bitmap. */ - if ((cmap = B_ (XBUFFER (w->buffer), fringe_indicator_alist)), !NILP (cmap)) + if ((cmap = BVAR (XBUFFER (w->buffer), fringe_indicator_alist)), !NILP (cmap)) { bm1 = Fassq (bitmap, cmap); if (CONSP (bm1)) @@ -731,10 +731,10 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in } } - if (!EQ (cmap, B_ (&buffer_defaults, fringe_indicator_alist)) - && !NILP (B_ (&buffer_defaults, fringe_indicator_alist))) + if (!EQ (cmap, BVAR (&buffer_defaults, fringe_indicator_alist)) + && !NILP (BVAR (&buffer_defaults, fringe_indicator_alist))) { - bm2 = Fassq (bitmap, B_ (&buffer_defaults, fringe_indicator_alist)); + bm2 = Fassq (bitmap, BVAR (&buffer_defaults, fringe_indicator_alist)); if (CONSP (bm2)) { if ((bm2 = XCDR (bm2)), !NILP (bm2)) @@ -919,7 +919,7 @@ update_window_fringes (struct window *w, int keep_current_p) return 0; if (!MINI_WINDOW_P (w) - && (ind = B_ (XBUFFER (w->buffer), indicate_buffer_boundaries), !NILP (ind))) + && (ind = BVAR (XBUFFER (w->buffer), indicate_buffer_boundaries), !NILP (ind))) { if (EQ (ind, Qleft) || EQ (ind, Qright)) boundary_top = boundary_bot = arrow_top = arrow_bot = ind; @@ -988,7 +988,7 @@ update_window_fringes (struct window *w, int keep_current_p) } } - empty_pos = B_ (XBUFFER (w->buffer), indicate_empty_lines); + empty_pos = BVAR (XBUFFER (w->buffer), indicate_empty_lines); if (!NILP (empty_pos) && !EQ (empty_pos, Qright)) empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft; diff --git a/src/indent.c b/src/indent.c index b0195b3dec8..85d26520cfb 100644 --- a/src/indent.c +++ b/src/indent.c @@ -70,7 +70,7 @@ buffer_display_table (void) { Lisp_Object thisbuf; - thisbuf = B_ (current_buffer, display_table); + thisbuf = BVAR (current_buffer, display_table); if (DISP_TABLE_P (thisbuf)) return XCHAR_TABLE (thisbuf); if (DISP_TABLE_P (Vstandard_display_table)) @@ -140,9 +140,9 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab) int i; struct Lisp_Vector *widthtab; - if (!VECTORP (B_ (buf, width_table))) - B_ (buf, width_table) = Fmake_vector (make_number (256), make_number (0)); - widthtab = XVECTOR (B_ (buf, width_table)); + if (!VECTORP (BVAR (buf, width_table))) + BVAR (buf, width_table) = Fmake_vector (make_number (256), make_number (0)); + widthtab = XVECTOR (BVAR (buf, width_table)); if (widthtab->size != 256) abort (); @@ -156,17 +156,17 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab) static void width_run_cache_on_off (void) { - if (NILP (B_ (current_buffer, cache_long_line_scans)) + if (NILP (BVAR (current_buffer, cache_long_line_scans)) /* And, for the moment, this feature doesn't work on multibyte characters. */ - || !NILP (B_ (current_buffer, enable_multibyte_characters))) + || !NILP (BVAR (current_buffer, enable_multibyte_characters))) { /* It should be off. */ if (current_buffer->width_run_cache) { free_region_cache (current_buffer->width_run_cache); current_buffer->width_run_cache = 0; - B_ (current_buffer, width_table) = Qnil; + BVAR (current_buffer, width_table) = Qnil; } } else @@ -329,8 +329,8 @@ current_column (void) register int tab_seen; int post_tab; register int c; - register int tab_width = XINT (B_ (current_buffer, tab_width)); - int ctl_arrow = !NILP (B_ (current_buffer, ctl_arrow)); + register int tab_width = XINT (BVAR (current_buffer, tab_width)); + int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); register struct Lisp_Char_Table *dp = buffer_display_table (); if (PT == last_known_column_point @@ -417,7 +417,7 @@ current_column (void) col++; else if (c == '\n' || (c == '\r' - && EQ (B_ (current_buffer, selective_display), Qt))) + && EQ (BVAR (current_buffer, selective_display), Qt))) { ptr++; goto start_of_line_found; @@ -512,10 +512,10 @@ check_display_width (EMACS_INT pos, EMACS_INT col, EMACS_INT *endpos) static void scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) { - register EMACS_INT tab_width = XINT (B_ (current_buffer, tab_width)); - register int ctl_arrow = !NILP (B_ (current_buffer, ctl_arrow)); + register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); + register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); register struct Lisp_Char_Table *dp = buffer_display_table (); - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); struct composition_it cmp_it; Lisp_Object window; struct window *w; @@ -637,7 +637,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) if (c == '\n') goto endloop; - if (c == '\r' && EQ (B_ (current_buffer, selective_display), Qt)) + if (c == '\r' && EQ (BVAR (current_buffer, selective_display), Qt)) goto endloop; if (c == '\t') { @@ -655,7 +655,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) if (c == '\n') goto endloop; - if (c == '\r' && EQ (B_ (current_buffer, selective_display), Qt)) + if (c == '\r' && EQ (BVAR (current_buffer, selective_display), Qt)) goto endloop; if (c == '\t') { @@ -809,7 +809,7 @@ The return value is COLUMN. */) { int mincol; register int fromcol; - register int tab_width = XINT (B_ (current_buffer, tab_width)); + register int tab_width = XINT (BVAR (current_buffer, tab_width)); CHECK_NUMBER (column); if (NILP (minimum)) @@ -872,7 +872,7 @@ static double position_indentation (register int pos_byte) { register EMACS_INT column = 0; - register EMACS_INT tab_width = XINT (B_ (current_buffer, tab_width)); + register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); register unsigned char *p; register unsigned char *stop; unsigned char *start; @@ -924,7 +924,7 @@ position_indentation (register int pos_byte) switch (*p++) { case 0240: - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) return column; case ' ': column++; @@ -934,7 +934,7 @@ position_indentation (register int pos_byte) break; default: if (ASCII_BYTE_P (p[-1]) - || NILP (B_ (current_buffer, enable_multibyte_characters))) + || NILP (BVAR (current_buffer, enable_multibyte_characters))) return column; { int c; @@ -1123,13 +1123,13 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ register EMACS_INT pos; EMACS_INT pos_byte; register int c = 0; - register EMACS_INT tab_width = XFASTINT (B_ (current_buffer, tab_width)); - register int ctl_arrow = !NILP (B_ (current_buffer, ctl_arrow)); + register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width)); + register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); register struct Lisp_Char_Table *dp = window_display_table (win); int selective - = (INTEGERP (B_ (current_buffer, selective_display)) - ? XINT (B_ (current_buffer, selective_display)) - : !NILP (B_ (current_buffer, selective_display)) ? -1 : 0); + = (INTEGERP (BVAR (current_buffer, selective_display)) + ? XINT (BVAR (current_buffer, selective_display)) + : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); int selective_rlen = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp)) ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0); @@ -1151,7 +1151,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ EMACS_INT next_width_run = from; Lisp_Object window; - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); /* If previous char scanned was a wide character, this is the column where it ended. Otherwise, this is 0. */ EMACS_INT wide_column_end_hpos = 0; @@ -1170,8 +1170,8 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ width_run_cache_on_off (); if (dp == buffer_display_table ()) - width_table = (VECTORP (B_ (current_buffer, width_table)) - ? XVECTOR (B_ (current_buffer, width_table))->contents + width_table = (VECTORP (BVAR (current_buffer, width_table)) + ? XVECTOR (BVAR (current_buffer, width_table))->contents : 0); else /* If the window has its own display table, we can't use the width @@ -1337,7 +1337,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ } if (hscroll || truncate - || !NILP (B_ (current_buffer, truncate_lines))) + || !NILP (BVAR (current_buffer, truncate_lines))) { /* Truncating: skip to newline, unless we are already past TO (we need to go back below). */ @@ -1838,9 +1838,9 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) EMACS_INT from_byte; EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0; int selective - = (INTEGERP (B_ (current_buffer, selective_display)) - ? XINT (B_ (current_buffer, selective_display)) - : !NILP (B_ (current_buffer, selective_display)) ? -1 : 0); + = (INTEGERP (BVAR (current_buffer, selective_display)) + ? XINT (BVAR (current_buffer, selective_display)) + : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); Lisp_Object window; EMACS_INT start_hpos = 0; int did_motion; diff --git a/src/insdel.c b/src/insdel.c index db997fc938e..7fcf9522a33 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -78,7 +78,7 @@ void check_markers (void) { register struct Lisp_Marker *tail; - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) { @@ -703,7 +703,7 @@ insert_char (int c) unsigned char str[MAX_MULTIBYTE_LENGTH]; int len; - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) len = CHAR_STRING (c, str); else { @@ -891,7 +891,7 @@ insert_1_both (const char *string, if (nchars == 0) return; - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) nchars = nbytes; if (prepare) @@ -1011,7 +1011,7 @@ insert_from_string_1 (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, /* Make OUTGOING_NBYTES describe the text as it will be inserted in this buffer. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) outgoing_nbytes = nchars; else if (! STRING_MULTIBYTE (string)) outgoing_nbytes @@ -1034,7 +1034,7 @@ insert_from_string_1 (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, between single-byte and multibyte. */ copy_text (SDATA (string) + pos_byte, GPT_ADDR, nbytes, STRING_MULTIBYTE (string), - ! NILP (B_ (current_buffer, enable_multibyte_characters))); + ! NILP (BVAR (current_buffer, enable_multibyte_characters))); #ifdef BYTE_COMBINING_DEBUG /* We have copied text into the gap, but we have not altered @@ -1094,7 +1094,7 @@ insert_from_string_1 (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, void insert_from_gap (EMACS_INT nchars, EMACS_INT nbytes) { - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) nchars = nbytes; record_insert (GPT, nchars); @@ -1162,9 +1162,9 @@ insert_from_buffer_1 (struct buffer *buf, /* Make OUTGOING_NBYTES describe the text as it will be inserted in this buffer. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) outgoing_nbytes = nchars; - else if (NILP (B_ (buf, enable_multibyte_characters))) + else if (NILP (BVAR (buf, enable_multibyte_characters))) { EMACS_INT outgoing_before_gap = 0; EMACS_INT outgoing_after_gap = 0; @@ -1215,8 +1215,8 @@ insert_from_buffer_1 (struct buffer *buf, chunk_expanded = copy_text (BUF_BYTE_ADDRESS (buf, from_byte), GPT_ADDR, chunk, - ! NILP (B_ (buf, enable_multibyte_characters)), - ! NILP (B_ (current_buffer, enable_multibyte_characters))); + ! NILP (BVAR (buf, enable_multibyte_characters)), + ! NILP (BVAR (current_buffer, enable_multibyte_characters))); } else chunk_expanded = chunk = 0; @@ -1224,8 +1224,8 @@ insert_from_buffer_1 (struct buffer *buf, if (chunk < incoming_nbytes) copy_text (BUF_BYTE_ADDRESS (buf, from_byte + chunk), GPT_ADDR + chunk_expanded, incoming_nbytes - chunk, - ! NILP (B_ (buf, enable_multibyte_characters)), - ! NILP (B_ (current_buffer, enable_multibyte_characters))); + ! NILP (BVAR (buf, enable_multibyte_characters)), + ! NILP (BVAR (current_buffer, enable_multibyte_characters))); #ifdef BYTE_COMBINING_DEBUG /* We have copied text into the gap, but we have not altered @@ -1320,7 +1320,7 @@ adjust_after_replace (EMACS_INT from, EMACS_INT from_byte, adjust_markers_for_insert (from, from_byte, from + len, from_byte + len_byte, 0); - if (! EQ (B_ (current_buffer, undo_list), Qt)) + if (! EQ (BVAR (current_buffer, undo_list), Qt)) { if (nchars_del > 0) record_delete (from, prev_text); @@ -1481,7 +1481,7 @@ replace_range (EMACS_INT from, EMACS_INT to, Lisp_Object new, /* Make OUTGOING_INSBYTES describe the text as it will be inserted in this buffer. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) outgoing_insbytes = inschars; else if (! STRING_MULTIBYTE (new)) outgoing_insbytes @@ -1503,7 +1503,7 @@ replace_range (EMACS_INT from, EMACS_INT to, Lisp_Object new, /* Even if we don't record for undo, we must keep the original text because we may have to recover it because of inappropriate byte combining. */ - if (! EQ (B_ (current_buffer, undo_list), Qt)) + if (! EQ (BVAR (current_buffer, undo_list), Qt)) deletion = make_buffer_string_both (from, from_byte, to, to_byte, 1); GAP_SIZE += nbytes_del; @@ -1530,7 +1530,7 @@ replace_range (EMACS_INT from, EMACS_INT to, Lisp_Object new, between single-byte and multibyte. */ copy_text (SDATA (new), GPT_ADDR, insbytes, STRING_MULTIBYTE (new), - ! NILP (B_ (current_buffer, enable_multibyte_characters))); + ! NILP (BVAR (current_buffer, enable_multibyte_characters))); #ifdef BYTE_COMBINING_DEBUG /* We have copied text into the gap, but we have not marked @@ -1543,7 +1543,7 @@ replace_range (EMACS_INT from, EMACS_INT to, Lisp_Object new, abort (); #endif - if (! EQ (B_ (current_buffer, undo_list), Qt)) + if (! EQ (BVAR (current_buffer, undo_list), Qt)) { /* Record the insertion first, so that when we undo, the deletion will be undone first. Thus, undo @@ -1886,7 +1886,7 @@ del_range_2 (EMACS_INT from, EMACS_INT from_byte, abort (); #endif - if (ret_string || ! EQ (B_ (current_buffer, undo_list), Qt)) + if (ret_string || ! EQ (BVAR (current_buffer, undo_list), Qt)) deletion = make_buffer_string_both (from, from_byte, to, to_byte, 1); else deletion = Qnil; @@ -1897,7 +1897,7 @@ del_range_2 (EMACS_INT from, EMACS_INT from_byte, so that undo handles this after reinserting the text. */ adjust_markers_for_delete (from, from_byte, to, to_byte); - if (! EQ (B_ (current_buffer, undo_list), Qt)) + if (! EQ (BVAR (current_buffer, undo_list), Qt)) record_delete (from, deletion); MODIFF++; CHARS_MODIFF = MODIFF; @@ -1968,7 +1968,7 @@ modify_region (struct buffer *buffer, EMACS_INT start, EMACS_INT end, if (! preserve_chars_modiff) CHARS_MODIFF = MODIFF; - B_ (buffer, point_before_scroll) = Qnil; + BVAR (buffer, point_before_scroll) = Qnil; if (buffer != old_buffer) set_buffer_internal (old_buffer); @@ -1990,7 +1990,7 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, { struct buffer *base_buffer; - if (!NILP (B_ (current_buffer, read_only))) + if (!NILP (BVAR (current_buffer, read_only))) Fbarf_if_buffer_read_only (); /* Let redisplay consider other windows than selected_window @@ -2022,32 +2022,32 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, base_buffer = current_buffer; #ifdef CLASH_DETECTION - if (!NILP (B_ (base_buffer, file_truename)) + if (!NILP (BVAR (base_buffer, file_truename)) /* Make binding buffer-file-name to nil effective. */ - && !NILP (B_ (base_buffer, filename)) + && !NILP (BVAR (base_buffer, filename)) && SAVE_MODIFF >= MODIFF) - lock_file (B_ (base_buffer, file_truename)); + lock_file (BVAR (base_buffer, file_truename)); #else /* At least warn if this file has changed on disk since it was visited. */ - if (!NILP (B_ (base_buffer, filename)) + if (!NILP (BVAR (base_buffer, filename)) && SAVE_MODIFF >= MODIFF && NILP (Fverify_visited_file_modtime (Fcurrent_buffer ())) - && !NILP (Ffile_exists_p (B_ (base_buffer, filename)))) + && !NILP (Ffile_exists_p (BVAR (base_buffer, filename)))) call1 (intern ("ask-user-about-supersession-threat"), - B_ (base_buffer,filename)); + BVAR (base_buffer,filename)); #endif /* not CLASH_DETECTION */ /* If `select-active-regions' is non-nil, save the region text. */ - if (!NILP (B_ (current_buffer, mark_active)) + if (!NILP (BVAR (current_buffer, mark_active)) && !inhibit_modification_hooks - && XMARKER (B_ (current_buffer, mark))->buffer + && XMARKER (BVAR (current_buffer, mark))->buffer && NILP (Vsaved_region_selection) && (EQ (Vselect_active_regions, Qonly) ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) { - EMACS_INT b = XMARKER (B_ (current_buffer, mark))->charpos; + EMACS_INT b = XMARKER (BVAR (current_buffer, mark))->charpos; EMACS_INT e = PT; if (b < e) Vsaved_region_selection = make_buffer_string (b, e, 0); @@ -2290,7 +2290,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, non-nil, and insertion calls a file handler (e.g. through lock_file) which scribbles into a temp file -- cyd */ if (!BUFFERP (combine_after_change_buffer) - || NILP (B_ (XBUFFER (combine_after_change_buffer), name))) + || NILP (BVAR (XBUFFER (combine_after_change_buffer), name))) { combine_after_change_list = Qnil; return Qnil; diff --git a/src/intervals.c b/src/intervals.c index de5faf6ce75..6aee6e9d7fa 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1978,7 +1978,7 @@ set_point_both (EMACS_INT charpos, EMACS_INT bytepos) int have_overlays; EMACS_INT original_position; - B_ (current_buffer, point_before_scroll) = Qnil; + BVAR (current_buffer, point_before_scroll) = Qnil; if (charpos == PT) return; @@ -2342,7 +2342,7 @@ get_local_map (register EMACS_INT position, register struct buffer *buffer, if (EQ (type, Qkeymap)) return Qnil; else - return B_ (buffer, keymap); + return BVAR (buffer, keymap); } /* Produce an interval tree reflecting the intervals in diff --git a/src/intervals.h b/src/intervals.h index 3c46c50db79..f6c1c002ce0 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -236,9 +236,9 @@ struct interval and 2 if it is invisible but with an ellipsis. */ #define TEXT_PROP_MEANS_INVISIBLE(prop) \ - (EQ (B_ (current_buffer, invisibility_spec), Qt) \ + (EQ (BVAR (current_buffer, invisibility_spec), Qt) \ ? !NILP (prop) \ - : invisible_p (prop, B_ (current_buffer, invisibility_spec))) + : invisible_p (prop, BVAR (current_buffer, invisibility_spec))) /* Declared in alloc.c */ diff --git a/src/keyboard.c b/src/keyboard.c index 339d32a838a..a1d851408e3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1577,7 +1577,7 @@ command_loop_1 (void) this_single_command_key_start = 0; } - if (!NILP (B_ (current_buffer, mark_active)) + if (!NILP (BVAR (current_buffer, mark_active)) && !NILP (Vrun_hooks)) { /* In Emacs 22, setting transient-mark-mode to `only' was a @@ -1599,7 +1599,7 @@ command_loop_1 (void) if (!NILP (Fwindow_system (Qnil)) /* Even if mark_active is non-nil, the actual buffer marker may not have been set yet (Bug#7044). */ - && XMARKER (B_ (current_buffer, mark))->buffer + && XMARKER (BVAR (current_buffer, mark))->buffer && (EQ (Vselect_active_regions, Qonly) ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) @@ -1607,7 +1607,7 @@ command_loop_1 (void) && !EQ (Vthis_command, Qhandle_switch_frame)) { EMACS_INT beg = - XINT (Fmarker_position (B_ (current_buffer, mark))); + XINT (Fmarker_position (BVAR (current_buffer, mark))); EMACS_INT end = PT; if (beg < end) call2 (Qx_set_selection, QPRIMARY, @@ -8608,7 +8608,7 @@ read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps) /* Prompt with that and read response. */ message2_nolog (menu, strlen (menu), - ! NILP (B_ (current_buffer, enable_multibyte_characters))); + ! NILP (BVAR (current_buffer, enable_multibyte_characters))); /* Make believe its not a keyboard macro in case the help char is pressed. Help characters are not recorded because menu prompting @@ -9870,7 +9870,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* Treat uppercase keys as shifted. */ || (INTEGERP (key) && (KEY_TO_CHAR (key) - < XCHAR_TABLE (B_ (current_buffer, downcase_table))->size) + < XCHAR_TABLE (BVAR (current_buffer, downcase_table))->size) && UPPERCASEP (KEY_TO_CHAR (key)))) { Lisp_Object new_key diff --git a/src/keymap.c b/src/keymap.c index b694deadcba..d9de2bc804b 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1883,7 +1883,7 @@ bindings; see the description of `lookup-key' for more details about this. */) (Lisp_Object keys, Lisp_Object accept_default) { register Lisp_Object map; - map = B_ (current_buffer, keymap); + map = BVAR (current_buffer, keymap); if (NILP (map)) return Qnil; return Flookup_key (map, keys, accept_default); @@ -1988,7 +1988,7 @@ If KEYMAP is nil, that means no local keymap. */) if (!NILP (keymap)) keymap = get_keymap (keymap, 1, 1); - B_ (current_buffer, keymap) = keymap; + BVAR (current_buffer, keymap) = keymap; return Qnil; } @@ -1998,7 +1998,7 @@ DEFUN ("current-local-map", Fcurrent_local_map, Scurrent_local_map, 0, 0, 0, Normally the local keymap is set by the major mode with `use-local-map'. */) (void) { - return B_ (current_buffer, keymap); + return BVAR (current_buffer, keymap); } DEFUN ("current-global-map", Fcurrent_global_map, Scurrent_global_map, 0, 0, 0, @@ -2379,7 +2379,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi *p++ = 'C'; } else if (c < 128 - || (NILP (B_ (current_buffer, enable_multibyte_characters)) + || (NILP (BVAR (current_buffer, enable_multibyte_characters)) && SINGLE_BYTE_CHAR_P (c) && !force_multibyte)) { @@ -2388,7 +2388,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi else { /* Now we are sure that C is a valid character code. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! force_multibyte) *p++ = multibyte_char_to_unibyte (c, Qnil); else @@ -3048,7 +3048,7 @@ You type Translation\n\ XBUFFER (buffer), Qlocal_map); if (!NILP (start1)) { - if (EQ (start1, B_ (XBUFFER (buffer), keymap))) + if (EQ (start1, BVAR (XBUFFER (buffer), keymap))) describe_map_tree (start1, 1, shadow, prefix, "\f\nMajor Mode Bindings", nomenu, 0, 0, 0); else diff --git a/src/lisp.h b/src/lisp.h index 0efadd675b0..bd1595bce0b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2047,11 +2047,11 @@ extern Lisp_Object case_temp2; /* Current buffer's map from characters to lower-case characters. */ -#define DOWNCASE_TABLE B_ (current_buffer, downcase_table) +#define DOWNCASE_TABLE BVAR (current_buffer, downcase_table) /* Current buffer's map from characters to upper-case characters. */ -#define UPCASE_TABLE B_ (current_buffer, upcase_table) +#define UPCASE_TABLE BVAR (current_buffer, upcase_table) /* Downcase a character, or make no change if that cannot be done. */ diff --git a/src/lread.c b/src/lread.c index de9c5db95ad..7e410fcc334 100644 --- a/src/lread.c +++ b/src/lread.c @@ -210,7 +210,7 @@ readchar (Lisp_Object readcharfun, int *multibyte) if (pt_byte >= BUF_ZV_BYTE (inbuffer)) return -1; - if (! NILP (B_ (inbuffer, enable_multibyte_characters))) + if (! NILP (BVAR (inbuffer, enable_multibyte_characters))) { /* Fetch the character code from the buffer. */ unsigned char *p = BUF_BYTE_ADDRESS (inbuffer, pt_byte); @@ -239,7 +239,7 @@ readchar (Lisp_Object readcharfun, int *multibyte) if (bytepos >= BUF_ZV_BYTE (inbuffer)) return -1; - if (! NILP (B_ (inbuffer, enable_multibyte_characters))) + if (! NILP (BVAR (inbuffer, enable_multibyte_characters))) { /* Fetch the character code from the buffer. */ unsigned char *p = BUF_BYTE_ADDRESS (inbuffer, bytepos); @@ -371,7 +371,7 @@ unreadchar (Lisp_Object readcharfun, int c) EMACS_INT bytepos = BUF_PT_BYTE (b); BUF_PT (b)--; - if (! NILP (B_ (b, enable_multibyte_characters))) + if (! NILP (BVAR (b, enable_multibyte_characters))) BUF_DEC_POS (b, bytepos); else bytepos--; @@ -384,7 +384,7 @@ unreadchar (Lisp_Object readcharfun, int c) EMACS_INT bytepos = XMARKER (readcharfun)->bytepos; XMARKER (readcharfun)->charpos--; - if (! NILP (B_ (b, enable_multibyte_characters))) + if (! NILP (BVAR (b, enable_multibyte_characters))) BUF_DEC_POS (b, bytepos); else bytepos--; @@ -1322,7 +1322,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto /* Of course, this could conceivably lose if luser sets default-directory to be something non-absolute... */ { - filename = Fexpand_file_name (filename, B_ (current_buffer, directory)); + filename = Fexpand_file_name (filename, BVAR (current_buffer, directory)); if (!complete_filename_p (filename)) /* Give up on this path element! */ continue; @@ -1581,7 +1581,7 @@ readevalloop (Lisp_Object readcharfun, { int count1 = SPECPDL_INDEX (); - if (b != 0 && NILP (B_ (b, name))) + if (b != 0 && NILP (BVAR (b, name))) error ("Reading from killed buffer"); if (!NILP (start)) @@ -1721,7 +1721,7 @@ This function preserves the position of point. */) tem = printflag; if (NILP (filename)) - filename = B_ (XBUFFER (buf), filename); + filename = BVAR (XBUFFER (buf), filename); specbind (Qeval_buffer_list, Fcons (buf, Veval_buffer_list)); specbind (Qstandard_output, tem); @@ -1761,7 +1761,7 @@ This function does not move point. */) specbind (Qeval_buffer_list, Fcons (cbuf, Veval_buffer_list)); /* readevalloop calls functions which check the type of start and end. */ - readevalloop (cbuf, 0, B_ (XBUFFER (cbuf), filename), Feval, + readevalloop (cbuf, 0, BVAR (XBUFFER (cbuf), filename), Feval, !NILP (printflag), Qnil, read_function, start, end); diff --git a/src/marker.c b/src/marker.c index 9b841835646..72c564f420f 100644 --- a/src/marker.c +++ b/src/marker.c @@ -439,7 +439,7 @@ Returns nil if MARKER points into a dead buffer. */) does not preserve the buffer from being GC'd (it's weak), so markers have to be unlinked from their buffer as soon as the buffer is killed. */ - eassert (!NILP (B_ (XBUFFER (buf), name))); + eassert (!NILP (BVAR (XBUFFER (buf), name))); return buf; } return Qnil; @@ -488,7 +488,7 @@ Returns MARKER. */) CHECK_BUFFER (buffer); b = XBUFFER (buffer); /* If buffer is dead, set marker to point nowhere. */ - if (EQ (B_ (b, name), Qnil)) + if (EQ (BVAR (b, name), Qnil)) { unchain_marker (m); return marker; @@ -563,7 +563,7 @@ set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer) CHECK_BUFFER (buffer); b = XBUFFER (buffer); /* If buffer is dead, set marker to point nowhere. */ - if (EQ (B_ (b, name), Qnil)) + if (EQ (BVAR (b, name), Qnil)) { unchain_marker (m); return marker; @@ -628,7 +628,7 @@ set_marker_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT charpos, EMAC CHECK_BUFFER (buffer); b = XBUFFER (buffer); /* If buffer is dead, set marker to point nowhere. */ - if (EQ (B_ (b, name), Qnil)) + if (EQ (BVAR (b, name), Qnil)) { unchain_marker (m); return marker; @@ -676,7 +676,7 @@ set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT ch CHECK_BUFFER (buffer); b = XBUFFER (buffer); /* If buffer is dead, set marker to point nowhere. */ - if (EQ (B_ (b, name), Qnil)) + if (EQ (BVAR (b, name), Qnil)) { unchain_marker (m); return marker; @@ -731,7 +731,7 @@ unchain_marker (register struct Lisp_Marker *marker) if (b == 0) return; - if (EQ (B_ (b, name), Qnil)) + if (EQ (BVAR (b, name), Qnil)) abort (); marker->buffer = 0; diff --git a/src/minibuf.c b/src/minibuf.c index 3ed8630c845..4b709bd9cbd 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -415,7 +415,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, CHECK_STRING (initial); } val = Qnil; - ambient_dir = B_ (current_buffer, directory); + ambient_dir = BVAR (current_buffer, directory); input_method = Qnil; enable_multibyte = Qnil; @@ -525,7 +525,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, /* `current-input-method' is buffer local. So, remember it in INPUT_METHOD before changing the current buffer. */ input_method = Fsymbol_value (Qcurrent_input_method); - enable_multibyte = B_ (current_buffer, enable_multibyte_characters); + enable_multibyte = BVAR (current_buffer, enable_multibyte_characters); } /* Switch to the minibuffer. */ @@ -535,7 +535,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, /* If appropriate, copy enable-multibyte-characters into the minibuffer. */ if (inherit_input_method) - B_ (current_buffer, enable_multibyte_characters) = enable_multibyte; + BVAR (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 @@ -546,7 +546,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)) - B_ (current_buffer, directory) = ambient_dir; + BVAR (current_buffer, directory) = ambient_dir; else { Lisp_Object buf_list; @@ -558,9 +558,9 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, Lisp_Object other_buf; other_buf = XCDR (XCAR (buf_list)); - if (STRINGP (B_ (XBUFFER (other_buf), directory))) + if (STRINGP (BVAR (XBUFFER (other_buf), directory))) { - B_ (current_buffer, directory) = B_ (XBUFFER (other_buf), directory); + BVAR (current_buffer, directory) = BVAR (XBUFFER (other_buf), directory); break; } } @@ -603,7 +603,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, specbind (Qinhibit_modification_hooks, Qt); Ferase_buffer (); - if (!NILP (B_ (current_buffer, enable_multibyte_characters)) + if (!NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! STRING_MULTIBYTE (minibuf_prompt)) minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); @@ -633,7 +633,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, } clear_message (1, 1); - B_ (current_buffer, keymap) = map; + BVAR (current_buffer, keymap) = map; /* Turn on an input method stored in INPUT_METHOD if any. */ if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) @@ -647,7 +647,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, call1 (Vrun_hooks, Qminibuffer_setup_hook); /* Don't allow the user to undo past this point. */ - B_ (current_buffer, undo_list) = Qnil; + BVAR (current_buffer, undo_list) = Qnil; recursive_edit_1 (); @@ -764,7 +764,7 @@ get_minibuffer (int depth) Vminibuffer_list = nconc2 (Vminibuffer_list, tail); } buf = Fcar (tail); - if (NILP (buf) || NILP (B_ (XBUFFER (buf), name))) + if (NILP (buf) || NILP (BVAR (XBUFFER (buf), name))) { sprintf (name, " *Minibuf-%d*", depth); buf = Fget_buffer_create (build_string (name)); @@ -1096,7 +1096,7 @@ function, instead of the usual behavior. */) int count = SPECPDL_INDEX (); if (BUFFERP (def)) - def = B_ (XBUFFER (def), name); + def = BVAR (XBUFFER (def), name); specbind (Qcompletion_ignore_case, read_buffer_completion_ignore_case ? Qt : Qnil); diff --git a/src/msdos.c b/src/msdos.c index d37200e700a..4fdfa64e367 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1317,12 +1317,12 @@ IT_frame_up_to_date (struct frame *f) { struct buffer *b = XBUFFER (sw->buffer); - if (EQ (B_ (b,cursor_type), Qt)) + if (EQ (BVAR (b,cursor_type), Qt)) new_cursor = frame_desired_cursor; - else if (NILP (B_ (b, cursor_type))) /* nil means no cursor */ + else if (NILP (BVAR (b, cursor_type))) /* nil means no cursor */ new_cursor = Fcons (Qbar, make_number (0)); else - new_cursor = B_ (b, cursor_type); + new_cursor = BVAR (b, cursor_type); } IT_set_cursor_type (f, new_cursor); diff --git a/src/print.c b/src/print.c index beb14a8b679..299cfd41814 100644 --- a/src/print.c +++ b/src/print.c @@ -111,7 +111,7 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; EMACS_INT old_point_byte = -1, start_point_byte = -1; \ int specpdl_count = SPECPDL_INDEX (); \ int free_print_buffer = 0; \ - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); \ + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); \ Lisp_Object original #define PRINTPREPARE \ @@ -144,10 +144,10 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; if (NILP (printcharfun)) \ { \ Lisp_Object string; \ - if (NILP (B_ (current_buffer, enable_multibyte_characters)) \ + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \ && ! print_escape_multibyte) \ specbind (Qprint_escape_multibyte, Qt); \ - if (! NILP (B_ (current_buffer, enable_multibyte_characters)) \ + if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \ && ! print_escape_nonascii) \ specbind (Qprint_escape_nonascii, Qt); \ if (print_buffer != 0) \ @@ -173,7 +173,7 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; if (NILP (printcharfun)) \ { \ if (print_buffer_pos != print_buffer_pos_byte \ - && NILP (B_ (current_buffer, enable_multibyte_characters))) \ + && NILP (BVAR (current_buffer, enable_multibyte_characters))) \ { \ unsigned char *temp \ = (unsigned char *) alloca (print_buffer_pos + 1); \ @@ -250,7 +250,7 @@ printchar (unsigned int ch, Lisp_Object fun) else { int multibyte_p - = !NILP (B_ (current_buffer, enable_multibyte_characters)); + = !NILP (BVAR (current_buffer, enable_multibyte_characters)); setup_echo_area_for_printing (multibyte_p); insert_char (ch); @@ -302,7 +302,7 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, job. */ int i; int multibyte_p - = !NILP (B_ (current_buffer, enable_multibyte_characters)); + = !NILP (BVAR (current_buffer, enable_multibyte_characters)); setup_echo_area_for_printing (multibyte_p); message_dolog (ptr, size_byte, 0, multibyte_p); @@ -371,8 +371,8 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) chars = SCHARS (string); else if (! print_escape_nonascii && (EQ (printcharfun, Qt) - ? ! NILP (B_ (&buffer_defaults, enable_multibyte_characters)) - : ! NILP (B_ (current_buffer, enable_multibyte_characters)))) + ? ! NILP (BVAR (&buffer_defaults, enable_multibyte_characters)) + : ! NILP (BVAR (current_buffer, enable_multibyte_characters)))) { /* If unibyte string STRING contains 8-bit codes, we must convert STRING to a multibyte string containing the same @@ -504,14 +504,14 @@ temp_output_buffer_setup (const char *bufname) Fkill_all_local_variables (); delete_all_overlays (current_buffer); - B_ (current_buffer, directory) = B_ (old, directory); - B_ (current_buffer, read_only) = Qnil; - B_ (current_buffer, filename) = Qnil; - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, directory) = BVAR (old, directory); + BVAR (current_buffer, read_only) = Qnil; + BVAR (current_buffer, filename) = Qnil; + BVAR (current_buffer, undo_list) = Qt; eassert (current_buffer->overlays_before == NULL); eassert (current_buffer->overlays_after == NULL); - B_ (current_buffer, enable_multibyte_characters) - = B_ (&buffer_defaults, enable_multibyte_characters); + BVAR (current_buffer, enable_multibyte_characters) + = BVAR (&buffer_defaults, enable_multibyte_characters); specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); Ferase_buffer (); @@ -1856,7 +1856,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag if (!NILP (XWINDOW (obj)->buffer)) { strout (" on ", -1, -1, printcharfun, 0); - print_string (B_ (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); + print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); } PRINTCHAR ('>'); } @@ -1957,16 +1957,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag } else if (BUFFERP (obj)) { - if (NILP (B_ (XBUFFER (obj), name))) + if (NILP (BVAR (XBUFFER (obj), name))) strout ("#<killed buffer>", -1, -1, printcharfun, 0); else if (escapeflag) { strout ("#<buffer ", -1, -1, printcharfun, 0); - print_string (B_ (XBUFFER (obj), name), printcharfun); + print_string (BVAR (XBUFFER (obj), name), printcharfun); PRINTCHAR ('>'); } else - print_string (B_ (XBUFFER (obj), name), printcharfun); + print_string (BVAR (XBUFFER (obj), name), printcharfun); } else if (WINDOW_CONFIGURATIONP (obj)) { @@ -2078,7 +2078,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag sprintf (buf, "at %ld", (long)marker_position (obj)); strout (buf, -1, -1, printcharfun, 0); strout (" in ", -1, -1, printcharfun, 0); - print_string (B_ (XMARKER (obj)->buffer, name), printcharfun); + print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); } PRINTCHAR ('>'); break; @@ -2093,7 +2093,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag (long)marker_position (OVERLAY_START (obj)), (long)marker_position (OVERLAY_END (obj))); strout (buf, -1, -1, printcharfun, 0); - print_string (B_ (XMARKER (OVERLAY_START (obj))->buffer, name), + print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), printcharfun); } PRINTCHAR ('>'); diff --git a/src/process.c b/src/process.c index ec929a919f8..4a145f7376a 100644 --- a/src/process.c +++ b/src/process.c @@ -719,7 +719,7 @@ get_process (register Lisp_Object name) { proc = Fget_buffer_process (obj); if (NILP (proc)) - error ("Buffer %s has no process", SDATA (B_ (XBUFFER (obj), name))); + error ("Buffer %s has no process", SDATA (BVAR (XBUFFER (obj), name))); } else { @@ -1283,12 +1283,12 @@ list_processes_1 (Lisp_Object query_only) w_proc = i; if (!NILP (p->buffer)) { - if (NILP (B_ (XBUFFER (p->buffer), name))) + if (NILP (BVAR (XBUFFER (p->buffer), name))) { if (w_buffer < 8) w_buffer = 8; /* (Killed) */ } - else if ((i = SCHARS (B_ (XBUFFER (p->buffer), name)), (i > w_buffer))) + else if ((i = SCHARS (BVAR (XBUFFER (p->buffer), name)), (i > w_buffer))) w_buffer = i; } if (STRINGP (p->tty_name) @@ -1312,9 +1312,9 @@ list_processes_1 (Lisp_Object query_only) XSETFASTINT (minspace, 1); set_buffer_internal (XBUFFER (Vstandard_output)); - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, undo_list) = Qt; - B_ (current_buffer, truncate_lines) = Qt; + BVAR (current_buffer, truncate_lines) = Qt; write_string ("Proc", -1); Findent_to (i_status, minspace); write_string ("Status", -1); @@ -1397,10 +1397,10 @@ list_processes_1 (Lisp_Object query_only) Findent_to (i_buffer, minspace); if (NILP (p->buffer)) insert_string ("(none)"); - else if (NILP (B_ (XBUFFER (p->buffer), name))) + else if (NILP (BVAR (XBUFFER (p->buffer), name))) insert_string ("(Killed)"); else - Finsert (1, &B_ (XBUFFER (p->buffer), name)); + Finsert (1, &BVAR (XBUFFER (p->buffer), name)); if (!NILP (i_tty)) { @@ -1548,7 +1548,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) { struct gcpro gcpro1, gcpro2; - current_dir = B_ (current_buffer, directory); + current_dir = BVAR (current_buffer, directory); GCPRO2 (buffer, current_dir); @@ -1560,7 +1560,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) current_dir = expand_and_dir_to_file (current_dir, Qnil); if (NILP (Ffile_accessible_directory_p (current_dir))) report_file_error ("Setting current directory", - Fcons (B_ (current_buffer, directory), Qnil)); + Fcons (BVAR (current_buffer, directory), Qnil)); UNGCPRO; } @@ -2898,8 +2898,8 @@ usage: (make-serial-process &rest ARGS) */) } else if (!NILP (Vcoding_system_for_read)) val = Vcoding_system_for_read; - else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters))) - || (NILP (buffer) && NILP (B_ (&buffer_defaults, enable_multibyte_characters)))) + else if ((!NILP (buffer) && NILP (BVAR (XBUFFER (buffer), enable_multibyte_characters))) + || (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) val = Qnil; p->decode_coding_system = val; @@ -2912,8 +2912,8 @@ usage: (make-serial-process &rest ARGS) */) } else if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; - else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters))) - || (NILP (buffer) && NILP (B_ (&buffer_defaults, enable_multibyte_characters)))) + else if ((!NILP (buffer) && NILP (BVAR (XBUFFER (buffer), enable_multibyte_characters))) + || (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) val = Qnil; p->encode_coding_system = val; @@ -3723,8 +3723,8 @@ usage: (make-network-process &rest ARGS) */) } else if (!NILP (Vcoding_system_for_read)) val = Vcoding_system_for_read; - else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters))) - || (NILP (buffer) && NILP (B_ (&buffer_defaults, enable_multibyte_characters)))) + else if ((!NILP (buffer) && NILP (BVAR (XBUFFER (buffer), enable_multibyte_characters))) + || (NILP (buffer) && NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))) /* We dare not decode end-of-line format by setting VAL to Qraw_text, because the existing Emacs Lisp libraries assume that they receive bare code including a sequene of @@ -3759,7 +3759,7 @@ usage: (make-network-process &rest ARGS) */) } else if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; - else if (NILP (B_ (current_buffer, enable_multibyte_characters))) + else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) val = Qnil; else { @@ -5268,7 +5268,7 @@ read_process_output (Lisp_Object proc, register int channel) /* No need to gcpro these, because all we do with them later is test them for EQness, and none of them should be a string. */ XSETBUFFER (obuffer, current_buffer); - okeymap = B_ (current_buffer, keymap); + okeymap = BVAR (current_buffer, keymap); /* We inhibit quit here instead of just catching it so that hitting ^G when a filter happens to be running won't screw @@ -5359,7 +5359,7 @@ read_process_output (Lisp_Object proc, register int channel) } /* If no filter, write into buffer if it isn't dead. */ - else if (!NILP (p->buffer) && !NILP (B_ (XBUFFER (p->buffer), name))) + else if (!NILP (p->buffer) && !NILP (BVAR (XBUFFER (p->buffer), name))) { Lisp_Object old_read_only; EMACS_INT old_begv, old_zv; @@ -5372,13 +5372,13 @@ read_process_output (Lisp_Object proc, register int channel) Fset_buffer (p->buffer); opoint = PT; opoint_byte = PT_BYTE; - old_read_only = B_ (current_buffer, read_only); + old_read_only = BVAR (current_buffer, read_only); old_begv = BEGV; old_zv = ZV; old_begv_byte = BEGV_BYTE; old_zv_byte = ZV_BYTE; - B_ (current_buffer, read_only) = Qnil; + BVAR (current_buffer, read_only) = Qnil; /* Insert new output into buffer at the current end-of-output marker, @@ -5423,7 +5423,7 @@ read_process_output (Lisp_Object proc, register int channel) p->decoding_carryover = coding->carryover_bytes; } /* Adjust the multibyteness of TEXT to that of the buffer. */ - if (NILP (B_ (current_buffer, enable_multibyte_characters)) + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) != ! STRING_MULTIBYTE (text)) text = (STRING_MULTIBYTE (text) ? Fstring_as_unibyte (text) @@ -5467,7 +5467,7 @@ read_process_output (Lisp_Object proc, register int channel) Fnarrow_to_region (make_number (old_begv), make_number (old_zv)); - B_ (current_buffer, read_only) = old_read_only; + BVAR (current_buffer, read_only) = old_read_only; SET_PT_BOTH (opoint, opoint_byte); } /* Handling the process output should not deactivate the mark. */ @@ -5525,7 +5525,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, if ((STRINGP (object) && STRING_MULTIBYTE (object)) || (BUFFERP (object) - && !NILP (B_ (XBUFFER (object), enable_multibyte_characters))) + && !NILP (BVAR (XBUFFER (object), enable_multibyte_characters))) || EQ (object, Qt)) { p->encode_coding_system @@ -6564,7 +6564,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason) is test them for EQness, and none of them should be a string. */ odeactivate = Vdeactivate_mark; XSETBUFFER (obuffer, current_buffer); - okeymap = B_ (current_buffer, keymap); + okeymap = BVAR (current_buffer, keymap); /* There's no good reason to let sentinels change the current buffer, and many callers of accept-process-output, sit-for, and @@ -6714,7 +6714,7 @@ status_notify (struct Lisp_Process *deleting_process) /* Avoid error if buffer is deleted (probably that's why the process is dead, too) */ - if (NILP (B_ (XBUFFER (buffer), name))) + if (NILP (BVAR (XBUFFER (buffer), name))) continue; Fset_buffer (buffer); @@ -6731,13 +6731,13 @@ status_notify (struct Lisp_Process *deleting_process) before = PT; before_byte = PT_BYTE; - tem = B_ (current_buffer, read_only); - B_ (current_buffer, read_only) = Qnil; + tem = BVAR (current_buffer, read_only); + BVAR (current_buffer, read_only) = Qnil; insert_string ("\nProcess "); Finsert (1, &p->name); insert_string (" "); Finsert (1, &msg); - B_ (current_buffer, read_only) = tem; + BVAR (current_buffer, read_only) = tem; set_marker_both (p->mark, p->buffer, PT, PT_BYTE); if (opoint >= before) @@ -7136,7 +7136,7 @@ setup_process_coding_systems (Lisp_Object process) ; else if (BUFFERP (p->buffer)) { - if (NILP (B_ (XBUFFER (p->buffer), enable_multibyte_characters))) + if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))) coding_system = raw_text_coding_system (coding_system); } setup_coding_system (coding_system, proc_decode_coding_system[inch]); diff --git a/src/search.c b/src/search.c index a80e20a8a8a..1e2036f6dc2 100644 --- a/src/search.c +++ b/src/search.c @@ -157,7 +157,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object tra /* If the compiled pattern hard codes some of the contents of the syntax-table, it can only be reused with *this* syntax table. */ - cp->syntax_table = cp->buf.used_syntax ? B_ (current_buffer, syntax_table) : Qt; + cp->syntax_table = cp->buf.used_syntax ? BVAR (current_buffer, syntax_table) : Qt; re_set_whitespace_regexp (NULL); @@ -236,7 +236,7 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object tra && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0))) && cp->posix == posix && (EQ (cp->syntax_table, Qt) - || EQ (cp->syntax_table, B_ (current_buffer, syntax_table))) + || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)) && cp->buf.charset_unibyte == charset_unibyte) break; @@ -285,17 +285,17 @@ looking_at_1 (Lisp_Object string, int posix) save_search_regs (); /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ - XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2] - = B_ (current_buffer, case_eqv_table); + XCHAR_TABLE (BVAR (current_buffer, case_canon_table))->extras[2] + = BVAR (current_buffer, case_eqv_table); CHECK_STRING (string); bufp = compile_pattern (string, (NILP (Vinhibit_changing_match_data) ? &search_regs : NULL), - (!NILP (B_ (current_buffer, case_fold_search)) - ? B_ (current_buffer, case_canon_table) : Qnil), + (!NILP (BVAR (current_buffer, case_fold_search)) + ? BVAR (current_buffer, case_canon_table) : Qnil), posix, - !NILP (B_ (current_buffer, enable_multibyte_characters))); + !NILP (BVAR (current_buffer, enable_multibyte_characters))); immediate_quit = 1; QUIT; /* Do a pending quit right away, to avoid paradoxical behavior */ @@ -400,14 +400,14 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p } /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ - XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2] - = B_ (current_buffer, case_eqv_table); + XCHAR_TABLE (BVAR (current_buffer, case_canon_table))->extras[2] + = BVAR (current_buffer, case_eqv_table); bufp = compile_pattern (regexp, (NILP (Vinhibit_changing_match_data) ? &search_regs : NULL), - (!NILP (B_ (current_buffer, case_fold_search)) - ? B_ (current_buffer, case_canon_table) : Qnil), + (!NILP (BVAR (current_buffer, case_fold_search)) + ? BVAR (current_buffer, case_canon_table) : Qnil), posix, STRING_MULTIBYTE (string)); immediate_quit = 1; @@ -586,7 +586,7 @@ fast_looking_at (Lisp_Object regexp, EMACS_INT pos, EMACS_INT pos_byte, EMACS_IN s2 = 0; } re_match_object = Qnil; - multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); } buf = compile_pattern (regexp, 0, Qnil, 0, multibyte); @@ -608,7 +608,7 @@ fast_looking_at (Lisp_Object regexp, EMACS_INT pos, EMACS_INT pos_byte, EMACS_IN static void newline_cache_on_off (struct buffer *buf) { - if (NILP (B_ (buf, cache_long_line_scans))) + if (NILP (BVAR (buf, cache_long_line_scans))) { /* It should be off. */ if (buf->newline_cache) @@ -996,15 +996,15 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, } /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ - XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2] - = B_ (current_buffer, case_eqv_table); + XCHAR_TABLE (BVAR (current_buffer, case_canon_table))->extras[2] + = BVAR (current_buffer, case_eqv_table); np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, - (!NILP (B_ (current_buffer, case_fold_search)) - ? B_ (current_buffer, case_canon_table) + (!NILP (BVAR (current_buffer, case_fold_search)) + ? BVAR (current_buffer, case_canon_table) : Qnil), - (!NILP (B_ (current_buffer, case_fold_search)) - ? B_ (current_buffer, case_eqv_table) + (!NILP (BVAR (current_buffer, case_fold_search)) + ? BVAR (current_buffer, case_eqv_table) : Qnil), posix); if (np <= 0) @@ -1133,7 +1133,7 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, (NILP (Vinhibit_changing_match_data) ? &search_regs : &search_regs_1), trt, posix, - !NILP (B_ (current_buffer, enable_multibyte_characters))); + !NILP (BVAR (current_buffer, enable_multibyte_characters))); immediate_quit = 1; /* Quit immediately if user types ^G, because letting this function finish @@ -1254,7 +1254,7 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT raw_pattern_size; EMACS_INT raw_pattern_size_byte; unsigned char *patbuf; - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); unsigned char *base_pat; /* Set to positive if we find a non-ASCII char that need translation. Otherwise set to zero later. */ @@ -1451,7 +1451,7 @@ simple_search (EMACS_INT n, unsigned char *pat, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT lim, EMACS_INT lim_byte) { - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); int forward = n > 0; /* Number of buffer bytes matched. Note that this may be different from len_byte in a multibyte buffer. */ @@ -1671,7 +1671,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, register EMACS_INT i; register int j; unsigned char *pat, *pat_end; - int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); unsigned char simple_translate[0400]; /* These are set to the preceding bytes of a byte to be translated @@ -2639,7 +2639,7 @@ since only regular expressions have distinguished subexpressions. */) EMACS_INT length = SBYTES (newtext); unsigned char *substed; EMACS_INT substed_alloc_size, substed_len; - int buf_multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); int str_multibyte = STRING_MULTIBYTE (newtext); Lisp_Object rev_tbl; int really_changed = 0; diff --git a/src/syntax.c b/src/syntax.c index 9aa34014f91..707c2c19f31 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -277,7 +277,7 @@ update_syntax_table (EMACS_INT charpos, int count, int init, else { gl_state.use_global = 0; - gl_state.current_syntax_table = B_ (current_buffer, syntax_table); + gl_state.current_syntax_table = BVAR (current_buffer, syntax_table); } } @@ -363,7 +363,7 @@ char_quoted (EMACS_INT charpos, EMACS_INT bytepos) static INLINE EMACS_INT dec_bytepos (EMACS_INT bytepos) { - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) return bytepos - 1; DEC_POS (bytepos); @@ -779,7 +779,7 @@ DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, This is the one specified by the current buffer. */) (void) { - return B_ (current_buffer, syntax_table); + return BVAR (current_buffer, syntax_table); } DEFUN ("standard-syntax-table", Fstandard_syntax_table, @@ -824,7 +824,7 @@ One argument, a syntax table. */) { int idx; check_syntax_table (table); - B_ (current_buffer, syntax_table) = table; + BVAR (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); @@ -1035,7 +1035,7 @@ usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */) CHECK_CHARACTER (c); if (NILP (syntax_table)) - syntax_table = B_ (current_buffer, syntax_table); + syntax_table = BVAR (current_buffer, syntax_table); else check_syntax_table (syntax_table); @@ -1450,7 +1450,7 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl if (XINT (lim) < BEGV) XSETFASTINT (lim, BEGV); - multibyte = (!NILP (B_ (current_buffer, enable_multibyte_characters)) + multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters)) && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE)); string_multibyte = SBYTES (string) > SCHARS (string); @@ -1936,7 +1936,7 @@ skip_syntaxes (int forwardp, Lisp_Object string, Lisp_Object lim) if (forwardp ? (PT >= XFASTINT (lim)) : (PT <= XFASTINT (lim))) return make_number (0); - multibyte = (!NILP (B_ (current_buffer, enable_multibyte_characters)) + multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters)) && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE)); memset (fastmap, 0, sizeof fastmap); @@ -2703,7 +2703,7 @@ scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpf while (from > stop) { temp_pos = from_byte; - if (! NILP (B_ (current_buffer, enable_multibyte_characters))) + if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) DEC_POS (temp_pos); else temp_pos--; diff --git a/src/syntax.h b/src/syntax.h index 75937a7c121..e8726bb28a4 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -24,7 +24,7 @@ extern void update_syntax_table (EMACS_INT, int, int, Lisp_Object); /* The standard syntax table is stored where it will automatically be used in all new buffers. */ -#define Vstandard_syntax_table B_ (&buffer_defaults, syntax_table) +#define Vstandard_syntax_table BVAR (&buffer_defaults, syntax_table) /* A syntax table is a chartable whose elements are cons cells (CODE+FLAGS . MATCHING-CHAR). MATCHING-CHAR can be nil if the char @@ -79,7 +79,7 @@ enum syntaxcode # define CURRENT_SYNTAX_TABLE gl_state.current_syntax_table #else # define SYNTAX_ENTRY SYNTAX_ENTRY_INT -# define CURRENT_SYNTAX_TABLE B_ (current_buffer, syntax_table) +# define CURRENT_SYNTAX_TABLE BVAR (current_buffer, syntax_table) #endif #define SYNTAX_ENTRY_INT(c) CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, (c)) @@ -204,7 +204,7 @@ extern char syntax_code_spec[16]; do \ { \ gl_state.use_global = 0; \ - gl_state.current_syntax_table = B_ (current_buffer, syntax_table); \ + gl_state.current_syntax_table = BVAR (current_buffer, syntax_table); \ } while (0) /* This macro should be called with FROM at the start of forward diff --git a/src/undo.c b/src/undo.c index f6953fabfec..d11cd6f5570 100644 --- a/src/undo.c +++ b/src/undo.c @@ -73,12 +73,12 @@ record_point (EMACS_INT pt) Fundo_boundary (); last_undo_buffer = current_buffer; - if (CONSP (B_ (current_buffer, undo_list))) + if (CONSP (BVAR (current_buffer, undo_list))) { /* Set AT_BOUNDARY to 1 only when we have nothing other than marker adjustment before undo boundary. */ - Lisp_Object tail = B_ (current_buffer, undo_list), elt; + Lisp_Object tail = BVAR (current_buffer, undo_list), elt; while (1) { @@ -103,8 +103,8 @@ record_point (EMACS_INT pt) if (at_boundary && current_buffer == last_boundary_buffer && last_boundary_position != pt) - B_ (current_buffer, undo_list) - = Fcons (make_number (last_boundary_position), B_ (current_buffer, undo_list)); + BVAR (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, @@ -117,17 +117,17 @@ record_insert (EMACS_INT beg, EMACS_INT length) { Lisp_Object lbeg, lend; - if (EQ (B_ (current_buffer, undo_list), Qt)) + if (EQ (BVAR (current_buffer, undo_list), Qt)) return; record_point (beg); /* If this is following another insertion and consecutive with it in the buffer, combine the two. */ - if (CONSP (B_ (current_buffer, undo_list))) + if (CONSP (BVAR (current_buffer, undo_list))) { Lisp_Object elt; - elt = XCAR (B_ (current_buffer, undo_list)); + elt = XCAR (BVAR (current_buffer, undo_list)); if (CONSP (elt) && INTEGERP (XCAR (elt)) && INTEGERP (XCDR (elt)) @@ -140,8 +140,8 @@ record_insert (EMACS_INT beg, EMACS_INT length) XSETFASTINT (lbeg, beg); XSETINT (lend, beg + length); - B_ (current_buffer, undo_list) = Fcons (Fcons (lbeg, lend), - B_ (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = Fcons (Fcons (lbeg, lend), + BVAR (current_buffer, undo_list)); } /* Record that a deletion is about to take place, @@ -152,7 +152,7 @@ record_delete (EMACS_INT beg, Lisp_Object string) { Lisp_Object sbeg; - if (EQ (B_ (current_buffer, undo_list), Qt)) + if (EQ (BVAR (current_buffer, undo_list), Qt)) return; if (PT == beg + SCHARS (string)) @@ -166,8 +166,8 @@ record_delete (EMACS_INT beg, Lisp_Object string) record_point (beg); } - B_ (current_buffer, undo_list) - = Fcons (Fcons (string, sbeg), B_ (current_buffer, undo_list)); + BVAR (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. @@ -178,7 +178,7 @@ record_delete (EMACS_INT beg, Lisp_Object string) void record_marker_adjustment (Lisp_Object marker, EMACS_INT adjustment) { - if (EQ (B_ (current_buffer, undo_list), Qt)) + if (EQ (BVAR (current_buffer, undo_list), Qt)) return; /* Allocate a cons cell to be the undo boundary after this command. */ @@ -189,9 +189,9 @@ record_marker_adjustment (Lisp_Object marker, EMACS_INT adjustment) Fundo_boundary (); last_undo_buffer = current_buffer; - B_ (current_buffer, undo_list) + BVAR (current_buffer, undo_list) = Fcons (Fcons (marker, make_number (adjustment)), - B_ (current_buffer, undo_list)); + BVAR (current_buffer, undo_list)); } /* Record that a replacement is about to take place, @@ -215,7 +215,7 @@ record_first_change (void) Lisp_Object high, low; struct buffer *base_buffer = current_buffer; - if (EQ (B_ (current_buffer, undo_list), Qt)) + if (EQ (BVAR (current_buffer, undo_list), Qt)) return; if (current_buffer != last_undo_buffer) @@ -227,7 +227,7 @@ record_first_change (void) XSETFASTINT (high, (base_buffer->modtime >> 16) & 0xffff); XSETFASTINT (low, base_buffer->modtime & 0xffff); - B_ (current_buffer, undo_list) = Fcons (Fcons (Qt, Fcons (high, low)), B_ (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = Fcons (Fcons (Qt, Fcons (high, low)), BVAR (current_buffer, undo_list)); } /* Record a change in property PROP (whose old value was VAL) @@ -242,7 +242,7 @@ record_property_change (EMACS_INT beg, EMACS_INT length, struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); int boundary = 0; - if (EQ (B_ (buf, undo_list), Qt)) + if (EQ (BVAR (buf, undo_list), Qt)) return; /* Allocate a cons cell to be the undo boundary after this command. */ @@ -265,7 +265,7 @@ record_property_change (EMACS_INT beg, EMACS_INT length, XSETINT (lbeg, beg); XSETINT (lend, beg + length); entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend)))); - B_ (current_buffer, undo_list) = Fcons (entry, B_ (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = Fcons (entry, BVAR (current_buffer, undo_list)); current_buffer = obuf; } @@ -277,9 +277,9 @@ but another undo command will undo to the previous boundary. */) (void) { Lisp_Object tem; - if (EQ (B_ (current_buffer, undo_list), Qt)) + if (EQ (BVAR (current_buffer, undo_list), Qt)) return Qnil; - tem = Fcar (B_ (current_buffer, undo_list)); + tem = Fcar (BVAR (current_buffer, undo_list)); if (!NILP (tem)) { /* One way or another, cons nil onto the front of the undo list. */ @@ -287,12 +287,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, B_ (current_buffer, undo_list)); - B_ (current_buffer, undo_list) = pending_boundary; + XSETCDR (pending_boundary, BVAR (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = pending_boundary; pending_boundary = Qnil; } else - B_ (current_buffer, undo_list) = Fcons (Qnil, B_ (current_buffer, undo_list)); + BVAR (current_buffer, undo_list) = Fcons (Qnil, BVAR (current_buffer, undo_list)); } last_boundary_position = PT; last_boundary_buffer = current_buffer; @@ -321,7 +321,7 @@ truncate_undo_list (struct buffer *b) record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); set_buffer_internal (b); - list = B_ (b, undo_list); + list = BVAR (b, undo_list); prev = Qnil; next = list; @@ -433,7 +433,7 @@ truncate_undo_list (struct buffer *b) XSETCDR (last_boundary, Qnil); /* There's nothing we decided to keep, so clear it out. */ else - B_ (b, undo_list) = Qnil; + BVAR (b, undo_list) = Qnil; unbind_to (count, Qnil); } @@ -470,13 +470,13 @@ Return what remains of the list. */) /* In a writable buffer, enable undoing read-only text that is so because of text properties. */ - if (NILP (B_ (current_buffer, read_only))) + if (NILP (BVAR (current_buffer, read_only))) specbind (Qinhibit_read_only, Qt); /* Don't let `intangible' properties interfere with undo. */ specbind (Qinhibit_point_motion_hooks, Qt); - oldlist = B_ (current_buffer, undo_list); + oldlist = BVAR (current_buffer, undo_list); while (arg > 0) { @@ -631,9 +631,9 @@ Return what remains of the list. */) so the test in `undo' for continuing an undo series will work right. */ if (did_apply - && EQ (oldlist, B_ (current_buffer, undo_list))) - B_ (current_buffer, undo_list) - = Fcons (list3 (Qapply, Qcdr, Qnil), B_ (current_buffer, undo_list)); + && EQ (oldlist, BVAR (current_buffer, undo_list))) + BVAR (current_buffer, undo_list) + = 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 64e073bedb7..3f350c2f591 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5225,7 +5225,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil); old_buffer = current_buffer; set_buffer_internal_1 (XBUFFER (buffer)); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); Ferase_buffer (); @@ -5655,7 +5655,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)); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); @@ -6162,7 +6162,7 @@ an integer representing a ShowWindow flag: CHECK_STRING (document); /* Encode filename, current directory and parameters. */ - current_dir = ENCODE_FILE (B_ (current_buffer, directory)); + current_dir = ENCODE_FILE (BVAR (current_buffer, directory)); document = ENCODE_FILE (document); if (STRINGP (parameters)) parameters = ENCODE_SYSTEM (parameters); diff --git a/src/window.c b/src/window.c index 4d700cfad5e..675a493e18e 100644 --- a/src/window.c +++ b/src/window.c @@ -1359,8 +1359,8 @@ window_display_table (struct window *w) { struct buffer *b = XBUFFER (w->buffer); - if (DISP_TABLE_P (B_ (b, display_table))) - dp = XCHAR_TABLE (B_ (b, display_table)); + if (DISP_TABLE_P (BVAR (b, display_table))) + dp = XCHAR_TABLE (BVAR (b, display_table)); else if (DISP_TABLE_P (Vstandard_display_table)) dp = XCHAR_TABLE (Vstandard_display_table); } @@ -1414,9 +1414,9 @@ unshow_buffer (register struct window *w) So don't clobber point in that buffer. */ if (! EQ (buf, XWINDOW (selected_window)->buffer) /* This line helps to fix Horsley's testbug.el bug. */ - && !(WINDOWP (B_ (b, last_selected_window)) - && w != XWINDOW (B_ (b, last_selected_window)) - && EQ (buf, XWINDOW (B_ (b, last_selected_window))->buffer))) + && !(WINDOWP (BVAR (b, last_selected_window)) + && w != XWINDOW (BVAR (b, last_selected_window)) + && EQ (buf, XWINDOW (BVAR (b, last_selected_window))->buffer))) temp_set_point_both (b, clip_to_bounds (BUF_BEGV (b), XMARKER (w->pointm)->charpos, @@ -1425,9 +1425,9 @@ unshow_buffer (register struct window *w) marker_byte_position (w->pointm), BUF_ZV_BYTE (b))); - if (WINDOWP (B_ (b, last_selected_window)) - && w == XWINDOW (B_ (b, last_selected_window))) - B_ (b, last_selected_window) = Qnil; + if (WINDOWP (BVAR (b, last_selected_window)) + && w == XWINDOW (BVAR (b, last_selected_window))) + BVAR (b, last_selected_window) = Qnil; } /* Put replacement into the window structure in place of old. */ @@ -2325,7 +2325,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame /* Check for a window that has a killed buffer. */ case CHECK_ALL_WINDOWS: if (! NILP (w->buffer) - && NILP (B_ (XBUFFER (w->buffer), name))) + && NILP (BVAR (XBUFFER (w->buffer), name))) abort (); break; @@ -2729,7 +2729,7 @@ window_min_size_2 (struct window *w, int width_p, int safe_p) { int safe_size = (MIN_SAFE_WINDOW_HEIGHT + ((BUFFERP (w->buffer) - && !NILP (B_ (XBUFFER (w->buffer), mode_line_format))) + && !NILP (BVAR (XBUFFER (w->buffer), mode_line_format))) ? 1 : 0)); return safe_p ? safe_size : max (window_min_height, safe_size); @@ -3360,15 +3360,15 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int w->buffer = buffer; if (EQ (window, selected_window)) - B_ (b, last_selected_window) = window; + BVAR (b, last_selected_window) = window; /* Let redisplay errors through. */ b->display_error_modiff = 0; /* Update time stamps of buffer display. */ - if (INTEGERP (B_ (b, display_count))) - XSETINT (B_ (b, display_count), XINT (B_ (b, display_count)) + 1); - B_ (b, display_time) = Fcurrent_time (); + if (INTEGERP (BVAR (b, display_count))) + XSETINT (BVAR (b, display_count), XINT (BVAR (b, display_count)) + 1); + BVAR (b, display_time) = Fcurrent_time (); XSETFASTINT (w->window_end_pos, 0); XSETFASTINT (w->window_end_vpos, 0); @@ -3421,18 +3421,18 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int w->left_margin_cols = w->right_margin_cols = Qnil; Fset_window_fringes (window, - B_ (b, left_fringe_width), B_ (b, right_fringe_width), - B_ (b, fringes_outside_margins)); + BVAR (b, left_fringe_width), BVAR (b, right_fringe_width), + BVAR (b, fringes_outside_margins)); Fset_window_scroll_bars (window, - B_ (b, scroll_bar_width), - B_ (b, vertical_scroll_bar_type), Qnil); + BVAR (b, scroll_bar_width), + BVAR (b, vertical_scroll_bar_type), Qnil); w->left_margin_cols = save_left; w->right_margin_cols = save_right; Fset_window_margins (window, - B_ (b, left_margin_cols), B_ (b, right_margin_cols)); + BVAR (b, left_margin_cols), BVAR (b, right_margin_cols)); } if (run_hooks_p) @@ -3469,7 +3469,7 @@ This function runs `window-scroll-functions' before running XSETWINDOW (window, w); buffer = Fget_buffer (buffer_or_name); CHECK_BUFFER (buffer); - if (NILP (B_ (XBUFFER (buffer), name))) + if (NILP (BVAR (XBUFFER (buffer), name))) error ("Attempt to display deleted buffer"); tem = w->buffer; @@ -3481,7 +3481,7 @@ This function runs `window-scroll-functions' before running if (EQ (tem, buffer)) return Qnil; else if (EQ (w->dedicated, Qt)) - error ("Window is dedicated to `%s'", SDATA (B_ (XBUFFER (tem), name))); + error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), name))); else w->dedicated = Qnil; @@ -3552,7 +3552,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) Fset_buffer (w->buffer); - B_ (XBUFFER (w->buffer), last_selected_window) = window; + BVAR (XBUFFER (w->buffer), last_selected_window) = window; /* Go to the point recorded in the window. This is important when the buffer is in more @@ -3640,7 +3640,7 @@ displaying that buffer. */) if (STRINGP (object)) object = Fget_buffer (object); - if (BUFFERP (object) && !NILP (B_ (XBUFFER (object), name))) + if (BUFFERP (object) && !NILP (BVAR (XBUFFER (object), name))) { /* Walk all windows looking for buffer, and force update of each of those windows. */ @@ -3663,7 +3663,7 @@ temp_output_buffer_show (register Lisp_Object buf) register Lisp_Object window; register struct window *w; - B_ (XBUFFER (buf), directory) = B_ (current_buffer, directory); + BVAR (XBUFFER (buf), directory) = BVAR (current_buffer, directory); Fset_buffer (buf); BUF_SAVE_MODIFF (XBUFFER (buf)) = MODIFF; @@ -5878,7 +5878,7 @@ the return value is nil. Otherwise the value is t. */) saved_windows = XVECTOR (data->saved_windows); new_current_buffer = data->current_buffer; - if (NILP (B_ (XBUFFER (new_current_buffer), name))) + if (NILP (BVAR (XBUFFER (new_current_buffer), name))) new_current_buffer = Qnil; else { @@ -6063,14 +6063,14 @@ the return value is nil. Otherwise the value is t. */) w->buffer = p->buffer; else { - if (!NILP (B_ (XBUFFER (p->buffer), name))) + if (!NILP (BVAR (XBUFFER (p->buffer), name))) /* If saved buffer is alive, install it. */ { w->buffer = p->buffer; w->start_at_line_beg = p->start_at_line_beg; set_marker_restricted (w->start, p->start, w->buffer); set_marker_restricted (w->pointm, p->pointm, w->buffer); - Fset_marker (B_ (XBUFFER (w->buffer), mark), + Fset_marker (BVAR (XBUFFER (w->buffer), mark), p->mark, w->buffer); /* As documented in Fcurrent_window_configuration, don't @@ -6080,7 +6080,7 @@ the return value is nil. Otherwise the value is t. */) && XBUFFER (p->buffer) == current_buffer) Fgoto_char (w->pointm); } - else if (NILP (w->buffer) || NILP (B_ (XBUFFER (w->buffer), name))) + else if (NILP (w->buffer) || NILP (BVAR (XBUFFER (w->buffer), name))) /* Else unless window has a live buffer, get one. */ { w->buffer = Fcdr (Fcar (Vbuffer_alist)); @@ -6121,7 +6121,7 @@ the return value is nil. Otherwise the value is t. */) has been restored into it. We already swapped out that point from that window's old buffer. */ select_window (data->current_window, Qnil, 1); - B_ (XBUFFER (XWINDOW (selected_window)->buffer), last_selected_window) + BVAR (XBUFFER (XWINDOW (selected_window)->buffer), last_selected_window) = selected_window; if (NILP (data->focus_frame) @@ -6322,7 +6322,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) p->start = Fcopy_marker (w->start, Qnil); p->start_at_line_beg = w->start_at_line_beg; - tem = B_ (XBUFFER (w->buffer), mark); + tem = BVAR (XBUFFER (w->buffer), mark); p->mark = Fcopy_marker (tem, Qnil); } else diff --git a/src/xdisp.c b/src/xdisp.c index 147f2965d0e..1cb4f7350c6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1210,12 +1210,12 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y, if (WINDOW_WANTS_MODELINE_P (w)) current_mode_line_height = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), - B_ (current_buffer, mode_line_format)); + BVAR (current_buffer, mode_line_format)); if (WINDOW_WANTS_HEADER_LINE_P (w)) current_header_line_height = display_mode_line (w, HEADER_LINE_FACE_ID, - B_ (current_buffer, header_line_format)); + BVAR (current_buffer, header_line_format)); start_display (&it, w, top); move_it_to (&it, charpos, -1, it.last_visible_y-1, -1, @@ -2405,10 +2405,10 @@ init_iterator (struct it *it, struct window *w, if (base_face_id == DEFAULT_FACE_ID && FRAME_WINDOW_P (it->f)) { - if (NATNUMP (B_ (current_buffer, extra_line_spacing))) - it->extra_line_spacing = XFASTINT (B_ (current_buffer, extra_line_spacing)); - else if (FLOATP (B_ (current_buffer, extra_line_spacing))) - it->extra_line_spacing = (XFLOAT_DATA (B_ (current_buffer, extra_line_spacing)) + if (NATNUMP (BVAR (current_buffer, extra_line_spacing))) + it->extra_line_spacing = XFASTINT (BVAR (current_buffer, extra_line_spacing)); + else if (FLOATP (BVAR (current_buffer, extra_line_spacing))) + it->extra_line_spacing = (XFLOAT_DATA (BVAR (current_buffer, extra_line_spacing)) * FRAME_LINE_HEIGHT (it->f)); else if (it->f->extra_line_spacing > 0) it->extra_line_spacing = it->f->extra_line_spacing; @@ -2431,36 +2431,36 @@ init_iterator (struct it *it, struct window *w, it->override_ascent = -1; /* Are control characters displayed as `^C'? */ - it->ctl_arrow_p = !NILP (B_ (current_buffer, ctl_arrow)); + it->ctl_arrow_p = !NILP (BVAR (current_buffer, ctl_arrow)); /* -1 means everything between a CR and the following line end is invisible. >0 means lines indented more than this value are invisible. */ - it->selective = (INTEGERP (B_ (current_buffer, selective_display)) - ? XFASTINT (B_ (current_buffer, selective_display)) - : (!NILP (B_ (current_buffer, selective_display)) + it->selective = (INTEGERP (BVAR (current_buffer, selective_display)) + ? XFASTINT (BVAR (current_buffer, selective_display)) + : (!NILP (BVAR (current_buffer, selective_display)) ? -1 : 0)); it->selective_display_ellipsis_p - = !NILP (B_ (current_buffer, selective_display_ellipses)); + = !NILP (BVAR (current_buffer, selective_display_ellipses)); /* Display table to use. */ it->dp = window_display_table (w); /* Are multibyte characters enabled in current_buffer? */ - it->multibyte_p = !NILP (B_ (current_buffer, enable_multibyte_characters)); + it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); /* Do we need to reorder bidirectional text? Not if this is a unibyte buffer: by definition, none of the single-byte characters are strong R2L, so no reordering is needed. And bidi.c doesn't support unibyte buffers anyway. */ it->bidi_p - = !NILP (B_ (current_buffer, bidi_display_reordering)) && it->multibyte_p; + = !NILP (BVAR (current_buffer, bidi_display_reordering)) && it->multibyte_p; /* Non-zero if we should highlight the region. */ highlight_region_p = (!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active)) - && XMARKER (B_ (current_buffer, mark))->buffer != 0); + && !NILP (BVAR (current_buffer, mark_active)) + && XMARKER (BVAR (current_buffer, mark))->buffer != 0); /* Set IT->region_beg_charpos and IT->region_end_charpos to the start and end of a visible region in window IT->w. Set both to @@ -2477,7 +2477,7 @@ init_iterator (struct it *it, struct window *w, && WINDOWP (minibuf_selected_window) && w == XWINDOW (minibuf_selected_window)))) { - EMACS_INT charpos = marker_position (B_ (current_buffer, mark)); + EMACS_INT charpos = marker_position (BVAR (current_buffer, mark)); it->region_beg_charpos = min (PT, charpos); it->region_end_charpos = max (PT, charpos); } @@ -2494,7 +2494,7 @@ init_iterator (struct it *it, struct window *w, it->redisplay_end_trigger_charpos = XINT (w->redisplay_end_trigger); /* Correct bogus values of tab_width. */ - it->tab_width = XINT (B_ (current_buffer, tab_width)); + it->tab_width = XINT (BVAR (current_buffer, tab_width)); if (it->tab_width <= 0 || it->tab_width > 1000) it->tab_width = 8; @@ -2508,8 +2508,8 @@ init_iterator (struct it *it, struct window *w, && (WINDOW_TOTAL_COLS (it->w) < XINT (Vtruncate_partial_width_windows)))))) it->line_wrap = TRUNCATE; - else if (NILP (B_ (current_buffer, truncate_lines))) - it->line_wrap = NILP (B_ (current_buffer, word_wrap)) + else if (NILP (BVAR (current_buffer, truncate_lines))) + it->line_wrap = NILP (BVAR (current_buffer, word_wrap)) ? WINDOW_WRAP : WORD_WRAP; else it->line_wrap = TRUNCATE; @@ -2611,9 +2611,9 @@ init_iterator (struct it *it, struct window *w, { /* Note the paragraph direction that this buffer wants to use. */ - if (EQ (B_ (current_buffer, bidi_paragraph_direction), Qleft_to_right)) + if (EQ (BVAR (current_buffer, bidi_paragraph_direction), Qleft_to_right)) it->paragraph_embedding = L2R; - else if (EQ (B_ (current_buffer, bidi_paragraph_direction), Qright_to_left)) + else if (EQ (BVAR (current_buffer, bidi_paragraph_direction), Qright_to_left)) it->paragraph_embedding = R2L; else it->paragraph_embedding = NEUTRAL_DIR; @@ -5411,7 +5411,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) it->method = GET_FROM_BUFFER; it->object = it->w->buffer; it->area = TEXT_AREA; - it->multibyte_p = !NILP (B_ (current_buffer, enable_multibyte_characters)); + it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); it->sp = 0; it->string_from_display_prop_p = 0; it->face_before_selective_p = 0; @@ -7919,7 +7919,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) old_deactivate_mark = Vdeactivate_mark; oldbuf = current_buffer; Fset_buffer (Fget_buffer_create (Vmessages_buffer_name)); - B_ (current_buffer, undo_list) = Qt; + BVAR (current_buffer, undo_list) = Qt; oldpoint = message_dolog_marker1; set_marker_restricted (oldpoint, make_number (PT), Qnil); @@ -7943,7 +7943,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) /* Insert the string--maybe converting multibyte to single byte or vice versa, so that all the text fits the buffer. */ if (multibyte - && NILP (B_ (current_buffer, enable_multibyte_characters))) + && NILP (BVAR (current_buffer, enable_multibyte_characters))) { EMACS_INT i; int c, char_bytes; @@ -7961,7 +7961,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) } } else if (! multibyte - && ! NILP (B_ (current_buffer, enable_multibyte_characters))) + && ! NILP (BVAR (current_buffer, enable_multibyte_characters))) { EMACS_INT i; int c, char_bytes; @@ -8460,7 +8460,7 @@ update_echo_area (void) Lisp_Object string; string = Fcurrent_message (); message3 (string, SBYTES (string), - !NILP (B_ (current_buffer, enable_multibyte_characters))); + !NILP (BVAR (current_buffer, enable_multibyte_characters))); } } @@ -8475,7 +8475,7 @@ ensure_echo_area_buffers (void) for (i = 0; i < 2; ++i) if (!BUFFERP (echo_buffer[i]) - || NILP (B_ (XBUFFER (echo_buffer[i]), name))) + || NILP (BVAR (XBUFFER (echo_buffer[i]), name))) { char name[30]; Lisp_Object old_buffer; @@ -8484,7 +8484,7 @@ ensure_echo_area_buffers (void) old_buffer = echo_buffer[i]; sprintf (name, " *Echo Area %d*", i); echo_buffer[i] = Fget_buffer_create (build_string (name)); - B_ (XBUFFER (echo_buffer[i]), truncate_lines) = Qnil; + BVAR (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; */ @@ -8577,8 +8577,8 @@ with_echo_area_buffer (struct window *w, int which, set_marker_both (w->pointm, buffer, BEG, BEG_BYTE); } - B_ (current_buffer, undo_list) = Qt; - B_ (current_buffer, read_only) = Qnil; + BVAR (current_buffer, undo_list) = Qt; + BVAR (current_buffer, read_only) = Qnil; specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); @@ -8691,7 +8691,7 @@ setup_echo_area_for_printing (int multibyte_p) /* Switch to that buffer and clear it. */ set_buffer_internal (XBUFFER (echo_area_buffer[0])); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; if (Z > BEG) { @@ -8705,7 +8705,7 @@ setup_echo_area_for_printing (int multibyte_p) /* Set up the buffer for the multibyteness we need. */ if (multibyte_p - != !NILP (B_ (current_buffer, enable_multibyte_characters))) + != !NILP (BVAR (current_buffer, enable_multibyte_characters))) Fset_buffer_multibyte (multibyte_p ? Qt : Qnil); /* Raise the frame containing the echo area. */ @@ -8734,7 +8734,7 @@ setup_echo_area_for_printing (int multibyte_p) { /* Someone switched buffers between print requests. */ set_buffer_internal (XBUFFER (echo_area_buffer[0])); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; } } } @@ -9177,12 +9177,12 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby /* Change multibyteness of the echo buffer appropriately. */ if (message_enable_multibyte - != !NILP (B_ (current_buffer, enable_multibyte_characters))) + != !NILP (BVAR (current_buffer, enable_multibyte_characters))) Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil); - B_ (current_buffer, truncate_lines) = message_truncate_lines ? Qt : Qnil; - if (!NILP (B_ (current_buffer, bidi_display_reordering))) - B_ (current_buffer, bidi_paragraph_direction) = Qleft_to_right; + BVAR (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; /* Insert new message at BEG. */ TEMP_SET_PT_BOTH (BEG, BEG_BYTE); @@ -9205,7 +9205,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby if (nbytes == 0) nbytes = strlen (s); - if (multibyte_p && NILP (B_ (current_buffer, enable_multibyte_characters))) + if (multibyte_p && NILP (BVAR (current_buffer, enable_multibyte_characters))) { /* Convert from multi-byte to single-byte. */ EMACS_INT i; @@ -9223,7 +9223,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby } } else if (!multibyte_p - && !NILP (B_ (current_buffer, enable_multibyte_characters))) + && !NILP (BVAR (current_buffer, enable_multibyte_characters))) { /* Convert from single-byte to multi-byte. */ EMACS_INT i; @@ -9808,7 +9808,7 @@ update_menu_bar (struct frame *f, int save_match_data, int hooks_run) < BUF_MODIFF (XBUFFER (w->buffer))) != !NILP (w->last_had_star)) || ((!NILP (Vtransient_mark_mode) - && !NILP (B_ (XBUFFER (w->buffer), mark_active))) + && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) != !NILP (w->region_showing))) { struct buffer *prev = current_buffer; @@ -10006,7 +10006,7 @@ update_tool_bar (struct frame *f, int save_match_data) < BUF_MODIFF (XBUFFER (w->buffer))) != !NILP (w->last_had_star)) || ((!NILP (Vtransient_mark_mode) - && !NILP (B_ (XBUFFER (w->buffer), mark_active))) + && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) != !NILP (w->region_showing))) { struct buffer *prev = current_buffer; @@ -11097,8 +11097,8 @@ text_outside_line_unchanged_p (struct window *w, /* If selective display, can't optimize if changes start at the beginning of the line. */ if (unchanged_p - && INTEGERP (B_ (current_buffer, selective_display)) - && XINT (B_ (current_buffer, selective_display)) > 0 + && INTEGERP (BVAR (current_buffer, selective_display)) + && XINT (BVAR (current_buffer, selective_display)) > 0 && (BEG_UNCHANGED < start || GPT <= start)) unchanged_p = 0; @@ -11126,8 +11126,8 @@ text_outside_line_unchanged_p (struct window *w, require to redisplay the whole paragraph. It might be worthwhile to find the paragraph limits and widen the range of redisplayed lines to that, but for now just give up this optimization. */ - if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering)) - && NILP (B_ (XBUFFER (w->buffer), bidi_paragraph_direction))) + if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)) + && NILP (BVAR (XBUFFER (w->buffer), bidi_paragraph_direction))) unchanged_p = 0; } @@ -11674,11 +11674,11 @@ redisplay_internal (int preserve_echo_area) the whole window. The assignment to this_line_start_pos prevents the optimization directly below this if-statement. */ if (((!NILP (Vtransient_mark_mode) - && !NILP (B_ (XBUFFER (w->buffer), mark_active))) + && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) != !NILP (w->region_showing)) || (!NILP (w->region_showing) && !EQ (w->region_showing, - Fmarker_position (B_ (XBUFFER (w->buffer), mark))))) + Fmarker_position (BVAR (XBUFFER (w->buffer), mark))))) CHARPOS (this_line_start_pos) = 0; /* Optimize the case that only the line containing the cursor in the @@ -11842,8 +11842,8 @@ redisplay_internal (int preserve_echo_area) /* If highlighting the region, or if the cursor is in the echo area, then we can't just move the cursor. */ else if (! (!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active))) - && (EQ (selected_window, B_ (current_buffer, last_selected_window)) + && !NILP (BVAR (current_buffer, mark_active))) + && (EQ (selected_window, BVAR (current_buffer, last_selected_window)) || highlight_nonselected_windows) && NILP (w->region_showing) && NILP (Vshow_trailing_whitespace) @@ -13050,8 +13050,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, scroll_max = (max (scroll_step, max (arg_scroll_conservatively, temp_scroll_step)) * FRAME_LINE_HEIGHT (f)); - else if (NUMBERP (B_ (current_buffer, scroll_down_aggressively)) - || NUMBERP (B_ (current_buffer, scroll_up_aggressively))) + else if (NUMBERP (BVAR (current_buffer, scroll_down_aggressively)) + || NUMBERP (BVAR (current_buffer, scroll_up_aggressively))) /* We're trying to scroll because of aggressive scrolling but no scroll_step is set. Choose an arbitrary one. */ scroll_max = 10 * FRAME_LINE_HEIGHT (f); @@ -13116,7 +13116,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p, amount_to_scroll = scroll_max; else { - aggressive = B_ (current_buffer, scroll_up_aggressively); + aggressive = BVAR (current_buffer, scroll_up_aggressively); height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) { @@ -13199,7 +13199,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p, amount_to_scroll = scroll_max; else { - aggressive = B_ (current_buffer, scroll_down_aggressively); + aggressive = BVAR (current_buffer, scroll_down_aggressively); height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) { @@ -13380,7 +13380,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste region exists, cursor movement has to do more than just set the cursor. */ && !(!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active))) + && !NILP (BVAR (current_buffer, mark_active))) && NILP (w->region_showing) && NILP (Vshow_trailing_whitespace) /* Right after splitting windows, last_point may be nil. */ @@ -13535,7 +13535,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste must_scroll = 1; } else if (rc != CURSOR_MOVEMENT_SUCCESS - && !NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))) + && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) { /* If rows are bidi-reordered and point moved, back up until we find a row that does not belong to a @@ -13593,7 +13593,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste else if (scroll_p) rc = CURSOR_MOVEMENT_MUST_SCROLL; else if (rc != CURSOR_MOVEMENT_SUCCESS - && !NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))) + && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) { /* With bidi-reordered rows, there could be more than one candidate row whose start and end positions @@ -13893,7 +13893,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) struct Lisp_Char_Table *disptab = buffer_display_table (); if (! disptab_matches_widthtab (disptab, - XVECTOR (B_ (current_buffer, width_table)))) + XVECTOR (BVAR (current_buffer, width_table)))) { invalidate_region_cache (current_buffer, current_buffer->width_run_cache, @@ -14015,7 +14015,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) /* If we are highlighting the region, then we just changed the region, so redisplay to show it. */ if (!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active))) + && !NILP (BVAR (current_buffer, mark_active))) { clear_glyph_matrix (w->desired_matrix); if (!try_window (window, startp, 0)) @@ -14178,8 +14178,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) if ((scroll_conservatively || emacs_scroll_step || temp_scroll_step - || NUMBERP (B_ (current_buffer, scroll_up_aggressively)) - || NUMBERP (B_ (current_buffer, scroll_down_aggressively))) + || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) + || NUMBERP (BVAR (current_buffer, scroll_down_aggressively))) && !current_buffer->clip_changed && CHARPOS (startp) >= BEGV && CHARPOS (startp) <= ZV) @@ -14622,7 +14622,7 @@ try_window_reusing_current_matrix (struct window *w) /* Can't do this if region may have changed. */ if ((!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active))) + && !NILP (BVAR (current_buffer, mark_active))) || !NILP (w->region_showing) || !NILP (Vshow_trailing_whitespace)) return 0; @@ -14965,7 +14965,7 @@ try_window_reusing_current_matrix (struct window *w) /* Can't use this optimization with bidi-reordered glyph rows, unless cursor is already at point. */ - if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))) + if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) { if (!(w->cursor.hpos >= 0 && w->cursor.hpos < row->used[TEXT_AREA] @@ -15279,7 +15279,7 @@ row_containing_pos (struct window *w, EMACS_INT charpos, { struct glyph *g; - if (NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering)) + if (NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)) || (!best_row && !row->continued_p)) return row; /* In bidi-reordered rows, there could be several rows @@ -15426,7 +15426,7 @@ try_window_id (struct window *w) /* Can't use this if highlighting a region because a cursor movement will do more than just set the cursor. */ if (!NILP (Vtransient_mark_mode) - && !NILP (B_ (current_buffer, mark_active))) + && !NILP (BVAR (current_buffer, mark_active))) GIVE_UP (9); /* Likewise if highlighting trailing whitespace. */ @@ -15446,7 +15446,7 @@ try_window_id (struct window *w) wrapped line can change the wrap position, altering the line above it. It might be worthwhile to handle this more intelligently, but for now just redisplay from scratch. */ - if (!NILP (B_ (XBUFFER (w->buffer), word_wrap))) + if (!NILP (BVAR (XBUFFER (w->buffer), word_wrap))) GIVE_UP (21); /* Under bidi reordering, adding or deleting a character in the @@ -15457,8 +15457,8 @@ try_window_id (struct window *w) to find the paragraph limits and widen the range of redisplayed lines to that, but for now just give up this optimization and redisplay from scratch. */ - if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering)) - && NILP (B_ (XBUFFER (w->buffer), bidi_paragraph_direction))) + if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)) + && NILP (BVAR (XBUFFER (w->buffer), bidi_paragraph_direction))) GIVE_UP (22); /* Make sure beg_unchanged and end_unchanged are up to date. Do it @@ -16429,7 +16429,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string) it.glyph_row->used[TEXT_AREA] = 0; SET_TEXT_POS (it.position, 0, 0); - multibyte_p = !NILP (B_ (buffer, enable_multibyte_characters)); + multibyte_p = !NILP (BVAR (buffer, enable_multibyte_characters)); p = arrow_string; while (p < arrow_end) { @@ -17364,7 +17364,7 @@ display_line (struct it *it) row->glyphs[TEXT_AREA]->charpos = -1; row->displays_text_p = 0; - if (!NILP (B_ (XBUFFER (it->w->buffer), indicate_empty_lines)) + if (!NILP (BVAR (XBUFFER (it->w->buffer), indicate_empty_lines)) && (!MINI_WINDOW_P (it->w) || (minibuf_level && EQ (it->window, minibuf_window)))) row->indicate_empty_line_p = 1; @@ -17942,10 +17942,10 @@ See also `bidi-paragraph-direction'. */) old = current_buffer; } - if (NILP (B_ (buf, bidi_display_reordering))) + if (NILP (BVAR (buf, bidi_display_reordering))) return Qleft_to_right; - else if (!NILP (B_ (buf, bidi_paragraph_direction))) - return B_ (buf, bidi_paragraph_direction); + else if (!NILP (BVAR (buf, bidi_paragraph_direction))) + return BVAR (buf, bidi_paragraph_direction); else { /* Determine the direction from buffer text. We could try to @@ -18204,14 +18204,14 @@ display_mode_lines (struct window *w) /* Select mode line face based on the real selected window. */ display_mode_line (w, CURRENT_MODE_LINE_FACE_ID_3 (sel_w, sel_w, w), - B_ (current_buffer, mode_line_format)); + BVAR (current_buffer, mode_line_format)); ++n; } if (WINDOW_WANTS_HEADER_LINE_P (w)) { display_mode_line (w, HEADER_LINE_FACE_ID, - B_ (current_buffer, header_line_format)); + BVAR (current_buffer, header_line_format)); ++n; } @@ -19146,7 +19146,7 @@ static char * decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag) { Lisp_Object val; - int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters)); + int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); const unsigned char *eol_str; int eol_str_len; /* The EOL conversion we are using. */ @@ -19242,7 +19242,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, switch (c) { case '*': - if (!NILP (B_ (b, read_only))) + if (!NILP (BVAR (b, read_only))) return "%"; if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) return "*"; @@ -19252,7 +19252,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, /* This differs from %* only for a modified read-only buffer. */ if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) return "*"; - if (!NILP (B_ (b, read_only))) + if (!NILP (BVAR (b, read_only))) return "%"; return "-"; @@ -19314,7 +19314,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, } case 'b': - obj = B_ (b, name); + obj = BVAR (b, name); break; case 'c': @@ -19354,7 +19354,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, return "Emacs"; case 'f': - obj = B_ (b, filename); + obj = BVAR (b, filename); break; case 'i': @@ -19490,7 +19490,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, break; case 'm': - obj = B_ (b, mode_name); + obj = BVAR (b, mode_name); break; case 'n': @@ -19575,7 +19575,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, { int count = inhibit_garbage_collection (); Lisp_Object val = call1 (intern ("file-remote-p"), - B_ (current_buffer, directory)); + BVAR (current_buffer, directory)); unbind_to (count, Qnil); if (NILP (val)) @@ -19610,7 +19610,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, (FRAME_TERMINAL_CODING (f)->id), p, 0); } - p = decode_mode_spec_coding (B_ (b, buffer_file_coding_system), + p = decode_mode_spec_coding (BVAR (b, buffer_file_coding_system), p, eol_flag); #if 0 /* This proves to be annoying; I think we can do without. -- rms. */ @@ -19660,8 +19660,8 @@ display_count_lines (EMACS_INT start, EMACS_INT start_byte, /* If we are not in selective display mode, check only for newlines. */ - int selective_display = (!NILP (B_ (current_buffer, selective_display)) - && !INTEGERP (B_ (current_buffer, selective_display))); + int selective_display = (!NILP (BVAR (current_buffer, selective_display)) + && !INTEGERP (BVAR (current_buffer, selective_display))); if (count > 0) { @@ -23308,13 +23308,13 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, { if (w == XWINDOW (echo_area_window)) { - if (EQ (B_ (b, cursor_type), Qt) || NILP (B_ (b, cursor_type))) + if (EQ (BVAR (b, cursor_type), Qt) || NILP (BVAR (b, cursor_type))) { *width = FRAME_CURSOR_WIDTH (f); return FRAME_DESIRED_CURSOR (f); } else - return get_specified_cursor_type (B_ (b, cursor_type), width); + return get_specified_cursor_type (BVAR (b, cursor_type), width); } *active_cursor = 0; @@ -23334,23 +23334,23 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, } /* Never display a cursor in a window in which cursor-type is nil. */ - if (NILP (B_ (b, cursor_type))) + if (NILP (BVAR (b, cursor_type))) return NO_CURSOR; /* Get the normal cursor type for this window. */ - if (EQ (B_ (b, cursor_type), Qt)) + if (EQ (BVAR (b, cursor_type), Qt)) { cursor_type = FRAME_DESIRED_CURSOR (f); *width = FRAME_CURSOR_WIDTH (f); } else - cursor_type = get_specified_cursor_type (B_ (b, cursor_type), width); + cursor_type = get_specified_cursor_type (BVAR (b, cursor_type), width); /* Use cursor-in-non-selected-windows instead for non-selected window or frame. */ if (non_selected) { - alt_cursor = B_ (b, cursor_in_non_selected_windows); + alt_cursor = BVAR (b, cursor_in_non_selected_windows); if (!EQ (Qt, alt_cursor)) return get_specified_cursor_type (alt_cursor, width); /* t means modify the normal cursor type. */ @@ -23397,7 +23397,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width, /* Cursor is blinked off, so determine how to "toggle" it. */ /* First look for an entry matching the buffer's cursor-type in blink-cursor-alist. */ - if ((alt_cursor = Fassoc (B_ (b, cursor_type), Vblink_cursor_alist), !NILP (alt_cursor))) + if ((alt_cursor = Fassoc (BVAR (b, cursor_type), Vblink_cursor_alist), !NILP (alt_cursor))) return get_specified_cursor_type (XCDR (alt_cursor), width); /* Then see if frame has specified a specific blink off cursor type. */ @@ -25513,11 +25513,11 @@ note_mouse_highlight (struct frame *f, int x, int y) necessarily display the character whose position is the smallest. */ Lisp_Object lim1 = - NILP (B_ (XBUFFER (buffer), bidi_display_reordering)) + NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) ? Fmarker_position (w->start) : Qnil; Lisp_Object lim2 = - NILP (B_ (XBUFFER (buffer), bidi_display_reordering)) + NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) ? make_number (BUF_Z (XBUFFER (buffer)) - XFASTINT (w->window_end_pos)) : Qnil; diff --git a/src/xfaces.c b/src/xfaces.c index 9ae35a74bd1..4cc47c85050 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5970,7 +5970,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object prop) { int face_id; - if (NILP (B_ (current_buffer, enable_multibyte_characters))) + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) ch = 0; if (NILP (prop)) diff --git a/src/xfns.c b/src/xfns.c index 062bb105d0a..d8d4a8ca772 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4610,7 +4610,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil); old_buffer = current_buffer; set_buffer_internal_1 (XBUFFER (buffer)); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); Ferase_buffer (); @@ -5106,7 +5106,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)); - B_ (current_buffer, truncate_lines) = Qnil; + BVAR (current_buffer, truncate_lines) = Qnil; clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); |