1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00
Commit graph

20528 commits

Author SHA1 Message Date
Richard M. Stallman
977101145a (minor-mode-overriding-map-alist):
Call make-variable-buffer-local.
1998-01-02 23:52:11 +00:00
Richard M. Stallman
64dd362982 (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.
1998-01-02 23:37:19 +00:00
Richard M. Stallman
f171f7c363 (Fchar_boundary_p): Function deleted.
(syms_of_charset): defsubr deleted.
1998-01-02 23:23:21 +00:00
Richard M. Stallman
7d92db5882 (make_gap): Set GPT_BYTE along with GPT. 1998-01-02 23:12:03 +00:00
Richard M. Stallman
c5059c2cf2 (which-func-update): Fix paren error. 1998-01-02 23:04:39 +00:00
Richard M. Stallman
5303ab61e0 Initial revision 1998-01-02 21:48:33 +00:00
Richard M. Stallman
fe0066f50f (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.
1998-01-02 21:43:42 +00:00
Richard M. Stallman
4356f22179 (Fcompleting_read): Doc fix. 1998-01-02 21:31:46 +00:00
Richard M. Stallman
363aa82029 (struct Lisp_Marker): Rename bufpos' to bytepos'.
Its value no longer includes the gap space.
1998-01-02 21:30:28 +00:00
Richard M. Stallman
80f6e77c70 (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.
1998-01-02 21:29:48 +00:00
Richard M. Stallman
6ced1284f3 (internal_equal): For markers, use bytepos instead of bufpos. 1998-01-02 21:28:56 +00:00
Richard M. Stallman
a3123c1330 (readchar): Use marker's bytepos instead of bufpos. 1998-01-02 21:27:40 +00:00
Richard M. Stallman
193b12cacd (Fmake_marker): Initialize marker's bytepos and charpos. 1998-01-02 21:27:13 +00:00
Richard M. Stallman
f3e1f75263 (transpose_markers): Update marker's bytepos. 1998-01-02 21:26:32 +00:00
Richard M. Stallman
1f03507fc9 (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.
1998-01-02 21:26:05 +00:00
Richard M. Stallman
39a10fc6e8 (customize-changed-options): Doc fix. 1998-01-02 21:17:27 +00:00
Richard M. Stallman
9d1af5be4a (Fchar_after): Fix previous change. 1998-01-02 21:06:08 +00:00
Richard M. Stallman
b90132005a (a_write): Fix prototype. 1998-01-01 08:41:38 +00:00
Richard M. Stallman
4ed24bf3a7 (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.
1998-01-01 07:14:33 +00:00
Richard M. Stallman
ec1c14f661 (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.
1998-01-01 07:09:35 +00:00
Richard M. Stallman
ef1900f30c (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.
1998-01-01 07:08:33 +00:00
Richard M. Stallman
6289dd10a0 (code_convert_region): Handle bytepos and charpos.
(Fdetect_coding_region): Likewise.
1998-01-01 07:05:26 +00:00
Richard M. Stallman
3be111318f (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.
1998-01-01 07:03:19 +00:00
Richard M. Stallman
604ee0f3ab Update copyright year. 1998-01-01 06:51:31 +00:00
Richard M. Stallman
69f9064e5d (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.
1998-01-01 06:49:17 +00:00
Richard M. Stallman
dc33013920 (Fcall_interactively) <'d', 'r'>: Use set_marker_both. 1998-01-01 06:47:25 +00:00
Richard M. Stallman
d8a2934ed2 (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.
1998-01-01 06:45:08 +00:00
Richard M. Stallman
fdccf4469e (set_point, temp_set_point): Swap args in decl.
(set_point_both, temp_set_point_both): New decls.
1998-01-01 06:41:39 +00:00
Richard M. Stallman
6ddd6eee02 (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.
1998-01-01 06:40:47 +00:00
Richard M. Stallman
6f7f43d59d (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.
1998-01-01 06:38:45 +00:00
Richard M. Stallman
d5d57b92e2 (scan_newline): Always restore prev value of immediate_quit. 1998-01-01 06:35:47 +00:00
Richard M. Stallman
6a140a74ab (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.
1998-01-01 06:31:54 +00:00
Richard M. Stallman
fa8ed3e084 (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.
1998-01-01 02:52:20 +00:00
Richard M. Stallman
4bbd5bc314 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Call bytepos_to_charpos.
Wrap in  if (1) ... else.
1998-01-01 02:46:10 +00:00
Richard M. Stallman
4c7b7eabfd (casify_region): Scan in bytes and chars.
(casify_object, casify_region): Declare str, workbuf as unsigned char.
1998-01-01 02:45:12 +00:00
Richard M. Stallman
3fa51c4e52 (marker.o): Depend on charset.h. 1998-01-01 02:44:17 +00:00
Richard M. Stallman
049749e656 (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.
1998-01-01 02:42:48 +00:00
Richard M. Stallman
ac98710cef (struct position): New field bytepos. 1998-01-01 02:40:05 +00:00
Richard M. Stallman
8458ede666 (command_loop_1): Use PT_BYTE when calling FETCH_BYTE.
Instead of Fforward_point, just add.
1998-01-01 02:39:04 +00:00
Richard M. Stallman
3f236a4066 (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.
1998-01-01 02:37:16 +00:00
Richard M. Stallman
1389ad718c (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.
1998-01-01 02:35:09 +00:00
Richard M. Stallman
12adba3450 (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.
1998-01-01 02:27:27 +00:00
Richard M. Stallman
b73ea88edf (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.
1998-01-01 02:07:14 +00:00
Richard M. Stallman
6ae1f27ebf (Fchars_in_string): Update call to CHAR_HEAD_P.
(chars_in_text, str_cmpchar_id, Fcompose_string): Likewise.

(Fchar_boundary_p): Always return 0.
(Fchars_in_region): Just subtract the arguments.
(chars_in_text): New function.
(Ffind_charset_region): Scan in bytepos as well as charpos.
1997-12-31 22:18:06 +00:00
Richard M. Stallman
ec7adf2664 (Finsert_file_contents): Update call to CHAR_HEAD_P.
(Fwrite_region): Use scan_newline.

(restore_point_unwind): Now static.  Use Fgoto_char.
(Funhandled_file_name_directory): Doc fix.
(Finsert_file_contents): Handle bytes vs chars.
(Fwrite_region): Handle bytes vs chars.
(a_write): Take args in bytes; handle annotations labeled in chars.
(e_write): Rename args.
(Funhandled_file_name_directory): Doc fix.
(a_write, e_write): Now static.
1997-12-31 22:16:35 +00:00
Richard M. Stallman
a9c26562b3 (Fminibuffer_complete_word): Handle bytes vs characters
when comparing buffer against string.
(temp_echo_area_glyphs): Save, update, delete text using
byte and char positions.
(read_minibuf): BACKUP_N counts bytes.
1997-12-31 21:56:00 +00:00
Richard M. Stallman
c399b46133 (CHAR_HEAD_P): Take char, not pointer, as arg.
(INC_POS, DEC_POS): Fix because arg is a bufpos.
(BUF_INC_POS, BUF_DEC_POS): New macros.
(INC_BOTH, DEC_BOTH): New macros.
1997-12-31 21:49:31 +00:00
Richard M. Stallman
a50545d958 (doprnt1): Call to CHAR_HEAD_P fixed. 1997-12-31 21:48:28 +00:00
Richard M. Stallman
aa406bac5f (describe_abbrev): Return void.
(write_abbrev): Return void.
(Fexpand_abbrev): Scan in bytepos along with charpos.
(Funexpand_abbrev): Use bytepos to delete the expansion.
1997-12-31 05:05:32 +00:00
Richard M. Stallman
92bb366afa (LIB_MOTIF): Define, if HAVE_LIBINTL.
(LIBX11_SYSTEM): Undo previous change.
1997-12-31 04:44:31 +00:00