1998-08-19 Richard Stallman * Version 20.3 released. * callproc.c (Fcall_process): Use malloc for decoding_buf. * s/freebsd.h (LD_SWITCH_SYSTEM): Delete -dp. * s/ms-w32.h (SYSTEM_PURESIZE_EXTRA): Increased. 1998-08-18 Richard Stallman * xselect.c (selection_data_to_lisp_data): Code-convert selections regardless of enable-multibyte-characters. (lisp_data_to_selection_data): Likewise for decoding. 1998-08-18 Ken'ichi Handa * ccl.c (ccl_driver): In case ccl_read_multibyte_character_suspend:, if ccl->last_block is nonzero, jump to ccl_repeat. 1998-08-18 Kenichi Handa * ccl.c (CCL_READ_CHAR): If eof is encounterd while processing the last block, don't just finish but processes eol block of the current CCL program. (ccl_driver): Add a new jump label ccl_repeat for the above change. * coding.c (ccl_coding_driver): Setup ccl->last_block properly. (setup_coding_system): Correctly setup `valid_codes' member. * term.c (write_glyphs): When terminal_coding require flushing, call encode_coding with "" as the SOURCE arg so that ccl_driver correctly processes eof block of a CCL program. 1998-08-18 Richard Stallman * keyboard.c (read_char): If not reading a key sequence (MAPS is nil), bind input-method-exit-on-first-char and input-method-use-echo-area to t. (read_char): If PREV_EVENT is non-nil, don't run the input method. (read_key_sequence): Do not bind input-method-function. * callint.c (Fcall_interactively): Pass new args to Fread_event and Fread_char. Let Fread_char do the prompting. * lread.c (read_filtered_event): New arg INPUT_METHOD. Calls changed. (Fread_event): New args PROMPT and SUPPRESS-INPUT-METHOD. (Fread_char, Fread_char_exclusive): Likewise. * lisp.h (Fread_event, Fread_char, Fread_char_exclusive): Update declarations. * fns.c (Fy_or_n_p): Don't bind input-method-function. Instead, pass 0 as INPUT_METHOD to read_filtered_event. * insdel.c (replace_range): Rename NOMARKERS arg to MARKERS. * editfns.c (Ftranspose_regions): Pass 0 as NOMARKERS to replace_range. * cmds.c (internal_self_insert): Pass 1 as NOMARKERS to replace_range. * fns.c (Fy_or_n_p): Bind input-method-function to nil. 1998-08-17 Richard Stallman * keyboard.c (Freset_this_command_lengths): Return nil. (read_char): [Changes in the input method code.] Process and clear before_command_restore_flag before the input method. Save and restore ok_to_echo_at_next_pause and current_kboard->echo_after_prompt. Save, copy and empty this_command_keys, if it is not empty. Clear the echo area before the input method. Then in all cases restore this_command_keys, and reenable echoing if it was enabled before. 1998-08-16 Richard Stallman * charset.c (Fmultibyte_char_to_unibyte): New function. (syms_of_charset): defsubr it. 1998-08-15 Richard Stallman * xterm.c, xterm.h: x_display_unibyte_char_with_fontset renamed to unibyte_display_via_language_environment. * xfns.c (unibyte_display_through_language_environment): Renamed from x_display_unibyte_char_with_fontset. * xterm.h (widget_store_internal_border): Conditionalize declaration. 1998-08-15 Kenichi Handa * coding.c (coding_category_name): Fix the order of initial contents. (detect_coding_mask): Fix previous change. * insdel.c (copy_text): Fix previous change, call multibyte_char_to_unibyte. * puresize.h (BASE_PURESIZE): Increased. * xfns.c (x_display_unibyte_char_with_fontset): New variable. (syms_of_xfns): Declare x-display-unibyte-char-with-fontset as a Lisp variable. * xterm.h (x_display_unibyte_char_with_fontset): Extern it. * xterm.c (dumpglyphs): If x_display_unibyte_char_with_fontset is nonzero, convert a unibyte 8-bit char to a multibyte char and display it by a font listed in the current fontset. * xselect.c (Vnext_selection_coding_system): New variable. (selection_data_to_lisp_data): If Vnext_selection_coding_system is non-nil, use it. (lisp_data_to_selection_data): Likewise. (syms_of_xselect): Declare next-selection-coding-system as a Lisp variable. 1998-08-13 Eli Zaretskii * msdos.c (dos_set_keyboard): Set up stack and flags before calling _go32_dpmi_simulate_int. 1998-08-13 Andrew Innes * w32.c (stat): Fall-back to default behaviour when we cannot get accurate information on file attributes. 1998-08-12 Richard Stallman * indent.c (vmotion): Don't use WINDOW for Fget_char_property when it is not showing the right buffer. 1998-08-11 Richard Stallman * process.c (wait_reading_process_input): If a pty gives EIO, raise SIGCHLD just in case. 1998-08-10 Richard Stallman * syntax.c (scan_sexps_forward): Set up the syntax table scanning stuff before jumping into the loop. 1998-08-10 Eli Zaretskii * msdos.c (IT_cmgoto): In the echo area, only put the cursor at the end of text if it is beyond the displayed text end. 1998-08-10 Richard Stallman * keyboard.c (read_char): Don't decrement this_command_key_count when saving it. 1998-08-09 Kenichi HANDA * fileio.c (Fwrite_region): Reflect the eol conversion specification of default value of buffer-file-coding-system if any. * coding.c (default_buffer_file_coding): New variable. (init_coding_once): Initialize default_buffer_file_coding. * coding.h (default_buffer_file_coding): Extern it. 1998-08-09 Richard Stallman * s/freebsd.h (__FreeBSD_version): Define it, or else include osreldate.h to define it. (LIB_GCC): Unconditional definition deleted. [ELF] (LD_SWITCH_SYSTEM, START_FILES, UNEXEC, LIB_STANDARD, LIB_GCC): New alternative definitions. [! ELF] (START_FILES, LIB_GCC): New alternative definitions. * unexelf.c (unexec): Check for section names end and edata with no underscore. * coding.c (CHARSET_OK): Check that coding_system_table[IDX] != 0. 1998-08-08 Richard Stallman * coding.c: Avoid using initializers for Lisp_Object. 1998-08-07 Paul Eggert * xterm.c (x_term_init): Don't reset LC_TIME to "C", since we want strftime to be localized. 1998-08-07 Richard Stallman * s/ptx4-2.h: New file. * xterm.c (x_list_fonts): Fix previous change. * callproc.c (Fcall_process): Check type of process cmd args earlier on. * process.c (Fprocess_send_eof): Transfer proc_encode_coding_system data to the new outfd. * commands.h (Vthis_command): Renamed from this_command. * minibuf.c (Fminibuffer_complete): this_command renamed to Vthis_command. * macros.c (Fcall_last_kbd_macro): this_command renamed to Vthis_command. * keyboard.c (Vthis_command): Renamed from this_command. (real_this_command): New variable, but not a Lisp variable; updated like Vthis_command, but never altered by Lisp programs. (command_loop_1): Use real_this_command to set Vreal_last_command. 1998-08-07 Kenichi Handa * cmds.c (internal_self_insert): If enable-multibyte-characters is nil, convert a multibyte character to unibyte appropriately. * editfns.c (general_insert_function): Likewise. * charset.c (multibyte_char_to_unibyte): New function. (charset_id_internal): Avoid initializer for Lisp_Object. (init_charset_once): Likewise. * lisp.h (multibyte_char_to_unibyte): Extern it. 1998-08-06 Richard Stallman * window.c (Fsplit_window): Doc fix. * macros.c (Fexecute_kbd_macro): Fix error message. (Fend_kbd_macro): Fix error message. * coding.c (setup_coding_system): Avoid initializer for Lisp_Object. (setup_raw_text_coding_system, detect_coding): Likewise. (code_convert_region, code_convert_string): Likewise. (Fset_coding_priority_internal): Likewise. 1998-08-06 Kenichi Handa * dired.c (Fdirectory_files): If MATCH is non-nil, decode filenames before checking them against MATCH. 1998-08-05 Richard Stallman * keyboard.c (read_char): When input method returns no chars, call cancel_echoing. Restore the previous echo area message and this_command_keys, too. * abbrev.c (Funexpand_abbrev): Add ADJUST instead of subtracting. * w32select.c (Vselection_coding_system): Renamed from Vclipboard_coding_system. (syms_of_w32select): No need to staticpro Vselection_coding_system. 1998-08-04 Eli Zaretskii * w16select.c (Vselection_coding_system): Renamed from Vclipboard_coding_system. (Fw16_set_clipboard_data): Don't count trailing zero in the string for the purposes of conversion. 1998-08-04 Richard Stallman * xterm.c (x_list_fonts): Call XFreeFont after the new call to XLoadQueryFont. (fast_find_position): Handle case where position is before an invisible character, thus not actually listed in charstarts. * keyboard.c (Vinput_method_previous_message): New variable. (syms_of_keyboard): Set up lisp variable. (Qinput_method_exit_on_first_char, Qinput_method_use_echo_area): New variables. (syms_of_keyboard): Initialize them. (Fread_key_sequence): New arg COMMAND_LOOP. Bind those variables. * lisp.h (Fread_key_sequence): Update declaration. * callint.c (Fcall_interactively): Pass new arg to Fread_key_sequence. 1998-08-03 Richard Stallman * window.c (Fmove_to_window_line): Doc fix. * xterm.h (FRAME_OUTER_WINDOW): New macro. * xterm.c (x_make_frame_visible): Use XGetGeometry to see if position has been changed by the window manager. Use FRAME_OUTER_WINDOW. * insdel.c (replace_range): Don't assume PT is at the place where the change is being done. * editfns.c (Fsubst_char_in_region): Use replace_range in case where we may need to combine bytes. (Ftranslate_region): Likewise. 1998-08-01 Richard Stallman * lread.c (read1): In reading a string, treat Qlambda like Qget_file_char. * doc.c (Fdocumentation): Specify UNIBYTE = 0 when calling get_doc_string for a compiled function. 1998-08-01 Kenichi HANDA * ccl.h (ccl_spec): New member valid_codes. * coding.c (Qvalid_codes): New variable. (coding_category_name): Include "coding-category-ccl". (detect_coding_ccl): New function. (setup_coding_system): Setup coding->spec.ccl.valid_codes from the coding system priority `valid-codes' for CCL based coding systesm. (detect_coding_mask): Check also a CCL based coding system. (Fupdate_coding_systems_internal): Renamed from Fupdate_iso_coding_systems. (syms_of_coding): Change property char-table-extra-slot of translation-table to 1. Initialize and static pro Qvalid_codes. * coding.h (CODING_CATEGORY_IDX_CCL): New macro. (CODING_CATEGORY_IDX_BIG5, CODING_CATEGORY_IDX_RAW_TEXT, CODING_CATEGORY_IDX_BINARY, CODING_CATEGORY_IDX_MAX): Increased by one. (CODING_CATEGORY_MASK_CCL): New macro. (CODING_CATEGORY_MASK_ANY): Include CODING_CATEGORY_MASK_CCL. * insdel.c (copy_text): In multibyte to unibyte conversion, take nonascii-translation-table and nonascii-insert-offset into account. 1998-07-30 Paul Eggert * src/Makefile.in (widget.o, xfns.o, xmenu.o): Prepend $(srcdir)/ to rule dependencies outside this dir. 1998-07-29 Kenichi Handa * fns.c (concat): Fix previous change. 1998-07-29 Richard Stallman * process.c (create_process): For outchannel, set up proc_encode_coding_system, not proc_decode_coding_system. 1998-07-28 Richard Stallman * keymap.c (push_key_description): Output multibyte char as itself. 1998-07-27 Richard Stallman * keyboard.c (Fexecute_extended_command): Don't delay before displaying the suggestion message if the command did not display anything in the echo area. 1998-07-26 Richard Stallman * s/ultrix4-3.h (rint): Add declaration. 1998-07-25 Richard Stallman * s/aix3-2.h (HAVE_STRING_H): Move #undef here. * s/aix4.h (HAVE_STRING_H): Delete #undef here. * sysdep.c [AIXHFT] (hft_init, hft_reset): Add declarations. 1998-07-25 Kenichi Handa * coding.c (syms_of_coding): Mention auto-coding-alist in the docstring of file-coding-system-alist. * fileio.c (Finsert_file_contents): Call Vset_auto_coding_function with two arguments. (Fwrite_region): If buffer-file-coding-system is set locally, use the coding system whithout checking file-coding-system-alist. (syms_of_fileio): Docstring of set-auto-coding-function adjusted for the change of argument number. 1998-07-20 Kenichi HANDA * callproc.c (Fcall_process): Use alloca instead of get_conversion_buffer. * coding.c (init_coding): New function. (init_coding_once): Don't initialize conversion_buffer here. It is done in init_coding. * emacs.c (main): Call init_coding. * lisp.h (init_coding): Extern it. 1998-07-19 Kenichi Handa * charset.c (Fdefine_charset): Fix doc-string. * xterm.c (dumpglyphs): After calling ccl_driver, set cp->byte1 to zero for 1-byte font. 1998-07-15 kenichi HANDA * process.c (read_process_output): Even if we read data without code conversion, calculate character counts. If we insert the data into a unibyte buffer, treat the data as unibyte. 1998-07-14 Richard Stallman * keyboard.c (Qinput_method_function): New variable. (syms_of_keyboard): Init and staticpro it. (read_key_sequence): Bind input-method-function, and set it to nil after reading the first event. (raw_keybuf, raw_keybuf_count): New variables, to record raw input events as they are read with read_char. (GROW_RAW_KEYBUF): New macro. (Fthis_single_command_raw_keys): New function. (syms_of_keyboard): defsubr it. 1998-07-13 Andrew Innes * w32menu.c (add_menu_item): Draw menu items like titles if call_data is 0. 1998-07-13 Eli Zaretskii * w16select.c (set_clipboard_data, get_clipboard_data, Fw16_set_clipboard_data, Fw16_get_clipboard_data, Fx_selection_exists_p): Use CF_OEMTEXT instead of CF_TEXT. 1998-07-12 Andrew Innes * w32select.c: (Fw32_set_clipboard_data): Set Vlast_coding_system_used. (Fw32_get_clipboard_data): Likewise. 1998-07-12 Richard Stallman * marker.c (Fcopy_marker): Make return from wrong_type_argument fall thru into normal case. * fileio.c (Finsert_file_contents): When replacing, in multibyte bfr, always extend the range to a character boundary. 1998-07-11 Richard Stallman * keyboard.c (read_char): Call the input method if appropriate. Change logic for distinguishing rereads from new events; use local var `reread'. Take events from Vunread_input_method_events and Vunread_post_input_method_events. (Vunread_input_method_events, Vunread_post_input_method_events) (Vinput_method_function): New variable. (syms_of_keyboard): Set up Lisp vars. (command_loop_1): Check Vunread_input_method_events and Vunread_post_input_method_events along with Vunread_command_events. 1998-07-11 Andrew Innes * w32menu.c (w32_menu_show): Set widget call_data to 0 if definition is nil. (add_menu_item): Gray menu entry if widget call_data is 0. 1998-07-11 Richard Stallman * xselect.c (Vselection_coding_system): Renamed from Vclipboard_coding_system. All uses changed. (syms_of_xselect): Rename Lisp variable. 1998-07-09 Eli Zaretskii * w16select.c (Vclipboard_coding_system): New variable. (set_clipboard_data, set_clipboard_data): New parameter Raw determines whether CRLF <-> NL translation needs to be done. All callers changed. (Fw16_set_clipboard_data): Encode the text using Vclipboard_coding_system, if necessary. (Fw16_get_clipboard_data): Decode the text using Vclipboard_coding_system, if necessary. (syms_of_win16select): DEFVAR Vclipboard_coding_system and staticpro it. 1998-07-09 Kenichi Handa * coding.c (code_convert_string): Count characters again if we encounter some invalid code while decoding. 1998-07-09 Kenichi Handa * ccl.c: Typo in comments fixed. * coding.c (DECODE_ISO_CHARACTER): While decoding two-byte code, if the sencond byte is invalid, produce the first byte as is. * fontset.c (fs_load_font): Typo in comments fixed. * xselect.c (selection_data_to_lisp_data): Set Vlast_coding_system_used. (lisp_data_to_selection_data): Likewize. 1998-07-07 Richard Stallman * charset.c (Fchars_in_region): Coerce markers. 1998-07-08 Kenichi Handa * editfns.c (Fformat): Replace explicit numeric constants with proper macros. * fns.c (concat): Likewize. 1998-07-06 Kenichi Handa * charset.h (MAX_CHAR_COMPOSITION): Defined as (GLYPH_MASK_CHAR - 1), one less than the previous value. (GENERIC_COMPOSITION_CHAR): New macro. * charset.c (Vgeneric_character_list): New variable. (init_charset_once): Init and staticpro it. (Fgeneric_character_list): New function. (syms_of_charset): defsubr it. * fns.c (Fset_char_table_default): Check only if the charset of the arg CH is in the valid range or not. Handle the case that CH is a generic character for composite characters. 1998-07-06 Kenichi Handa * editfns.c (Fformat): Pay attention to the byte combining problem. * fileio.c (Finsert_file_contents): Cancel previous change. Setup the variable coding even if the inserted bytes is zero. * fns.c (concat): Deal with combining bytes between two args. 1998-07-03 Richard Stallman * print.c (print_escape_multibyte, Qprint_escape_multibyte) (Qprint_escape_nonascii): New variables. (syms_of_print): Initialize them and set up Lisp variable. (PRINTPREPARE): Bind print-escape-multibyte to t if appropriate. Also bind print-escape-nonascii if appropriate. (print): Test print_escape_multibyte and print_escape_nonascii, rather than enable-multibyte-characters. 1998-06-29 Andrew Innes * fileio.c (Ffile_regular_p) [WINDOWSNT]: Bind `w32-get-true-file-attributes' to t while calling stat. (Finsert_file_contents) [WINDOWSNT]: Likewise. (Fwrite_region): Don't try seeking to end of FILENAME for appending if not a regular file. 1998-07-03 Kenichi Handa * editfns.c (Finsert): Typo in doc-string fixed. (Finsert_and_inherit, Finsert_before_markers, Finsert_and_inherit_before_markers): Likewize. 1998-07-02 Ken'ichi Handa * fileio.c (Finsert_file_contents): Do not set Vlast_coding_system if inserted bytes is zero. 1998-06-28 Eli Zaretskii * unexec.c [COFF]: New variable coff_offset. (make_hdr) [MSDOS]: If a_name is a coff-go32-exe executable with a prepended stub, compute coff_offset. (make_hdr, copy_sym) [COFF]: Use coff_offset when seeking into temacs. 1998-06-29 Richard Stallman * editfns.c (Fbyte_to_position): New function. (syms_of_editfns): defsubr it. 1998-06-29 Eli Zaretskii * callproc.c (Fcall_process) [! subprocesses]: Balance parentheses in an if clause. 1998-06-28 Richard Stallman * fileio.c (Fread_file_name): Bind minibuffer-completing-file-name to t. * minibuf.c (Vminibuffer_completing_file_name): New var. (syms_of_minibuf): Set up Lisp variable. (Fminibuffer_complete_word): Test it, instead of checking specifically for Qread_file_name_internal. (Fcompleting_read): Likewise. 1998-06-27 Richard Stallman * xterm.c (x_list_fonts): Fix prev change: cast result of alloca. 1998-06-26 Ken'ichi Handa * coding.h (Qemacs_mule): Extern it. * process.c (init_process): Initilize Vdefault_process_coding_system. 1998-06-26 Kenichi Handa * coding.c (setup_raw_text_coding_system): New function. (decode_coding_sjis_big5): Bug for handling invalid code fixed. * coding.h (setup_raw_text_coding_system): Extern it. * fileio.c (Finsert_file_contents): Call setup_raw_text_coding_system. * process.c (Fstart_process): Check process-coding-system-alist and default-process-coding-system even in unibyte mode. (create_process): In unibyte mode, suppress character code conversion. 1998-06-25 Andrew Innes * w32fns.c (Fx_list_fonts): Bring arglist into sync with xfns.c. (x_set_font): Call face-set-after-frame-default. (Qface_set_after_frame_default): New variable. (syms_of_w32fns): Initialize it. 1998-06-25 Richard Stallman * search.c (wordify): Fix i_byte even in unibyte case for copy loop. If input is unibyte, make the output unibyte. 1998-06-24 Richard Stallman * print.c (PRINTFINISH): Convert text to unibyte before inserting in a unibyte buffer. * doc.c (get_doc_string): Take both UNIBYTE and DEFINITION as args. All callers changed. * lisp.h (get_doc_string): Adjust declaration. * lread.c (read_list): Pass new arg to get_doc_string. * doc.c (get_doc_string): 2nd arg is now DEFINITION; if non-nil, read a dynamic function definition. (read_doc_string): Don't call read here. 1998-06-23 Richard Stallman * indent.c (indented_beyond_p): Return the right kind of value. 1998-06-22 Richard Stallman * emacs.c (sort_args): Discard duplicate options with no args. (main): With duplicate -d options, use the last one. Likewise for -t. Check -d last, by checking for -nl earlier on. 1998-06-22 Andreas Schwab * keyboard.c (command_loop): Reset executing_macro after command_loop_2 has returned, in case a throw to exit or top-level was executed as part of a keyboard macro. * callproc.c (Fcall_process): Handle third argument BUFFER consistently when it is an integer or a list. 1998-06-22 Kenichi Handa * syntax.c (Fmodify_syntax_entry): Use macro STRING_BYTES to get byte size of a string. 1998-06-22 Andrew Innes * w32select.c: Include buffer.h, charset.h, and coding.h. (Vclipboard_coding_system): New variable. (syms_of_w32select): DEF_VAR it. (Fw32_set_clipboard_data): Encode string using Vclipboard_coding_system if necessary. (Fw32_get_clipboard_data): Decode clipboard contents using Vclipboard_coding_system if necessary. * w32console.c (initialize_w32_display): Call init_crit to initialize interrupt_handle (referenced by sys_select). 1998-06-22 Richard Stallman * print.c (print_string): Properly compute number of chars in multibyte case, before calling strout. * lisp.h (Qinhibit_redisplay): Declared. * keyboard.c (menu_item_eval_property): Bind Qinhibit_redisplay. * xdisp.c (Vinhibit_redisplay, Qinhibit_redisplay): New variables. (syms_of_xdisp): Set up Lisp var. (redisplay_internal): Test Vinhibit_redisplay. 1998-06-21 Ken'ichi Handa * process.c (read_process_output): While processing carryover, check the size of p->decoding_buf. 1998-06-21 Eli Zaretskii * process.c (wait_reading_process_input) [! subprocesses]: Recompute timeout each time through the loop. Check requeued_events_pending_p and exit the loop if there is unread keyboard input. 1998-06-20 Richard Stallman * search.c (Freplace_match): Work by chars, not by bytes, for scanning the old text, and for inserting new string in buffer. 1998-06-20 Karl Heuer * xterm.c (x_list_fonts): Keep alloca usage simple. 1998-06-20 Per Starback * xdisp.c, charset.h, coding.c, emacs.c: Doc fixes. 1998-06-20 Kenichi Handa * print.c (strout): Show multibyte message correctly. * ccl.c: Comment for CCL_MapMultiple modified. * charset.c (find_charset_in_str): Do not set the value of charsets[LEADING_CODE_COMPOSITION]. * process.c (read_process_output): Handle carryover correctly. * xterm.c (dumpglyphs): Check the case that FACE_FONT (face) is NULL. While displaing cursor with non-default face, if the variable `font' is NULL, don't set GCFont. 1998-06-19 Richard Stallman * minibuf.c (syms_of_minibuf): Initialize buffer-name-history. 1998-06-18 Richard Stallman * casefiddle.c (casify_object): Cope with modifier bits in character. 1998-06-17 Geoff Voelker * w32.c (is_unc_volume, open_unc_volume, read_unc_volume, close_unc_volume, unc_volume_file_attributes): New functions. (wnet_enum_handle): New variable. (opendir, readdir, closedir, sys_access, stat): Handle UNC volumes. 1998-06-16 Kenichi Handa * xterm.c (x_list_fonts): If SIZE is zero and MAXNAMES is 1, use XLoadQueryFont instead of XListFonts. (x_load_fonts): Call x_list_fonts with MAXNAMES 1. 1998-06-16 Andrew Innes * xdisp.c (message_dolog): GCPRO the oldpoint, oldbegv and oldzv markers, and old_deactivate_mark. 1998-06-15 Andrew Innes * w32.c (sys_rename): On some network drives, rename fails with EACCES instead of EEXIST if target already exists. * coding.c (encode_eol): Fix typo that prevented converting to Mac line endings. Always update dst_bytes to number of bytes actually copied. (decode_eol): Fix value of coding->produced when decoding Unix line endings (in case this function is ever used for that). 1998-06-14 Ken'ichi Handa * fileio.c (Finsert_file_contents): Redo the change for handling set-auto-coding while adding a kludgy code to avoid a compiler bug. (syms_of_fileio): Doc-string of the variable set-auto-coding-function modified for the change above. 1998-06-14 Eli Zaretskii * msdos.c (dos_set_keyboard): Call Int 2Fh via the DPMI server, not directly. (dos_yield_time_slice): New function. (sys_select): Use it instead of __dpmi_yield. 1998-06-14 Erik Naggum * minibuf.c (Fcompleting_read): Escape bare newline in doc string. 1998-06-14 Richard Stallman * fileio.c (Finsert_file_contents): Fix change to set INSERTED. 1998-06-13 Richard Stallman * keyboard.c (parse_menu_item): Put a quote around DEF to pass it as an argument to the filter function. * syntax.c (skip_chars): Don't examine STRING before verifying that it is a string. 1998-06-13 Kenichi Handa * coding.c (detect_coding_system): Always return a list of HIGHEST is zero. (Fdetect_coding_region): Doc-string adjusted for the above change. (Fdetect_coding_string): Likewise. 1998-06-12 Richard Stallman * emacs.c (standard_args): Fix arg order to match code in `main'. 1998-06-12 Ken'ichi Handa * fileio.c (Finsert_file_contents): Undo the previous change for handling set-ault-coding. 1998-06-11 Richard Stallman * fileio.c (Finsert_file_contents): After calling handler, get INSERTED from the handler's value. * callint.c (Fcall_interactively) : If sequence ends in a down event, discard following up event. 1998-06-12 Kenichi Handa * fileio.c (set_auto_coding_unwind): New function. (Finsert_file_contents): If the current buffer is empty, decide the coding system after the file is inserted in the buffer. If not, insert the head and tail of a file in a temporary buffer and call set-auto-coding-function. (e_write): If there are carryover bytes in encoding because of incomplete multibyte form, write them out as is. 1998-06-11 Richard Stallman * syntax.c (scan_lists): Use prev_char_comend_first, not ...comstart... 1998-06-11 Geoff Voelker * makefile.nt (LINK_FLAGS): Place debug info in executable in unoptimized compile. Link to run off of cd or network. 1998-06-10 Richard Stallman * syntax.c (Fforward_comment): Properly compute BYTEPOS arg to char_quoted. 1998-06-09 Andrew Innes * w32.c (sys_rename): Don't examine errno if rename didn't fail. * s/ms-w32.h (getcwd): Remove define. (getdefdir) [emacs]: Redefine to always return root directory. 1998-06-09 Richard Stallman * lisp.h (Feval_region): Accept 4 args. * lread.c (readevalloop): New arg READFUN. Callers changed. (Feval_region): New arg READ_FUNCTION. 1998-06-08 Richard Stallman * syntax.h (SETUP_SYNTAX_TABLE): Don't call update_syntax_table for FROM-1 if that's before BEGV. 1998-06-07 Richard Stallman * syntax.c (struct lisp_parse_state): New field, levelstarts. (scan_sexps_forward): Use 10th elt of STATE to set levelstarts. (parse-partial-sexp): Add 10th elt to return value. * keyboard.c (lispy_function_keys): Add kanji...eisu-toggle. * keyboard.c (cmd_error): Init Vlast_prefix_arg. (init_kboard, command_loop_1): Init Vlast_prefix_arg. (Fcommand_execute): Set Vlast_prefix_arg to prefix arg used. * callint.c (syms_of_callint): Set up Lisp variable. * alloc.c (mark_kboards): Mark all the Lisp_Object fields. * keyboard.c (command_loop_1): Set Vreal_last_command with Vlast_command. (init_kboard): Init Vreal_last_command field. (syms_of_keyboard): Set up Lisp var real-last-command. * keyboard.h (struct kboard): New elts Vreal_last_command and Vlast_prefix_arg. 1998-06-06 Richard Stallman * xterm.c (XTread_socket): Accept Japanese XK keysyms. * xdisp.c (redisplay_internal): If cursor's in the frame's echo area, make last_point invalid instead of setting it normally. (display_text_line): If cursor's in the frame's echo area, don't set this_line_endpos. (redisplay_window): Use Fwindow_end to find lower scroll margin. * syntax.c (scan_lists): Properly skip the comment-fence character that ends a comment, when moving forward. (Fbackward_prefix_chars): Return immediately if point is at BEGV. * callproc.c (init_callproc): Check Vinstallation_directory even if !initialized. 1998-06-06 Richard Stallman * syntax.c (prev_char_comend_first): New function. (back_comment): Use that. Carefully update syntax table position for each character that is fetched. (Fforward_comment): Likewise. (scan_lists): Likewise. (prev_char_comstart_first): New function. * syntax.c 1998-06-05 Andrew Innes * w32.c: #include sys/file.h (sys_access): Provide our own implementation which recognizes D_OK. (is_exec): New function. (stat): Use it. (init_environment): Set TMPDIR to an existing directory. Abort if none of the usual places is available. (sys_rename): On Windows 95, choose a temp name that includes the original file's base name and use an explicit loop rather than calling mktemp. Only attempt to unlink the newname if the rename fails, rather than second-guessing whether the old and new names refer to the same file. * fileio.c (Finsert_file_contents): Always update Vlast_coding_system_used when we actually perform IO. (Fwrite_region): Update documentation. 1998-06-03 Richard Stallman * emacs.c (main): Don't implement --version if not initialized. * intervals.c (create_root_interval): Initialize position to 0 for a string. (interval_start_pos): New function. (find_interval): Handle string positions starting at 0. (adjust_intervals_for_insertion): Likewise. (adjust_intervals_for_deletion): Likewise. (compare_string_intervals): Likewise. (graft_intervals_into_buffer): Set `position' in reproduce_tree value. (copy_intervals): Init `position' to 0. * textprop.c: Handle the new convention that `position' values in a string's intervals start from zero. (validate_interval_range, interval_of, Fnext_property_change) (property_change_between_p, Fnext_single_property_change) (Fprevious_property_change, Fprevious_single_property_change): (Ftext_property_any, Ftext_property_not_all): Implement that. * textprop.c: Undo previous change. * coding.c (code_convert_string_norecord): New function. Does encoding or decoding but doesn't set Vlast_coding_system_used. * coding.h (DECODE_FILE, ENCODE_FILE): Use code_convert_string_norecord. 1998-06-02 Richard Stallman * sysdep.c (sys_subshell): Cast arg to chdir. (init_sys_modes): Cast arg to setbuf or setvbuf. * keyboard.c (syms_of_keyboard): Doc fix for suggest-key-bindings. 1998-06-02 Ken'ichi Handa * charset.c (string_to_non_ascii_char): Don't check the arg EXCLUDE_TAIL_GARBAGE for an invalid composite characters. 1998-06-01 Ken'ichi Handa * coding.c (detect_coding_mask): Initilize local variable C. 1998-06-01 Richard Stallman * emacs.c (main): Test `initialized' before clearing *Messages*. 1998-06-01 Karl Heuer * s/aix4.h (SOCKLEN_TYPE): Define as int. * callproc.c (Fcall_process): Avoid initializer on auto struct. 1998-06-01 Andrew Innes * s/ms-w32.h: Use 1 as explicit value of empty #defines. * makefile.nt (LOCAL_FLAGS): Define HAVE_NTGUI if appropriate. 1998-05-31 Karl Heuer * doprnt.c (doprnt1): Fix char signedness mismatches. * fileio.c (Finsert_file_contents): Likewise. 1998-05-31 Richard Stallman * dispnew.c (Fredraw_frame): Don't erase frame or its glyph records if it hasn't got any. 1998-05-30 Geoff Voelker * w32proc.c (sys_spawnve): Place Emacs pid in EM_PARENT_PROCESS_ID. * w32.c (sys_rename): Handle filenames with accented characters. (stat): Handle "c:/.." and "/.." specially. * unexw32.c (w32_fatal_reload_error): Update error message. 1998-05-30 Karl Heuer * Makefile.in (distclean): Delete config.stamp, stamp-oldxmenu. * window.c (Fscroll_up, Fscroll_down, Fscroll_other_window): Doc fix. * charset.c (syms_of_charset): Put \n\ at eol of docstring. 1998-05-29 Richard Stallman * textprop.c (Fnext_property_change): Properly offset interval position for string when comparing with LIMIT. (property_change_between_p): Likewise. (Fnext_single_property_change, Fprevious_property_change): Likewise. (Fprevious_single_property_change): Likewise. 1998-05-28 Richard Stallman * keyboard.c (command_loop_1): In shortcuts for forward-char etc., use FETCH_CHAR not FETCH_BYTE. 1998-05-28 Andrew Innes * lread.c (read1): Swap saved_doc_string_length and prev_saved_doc_string_length. (read_list): Negate docstring position if negative before checking against saved_doc_string_length et al. 1998-05-28 Richard Stallman * lread.c: Remember the last TWO strings skipped with #@. (prev_saved_doc_string*): New variables. (Fload): Initalize prev_saved_doc_string. (read1): Copy saved_doc_string to prev_saved_doc_string before storing a new string in saved_doc_string. (read_list): Look in prev_saved_doc_string as well as in saved_doc_string. 1998-05-25 Andrew Innes * doc.c (get_doc_string): Make non-static. * lisp.h: Add prototype for get_doc_string. * lread.c (read_vector): Add bytecodeflag parameter, which is nonzero when reading a bytecode object. If `load-force-doc-strings' is t when reading a lazily-loaded bytecode vector, the loaded docstring must be treated as unibyte and passed to Fread to obtain the actual bytecode string and constants vector. (read1): Add extra parameter to read_vector calls. (read1): Enable saving of doc strings on WINDOWSNT. (read_list): Call get_doc_string instead of read_doc_string, when forced to load doc strings. 1998-05-25 Andreas Schwab * s/gnu-linux.h (setpgrp): Remove extra parens around parameters. * xterm.c (XTread_socket): Fix second argument of x_any_window_to_frame. * print.c (print) : Detect circular list. 1998-05-25 Kenichi Handa * coding.c (detect_coding_system): Treat CODING_EOL_INCONSISTENT like CODING_EOL_UNDECIDED. * coding.c (ascii_skip_code): New variable. (detect_coding_mask): Skip ASCII codes at the head according to ascii_skip_code. (coding_priorities): New variable. (Fset_coding_priority_internal): New function. (detect_coding): Call set_coding_mask with coding_priorities as arg CODING. (init_coding_once): Initialize ascii_skip_code. (syms_of_coding): Declare set-coding-priority-internal as a Lisp function. 1998-05-25 Richard Stallman * config.in (RE_TRANSLATE): Use CHAR_TABLE_TRANSLATE. * lisp.h (CHAR_TABLE_TRANSLATE): New macro. 1998-05-24 Richard Stallman * window.c (Fdelete_windows_on): For FRAME, change t to nil and nil to t, but don't change other values. * xdisp.c (message_dolog): Do set windows_or_buffers_changed, if *Messages* is displayed in a window. 1998-05-22 Richard Stallman * indent.c (compute_motion): Check for past vpos/hpos target before skipping invisible chars. * buffer.c (Fother_buffer): Doc fix. * window.c (window_loop): Pass new arg to Fother_buffer. * frame.c (frame_buffer_predicate): New arg FRAME. (frame_buffer_list, set_frame_buffer_list): Likewise. (make_frame): Pass new arg to Fother_buffer. * buffer.c (Fother_buffer): New arg FRAME. Pass it to frame_buffer_list, frame_buffer_predicate. Calls changed. (record_buffer): Pass selected frame to them and set_frame_buffer_list. * lisp.h (frame_buffer_predicate, frame_buffer_list) (set_frame_buffer_list, Fother_buffer): Decls changed. * window.c (select_window_1): New subroutine, from Fselect_window. (Fselect_window): Use select_window_1. (temp_output_buffer_show): Use select_window_1. 1998-05-22 Kenichi Handa * ccl.c: Change term "character translation table" to "translation table". * charset.c: Change term "character translation table" to "translation table". (string_to_non_ascii_char): New arg EXCLUDE_TAIL_GARBAGE. Caller changed. (Funibyte_char_to_multibyte): Doc-string fixed. (syms_of_charset): Doc-string fixed. * charset.h (STRING_CHAR_AND_CHAR_LENGTH): New macro. (string_to_non_ascii_char): Adjusted for the new arg. * coding.c: Change term "character translation table" to "translation table". * coding.h: Change term "character translation table" to "translation table". * print.c (print_string): Don't ignore garbage bytes following a multibyte characters. (print): Likewise. 1998-05-22 Richard Stallman * search.c (shrink_regexp_cache): New function. * alloc.c (Fgarbage_collect): Call shrink_regexp_cache. 1998-05-20 Richard Stallman * editfns.c (Fchar_after): Make nil fully equivalent to (point) as arg. (Fchar_before): Likewise. 1998-05-20 Eli Zaretskii * fileio.c (Ffile_name_directory, Ffile_name_nondirectory) [DOS_NT]: Handle the special construct "/:" when followed by d:foo. * buffer.c (init_buffer): Support DOS_NT absolute file names. 1998-05-20 Kenichi Handa * charset.c (find_charset_in_str): New arg CMPCHARP. (Ffind_charset_region): Call find_charset_in_str with CMPCHARP 0. (Ffind_charset_string): Likewise. * charset.h (find_charset_in_str): Number of arguments fixed. * coding.c (shrink_decoding_region): No short cut by coding->heading_ascii if eol conversion is necessary. * fns.c (Fstring_make_multibyte): Call CHECK_STRING. (Fstring_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte): Likewise. * xselect.c (lisp_data_to_selection_data): Call find_charset_in_str with CMPCHARP 1 to encode Lisp string if it contains a composite character. 1998-05-19 Richard Stallman * minibuf.c (syms_of_minibuf): Doc fix. * window.c (Fscroll_up, Fscroll_down, Fscroll_other_window): Doc fixes. * frame.c (make_frame_visible_1): New function. (Fmake_frame_visible): Use that. * xdisp.c (redisplay_window): Don't use window->start if it is out of range of BEGV/ZV. 1998-05-18 Richard Stallman * minibuf.c (read_minibuf): If history list var is void, make it nil. 1998-05-18 Ken'ichi Handa * syntax.c (skip_chars): Fix previous change. 1998-05-17 Kenichi HANDA * ccl.c: Change term translation to code conversion, then change terms unify/unification to translate/translation respectively throughtout the file. * charset.c: Change terms unify/unification to translate/translation respectively throughtout the file. (ONE_BYTE_CHAR_WIDTH): Delete unnecessary continuation line at the tail. * charset.h: Change terms unify/unification to translate/translation respectively throughtout the file. (GET_TRANSLATION_TABLE): Name changed from UNIFICATION_ID_TABLE. * coding.c: Change terms unify/unification to translate/translation respectively throughtout the file. (encode_coding_iso2022): Fix bug in encoding a text ending by a composite character. (check_composing_code): If we are decoding the last block of data, return 0 even if the source doesn't end by an escape sequence which terminates the current composing sequence. (decode_coding_iso2022): Decode correctly even if the source doesn't end by an escape sequence which terminates the current composing sequence. * coding.h: Change terms unify/unification to translate/translation respectively throughout the file. * fns.c (concat): Fix bug in concatinating a list of multibyte and unibyte characters. * lisp.h (Vnonascii_translation_table): Name changed from Vnonascii_translate_table. * syntax.c (skip_chars): Fix bug in handling a range which contains multibyte characters. 1998-05-17 Richard Stallman * filelock.c (get_boot_time): Scan the whole wtmp file to find the most recent reboot. * window.c (Fselect_window): Doc fix. (temp_output_buffer_show): Make the temp buffer current before running Qtemp_buffer_show_hook. * fileio.c (Fexpand_file_name): Change conditional in previous change from WINDOWSNT to DOS_NT. 1998-05-16 Richard Stallman * buffer.h (struct buffer): New slot display_time. * buffer.c (syms_of_buffer): Set up Lisp variable buffer-display-time. Doc fixes. (reset_buffer): Initialize display_time slot. (init_buffer_once): Initialize display_time slot. * window.c (Fset_window_buffer): Update buffer's display_time. * insdel.c (insert_1_both, insert_from_string_1, replace_range) (insert_from_buffer_1, adjust_before_replace, adjust_after_replace): Don't copy text being deleted, if undo is disabled. * lread.c (readchar): Use readchar_backlog again to read a character byte by byte, if its byte sequence does not really match the character code. (unreadchar): Handle readchar_backlog. (readevalloop, Fread): Initialize readchar_backlog to -1. 1998-05-15 Geoff Voelker * fileio.c (Fexpand_file_name) [WINDOWSNT]: Be careful not to concatenate the directory prefix and file name to accidentally create a network share name. 1998-05-14 Andrew Innes * w32xfns.c (interrupt_handle): New variable. (init_crit): Initialize it. (delete_crit): Cleanup on exit. (signal_quit): New function. Signal any threads that are blocked on a "system" call (provided they have been specially written to check for this), so the call can fail with EINTR as on Unix. * w32term.h (signal_quit): Add prototype. * w32fns.c (w32_wnd_proc): Call signal_quit when C-g is received. * w32proc.c (sys_select): Always wait on interrupt_handle, so that user can break out of `accept-process-input' (for instance) by typing C-g. 1998-05-14 Richard Stallman * keyboard.c (read_char): If redisplay is preempted, try swallow_events; if that clears input_pending, finish the redisplay. 1998-05-14 Geoff Voelker * w32term.c (w32_ring_bell): Flash window correctly. 1998-05-13 Richard Stallman * fileio.c (Finsert_file_contents): Don't check non-regular files for a coding: specification. 1998-05-13 Inge Frick * keyboard.c (parse_menu_item): Removed unnecessary gcproing. Fix a test of inmenubar. 1998-05-13 Eli Zaretskii * msdos.c (init_environment): Set TMPDIR to an existing directory. Abort if none of the usual places is available. 1998-05-13 Richard Stallman * syntax.c (skip_chars): When fetching char after \, don't fail to set c_leading_code. 1998-05-12 Richard Stallman * fileio.c (Finsert_file_contents): Check that a -*- coding: -*- spec or a local variables list exists, before Vset_auto_coding_function. * minibuf.c (Fminibuffer_complete_word): Fix the string-comparison loop. * search.c (search_buffer): Set search regs for all success with an empty string. (set_search_regs): Clear out all regs except 0. * minibuf.c (Fall_completions, Ftry_completion): Compare char sizes, not STRING_BYTES. 1998-05-12 Inge Frick * keyboard.c (parse_menu_item): Argument inmenubar < 0 now means parsing a keyboard menu item. (read_char_minibuf_menu_prompt): Use `parse_menu_item' to understand new menu item format. 1998-05-12 Andrew Innes * w32.c (stat, get_long_basename): Fail if filename contains any characters that are illegal in file names. 1998-05-11 Richard Stallman * minibuf.c (assoc_for_completion): Use Fcompare_strings. (test_completion): In obarray, try both unibyte and multibyte strings. (read_minibuf): Convert unibyte prompt to multi if minibuffer is multi. (Fdisplay_completion_list): Convert unibyte to strings to multibyte to conform to the buffer. * fileio.c (Finsert_file_contents): Don't use the fast replace code if coding needs eol conversion. (Finsert_file_contents) [DOS_NT]: When setting buffer_file_type, if code conversion is needed, file is not binary. * xdisp.c (redisplay_window): Handle scroll_step along with scroll_conservatively. Fix 1-off error checking the limit for them. * filelock.c (unlock_file): Encode the file name. 1998-05-10 Richard Stallman * buffer.c (Fset_buffer_multibyte): Error if marker is put on buffer's marker-chain while we have temporarily put nil there. * marker.c (unchain_marker): Abort if the marker is not in its buffer's chain. (buf_bytepos_to_charpos): Fix assignment of `record' when scanning from below. Don't create a marker if buffer's marker chain is empty. * coding.c (code_convert_region1): Set Vlast_coding_system_used. (code_convert_string1): Likewise. (Fdecode_coding_region, Fencode_coding_region): Doc fixes. (Fdecode_coding_string, Fencode_coding_string): Doc fixes. * Makefile.in (TAGS): Specify directory when running etags. 1998-05-09 Richard Stallman * bytecode.c (Fbyte_code): Don't use Bmark. * .gdbinit (xstring): Handle unibyte strings. (xchartable, xboolvector): New commands. * xdisp.c (redisplay_window): Don't use last_point_x and last_point_y if cursor_in_echo_area. * minibuf.c (Qbuffer_name_history): New variable. (syms_of_minibuf): Initialize it. (Fread_buffer): Use that history list. 1998-05-09 Richard Stallman * syntax.c (scan_lists, scan_sexps_forward): Move complex expressions outside of the switch statement. 1998-05-09 Ken'ichi Handa * indent.c (compute_motion): Fix previous change. 1998-05-08 Kenichi Handa * coding.c (detect_coding_mask): Check also coding-category-binary. 1998-05-08 Richard Stallman * doc.c (get_doc_string): New arg UNIBYTE Maybe use make_unibyte_string. All callers changed. (read_doc_string): Specify 1 for UNIBYTE. * process.c (Fstart_process): Remove the special case for unibyte, for initializing the process coding systems. Instead, use the normal multibyte code, but check BUFFER's value and the default value of enable-multibyte-characters. (Fopen_network_stream): Likewise. 1998-05-08 Ken'ichi Handa * indent.c (compute_motion): Fix, in a different way, the bug of handling wide-column character around right margin. 1998-05-07 Richard Stallman * indent.c (compute_motion): Undo both May 7 changes. * doprnt.c (doprnt1): Cast arg to CHAR_STRING. 1998-05-07 Andrew Innes * callproc.c (Fcall_process): Fix test for when to call Ffind_operation_coding_system. 1998-05-07 Ken'ichi Handa * indent.c (compute_motion): Fix previous change. 1998-05-07 Richard Stallman * search.c (Freplace_match): Fix the loop for copying text from a string, in handling lastpos and pos. 1998-05-07 Andreas Schwab * data.c (set_internal): Properly compare lisp objects. (Fmakunbound): Likewise. * lread.c (Fintern): Properly compare lisp objects. 1998-05-07 Andrew Innes * fileio.c (Fexpand_file_name) [DOS_NT]: Note when special escape prefix /: is present, and reinsert after name has been expanded. Only recognize drive specifier at beginning of name. * fileio.c (Fexpand_file_name): Don't strip trailing slash if newdir is just /. 1998-05-07 Eli Zaretskii * process.c (init_process, syms_of_process) [not subprocesses]: Make definition consistent with prototypes on lisp.h 1998-05-07 Kenichi Handa * indent.c (compute_motion): Fix bug of handling wide-column character around right margin. 1998-05-07 Richard Stallman * buffer.c (syms_of_buffer) : Doc fix. 1998-05-07 Kenichi Handa * callproc.c (Fcall_process): If we must display received data on the fly, don't wait until a buffer is filled. 1998-05-05 Richard Stallman * fileio.c (barf_or_query_if_file_exists): Encode file name. 1998-05-04 Kenichi HANDA * coding.c (encode_coding_iso2022): Don't skip a code following some invalid code. 1998-05-04 Richard Stallman * fileio.c (Finsert_file_contents): Don't use gap pos to set point if del_range_byte deleted 0 characters. * search.c (boyer_moore): Check more reliably for ptr[1] being out of range. Use pat_end to point at the pattern's end. * emacs.c (main): Call the syms_of_... and keys_of_... functions earlier, before init_vms_input and init_display. 1998-05-04 E. Jay Berkenbilt * window.h (WINDOW_RIGHT_MARGIN): Don't subtract 1 from width when there are no vertical scrollbars and this is the rightmost window in the frame. 1998-05-04 Eli Zaretskii * lread.c (Fload): Rename dosmode to fmode and use it on all platforms. Avoid calling fdopen only for WINDOWSNT, use fdopen for the the MSDOS version. (read1): Avoid recording doc strings positions only for WINDOWSNT, not for MSDOS. 1998-05-04 Andreas Schwab * xterm.c: Include syssignal.h after lisp.h. * syssignal.h: Declare init_signals and add prototypes. * lisp.h: Declare init functions. 1998-05-03 Richard Stallman * s/sunos4shr.h (LIBXMU): Don't bother testing CANNOT_DUMP. * Makefile.in (TAGS-LISP): New target. (${lispsource}TAGS): Target deleted. (tags): Depend on TAGS-LISP. (TAGS): Generate the TAGS file in the build dir. (lisptagsfiles): Variable deleted. * Makefile.in (shortnamesdir, cppdir): Vars deleted. (shortnames): Target deleted. (temacs): Don't use $(SHORT). (SHORT): Var deleted. 1998-05-02 Richard Stallman * alloc.c (Fmake_bool_vector): Clear out extraneous bits at end. * lread.c (read1): Clear out extraneous bits at end of bool-vector. * search.c (compile_pattern_1): Declare raw_pattern as unsigned char *. Fix casts when assigning raw_pattern. Cast raw_pattern when calling re_compile_pattern. 1998-05-02 Hallvard B Furuseth * process.c (create_process): Add cast when calling encode_coding and another when storing buf into new_argv. * search.c (search_buffer): Fix casts when assigning raw_pattern. * editfns.c (Fformat): Fix casts when assigning buf. * lread.c (isfloat_string): Don't look at bytes before the string. 1998-05-02 Richard Stallman * s/nextstep.h (HAVE_STRING_H): Add #undef. (NO_ABORT): Defined. * editfns.c (Finsert_char): Doc fix. 1998-05-02 Hrvoje Niksic * fileio.c (Fmake_temp_name): Improve randomness of generated file names. 1998-05-01 Richard Stallman * search.c (wordify): Do the second loop by chars, not by bytes. 1998-05-01 Kenichi Handa * coding.c (encode_coding_iso2022): If encoding a last block, reset graphic planes and registers. 1998-04-30 Geoff Voelker * keyboard.c (Qdrag_n_drop, drag_n_drop_syms, lispy_drag_n_drop_names) New variables. (make_lispy_event): Handle drag_n_drop events. (syms_of_keyboard): Initialize new symbols. * w32fns.c (enum_font_cb2): Only ignore raster fonts when determining height and width. * termhooks.h (event_kind): New event type `drag_n_drop'. * makefile.nt (LIBS): Link in shell32.lib. * w32fns.c: Include shellapi.h. (w32_createwindow): Enable drag-n-drop on new windows. (w32_wnd_proc): Handle WM_DROPFILES messages. Disable drag-n-drop on closing windows. * w32term.c: Include shellapi.h. (construct_drag_n_drop): New function. (w32_read_socket): Handle WM_DROPFILES messages. 1998-04-30 Skip Collins * w32fns.c (msh_mousewheel): New variable. (w32_msg_pump): Register that Emacs accepts mousewheel events. (w32_wnd_proc): Check for mousewheel events. * w32term.c (msh_mousewheel): Declare. (w32_read_socket): Check for mousewheel events. * w32term.h (WM_MOUSEWHEEL): Define relative to WM_MOUSELAST. (MSH_MOUSEWHEEL): New macro. 1998-04-29 Richard Stallman * indent.c (compute_motion): When invisible text cross TO, return TO, not the start of the invisible text. * process.c (Fset_process_inherit_coding_system_flag, Fstart_process): Store inherit_coding_system_flag as a Lisp_Object. (Fopen_network_stream): Likewise. (Fprocess_inherit_coding_system_flag): Access it as Lisp_Object. (read_process_output): Likewise. * process.h (struct Lisp_Process): Make inherit_coding_system_flag a Lisp_Object. 1998-04-29 David Mosberger-Tang * unexelf.c [__alpha__ && !__NetBSD__ && !__OpenBSD__]: Include definition of HDRR structure that used to be in sym.h, instead of sym.h 1998-04-29 Andreas Schwab * xfns.c: Fix -Wimplicit warnings. * xdisp.c (redisplay_window): Update STARTP_BYTE alongside with STARTP. New variable scroll_margin_bytepos, to parallel scroll_margin_pos. Fix arguments of pos_tab_offset to agree with the first argument of compute_motion. * window.c (make_window): Initialize last_point field. * sysdep.c (emacs_get_tty): Zero out termios structure before getting attributes to get consistent values for holes. (emacs_set_tty): Likewise. * lisp.h: Declare Fcompare_strings. * fns.c: Include for time. * emacs.c (main): Use Vbuffer_alist instead of Fbuffer_list. (syms_of_emacs): Fix doc of Vsignal_USR1_hook and Vsignal_USR2_hook. * coding.c (setup_coding_system): Properly check for nil. 1998-04-29 Richard Stallman * editfns.c (Fcompare_buffer_substrings): Rewrite to loop by chars. * coding.h (Vfile_name_coding_system) (Vdefault_file_name_coding_system): Declarations added. * emacs.c (abort): Omit this definition, if NO_ABORT. End by calling exit, to avoid warning. 1998-04-28 Richard Stallman * filelock.c: Include coding.h. (lock_file): Encode the file name, to make lock file name. * editfns.c (Fgap_position, Fgap_size): New functions. (syms_of_editfns): defsubr them. * filelock.c (lock_file): gcpro `fn'. * insdel.c (insert_1_both): Call prepare_to_modify_buffer before moving or making gap. (insert_from_string_1): Don't check max buffer size here. * data.c (Flsh, Fash): Handle out-of-range shift counts reasonably. 1998-04-28 Dave Love * s/aix4.h (HAVE_STRING_H): Add #undef. (HAVE_WAIT_HEADER): Defined. 1998-04-28 Richard Stallman * emacs.c (main): Fix bug report address in --help message. (main): Doc --multibyte and --unibyte in --help message. * fns.c [HAVE_MENUS]: Include xterm.h only if HAVE_X_WINDOWS. 1998-04-28 Eli Zaretskii * Makefile.in (callproc.o, print.o, cmds.o, dispnew.o, fileio.o, frame.o, keyboard.o, minibuf.o, process.o, scroll.o, sysdep.o, term.o, w16select.o, window.o, xdisp.o, xfaces.o, lread.o): Depend on msdos.h. (print.o): Depend on dispextern.h. 1998-04-28 Andreas Schwab * process.c (Fset_process_inherit_coding_system_flag): Fix test for non-nil FLAG. * lread.c: Fix -Wimplicit warnings. (readevalloop): Fix type of UNIBYTE parameter. 1998-04-27 Richard Stallman * xterm.c (XTwrite_glyphs): Don't advance cursor X beyond limit. (XTcursor_to): Likewise. * blockinput.h (reinvoke_input_signal): Don't use prototype decl. 1998-04-27 Hrvoje Niksic * fns.c (Fload_average): New arg USE_FLOATS. 1998-04-27 Eli Zaretskii * fns.c [HAVE_MENUS]: Include xterm.h only if HAVE_WINDOW_SYSTEM is defined. * callproc.c, fileio.c: Include msdos.h after lisp.h. * msdos.c (IT_ring_bell, IT_write_glyphs, IT_clear_end_of_line, IT_clear_screen, IT_clear_to_end, IT_clear_to_end, IT_cursor_to, IT_cmgoto, IT_reassert_line_highlight, IT_change_line_highlight, IT_update_begin, IT_update_end, IT_set_terminal_modes, IT_reset_terminal_modes, IT_set_terminal_window, pixel_to_glyph_coords, IT_menu_display): Bring definitions in accordance with prototype declarations. * msdos.h [!HAVE_X_WINDOWS]: Add a dummy typedef for XRectangle and prototypes for external functions. 1998-04-26 Richard Stallman * fns.c (Fcompare_strings): Doc fix. * minibuf.c (minibuf_conform_representation): New function. (Ftry_completion): Use it to return multibyte string if and only if the completion table has a multibyte string. (Fdisplay_completion_list): Convert string to unibyte before displaying it, if default is unibyte. * eval.c (find_handler_clause): Cast Fbacktrace to proper type. * data.c (Fmakunbound): Test keywordness only in initial obarray. 1998-04-26 Erik Naggum * emacs.c (standard_args): Apply --unibyte/multibyte after --nw. * lisp.h: Include initial_obarray from lread.c * data.c (set_internal): Test keywordness only in initial obarray. * lread.c (Fintern): Initialize keywords only in initial obarray. 1998-04-25 Richard Stallman * sysdep.c (croak): Add forward declaration. * xfns.c (x_set_foreground_color, x_set_background_color) (x_set_mouse_color, x_set_cursor_color): Don't call unload_color if same pixel is used in another slot in the frame. * xterm.c (x_display_cursor): Use FRAME_CURSOR_X_LIMIT. * dispnew.c (change_frame_size_1): Use FRAME_CURSOR_X_LIMIT. (update_frame): Likewise. * frame.h (FRAME_CURSOR_X_LIMIT): New macro. 1998-04-25 Erik Naggum * lread.c (Fread_from_string): Initialize startval and endval. 1998-04-24 Richard Stallman * lread.c (read1): Allow multibyte and unibyte together in one string. * xdisp.c (Qinhibit_point_motion_hooks): New variable. (syms_of_xdisp): Init and staticpro it. (redisplay_window): Bind the symbol to t. 1998-04-24 Geoff Voelker * w32.c (sys_socket): Make sockets non-inheritable. 1998-04-23 Andrew Innes * coding.c (shrink_decoding_region): Do not consider LF as ascii if preceded by CR, since that confuses eol decoding. (code_convert_region): When conversion fails with CODING_FINISH_INSUFFICIENT_SRC, was overwriting src with garbage from dst instead of copying from src to dst. * fileio.c (Fcopy_file): Skip dev/inode check on Windows. * lread.c (dir_warning): Don't log a warning if Emacs hasn't finished initializing. * s/ms-w32.h (utimbuf): New macro. * w32.c (fstat, utime): New functions; these are provided in conjunction with stat to make handling of file timestamps consistent. (convert_from_time_t): Fix calculation of low-order bits. (sys_unlink): Allow read-only files to be unlinked as on Unix. * w32fns.c (x_set_vertical_scroll_bars): Put scroll bars on the right, as is conventional on MS-Windows. (w32_wnd_proc): Add code to draw popup menu titles. Ensure mouse capture is released before running popup menu. * w32term.c (w32_read_socket): Don't misinterpret WM_PAINT message as an expose event if the repaint region is actually empty. Also use the standard menubar_selection_callback routine. * w32menu.c: Replace code with a new version written from scratch based on xmenu.c; menu construction is now completely lazy. * w32proc.c (sys_kill): Fix indenting. 1998-04-23 Inge Frick * keyboard.c: (parse_menu_item): Support keywords :keys and :key-sequence. Some changes to provide GC-protection. Some cosmetic changes. (syms_of_keyboard): Define new symbols `:keys' and `:key-sequence'. 1998-04-23 Richard Stallman * Makefile.in (emacs.o): Depend on buffer.h. * charset.c (syms_of_charset): Doc fix for nonascii-insert-offset. * editfns.c (Fbuffer_substring): Doc fix. (Finsert_and_inherit_before_markers): Doc fix. (Finsert_and_inherit, Finsert_before_markers, Finsert): Doc fixes. * fns.c (Fstring_make_multibyte): Doc fix. (Fstring_make_unibyte): Doc fix. 1998-04-22 Richard Stallman * charset.c (Funibyte_char_to_multibyte): Doc fix. * xfns.c (x_set_foreground_color): Call unload_color on the old color. (x_set_background_color, x_set_mouse_color): Likewise. (x_set_cursor_color, x_set_border_pixel): Likewise. * xfaces.c (unload_color): No longer static. * insdel.c (insert_from_string, insert_from_string_before_markers): Don't special case LENGTH = 0. (insert_from_buffer): Likewise. 1998-04-22 Erik Naggum * filelock.c (get_boot_time): Remove extraneous semicolon. * lisp.h: Remove extraneous semicolon. 1998-04-22 Eli Zaretskii * w16select.c (Fwin16_set_clipboard_data): Call UNBLOCK_INPUT before calling sit_for. (Fwin16_get_clipboard_data, Fwin16_set_clipboard_data): Balance the calls to BLOCK_INPUT and UNBLOCK_INPUT. (alloc_xfer_buf): If want_size is more than 1MB, return immediately with failure. (Fw16_set_clipboard_data, Fw16_get_clipboard_data): Replace win16 with w16. 1998-04-21 Richard Stallman * eval.c (Fsignal): Unconditionally do TOTALLY_UNBLOCK_INPUT. * dispnew.c (update_frame): Move echo area cursor into range. 1998-04-21 Eli Zaretskii * callproc.c (Fcall_process) [MSDOS]: Call child_setup instead of run_msdos_command. (child_setup) [MSDOS]: Call run_msdos_command here. (child_setup) [DOS_NT]: Get past drive letter in pwd. Don't call close_load_descs, since we are not in a vfork. * msdos.c (run_msdos_command): Don't construct process environment, it's already done in child_setup. (run_msdos_command): Add ENVV to argument list. 1998-04-20 Richard Stallman * emacs.c (main): Move the --unibyte code below the most basic initializations. Clear out *Messages* at that point. * lread.c (read_from_string_index_byte): New variable. (read_from_string_index): Now counts characters. (readchar, unreadchar, Fread_from_string): Changed accordingly. * lread.c (readchar): Read a multibyte char all at once from a buffer, marker or string. (unreadchar): Unread a multibyte char all at once. (read1): Properly handle non-escaped multibyte chars. They force a string to be multibyte. When reading direct from a file, any multibyte sequence means a multibyte string. Insist on MAX_LENGTH_OF_MULTI_BYTE_FORM bytes when checking for read_buffer full; this way need not check specially for multibyte. * emacs.c: Include buffer.h (main): When handling --unibyte, mark all existing buffers as unibyte; but don't handle it when dumping. * alloc.c (Fgarbage_collect): Don't truncate command-history here. * callint.c (Fcall_interactively): Truncate command-history here. * keyboard.c (Fcommand_execute): Truncate command-history here. * lread.c (readevalloop): New arg UNIBYTE. Callers changed. Use it to bind load_convert_to_unibyte. (Feval_buffer): New arg UNIBYTE. Pass it to readevalloop. (readevalloop_1): New unwind-protect subroutine. (load_convert_to_unibyte): New variable. (syms_of_lread): Set up Lisp var. (read1): If load_convert_to_unibyte, convert strings to unibyte. * insdel.c (copy_text): Count down bytes_left properly in multibyte to unibyte case. * fns.c (Fcompare_strings): Require first 6 args. 1998-04-20 Kenichi HANDA * Makefile.in (lisp): Add czech.elc, slovak.elc, and romanian.elc. (shortlisp): Likewise. * coding.c (setup_coding_system): For a type 4 coding system, FLAGS member of coding spec is a cons of CCL program symbols. * ccl.c (Fregister_ccl_program): Put ccl-program-idx property to NAME. 1998-04-19 Eli Zaretskii * process.h (struct Lisp_Process): Add inherit_coding_system_flag member. * process.c (Fset_process_inherit_coding_system_flag, Fprocess_inherit_coding_system_flag): New functions. (syms_of_process): Defsubr them. (Fstart_process, Fopen_network_stream): Initialize inherit_coding_system_flag. (read_process_output): If the process buffer isn't dead, call after-insert-file-set-buffer-file-coding-system. 1998-04-18 Hrvoje Niksic * fileio.c (Fmake_temp_name): Complete rewrite. 1998-04-18 Richard Stallman * minibuf.c (Ftry_completion): Use Fcompare_strings. (Fall_completions, Fminibuffer_complete_word): Likewise. * fns.c (Fcompare_strings): New function. (syms_of_fns): defsubr it. * xselect.c (Fx_get_cut_buffer_internal): If FORMAT is 0, cut buffer is empty. * emacs.c (main): --unibyte affects minibuffer too. 1998-04-17 Richard Stallman * emacs.c (syms_of_emacs): Fix patching error in previous change. * lread.c (read1): Compute NaN and infinities using 0.0 in a variable, to cope with compilers that think they are smarter than us. * lread.c (readchar): Find the previous byte's address properly for the buffer case, as for the marker case. 1998-04-17 Geoff Voelker * emacs.c (Vpath_separator): New variable. (syms_of_emacs): Define Vpath_separator using SEPCHAR. * lastfile.c (_my_endbss, my_endbss_static): New variables. * term.c (reset_terminal_modes): Only invoke hook if defined. * makefile.nt (LINK_TYPE): Do not include debug info in optimized binary. (LIBS): Include mpr.lib. (clean): Delete patch generated files, optimized build directory. * s/ms-w32.h (HAVE_STRING_H, HAVE_STRFTIME): Define macros. (SYSTEM_PURESIZE_EXTRA): Increase to handle more dumped lisp files. * unexw32.c (my_begbss_static, my_endbss_static): Declare. (get_bss_info_from_map_file): Only define if SEPARATE_BSS_SECTION. (get_section_info): Use my_begbss_static, my_endbss_static to determine bounds of bss. (w32_fatal_reload_error): New function. (read_in_bss, map_in_heap): Invoke w32_fatal_reload_error upon error. * w32.c (sys_read): Clear carriage return flag. Report normal EOF when read fails if nothing in buffer. Only read more if more remaining. (check_windows_init_file): New function. (term_ntproc): Invoke check_windows_init_file. * w32.h (FILE_SEND_SIGCHLD): New macro. * w32faces.c (Qforeground_color, Qbackground_color): Declare. (compute_char_face, merge_face_list): Update from xterm.c. * w32fns.c (w32_msg_pump): Handle WM_EMACS_SETLOCALE. (w32_wnd_proc): Handle WM_EMACS_SETFOREGROUND. * w32heap.c (recreate_heap): Invoke w32_fatal_reload_error upon error. * w32heap.h (w32_fatal_reload_error): Declare. * w32inevt.c (Vw32_recognize_altgr): Declare. (w32_kbd_mods_to_emacs): Obey Vw32_recognize_altgr. Add more keys for Vw32_capslock_is_shiftlock. (w32_kbd_patch_key): Obey Vw32_recognize_altgr. (map_virt_key): Brazilian keyboards use 0xc1 for /(?) key. * w32menu.c (Vmenu_updating_frame): New variable. (Fx_popup_menu, set_frame_menubar): Record frame whose menu is being updated. (syms_of_w32menu): Define Vmenu_updating_frame. * w32proc.c (w32_executable_type): Properly cast dos_header when making size comparison. (sys_spawnve): Update comments. (sys_select): Ignore children dead children with pending input. Delay sending SIGCHLD until all output has been read. (sys_kill): Sleep to allow focus change events to propagate. Use TerminateProcess on Win95. (int_from_hex, enum_locale_fn, Fw32_get_valid_locale_ids): New functions. (Vw32_valid_locale_ids): New variable. (Fw32_set_current_locale): Send message to input thread. (syms_of_ntproc): defsubr Sw32_get_valid_locale_ids. * w32term.c (Vw32_recognize_altgr): New variable. (dumpglyphs): Update from xterm.c. (w32_ring_bell): Flash window, don't just reset its state. (dumprectangle, show_mouse_face, x_draw_single_glyph): Use new args to dumpglyphs. (my_set_foreground_window): New function. (w32_condemn_scroll_bars): Mark all as condemned scroll bars. (w32_redeem_scroll_bar): Look through all scroll bars. (w32_judge_scroll_bars): Don't clear out condemned list. (w32_read_socket): Clip window after frame has been restored. (x_focus_on_frame, x_raise_frame): Use my_set_foreground_window. (syms_of_w32term): Define Vw32_recognize_altgr. * w32term.h (WM_EMACS_SETFOREGROUND, WM_EMACS_SETLOCALE): New message macros. 1998-04-16 Richard Stallman * callproc.c (Fcall_process_region): Unbind coding-system-for-write after calling Fwrite_region. * eval.c (Fcatch): Doc fix. * mocklisp.c (Fml_if): Initialize val. 1998-04-16 Erik Naggum * emacs.c (main): Fix typo, add --multibyte and --no-multibyte. (standard_args): Add --multibyte and --no-multibyte. 1998-04-16 Richard Stallman * fns.c (time): Declare it only if not HAVE_UNISTD_H. * emacs.c (standard_args): Add --no-unibyte. (main): Recognize --no-unibyte to inhibit EMACS_UNIBYTE. * fns.c (Frequire): Doc fix. * fileio.c (file_name_as_directory): For empty arg, return `./'. 1998-04-16 Eli Zaretskii * msdos.c (it_keyboard): New variable, supports Italian keyboard. (keyboard_layout_list): Add Italian keyboard. 1998-04-15 Ken'ichi Handa * coding.c (code_convert_region): If point in the conversion region, move it to FROM in advance. 1998-04-15 Eli Zaretskii * callproc.c (Fcall_process): Call after-insert-file-set-buffer-file-coding-system if inherit-process-coding-system is non-nil. * coding.c (syms_of_coding): Declare and define inherit-process-coding-system. * coding.h: Declare inherit-process-coding-system. * w32.c (sys_pipe): Use binary pipe I/O unconditionally. * callproc.c: Remove binary-process-{in,out}put. (syms_of_callproc): Likewise. (Fcall_process, Fcall_process_region): Don't use binary-process-{in,out}put. 1998-04-15 Andreas Schwab * config.in (RE_TRANSLATE_P): Define. 1998-04-15 Ken'ichi Handa * ccl.c (Fccl_execute_on_string): Put \n\ at eol of docstring. * xfns.c (x_set_font): Give 2nd arg nil to Fquery_fontset. (Fx_create_frame): Likewise. 1998-04-15 Kenichi Handa * ccl.c: Typo in comments fixed. (Qccl_program_idx, Qunification_table, Qunification_table_id): New variables. (syms_of_ccl): Initialize and staticpro them. (CCL_ReadMultibyteChar2): Macro name changed from CCL_ReadMultibyteCharacter. (CCL_WriteMultibyteChar2): Macro name changed from CCL_WriteMultibyteChar2. (CCL_ (MAX_TABLE_SET_LEVEL): New macro. (tr_stack): New type. (translate_stack, translate_stack_pointer): New variables. (PUSH_TRANSLATE_STACK, POP_TRANSLATE_STACK): New macros. (ccl_driver): Adjusted for the above changes. (resolve_symbol_ccl_program): New function. (Fccl_execute): The arg CCL-PROGRAM can be a symbol of CCL program. If CCL-PRGRAM is a vector, convert symbols in it to ID numbers by resolve_symbol_ccl_program. (Fccl_execute_on_string): Likewise. (Fregister_ccl_program): If the arg CCL-PRGRAM is a vector, convert symbols in it to ID numbers by resolve_symbol_ccl_program. * ccl.h (Vccl_program_table, Qccl_program_idx): Extern them. * fontset.c (find_ccl_program_func): New variable. (fs_load_font): Call a function pointed by find_ccl_program_func instead of finding CCL program to encode a character by itself. (Fquery_fontset): New optional 2nd arg REGEXPP. Callers changed. * fontset.h (FONT_ENCODING_NOT_DECIDED): The value is changed to 255. (find_ccl_program_func): Extern it. (Fquery_fontset): Args number changed to 2. * xfns.c (syms_of_xfns): Initialize find_ccl_program_func. * xterm.c (x_find_ccl_program): New function. * xterm.h (x_find_ccl_program): Extern it. 1998-04-14 Dave Love * keymap.c: Revert erroneous 1998-04-07 change. 1998-04-14 Karl Heuer * xfns.c (x_destroy_bitmap): Declare as void, not int. (x_report_frame_params, x_set_border_pixel): Likewise. (x_set_internal_border_width): widget_store_internal_border takes just one arg, not two. 1998-04-14 Andreas Schwab * xdisp.c (try_window): Fix mixing of Lisp_Object and int. * window.c (Fset_window_configuration): Fix mixing of Lisp_Object and int. * sysdep.c (init_sys_modes): Fix mixing of Lisp_Object and int * search.c (compile_pattern, compile_pattern_1): Fix mixing of Lisp_Object and int. * process.c (read_process_output): Fix mixing of Lisp_Object and int. * minibuf.c (Fself_insert_and_exit): Fix mixing of Lisp_Object and int. * marker.c (set_marker_both): Remove bogus checks on charpos. * keyboard.c (parse_menu_item): Don't GCPRO non-lisp variables. * insdel.c (signal_after_change): Fix mixing of Lisp_Object and int. * indent.c (indented_beyond_p): Fix mixing of Lisp_Object and int. * frame.c (Fset_mouse_position, Fset_mouse_pixel_position): Fix mixing of Lisp_Object and int. * fns.c (Fsubstring, substring_both, Fchar_table_range, Fset_char_table_range): Fix mixing of Lisp_Object and int. * fileio.c (Fwrite_region): Fix mixing of Lisp_Object and int. * editfns.c (Fchar_after, Fchar_before): Fix mixing of Lisp_Object and int * coding.c (code_convert_region): Fix mixing of Lisp_Object and int. * charset.c (Fchars_in_region): Fix mixing of Lisp_Object and int. * ccl.c (ccl_driver, syms_of_ccl): Fix mixing of Lisp_Object and int. * cm.h: Update return types of declarations. * xterm.h, puresize.h, termhooks.h, lisp.h, keyboard.h, intervals.h, dispextern.h, blockinput.h, coding.h: Add more prototypes. * xterm.c, xselect.c, xrdb.c, xmenu.c, xdisp.c, window.c, widget.c, undo.c, terminfo.c, term.c, sysdep.c, syntax.c, search.c, scroll.c, process.c, print.c, mocklisp.c, prefix-args.c, marker.c, keymap.c, keyboard.c, intervals.c, insdel.c, indent.c, frame.c, fontset.c, fns.c, floatfns.c, filelock.c, fileio.c, eval.c, emacs.c, editfns.c, doprnt.c, doc.c, dispnew.c, dired.c, data.c, coding.c, cmds.c, cm.c, charset.c, ccl.c, category.c, casetab.c, casefiddle.c, callproc.c, callint.c, bytecode.c, buffer.c, alloc.c, abbrev.c: Fix -Wimplicit warnings. * buffer.c (Fset_buffer_multibyte): Do nothing if nothing actually changes. * coding.c (code_convert_region): Call adjust_after_insert also in unibyte mode. * fileio.c (Finsert_file_contents): Call adjust_after_insert also in unibyte mode. 1998-04-13 Ken'ichi Handa * coding.c (code_convert_string): Give decode_coding correct byte length of source text. 1998-04-13 Richard Stallman * print.c (strout): Convert old echo area to multibyte, like printchar. (printchar, strout): If echo area text converted to multibyte does not all fit, truncate it at char boundary. * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): When calling set_marker_both, pass the right buffer. * indent.c (Fcompute_motion): Check that TO and FROM are in range. 1998-04-13 Eli Zaretskii * msdos.c (dosv_refresh_virtual_screen): Do not use negative arguments. (dos_direct_output): Fix the offset passed to dosv_refresh_virtual_screen. (IT_display_cursor): Don't call dosv_refresh_virtual_screen. (IT_reset_terminal_modes): Don't call dosv_refresh_virtual_screen when setting cursor. 1998-04-12 Richard Stallman * print.c (temp_output_buffer_setup): Clear out overlays, visited file, undo list, etc. * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): FROM counts chars. (SYNTAX_TABLE_BYTE_TO_CHAR): Handle the offset properly both before and after conversion. * syntax.h (UPDATE_SYNTAX_TABLE_FORWARD): Arg renamed to charpos. (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE): Likewise. * xdisp.c (display_text_line): When handling selective > 0, update pos and pos_byte with results of calling scan_newline. * data.c (set_internal, Fmakunbound): Fix previous change. 1998-04-12 Hallvard B Furuseth * print.c (print) : Fix "\ " handling. 1998-04-11 Richard Stallman * s/netbsd.h (LINKER): Add definition. (LD_SWITCH_SYSTEM): Undo previous change. * data.c (set_internal, Fmakunbound): No error if setting a keyword to itself. 1998-04-09 Karl Heuer * marker.c (Fbuffer_has_markers_at): Fix termination condition. * search.c (min, max): Make these macros, not functions. (scan_buffer, boyer_moore): Simplify args to those macros. * unexw32.c (min, max): Define as macros. * w32.c (min, max): Define as macros. * w32term.c (min, max): Define as macros. * callproc.c (relocate_fd): Avoid `min'/`max' as variable names. * print.c (print): Likewise. * dispnew.c (minmax): New macro. (update_frame): Use it. * w32proc.c: Delete incorrect prototype of report_file_error. * w32.c (unrequest_sigio, request_sigio): Fix prototype. * w32menu.c (set_frame_menubar): Call Fset_match_data, not Fstore_match_data. * emacs.c (abort): Don't redefine on DOS_NT. 1998-04-09 Kenichi Handa * charset.c (string_to_non_ascii_char): Include garbage bytes (if any) following a multibyte character in *ACTUAL_LEN. (Fcharset_after): New function. (syms_of_charset): Defsubr it. (multibyte_form_length): Modified to be consistent with string_to_non_ascii_char. * charset.h (MULTIBYTE_FORM_LENGTH): Don't check LEN here. * xdisp.c (display_text_line): Code for displaying a character by octal form is modified. 1998-04-08 Richard Stallman * data.c (keyword_symbols_constant_flag): New variable. (syms_of_data): Set up Lisp variable. (set_internal): Obey it and give error for :-symbols. (Fmakunbound): Likewise. 1998-04-08 Eli Zaretskii * dosfns.c (init_dosfns): Fix bug in passing segment address of the transfer buffer. 1998-04-08 Karl Heuer * keymap.c (fix_submap_inheritance): Fix parens. 1998-04-07 Richard Stallman * fileio.c (Fmake_temp_name): Detect error return from mktemp. 1998-04-07 Eli Zaretskii * charset.c (string_to_non_ascii_char, multibyte_form_length) (split_non_ascii_string, str_cmpchar_id): Make the STR argument const unsigned char *. * charset.h: Update prototypes for the above. * filelock.c: Include only if CLASH_DETECTION is defined. * process.c (kill_buffer_processes): Make consistent with prototype in lisp.h. * msdos.c (request_sigio, unrequest_sigio): Make consistent with prototypes in lisp.h. * charset.h (CHAR_STRING): Cast to unsigned char ** explicitly. * w16select.c (Fwin16_set_clipboard_data): Call message2 with 3 arguments. * emacs.c (abort): Don't redefine on MSDOS. 1998-04-07 Dave Love * keymap.c (describe_command): Use quotes around symbol name. * emacs.c (main): Obey environment variable EMACS_UNIBYTE as alternative to --unibyte. 1998-04-06 Jonathan I. Kamens * config.in (GSSAPI, HAVE_LIBGSSAPI_KRB5, HAVE_LIBGSSAPI) (HAVE_GSSAPI_H): Add undefs for GSS-API support in movemail. 1998-04-06 Richard Stallman * dired.c (Fdirectory_files): Use make_uninit_multibyte_string. Use STRING_BYTES on encoded_directory. 1998-04-06 Andreas Schwab * fns.c (Flength): Doc fix. * unexelf.c (unexec): Account for possible padding before the old .bss section. * editfns.c (Ftranspose_regions): Fix order of parameters for replace_range. * dired.c (Fdirectory_files): GCPRO encoded_directory and list. Compute needsep only once. Pass correct arg to chars_in_text. * alloc.c (gc_sweep): Avoid using two loop variables counting the same thing. 1998-04-06 Ken'ichi Handa * fns.c (Fstring_as_unibyte): Set size_byte field to -1. 1998-04-05 Eli Zaretskii * config.in: Don't include when configuring. 1998-04-04 Richard Stallman * s/netbsd.h (LD_SWITCH_SYSTEM): Add -L/usr/lib. 1998-04-03 enami tsugutomo * editfns.c (Fmessage_box): Pass the missing third argument STRING_MULTIBYTE (val) to message2. * frame.c (make_frame_without_minibuffer): Conditionalize on HAVE_WINDOW_SYSTEM. (make_minibuffer_frame): Likewise. * frame.h: Ditto. 1998-04-03 Richard Stallman * intervals.c (set_intervals_multibyte): Function moved after set_intervals_multibyte_1. * xdisp.c (redisplay_window): If updating mode line, temporarily change selected_frame 1998-04-02 Dave Love * emacs.c (main): Add [--unibyte] to usage. 1998-04-02 Richard Stallman * print.c (print) : Follow a hex escape with `\ ' if nec. * data.c (Fmake_variable_frame_local): Doc fix. * fns.c (Fstring_as_multibyte): Never return unibyte string unchanged. 1998-04-02 NIIBE Yutaka * fns.c (Fstring_as_multibyte): Set size_byte field. 1998-04-02 Richard Stallman * fns.c (char_table_translate): New function. * config.in (RE_TRANSLATE): Use char_table_translate. 1998-04-02 Kenichi Handa * coding.c (CHARSET_OK): Don't reject safe charsets. (DECODE_DESIGNATION): Likewise. (check_composing_code): Likewise. * marker.c (buf_charpos_to_bytepos): Delete local variable gapend_byte. * xselect.c (selection_data_to_lisp_data): Give make_string_from_bytes a correct char size. 1998-04-01 Richard Stallman * xdisp.c (redisplay_window): Fix computing pos from last_point. 1998-03-30 Kenichi Handa * coding.c (code_convert_region): Handle skipped ASCII characters at the head and tail of conversion region correctly when adjusting position keepers. Call adjust_after_insert to record undo info and adjust markers when we don't have to change byte sequence of a buffer. * coding.h (struct coding_system): Comment for the member heading_ascii modified. * fileio.c (Finsert_file_contents): Call adjust_after_insert when a text is inserted in a multibyte buffer without any code conversion. * insdel.c (adjust_markers_for_replace): New function. (adjust_after_replace): Arguments changed. Call adjust_markers_for_replace if this function is called after replacement. (adjust_after_insert): New function. * lisp.h (adjust_after_replace, adjust_after_insert): Extern them. 1998-03-28 Richard Stallman * xdisp.c (display_text_line): Handle overlay-arrow correctly. 1998-03-28 Richard Stallman * fileio.c (barf_or_query_if_file_exists): New arg QUICK. All calls changed. 1998-03-27 Richard Stallman * insdel.c (check_markers_debug_flag): New variable. (syms_of_insdel): Set up Lisp var. (CHECK_MARKERS): New macro. Use it everywhere instead of calling check_markers directly. It tests check_markers_debug_flag. 1998-03-26 Richard Stallman * alloc.c (mark_buffer): Mark the undo_list slot specially; don't mark a marker just cause it is in this list. (Fgarbage_collect): Discard from all undo-lists all elements that adjust markers that were not marked. * buffer.h (struct buffer): Field `undo_list' moved before `name' so it won't get marked in the usual way. * coding.c (code_convert_region): Call adjust_before_replace in the no-conversion case. Adjust GPT, ZV and Z in chars. 1998-03-25 Richard Stallman * lread.c (init_lread): Init Vstandard_input. 1998-03-25 Ken'ichi Handa * xdisp.c (redisplay_window): Fix previous change. 1998-03-25 Kenichi Handa * indent.c (compute_motion): Call strwidth only when necessary. Set wide_column_end_hpos only when MULTIBYTE_BYTES_WIDTH set nonzero to wide_column. * xdisp.c (redisplay_window): Give byte position to FETCH_BYTE. Call pos_tab_offset appropriately. (try_window_id): Give byte position to FETCH_BYTE. Set val.bytepos to pos_byte. * lisp.h (make_buffer_string, make_buffer_string_both): Extern them. * process.c (read_process_output): Count multibyte characters. If received data is stored in p->decoding_buf, copy it to a temporary buffer and call insert_before_makers instead of insert_from_string_before_markers. 1998-03-24 Ken'ichi Handa * lisp.h (record_delete): The second arg is Lisp_Object. 1998-03-24 Kenichi Handa * indent.c (MULTIBYTE_BYTES_WIDTH): Set wide_column only when we encounter a wide-column character. * undo.c (record_delete): Record last_point_position when there's no record other than marker adjustment before undo boundary. * insdel.c (del_range_2): Move gap again to a proper place just after calling make_buffer_string_both. * coding.c (shrink_decoding_region): If EOL_CONVERSION is nonzero, don't skip `\r' (instead of `\n'). 1998-03-23 Andreas Schwab * xmenu.c (popup_get_selection): On receiving a KeyPress event only deactivate the menu when the key is not a modifier key. * xfns.c (Fx_create_frame): Use "borderWidth", not "borderwidth", as resource name, to be consistent with other X applications. 1998-03-21 Richard Stallman * dired.c (Fdirectory_files): In FULL case, compute number of characters * fns.c (substring_both, Fsubstring): Use make_specified_string. (concat): Make string result unibyte or multibyte as appropriate. * sunfns.c (syms_of_sunfns): Pass new arg to make_pure_string. * alloc.c (make_specified_string): New function. (make_string_from_bytes): New function. (compact_strings): Get byte size from size, if size_byte < 0. (Fmake_string): Use make_uninit_string for single-byte char. (make_unibyte_string): Mark string as unibyte. (make_uninit_string): Likewise. (make_string): Likewise, if size == size in bytes. (make_pure_string): New arg MULTIBYTE. (Fpurecopy): Pass new arg to make_pure_string. * editfns.c (Fchar_to_string): Use make_string_from_bytes. (Fformat): Use make_specified_string. (make_buffer_string_both): Use make_uninit_string if buffer is unibyte. * casefiddle.c (casify_object): Use make_specified_string. * charset.c (Fstring): Use make_string_from_bytes. (Fcompose_string): Likewise. * cmds.c (internal_self_insert): Use make_string_from_bytes. * coding.c (code_convert_string): Use make_string_from_bytes. * doc.c (Fsubstitute_command_keys): Use make_string_from_bytes. * lread.c (read1): Pass new arg to make_pure_string. (make_symbol): Likewise. (init_obarray): Likewise. (read1): Use make_specified_string. * print.c (PRINTPREPARE): Use make_string_from_bytes. * process.c (read_process_output): Use make_string_from_bytes. * search.c (Fregexp_quote): Use make_specified_string. * xselect.c (selection_data_to_lisp_data): Use make_string_from_bytes. * insdel.c: (insert_from_string_1, replace_range): Use STRING_MULTIBYTE to determine whether string is multibyte. * editfns.c: Use STRING_BYTES and SET_STRING_BYTES. (Ftranspose_regions): Try to handle combining bytes. * alloc.c, xterm.c, xselect.c, xmenu.c, xfns.c, xdisp.c, search.c, process.c, print.c, lread.c, keymap.c, insdel.c, keyboard.c, frame.c, fns.c, filelock.c, doc.c, dispnew.c, data.c, coding.c, charset.c, ccl.c, category.c, casefiddle.c, callproc.c, callint.c, bytecode.c, abbrev.c, minibuf.c, buffer.c, fileio.c: Use STRING_BYTES and SET_STRING_BYTES. * xmenu.c: Don't include puresize.h any more as code that needs it has moved to keyboard.c. (menu_item_equiv_key, menu_item_enabled_p_1, menu_item_enabled_p): Functions deleted; code moved to parse_menu_item in keyboard.c. (single_keymap_panes): Large part of code moved to single_menu_item. (single_menu_item): New function that uses parse_menu_item. (Qmenu_alias): Variable deleted. (QCtoggle, QCradio): New variables. (syms_of_xmenu): Change initializations of variables. * keymap.c (fix_submap_inheritance, get_keyelt, store_in_keymap) (copy-keymap, where_is_internal_1): Support new format for menu items. (syms_of_keymap): New symbol `menu-item'. * keyboard.c: Include puresize.h for CHECK_IMPURE. (parse_menu_item): New function. (menu_item_eval_property_1, menu_item_eval_property) New suroutines. (menu_bar_one_keymap): Moved some code to menu_bar_item. (menu_bar_item): Rewritten to use parse_menu_item. (menu_bar_item_1): Function deleted. (QCenable, QCvisible, QChelp, QCfilter, QCbutton, QCtoggle, QCradio): (Qmenu_alias): New variables. (syms_of_keyboard): Initialize them, and item_properties. * insdel.c (replace_range): New arg NOMARKERS. 1998-03-21 Richard Stallman * dired.c (Fdirectory_files): In FULL case, compute number of characters * insdel.c (insert_from_string_1, replace_range): Use STRING_MULTIBYTE to determine whether string is multibyte. * lisp.h: Declarations changed. (STRING_MULTIBYTE, STRING_BYTES, SET_STRING_BYTES): New definitions treating negative size_byte as a flag for unibyte. * xselect.c (selection_data_to_lisp_data): Use make_string_from_bytes. * search.c (Fregexp_quote): Use make_specified_string. * process.c (read_process_output): Use make_string_from_bytes. * print.c (PRINTPREPARE): Use make_string_from_bytes. * fns.c (substring_both, Fsubstring): Use make_specified_string. (concat): Make string result unibyte or multibyte as appropriate. * doc.c (Fsubstitute_command_keys): Use make_string_from_bytes. * coding.c (code_convert_string): Use make_string_from_bytes. * cmds.c (internal_self_insert): Use make_string_from_bytes. * charset.c (Fstring): Use make_string_from_bytes. (Fcompose_string): Likewise. * casefiddle.c (casify_object): Use make_specified_string. * editfns.c (Fchar_to_string): Use make_string_from_bytes. (Fformat): Use make_specified_string. (make_buffer_string_both): Use make_uninit_string if buffer is unibyte. * sunfns.c (syms_of_sunfns): Pass new arg to make_pure_string. * lread.c (read1): Pass new arg to make_pure_string. (make_symbol): Likewise. (init_obarray): Likewise. (read1): Use make_specified_string. * alloc.c (make_specified_string): New function. (make_string_from_bytes): New function. (compact_strings): Get byte size from size, if size_byte < 0. (Fmake_string): Use make_uninit_string for single-byte char. (make_unibyte_string): Mark string as unibyte. (make_uninit_string): Likewise. (make_string): Likewise, if size == size in bytes. (make_pure_string): New arg MULTIBYTE. (Fpurecopy): Pass new arg. * lisp.h (STRING_BYTES, SET_STRING_BYTES): New macros. * All files: Use STRING_BYTES and SET_STRING_BYTES. * editfns.c (Ftranspose_regions): Try to handle combining bytes. * insdel.c (replace_range): New arg NOMARKERS. 1998-03-20 Richard Stallman * cmds.c (internal_self_insert): Pass new arg to replace_range. * insdel.c (insert_1_both, insert_from_string_1, insert_from_buffer_1): (adjust_before_replace, adjust_after_replace, replace_range): (del_range_2): Call record_delete the new way. Use make_buffer_string_both to make the string to pass. * editfns.c (make_buffer_string_both): New function. (make_buffer_string): Use make_buffer_string_both. * undo.c (record_delete): Replace LENGTH arg with STRING. (record_change): Call record_delete the new way. * Makefile.in (keymap.o): Depend on puresize.h. (xmenu.o): Don't depend on puresize.h. 1998-03-20 Inge Frick * keyboard.h (item_properties): New variable. (ITEM_PROPERTY_...): New macros. * keymap.c (fix_submap_inheritance, get_keyelt, store_in_keymap, copy-keymap, where_is_internal_1): Support new format for menu items. (syms_of_keymap): New symbol `menu-item'. * keyboard.c: Include puresize.h for CHECK_IMPURE. (parse_menu_item): New function. (menu_item_eval_property_1, menu_item_eval_property) New suroutines. (menu_bar_one_keymap): Moved some code to menu_bar_item. (menu_bar_item): Rewritten to use parse_menu_item. (menu_bar_item_1): Function deleted. (QCenable, QCvisible, QChelp, QCfilter, QCbutton, QCtoggle, QCradio): (Qmenu_alias): New variables. (syms_of_keyboard): Initialize them, and item_properties. * xmenu.c: Don't include puresize.h any more as code that needs it has moved to keyboard.c. (menu_item_equiv_key, menu_item_enabled_p_1, menu_item_enabled_p): Functions deleted; code moved to parse_menu_item in keyboard.c. (single_keymap_panes): Large part of code moved to single_menu_item. (single_menu_item): New function that uses parse_menu_item. (Qmenu_alias): Variable deleted. (QCtoggle, QCradio): New variables. (syms_of_xmenu): Change initializations of variables. 1998-03-20 Richard Stallman * window.c (window_display_table): Don't look inside buffer if its nil. * insdel.c (del_range_2): Use adjust_markers_for_record_delete. 1998-03-19 Kenichi Handa * editfns.c (Fgoto_char): If POSITION is a marker pointing a different buffer, don't rely on the byte position of the marker. 1998-03-19 Richard Stallman * editfns.c (Fformat): Handle padding before or after, for %s etc. Treat 0 like a multibyte char in %c. 1998-03-19 Erik Naggum * filelock.c (get_boot_time): Conditionalize on BOOT_TIME. (lock_file_1): Add boot-time to lock only if available. 1998-03-19 Kenichi Handa * fns.c (Fstring_as_multibyte): Call multibyte_chars_in_text instead of chars_in_text because we must ignore enable-multibyte-characters here. * lread.c (read1): Likewise. * marker.c (byte_char_debug_check): Likewise. 1998-03-19 Richard Stallman * filelock.c (current_lock_owner): If lock file data doesn't include the uptime, assume the lock is from this system boot. 1998-03-18 Richard Stallman * lread.c (read0): Swap args to Fmake_string. 1998-03-17 Richard Stallman * callproc.c (syms_of_callproc): Doc fixes. * insdel.c (adjust_markers_for_delete): Delete unused local coming_gap_size. (adjust_markers_for_record_delete): New function. (insert_1_both, insert_from_string_1, insert_from_buffer_1) (adjust_after_replace, replace_range): Use adjust_markers_for_record_delete. * editfns.c (Fsave_excursion): Doc fix. * window.c (Frecenter): Operate on window's buffer even if some other was current. * filelock.c (get_boot_time): New function. (lock_file_1): Include boot time in the lock text. (current_lock_owner): Parse and compare the boot time. 1998-03-16 Erik Naggum * editfns.c (Fformat): Properly print floats. 1998-03-16 Kenichi Handa * insdel.c (ADJUST_CHAR_POS): New macro. (combine_bytes): Use the macro ADJUST_CHAR_POS. (adjust_after_replace): New arg REPLACE. If it is zero, give LEN as the arg LENGTH to offset_intervals. (del_range_2): Give correct args to count_combining_before and combine_bytes. Adjust the gap position after record_delete if necessary. Give character position to adjust_overlays_for_delete. * fileio.c (Finsert_file_contents): Give adjust_after_replace the new arg REPLACE as 0. * coding.c (code_convert_region): The 6th arg name is changed to REPLACE. Even if there's no need of code conversion, call adjust_after_replace to handle bytes combining. 1998-03-15 Richard Stallman * syntax.h (SYNTAX_FLAGS_COMSTART_FIRST): New macro. (SYNTAX_FLAGS_COMSTART_SECOND): Likewise. (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND): Likewise. (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLE): Likewise. * syntax.c (Fbackward_prefix_chars): Set point properly while scanning. (scan_sexps_forward): Make INC_FROM do UPDATE_SYNTAX_TABLE_FORWARD. Delete the explicit calls to UPDATE_SYNTAX_TABLE_FORWARD. Also set prev_from_syntax (new local var). Test that in the loop, instead of fetching syntax of the previous char. * editfns.c (Fchar_after, Fchar_before): Properly check arg type and whether in range, for all cases. 1998-03-14 Richard Stallman * process.c (exec_sentinel, read_process_output): Fstore_match_data => Fset_match_data. * xmenu.c (set_frame_menubar): Fstore_match_data => Fset_match_data. * xdisp.c (message_dolog): Save and restore Vdeactivate_mark. (prepare_menu_bars): Fstore_match_data => Fset_match_data. (update_menu_bar): Likewise. 1998-03-13 Richard Stallman * search.c (Fset_match_data): Renamed from Fstore_match_data. (syms_of_search): Corresponding change. * lisp.h: Fstore_match_data => Fset_match_data. * window.c (Fwindow_end): New arg UPDATE. * window.c (Fset_window_configuration): Don't call do_switch_frame or run Qwindow_configuration_change_hook if frame is dead. * cmds.c (internal_self_insert): Call Fforward_buffer to advance over the replacement characters. 1998-03-12 Richard Stallman * process.c (Fstart_process): Doc fix. * s/ptx4.h (SETUP_SLAVE_PTY): New definition. * buffer.c (init_buffer): Call Fset_buffer_multibyte for *scratch*. 1998-03-11 Richard Stallman * insdel.c (insert_1_both, insert_from_string_1, insert_from_buffer_1) (adjust_after_replace, replace_range): Account for combining bytes in args to record_insert. (del_range_2): Make undo records for combining bytes. Put second call to move_gap_both before setting beg_unchanged. 1998-03-12 Kenichi HANDA * coding.c (code_convert_region): Adjusted for the change of adjust_after_replace. * fileio.c (Finsert_file_contents): Don't do position adjustments and handling post-read-conversion here, they are done in code_convert_region. Even if a file is read by no-conversion, call adjust_after_replace to adjust positions. * insdel.c (adjust_before_replace): Call adjust_overlays_for_delete. (adjust_after_replace): Delete args COMBINED_BEFORE_BYTES and COMBINED_AFTER_BYTES. This makes the newly generated text following GPT_ADDR a buffer contents. 1998-03-10 Richard Stallman * insdel.c (adjust_markers_for_insert): Don't leave a marker within the combined_after_bytes. Use DEC than INC when leaving a marker before the insertion. (count_combining_before): Return number of bytes from start of insertion that will combine. (insert_1_both): Compensate for change in count_combining_before. Delete intervals for the combined_after_bytes. Compensate for that when updating other intervals. (insert_from_buffer_1, replace_range): Likewise. (adjust_after_replace): Likewise. (insert_from_string_1): Likewise. Also handle intervals for inserting just part of string. * insdel.c (insert_1_both, insert_from_string_1, insert_from_buffer_1): Count all of combined_after_bytes, not just 1, when correcting nchars, and in related places. (adjust_after_replace, replace_range): Likewise. 1998-03-09 Gerd Moellmann * fontset.c (fontset_pattern_regexp): `==' was used instead of `='. 1998-03-09 Richard Stallman * insdel.c (combine_bytes): New function. (insert_1_both, insert_from_string_1, insert_from_buffer_1): Simplify greatly by using combine_bytes near the end to handle all aspects of combining except for undo-recording. This means most of the code deals with the text as if there were no combining. (replace_range): Likewise. Also handle unibyte-multibyte conversion as in insert_from_string_1. (del_range_2): Handle combining of character before the deletion with strays after the deletion. (adjust_markers_for_delete): Delete debugging code for Z == Z_BYTE. (adjust_markers_for_insert): Move Z == Z_BYTE debugging code to before we relocate the marker. 1998-03-09 Richard Stallman * lisp.h (struct Lisp_Buffer_Local_Value): Field car renamed to realvalue. New fields check_frame, found_for_buffer, found_for_frame, buffer, frame. * data.c (store_symval_forwarding, swap_in_symval_forwarding) (set_internal, default_value, Fset_default, Fmake_local_variable) (Fmake_variable_buffer_local, Fkill_local_variable): Handle new data structure for struct Lisp_Buffer_Local_Value. (Fmake_variable_frame_local): New function. * buffer.c (set_buffer_internal_1) (swap_out_buffer_local_variables): Handle new data structure for struct Lisp_Buffer_Local_Value. * print.c (print): Handle new data structure for struct Lisp_Buffer_Local_Value. * alloc.c (gc_sweep, mark_object): Handle new data structure for struct Lisp_Buffer_Local_Value. 1998-03-08 Richard Stallman * insdel.c (adjust_markers_for_insert): New arg COMBINED_BEFORE_BYTES. Calls changed. * search.c (simple_search): Don't count a character until it matches! Call set_search_regs differently in a forward search. (boyer_moore): Fix up the code that translates the pattern and loops thru equivalent characters. 1998-03-07 Richard Stallman * insdel.c (adjust_markers_for_insert): New arg COMBINED_AFTER_BYTES. Calls changed. (insert_1): Call insert_1_both. (count_combining_before): New function. (count_combining_after): New function. (insert_1_both, insert_from_string_1): Handle bytes that combine with chars adjacent to the inserted text. (insert_from_buffer_1, replace_range): Likewise. (adjust_after_replace): New args COMBINED_BEFORE_BYTES, COMBINED_AFTER_BYTES. 1998-03-06 Kenichi Handa * Makefile.in (alloc.o): Depend on charset.h. * alloc.c (Fmake_string): Handle the case INIT is a multibyte character correctly. * buffer.c (advance_to_char_boundary): Handle the case the code 0240..0377 is not a constituent of a multibyte sequence. * coding.c (code_convert_region): Fix previous change. Adjusted for the change of adjust_after_replace (see insdel.c change above). 1998-03-04 Ken'ichi Handa * coding.c (code_convert_region): Fix previous change. 1998-03-04 Kenichi HANDA * buffer.c (Fset_buffer_multibyte): Fix arg for chars_in_text. Be sure not to have a multibyte sequence striding over the GAP * charset.c (strwidth): Make it work for invalid bytes sequence. (Fstring_width): Give byte length of STR to strwidth. * coding.c (code_convert_region): Handle the case that codes 0240..0377 are generated just after a multibyte character. * editfns.c (Fformat): Format multibyte characters by "%c" correctly. Handle padding for multibyte characters correctly. 1998-03-03 Richard Stallman * puresize.h (BASE_PURESIZE): Increased. 1998-03-03 Kenichi Handa * Makefile.in (dired.o): Depend on charset.h and coding.h. * callproc.c (Vdefault_file_name_coding_system): Extern it. (Fcall_process): Use ENCODE_FILE. * coding.h (ENCODE_FILE): Moved from fileio.c. Use default-file-name-coding-system if file-name-coding-system is nil. (DECODE_FILE): New macro. * dired.c: Include charset.h and coding.h. (ENCODE_FILE): This macro is moved to coding.h. (Vdefault_file_name_coding_system): Extern it. (Fdirectory_files): Use DECODE_FILE. (file_name_completion): Likewise. * editfns.c (Fformat): Fix previous change. * fileio.c (ENCODE_FILE): This macro is moved to coding.h. (Vdefault_file_name_coding_system): New variable. (syms_of_fileio): Defsubr it. (Ffile_symlink_p): Use DECODE_FILE. (Ffile_name_directory): Use size_byte member of XSTRING (filename). (Ffile_name_as_directory): Likewise. (Fdirectory_file_name): Likewise. (Fsubstitute_in_file_name): Likewise. (expand_and_dir_to_file): Likewise. (Fdo_auto_save): Likewise. (Fread_file_name): Likewise. * insdel.c (insert_1_both): If enable-multibyte-characters is nil, insert each byte as one character. * process.c (Vdefault_file_name_coding_system): Extern it. (create_process): Use ENCODE_FILE. 1998-03-02 Kenichi Handa * callproc.c (Fcall_process): Calculate CARRYOVER correctly. * charset.h (NONASCII_INSERT_OFFSET): New macro. (VALID_MULTIBYTE_CHAR_P): New macro. * charset.c (DEFAULT_NONASCII_INSERT_OFFSET): Macro definition is moved to charset.h. (unibyte_char_to_multibyte): Always return a valid character. (Funibyte_char_to_multibyte): New function. (syms_of_charset): Defsubr it. Doc-string of nonascii-insert-offset is modified. * coding.h: Typo in comment fixed. * cmds.c (internal_self_insert): Avoid checking enable-multibyte-characters twice. * editfns.c (string1): Cast ARGS to `char **' to avoid compiler warning. * fileio.c (Ffile_name_nondirectory): Use size_byte member of XSTRING (filename). * fns.c (DEFAULT_NONASCII_INSERT_OFFSET): Macro definition is moved to charset.h. (concat): Use unibyte_char_to_multibyte. * insdel.c (DEFAULT_NONASCII_INSERT_OFFSET): Macro definition is moved to charset.h. (copy_text): Don't convert codes in the range 0200..0237 to multibyte characters. For codes in the range 0240..0377, use unibyte_char_to_multibyte. (count_size_as_multibyte): Likewise. (adjust_before_replace): Comment fixed. * xdisp.c (try_window_id): Use DEC_BOTH unconditionally. (display_text_line): Likewise. 1998-03-02 Richard Stallman * lisp.h (Vnonascii_translate_table, Qcharset): New variable decls. (Fstring_make_multibyte, Fstring_make_unibyte): New function decl. (Fstring_as_multibyte, Fstring_as_unibyte): New function decl. (list2, list3, list4, list5): New function decl. (Fwrite_region): Add an argument. (compare_window_configurations): New function decl. * keyboard.c: Include syntax.h. (interrupt_signal): Save and restore gl_state around an immediate quit, in case debugger returns. * Makefile.in (keyboard.o): Depend on syntax.h. * syntax.h (UPDATE_SYNTAX_TABLE): Do nothing unless parse_sexp_lookup_properties. (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD): Likewise. (SYNTAX_TABLE_BYTE_TO_CHAR): If parse_sexp_lookup_properties is 0, return 0 right away. (SETUP_SYNTAX_TABLE): Add if (1) ... else. 1998-03-01 Richard Stallman * fileio.c (auto_save_1): Pass new arg to Fwrite_region. (Fwrite_region): New arg CONFIRM. If non-nil, confirm overwriting. * callproc.c (Fcall_process_region): Pass new arg to Fwrite_region. 1998-03-01 Ilya Zakharevich * syntax.c (update_syntax_table): Properly update `position' field of used intervals. * interval.c (update_interval): Properly update `position' field of used intervals. 1998-02-28 Richard Stallman * fns.c (internal_equal): compare_window_configurations takes new arg. * window.c (compare_window_configurations): New arg ignore_positions. (Fcompare_window_configurations): New function. (syms_of_window): defsubr it. * keyboard.c (Fthis_command_keys_vector): New function. (Fread_key_sequence_vector): New function. (syms_of_keyboard): defsubr them. (Fthis_single_command_keys): Always return a vector. 1998-02-27 Richard Stallman * xterm.c (XTframe_up_to_date): Check that mouse_face_mouse_frame is non-null before calling note_mouse_highlight. (x_destroy_window): If f equals mouse_face_mouse_frame, clear that, and clear mouse_face_deferred_gc too. * xdisp.c (syms_of_xdisp): Doc fix. * data.c (store_symval_forwarding) : If buffer_local_types has -1, this variable is read-only. * buffer.c (syms_of_buffer): enable-multibyte-characters is read-only. * data.c (Fset_default) : Unconditionally set the slot in buffer_defaults. * buffer.c (reset_buffer): Initialize enable_multibyte_characters. * buffer.c (init_buffer_once): Force enable-multibyte-characters to be local in every buffer whether it is set or not. * fns.c (mapcar1): Handle bool-vectors. (Fmapconcat, Fmapcar): Doc fixes. (Flength): For char-table, length is based on max valid char code. * syssignal.h: Delete #endif left over from previous change. 1998-02-27 Andreas Schwab * indent.c (compute_motion): If we just moved over a continuation return contin_hpos as prevhpos. 1998-02-27 Karl Heuer * insdel.c (del_range_2): Reorder args. All callers changed. 1998-02-25 Karl Heuer * insdel.c (del_range_both): Reorder args. All callers changed. 1998-02-24 Kenichi Handa * xdisp.c (message_dolog): Give correct args to message_log_check_duplicate and del_range_both. * search.c (scan_newline): Delete duplicated code. 1998-02-21 Richard Stallman * cmds.c (Fdelete_backward_char): Count both bytes and chars. 1998-02-21 Ilya Zakharevich * syntax.h (UPDATE_SYNTAX_TABLE_FORWARD): Fix condition. (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE): Likewise. (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix bounds. * syntax.c (update_syntax_table): Fix calculations using offset. (skip_chars): Fix loop termination condition. * textprop.c (interval_of): Handle Qt. 1998-02-20 Andreas Schwab * s/gnu-linux.h (LINUX_MAP_SHARED_DOES_WORK): Define for kernel version after 2.0. (UNEXEC_USE_MAP_PRIVATE): Don't define if LINUX_MAP_SHARED_DOES_WORK. * syssignal.h (sigmask) [POSIX_SIGNALS]: Always define our own version that returns a sigset_t. (sigpause) [POSIX_SIGNALS]: Unconditionally define in terms of sigsuspend. Don't redefine SIGEMPTYMASK. (sys_sigpause): Don't declare. (temp_mask): Don't declare. * sysdep.c (sys_sigpause): Removed. (new_action, old_action): Move as local variables into sys_signal. (old_mask, temp_mask): Removed. 1998-02-20 Kenichi Handa * editfns.c (Fmessage): Check byte size (instead of char size) of VAL against MESSAGE_LENGTH. * fileio.c (Fwrite_region): When writing a string, give byte size to a_write. (a_write): Handle annotations correctly when writing a string. * ccl.c (Fccl_execute_on_string): Put \n\ at end-of-line of doc-string. 1998-02-19 Kenichi Handa * buffer.c (advance_to_char_boundary): Make the behaviour consistent with INC_POS. * ccl.c (Fccl_execute_on_string): Add new arg UNIBYTE-P. * charset.h (INC_POS): Use macro BASE_LEADING_CODE_P. (DEC_POS): Make the behaviour consistent with INC_POS. (BUF_INC_POS, BUF_DEC_POS): Likewise. * charset.c (invalid_character): New function. (chars_in_text): Make the behaviour consistent with INC_POS. (multibyte_chars_in_text): Likewise. (str_cmpchar_id): Likewise. (non_ascii_char_to_string): Call invalid_character. (Fchar_direction): Likewise. * coding.c (decode_coding_iso2022): Update coding->fake_multibyte. (ENCODE_SINGLE_SHIFT_2, ENCODE_SINGLE_SHIFT_3, encode_coding_iso2022, decode_coding_sjis_big5, encode_coding_sjis_big5, decode_eol, encode_eol, decode_coding, encode_coding): Likewise. (shrink_decoding_region, shrink_encoding_region): Do not skip non-ASCII code in any cases. Bug fix for getting starting address from BEG. (code_convert_region): Sync character positions correctly by paying attention to coding->fake_multibyte. (code_convert_string): Set number of character and bytes just processed in members of CODING. (code_convert_string): Adjusted for the change of code_convert_region. (code_convert_region1): Likewise. * coding.h (struct coding_system): New member fake_multibyte. * fileio.c (Finsert_file_contents): Read a file contents into the correct buffer (byte) position. Adjusted for the change of code_convert_region. * fns.c (Fset_char_table_default): For an invalid character, call invalid_character. * indent.c (MULTIBYTE_BYTES_WIDTH): New macro. (current_column_1): Don't follow a display table for a heading byte of a multibyte character. Use the macro MULTIBYTE_BYTES_WIDTH. (Fmove_to_column): Likewise. (compute_motion): Likewise. Handling of wide-column character fixed. * insdel.c (adjust_before_replace): Comment added. (adjust_after_replace): Comment added. Give correct args to adjust_point. Don't call signal_after_change here. * intervals.c (temp_set_point_both): Declare arg BYTEPOS as int. (set_point_both): Likewise. * search.c (search_buffer): Update POS_BYTE for regexp search. * xdisp.c (display_text_line): Handling of a wide-column character fixed. Make the behaviour consistent with INC_POS. 1998-02-18 Richard Stallman * editfns.c (Fchar_before): Check POS in valid range before calling CHAR_TO_BYTE. * search.c (search_command): Check LIM in valid range before calling CHAR_TO_BYTE. 1998-02-15 Richard Stallman * minibuf.c (read_minibuf): Do use DEFALT in place of empty input when when expflag is nonzero. (Fread_no_blanks_input): Arg INIT renamed to INITIAL. 1998-02-14 Richard Stallman * fileio.c (Fread_file_name): Alter the history to contain just the actual file name, and not any other preinserted text that is not really used. * search.c (simple_search): Call set_search_regs. (boyer_moore): New arg CHARSET_BASE says which chars to use the translate tables for. (search_buffer): Properly test which chars participate in translation. 1998-02-12 Gerd Moellmann * intervals.c (split_interval_right): Make sure to call balance_possible_root_interval in case an interval doesn't have a right child, because otherwise the interval tree might degenerate into a list. (split_interval_left): Ditto if an interval hasn't a left child. 1998-02-12 Richard Stallman * search.c (TRANSLATE): New arg OUT. Handle non-integer in TRT. All calls changed. * editfns.c (Fsubst_char_in_region): Don't increment pos twice. * charset.h (INC_BOTH, DEC_BOTH): In unibyte mode, simply increment bytepos. * syntax.c (skip_chars): Use INC_POS instead of INC_BOTH. (Fforward_comment): Always use both FROM and FROM_BYTE to set point. Use dec_bytepos not DEC_POS. (scan_lists): Handle unibyte buffers when decrementing temp_pos. (INC_FROM): Use INC_BOTH. (inc_bytepos, dec_bytepos): In unibyte mode, just increment bytepos. * xdisp.c (display_text_line): Use INC_BOTH for unibyte buffers too. 1998-02-10 Richard Stallman * keymap.c (describe_map_tree): Add the maps we have already handled into SUB_SHADOWS. 1998-02-06 Kenichi Handa * fns.c (Fstring_bytes): Declare arg STRING as Lisp_Object. * editfns.c (Fposition_bytes): Declare arg POSITION as Lisp_Object. Allow marker as arg POSITION. Use XINT for type consistency. 1998-02-09 Andreas Schwab * indent.c (compute_motion): If right margin is reached and we are truncating don't clobber PREV_HPOS if we are already past TO. 1998-02-09 Richard Stallman * fns.c (concat): Use Vnonascii_translate_table. * charset.c (Vnonascii_translate_table): New variable. (unibyte_char_to_multibyte): Use Vnonascii_translate_table. (syms_of_charset): Defvar it. * insdel.c (copy_text, count_size_as_multibyte): Use Vnonascii_translate_table. 1998-02-08 Richard Stallman * print.c (printchar): When outputting to echo area, update message_enable_multibyte, and convert previous text from unibyte to multibyte if necessary. * search.c (search_command): Fix call to search_buffer. 1998-02-07 Richard Stallman * dired.c (Fdirectory_files): Call compile_pattern the new way. * search.c (boyer_moore, simple_search): New subroutines. (search_buffer): For non-regexp, use one of those subroutines. Args TRT and INVERSE_TRT are now Lisp_Object. Callers changed. (compile_pattern_1): Arg TRANSLATE is now Lisp_Object. Calls changed. (compile_pattern): Arg TRANSLATE is now Lisp_Object. Calls changed. * config.in (RE_TRANSLATE_TYPE): Define as Lisp_Object. (RE_TRANSLATE): Use Faref to examine translate table. 1998-02-06 Richard Stallman * marker.c (byte_char_debug_check): New function. (CONSIDER, both definitions): Call it. (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise. (byte_debug_flag): New variable. (syms_of_marker): Set up Lisp variable. * buffer.c (advance_to_char_boundary): New function. (Fset_buffer_multibyte): Advance all byte-positions to char boundaries. Clear undo list. * fontset.h (GENERIC_FONT_PTR): Commented-out definition deleted. 1998-02-06 Kenichi Handa * window.h: Change argument number of Fdisplay_buffer to 3. 1998-02-06 Richard Stallman * buffer.c (Fpop_to_buffer): Pass new arg to Fdisplay_buffer. * window.c (Fdisplay_buffer): New arg FRAME. (temp_output_buffer_show): Pass new arg to Fdisplay_buffer. (Fother_window_for_scrolling): Likewise. * editfns.c (Fposition_bytes): New function. (syms_of_editfns): defsubr it. * fns.c (Fstring_bytes): New function. (syms_of_fns): defsubr it. 1998-02-05 Richard Stallman * minibuf.c (read_minibuf): If input is empty, return empty string. (Fread_string): Return DEFAULT_VALUE here, if input is empty. (Fcompleting_read): Likewise. 1998-02-04 Richard Stallman * keymap.c (Fdescribe_bindings_internal): Renamed from Fdescribe_bindings. New arg NOMENU. (syms_of_keymap): Corresponding changes. (describe_buffer_bindings): Get NOMENU out of the arg list. Pass it along to describe_map_tree. Improve text of `alternate_heading'. * alloc.c (list2, list3, list4, list5): New functions. 1998-02-04 Kenichi Handa * charset.c (Fiso_charset): Doc-string modified. * editfns.c (Fsubst_char_in_region): Handle character-base position and byte-base position correctly. (Fstring_to_char): Give byte size to STRING_CHAR. * insdel.c (copy_text): When copying from multibyte to unibyte, do not alter ASCII characters. 1998-02-03 Richard Stallman * editfns.c (Fformat): If MULTIBYTE is changed to 1 after we start computing TOTAL, jump back to `retry' (a new label). 1998-02-01 Richard Stallman * lread.c (read1): Handle infinities, NaN and -0.0 specially. (isfloat_string): Accept e+INF and e+NAN as exponents. * print.c (float_to_string): Handle infinities and NaN specially. * fns.c (concat): Handle bool-vectors correctly. * fns.c (concat): If making a string, a nonempty bool-vector is error. 1998-01-30 Richard Stallman * data.c (Faref, Faset): Allow indexing a char-table directly by numbers up to CHAR_TABLE_ORDINARY_SLOTS. * fns.c (Fset_char_table_range, Fchar_table_range): Allow a charset name symbol to designate a range. * callproc.c (Fcall_process): Allow creating a new buffer for the output. 1998-01-30 Kenichi Handa Kenichi Handa * coding.c (ENCODE_ISO_CHARACTER): Pay attention to CODING_FLAG_ISO_USE_ROMAN and CODING_FLAG_ISO_USE_OLDJIS. (code_convert_region1): New function. (Fdecode_coding_region): Call code_convert_region1. (Fencode_coding_region): Likewise. (code_convert_string1): New function. (Fdecode_coding_string): Call code_convert_string1. (Fencode_coding_string): Likewise. * doc.c (Fsubstitute_command_keys): Declare length_byte out of internal block. * editfns.c (CONVERTED_BYTE_SIZE): Fix the logic. (Fformat): Update the variable MULTIBYTE according to the result of Fprin1_to_string. Free BUF after making Lisp string from it. 1998-01-28 Richard Stallman * search.c (search_buffer): New args pos_byte and lim_byte. (search_command): Pass new args. 1998-01-28 Kenichi Handa * coding.c (DECODE_SJIS_BIG5_CHARACTER): Don't have to increase coding->produced_char here. (code_convert_region): Initialize LEN_BYTE correctly. * search.c (fast_string_match): Give re_search byte size of STRING. (trivial_regexp_p): Initialize LEN to byte size of REGEXP. (search_buffer): Give re_search_2 STARTPOS, RANGE and STOP by counting them by bytes. * data.c (syms_of_data): Register multibyte-string-p as a Lisp function. 1998-01-28 Richard Stallman * category.c (Fmodify_category_entry): Doc fix. (Fdescribe_categories): Renamed from Fdescribe_category. (syms_of_category): Corresponding changes. (Fcategory_set_mnemonics): Doc fix. (Fchar_category_set): Doc fix. (Fmake_category_set): Doc fix. 1998-01-26 Richard Stallman * xdisp.c (message_dolog): Cast M to unsigned char * to access bytes. * keyboard.c (command_loop_1): Run post-command-hook before, not after, clearing this-command-keys and updating last-command. * fns.c (string_make_multibyte): In all-ASCII case, return orig STRING. * fns.c (Fstring_as_unibyte): New function. (Fstring_as_multibyte): New function. (syms_of_fns): defsubr them. 1998-01-25 Richard Stallman * window.c (compare_window_configurations): New function. * fns.c (internal_equal): Use compare_window_configurations. * fileio.c (file_name_as_directory): For an empty name, return "/". 1998-01-24 Richard Stallman * callproc.c (Fcall_process): Test only args past args[4] for multibyteness. 1998-01-23 Ken'ichi Handa * charset.h: Delete garbage line "int use_dialog_box". 1998-01-23 Richard Stallman * lread.c (Funintern): Clear the symbol's obarray field. 1998-01-21 Richard Stallman * s/sol2-5.h (SYSTEM_MALLOC): Defined. 1998-01-21 Ken'ichi Handa * fileio.c (Finsert_file_contents): Fix previous change. 1998-01-21 Richard Stallman * syntax.c (back_comment): Move the find_defun_start call out of the scan_sexps_forward call. No need to call find_defun_start if we found the defun start in the initial scan. 1998-01-21 Kenichi Handa * callproc.c (Fcall_process): Use raw-text instead of emacs-mule when enable-multibyte-characters is nil. Adjusted for the change of encode_coding and decode_coding. * ccl.h: Definition of macros CCL_STAT_XXX are moved from ccl.c to here. * charset.c (min_composite_char): New variable. (syms_of_charset): Declare a Lisp variable min-composite-char. * charset.h (BCOPY_SHORT): New macro. * coding.h (CODING_FINISH_XXX): New macros. (CODING_MODE_XXX): New macros. (struct coding_system): New member mode, category_idx, heading_ascii. Deleted members last_block, direction, selective, carryover, carryover_size. (CODING_MAY_REQUIRE_DECODING): New macro. (CODING_CATEGORY_MASK_ISO_7BIT, CODING_CATEGORY_MASK_ISO_8BIT, CODING_CATEGORY_MASK_ISO_SHIFT, CODING_CATEGORY_MASK_ISO): New macros. (Qraw_text): Extern it. * coding.c (DECODE_CHARACTER_ASCII): Update coding->produced_char; (DECODE_CHARACTER_DIMENSION1): Likewise. (Qraw_text, Qcoding_category): New variables. (syms_of_coding): Intern and staticpro them. (coding_system_table): New variable. (CHARSET_OK, SHIFT_OUT_OK): New macros. (detect_coding_iso2022): Detection algorithm improved. (decode_coding_iso2022): Arg CONSUMED deleted, and the meaning of return value changed. Update members produced, produced_char, consumed, consumed_char of the struct *coding. Pay attention to CODING_MODE_INHIBIT_INCONSISTENT_EOL. (encode_coding_iso2022): Likewise. (decode_coding_sjis_big5, encode_coding_sjis_big5): Likewise. (decode_eol, encode_eol): Likewise. (ENCODE_ISO_CHARACTER): Update coding->consumed_char. (DECODE_SJIS_BIG5_CHARACTER): Update coding->produced_char. (ENCODE_SJIS_BIG5_CHARACTER): Update coding->consumed_char. (detect_coding_mask): New args PRIORITIES and SKIP. (detect_coding): Adjusted for the change of detect_coding_mask. Update coding->heading_ascii. (detect_eol_type): New arg SKIP. (detect_eol): Adjusted for the change of detect_eol_type. (ccl_codign_driver): New function. (decode_coding): Arg CONSUMED deleted, and the meaning of return value changed. Update members produced, produced_char, consumed, consumed_char of the struct *coding. (encode_coding): Likewise. (shrink_decoding_region, shrink_encoding_region): New function. (code_convert_region, code_convert_string): Completely rewritten. (detect_coding_system): New arg HIGHEST. (Fdetect_coding_region): New arg HIGHEST. (Fdetect_coding_string): New function. (Fdecode_coding_region, Fencode_coding_region): Adjusted for the change of code_convert_region. (Fdecode_coding_string, Fencode_coding_string): Adjusted for the change of code_convert_string. (Fupdate_iso_coding_systems): New function. (init_coding_once): Initialize coding_system_table. * data.c (Faset): Allow setting a multibyte character in a multibyte string as far as it doesn't change the size_byte of the string. * fileio.c (Finsert_file_contents): Adjusted for the change of struct coding_system and function decode_coding. For normail file reading, use code_convert_region. (Fwrite_region): Adjusted for the change of struct coding_system. (e_write): Adjusted for the change of encode_coding. * fns.c (mapcar1): Keep `i' in `i_before' before `i' is incremented by FETCH_STRING_CHAR_ADVANCE. * insdel.c (adjust_before_replace, adjust_after_replace): New functions. * lisp.h (detect_coding_system): Extern it. * process.c (Fstart_process): Use raw-text instead of emacs-mule if enable-multibyte-characters is nil. Initialize members decoding_carryover and encoding_carryover of PROC. (create_process): Adjusted for the change of encode_coding. (Fopen_network_stream): Initialize members decoding_carryover and encoding_carryover of PROC. (read_process_output): Adjusted for the change of decode_coding. (send_process): Adjusted for the change of encode_coding. * process.h (struct Lisp_Process): New members decoding_carryover and encoding_carryover. * term.c (encode_terminal_code): Adjusted for the change of encode_coding. (write_glyphs): Likewise. Adjusted for the change of struct coding_system. (insert_glyphs): Likewise. * xselect.c (selection_data_to_lisp_data): Adjusted for the change of decode_coding. (lisp_data_to_selection_data): Adjusted for the change of encode_coding. (syms_of_xselect): Initialize clipboard-coding-system to compound-text. 1998-01-21 Kenichi Handa * fileio.c (Finsert_file_contents): Even if enable-multibyte-characters is nil, we must check `coding:' tag and `file-coding-system-alist' to handle eol-conversion. * coding.c (Vselect_safe_coding_system_function): New variable. (coding_category_table): This variable deleted. (Vcoding_category_table): New variable. (coding_category_name): Add "coding-category-iso-7-tight". (detect_coding_iso2022): Check the mask CODING_FLAG_ISO_DESIGNATION in CODING->FLAGS. Check a new coding category coding-category-iso-7-tight. (DECODE_DESIGNATION): Decode only such designations that CODING can handle. (check_composing_code): New function. (decode_coding_iso2022): Decode only such characters that CODING can handle. (encode_coding_iso2022): Before and after encoding composite characters, reset designation and invocation status. (detect_coding_sjis): Delete unnecessary check. (detect_coding_big5): Likewise. (encode_designation_at_bol): Check the validity of requested designation register. (setup_coding_system): Set requested designation registers for non-supported charsets to CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION. Set mask CODING_FLAG_ISO_DESIGNATION