summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-16 08:02:50 -0700
committerTom Tromey <tromey@redhat.com>2011-02-16 08:02:50 -0700
commit4b4deea229a39c94762dcf49da538b639df59148 (patch)
treeec77e02136d2b8991a34d50438d9457bd2fe11fb /src/fileio.c
parent16d2ff891446b821ef348d451f73683a0d3a21f6 (diff)
downloademacs-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.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c178
1 files changed, 89 insertions, 89 deletions
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;
}