Hide implementation of `struct buffer'
* composite.c (fill_gstring_header) (composition_compute_stop_pos, composition_adjust_point) (Ffind_composition_internal): Use B_. * intervals.c (set_point_both, get_local_map): Use B_. * callproc.c (Fcall_process, Fcall_process_region): Use B_. * 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): Use B_. * bytecode.c (Fbyte_code): Use B_. * syntax.c (update_syntax_table, dec_bytepos, Fsyntax_table) (Fset_syntax_table, Fmodify_syntax_entry, skip_chars) (skip_syntaxes, scan_lists): Use B_. * lread.c (readchar, unreadchar, openp, readevalloop) (Feval_buffer, Feval_region): Use B_. * print.c (printchar, strout, print_string, PRINTDECLARE) (PRINTPREPARE, PRINTFINISH, temp_output_buffer_setup) (print_object): Use B_. * font.c (font_at): Use B_. * fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): Use B_. * callint.c (check_mark, Fcall_interactively): Use B_. * 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): Use B_. * data.c (swap_in_symval_forwarding, set_internal) (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p): Use B_. * undo.c (record_point, record_insert, record_delete) (record_marker_adjustment, record_first_change) (record_property_change, Fundo_boundary, truncate_undo_list) (Fprimitive_undo): Use B_. * 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): Use B_. * 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): Use B_. * casefiddle.c (casify_object, casify_region): Use B_. * casetab.c (Fcurrent_case_table, set_case_table): Use B_. * cmds.c (Fself_insert_command, internal_self_insert): Use B_. * 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): Use B_. * minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Use B_. * marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted) (set_marker_both, set_marker_restricted_both, unchain_marker): Use B_. * 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): Use B_. * filelock.c (unlock_all_files, Flock_buffer, Funlock_buffer) (unlock_buffer): Use B_. * keymap.c (Flocal_key_binding, Fuse_local_map) (Fcurrent_local_map, push_key_description) (Fdescribe_buffer_bindings): Use B_. * keyboard.c (command_loop_1, read_char_minibuf_menu_prompt) (read_key_sequence): Use B_. * fringe.c (get_logical_cursor_bitmap) (get_logical_fringe_bitmap, update_window_fringes): Use B_. * xfns.c (x_create_tip_frame, Fx_show_tip): Use B_. * xfaces.c (compute_char_face): Use B_. * character.c (chars_in_text, Fget_byte): Use B_. * category.c (check_category_table, Fcategory_table) (Fset_category_table, char_category_set): Use B_. * 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): Use B_. * charset.c (Ffind_charset_region): Use B_. * 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): Use B_. * 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): Use B_. * frame.c (make_frame_visible_1): Use B_. * dispnew.c (Fframe_or_buffer_changed_p): Use B_. * dispextern.h (WINDOW_WANTS_HEADER_LINE_P) (WINDOW_WANTS_MODELINE_P): Use B_. * syntax.h (Vstandard_syntax_table): Update. (CURRENT_SYNTAX_TABLE, SETUP_BUFFER_SYNTAX_TABLE): Use B_. * intervals.h (TEXT_PROP_MEANS_INVISIBLE): Update. (TEXT_PROP_MEANS_INVISIBLE): Use B_. * character.h (FETCH_CHAR_ADVANCE): Update. (INC_BOTH, ASCII_CHAR_WIDTH, DEC_BOTH): Use B_. * category.h (Vstandard_category_table): Update. * lisp.h (DEFVAR_BUFFER_DEFAULTS): Update for change to field names. (DOWNCASE_TABLE, UPCASE_TABLE): Use B_. * buffer.c (swapfield_): New macro. (Fbuffer_swap_text): Use swapfield_ where appropriate. (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, Fset_buffer_multibyte) (swap_out_buffer_local_variables, record_overlay_string) (overlay_strings, init_buffer_once, init_buffer, syms_of_buffer): Use B_. * buffer.h (struct buffer): Rename all Lisp_Object fields. (BUFFER_INTERNAL_FIELD, B_): New macro. (FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE): Use B_.
This commit is contained in:
parent
42f6055717
commit
5d8ea1203d
47 changed files with 1151 additions and 999 deletions
137
src/ChangeLog
137
src/ChangeLog
|
@ -1,3 +1,140 @@
|
|||
2011-02-14 Tom Tromey <tromey@parfait>
|
||||
|
||||
* composite.c (fill_gstring_header)
|
||||
(composition_compute_stop_pos, composition_adjust_point)
|
||||
(Ffind_composition_internal): Use B_.
|
||||
* intervals.c (set_point_both, get_local_map): Use B_.
|
||||
* callproc.c (Fcall_process, Fcall_process_region): Use B_.
|
||||
* 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): Use B_.
|
||||
* bytecode.c (Fbyte_code): Use B_.
|
||||
* syntax.c (update_syntax_table, dec_bytepos, Fsyntax_table)
|
||||
(Fset_syntax_table, Fmodify_syntax_entry, skip_chars)
|
||||
(skip_syntaxes, scan_lists): Use B_.
|
||||
* lread.c (readchar, unreadchar, openp, readevalloop)
|
||||
(Feval_buffer, Feval_region): Use B_.
|
||||
* print.c (printchar, strout, print_string, PRINTDECLARE)
|
||||
(PRINTPREPARE, PRINTFINISH, temp_output_buffer_setup)
|
||||
(print_object): Use B_.
|
||||
* font.c (font_at): Use B_.
|
||||
* fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): Use
|
||||
B_.
|
||||
* callint.c (check_mark, Fcall_interactively): Use B_.
|
||||
* 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): Use B_.
|
||||
* data.c (swap_in_symval_forwarding, set_internal)
|
||||
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
|
||||
Use B_.
|
||||
* undo.c (record_point, record_insert, record_delete)
|
||||
(record_marker_adjustment, record_first_change)
|
||||
(record_property_change, Fundo_boundary, truncate_undo_list)
|
||||
(Fprimitive_undo): Use B_.
|
||||
* 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): Use B_.
|
||||
* 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): Use
|
||||
B_.
|
||||
* casefiddle.c (casify_object, casify_region): Use B_.
|
||||
* casetab.c (Fcurrent_case_table, set_case_table): Use B_.
|
||||
* cmds.c (Fself_insert_command, internal_self_insert): Use B_.
|
||||
* 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): Use B_.
|
||||
* minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Use B_.
|
||||
* marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted)
|
||||
(set_marker_both, set_marker_restricted_both, unchain_marker): Use
|
||||
B_.
|
||||
* 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): Use B_.
|
||||
* filelock.c (unlock_all_files, Flock_buffer, Funlock_buffer)
|
||||
(unlock_buffer): Use B_.
|
||||
* keymap.c (Flocal_key_binding, Fuse_local_map)
|
||||
(Fcurrent_local_map, push_key_description)
|
||||
(Fdescribe_buffer_bindings): Use B_.
|
||||
* keyboard.c (command_loop_1, read_char_minibuf_menu_prompt)
|
||||
(read_key_sequence): Use B_.
|
||||
* fringe.c (get_logical_cursor_bitmap)
|
||||
(get_logical_fringe_bitmap, update_window_fringes): Use B_.
|
||||
* xfns.c (x_create_tip_frame, Fx_show_tip): Use B_.
|
||||
* xfaces.c (compute_char_face): Use B_.
|
||||
* character.c (chars_in_text, Fget_byte): Use B_.
|
||||
* category.c (check_category_table, Fcategory_table)
|
||||
(Fset_category_table, char_category_set): Use B_.
|
||||
* 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): Use
|
||||
B_.
|
||||
* charset.c (Ffind_charset_region): Use B_.
|
||||
* 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): Use B_.
|
||||
* 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): Use B_.
|
||||
* frame.c (make_frame_visible_1): Use B_.
|
||||
* dispnew.c (Fframe_or_buffer_changed_p): Use B_.
|
||||
* dispextern.h (WINDOW_WANTS_HEADER_LINE_P)
|
||||
(WINDOW_WANTS_MODELINE_P): Use B_.
|
||||
* syntax.h (Vstandard_syntax_table): Update.
|
||||
(CURRENT_SYNTAX_TABLE, SETUP_BUFFER_SYNTAX_TABLE): Use B_.
|
||||
* intervals.h (TEXT_PROP_MEANS_INVISIBLE): Update.
|
||||
(TEXT_PROP_MEANS_INVISIBLE): Use B_.
|
||||
* character.h (FETCH_CHAR_ADVANCE): Update.
|
||||
(INC_BOTH, ASCII_CHAR_WIDTH, DEC_BOTH): Use B_.
|
||||
* category.h (Vstandard_category_table): Update.
|
||||
* lisp.h (DEFVAR_BUFFER_DEFAULTS): Update for change to field
|
||||
names.
|
||||
(DOWNCASE_TABLE, UPCASE_TABLE): Use B_.
|
||||
* buffer.c (swapfield_): New macro.
|
||||
(Fbuffer_swap_text): Use swapfield_ where appropriate.
|
||||
(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, Fset_buffer_multibyte)
|
||||
(swap_out_buffer_local_variables, record_overlay_string)
|
||||
(overlay_strings, init_buffer_once, init_buffer, syms_of_buffer):
|
||||
Use B_.
|
||||
* buffer.h (struct buffer): Rename all Lisp_Object fields.
|
||||
(BUFFER_INTERNAL_FIELD, B_): New macro.
|
||||
(FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE): Use B_.
|
||||
|
||||
2011-02-14 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* gtkutil.c (xg_tool_bar_menu_proxy): Handle case when tool bar label
|
||||
|
|
16
src/alloc.c
16
src/alloc.c
|
@ -3886,7 +3886,7 @@ live_buffer_p (struct mem_node *m, void *p)
|
|||
must not have been killed. */
|
||||
return (m->type == MEM_TYPE_BUFFER
|
||||
&& p == m->start
|
||||
&& !NILP (((struct buffer *) p)->name));
|
||||
&& !NILP (((struct buffer *) p)->BUFFER_INTERNAL_FIELD (name)));
|
||||
}
|
||||
|
||||
#endif /* GC_MARK_STACK || defined GC_MALLOC_CHECK */
|
||||
|
@ -4872,11 +4872,11 @@ returns nil, because real GC can't be done. */)
|
|||
turned off in that buffer. Calling truncate_undo_list on
|
||||
Qt tends to return NULL, which effectively turns undo back on.
|
||||
So don't call truncate_undo_list if undo_list is Qt. */
|
||||
if (! NILP (nextb->name) && ! EQ (nextb->undo_list, Qt))
|
||||
if (! NILP (nextb->BUFFER_INTERNAL_FIELD (name)) && ! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt))
|
||||
truncate_undo_list (nextb);
|
||||
|
||||
/* Shrink buffer gaps, but skip indirect and dead buffers. */
|
||||
if (nextb->base_buffer == 0 && !NILP (nextb->name)
|
||||
if (nextb->base_buffer == 0 && !NILP (nextb->BUFFER_INTERNAL_FIELD (name))
|
||||
&& ! nextb->text->inhibit_shrinking)
|
||||
{
|
||||
/* If a buffer's gap size is more than 10% of the buffer
|
||||
|
@ -5009,10 +5009,10 @@ returns nil, because real GC can't be done. */)
|
|||
turned off in that buffer. Calling truncate_undo_list on
|
||||
Qt tends to return NULL, which effectively turns undo back on.
|
||||
So don't call truncate_undo_list if undo_list is Qt. */
|
||||
if (! EQ (nextb->undo_list, Qt))
|
||||
if (! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt))
|
||||
{
|
||||
Lisp_Object tail, prev;
|
||||
tail = nextb->undo_list;
|
||||
tail = nextb->BUFFER_INTERNAL_FIELD (undo_list);
|
||||
prev = Qnil;
|
||||
while (CONSP (tail))
|
||||
{
|
||||
|
@ -5021,7 +5021,7 @@ returns nil, because real GC can't be done. */)
|
|||
&& !XMARKER (XCAR (XCAR (tail)))->gcmarkbit)
|
||||
{
|
||||
if (NILP (prev))
|
||||
nextb->undo_list = tail = XCDR (tail);
|
||||
nextb->BUFFER_INTERNAL_FIELD (undo_list) = tail = XCDR (tail);
|
||||
else
|
||||
{
|
||||
tail = XCDR (tail);
|
||||
|
@ -5037,7 +5037,7 @@ returns nil, because real GC can't be done. */)
|
|||
}
|
||||
/* Now that we have stripped the elements that need not be in the
|
||||
undo_list any more, we can finally mark the list. */
|
||||
mark_object (nextb->undo_list);
|
||||
mark_object (nextb->BUFFER_INTERNAL_FIELD (undo_list));
|
||||
|
||||
nextb = nextb->next;
|
||||
}
|
||||
|
@ -5595,7 +5595,7 @@ mark_buffer (Lisp_Object buf)
|
|||
|
||||
/* buffer-local Lisp variables start at `undo_list',
|
||||
tho only the ones from `name' on are GC'd normally. */
|
||||
for (ptr = &buffer->name;
|
||||
for (ptr = &buffer->BUFFER_INTERNAL_FIELD (name);
|
||||
(char *)ptr < (char *)buffer + sizeof (struct buffer);
|
||||
ptr++)
|
||||
mark_object (*ptr);
|
||||
|
|
680
src/buffer.c
680
src/buffer.c
File diff suppressed because it is too large
Load diff
151
src/buffer.h
151
src/buffer.h
|
@ -321,7 +321,7 @@ while (0)
|
|||
/* Return character at byte position POS. */
|
||||
|
||||
#define FETCH_CHAR(pos) \
|
||||
(!NILP (current_buffer->enable_multibyte_characters) \
|
||||
(!NILP (B_ (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 (current_buffer->enable_multibyte_characters) \
|
||||
(!NILP (B_ (current_buffer, enable_multibyte_characters)) \
|
||||
? FETCH_MULTIBYTE_CHAR ((pos)) \
|
||||
: UNIBYTE_TO_CHAR (FETCH_BYTE ((pos))))
|
||||
|
||||
|
@ -464,6 +464,15 @@ struct buffer_text
|
|||
int inhibit_shrinking;
|
||||
};
|
||||
|
||||
/* 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,
|
||||
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))
|
||||
|
||||
/* This is the structure that the buffer Lisp object points to. */
|
||||
|
||||
struct buffer
|
||||
|
@ -587,138 +596,138 @@ struct buffer
|
|||
because local variables have to be right in the struct buffer.
|
||||
So we copy it around in set_buffer_internal.
|
||||
This comes before `name' because it is marked in a special way. */
|
||||
Lisp_Object undo_list;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (undo_list);
|
||||
|
||||
/* The name of this buffer. */
|
||||
Lisp_Object name;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (name);
|
||||
|
||||
/* The name of the file visited in this buffer, or nil. */
|
||||
Lisp_Object filename;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (filename);
|
||||
/* Dir for expanding relative file names. */
|
||||
Lisp_Object directory;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (directory);
|
||||
/* True if this buffer has been backed up (if you write to the
|
||||
visited file and it hasn't been backed up, then a backup will
|
||||
be made). */
|
||||
/* This isn't really used by the C code, so could be deleted. */
|
||||
Lisp_Object backed_up;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (backed_up);
|
||||
/* Length of file when last read or saved.
|
||||
-1 means auto saving turned off because buffer shrank a lot.
|
||||
-2 means don't turn off auto saving if buffer shrinks.
|
||||
(That value is used with buffer-swap-text.)
|
||||
This is not in the struct buffer_text
|
||||
because it's not used in indirect buffers at all. */
|
||||
Lisp_Object save_length;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (save_length);
|
||||
/* File name used for auto-saving this buffer.
|
||||
This is not in the struct buffer_text
|
||||
because it's not used in indirect buffers at all. */
|
||||
Lisp_Object auto_save_file_name;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (auto_save_file_name);
|
||||
|
||||
/* Non-nil if buffer read-only. */
|
||||
Lisp_Object read_only;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (read_only);
|
||||
/* "The mark". This is a marker which may
|
||||
point into this buffer or may point nowhere. */
|
||||
Lisp_Object mark;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (mark);
|
||||
|
||||
/* Alist of elements (SYMBOL . VALUE-IN-THIS-BUFFER) for all
|
||||
per-buffer variables of this buffer. For locally unbound
|
||||
symbols, just the symbol appears as the element. */
|
||||
Lisp_Object local_var_alist;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (local_var_alist);
|
||||
|
||||
/* Symbol naming major mode (eg, lisp-mode). */
|
||||
Lisp_Object major_mode;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (major_mode);
|
||||
/* Pretty name of major mode (eg, "Lisp"). */
|
||||
Lisp_Object mode_name;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (mode_name);
|
||||
/* Mode line element that controls format of mode line. */
|
||||
Lisp_Object mode_line_format;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (mode_line_format);
|
||||
|
||||
/* Analogous to mode_line_format for the line displayed at the top
|
||||
of windows. Nil means don't display that line. */
|
||||
Lisp_Object header_line_format;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (header_line_format);
|
||||
|
||||
/* Keys that are bound local to this buffer. */
|
||||
Lisp_Object keymap;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (keymap);
|
||||
/* This buffer's local abbrev table. */
|
||||
Lisp_Object abbrev_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (abbrev_table);
|
||||
/* This buffer's syntax table. */
|
||||
Lisp_Object syntax_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (syntax_table);
|
||||
/* This buffer's category table. */
|
||||
Lisp_Object category_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (category_table);
|
||||
|
||||
/* Values of several buffer-local variables. */
|
||||
/* tab-width is buffer-local so that redisplay can find it
|
||||
in buffers that are not current. */
|
||||
Lisp_Object case_fold_search;
|
||||
Lisp_Object tab_width;
|
||||
Lisp_Object fill_column;
|
||||
Lisp_Object left_margin;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (case_fold_search);
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (tab_width);
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (fill_column);
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (left_margin);
|
||||
/* Function to call when insert space past fill column. */
|
||||
Lisp_Object auto_fill_function;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (auto_fill_function);
|
||||
/* nil: text, t: binary.
|
||||
This value is meaningful only on certain operating systems. */
|
||||
/* Actually, we don't need this flag any more because end-of-line
|
||||
is handled correctly according to the buffer-file-coding-system
|
||||
of the buffer. Just keeping it for backward compatibility. */
|
||||
Lisp_Object buffer_file_type;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (buffer_file_type);
|
||||
|
||||
/* Case table for case-conversion in this buffer.
|
||||
This char-table maps each char into its lower-case version. */
|
||||
Lisp_Object downcase_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (downcase_table);
|
||||
/* Char-table mapping each char to its upper-case version. */
|
||||
Lisp_Object upcase_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (upcase_table);
|
||||
/* Char-table for conversion for case-folding search. */
|
||||
Lisp_Object case_canon_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (case_canon_table);
|
||||
/* Char-table of equivalences for case-folding search. */
|
||||
Lisp_Object case_eqv_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (case_eqv_table);
|
||||
|
||||
/* Non-nil means do not display continuation lines. */
|
||||
Lisp_Object truncate_lines;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (truncate_lines);
|
||||
/* Non-nil means to use word wrapping when displaying continuation lines. */
|
||||
Lisp_Object word_wrap;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (word_wrap);
|
||||
/* Non-nil means display ctl chars with uparrow. */
|
||||
Lisp_Object ctl_arrow;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (ctl_arrow);
|
||||
/* Non-nil means reorder bidirectional text for display in the
|
||||
visual order. */
|
||||
Lisp_Object bidi_display_reordering;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (bidi_display_reordering);
|
||||
/* If non-nil, specifies which direction of text to force in all the
|
||||
paragraphs of the buffer. Nil means determine paragraph
|
||||
direction dynamically for each paragraph. */
|
||||
Lisp_Object bidi_paragraph_direction;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (bidi_paragraph_direction);
|
||||
/* Non-nil means do selective display;
|
||||
see doc string in syms_of_buffer (buffer.c) for details. */
|
||||
Lisp_Object selective_display;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (selective_display);
|
||||
#ifndef old
|
||||
/* Non-nil means show ... at end of line followed by invisible lines. */
|
||||
Lisp_Object selective_display_ellipses;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (selective_display_ellipses);
|
||||
#endif
|
||||
/* Alist of (FUNCTION . STRING) for each minor mode enabled in buffer. */
|
||||
Lisp_Object minor_modes;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (minor_modes);
|
||||
/* t if "self-insertion" should overwrite; `binary' if it should also
|
||||
overwrite newlines and tabs - for editing executables and the like. */
|
||||
Lisp_Object overwrite_mode;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (overwrite_mode);
|
||||
/* non-nil means abbrev mode is on. Expand abbrevs automatically. */
|
||||
Lisp_Object abbrev_mode;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (abbrev_mode);
|
||||
/* Display table to use for text in this buffer. */
|
||||
Lisp_Object display_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (display_table);
|
||||
/* t means the mark and region are currently active. */
|
||||
Lisp_Object mark_active;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (mark_active);
|
||||
|
||||
/* Non-nil means the buffer contents are regarded as multi-byte
|
||||
form of characters, not a binary code. */
|
||||
Lisp_Object enable_multibyte_characters;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (enable_multibyte_characters);
|
||||
|
||||
/* Coding system to be used for encoding the buffer contents on
|
||||
saving. */
|
||||
Lisp_Object buffer_file_coding_system;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (buffer_file_coding_system);
|
||||
|
||||
/* List of symbols naming the file format used for visited file. */
|
||||
Lisp_Object file_format;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (file_format);
|
||||
|
||||
/* List of symbols naming the file format used for auto-save file. */
|
||||
Lisp_Object auto_save_file_format;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (auto_save_file_format);
|
||||
|
||||
/* True if the newline position cache and width run cache are
|
||||
enabled. See search.c and indent.c. */
|
||||
Lisp_Object cache_long_line_scans;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (cache_long_line_scans);
|
||||
|
||||
/* If the width run cache is enabled, this table contains the
|
||||
character widths width_run_cache (see above) assumes. When we
|
||||
|
@ -726,99 +735,99 @@ struct buffer
|
|||
current display table to see whether the display table has
|
||||
affected the widths of any characters. If it has, we
|
||||
invalidate the width run cache, and re-initialize width_table. */
|
||||
Lisp_Object width_table;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (width_table);
|
||||
|
||||
/* In an indirect buffer, or a buffer that is the base of an
|
||||
indirect buffer, this holds a marker that records
|
||||
PT for this buffer when the buffer is not current. */
|
||||
Lisp_Object pt_marker;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (pt_marker);
|
||||
|
||||
/* In an indirect buffer, or a buffer that is the base of an
|
||||
indirect buffer, this holds a marker that records
|
||||
BEGV for this buffer when the buffer is not current. */
|
||||
Lisp_Object begv_marker;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (begv_marker);
|
||||
|
||||
/* In an indirect buffer, or a buffer that is the base of an
|
||||
indirect buffer, this holds a marker that records
|
||||
ZV for this buffer when the buffer is not current. */
|
||||
Lisp_Object zv_marker;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (zv_marker);
|
||||
|
||||
/* This holds the point value before the last scroll operation.
|
||||
Explicitly setting point sets this to nil. */
|
||||
Lisp_Object point_before_scroll;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (point_before_scroll);
|
||||
|
||||
/* Truename of the visited file, or nil. */
|
||||
Lisp_Object file_truename;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (file_truename);
|
||||
|
||||
/* Invisibility spec of this buffer.
|
||||
t => any non-nil `invisible' property means invisible.
|
||||
A list => `invisible' property means invisible
|
||||
if it is memq in that list. */
|
||||
Lisp_Object invisibility_spec;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (invisibility_spec);
|
||||
|
||||
/* This is the last window that was selected with this buffer in it,
|
||||
or nil if that window no longer displays this buffer. */
|
||||
Lisp_Object last_selected_window;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (last_selected_window);
|
||||
|
||||
/* Incremented each time the buffer is displayed in a window. */
|
||||
Lisp_Object display_count;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (display_count);
|
||||
|
||||
/* Widths of left and right marginal areas for windows displaying
|
||||
this buffer. */
|
||||
Lisp_Object left_margin_cols, right_margin_cols;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (left_margin_cols), BUFFER_INTERNAL_FIELD (right_margin_cols);
|
||||
|
||||
/* Widths of left and right fringe areas for windows displaying
|
||||
this buffer. */
|
||||
Lisp_Object left_fringe_width, right_fringe_width;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (left_fringe_width), BUFFER_INTERNAL_FIELD (right_fringe_width);
|
||||
|
||||
/* Non-nil means fringes are drawn outside display margins;
|
||||
othersize draw them between margin areas and text. */
|
||||
Lisp_Object fringes_outside_margins;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (fringes_outside_margins);
|
||||
|
||||
/* Width and type of scroll bar areas for windows displaying
|
||||
this buffer. */
|
||||
Lisp_Object scroll_bar_width, vertical_scroll_bar_type;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (scroll_bar_width), BUFFER_INTERNAL_FIELD (vertical_scroll_bar_type);
|
||||
|
||||
/* Non-nil means indicate lines not displaying text (in a style
|
||||
like vi). */
|
||||
Lisp_Object indicate_empty_lines;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (indicate_empty_lines);
|
||||
|
||||
/* Non-nil means indicate buffer boundaries and scrolling. */
|
||||
Lisp_Object indicate_buffer_boundaries;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (indicate_buffer_boundaries);
|
||||
|
||||
/* Logical to physical fringe bitmap mappings. */
|
||||
Lisp_Object fringe_indicator_alist;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (fringe_indicator_alist);
|
||||
|
||||
/* Logical to physical cursor bitmap mappings. */
|
||||
Lisp_Object fringe_cursor_alist;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (fringe_cursor_alist);
|
||||
|
||||
/* Time stamp updated each time this buffer is displayed in a window. */
|
||||
Lisp_Object display_time;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (display_time);
|
||||
|
||||
/* If scrolling the display because point is below the bottom of a
|
||||
window showing this buffer, try to choose a window start so
|
||||
that point ends up this number of lines from the top of the
|
||||
window. Nil means that scrolling method isn't used. */
|
||||
Lisp_Object scroll_up_aggressively;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (scroll_up_aggressively);
|
||||
|
||||
/* If scrolling the display because point is above the top of a
|
||||
window showing this buffer, try to choose a window start so
|
||||
that point ends up this number of lines from the bottom of the
|
||||
window. Nil means that scrolling method isn't used. */
|
||||
Lisp_Object scroll_down_aggressively;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (scroll_down_aggressively);
|
||||
|
||||
/* Desired cursor type in this buffer. See the doc string of
|
||||
per-buffer variable `cursor-type'. */
|
||||
Lisp_Object cursor_type;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (cursor_type);
|
||||
|
||||
/* An integer > 0 means put that number of pixels below text lines
|
||||
in the display of this buffer. */
|
||||
Lisp_Object extra_line_spacing;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (extra_line_spacing);
|
||||
|
||||
/* *Cursor type to display in non-selected windows.
|
||||
t means to use hollow box cursor.
|
||||
See `cursor-type' for other values. */
|
||||
Lisp_Object cursor_in_non_selected_windows;
|
||||
Lisp_Object BUFFER_INTERNAL_FIELD (cursor_in_non_selected_windows);
|
||||
};
|
||||
|
||||
|
||||
|
@ -942,7 +951,7 @@ extern int last_per_buffer_idx;
|
|||
from the start of a buffer structure. */
|
||||
|
||||
#define PER_BUFFER_VAR_OFFSET(VAR) \
|
||||
offsetof (struct buffer, VAR)
|
||||
offsetof (struct buffer, BUFFER_INTERNAL_FIELD (VAR))
|
||||
|
||||
/* Return the index of buffer-local variable VAR. Each per-buffer
|
||||
variable has an index > 0 associated with it, except when it always
|
||||
|
|
|
@ -1398,7 +1398,7 @@ If the third argument is incorrect, Emacs may crash. */)
|
|||
CHECK_CHARACTER (TOP);
|
||||
AFTER_POTENTIAL_GC ();
|
||||
c = XFASTINT (TOP);
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
MAKE_CHAR_MULTIBYTE (c);
|
||||
XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (c)]);
|
||||
}
|
||||
|
|
|
@ -149,12 +149,12 @@ static void
|
|||
check_mark (int for_region)
|
||||
{
|
||||
Lisp_Object tem;
|
||||
tem = Fmarker_buffer (current_buffer->mark);
|
||||
tem = Fmarker_buffer (B_ (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 (current_buffer->mark_active))
|
||||
&& NILP (B_ (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 (current_buffer->read_only))
|
||||
if (!NILP (B_ (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,
|
||||
current_buffer->directory, Qlambda, Qnil,
|
||||
B_ (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] = current_buffer->mark;
|
||||
args[i] = B_ (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 (current_buffer->mark);
|
||||
foo = marker_position (B_ (current_buffer, mark));
|
||||
/* visargs[i] = Qnil; */
|
||||
args[i] = PT < foo ? point_marker : current_buffer->mark;
|
||||
args[i] = PT < foo ? point_marker : B_ (current_buffer, mark);
|
||||
varies[i] = 3;
|
||||
args[++i] = PT > foo ? point_marker : current_buffer->mark;
|
||||
args[++i] = PT > foo ? point_marker : B_ (current_buffer, mark);
|
||||
varies[i] = 4;
|
||||
break;
|
||||
|
||||
|
|
|
@ -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], current_buffer->directory);
|
||||
infile = Fexpand_file_name (args[1], B_ (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 = current_buffer->directory;
|
||||
current_dir = B_ (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 (current_buffer->directory, Qnil));
|
||||
Fcons (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
else if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
val = Qraw_text;
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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 (current_buffer->downcase_table)->extras[1]))
|
||||
Fset_case_table (current_buffer->downcase_table);
|
||||
if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1]))
|
||||
Fset_case_table (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
register int multibyte = !NILP (B_ (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 (current_buffer->downcase_table)->extras[1]))
|
||||
Fset_case_table (current_buffer->downcase_table);
|
||||
if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1]))
|
||||
Fset_case_table (B_ (current_buffer, downcase_table));
|
||||
|
||||
validate_region (&b, &e);
|
||||
start = XFASTINT (b);
|
||||
|
|
|
@ -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 current_buffer->downcase_table;
|
||||
return B_ (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
|
||||
{
|
||||
current_buffer->downcase_table = table;
|
||||
current_buffer->upcase_table = up;
|
||||
current_buffer->case_canon_table = canon;
|
||||
current_buffer->case_eqv_table = eqv;
|
||||
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;
|
||||
}
|
||||
|
||||
return table;
|
||||
|
|
|
@ -190,7 +190,7 @@ Lisp_Object
|
|||
check_category_table (Lisp_Object table)
|
||||
{
|
||||
if (NILP (table))
|
||||
return current_buffer->category_table;
|
||||
return B_ (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 current_buffer->category_table;
|
||||
return B_ (current_buffer, category_table);
|
||||
}
|
||||
|
||||
DEFUN ("standard-category-table", Fstandard_category_table,
|
||||
|
@ -281,7 +281,7 @@ Return TABLE. */)
|
|||
{
|
||||
int idx;
|
||||
table = check_category_table (table);
|
||||
current_buffer->category_table = table;
|
||||
B_ (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 (current_buffer->category_table, c);
|
||||
return CHAR_TABLE_REF (B_ (current_buffer, category_table), c);
|
||||
}
|
||||
|
||||
DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0,
|
||||
|
|
|
@ -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 buffer_defaults.category_table
|
||||
#define Vstandard_category_table B_ (&buffer_defaults, category_table)
|
||||
|
||||
/* Return the category set of character C in the current category table. */
|
||||
#define CATEGORY_SET(c) char_category_set (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 (current_buffer->enable_multibyte_characters))
|
||||
|| NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
return make_number (*p);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -417,7 +417,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
do \
|
||||
{ \
|
||||
CHARIDX++; \
|
||||
if (!NILP (current_buffer->enable_multibyte_characters)) \
|
||||
if (!NILP (B_ (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 (current_buffer->enable_multibyte_characters)) \
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)) \
|
||||
if (NILP (B_ (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 (current_buffer->tab_width) \
|
||||
: (c == '\n' ? 0 : (NILP (current_buffer->ctl_arrow) ? 4 : 2))) \
|
||||
? XFASTINT (B_ (current_buffer, tab_width)) \
|
||||
: (c == '\n' ? 0 : (NILP (B_ (current_buffer, ctl_arrow)) ? 4 : 2))) \
|
||||
: (c < 0x7f \
|
||||
? 1 \
|
||||
: ((NILP (current_buffer->ctl_arrow) ? 4 : 2))))
|
||||
: ((NILP (B_ (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
|
||||
|
|
|
@ -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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters));
|
||||
|
||||
validate_region (&beg, &end);
|
||||
from = XFASTINT (beg);
|
||||
|
|
22
src/cmds.c
22
src/cmds.c
|
@ -292,10 +292,10 @@ After insertion, the value of `auto-fill-function' is called if the
|
|||
}
|
||||
|
||||
if (remove_boundary
|
||||
&& CONSP (current_buffer->undo_list)
|
||||
&& NILP (XCAR (current_buffer->undo_list)))
|
||||
&& CONSP (B_ (current_buffer, undo_list))
|
||||
&& NILP (XCAR (B_ (current_buffer, undo_list))))
|
||||
/* Remove the undo_boundary that was just pushed. */
|
||||
current_buffer->undo_list = XCDR (current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list) = XCDR (B_ (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 = current_buffer->overwrite_mode;
|
||||
overwrite = B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (!NILP (B_ (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 (current_buffer->abbrev_mode)
|
||||
if (!NILP (B_ (current_buffer, abbrev_mode))
|
||||
&& synt != Sword
|
||||
&& NILP (current_buffer->read_only)
|
||||
&& NILP (B_ (current_buffer, read_only))
|
||||
&& PT > BEGV
|
||||
&& (SYNTAX (!NILP (current_buffer->enable_multibyte_characters)
|
||||
&& (SYNTAX (!NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
int mc = ((NILP (B_ (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 (current_buffer->auto_fill_function))
|
||||
&& !NILP (B_ (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 (current_buffer->auto_fill_function);
|
||||
tem = call0 (B_ (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);
|
||||
|
|
36
src/coding.c
36
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 = current_buffer->undo_list;
|
||||
current_buffer->undo_list = Qt;
|
||||
undo_list = B_ (current_buffer, undo_list);
|
||||
B_ (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))
|
||||
{
|
||||
current_buffer->undo_list = undo_list;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
= ! NILP (B_ (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 ();
|
||||
current_buffer->undo_list = Qt;
|
||||
current_buffer->enable_multibyte_characters = multibyte ? Qt : Qnil;
|
||||
B_ (current_buffer, undo_list) = Qt;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
coding->dst_multibyte = ! NILP (B_ (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 (XBUFFER (dst_object)->enable_multibyte_characters);
|
||||
= ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
else if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
= (NILP (B_ (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 (XBUFFER (dst_object)->enable_multibyte_characters);
|
||||
= ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
else if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
= (NILP (B_ (current_buffer, enable_multibyte_characters))
|
||||
? tail->bytepos : from + coding->produced_char);
|
||||
}
|
||||
}
|
||||
|
@ -8481,8 +8481,8 @@ highest priority. */)
|
|||
return detect_coding_system (BYTE_POS_ADDR (from_byte),
|
||||
to - from, to_byte - from_byte,
|
||||
!NILP (highest),
|
||||
!NILP (current_buffer
|
||||
->enable_multibyte_characters),
|
||||
!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
return Qnil;
|
||||
start_byte = CHAR_TO_BYTE (XINT (start));
|
||||
end_byte = CHAR_TO_BYTE (XINT (end));
|
||||
|
|
|
@ -796,7 +796,7 @@ fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lis
|
|||
|
||||
if (NILP (string))
|
||||
{
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (!NILP (B_ (current_buffer, enable_multibyte_characters))
|
||||
&& ! NILP (Vauto_composition_mode)
|
||||
&& find_automatic_composition (from, to, &start, &end, &gstring,
|
||||
string))
|
||||
|
|
24
src/data.c
24
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, current_buffer->local_var_alist);
|
||||
tem1 = assq_no_quit (var, B_ (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
|
||||
: XBUFFER (where)->local_var_alist));
|
||||
: B_ (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));
|
||||
XBUFFER (where)->local_var_alist
|
||||
= Fcons (tem1, XBUFFER (where)->local_var_alist);
|
||||
B_ (XBUFFER (where), local_var_alist)
|
||||
= Fcons (tem1, B_ (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 (current_buffer->name));
|
||||
SDATA (B_ (current_buffer, name)));
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure this buffer has its own value of symbol. */
|
||||
XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
|
||||
tem = Fassq (variable, current_buffer->local_var_alist);
|
||||
tem = Fassq (variable, B_ (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);
|
||||
|
||||
current_buffer->local_var_alist
|
||||
B_ (current_buffer, local_var_alist)
|
||||
= Fcons (Fcons (variable, XCDR (blv->defcell)),
|
||||
current_buffer->local_var_alist);
|
||||
B_ (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, current_buffer->local_var_alist);
|
||||
tem = Fassq (variable, B_ (current_buffer, local_var_alist));
|
||||
if (!NILP (tem))
|
||||
current_buffer->local_var_alist
|
||||
= Fdelq (tem, current_buffer->local_var_alist);
|
||||
B_ (current_buffer, local_var_alist)
|
||||
= Fdelq (tem, B_ (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 = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
|
||||
for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
elt = XCAR (tail);
|
||||
if (EQ (variable, XCAR (elt)))
|
||||
|
|
|
@ -1416,7 +1416,7 @@ struct glyph_string
|
|||
&& !(W)->pseudo_window_p \
|
||||
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
|
||||
&& BUFFERP ((W)->buffer) \
|
||||
&& !NILP (XBUFFER ((W)->buffer)->mode_line_format) \
|
||||
&& !NILP (B_ (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 (XBUFFER ((W)->buffer)->header_line_format) \
|
||||
&& WINDOW_TOTAL_LINES (W) > 1 + !NILP (XBUFFER ((W)->buffer)->mode_line_format))
|
||||
&& !NILP (B_ (XBUFFER ((W)->buffer), header_line_format)) \
|
||||
&& WINDOW_TOTAL_LINES (W) > 1 + !NILP (B_ (XBUFFER ((W)->buffer), mode_line_format)))
|
||||
|
||||
|
||||
/* Return proper value to be used as baseline offset of font that has
|
||||
|
|
|
@ -6129,7 +6129,7 @@ pass nil for VARIABLE. */)
|
|||
{
|
||||
buf = XCDR (XCAR (tail));
|
||||
/* Ignore buffers that aren't included in buffer lists. */
|
||||
if (SREF (XBUFFER (buf)->name, 0) == ' ')
|
||||
if (SREF (B_ (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++, XBUFFER (buf)->read_only))
|
||||
if (!EQ (*vecp++, B_ (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 (XBUFFER (buf)->name, 0) == ' ')
|
||||
if (SREF (B_ (XBUFFER (buf), name), 0) == ' ')
|
||||
continue;
|
||||
*vecp++ = buf;
|
||||
*vecp++ = XBUFFER (buf)->read_only;
|
||||
*vecp++ = B_ (XBUFFER (buf), read_only);
|
||||
*vecp++ = Fbuffer_modified_p (buf);
|
||||
}
|
||||
/* Fill up the vector with lambdas (always at least one). */
|
||||
|
|
|
@ -306,10 +306,10 @@ region_limit (int beginningp)
|
|||
|
||||
if (!NILP (Vtransient_mark_mode)
|
||||
&& NILP (Vmark_even_if_inactive)
|
||||
&& NILP (current_buffer->mark_active))
|
||||
&& NILP (B_ (current_buffer, mark_active)))
|
||||
xsignal0 (Qmark_inactive);
|
||||
|
||||
m = Fmarker_position (current_buffer->mark);
|
||||
m = Fmarker_position (B_ (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 current_buffer->mark;
|
||||
return B_ (current_buffer, mark);
|
||||
}
|
||||
|
||||
|
||||
|
@ -866,9 +866,9 @@ save_excursion_save (void)
|
|||
== current_buffer);
|
||||
|
||||
return Fcons (Fpoint_marker (),
|
||||
Fcons (Fcopy_marker (current_buffer->mark, Qnil),
|
||||
Fcons (Fcopy_marker (B_ (current_buffer, mark), Qnil),
|
||||
Fcons (visible ? Qt : Qnil,
|
||||
Fcons (current_buffer->mark_active,
|
||||
Fcons (B_ (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 (current_buffer->mark);
|
||||
Fset_marker (current_buffer->mark, tem, Fcurrent_buffer ());
|
||||
omark = Fmarker_position (B_ (current_buffer, mark));
|
||||
Fset_marker (B_ (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 = current_buffer->mark_active;
|
||||
current_buffer->mark_active = tem;
|
||||
tem1 = B_ (current_buffer, mark_active);
|
||||
B_ (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 (current_buffer->mark_active))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
else if (!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
&& ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (bp->name))
|
||||
if (NILP (B_ (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 (current_buffer->case_fold_search)
|
||||
? current_buffer->case_canon_table : Qnil);
|
||||
= (!NILP (B_ (current_buffer, case_fold_search))
|
||||
? B_ (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 (bp1->name))
|
||||
if (NILP (B_ (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 (bp2->name))
|
||||
if (NILP (B_ (bp2, name)))
|
||||
error ("Selecting deleted buffer");
|
||||
}
|
||||
|
||||
|
@ -2627,7 +2627,7 @@ determines whether case is significant or ignored. */)
|
|||
|
||||
QUIT;
|
||||
|
||||
if (! NILP (bp1->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (bp2->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 current_buffer->undo_list = arg;
|
||||
return B_ (current_buffer, undo_list) = arg;
|
||||
}
|
||||
|
||||
static Lisp_Object
|
||||
subst_char_in_region_unwind_1 (Lisp_Object arg)
|
||||
{
|
||||
return current_buffer->filename = arg;
|
||||
return B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte_p = !NILP (B_ (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,
|
||||
current_buffer->undo_list);
|
||||
current_buffer->undo_list = Qt;
|
||||
B_ (current_buffer, undo_list));
|
||||
B_ (current_buffer, undo_list) = Qt;
|
||||
/* Don't do file-locking. */
|
||||
record_unwind_protect (subst_char_in_region_unwind_1,
|
||||
current_buffer->filename);
|
||||
current_buffer->filename = Qnil;
|
||||
B_ (current_buffer, filename));
|
||||
B_ (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 = current_buffer->undo_list;
|
||||
tem = B_ (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))
|
||||
current_buffer->undo_list = tem;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (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 (buf->pt_marker))
|
||||
if (buf && buf != current_buffer && !NILP (B_ (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 (current_buffer->case_fold_search))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters))
|
||||
&& ! ASCII_CHAR_P (i1))
|
||||
{
|
||||
MAKE_CHAR_MULTIBYTE (i1);
|
||||
}
|
||||
i2 = XFASTINT (c2);
|
||||
if (NILP (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters))
|
||||
&& ! ASCII_CHAR_P (i2))
|
||||
{
|
||||
MAKE_CHAR_MULTIBYTE (i2);
|
||||
|
|
174
src/fileio.c
174
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 = current_buffer->directory;
|
||||
default_directory = B_ (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, current_buffer->directory);
|
||||
absname = expand_and_dir_to_file (filename, B_ (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, current_buffer->directory);
|
||||
absname = expand_and_dir_to_file (filename, B_ (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, current_buffer->directory);
|
||||
absname = expand_and_dir_to_file (filename, B_ (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, current_buffer->directory);
|
||||
absname = Fexpand_file_name (filename, B_ (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, current_buffer->directory);
|
||||
absname = expand_and_dir_to_file (filename, B_ (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, current_buffer->directory);
|
||||
absname = Fexpand_file_name (filename, B_ (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, current_buffer->directory);
|
||||
absname = Fexpand_file_name (filename, B_ (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, current_buffer->directory);
|
||||
absname2 = expand_and_dir_to_file (file2, current_buffer->directory);
|
||||
absname1 = expand_and_dir_to_file (file1, B_ (current_buffer, directory));
|
||||
absname2 = expand_and_dir_to_file (file2, B_ (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. */
|
||||
current_buffer->enable_multibyte_characters = multibyte;
|
||||
current_buffer->undo_list = undo_list;
|
||||
B_ (current_buffer, enable_multibyte_characters) = multibyte;
|
||||
B_ (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 (current_buffer->read_only))
|
||||
if (!NILP (B_ (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);
|
||||
buf->directory = current_buffer->directory;
|
||||
buf->read_only = Qnil;
|
||||
buf->filename = Qnil;
|
||||
buf->undo_list = Qt;
|
||||
B_ (buf, directory) = B_ (current_buffer, directory);
|
||||
B_ (buf, read_only) = Qnil;
|
||||
B_ (buf, filename) = Qnil;
|
||||
B_ (buf, undo_list) = Qt;
|
||||
eassert (buf->overlays_before == NULL);
|
||||
eassert (buf->overlays_after == NULL);
|
||||
|
||||
set_buffer_internal (buf);
|
||||
Ferase_buffer ();
|
||||
buf->enable_multibyte_characters = Qnil;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
&& ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->file_truename)
|
||||
if (!NILP (B_ (current_buffer, file_truename))
|
||||
/* Make binding buffer-file-name to nil effective. */
|
||||
&& !NILP (current_buffer->filename)
|
||||
&& !NILP (B_ (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 (current_buffer->file_truename);
|
||||
unlock_file (B_ (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 (current_buffer->enable_multibyte_characters,
|
||||
Fcons (current_buffer->undo_list,
|
||||
unwind_data = Fcons (B_ (current_buffer, enable_multibyte_characters),
|
||||
Fcons (B_ (current_buffer, undo_list),
|
||||
Fcurrent_buffer ()));
|
||||
current_buffer->enable_multibyte_characters = Qnil;
|
||||
current_buffer->undo_list = Qt;
|
||||
B_ (current_buffer, enable_multibyte_characters) = Qnil;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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. */
|
||||
current_buffer->enable_multibyte_characters = Qnil;
|
||||
B_ (current_buffer, enable_multibyte_characters) = Qnil;
|
||||
}
|
||||
|
||||
coding.dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters);
|
||||
coding.dst_multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters));
|
||||
if (CODING_MAY_REQUIRE_DECODING (&coding)
|
||||
&& (inserted > 0 || CODING_REQUIRE_FLUSHING (&coding)))
|
||||
{
|
||||
|
@ -4124,24 +4124,24 @@ variable `last-coding-system-used' to the coding system actually used. */)
|
|||
|
||||
if (!NILP (visit))
|
||||
{
|
||||
if (!EQ (current_buffer->undo_list, Qt) && !nochange)
|
||||
current_buffer->undo_list = Qnil;
|
||||
if (!EQ (B_ (current_buffer, undo_list), Qt) && !nochange)
|
||||
B_ (current_buffer, undo_list) = Qnil;
|
||||
|
||||
if (NILP (handler))
|
||||
{
|
||||
current_buffer->modtime = st.st_mtime;
|
||||
current_buffer->modtime_size = st.st_size;
|
||||
current_buffer->filename = orig_filename;
|
||||
B_ (current_buffer, filename) = orig_filename;
|
||||
}
|
||||
|
||||
SAVE_MODIFF = MODIFF;
|
||||
BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF;
|
||||
XSETFASTINT (current_buffer->save_length, Z - BEG);
|
||||
XSETFASTINT (B_ (current_buffer, save_length), Z - BEG);
|
||||
#ifdef CLASH_DETECTION
|
||||
if (NILP (handler))
|
||||
{
|
||||
if (!NILP (current_buffer->file_truename))
|
||||
unlock_file (current_buffer->file_truename);
|
||||
if (!NILP (B_ (current_buffer, file_truename)))
|
||||
unlock_file (B_ (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 = current_buffer->undo_list;
|
||||
current_buffer->undo_list = Qt;
|
||||
old_undo = B_ (current_buffer, undo_list);
|
||||
B_ (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))
|
||||
{
|
||||
current_buffer->undo_list = old_undo;
|
||||
B_ (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. */
|
||||
current_buffer->undo_list = EQ (old_undo, Qt) ? Qt : Qnil;
|
||||
B_ (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 (current_buffer->filename,
|
||||
current_buffer->auto_save_file_name)))
|
||||
&& NILP (Fstring_equal (B_ (current_buffer, filename),
|
||||
B_ (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 = current_buffer->buffer_file_coding_system;
|
||||
val = B_ (current_buffer, buffer_file_coding_system);
|
||||
if (NILP (val)
|
||||
|| NILP (Flocal_variable_p (Qbuffer_file_coding_system, Qnil)))
|
||||
{
|
||||
val = Qnil;
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 = current_buffer->buffer_file_coding_system;
|
||||
val = B_ (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 (buffer_defaults.buffer_file_coding_system))
|
||||
&& ! NILP (B_ (&buffer_defaults, buffer_file_coding_system)))
|
||||
val = (coding_inherit_eol_type
|
||||
(val, buffer_defaults.buffer_file_coding_system));
|
||||
(val, B_ (&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 (current_buffer->selective_display))
|
||||
if (!STRINGP (start) && !NILP (B_ (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 (current_buffer->save_length, Z - BEG);
|
||||
current_buffer->filename = visit_file;
|
||||
XSETFASTINT (B_ (current_buffer, save_length), Z - BEG);
|
||||
B_ (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 (current_buffer->save_length, Z - BEG);
|
||||
current_buffer->filename = visit_file;
|
||||
XSETFASTINT (B_ (current_buffer, save_length), Z - BEG);
|
||||
B_ (current_buffer, filename) = visit_file;
|
||||
update_mode_lines++;
|
||||
}
|
||||
else if (quietly)
|
||||
{
|
||||
if (auto_saving
|
||||
&& ! NILP (Fstring_equal (current_buffer->filename,
|
||||
current_buffer->auto_save_file_name)))
|
||||
&& ! NILP (Fstring_equal (B_ (current_buffer, filename),
|
||||
B_ (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 (current_buffer->auto_save_file_format, Qt)))
|
||||
p = current_buffer->auto_save_file_format;
|
||||
if (auto_saving && (!EQ (B_ (current_buffer, auto_save_file_format), Qt)))
|
||||
p = B_ (current_buffer, auto_save_file_format);
|
||||
else
|
||||
p = current_buffer->file_format;
|
||||
p = B_ (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->filename)) return Qt;
|
||||
if (!STRINGP (B_ (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->filename,
|
||||
handler = Ffind_file_name_handler (B_ (b, filename),
|
||||
Qverify_visited_file_modtime);
|
||||
if (!NILP (handler))
|
||||
return call2 (handler, Qverify_visited_file_modtime, buf);
|
||||
|
||||
filename = ENCODE_FILE (b->filename);
|
||||
filename = ENCODE_FILE (B_ (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 (current_buffer->filename, Qnil);
|
||||
filename = Fexpand_file_name (B_ (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] = current_buffer->name;
|
||||
args[1] = B_ (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 (current_buffer->filename))
|
||||
if (! NILP (B_ (current_buffer, filename)))
|
||||
{
|
||||
if (stat (SSDATA (current_buffer->filename), &st) >= 0)
|
||||
if (stat (SSDATA (B_ (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 (current_buffer->filename),
|
||||
else if ((modes = Ffile_modes (B_ (current_buffer, filename)),
|
||||
INTEGERP (modes)))
|
||||
/* Remote files don't cooperate with stat. */
|
||||
auto_save_mode_bits = XINT (modes) | 0600;
|
||||
}
|
||||
|
||||
return
|
||||
Fwrite_region (Qnil, Qnil, current_buffer->auto_save_file_name, Qnil,
|
||||
Fwrite_region (Qnil, Qnil, B_ (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->auto_save_file_name)
|
||||
if (STRINGP (B_ (b, auto_save_file_name))
|
||||
&& stream != NULL && do_handled_files == 0)
|
||||
{
|
||||
BLOCK_INPUT;
|
||||
if (!NILP (b->filename))
|
||||
if (!NILP (B_ (b, filename)))
|
||||
{
|
||||
fwrite (SDATA (b->filename), 1,
|
||||
SBYTES (b->filename), stream);
|
||||
fwrite (SDATA (B_ (b, filename)), 1,
|
||||
SBYTES (B_ (b, filename)), stream);
|
||||
}
|
||||
putc ('\n', stream);
|
||||
fwrite (SDATA (b->auto_save_file_name), 1,
|
||||
SBYTES (b->auto_save_file_name), stream);
|
||||
fwrite (SDATA (B_ (b, auto_save_file_name)), 1,
|
||||
SBYTES (B_ (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->auto_save_file_name)
|
||||
if (STRINGP (B_ (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->save_length) >= 0
|
||||
&& XINT (B_ (b, save_length)) >= 0
|
||||
&& (do_handled_files
|
||||
|| NILP (Ffind_file_name_handler (b->auto_save_file_name,
|
||||
|| NILP (Ffind_file_name_handler (B_ (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->save_length) * 10
|
||||
&& (XFASTINT (B_ (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->save_length) > 5000
|
||||
&& XFASTINT (B_ (b, save_length)) > 5000
|
||||
/* These messages are frequent and annoying for `*mail*'. */
|
||||
&& !EQ (b->filename, Qnil)
|
||||
&& !EQ (B_ (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->name, 1);
|
||||
B_ (b, name), 1);
|
||||
minibuffer_auto_raise = 0;
|
||||
/* Turn off auto-saving until there's a real save,
|
||||
and prevent any more warnings. */
|
||||
XSETINT (b->save_length, -1);
|
||||
XSETINT (B_ (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 (current_buffer->save_length, Z - BEG);
|
||||
XSETFASTINT (B_ (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 (current_buffer->save_length, Z - BEG);
|
||||
XSETFASTINT (B_ (current_buffer, save_length), Z - BEG);
|
||||
current_buffer->auto_save_failure_time = -1;
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
@ -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->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
|
||||
if (STRINGP (B_ (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
|
||||
{
|
||||
unlock_file(b->file_truename);
|
||||
unlock_file(B_ (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 = current_buffer->file_truename;
|
||||
file = B_ (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 (current_buffer->file_truename))
|
||||
unlock_file (current_buffer->file_truename);
|
||||
&& STRINGP (B_ (current_buffer, file_truename)))
|
||||
unlock_file (B_ (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 (buffer->file_truename))
|
||||
unlock_file (buffer->file_truename);
|
||||
&& STRINGP (B_ (buffer, file_truename)))
|
||||
unlock_file (B_ (buffer, file_truename));
|
||||
}
|
||||
|
||||
DEFUN ("file-locked-p", Ffile_locked_p, Sfile_locked_p, 1, 1, 0,
|
||||
|
|
12
src/fns.c
12
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 (current_buffer->enable_multibyte_characters));
|
||||
!NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (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 = XBUFFER (object)->buffer_file_coding_system;
|
||||
coding_system = B_ (XBUFFER (object), buffer_file_coding_system);
|
||||
if (NILP (coding_system)
|
||||
|| NILP (Flocal_variable_p (Qbuffer_file_coding_system, Qnil)))
|
||||
{
|
||||
coding_system = Qnil;
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (XBUFFER (object)->buffer_file_coding_system))
|
||||
&& !NILP (B_ (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 = XBUFFER (object)->buffer_file_coding_system;
|
||||
coding_system = B_ (XBUFFER (object), buffer_file_coding_system);
|
||||
}
|
||||
|
||||
if (!force_raw_text
|
||||
|
|
|
@ -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 (current_buffer->enable_multibyte_characters)
|
||||
? ! NILP (B_ (current_buffer, enable_multibyte_characters))
|
||||
: STRING_MULTIBYTE (string));
|
||||
if (c < 0)
|
||||
{
|
||||
|
|
|
@ -1817,7 +1817,7 @@ make_frame_visible_1 (Lisp_Object window)
|
|||
w = XWINDOW (window);
|
||||
|
||||
if (!NILP (w->buffer))
|
||||
XBUFFER (w->buffer)->display_time = Fcurrent_time ();
|
||||
B_ (XBUFFER (w->buffer), display_time) = Fcurrent_time ();
|
||||
|
||||
if (!NILP (w->vchild))
|
||||
make_frame_visible_1 (w->vchild);
|
||||
|
|
18
src/fringe.c
18
src/fringe.c
|
@ -660,7 +660,7 @@ get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor)
|
|||
{
|
||||
Lisp_Object cmap, bm = Qnil;
|
||||
|
||||
if ((cmap = XBUFFER (w->buffer)->fringe_cursor_alist), !NILP (cmap))
|
||||
if ((cmap = B_ (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, buffer_defaults.fringe_cursor_alist))
|
||||
if (EQ (cmap, B_ (&buffer_defaults, fringe_cursor_alist)))
|
||||
return NO_FRINGE_BITMAP;
|
||||
bm = Fassq (cursor, buffer_defaults.fringe_cursor_alist);
|
||||
bm = Fassq (cursor, B_ (&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 = XBUFFER (w->buffer)->fringe_indicator_alist), !NILP (cmap))
|
||||
if ((cmap = B_ (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, buffer_defaults.fringe_indicator_alist)
|
||||
&& !NILP (buffer_defaults.fringe_indicator_alist))
|
||||
if (!EQ (cmap, B_ (&buffer_defaults, fringe_indicator_alist))
|
||||
&& !NILP (B_ (&buffer_defaults, fringe_indicator_alist)))
|
||||
{
|
||||
bm2 = Fassq (bitmap, buffer_defaults.fringe_indicator_alist);
|
||||
bm2 = Fassq (bitmap, B_ (&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 = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind)))
|
||||
&& (ind = B_ (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 = XBUFFER (w->buffer)->indicate_empty_lines;
|
||||
empty_pos = B_ (XBUFFER (w->buffer), indicate_empty_lines);
|
||||
if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
|
||||
empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
|
||||
|
||||
|
|
62
src/indent.c
62
src/indent.c
|
@ -70,7 +70,7 @@ buffer_display_table (void)
|
|||
{
|
||||
Lisp_Object thisbuf;
|
||||
|
||||
thisbuf = current_buffer->display_table;
|
||||
thisbuf = B_ (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 (buf->width_table))
|
||||
buf->width_table = Fmake_vector (make_number (256), make_number (0));
|
||||
widthtab = XVECTOR (buf->width_table);
|
||||
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 (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 (current_buffer->cache_long_line_scans)
|
||||
if (NILP (B_ (current_buffer, cache_long_line_scans))
|
||||
/* And, for the moment, this feature doesn't work on multibyte
|
||||
characters. */
|
||||
|| !NILP (current_buffer->enable_multibyte_characters))
|
||||
|| !NILP (B_ (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;
|
||||
current_buffer->width_table = Qnil;
|
||||
B_ (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 (current_buffer->tab_width);
|
||||
int ctl_arrow = !NILP (current_buffer->ctl_arrow);
|
||||
register int tab_width = XINT (B_ (current_buffer, tab_width));
|
||||
int ctl_arrow = !NILP (B_ (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 (current_buffer->selective_display, Qt)))
|
||||
&& EQ (B_ (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 (current_buffer->tab_width);
|
||||
register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
|
||||
register EMACS_INT tab_width = XINT (B_ (current_buffer, tab_width));
|
||||
register int ctl_arrow = !NILP (B_ (current_buffer, ctl_arrow));
|
||||
register struct Lisp_Char_Table *dp = buffer_display_table ();
|
||||
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (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 (current_buffer->selective_display, Qt))
|
||||
if (c == '\r' && EQ (B_ (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 (current_buffer->selective_display, Qt))
|
||||
if (c == '\r' && EQ (B_ (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 (current_buffer->tab_width);
|
||||
register int tab_width = XINT (B_ (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 (current_buffer->tab_width);
|
||||
register EMACS_INT tab_width = XINT (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
|| NILP (B_ (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 (current_buffer->tab_width);
|
||||
register int ctl_arrow = !NILP (current_buffer->ctl_arrow);
|
||||
register EMACS_INT tab_width = XFASTINT (B_ (current_buffer, tab_width));
|
||||
register int ctl_arrow = !NILP (B_ (current_buffer, ctl_arrow));
|
||||
register struct Lisp_Char_Table *dp = window_display_table (win);
|
||||
int selective
|
||||
= (INTEGERP (current_buffer->selective_display)
|
||||
? XINT (current_buffer->selective_display)
|
||||
: !NILP (current_buffer->selective_display) ? -1 : 0);
|
||||
= (INTEGERP (B_ (current_buffer, selective_display))
|
||||
? XINT (B_ (current_buffer, selective_display))
|
||||
: !NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (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 (current_buffer->width_table)
|
||||
? XVECTOR (current_buffer->width_table)->contents
|
||||
width_table = (VECTORP (B_ (current_buffer, width_table))
|
||||
? XVECTOR (B_ (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 (current_buffer->truncate_lines))
|
||||
|| !NILP (B_ (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 (current_buffer->selective_display)
|
||||
? XINT (current_buffer->selective_display)
|
||||
: !NILP (current_buffer->selective_display) ? -1 : 0);
|
||||
= (INTEGERP (B_ (current_buffer, selective_display))
|
||||
? XINT (B_ (current_buffer, selective_display))
|
||||
: !NILP (B_ (current_buffer, selective_display)) ? -1 : 0);
|
||||
Lisp_Object window;
|
||||
EMACS_INT start_hpos = 0;
|
||||
int did_motion;
|
||||
|
|
56
src/insdel.c
56
src/insdel.c
|
@ -78,7 +78,7 @@ void
|
|||
check_markers (void)
|
||||
{
|
||||
register struct Lisp_Marker *tail;
|
||||
int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters));
|
||||
! NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
outgoing_nbytes = nchars;
|
||||
else if (NILP (buf->enable_multibyte_characters))
|
||||
else if (NILP (B_ (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 (buf->enable_multibyte_characters),
|
||||
! NILP (current_buffer->enable_multibyte_characters));
|
||||
! NILP (B_ (buf, enable_multibyte_characters)),
|
||||
! NILP (B_ (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 (buf->enable_multibyte_characters),
|
||||
! NILP (current_buffer->enable_multibyte_characters));
|
||||
! NILP (B_ (buf, enable_multibyte_characters)),
|
||||
! NILP (B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (! EQ (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (! EQ (B_ (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 (current_buffer->enable_multibyte_characters));
|
||||
! NILP (B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (! EQ (B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (ret_string || ! EQ (B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (! EQ (B_ (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;
|
||||
|
||||
buffer->point_before_scroll = Qnil;
|
||||
B_ (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 (current_buffer->read_only))
|
||||
if (!NILP (B_ (current_buffer, read_only)))
|
||||
Fbarf_if_buffer_read_only ();
|
||||
|
||||
/* Let redisplay consider other windows than selected_window
|
||||
|
@ -2022,11 +2022,11 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end,
|
|||
base_buffer = current_buffer;
|
||||
|
||||
#ifdef CLASH_DETECTION
|
||||
if (!NILP (base_buffer->file_truename)
|
||||
if (!NILP (B_ (base_buffer, file_truename))
|
||||
/* Make binding buffer-file-name to nil effective. */
|
||||
&& !NILP (base_buffer->filename)
|
||||
&& !NILP (B_ (base_buffer, filename))
|
||||
&& SAVE_MODIFF >= MODIFF)
|
||||
lock_file (base_buffer->file_truename);
|
||||
lock_file (B_ (base_buffer, file_truename));
|
||||
#else
|
||||
/* At least warn if this file has changed on disk since it was visited. */
|
||||
if (!NILP (base_buffer->filename)
|
||||
|
@ -2038,16 +2038,16 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end,
|
|||
#endif /* not CLASH_DETECTION */
|
||||
|
||||
/* If `select-active-regions' is non-nil, save the region text. */
|
||||
if (!NILP (current_buffer->mark_active)
|
||||
if (!NILP (B_ (current_buffer, mark_active))
|
||||
&& !inhibit_modification_hooks
|
||||
&& XMARKER (current_buffer->mark)->buffer
|
||||
&& XMARKER (B_ (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 (current_buffer->mark)->charpos;
|
||||
EMACS_INT b = XMARKER (B_ (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 (XBUFFER (combine_after_change_buffer)->name))
|
||||
|| NILP (B_ (XBUFFER (combine_after_change_buffer), name)))
|
||||
{
|
||||
combine_after_change_list = Qnil;
|
||||
return Qnil;
|
||||
|
|
|
@ -1978,7 +1978,7 @@ set_point_both (EMACS_INT charpos, EMACS_INT bytepos)
|
|||
int have_overlays;
|
||||
EMACS_INT original_position;
|
||||
|
||||
current_buffer->point_before_scroll = Qnil;
|
||||
B_ (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 buffer->keymap;
|
||||
return B_ (buffer, keymap);
|
||||
}
|
||||
|
||||
/* Produce an interval tree reflecting the intervals in
|
||||
|
|
|
@ -236,9 +236,9 @@ struct interval
|
|||
and 2 if it is invisible but with an ellipsis. */
|
||||
|
||||
#define TEXT_PROP_MEANS_INVISIBLE(prop) \
|
||||
(EQ (current_buffer->invisibility_spec, Qt) \
|
||||
(EQ (B_ (current_buffer, invisibility_spec), Qt) \
|
||||
? !NILP (prop) \
|
||||
: invisible_p (prop, current_buffer->invisibility_spec))
|
||||
: invisible_p (prop, B_ (current_buffer, invisibility_spec)))
|
||||
|
||||
/* Declared in alloc.c */
|
||||
|
||||
|
|
|
@ -1577,7 +1577,7 @@ command_loop_1 (void)
|
|||
this_single_command_key_start = 0;
|
||||
}
|
||||
|
||||
if (!NILP (current_buffer->mark_active)
|
||||
if (!NILP (B_ (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 (current_buffer->mark)->buffer
|
||||
&& XMARKER (B_ (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 (current_buffer->mark));
|
||||
XINT (Fmarker_position (B_ (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 (current_buffer->enable_multibyte_characters));
|
||||
! NILP (B_ (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 (current_buffer->downcase_table)->size)
|
||||
< XCHAR_TABLE (B_ (current_buffer, downcase_table))->size)
|
||||
&& UPPERCASEP (KEY_TO_CHAR (key))))
|
||||
{
|
||||
Lisp_Object new_key
|
||||
|
|
12
src/keymap.c
12
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 = current_buffer->keymap;
|
||||
map = B_ (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);
|
||||
|
||||
current_buffer->keymap = keymap;
|
||||
B_ (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 current_buffer->keymap;
|
||||
return B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
|| (NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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, XBUFFER (buffer)->keymap))
|
||||
if (EQ (start1, B_ (XBUFFER (buffer), keymap)))
|
||||
describe_map_tree (start1, 1, shadow, prefix,
|
||||
"\f\nMajor Mode Bindings", nomenu, 0, 0, 0);
|
||||
else
|
||||
|
|
|
@ -1882,7 +1882,7 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
|
|||
#define DEFVAR_BUFFER_DEFAULTS(lname, vname, doc) \
|
||||
do { \
|
||||
static struct Lisp_Objfwd o_fwd; \
|
||||
defvar_lisp_nopro (&o_fwd, lname, &buffer_defaults.vname); \
|
||||
defvar_lisp_nopro (&o_fwd, lname, &buffer_defaults.vname ## _); \
|
||||
} while (0)
|
||||
|
||||
#define DEFVAR_KBOARD(lname, vname, doc) \
|
||||
|
@ -2047,11 +2047,11 @@ extern Lisp_Object case_temp2;
|
|||
|
||||
/* Current buffer's map from characters to lower-case characters. */
|
||||
|
||||
#define DOWNCASE_TABLE current_buffer->downcase_table
|
||||
#define DOWNCASE_TABLE B_ (current_buffer, downcase_table)
|
||||
|
||||
/* Current buffer's map from characters to upper-case characters. */
|
||||
|
||||
#define UPCASE_TABLE current_buffer->upcase_table
|
||||
#define UPCASE_TABLE B_ (current_buffer, upcase_table)
|
||||
|
||||
/* Downcase a character, or make no change if that cannot be done. */
|
||||
|
||||
|
|
16
src/lread.c
16
src/lread.c
|
@ -210,7 +210,7 @@ readchar (Lisp_Object readcharfun, int *multibyte)
|
|||
if (pt_byte >= BUF_ZV_BYTE (inbuffer))
|
||||
return -1;
|
||||
|
||||
if (! NILP (inbuffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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 (inbuffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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->enable_multibyte_characters))
|
||||
if (! NILP (B_ (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, current_buffer->directory);
|
||||
filename = Fexpand_file_name (filename, B_ (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->name))
|
||||
if (b != 0 && NILP (B_ (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 = XBUFFER (buf)->filename;
|
||||
filename = B_ (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, XBUFFER (cbuf)->filename, Feval,
|
||||
readevalloop (cbuf, 0, B_ (XBUFFER (cbuf), filename), Feval,
|
||||
!NILP (printflag), Qnil, read_function,
|
||||
start, end);
|
||||
|
||||
|
|
12
src/marker.c
12
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 (XBUFFER (buf)->name));
|
||||
eassert (!NILP (B_ (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->name, Qnil))
|
||||
if (EQ (B_ (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->name, Qnil))
|
||||
if (EQ (B_ (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->name, Qnil))
|
||||
if (EQ (B_ (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->name, Qnil))
|
||||
if (EQ (B_ (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->name, Qnil))
|
||||
if (EQ (B_ (b, name), Qnil))
|
||||
abort ();
|
||||
|
||||
marker->buffer = 0;
|
||||
|
|
|
@ -415,7 +415,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
|
|||
CHECK_STRING (initial);
|
||||
}
|
||||
val = Qnil;
|
||||
ambient_dir = current_buffer->directory;
|
||||
ambient_dir = B_ (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 = current_buffer->enable_multibyte_characters;
|
||||
enable_multibyte = B_ (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)
|
||||
current_buffer->enable_multibyte_characters = enable_multibyte;
|
||||
B_ (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))
|
||||
current_buffer->directory = ambient_dir;
|
||||
B_ (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 (XBUFFER (other_buf)->directory))
|
||||
if (STRINGP (B_ (XBUFFER (other_buf), directory)))
|
||||
{
|
||||
current_buffer->directory = XBUFFER (other_buf)->directory;
|
||||
B_ (current_buffer, directory) = B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (!NILP (B_ (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);
|
||||
current_buffer->keymap = map;
|
||||
B_ (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. */
|
||||
current_buffer->undo_list = Qnil;
|
||||
B_ (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 (XBUFFER (buf)->name))
|
||||
if (NILP (buf) || NILP (B_ (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 = XBUFFER (def)->name;
|
||||
def = B_ (XBUFFER (def), name);
|
||||
|
||||
specbind (Qcompletion_ignore_case,
|
||||
read_buffer_completion_ignore_case ? Qt : Qnil);
|
||||
|
|
40
src/print.c
40
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 (current_buffer->enable_multibyte_characters); \
|
||||
int multibyte = !NILP (B_ (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 (current_buffer->enable_multibyte_characters) \
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)) \
|
||||
&& ! print_escape_multibyte) \
|
||||
specbind (Qprint_escape_multibyte, Qt); \
|
||||
if (! NILP (current_buffer->enable_multibyte_characters) \
|
||||
if (! NILP (B_ (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 (current_buffer->enable_multibyte_characters)) \
|
||||
&& NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
= !NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
= !NILP (B_ (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 (buffer_defaults.enable_multibyte_characters)
|
||||
: ! NILP (current_buffer->enable_multibyte_characters)))
|
||||
? ! NILP (B_ (&buffer_defaults, enable_multibyte_characters))
|
||||
: ! NILP (B_ (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);
|
||||
current_buffer->directory = old->directory;
|
||||
current_buffer->read_only = Qnil;
|
||||
current_buffer->filename = Qnil;
|
||||
current_buffer->undo_list = Qt;
|
||||
B_ (current_buffer, directory) = B_ (old, directory);
|
||||
B_ (current_buffer, read_only) = Qnil;
|
||||
B_ (current_buffer, filename) = Qnil;
|
||||
B_ (current_buffer, undo_list) = Qt;
|
||||
eassert (current_buffer->overlays_before == NULL);
|
||||
eassert (current_buffer->overlays_after == NULL);
|
||||
current_buffer->enable_multibyte_characters
|
||||
= buffer_defaults.enable_multibyte_characters;
|
||||
B_ (current_buffer, enable_multibyte_characters)
|
||||
= B_ (&buffer_defaults, enable_multibyte_characters);
|
||||
specbind (Qinhibit_read_only, Qt);
|
||||
specbind (Qinhibit_modification_hooks, Qt);
|
||||
Ferase_buffer ();
|
||||
|
@ -1854,7 +1854,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 (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun);
|
||||
print_string (B_ (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun);
|
||||
}
|
||||
PRINTCHAR ('>');
|
||||
}
|
||||
|
@ -1955,16 +1955,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
|
|||
}
|
||||
else if (BUFFERP (obj))
|
||||
{
|
||||
if (NILP (XBUFFER (obj)->name))
|
||||
if (NILP (B_ (XBUFFER (obj), name)))
|
||||
strout ("#<killed buffer>", -1, -1, printcharfun, 0);
|
||||
else if (escapeflag)
|
||||
{
|
||||
strout ("#<buffer ", -1, -1, printcharfun, 0);
|
||||
print_string (XBUFFER (obj)->name, printcharfun);
|
||||
print_string (B_ (XBUFFER (obj), name), printcharfun);
|
||||
PRINTCHAR ('>');
|
||||
}
|
||||
else
|
||||
print_string (XBUFFER (obj)->name, printcharfun);
|
||||
print_string (B_ (XBUFFER (obj), name), printcharfun);
|
||||
}
|
||||
else if (WINDOW_CONFIGURATIONP (obj))
|
||||
{
|
||||
|
@ -2076,7 +2076,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 (XMARKER (obj)->buffer->name, printcharfun);
|
||||
print_string (B_ (XMARKER (obj)->buffer, name), printcharfun);
|
||||
}
|
||||
PRINTCHAR ('>');
|
||||
break;
|
||||
|
@ -2091,7 +2091,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 (XMARKER (OVERLAY_START (obj))->buffer->name,
|
||||
print_string (B_ (XMARKER (OVERLAY_START (obj))->buffer, name),
|
||||
printcharfun);
|
||||
}
|
||||
PRINTCHAR ('>');
|
||||
|
|
|
@ -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 (XBUFFER (obj)->name));
|
||||
error ("Buffer %s has no process", SDATA (B_ (XBUFFER (obj), name)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1283,12 +1283,12 @@ list_processes_1 (Lisp_Object query_only)
|
|||
w_proc = i;
|
||||
if (!NILP (p->buffer))
|
||||
{
|
||||
if (NILP (XBUFFER (p->buffer)->name))
|
||||
if (NILP (B_ (XBUFFER (p->buffer), name)))
|
||||
{
|
||||
if (w_buffer < 8)
|
||||
w_buffer = 8; /* (Killed) */
|
||||
}
|
||||
else if ((i = SCHARS (XBUFFER (p->buffer)->name), (i > w_buffer)))
|
||||
else if ((i = SCHARS (B_ (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));
|
||||
current_buffer->undo_list = Qt;
|
||||
B_ (current_buffer, undo_list) = Qt;
|
||||
|
||||
current_buffer->truncate_lines = Qt;
|
||||
B_ (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 (XBUFFER (p->buffer)->name))
|
||||
else if (NILP (B_ (XBUFFER (p->buffer), name)))
|
||||
insert_string ("(Killed)");
|
||||
else
|
||||
Finsert (1, &XBUFFER (p->buffer)->name);
|
||||
Finsert (1, &B_ (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 = current_buffer->directory;
|
||||
current_dir = B_ (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 (current_buffer->directory, Qnil));
|
||||
Fcons (B_ (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 (XBUFFER (buffer)->enable_multibyte_characters))
|
||||
|| (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)))
|
||||
else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters)))
|
||||
|| (NILP (buffer) && NILP (B_ (&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 (XBUFFER (buffer)->enable_multibyte_characters))
|
||||
|| (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)))
|
||||
else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters)))
|
||||
|| (NILP (buffer) && NILP (B_ (&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 (XBUFFER (buffer)->enable_multibyte_characters))
|
||||
|| (NILP (buffer) && NILP (buffer_defaults.enable_multibyte_characters)))
|
||||
else if ((!NILP (buffer) && NILP (B_ (XBUFFER (buffer), enable_multibyte_characters)))
|
||||
|| (NILP (buffer) && NILP (B_ (&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 (current_buffer->enable_multibyte_characters))
|
||||
else if (NILP (B_ (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 = current_buffer->keymap;
|
||||
okeymap = B_ (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 (XBUFFER (p->buffer)->name))
|
||||
else if (!NILP (p->buffer) && !NILP (B_ (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 = current_buffer->read_only;
|
||||
old_read_only = B_ (current_buffer, read_only);
|
||||
old_begv = BEGV;
|
||||
old_zv = ZV;
|
||||
old_begv_byte = BEGV_BYTE;
|
||||
old_zv_byte = ZV_BYTE;
|
||||
|
||||
current_buffer->read_only = Qnil;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
if (NILP (B_ (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));
|
||||
|
||||
|
||||
current_buffer->read_only = old_read_only;
|
||||
B_ (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 (XBUFFER (object)->enable_multibyte_characters))
|
||||
&& !NILP (B_ (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 = current_buffer->keymap;
|
||||
okeymap = B_ (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 (XBUFFER (buffer)->name))
|
||||
if (NILP (B_ (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 = current_buffer->read_only;
|
||||
current_buffer->read_only = Qnil;
|
||||
tem = B_ (current_buffer, read_only);
|
||||
B_ (current_buffer, read_only) = Qnil;
|
||||
insert_string ("\nProcess ");
|
||||
Finsert (1, &p->name);
|
||||
insert_string (" ");
|
||||
Finsert (1, &msg);
|
||||
current_buffer->read_only = tem;
|
||||
B_ (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 (XBUFFER (p->buffer)->enable_multibyte_characters))
|
||||
if (NILP (B_ (XBUFFER (p->buffer), enable_multibyte_characters)))
|
||||
coding_system = raw_text_coding_system (coding_system);
|
||||
}
|
||||
setup_coding_system (coding_system, proc_decode_coding_system[inch]);
|
||||
|
|
48
src/search.c
48
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 ? current_buffer->syntax_table : Qt;
|
||||
cp->syntax_table = cp->buf.used_syntax ? B_ (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, current_buffer->syntax_table))
|
||||
|| EQ (cp->syntax_table, B_ (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 (current_buffer->case_canon_table)->extras[2]
|
||||
= current_buffer->case_eqv_table;
|
||||
XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2]
|
||||
= B_ (current_buffer, case_eqv_table);
|
||||
|
||||
CHECK_STRING (string);
|
||||
bufp = compile_pattern (string,
|
||||
(NILP (Vinhibit_changing_match_data)
|
||||
? &search_regs : NULL),
|
||||
(!NILP (current_buffer->case_fold_search)
|
||||
? current_buffer->case_canon_table : Qnil),
|
||||
(!NILP (B_ (current_buffer, case_fold_search))
|
||||
? B_ (current_buffer, case_canon_table) : Qnil),
|
||||
posix,
|
||||
!NILP (current_buffer->enable_multibyte_characters));
|
||||
!NILP (B_ (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 (current_buffer->case_canon_table)->extras[2]
|
||||
= current_buffer->case_eqv_table;
|
||||
XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2]
|
||||
= B_ (current_buffer, case_eqv_table);
|
||||
|
||||
bufp = compile_pattern (regexp,
|
||||
(NILP (Vinhibit_changing_match_data)
|
||||
? &search_regs : NULL),
|
||||
(!NILP (current_buffer->case_fold_search)
|
||||
? current_buffer->case_canon_table : Qnil),
|
||||
(!NILP (B_ (current_buffer, case_fold_search))
|
||||
? B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
multibyte = ! NILP (B_ (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 (buf->cache_long_line_scans))
|
||||
if (NILP (B_ (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 (current_buffer->case_canon_table)->extras[2]
|
||||
= current_buffer->case_eqv_table;
|
||||
XCHAR_TABLE (B_ (current_buffer, case_canon_table))->extras[2]
|
||||
= B_ (current_buffer, case_eqv_table);
|
||||
|
||||
np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE,
|
||||
(!NILP (current_buffer->case_fold_search)
|
||||
? current_buffer->case_canon_table
|
||||
(!NILP (B_ (current_buffer, case_fold_search))
|
||||
? B_ (current_buffer, case_canon_table)
|
||||
: Qnil),
|
||||
(!NILP (current_buffer->case_fold_search)
|
||||
? current_buffer->case_eqv_table
|
||||
(!NILP (B_ (current_buffer, case_fold_search))
|
||||
? B_ (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 (current_buffer->enable_multibyte_characters));
|
||||
!NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = ! NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
int buf_multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters));
|
||||
int str_multibyte = STRING_MULTIBYTE (newtext);
|
||||
Lisp_Object rev_tbl;
|
||||
int really_changed = 0;
|
||||
|
|
16
src/syntax.c
16
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 = current_buffer->syntax_table;
|
||||
gl_state.current_syntax_table = B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (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 current_buffer->syntax_table;
|
||||
return B_ (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);
|
||||
current_buffer->syntax_table = table;
|
||||
B_ (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 = current_buffer->syntax_table;
|
||||
syntax_table = B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
multibyte = (!NILP (B_ (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 (current_buffer->enable_multibyte_characters)
|
||||
multibyte = (!NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
if (! NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
DEC_POS (temp_pos);
|
||||
else
|
||||
temp_pos--;
|
||||
|
|
|
@ -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 buffer_defaults.syntax_table
|
||||
#define Vstandard_syntax_table B_ (&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 current_buffer->syntax_table
|
||||
# define CURRENT_SYNTAX_TABLE B_ (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 = current_buffer->syntax_table; \
|
||||
gl_state.current_syntax_table = B_ (current_buffer, syntax_table); \
|
||||
} while (0)
|
||||
|
||||
/* This macro should be called with FROM at the start of forward
|
||||
|
|
62
src/undo.c
62
src/undo.c
|
@ -73,12 +73,12 @@ record_point (EMACS_INT pt)
|
|||
Fundo_boundary ();
|
||||
last_undo_buffer = current_buffer;
|
||||
|
||||
if (CONSP (current_buffer->undo_list))
|
||||
if (CONSP (B_ (current_buffer, undo_list)))
|
||||
{
|
||||
/* Set AT_BOUNDARY to 1 only when we have nothing other than
|
||||
marker adjustment before undo boundary. */
|
||||
|
||||
Lisp_Object tail = current_buffer->undo_list, elt;
|
||||
Lisp_Object tail = B_ (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)
|
||||
current_buffer->undo_list
|
||||
= Fcons (make_number (last_boundary_position), current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list)
|
||||
= Fcons (make_number (last_boundary_position), B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (EQ (B_ (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 (current_buffer->undo_list))
|
||||
if (CONSP (B_ (current_buffer, undo_list)))
|
||||
{
|
||||
Lisp_Object elt;
|
||||
elt = XCAR (current_buffer->undo_list);
|
||||
elt = XCAR (B_ (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);
|
||||
current_buffer->undo_list = Fcons (Fcons (lbeg, lend),
|
||||
current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list) = Fcons (Fcons (lbeg, lend),
|
||||
B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (EQ (B_ (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);
|
||||
}
|
||||
|
||||
current_buffer->undo_list
|
||||
= Fcons (Fcons (string, sbeg), current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list)
|
||||
= Fcons (Fcons (string, sbeg), B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (EQ (B_ (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;
|
||||
|
||||
current_buffer->undo_list
|
||||
B_ (current_buffer, undo_list)
|
||||
= Fcons (Fcons (marker, make_number (adjustment)),
|
||||
current_buffer->undo_list);
|
||||
B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (EQ (B_ (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);
|
||||
current_buffer->undo_list = Fcons (Fcons (Qt, Fcons (high, low)), current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list) = Fcons (Fcons (Qt, Fcons (high, low)), B_ (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 (buf->undo_list, Qt))
|
||||
if (EQ (B_ (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))));
|
||||
current_buffer->undo_list = Fcons (entry, current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list) = Fcons (entry, B_ (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 (current_buffer->undo_list, Qt))
|
||||
if (EQ (B_ (current_buffer, undo_list), Qt))
|
||||
return Qnil;
|
||||
tem = Fcar (current_buffer->undo_list);
|
||||
tem = Fcar (B_ (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, current_buffer->undo_list);
|
||||
current_buffer->undo_list = pending_boundary;
|
||||
XSETCDR (pending_boundary, B_ (current_buffer, undo_list));
|
||||
B_ (current_buffer, undo_list) = pending_boundary;
|
||||
pending_boundary = Qnil;
|
||||
}
|
||||
else
|
||||
current_buffer->undo_list = Fcons (Qnil, current_buffer->undo_list);
|
||||
B_ (current_buffer, undo_list) = Fcons (Qnil, B_ (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->undo_list;
|
||||
list = B_ (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->undo_list = Qnil;
|
||||
B_ (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 (current_buffer->read_only))
|
||||
if (NILP (B_ (current_buffer, read_only)))
|
||||
specbind (Qinhibit_read_only, Qt);
|
||||
|
||||
/* Don't let `intangible' properties interfere with undo. */
|
||||
specbind (Qinhibit_point_motion_hooks, Qt);
|
||||
|
||||
oldlist = current_buffer->undo_list;
|
||||
oldlist = B_ (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, current_buffer->undo_list))
|
||||
current_buffer->undo_list
|
||||
= Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list);
|
||||
&& EQ (oldlist, B_ (current_buffer, undo_list)))
|
||||
B_ (current_buffer, undo_list)
|
||||
= Fcons (list3 (Qapply, Qcdr, Qnil), B_ (current_buffer, undo_list));
|
||||
|
||||
UNGCPRO;
|
||||
return unbind_to (count, list);
|
||||
|
|
60
src/window.c
60
src/window.c
|
@ -1359,8 +1359,8 @@ window_display_table (struct window *w)
|
|||
{
|
||||
struct buffer *b = XBUFFER (w->buffer);
|
||||
|
||||
if (DISP_TABLE_P (b->display_table))
|
||||
dp = XCHAR_TABLE (b->display_table);
|
||||
if (DISP_TABLE_P (B_ (b, display_table)))
|
||||
dp = XCHAR_TABLE (B_ (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->last_selected_window)
|
||||
&& w != XWINDOW (b->last_selected_window)
|
||||
&& EQ (buf, XWINDOW (b->last_selected_window)->buffer)))
|
||||
&& !(WINDOWP (B_ (b, last_selected_window))
|
||||
&& w != XWINDOW (B_ (b, last_selected_window))
|
||||
&& EQ (buf, XWINDOW (B_ (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->last_selected_window)
|
||||
&& w == XWINDOW (b->last_selected_window))
|
||||
b->last_selected_window = Qnil;
|
||||
if (WINDOWP (B_ (b, last_selected_window))
|
||||
&& w == XWINDOW (B_ (b, last_selected_window)))
|
||||
B_ (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 (XBUFFER (w->buffer)->name))
|
||||
&& NILP (B_ (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 (XBUFFER (w->buffer)->mode_line_format))
|
||||
&& !NILP (B_ (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->last_selected_window = window;
|
||||
B_ (b, last_selected_window) = window;
|
||||
|
||||
/* Let redisplay errors through. */
|
||||
b->display_error_modiff = 0;
|
||||
|
||||
/* Update time stamps of buffer display. */
|
||||
if (INTEGERP (b->display_count))
|
||||
XSETINT (b->display_count, XINT (b->display_count) + 1);
|
||||
b->display_time = Fcurrent_time ();
|
||||
if (INTEGERP (B_ (b, display_count)))
|
||||
XSETINT (B_ (b, display_count), XINT (B_ (b, display_count)) + 1);
|
||||
B_ (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->left_fringe_width, b->right_fringe_width,
|
||||
b->fringes_outside_margins);
|
||||
B_ (b, left_fringe_width), B_ (b, right_fringe_width),
|
||||
B_ (b, fringes_outside_margins));
|
||||
|
||||
Fset_window_scroll_bars (window,
|
||||
b->scroll_bar_width,
|
||||
b->vertical_scroll_bar_type, Qnil);
|
||||
B_ (b, scroll_bar_width),
|
||||
B_ (b, vertical_scroll_bar_type), Qnil);
|
||||
|
||||
w->left_margin_cols = save_left;
|
||||
w->right_margin_cols = save_right;
|
||||
|
||||
Fset_window_margins (window,
|
||||
b->left_margin_cols, b->right_margin_cols);
|
||||
B_ (b, left_margin_cols), B_ (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 (XBUFFER (buffer)->name))
|
||||
if (NILP (B_ (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 (XBUFFER (tem)->name));
|
||||
error ("Window is dedicated to `%s'", SDATA (B_ (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);
|
||||
|
||||
XBUFFER (w->buffer)->last_selected_window = window;
|
||||
B_ (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 (XBUFFER (object)->name))
|
||||
if (BUFFERP (object) && !NILP (B_ (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;
|
||||
|
||||
XBUFFER (buf)->directory = current_buffer->directory;
|
||||
B_ (XBUFFER (buf), directory) = B_ (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 (XBUFFER (new_current_buffer)->name))
|
||||
if (NILP (B_ (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 (XBUFFER (p->buffer)->name))
|
||||
if (!NILP (B_ (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 (XBUFFER (w->buffer)->mark,
|
||||
Fset_marker (B_ (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 (XBUFFER (w->buffer)->name))
|
||||
else if (NILP (w->buffer) || NILP (B_ (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);
|
||||
XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window
|
||||
B_ (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 = XBUFFER (w->buffer)->mark;
|
||||
tem = B_ (XBUFFER (w->buffer), mark);
|
||||
p->mark = Fcopy_marker (tem, Qnil);
|
||||
}
|
||||
else
|
||||
|
|
186
src/xdisp.c
186
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),
|
||||
current_buffer->mode_line_format);
|
||||
B_ (current_buffer, mode_line_format));
|
||||
|
||||
if (WINDOW_WANTS_HEADER_LINE_P (w))
|
||||
current_header_line_height
|
||||
= display_mode_line (w, HEADER_LINE_FACE_ID,
|
||||
current_buffer->header_line_format);
|
||||
B_ (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 (current_buffer->extra_line_spacing))
|
||||
it->extra_line_spacing = XFASTINT (current_buffer->extra_line_spacing);
|
||||
else if (FLOATP (current_buffer->extra_line_spacing))
|
||||
it->extra_line_spacing = (XFLOAT_DATA (current_buffer->extra_line_spacing)
|
||||
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))
|
||||
* 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 (current_buffer->ctl_arrow);
|
||||
it->ctl_arrow_p = !NILP (B_ (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 (current_buffer->selective_display)
|
||||
? XFASTINT (current_buffer->selective_display)
|
||||
: (!NILP (current_buffer->selective_display)
|
||||
it->selective = (INTEGERP (B_ (current_buffer, selective_display))
|
||||
? XFASTINT (B_ (current_buffer, selective_display))
|
||||
: (!NILP (B_ (current_buffer, selective_display))
|
||||
? -1 : 0));
|
||||
it->selective_display_ellipsis_p
|
||||
= !NILP (current_buffer->selective_display_ellipses);
|
||||
= !NILP (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
it->multibyte_p = !NILP (B_ (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 (current_buffer->bidi_display_reordering) && it->multibyte_p;
|
||||
= !NILP (B_ (current_buffer, bidi_display_reordering)) && it->multibyte_p;
|
||||
|
||||
/* Non-zero if we should highlight the region. */
|
||||
highlight_region_p
|
||||
= (!NILP (Vtransient_mark_mode)
|
||||
&& !NILP (current_buffer->mark_active)
|
||||
&& XMARKER (current_buffer->mark)->buffer != 0);
|
||||
&& !NILP (B_ (current_buffer, mark_active))
|
||||
&& XMARKER (B_ (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 (current_buffer->mark);
|
||||
EMACS_INT charpos = marker_position (B_ (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 (current_buffer->tab_width);
|
||||
it->tab_width = XINT (B_ (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 (current_buffer->truncate_lines))
|
||||
it->line_wrap = NILP (current_buffer->word_wrap)
|
||||
else if (NILP (B_ (current_buffer, truncate_lines)))
|
||||
it->line_wrap = NILP (B_ (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 (current_buffer->bidi_paragraph_direction, Qleft_to_right))
|
||||
if (EQ (B_ (current_buffer, bidi_paragraph_direction), Qleft_to_right))
|
||||
it->paragraph_embedding = L2R;
|
||||
else if (EQ (current_buffer->bidi_paragraph_direction, Qright_to_left))
|
||||
else if (EQ (B_ (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 (current_buffer->enable_multibyte_characters);
|
||||
it->multibyte_p = !NILP (B_ (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));
|
||||
current_buffer->undo_list = Qt;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
&& NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
&& ! NILP (B_ (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 (current_buffer->enable_multibyte_characters));
|
||||
!NILP (B_ (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 (XBUFFER (echo_buffer[i])->name))
|
||||
|| NILP (B_ (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));
|
||||
XBUFFER (echo_buffer[i])->truncate_lines = Qnil;
|
||||
B_ (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);
|
||||
}
|
||||
|
||||
current_buffer->undo_list = Qt;
|
||||
current_buffer->read_only = Qnil;
|
||||
B_ (current_buffer, undo_list) = Qt;
|
||||
B_ (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]));
|
||||
current_buffer->truncate_lines = Qnil;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
!= !NILP (B_ (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]));
|
||||
current_buffer->truncate_lines = Qnil;
|
||||
B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
!= !NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil);
|
||||
|
||||
current_buffer->truncate_lines = message_truncate_lines ? Qt : Qnil;
|
||||
if (!NILP (current_buffer->bidi_display_reordering))
|
||||
current_buffer->bidi_paragraph_direction = Qleft_to_right;
|
||||
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;
|
||||
|
||||
/* 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 (current_buffer->enable_multibyte_characters))
|
||||
if (multibyte_p && NILP (B_ (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 (current_buffer->enable_multibyte_characters))
|
||||
&& !NILP (B_ (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 (XBUFFER (w->buffer)->mark_active))
|
||||
&& !NILP (B_ (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 (XBUFFER (w->buffer)->mark_active))
|
||||
&& !NILP (B_ (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 (current_buffer->selective_display)
|
||||
&& XINT (current_buffer->selective_display) > 0
|
||||
&& INTEGERP (B_ (current_buffer, selective_display))
|
||||
&& XINT (B_ (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 (XBUFFER (w->buffer)->bidi_display_reordering)
|
||||
&& NILP (XBUFFER (w->buffer)->bidi_paragraph_direction))
|
||||
if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))
|
||||
&& NILP (B_ (XBUFFER (w->buffer), bidi_paragraph_direction)))
|
||||
unchanged_p = 0;
|
||||
}
|
||||
|
||||
|
@ -11662,11 +11662,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 (XBUFFER (w->buffer)->mark_active))
|
||||
&& !NILP (B_ (XBUFFER (w->buffer), mark_active)))
|
||||
!= !NILP (w->region_showing))
|
||||
|| (!NILP (w->region_showing)
|
||||
&& !EQ (w->region_showing,
|
||||
Fmarker_position (XBUFFER (w->buffer)->mark))))
|
||||
Fmarker_position (B_ (XBUFFER (w->buffer), mark)))))
|
||||
CHARPOS (this_line_start_pos) = 0;
|
||||
|
||||
/* Optimize the case that only the line containing the cursor in the
|
||||
|
@ -11826,8 +11826,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 (current_buffer->mark_active))
|
||||
&& (EQ (selected_window, current_buffer->last_selected_window)
|
||||
&& !NILP (B_ (current_buffer, mark_active)))
|
||||
&& (EQ (selected_window, B_ (current_buffer, last_selected_window))
|
||||
|| highlight_nonselected_windows)
|
||||
&& NILP (w->region_showing)
|
||||
&& NILP (Vshow_trailing_whitespace)
|
||||
|
@ -13033,8 +13033,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 (current_buffer->scroll_down_aggressively)
|
||||
|| NUMBERP (current_buffer->scroll_up_aggressively))
|
||||
else if (NUMBERP (B_ (current_buffer, scroll_down_aggressively))
|
||||
|| NUMBERP (B_ (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);
|
||||
|
@ -13099,7 +13099,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
|
|||
amount_to_scroll = scroll_max;
|
||||
else
|
||||
{
|
||||
aggressive = current_buffer->scroll_up_aggressively;
|
||||
aggressive = B_ (current_buffer, scroll_up_aggressively);
|
||||
height = WINDOW_BOX_TEXT_HEIGHT (w);
|
||||
if (NUMBERP (aggressive))
|
||||
{
|
||||
|
@ -13182,7 +13182,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
|
|||
amount_to_scroll = scroll_max;
|
||||
else
|
||||
{
|
||||
aggressive = current_buffer->scroll_down_aggressively;
|
||||
aggressive = B_ (current_buffer, scroll_down_aggressively);
|
||||
height = WINDOW_BOX_TEXT_HEIGHT (w);
|
||||
if (NUMBERP (aggressive))
|
||||
{
|
||||
|
@ -13363,7 +13363,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 (current_buffer->mark_active))
|
||||
&& !NILP (B_ (current_buffer, mark_active)))
|
||||
&& NILP (w->region_showing)
|
||||
&& NILP (Vshow_trailing_whitespace)
|
||||
/* Right after splitting windows, last_point may be nil. */
|
||||
|
@ -13518,7 +13518,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
|
|||
must_scroll = 1;
|
||||
}
|
||||
else if (rc != CURSOR_MOVEMENT_SUCCESS
|
||||
&& !NILP (XBUFFER (w->buffer)->bidi_display_reordering))
|
||||
&& !NILP (B_ (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
|
||||
|
@ -13576,7 +13576,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 (XBUFFER (w->buffer)->bidi_display_reordering))
|
||||
&& !NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering)))
|
||||
{
|
||||
/* With bidi-reordered rows, there could be more than
|
||||
one candidate row whose start and end positions
|
||||
|
@ -13876,7 +13876,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 (current_buffer->width_table)))
|
||||
XVECTOR (B_ (current_buffer, width_table))))
|
||||
{
|
||||
invalidate_region_cache (current_buffer,
|
||||
current_buffer->width_run_cache,
|
||||
|
@ -13998,7 +13998,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 (current_buffer->mark_active))
|
||||
&& !NILP (B_ (current_buffer, mark_active)))
|
||||
{
|
||||
clear_glyph_matrix (w->desired_matrix);
|
||||
if (!try_window (window, startp, 0))
|
||||
|
@ -14161,8 +14161,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
|
|||
if ((scroll_conservatively
|
||||
|| emacs_scroll_step
|
||||
|| temp_scroll_step
|
||||
|| NUMBERP (current_buffer->scroll_up_aggressively)
|
||||
|| NUMBERP (current_buffer->scroll_down_aggressively))
|
||||
|| NUMBERP (B_ (current_buffer, scroll_up_aggressively))
|
||||
|| NUMBERP (B_ (current_buffer, scroll_down_aggressively)))
|
||||
&& !current_buffer->clip_changed
|
||||
&& CHARPOS (startp) >= BEGV
|
||||
&& CHARPOS (startp) <= ZV)
|
||||
|
@ -14605,7 +14605,7 @@ try_window_reusing_current_matrix (struct window *w)
|
|||
|
||||
/* Can't do this if region may have changed. */
|
||||
if ((!NILP (Vtransient_mark_mode)
|
||||
&& !NILP (current_buffer->mark_active))
|
||||
&& !NILP (B_ (current_buffer, mark_active)))
|
||||
|| !NILP (w->region_showing)
|
||||
|| !NILP (Vshow_trailing_whitespace))
|
||||
return 0;
|
||||
|
@ -14948,7 +14948,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 (XBUFFER (w->buffer)->bidi_display_reordering))
|
||||
if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering)))
|
||||
{
|
||||
if (!(w->cursor.hpos >= 0
|
||||
&& w->cursor.hpos < row->used[TEXT_AREA]
|
||||
|
@ -15262,7 +15262,7 @@ row_containing_pos (struct window *w, EMACS_INT charpos,
|
|||
{
|
||||
struct glyph *g;
|
||||
|
||||
if (NILP (XBUFFER (w->buffer)->bidi_display_reordering)
|
||||
if (NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))
|
||||
|| (!best_row && !row->continued_p))
|
||||
return row;
|
||||
/* In bidi-reordered rows, there could be several rows
|
||||
|
@ -15409,7 +15409,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 (current_buffer->mark_active))
|
||||
&& !NILP (B_ (current_buffer, mark_active)))
|
||||
GIVE_UP (9);
|
||||
|
||||
/* Likewise if highlighting trailing whitespace. */
|
||||
|
@ -15429,7 +15429,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 (XBUFFER (w->buffer)->word_wrap))
|
||||
if (!NILP (B_ (XBUFFER (w->buffer), word_wrap)))
|
||||
GIVE_UP (21);
|
||||
|
||||
/* Under bidi reordering, adding or deleting a character in the
|
||||
|
@ -15440,8 +15440,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 (XBUFFER (w->buffer)->bidi_display_reordering)
|
||||
&& NILP (XBUFFER (w->buffer)->bidi_paragraph_direction))
|
||||
if (!NILP (B_ (XBUFFER (w->buffer), bidi_display_reordering))
|
||||
&& NILP (B_ (XBUFFER (w->buffer), bidi_paragraph_direction)))
|
||||
GIVE_UP (22);
|
||||
|
||||
/* Make sure beg_unchanged and end_unchanged are up to date. Do it
|
||||
|
@ -16412,7 +16412,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 (buffer->enable_multibyte_characters);
|
||||
multibyte_p = !NILP (B_ (buffer, enable_multibyte_characters));
|
||||
p = arrow_string;
|
||||
while (p < arrow_end)
|
||||
{
|
||||
|
@ -17347,7 +17347,7 @@ display_line (struct it *it)
|
|||
row->glyphs[TEXT_AREA]->charpos = -1;
|
||||
row->displays_text_p = 0;
|
||||
|
||||
if (!NILP (XBUFFER (it->w->buffer)->indicate_empty_lines)
|
||||
if (!NILP (B_ (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;
|
||||
|
@ -17925,10 +17925,10 @@ See also `bidi-paragraph-direction'. */)
|
|||
old = current_buffer;
|
||||
}
|
||||
|
||||
if (NILP (buf->bidi_display_reordering))
|
||||
if (NILP (B_ (buf, bidi_display_reordering)))
|
||||
return Qleft_to_right;
|
||||
else if (!NILP (buf->bidi_paragraph_direction))
|
||||
return buf->bidi_paragraph_direction;
|
||||
else if (!NILP (B_ (buf, bidi_paragraph_direction)))
|
||||
return B_ (buf, bidi_paragraph_direction);
|
||||
else
|
||||
{
|
||||
/* Determine the direction from buffer text. We could try to
|
||||
|
@ -18187,14 +18187,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),
|
||||
current_buffer->mode_line_format);
|
||||
B_ (current_buffer, mode_line_format));
|
||||
++n;
|
||||
}
|
||||
|
||||
if (WINDOW_WANTS_HEADER_LINE_P (w))
|
||||
{
|
||||
display_mode_line (w, HEADER_LINE_FACE_ID,
|
||||
current_buffer->header_line_format);
|
||||
B_ (current_buffer, header_line_format));
|
||||
++n;
|
||||
}
|
||||
|
||||
|
@ -19129,7 +19129,7 @@ static char *
|
|||
decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
|
||||
{
|
||||
Lisp_Object val;
|
||||
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
|
||||
int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters));
|
||||
const unsigned char *eol_str;
|
||||
int eol_str_len;
|
||||
/* The EOL conversion we are using. */
|
||||
|
@ -19225,7 +19225,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
|
|||
switch (c)
|
||||
{
|
||||
case '*':
|
||||
if (!NILP (b->read_only))
|
||||
if (!NILP (B_ (b, read_only)))
|
||||
return "%";
|
||||
if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
|
||||
return "*";
|
||||
|
@ -19235,7 +19235,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->read_only))
|
||||
if (!NILP (B_ (b, read_only)))
|
||||
return "%";
|
||||
return "-";
|
||||
|
||||
|
@ -19297,7 +19297,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
|
|||
}
|
||||
|
||||
case 'b':
|
||||
obj = b->name;
|
||||
obj = B_ (b, name);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
|
@ -19337,7 +19337,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
|
|||
return "Emacs";
|
||||
|
||||
case 'f':
|
||||
obj = b->filename;
|
||||
obj = B_ (b, filename);
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
|
@ -19473,7 +19473,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
|
|||
break;
|
||||
|
||||
case 'm':
|
||||
obj = b->mode_name;
|
||||
obj = B_ (b, mode_name);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
|
@ -19558,7 +19558,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"),
|
||||
current_buffer->directory);
|
||||
B_ (current_buffer, directory));
|
||||
unbind_to (count, Qnil);
|
||||
|
||||
if (NILP (val))
|
||||
|
@ -19593,7 +19593,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->buffer_file_coding_system,
|
||||
p = decode_mode_spec_coding (B_ (b, buffer_file_coding_system),
|
||||
p, eol_flag);
|
||||
|
||||
#if 0 /* This proves to be annoying; I think we can do without. -- rms. */
|
||||
|
@ -19643,8 +19643,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 (current_buffer->selective_display)
|
||||
&& !INTEGERP (current_buffer->selective_display));
|
||||
int selective_display = (!NILP (B_ (current_buffer, selective_display))
|
||||
&& !INTEGERP (B_ (current_buffer, selective_display)));
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
|
@ -23291,13 +23291,13 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
|
|||
{
|
||||
if (w == XWINDOW (echo_area_window))
|
||||
{
|
||||
if (EQ (b->cursor_type, Qt) || NILP (b->cursor_type))
|
||||
if (EQ (B_ (b, cursor_type), Qt) || NILP (B_ (b, cursor_type)))
|
||||
{
|
||||
*width = FRAME_CURSOR_WIDTH (f);
|
||||
return FRAME_DESIRED_CURSOR (f);
|
||||
}
|
||||
else
|
||||
return get_specified_cursor_type (b->cursor_type, width);
|
||||
return get_specified_cursor_type (B_ (b, cursor_type), width);
|
||||
}
|
||||
|
||||
*active_cursor = 0;
|
||||
|
@ -23317,23 +23317,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->cursor_type))
|
||||
if (NILP (B_ (b, cursor_type)))
|
||||
return NO_CURSOR;
|
||||
|
||||
/* Get the normal cursor type for this window. */
|
||||
if (EQ (b->cursor_type, Qt))
|
||||
if (EQ (B_ (b, cursor_type), Qt))
|
||||
{
|
||||
cursor_type = FRAME_DESIRED_CURSOR (f);
|
||||
*width = FRAME_CURSOR_WIDTH (f);
|
||||
}
|
||||
else
|
||||
cursor_type = get_specified_cursor_type (b->cursor_type, width);
|
||||
cursor_type = get_specified_cursor_type (B_ (b, cursor_type), width);
|
||||
|
||||
/* Use cursor-in-non-selected-windows instead
|
||||
for non-selected window or frame. */
|
||||
if (non_selected)
|
||||
{
|
||||
alt_cursor = b->cursor_in_non_selected_windows;
|
||||
alt_cursor = B_ (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. */
|
||||
|
@ -23380,7 +23380,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->cursor_type, Vblink_cursor_alist), !NILP (alt_cursor)))
|
||||
if ((alt_cursor = Fassoc (B_ (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. */
|
||||
|
@ -25496,11 +25496,11 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
necessarily display the character whose position
|
||||
is the smallest. */
|
||||
Lisp_Object lim1 =
|
||||
NILP (XBUFFER (buffer)->bidi_display_reordering)
|
||||
NILP (B_ (XBUFFER (buffer), bidi_display_reordering))
|
||||
? Fmarker_position (w->start)
|
||||
: Qnil;
|
||||
Lisp_Object lim2 =
|
||||
NILP (XBUFFER (buffer)->bidi_display_reordering)
|
||||
NILP (B_ (XBUFFER (buffer), bidi_display_reordering))
|
||||
? make_number (BUF_Z (XBUFFER (buffer))
|
||||
- XFASTINT (w->window_end_pos))
|
||||
: Qnil;
|
||||
|
|
|
@ -5970,7 +5970,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object prop)
|
|||
{
|
||||
int face_id;
|
||||
|
||||
if (NILP (current_buffer->enable_multibyte_characters))
|
||||
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
|
||||
ch = 0;
|
||||
|
||||
if (NILP (prop))
|
||||
|
|
|
@ -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));
|
||||
current_buffer->truncate_lines = Qnil;
|
||||
B_ (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));
|
||||
current_buffer->truncate_lines = Qnil;
|
||||
B_ (current_buffer, truncate_lines) = Qnil;
|
||||
clear_glyph_matrix (w->desired_matrix);
|
||||
clear_glyph_matrix (w->current_matrix);
|
||||
SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
|
||||
|
|
Loading…
Add table
Reference in a new issue