]> git.eshelyaron.com Git - emacs.git/log
emacs.git
26 years ago(Fdirectory_files): Fix arg to compile_pattern.
Richard M. Stallman [Fri, 9 Jan 1998 23:28:38 +0000 (23:28 +0000)]
(Fdirectory_files): Fix arg to compile_pattern.

26 years ago(re_search_2): Fix call to CHAR_HEAD_P.
Richard M. Stallman [Fri, 9 Jan 1998 23:24:24 +0000 (23:24 +0000)]
(re_search_2): Fix call to CHAR_HEAD_P.
(re_match_2_internal): Use PTR_BYTE_POS and PT_BYTE.

26 years ago(x_load_font): Use string_byte.
Richard M. Stallman [Fri, 9 Jan 1998 23:22:56 +0000 (23:22 +0000)]
(x_load_font): Use string_byte.

26 years ago(lisp_data_to_selection_data): Use size_byte.
Richard M. Stallman [Fri, 9 Jan 1998 23:22:10 +0000 (23:22 +0000)]
(lisp_data_to_selection_data): Use size_byte.
(Fx_store_cut_buffer_internal): Use size_byte.
(selection_data_to_lisp_data): Use make_multibyte_string.

26 years ago(xmenu_show): Use size_byte of strings.
Richard M. Stallman [Fri, 9 Jan 1998 23:21:17 +0000 (23:21 +0000)]
(xmenu_show): Use size_byte of strings.

26 years ago(x_create_bitmap_from_file): Use size_byte on strings.
Richard M. Stallman [Fri, 9 Jan 1998 23:20:32 +0000 (23:20 +0000)]
(x_create_bitmap_from_file): Use size_byte on strings.
(x_set_name, x_set_title, validate_x_resource_name): Likewise.
(Fx_get_resource, display_x_get_resource): Likewise.
(x_get_resource_string): Likewise.

26 years ago(message_dolog, message2): New arg MULTIBYTE.
Richard M. Stallman [Fri, 9 Jan 1998 23:19:42 +0000 (23:19 +0000)]
(message_dolog, message2): New arg MULTIBYTE.
Callers changed.
(message1, message1_nolog): String must be ASCII-only.
(message2, message2_nolog): Now static.
(x_consider_frame_title): Use size_byte.
(display_text_line): Likewise.
And scan Voverlay_arrow_string by bytes and chars.
(display_menu_bar): Call display_string with a byte size.
(display_mode_line): Call display_string with a byte size.

26 years ago(Fselect_window): Don't set OW->pointm if OW->buffer is nil.
Richard M. Stallman [Fri, 9 Jan 1998 23:18:35 +0000 (23:18 +0000)]
(Fselect_window): Don't set OW->pointm if OW->buffer is nil.
(Fset_window_configuration): Set old selected window's pointm.

26 years ago(skip_chars): Handle multibyte and unibyte strings
Richard M. Stallman [Fri, 9 Jan 1998 23:17:52 +0000 (23:17 +0000)]
(skip_chars): Handle multibyte and unibyte strings
for either kind of buffer.  Scan string by bytes and chars.

26 years ago(STRING_MULTIBYTE): New macro.
Richard M. Stallman [Fri, 9 Jan 1998 23:17:00 +0000 (23:17 +0000)]
(STRING_MULTIBYTE): New macro.
(struct lisp_String): New field size_byte.

26 years ago(describe_vector): Unconditionally handle multibyte chars.
Richard M. Stallman [Fri, 9 Jan 1998 23:16:01 +0000 (23:16 +0000)]
(describe_vector): Unconditionally handle multibyte chars.
(describe_vector): Pass new args to insert_from_string.
(Ftext_char_description): Use make_multibyte_string.
(Fkey_binding): Scan PREFIX a char at a time.
(Fkey_description): Scan KEYS by chars.

26 years ago(echo_now): Use message2_nolog, not message1_nolog.
Richard M. Stallman [Fri, 9 Jan 1998 23:14:38 +0000 (23:14 +0000)]
(echo_now): Use message2_nolog, not message1_nolog.
(Fexecute_extended_command): Likewise.
(read_char_minibuf_menu_prompt): Use message2_nolog, not message1.
(parse_modifiers): Use size_byte.
(echo_char): Use size_byte.
(parse_modifiers_uncached): Likewise.
(record_char): Likewise.
(parse_solitary_modifier): Likewise.
(read_char): Use Faref on Vkeyboard_translate_table
if it is a string.
(apply_modifiers_uncached): New arg base_len_byte.  Calls changed.
(read_char_minibuf_menu_prompt):
(read_key_sequence): Access buffer's downcase_table with XCHAR_TABLE.
(Fexecute_extended_command): Use Faref to access FUNCTION.
Use size_byte of BINDING.
(stuff_buffered_input): Use size_byte of STUFFSTRING.

26 years ago(set_term_frame_name): Use size_byte.
Richard M. Stallman [Fri, 9 Jan 1998 23:13:22 +0000 (23:13 +0000)]
(set_term_frame_name): Use size_byte.

26 years ago(Fdo_auto_save): Save and restore multibyteness of minibuffer.
Richard M. Stallman [Fri, 9 Jan 1998 23:12:05 +0000 (23:12 +0000)]
(Fdo_auto_save): Save and restore multibyteness of minibuffer.
(Fwrite_region): Use message_with_string.
(auto_save_error, Fdo_auto_save): Likewise.
(Ffile_name_directory): Maybe use make_unibyte_string.
(Ffile_name_nondirectory): Likewise.
(Fsubstitute_in_file_name): Convert substituted envvars to multibyte
if necessary.  Otherwise use make_unibyte_string.
(Finsert_file_contents): Use make_unibyte_string.
(double_dollars): Use make_uninit_multibyte_string.

26 years ago(main): Pass new arg to message_dolog.
Richard M. Stallman [Fri, 9 Jan 1998 23:10:20 +0000 (23:10 +0000)]
(main): Pass new arg to message_dolog.

26 years agoInclude charset.h.
Richard M. Stallman [Fri, 9 Jan 1998 23:08:46 +0000 (23:08 +0000)]
Include charset.h.
(Fsubstitute_command_keys): Scan by bytes.

26 years ago(Fsend_string_to_terminal): Use size_byte.
Richard M. Stallman [Fri, 9 Jan 1998 23:07:47 +0000 (23:07 +0000)]
(Fsend_string_to_terminal): Use size_byte.

26 years ago(Fmultibyte_string_p): New function.
Richard M. Stallman [Fri, 9 Jan 1998 23:06:13 +0000 (23:06 +0000)]
(Fmultibyte_string_p): New function.
(Faref): Index string by chars.
(Faset): Index multibyte string by chars.

26 years ago(code_convert_string): Maybe use make_unibyte_string.
Richard M. Stallman [Fri, 9 Jan 1998 23:05:12 +0000 (23:05 +0000)]
(code_convert_string): Maybe use make_unibyte_string.

26 years ago(internal_self_insert): Simplify handling of c2;
Richard M. Stallman [Fri, 9 Jan 1998 23:04:20 +0000 (23:04 +0000)]
(internal_self_insert): Simplify handling of c2;
avoid testing enable-multibyte-characters.
(internal_self_insert): Use make_multibyte_string.

26 years ago(multibyte_chars_in_text): New function.
Richard M. Stallman [Fri, 9 Jan 1998 23:03:25 +0000 (23:03 +0000)]
(multibyte_chars_in_text): New function.
(Fstring): Use make_multibyte_string.
(Fcompose_string): Likewise.
(Ffind_charset_string): Handle bytes vs chars in string.
Special case for single-byte strings.
(Fchars_in_string): Function deleted.
(Fstring): Renamed from Fconcat_chars.
Handle bytes vs chars in string.
(syms_of_charset): Corresponding changes.

26 years ago(Fccl_execute_on_string): Use size_byte.
Richard M. Stallman [Fri, 9 Jan 1998 23:00:30 +0000 (23:00 +0000)]
(Fccl_execute_on_string): Use size_byte.

26 years ago(Fmake_category_set): Don't allow multibyte string.
Richard M. Stallman [Fri, 9 Jan 1998 22:59:31 +0000 (22:59 +0000)]
(Fmake_category_set): Don't allow multibyte string.
(describe_category): Pass new args to insert_from_string.
(describe_category_1): Likewise.

26 years ago(casify_object): Scan string by bytes and chars.
Richard M. Stallman [Fri, 9 Jan 1998 22:58:16 +0000 (22:58 +0000)]
(casify_object): Scan string by bytes and chars.
Use make_multibyte_string.

26 years ago(BASE_PURESIZE): Increased.
Richard M. Stallman [Fri, 9 Jan 1998 22:55:18 +0000 (22:55 +0000)]
(BASE_PURESIZE): Increased.

26 years ago(read_escape): `\ ' stands for nothing at all.
Richard M. Stallman [Fri, 9 Jan 1998 22:52:08 +0000 (22:52 +0000)]
(read_escape): `\ ' stands for nothing at all.
(oblookup): Take args SIZE and SIZE_BYTE.  Callers changed.
(init_obarray, read1, make_symbol):
Pass new arg to make_pure_string.
(Fintern, oblookup, Fintern_soft, intern): Handle size_byte.
(dir_warning): Pass new arg to message_dolog.
(read1): PCH is now int *.
Declare ch as int.
(read0): Declare c as int.
(read_list): Declare ch as int.
(read0): Use Fmake_string not make_string.
(read1): When reading a string, maybe use make_unibyte_string.
(Fread_from_string): Convert string indices to/from bytes.

26 years ago(count_size_as_multibyte): New function.
Richard M. Stallman [Fri, 9 Jan 1998 22:46:07 +0000 (22:46 +0000)]
(count_size_as_multibyte): New function.
(insert_from_string_1, insert_from_buffer_1): Use it.
(copy_text): New function.
(insert_from_buffer_1): Call copy_text to convert between
single-byte and multibyte text.
(insert_from_string_1): Likewise.
(insert_1_both): New function.
(insert_from_string): New args POS_BYTE, LENGTH.
(insert_from_string_before_markers):
(insert_from_string_1): New arg POS_BYTE.  Swap args NCHARS, NBYTES.
Don't fail to use POS_BYTE!
(insert_from_buffer_1): Get both inschars and insbytes from NEW.

26 years ago(map_char_table): Unconditionally consider non-ASCII charsets.
Richard M. Stallman [Fri, 9 Jan 1998 22:41:43 +0000 (22:41 +0000)]
(map_char_table): Unconditionally consider non-ASCII charsets.
(Fsubstring): Use make_multibyte_string.
(concat, Fsubstring, internal_equal, mapcar1):
Distinguish bytes and chars when indexing strings.
(Fstring_equal, Fstring_lessp): Likewise.
(substring_both): New function.
(string_make_multibyte, string_make_unibyte): New functions.
(string_char_to_byte, string_byte_to_char): New functions.

26 years ago(Fformat): Do all the work directly--don't use doprnt.
Richard M. Stallman [Fri, 9 Jan 1998 22:34:48 +0000 (22:34 +0000)]
(Fformat): Do all the work directly--don't use doprnt.
Calculate the right size the first time, so no need to retry.
Count chars and bytes in the result.
Convert single-byte strings to multibyte as needed.

26 years ago(sref): Defined.
Richard M. Stallman [Fri, 9 Jan 1998 22:13:08 +0000 (22:13 +0000)]
(sref): Defined.

26 years ago(dabbrev-ignored-buffer-names): New variable.
Richard M. Stallman [Fri, 9 Jan 1998 22:12:10 +0000 (22:12 +0000)]
(dabbrev-ignored-buffer-names): New variable.
(dabbrev--find-expansion): Ignore those buffers
unless they get specifically preferred.

26 years agoAdded some more comments in the commentary.
Eric M. Ludlam [Thu, 8 Jan 1998 23:35:34 +0000 (23:35 +0000)]
Added some more comments in the commentary.
You can now `quote' symbols that look like keystrokes
When spell checking, meta variables can end in `th' or `s'.

26 years ago(vc-resynch-window): Behave properly when view-read-only is non-nil.
André Spiegel [Wed, 7 Jan 1998 14:33:37 +0000 (14:33 +0000)]
(vc-resynch-window): Behave properly when view-read-only is non-nil.

26 years agoMove change log comment block so lm-commentary doesn't lose.
Dave Love [Wed, 7 Jan 1998 12:39:59 +0000 (12:39 +0000)]
Move change log comment block so lm-commentary doesn't lose.

26 years ago(custom-browse-visibility): Doc fix.
Andreas Schwab [Wed, 7 Jan 1998 10:45:56 +0000 (10:45 +0000)]
(custom-browse-visibility): Doc fix.

26 years ago(defgroup): Doc fix.
Andreas Schwab [Wed, 7 Jan 1998 10:45:33 +0000 (10:45 +0000)]
(defgroup): Doc fix.

26 years ago(pp-to-string): Greatly simplify by letting the
Andreas Schwab [Wed, 7 Jan 1998 10:40:25 +0000 (10:40 +0000)]
(pp-to-string): Greatly simplify by letting the
Emacs printer do the (quote x) to 'x conversion.  Better handle
the # print syntax in all its forms.

26 years agoCustomized.
Andreas Schwab [Wed, 7 Jan 1998 10:31:09 +0000 (10:31 +0000)]
Customized.

26 years ago(delete-auto-save-files): Say in the doc string that
Eli Zaretskii [Wed, 7 Jan 1998 09:41:30 +0000 (09:41 +0000)]
(delete-auto-save-files): Say in the doc string that
auto-save file will not be deleted if the buffer has unsaved
changes.

26 years ago(Fcall_process): When deciding whether to encode args,
Richard M. Stallman [Mon, 5 Jan 1998 17:39:32 +0000 (17:39 +0000)]
(Fcall_process): When deciding whether to encode args,
check them for multibyteness, don't check enable-multibyte-characters.

(Fcall_process): Use size_byte for the args.
(Fcall_process_region): Likewise for temp file.
(child_setup, getenv_internal, Fgetenv): Likewise.

26 years ago(read_process_output): Use insert_1_both.
Richard M. Stallman [Mon, 5 Jan 1998 17:33:41 +0000 (17:33 +0000)]
(read_process_output): Use insert_1_both.

(read_process_output): New var `multibyte'.
Set it according to which coding system was used.

(read_process_output): Handle bytes vs chars.
(send_process): Use size_byte of OBJECT.
(Fprocess_send_string): Pass size_byte to send_process.

26 years ago(MAKE_LOCK_NAME): Use size_byte.
Richard M. Stallman [Mon, 5 Jan 1998 17:32:08 +0000 (17:32 +0000)]
(MAKE_LOCK_NAME): Use size_byte.

26 years ago(Fbyte_code): Use size_byte.
Richard M. Stallman [Mon, 5 Jan 1998 17:30:19 +0000 (17:30 +0000)]
(Fbyte_code): Use size_byte.

26 years ago(print_string): Now static.
Richard M. Stallman [Mon, 5 Jan 1998 17:29:16 +0000 (17:29 +0000)]
(print_string): Now static.
(print): When multibyte is disabled,
print multibyte string chars using hex escapes.

(printchar): Pass new arg to message_dolog.
(strout): New arg MULTIBYTE.  Callers changed.

(strout): Take args SIZE and SIZE_BYTE;
operate on both chars and bytes.
(print_string): Pass new arg to strout.
If not using strout, fetch a whole multibyte char at once.
(write_string): Pass new arg to strout.
(write_string_1): Likewise.
(print) <case Lisp_String>: Scan by chars and bytes.
(print) <case Lisp_Symbol>: Scan name by chars and bytes.

(PRINTPREPARE): Use make_multibyte_string.
Initialize print_buffer_pos_byte.  Use insert_1_both.
(printchar): Update print_buffer_pos_byte and print_buffer_pos.
(print_buffer_pos_byte): New variable.

26 years ago(Fexpand_abbrev): Pass both kinds of size to oblookup.
Richard M. Stallman [Mon, 5 Jan 1998 17:25:39 +0000 (17:25 +0000)]
(Fexpand_abbrev): Pass both kinds of size to oblookup.

(Fexpand_abbrev): Pass new args to insert_from_string.
(Funexpand_abbrev): Likewise.  Use size_byte.

26 years ago(FETCH_STRING_CHAR_ADVANCE): New macro.
Richard M. Stallman [Mon, 5 Jan 1998 17:23:54 +0000 (17:23 +0000)]
(FETCH_STRING_CHAR_ADVANCE): New macro.

26 years ago(search_buffer): Handle bytes vs chars in non-RE case.
Richard M. Stallman [Mon, 5 Jan 1998 17:22:52 +0000 (17:22 +0000)]
(search_buffer): Handle bytes vs chars in non-RE case.
Have two locals len and len_byte.

(fast_c_string_match_ignore_case): Use string_make_unibyte.

(compile_pattern): New arg MULTIBYTE.  Callers changed.

(wordify): Use make_uninit_multibyte_string.
Scan by chars and bytes.

(string_match_1): Convert string indices to/from bytes.
(Freplace_match): Convert string indices to/from bytes.
(Fregexp_quote): Convert string indices to/from bytes.

26 years ago(make_pure_string): New arg length_byte.
Richard M. Stallman [Mon, 5 Jan 1998 17:17:27 +0000 (17:17 +0000)]
(make_pure_string): New arg length_byte.
Take account of size used by size_byte; store both sizes.
(Fpurecopy): Call make_pure_string the new way.
(compact_strings): Use size_byte field to compute string's size.

(make_uninit_multibyte_string): New function.
(make_uninit_string): Use make_uninit_multibyte_string.
(make_multibyte_string): New function.
(make_unibyte_string): New function.
(make_string): Compute number of chars from the data.

26 years ago(record_overlay_string): Totalize sizes assuming
Richard M. Stallman [Mon, 5 Jan 1998 17:15:53 +0000 (17:15 +0000)]
(record_overlay_string): Totalize sizes assuming
strings are converted to match buffer in multibyteness.
(overlay_strings): Convert strings to match buffer in multibyteness.

26 years ago(read_minibuf): Handle bytes vs chars
Richard M. Stallman [Mon, 5 Jan 1998 17:14:29 +0000 (17:14 +0000)]
(read_minibuf): Handle bytes vs chars
when checking for junk at end of expression.

26 years ago(test_completion): Pass both kinds of size to oblookup.
Richard M. Stallman [Mon, 5 Jan 1998 06:58:06 +0000 (06:58 +0000)]
(test_completion): Pass both kinds of size to oblookup.

(Fminibuffer_complete_word): Scan string bytes and chars.
Pass new args to insert_from_string.
(Ftry_completion): Use size_byte while comparing.
(Fall_completions): Use size_byte while comparing.

26 years ago(display-time-mode): Set the variable display-time-mode.
Richard M. Stallman [Mon, 5 Jan 1998 06:04:35 +0000 (06:04 +0000)]
(display-time-mode): Set the variable display-time-mode.

(display-time-mode): New customize variable to
automatically load the package.

26 years ago(xstring): Use size_byte.
Richard M. Stallman [Sun, 4 Jan 1998 20:41:17 +0000 (20:41 +0000)]
(xstring): Use size_byte.

27 years ago(resize-minibuffer-mode): Variable customized to
Richard M. Stallman [Sat, 3 Jan 1998 07:17:25 +0000 (07:17 +0000)]
(resize-minibuffer-mode): Variable customized to
automatically load the package.

27 years ago(redisplay_window): Set pos.bytepos along with pos.bufpos.
Richard M. Stallman [Sat, 3 Jan 1998 07:07:02 +0000 (07:07 +0000)]
(redisplay_window): Set pos.bytepos along with pos.bufpos.

27 years ago(occur): Pass default to read-from-minibuffer so that
Richard M. Stallman [Sat, 3 Jan 1998 07:06:18 +0000 (07:06 +0000)]
(occur): Pass default to read-from-minibuffer so that
M-n can insert default value into minibuffer.

27 years ago(file-cache-minibuffer-complete): Accept a prefix arg.
Richard M. Stallman [Sat, 3 Jan 1998 00:04:35 +0000 (00:04 +0000)]
(file-cache-minibuffer-complete): Accept a prefix arg.

27 years ago(minor-mode-overriding-map-alist):
Richard M. Stallman [Fri, 2 Jan 1998 23:52:11 +0000 (23:52 +0000)]
(minor-mode-overriding-map-alist):
Call make-variable-buffer-local.

27 years ago(current_minor_maps):
Richard M. Stallman [Fri, 2 Jan 1998 23:37:19 +0000 (23:37 +0000)]
(current_minor_maps):
If a variable has an entry in Vminor_mode_overriding_map_alist,
and also an entry in Vminor_mode_map_alist, ignore the latter.

27 years ago(Fchar_boundary_p): Function deleted.
Richard M. Stallman [Fri, 2 Jan 1998 23:23:21 +0000 (23:23 +0000)]
(Fchar_boundary_p): Function deleted.
(syms_of_charset): defsubr deleted.

27 years ago(make_gap): Set GPT_BYTE along with GPT.
Richard M. Stallman [Fri, 2 Jan 1998 23:12:03 +0000 (23:12 +0000)]
(make_gap): Set GPT_BYTE along with GPT.

27 years ago(which-func-update): Fix paren error.
Richard M. Stallman [Fri, 2 Jan 1998 23:04:39 +0000 (23:04 +0000)]
(which-func-update): Fix paren error.

27 years agoInitial revision
Richard M. Stallman [Fri, 2 Jan 1998 21:48:33 +0000 (21:48 +0000)]
Initial revision

27 years ago(current_column_1, Fmove_to_column):
Richard M. Stallman [Fri, 2 Jan 1998 21:43:42 +0000 (21:43 +0000)]
(current_column_1, Fmove_to_column):
Update call to CHAR_HEAD_P.

(indented_beyond_p): Take POS in bytes and chars.  Callers changed.
(pos_tab_indent): Function moved to xdisp.c.

(Fcurrent_indentation): Use scan_newline and SET_PT_BOTH.
(indented_beyond_p, current_column_1): Likewise.

(vmotion, compute_motion): Set up bytepos value to return it.
(current_column): Handle bytepos and charpos.
(position_indentation): Take bytepos as arg, and scan with it.  Calls changed.
(Fmove_to_column): Scan with bytepos and charpos.
(pos_tab_offset): Use bytepos to do FETCH_BYTE.
(skip_invisible): Don't worry about position in middle of character.

27 years ago(Fcompleting_read): Doc fix.
Richard M. Stallman [Fri, 2 Jan 1998 21:31:46 +0000 (21:31 +0000)]
(Fcompleting_read): Doc fix.

27 years ago(struct Lisp_Marker): Rename `bufpos' to `bytepos'.
Richard M. Stallman [Fri, 2 Jan 1998 21:30:28 +0000 (21:30 +0000)]
(struct Lisp_Marker): Rename `bufpos' to `bytepos'.
Its value no longer includes the gap space.

27 years ago(adjust_markers_gap_motion): Now a no-op.
Richard M. Stallman [Fri, 2 Jan 1998 21:29:48 +0000 (21:29 +0000)]
(adjust_markers_gap_motion): Now a no-op.
(adjust_markers_for_delete): Update ->bytepos instead of ->bufpos,
but don't adjust for the gap.
(adjust_markers_for_insert): Likewise.

27 years ago(internal_equal): For markers, use bytepos instead of bufpos.
Richard M. Stallman [Fri, 2 Jan 1998 21:28:56 +0000 (21:28 +0000)]
(internal_equal): For markers, use bytepos instead of bufpos.

27 years ago(readchar): Use marker's bytepos instead of bufpos.
Richard M. Stallman [Fri, 2 Jan 1998 21:27:40 +0000 (21:27 +0000)]
(readchar): Use marker's bytepos instead of bufpos.

27 years ago(Fmake_marker): Initialize marker's bytepos and charpos.
Richard M. Stallman [Fri, 2 Jan 1998 21:27:13 +0000 (21:27 +0000)]
(Fmake_marker): Initialize marker's bytepos and charpos.

27 years ago(transpose_markers): Update marker's bytepos.
Richard M. Stallman [Fri, 2 Jan 1998 21:26:32 +0000 (21:26 +0000)]
(transpose_markers): Update marker's bytepos.

27 years ago(buf_bytepos_to_charpos): Use marker bytepos, not bufpos.
Richard M. Stallman [Fri, 2 Jan 1998 21:26:05 +0000 (21:26 +0000)]
(buf_bytepos_to_charpos): Use marker bytepos, not bufpos.
(buf_charpos_to_bytepos, marker_byte_position): Likewise.
(Fset_marker, set_marker_restricted, set_marker_both): Likewise.
(set_marker_restricted_both): Likewise.

27 years ago(customize-changed-options): Doc fix.
Richard M. Stallman [Fri, 2 Jan 1998 21:17:27 +0000 (21:17 +0000)]
(customize-changed-options): Doc fix.

27 years ago(Fchar_after): Fix previous change.
Richard M. Stallman [Fri, 2 Jan 1998 21:06:08 +0000 (21:06 +0000)]
(Fchar_after): Fix previous change.

27 years ago(a_write): Fix prototype.
Richard M. Stallman [Thu, 1 Jan 1998 08:41:38 +0000 (08:41 +0000)]
(a_write): Fix prototype.

27 years ago(struct Lisp_Marker): New field `charpos'.
Richard M. Stallman [Thu, 1 Jan 1998 07:14:33 +0000 (07:14 +0000)]
(struct Lisp_Marker): New field `charpos'.
(pos_tab_offset): Decl deleted.
(insert_1, indented_beyond_p): Decls changed.
(move_gap_both, del_range_byte, del_range_both, del_range_2)
(scan_newline, Ffile_locked_p): New decls.

27 years ago(Fgoto_char): When arg is a marker, copy char and byte
Richard M. Stallman [Thu, 1 Jan 1998 07:09:35 +0000 (07:09 +0000)]
(Fgoto_char): When arg is a marker, copy char and byte
positions from it.  When arg is an integer, no need to worry that it
is in middle of a character.
(buildmark): Take 2 args (charpos and bytepos).  Callers changed.
(Fline_beginning_position): Save and restore both kinds of PT.
(Fprevious_char): Use PT_BYTE.
(Fbolp, Feolp): Use PT_BYTE.
(transpose_markers): Take args in chars and bytes.
(Ftranspose_regions): Work with byte and char positions.
(Fchar_after, Fchar_before): Use bytepos.
(make_buffer_string): Convert charpos to bytepos.
(Fcompare_buffer_substrings): Work with charpos and bytepos.
(Fsubst_char_in_region): Handle charpos and bytepos.
(Fwiden, Fnarrow_to_region): Likewise.
(save_restriction_restore): Update PT and PT_BYTES.
Cast arg to doprnt_lisp.

27 years ago(set_point_both): Renamed from set_point;
Richard M. Stallman [Thu, 1 Jan 1998 07:08:33 +0000 (07:08 +0000)]
(set_point_both): Renamed from set_point;
New arg BYTE; BUFFER is now first arg; use temp_set_point_both.
(set_point): New function; uses set_point_both.
(temp_set_point_both): New function.
(temp_set_point): Update BUF_PT_BYTE.
(get_local_map): Save and restore both forms of the buffer bounds.

27 years ago(code_convert_region): Handle bytepos and charpos.
Richard M. Stallman [Thu, 1 Jan 1998 07:05:26 +0000 (07:05 +0000)]
(code_convert_region): Handle bytepos and charpos.
(Fdetect_coding_region): Likewise.

27 years ago(move_gap): Use move_gap_both.
Richard M. Stallman [Thu, 1 Jan 1998 07:03:19 +0000 (07:03 +0000)]
(move_gap): Use move_gap_both.
(move_gap_both): New function.
(gap_left, gap_right): Take both charpos and bytepos args.
(adjust_markers_gap_motion): Renamed from adjust_markers and simplified.
(adjust_markers_for_delete): New function.
(adjust_markers_for_insert): Take args in chars and bytes.
Also new arg BEFORE_MARKERS.  One call does all marker updating
needed for any insert.
(adjust_point): Take 2 args and update PT and PT_BYTE.
(make_gap): Handle bytes vs chars.
(insert, insert_and_inherit): Handle bytes vs chars.
Pass new BEFORE_MARKERS arg to insert_1.
(insert_before_markers, insert_before_markers_and_inherit): Likewise.
(insert_from_string, insert_from_string_before_markers): Likewise.
(insert_from_buffer): Likewise.
(insert_1): Handle bytes vs chars.  New arg BEFORE_MARKERS.
(insert_from_string_1, insert_from_buffer_1): Likewise.
(replace_range): Likewise.
(del_range_2): New subroutine, taken from del_range_1.
(del_range_1): Use del_range_2.
(del_range_byte, del_range_both): New functions.

27 years agoUpdate copyright year.
Richard M. Stallman [Thu, 1 Jan 1998 06:51:31 +0000 (06:51 +0000)]
Update copyright year.

27 years ago(DECODE_POSITION): New macro.
Richard M. Stallman [Thu, 1 Jan 1998 06:49:17 +0000 (06:49 +0000)]
(DECODE_POSITION): New macro.
(CHAR_TO_BYTE, BYTE_TO_CHAR): New macros.

(BEG_BYTE, BEGV_BYTE, PT_BYTE, GPT_BYTE)
(ZV_BYTE, Z_BYTE): New macros.
(BUF_BEG_BYTE, BUF_BEGV_BYTE, BUF_PT_BYTE, BUF_GPT_BYTE)
(BUF_ZV_BYTE, BUF_Z_BYTE): New macros.
(BUF_GAP_END_ADDR): New macro.
(BEGV_ADDR, PT_ADDR, GPT_ADDR, GAP_END_ADDR, ZV_ADDR, Z_ADDR):
Use the new ..._byte buffer data.
(BUFFER_CEILING_OF, BUFFER_FLOOR_OF): Likewise.
(BUF_GPT_ADDR, BUF_Z_ADDR): Likewise.
(SET_PT_BOTH, TEMP_SET_PT_BOTH): New macros.
(SET_PT, TEMP_SET_PT, BUF_SET_PT, BUF_TEMP_SET_PT):
Call functions with new arg order.
(SET_BUF_BEGV, SET_BUF_BEGV_BOTH): New macros.
(SET_BUF_PT): Macro deleted.
(SET_BUF_ZV): Set charpos and bytepos.
(SET_BUF_ZV_BOTH, SET_BUF_PT_BOTH): New macros.
(BYTE_POS_ADDR): Renamed from POS_ADDR.
(CHAR_POS_ADDR): New macro.
(FETCH_BYTE): Use BYTE_POS_ADDR.
(FETCH_MULTIBYTE_CHAR): Use ..._BYTE macros.
(BUF_CHAR_ADDRESS): Convert charpos to bytepos.
(BUF_BYTE_ADDRESS): New macro, like the old BUF_CHAR_ADDRESS.
(PTR_BYTE_POS): Renamed from PTR_CHAR_POS.
(BUF_PTR_BYTE_POS): New macro.
(BUF_FETCH_CHAR, BUF_FETCH_BYTE, BUF_FETCH_MULTIBYTE_CHAR): New macros.
(struct buffer_text): New fields gpt_byte, z_byte.
(struct buffer): New fields pt_byte, begv_byte, zv_byte.

27 years ago(Fcall_interactively) <'d', 'r'>: Use set_marker_both.
Richard M. Stallman [Thu, 1 Jan 1998 06:47:25 +0000 (06:47 +0000)]
(Fcall_interactively) <'d', 'r'>: Use set_marker_both.

27 years ago(status_notify): Use byte and char pointers.
Richard M. Stallman [Thu, 1 Jan 1998 06:45:08 +0000 (06:45 +0000)]
(status_notify): Use byte and char pointers.

(Fprocess_send_region): Make bytepos for send_process.
(read_process_output): Save, restore, and update both kinds of ptrs.
(send_process): OFFSET is now in bytes.

27 years ago(set_point, temp_set_point): Swap args in decl.
Richard M. Stallman [Thu, 1 Jan 1998 06:41:39 +0000 (06:41 +0000)]
(set_point, temp_set_point): Swap args in decl.
(set_point_both, temp_set_point_both): New decls.

27 years ago(PRINTDECLARE): Declare old_point_byte and start_point_byte.
Richard M. Stallman [Thu, 1 Jan 1998 06:40:47 +0000 (06:40 +0000)]
(PRINTDECLARE): Declare old_point_byte and start_point_byte.
(PRINTPREPARE): For a marker, set old_point_byte and start_point_byte.
Set both kinds of PT from the marker.
(PRINTFINISH): For a marker, use set_marker_both.
Restore both kinds of PT.
(print): For strings and symbols, handle multibyte chars.

27 years ago(readchar_backlog): New variable.
Richard M. Stallman [Thu, 1 Jan 1998 06:38:45 +0000 (06:38 +0000)]
(readchar_backlog): New variable.
(readchar): When fetching from buffer or marker,
use readchar_backlog to fetch bytes from a character.
(unreadchar): Increment readchar_backlog.
(readevalloop, Fread): Init readchar_backlog.

27 years ago(scan_newline): Always restore prev value of immediate_quit.
Richard M. Stallman [Thu, 1 Jan 1998 06:35:47 +0000 (06:35 +0000)]
(scan_newline): Always restore prev value of immediate_quit.

27 years ago(scan_sexps_forward): Additional arg FROM_BYTE. Calls changed.
Richard M. Stallman [Thu, 1 Jan 1998 06:31:54 +0000 (06:31 +0000)]
(scan_sexps_forward): Additional arg FROM_BYTE.  Calls changed.
(find_defun_start): Additional arg POS_BYTE.
Save final byte pos in find_start_value_byte.
(find_start_value_byte): New variable.

(Fforward_comment): Scan by bytes and chars.
(Fbackward_prefix_chars): Scan by bytes and chars.
(scan_words, scan_sexps_forward): Scan bytes as well as chars.
(skip_chars, scan_lists): Scan by bytes and chars.  Now static.

(char_quoted): Take charpos and bytepos as args.
(back_comment): Likewise.
(update_syntax_table): Arg renamed.
(inc_bytepos, dec_bytepos): New functions.

27 years ago(looking_at_1): Use bytepos to call re_search_2.
Richard M. Stallman [Thu, 1 Jan 1998 02:52:20 +0000 (02:52 +0000)]
(looking_at_1): Use bytepos to call re_search_2.
Convert search regs to charpos, if search succeeded.
(search_buffer): Likewise.  Also convert charpos <-> bytepos
in non-regexp case.
(scan_buffer): Convert charpos <-> bytepos.
(scan_newline): New function.
(find_next_newline): Function deleted.
(set_search_regs): Args now in bytes; convert to charpos.
(Freplace_match): Convert charpos <-> bytepos when scanning case.

27 years ago(SETUP_SYNTAX_TABLE_FOR_OBJECT): Call bytepos_to_charpos.
Richard M. Stallman [Thu, 1 Jan 1998 02:46:10 +0000 (02:46 +0000)]
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Call bytepos_to_charpos.
Wrap in  if (1) ... else.

27 years ago(casify_region): Scan in bytes and chars.
Richard M. Stallman [Thu, 1 Jan 1998 02:45:12 +0000 (02:45 +0000)]
(casify_region): Scan in bytes and chars.
(casify_object, casify_region): Declare str, workbuf as unsigned char.

27 years ago(marker.o): Depend on charset.h.
Richard M. Stallman [Thu, 1 Jan 1998 02:44:17 +0000 (02:44 +0000)]
(marker.o): Depend on charset.h.

27 years ago(forward_point): Function deleted.
Richard M. Stallman [Thu, 1 Jan 1998 02:42:48 +0000 (02:42 +0000)]
(forward_point): Function deleted.
(Fforward_point): Just add.
(Fforward_char): Don't call forward_point, just add.
(Fforward_line): Use scan_newline.
(Fdelete_char): No need for forward_point, just add.
(Fdelete_backward_char): Handle bytes and chars.
(internal_self_insert): Handle bytes and chars.

27 years ago(struct position): New field bytepos.
Richard M. Stallman [Thu, 1 Jan 1998 02:40:05 +0000 (02:40 +0000)]
(struct position): New field bytepos.

27 years ago(command_loop_1): Use PT_BYTE when calling FETCH_BYTE.
Richard M. Stallman [Thu, 1 Jan 1998 02:39:04 +0000 (02:39 +0000)]
(command_loop_1): Use PT_BYTE when calling FETCH_BYTE.
Instead of Fforward_point, just add.

27 years ago(Fmake_indirect_buffer): Use set_marker_both.
Richard M. Stallman [Thu, 1 Jan 1998 02:37:16 +0000 (02:37 +0000)]
(Fmake_indirect_buffer): Use set_marker_both.
(set_buffer_internal_1): Likewise.
(set_buffer_temp): Likewise.

(set_buffer_temp): Update BUF_PT_BYTE, BUF_BEGV_BYTE and BUF_ZV_BYTE.
(Fmake_indirect_buffer, set_buffer_internal_1):
Set up the pt, begv and zv markers with both kinds of position.
Set BUF_PT_BYTE, BUF_BEGV_BYTE, BUF_ZV_BYTE.
(Fget_buffer_create): Set BUF_..._BYTE.

27 years ago(marker_byte_position): Renamed from marker_position.
Richard M. Stallman [Thu, 1 Jan 1998 02:35:09 +0000 (02:35 +0000)]
(marker_byte_position): Renamed from marker_position.
(marker_position): New function returns the charpos.
(Fbuffer_has_markers_at): Test the marker's charpos.
(set_marker_restricted, Fset_marker): Set both kinds of position.
Optimize case where POSITION is a marker.
(set_marker_both, set_marker_restricted_both): New functions.
(Fmarker_position): Use the charpos.

(charpos_to_bytepos, bytepos_to_charpos): New functions.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): New functions.

27 years ago(redisplay_internal): Use scan_newline.
Richard M. Stallman [Thu, 1 Jan 1998 02:27:27 +0000 (02:27 +0000)]
(redisplay_internal): Use scan_newline.
(try_window_id): Use scan_newline.
(display_text_line): Use scan_newline.

(pos_tab_indent): Moved from indent,c.  Now static.
Take POS in bytes and chars.  Callers changed.

(redisplay_window): Handle byte and char positions.
(try_window): Don't move W->start if it's already at right place.

(display_count_lines): Several changes in args.
Do the work directly.
(display_scan_buffer): Function deleted.
(decode_mode_spec): Pass new arg.
(message_log_check_duplicate): Take charpos and bytepos args.
(message_dolog): Use markers to update old PT, BEGV, ZV.
Use scan_newline.  Handle positions in bytes and chars.

(try_window): Pass bytepos to and from display_text_line.
(try_window_id): Likewise.  Use byte pos as well as charpos.
(redisplay_internal): Handle bytepos for tlbufpos.

(message): Cast last arg to doprnt.

27 years ago(unshow_buffer): Set PT with TEMP_SET_PT_BOTH.
Richard M. Stallman [Thu, 1 Jan 1998 02:07:14 +0000 (02:07 +0000)]
(unshow_buffer): Set PT with TEMP_SET_PT_BOTH.

(Fset_window_buffer): Use set_marker_both.
(Fselect_window, Fscroll_other_window, save_window_save): Likewise.
(Fset_window_configuration): Pass p->mark itself to Fset_marker
and set_marker_restricted_both.
(temp_output_buffer_show): Use set_marker_restricted_both.
(window_scroll): Save and restore both kinds of pointers.

(Fdelete_other_windows): Rely on vmotion to give bytepos.
Use set_marker_both.  Use byte positions.
(Frecenter): Likewise.
(Fmove_to_window_line): Use set_marker_both and Fgoto_char.