1 2003-10-29 Kenichi Handa <handa@m17n.org>
3 * fontset.c (fontset_face): Create a fallback fontset on demand
4 (make_fontset): Don't create a fallback fontset here.
5 (free_face_fontset): Free a fallback fontset (if any) too.
6 (n_auto_fontsets): Delete this variable.
7 (auto_fontset_alist): New variable.
8 (new_fontset_from_font_name): Check auto_fontset_alist.
9 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
10 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
11 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
12 Defsubr Sfontset_list_all.
14 2003-10-24 Kenichi Handa <handa@m17n.org>
16 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
18 2003-10-23 Kenichi Handa <handa@m17n.org>
20 * fontset.c (Fnew_fontset): Check NAME more rigidly.
22 2003-10-17 Kenichi Handa <handa@m17n.org>
24 * editfns.c (Fgoto_char): Fix docstring.
26 2003-10-16 Kenichi Handa <handa@m17n.org>
28 * insdel.c (insert_from_gap): Adjust intervals correctly.
30 2003-10-12 Jason Rumney <jasonr@gnu.org>
32 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
33 (pfnGetFontUnicodeRanges): New dynamically loaded function.
34 (w32_initialize): Try to load it.
35 (x_get_font_repertory): Use it if available.
36 (w32_encode_char): Add shortcut for unicode output.
38 * w32fns.c (w32_load_system_font): Default charset to -1.
39 (x_to_w32_charset): Match all fonts for unicode.
40 (w32_to_x_charset): New parameter matching. Don't return partial
42 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
43 (w32_codepage_for_font): Return CP_UNICODE for unicode.
44 (w32_to_x_font): Match charset to real charset.
45 (enum_font_cb2): Always list unicode versions.
47 * makefile.w32-in (temacs): Increase EMHEAP.
49 2003-10-11 Jason Rumney <jasonr@gnu.org>
51 * w32term.c (w32_encode_char): New charset parameter.
52 font_info.encoding becomes encoding_type.
53 (x_get_font_repertory): New function. Warning: stub only!
54 (x_new_font): Return quickly if font already set.
55 (x_new_fontset): fontsetname parameter is Lisp_Object.
56 Use new fs_query_fontset. Try new_fontset_from_font_name. Use
57 fontset_name for return value.
59 * w32term.h: Declare x_get_font_repertory.
61 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
62 place of find_charset_in_text. Use encode_coding_object in place
64 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
67 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
69 (w32_load_system_font): Initialize charset as unicode.
70 font_info.encoding becomes encoding_type.
71 (w32_to_x_font): Use decode_coding_c_string in place of
73 (x_to_w32_font): Use encode_coding_object in place of
75 (syms_of_w32fns): Set get_font_repertory_func.
77 * w32console.c: Include character.h. Use terminal_encode_buffer
79 (write_glyphs): Use new version of encode_terminal_code. Use
80 encode_coding_object in place of encode_coding.
82 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
83 encoding becomes encoding_type.
85 * term.c (terminal_encode_buffer): Make externally visible.
87 * makefile.w32-in: Add character.h dependancies.
88 (character.o, chartab.o): New targets.
90 2003-10-10 Kenichi Handa <handa@m17n.org>
92 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
95 2003-10-07 Andreas Schwab <schwab@suse.de>
97 * coding.c (produce_chars): Revert last change.
99 2003-10-06 Kenichi Handa <handa@m17n.org>
101 * charset.h (charset_unicode): Extern it.
103 * charset.c (string_xstring_p): Check by (C >= 0x100).
104 (find_charsets_in_text): Format of the arc CHARSETS changed. New
106 (Ffind_charset_region, Ffind_charset_string): Adjusted for the
107 change of find_charsets_in_text.
108 (Fsplit_char): Fix doc. Never return unknown.
110 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
112 * coding.c (Fdefine_coding_system_alias): Update
115 * fontset.c (load_font_get_repertory): Pay attention to the case
116 that ENCODING of a font is specified by a char-table.
118 * xterm.c (x_get_font_repertory): Handle the case that the
119 encoding of font is other than Unicode.
121 2003-10-02 Kenichi Handa <handa@m17n.org>
123 * term.c (encode_terminal_code): Don't handle glyph-table. Check
124 if a character is encodable by the terminal coding system. If
125 not, produces proper number of `?'s. Update
126 terminal_encode_buffer and terminal_encode_buf_size if necessary.
127 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
129 2003-10-01 Kenichi Handa <handa@m17n.org>
131 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
133 (encode_terminal_code): Argument changed. Encode multiple
134 characters at once. Store the result of encoding in
135 terminal_encode_buffer.
136 (write_glyphs): Adjusted for the change of encode_terminal_code.
137 (insert_glyphs): Likewise.
138 (term_init): Initialize terminal_encode_buffer and
139 terminal_encode_buf_size.
141 * coding.c (consume_chars): If coding->src_object is nil, don't
144 2003-09-30 Kenichi Handa <handa@m17n.org>
146 * character.c (char_string): Use ASCII_CHAR_P instead of
149 2003-09-30 Kenichi Handa <handa@m17n.org>
151 * xdisp.c (handle_auto_composed_prop): Check if the last
152 characters of auto-composed region is newly composed with the
153 following characters.
154 (handle_composition_prop): Fix checking of point being inside
157 2003-09-26 Kenichi Handa <handa@m17n.org>
159 * fns.c (concat): Don't change multibyteness of the result by
160 concatenating an 8-bit character.
162 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
163 multibyteness of the result when newelt is an 8-bit character.
165 2003-09-29 Dave Love <fx@gnu.org>
167 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
170 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
172 * xfaces.c (face_numeric_value): Declare dim size_t.
173 (Finternal_lisp_face_equal_p): Remove unused f.
175 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
176 (MATRIX_ROW): Remove unused vars.
177 (draw_glyphs, x_insert_glyphs, fast_find_position)
178 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
181 * regex.c (regex_compile): Remove unused var.
183 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
185 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
186 (Faccessible_keymaps, where_is_internal): Remove unused vars.
188 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
190 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
192 * fileio.c (Fwrite_region): Remove unused var.
194 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
195 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
197 * composite.c (Fremove_list_of_text_properties): Declare.
199 * coding.c (inhibit_pre_post_conversion): Removed (unused).
200 (alloc_destination, produce_chars): Use EMACS_INT for byte/char
202 (coding_inherit_eol_type): Remove unused attrs.
203 (detect_coding): Cast arg of detect_eol.
205 * charset.c (syms_of_charset): Remove unused var p.
206 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
209 * casetab.c (set_case_table): Remove unused var.
211 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
215 2003-09-26 Dave Love <fx@gnu.org>
217 * xterm.c (x_bitmap_mask): Declare.
219 2003-09-17 Dave Love <fx@gnu.org>
221 * xterm.c (x_term_init): Fix type error.
223 * lisp.h: Add Funibyte_char_to_multibyte.
225 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
226 (Fset_coding_system_priority): Doc fix.
228 * alloc.c: Sync with HEAD version.
230 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
232 * indent.c (check_composition): Make start and end EMACS_INT.
234 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
236 * xdisp.c (handle_composition_prop, check_point_in_composition):
237 Make buffer positions EMACS_INT.
239 * composite.c (find_composition, run_composition_function)
240 (update_compositions, Ffind_composition_internal): Make buffer
243 * composite.h (find_composition, update_compositions): Make
244 position args EMACS_INT.
246 * keyboard.c (adjust_point_for_property): Make beg and end
249 * intervals.c (get_property_and_range)
250 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
252 * unexalpha.c: Don't include varargs.h.
254 2003-09-16 Dave Love <fx@gnu.org>
256 * coding.h (ENCODE_UTF_8): New.
258 * Makefile.in (gtkutil.o): Depend on coding.h.
260 * coding.c (Fset_coding_system_priority): Doc fix.
262 2003-09-16 Kenichi Handa <handa@m17n.org>
264 * fileio.c (Finsert_file_contents): Call setup_coding_system in
265 the case of auto saving.
267 2003-09-10 Andreas Schwab <schwab@suse.de>
269 * chartab.c (map_char_table): Protect `range' from GC.
270 (map_char_table_for_charset): Likewise.
272 2003-07-09 Kenichi Handa <handa@m17n.org>
274 * coding.c (decode_coding_sjis): Check bytes more rigidly.
276 2003-06-26 Kenichi Handa <handa@m17n.org>
278 * fileio.c (choose_write_coding_system): Return a decided coding
280 (Fwrite_region): Set Vlast_coding_system_used to the return value
281 of choose_write_coding_system.
283 2003-06-06 Kenichi Handa <handa@m17n.org>
285 * charset.c (Fset_charset_priority): Pay attention to duplicated
288 * coding.c (QCcategory): New variable.
289 (syms_of_coding): Defsym it. Set all elements of
290 Vcoding_category_table and their symbol values.
291 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
292 coding-category-XXX, and coding-category-list.
293 (Fdefine_coding_system_internal): Add category in the plist.
295 2003-06-05 Kenichi Handa <handa@m17n.org>
297 * callproc.c (Fcall_process): Handle carryover correctly.
299 * coding.c (decode_coding_iso_2022): Fix handling of invalid
301 (raw_text_coding_system): Check NILP (coding_system).
302 (coding_inherit_eol_type): Check NILP (coding_system) and
304 (consume_chars): Fix for the case of raw-text.
306 * process.c (read_process_output): Handle carryover correctly.
308 2003-06-02 Dave Love <fx@gnu.org>
310 * regex.c (re_search_2): Fix last change.
312 2003-05-30 Kenichi Handa <handa@m17n.org>
314 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
315 target_multibyte. Even in a unibyte case, return a converted
317 (GET_CHAR_AFTER): New macro.
318 (PATFETCH): Translate via multibyte char.
319 (HANDLE_UNIBYTE_RANGE): Delete this macro.
320 (SETUP_MULTIBYTE_RANGE): New macro.
321 (regex_compile): Setup compiled code so that its multibyteness
322 matches that of a target. Fix the handling of "[X-YZ]" using
323 SETUP_MULTIBYTE_RANGE.
324 (analyse_first) <charset>: For filling fastmap for all multibyte
325 characters, don't check by BASE_LEADING_CODE_P.
326 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
327 the same as RE_MULTIBYTE_P (bufp) now.
328 (mutually_exclusive_p): Check by (! multibyte ||
330 (TARGET_CHAR_AND_LENGTH): Delete this macro.
331 (TRANSLATE_VIA_MULTIBYTE): New macro.
332 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
333 It is the same as RE_MULTIBYTE_P (bufp) now.
334 <exactn>: Translate via multibyte.
335 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
337 <charset, charset_not>: Fetch a character by
338 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
339 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
340 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
341 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
343 (bcmp_translate): Likewise.
345 * search.c (compile_pattern): Check the member target_multibyte,
346 not the member multibyte of buf.
348 * lread.c (read1): While reading a string, set force_singlebyte
349 and force_multibyte correctly.
351 * charset.c (Fset_unibyte_charset): Fix setting up of
352 unibyte_to_multibyte_table.
353 (init_charset_once): Likewise.
355 2003-05-29 Kenichi Handa <handa@m17n.org>
357 * coding.c (setup_coding_system): If coding has
358 post-read-conversion or pre-write-conversion, set
359 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
361 (decode_coding_gap): Run post-read-conversion if any.
363 * fileio.c (Finsert_file_contents): Even if we read into a
364 unibyte buffer, check if we must decode the result or not.
366 2003-05-29 Kenichi Handa <handa@m17n.org>
368 * coding.c (make_conversion_work_buffer): Change the work buffer
369 name to the same one as that of Emacs 21.
371 2003-05-28 Kenichi Handa <handa@m17n.org>
373 * coding.h (make_conversion_work_buffer): Prototype adjusted.
374 (code_conversion_restore): Don't extern it.
376 * coding.c (detected_mask): Delete unused variable.
377 (decode_coding_iso_2022): Pay attention to the byte sequence of
378 CTEXT extended segment, and retain those bytes as is.
379 (decode_coding_ccl): Delete unused variable `valids'.
380 (setup_coding_system): Delete unused variable `category'.
381 (consume_chars): Delete unused variable `category'. Make it work
382 for non-multibyte case.
383 (make_conversion_work_buffer): Argument changed.
384 (saved_coding): Delete unused variable.
385 (code_conversion_restore): Don't check saved_coding->destination.
386 (code_conversion_save): New function.
387 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
388 instead of record_unwind_protect.
389 (decode_coding_object, encode_coding_object): Likewise. Recover
391 (detect_coding_system): Delete unused variable `mask'.
392 (Fdefine_coding_system_internal): Delete unsed vaiable id;
394 * fileio.c (kill_workbuf_unwind): New function.
395 (Finsert_file_contents): On replacing, call
396 make_conversion_work_buffer with correct args, and call
397 record_unwind_protect with the first arg kill_workbuf_unwind.
399 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
401 2003-05-20 Kenichi Handa <handa@m17n.org>
403 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
405 (fontset_add): Fix for the case that TO is less than TO1.
406 (Ffontset_info): Don't use fallback fontset on checking the
408 (dump_fontset): New function for debugging.
410 * coding.c (Fdefine_coding_system_internal): Fix for the case that
411 coding_type is Qcharset.
413 2003-05-07 Kenichi Handa <handa@m17n.org>
415 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
416 (map_char_table): Don't inherit the value from the parent on
417 initializing VAL. Adjusted for the above change.
419 2003-05-06 Kenichi Handa <handa@m17n.org>
421 * coding.c (Qsignature, Qendian): Delete these variables.
422 (syms_of_coding): Don't initialize them.
423 (CATEGORY_MASK_UTF_16_AUTO): New macro.
424 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
426 (decode_coding_utf_16): Don't detect BOM here.
427 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
428 is NOT utf_16_without_bom.
429 (setup_coding_system): For a coding system of type utf-16, check
430 if the attribute :endian is Qbig or not (not nil or not), and set
431 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
432 (detect_coding): If coding type is utf-16 and BOM detection is
434 (Fdefine_coding_system_internal): For a coding system of type
435 utf-16, check if the attribute :endian is Qbig or not (not nil or
438 2003-05-06 Kenichi Handa <handa@m17n.org>
440 * coding.c (coding_set_source): Fix for the case that the current
441 buffer is different from coding->src_object.
442 (decode_coding_object): Don't use the conversion work buffer if
443 DST_OBJECT is a buffer.
445 2003-05-04 Dave Love <fx@gnu.org>
447 * lread.c (read_emacs_mule_char) [len==2]: Index
448 emacs_mule_charset correctly.
450 2003-02-16 Dave Love <fx@gnu.org>
452 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
453 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
454 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
456 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
457 (detected_mask): Remove Big5 bits.
459 2003-04-09 Kenichi Handa <handa@m17n.org>
461 The following changes are to make the font rescaling facility
462 compatible with Emacs 21.
464 * xfaces.c (Vface_font_rescale_alist): Renamed from
465 Vface_resizing_fonts.
466 (struct font_name): Rename member resizing_ratio to rescale_ratio.
467 (font_rescale_ratio): Renamed from font_resizing_ratio.
468 (split_font_name): Set font->rescale_ratio.
469 (better_font_p): Pay attention to font->rescale_ratio.
470 (build_scalable_font_name): Likewise. Change RESX, and RESY
472 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
475 2003-03-28 Kenichi Handa <handa@m17n.org>
477 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
478 (Qutf_16_le): Remove these variables.
479 (syms_of_coding): Don't DEFSYM them.
480 (decode_coding_utf_16): Fix handling of BOM.
481 (encode_coding_utf_16): Fix handling of BOM.
483 2003-03-14 Kenichi Handa <handa@m17n.org>
485 * fileio.c (Finsert_file_contents): On replacing, before decoding
486 the file into the work buffer, set point of the work buffer to the
489 2003-02-13 Dave Love <fx@gnu.org>
491 * coding.c (Fcheck_coding_systems_region): Fix type errors.
493 2003-02-04 Dave Love <fx@gnu.org>
495 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
498 2003-01-31 Kenichi Handa <handa@m17n.org>
500 * xdisp.c (SKIP_GLYPHS): New macro.
501 (set_cursor_from_row): Pay attention to string display properties.
503 * category.c (copy_category_entry): Fix for the case that RANGE
506 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
508 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
511 2003-01-30 Kenichi Handa <handa@m17n.org>
513 * charset.c (Fcharset_id_internal): New function.
514 (syms_of_charset): Defsubr it.
516 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
517 with the last arg charset_list acquired from coding.
518 (Fdefine_coding_system_internal): For ccl-based coding system, fix
519 the attribute coding_attr_ccl_valids.
521 * coding.h (enum define_coding_ccl_arg_index): Set the first
522 member coding_arg_ccl_decoder to coding_arg_max.
524 * ccl.h (ccl_driver): Prototype adjusted.
526 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
527 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
528 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
529 (Fccl_execute): Call ccl_driver with the last arg Qnil.
530 (Fccl_execute_on_string): Likewise.
532 2003-01-11 Kenichi Handa <handa@m17n.org>
534 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
537 * charset.c (encode_char): Fix handling of methods SUBSET and
540 * xterm.c (x_new_fontset): Fix previous change.
542 2003-01-10 Dave Love <fx@gnu.org>
544 * composite.c (syms_of_composite): Make composition_hash_table
547 2003-01-10 Kenichi Handa <handa@m17n.org>
549 * dispextern.h (check_face_attributes, generate_ascii_font_name)
550 (font_name_registry): Don't extern them.
551 (split_font_name_into_vector, build_font_name_from_vector): Extern
554 * fontset.h (Qfontset): Don't extern it.
555 (new_fontset_from_font_name): Extern it.
557 * fontset.c: Give 8 extra slots to fontset objects.
558 (Qfontset_info): New variable.
559 (syms_of_fontset): Defsym it.
560 (FONTSET_FALLBACK): New macro.
561 (fontset_face): Try also the default fontset.
562 (make_fontset): Realize a fallback fontset from the default
564 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
565 using split_font_name_into_vector and build_font_name_from_vector.
566 (Fset_fontset_font): Access the elements of font_spec by enum
567 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
568 name by using split_font_name_into_vector.
569 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
570 generate a proper font name from the fontset name. Update
571 Vfontset_alias_alist.
572 (n_auto_fontsets): New variable.
573 (new_fontset_from_font_name): New function.
574 (Ffont_info): Store the information about fonts generated from the
575 default fontset in the first extra slot of the returned
578 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
579 (font_name_registry): Function deleted.
580 (split_font_name_into_vector): New function.
581 (build_font_name_from_vector): New function.
582 (font_list): The argument REGISTRY is now a list of registry
584 (choose_face_font): If we are choosing an ASCII font, and ATTRS
585 specifies an explicit font name, return the name as is. Make a
586 list of registy names.
588 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
590 (Fx_create_frame): Don't call x_new_fontset here. Just use
591 x_list_fonts to check the existence of fonts.
593 * xterm.h (x_new_fontset): Prototype adjusted.
595 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
596 string. Use new_fontset_from_font_name to create a fontset from a
599 2003-01-07 Dave Love <fx@gnu.org>
601 * Makefile.in: Fix some dependencies.
603 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
604 set it to nil before returning.
606 * composite.c (update_compositions): Fix type error.
608 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
610 2003-01-07 Kenichi Handa <handa@etl.go.jp>
612 * xterm.c (x_new_font): Optimize for the case that the font is
613 already set for the frame.
615 2003-01-06 Kenichi Handa <handa@m17n.org>
617 * chartab.c (char_table_ascii): Check if the char table contents
618 is sub-char-table or not.
619 (char_table_set): Fix argument to char_table_ascii.
620 (char_table_set_range): Likewise.
622 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
623 (detect_coding_utf_8, detect_coding_utf_16)
624 (detect_coding_emacs_mule, detect_coding_iso_2022)
625 (detect_coding_sjis, detect_coding_big5)
626 (detect_coding_ccl, detect_coding_charset): Change argument MASK
627 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
628 sequence is valid in this coding system. Callers changed.
629 (MAX_ANNOTATION_LENGTH): New macro.
630 (ADD_ANNOTATION_DATA): New macro.
631 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
632 ADD_ANNOTATION_DATA. The format of annotation data changed.
633 (ADD_CHARSET_DATA): New macro.
634 (emacs_mule_char): New argument ID. Callers changed.
635 (decode_coding_emacs_mule, decode_coding_iso_2022)
636 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
637 Produce charset annotation data in coding->charbuf.
638 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
639 to charset annotation data in coding->charbuf.
640 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
641 coding->common_flags if the coding system is iso-2022 based and
643 (produce_composition): Adjusted for the new annotation data
645 (produce_charset): New function.
646 (produce_annotation): Handle charset annotation.
647 (handle_composition_annotation, handle_charset_annotation): New
649 (consume_chars): Handle charset annotation. Utilize the above two
651 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
652 buffer, get the deleted text as a string and set
653 coding->src_object to that string.
654 (detect_coding, detect_coding_system): Use the new struct
655 coding_detection_info.
657 * coding.h (struct coding_detection_info): New structure.
658 (struct coding_system): Prototype of the member `detector'
660 (CODING_ANNOTATE_CHARSET_MASK): New macro.
662 2003-01-06 Kenichi Handa <handa@etl.go.jp>
664 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
666 2003-01-03 Dave Love <fx@gnu.org>
668 * keymap.c (apropos_predicate, apropos_accumulate): Declare
670 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
671 to new local and nullify apropos_accumulate before returning.
672 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
674 2002-12-05 Kenichi Handa <handa@m17n.org>
676 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
679 2002-11-26 Dave Love <fx@gnu.org>
681 * fns.c (Flanginfo): Call synchronize_system_time_locale.
683 2002-11-07 Kenichi Handa <handa@m17n.org>
685 The following changes are to make character composition happen
686 automatically on displaying.
688 * Makefile.in (lisp, shortlisp): Add composite.elc
690 * composite.h (Qauto_composed, Vauto_composition_function,
691 Qauto_composition_function): Extern them.
693 * composite.c (Vcomposition_function_table,
694 Qcomposition_function_table): Delete variables.
695 (Qauto_composed, Vauto_composition_function,
696 Qauto_composition_function): New variables.
697 (run_composition_function): Don't call
698 compose-chars-after-function.
699 (update_compositions): Clear `auto-composed' text property.
700 (compose_chars_in_text): Delete this function.
701 (syms_of_composite): Staticpro Qauto_composed and
702 Qauto_composition_function. Declare Vauto_composition_function as
705 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
707 * xdisp.c (it_props): Add an entry for Qauto_composed.
708 (handle_auto_composed_prop): New function.
710 * xselect.c (selection_data_to_lisp_data): Don't call
711 compose_chars_in_text.
713 2002-11-06 Dave Love <fx@gnu.org>
715 * keyboard.c (read_char): Modify checking around use of
716 Vkeyboard_translate_table.
718 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
721 2002-11-06 Kenichi Handa <handa@m17n.org>
723 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
724 the case that the last byte is '\r' correctly.
725 (decode_coding_emacs_mule): Likewise.
726 (decode_coding_iso_2022): Likewise.
727 (decode_coding_sjis): Likewise.
728 (decode_coding_big5): Likewise.
729 (decode_coding_charset): Likewise.
730 (produce_chars): Likewise.
731 (decode_coding): Flushing out the unprocessed data correctly.
732 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
735 2002-10-31 Dave Love <fx@gnu.org>
737 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
739 (xaw_scroll_callback): Revert last change.
741 2002-10-30 Kenichi Handa <handa@m17n.org>
743 * charset.c (Fset_charset_priority): Update
744 Viso_2022_charset_list.
746 2002-10-29 Kenichi Handa <handa@m17n.org>
748 * xfaces.c (Vface_resizing_fonts): New variable.
749 (struct font_name): New member `resizing_ratio'.
750 (font_resizing_ratio): New function.
751 (split_font_name): Set font->resizing_ratio.
752 (better_font_p): Pay attention to font->resizing_ratio.
753 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
754 RESX, and RESY fields.
755 (try_alternative_families): Try scalable fonts if
756 Vscalable_fonts_allowed is not Qt.
757 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
759 2002-10-29 Dave Love <fx@gnu.org>
761 * xterm.c (xaw_scroll_callback): Cast correctly.
763 2002-10-28 Dave Love <fx@gnu.org>
765 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
766 (lispy_kana_keys): Comment out.
767 (make_lispy_event) [XK_kana_A]: Comment out.
769 * xterm.c (xaw_scroll_callback): Cast call_data.
770 (XTread_socket): Deal with ASCII keysyms.
771 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
773 2002-10-27 Dave Love <fx@gnu.org>
775 * xterm.c (Vx_keysym_table): New.
776 (syms_of_xterm): Initialize it.
777 (XTread_socket): Use it.
778 From head: Eliminate incorrect optimization that tried to avoid
779 decoding the output of X*LookupString.
780 (x_get_font_repertory): Delete charset declaration.
782 2002-10-16 Kenichi Handa <handa@m17n.org>
784 * coding.c (detect_coding): Fix previous change.
785 (detect_coding_charset): If only ASCII bytes are found, return 0.
786 (detect_coding_system): Fix previous change.
787 (Fdefine_coding_system_internal): Setup CODING_ATTR_ASCII_COMPAT
790 2002-10-15 Dave Love <fx@gnu.org>
792 * coding.c (Fcheck_coding_system): Doc fix.
794 * editfns.c (Finsert_byte): Return a proper value.
796 2002-10-14 Kenichi Handa <handa@etl.go.jp>
798 * coding.c (decode_coding): Fix args to translate_chars. Pay
799 attention to Vstandard_translation_table_for_decode.
800 (encode_coding): Fix args to translate_chars. Pay attention to
801 Vstandard_translation_table_for_encode.
803 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
806 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
807 not by SINGLE_BYTE_CHAR_P.
809 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
812 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
815 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
816 by SINGLE_BYTE_CHAR_P.
818 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
821 2002-10-14 Dave Love <fx@gnu.org>
823 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
825 2002-10-10 Dave Love <fx@gnu.org>
827 * fns.c (Flanginfo): Fix typo.
829 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
831 2002-10-10 Kenichi Handa <handa@m17n.org>
833 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
834 Don't update *mask when correctly detected.
835 (detect_coding_utf_16): Likewise.
836 (detect_coding_emacs_mule): Likewise.
837 (detect_coding_iso_2022): Likewise.
838 (detect_coding_sjis): Likewise.
839 (detect_coding_big5): Likewise.
840 (detect_coding_ccl): Likewise.
841 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
842 (detect_eol): Delete the argument CODING, and add the argument
844 (detect_coding): Adjusted for the changes above.
845 (detect_coding_system): Likewise.
847 2002-10-09 Kenichi Handa <handa@m17n.org>
849 * character.c (char_string): Renamed from
850 char_string_with_unification. Pay attention to
852 (string_char): Renamed from string_char.
854 * character.h (CHAR_STRING): Call char_string if C is greater than
856 (CHAR_STRING_ADVANCE): Likewise.
857 (STRING_CHAR): Call string_char instead of
858 string_char_with_unification.
859 (STRING_CHAR_AND_LENGTH): Likewise.
860 (STRING_CHAR_ADVANCE): Likewise.
862 2002-10-09 Dave Love <fx@gnu.org>
864 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
866 2002-10-07 Kenichi Handa <handa@m17n.org>
868 * keymap.c (push_key_description): Pay attention to
871 * regex.c (re_search_2): Fix for the case of unibyte buffer.
873 2002-10-06 Dave Love <fx@gnu.org>
875 * charset.c (define_charset_internal): Rename `supprementary'.
877 * Makefile.in (lisp, shortlisp): Remove latin-N.
879 2002-10-05 Dave Love <fx@gnu.org>
881 * xfns.c (x_window, x_window): Use use_xim.
883 * xterm.c (use_xim): Initialize.
884 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
885 (x_term_init): Maybe set use_xim.
887 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
889 2002-10-01 Kenichi Handa <handa@m17n.org>
891 * search.c (search_buffer): Fix case-fold-search of multibyte
893 (boyer_moore): Rename the last argument to char_high_bits.
895 2002-09-27 Kenichi Handa <handa@etl.go.jp>
897 * xdisp.c (display_string): Fix for the case of zero width glyph.
899 * xfns.c (x_set_font): Change the error message of the case that
900 x_new_fontset returns Qt.
902 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
903 (Finternal_set_lisp_face_attribute): Use signal_error for the
904 error of invalid fontset.
906 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
909 2002-09-19 Kenichi Handa <handa@etl.go.jp>
911 * regex.c (re_search_2): Fix previous change.
913 2002-09-18 Kenichi Handa <handa@etl.go.jp>
915 * syntax.c (skip_syntaxes): Fix previous change.
917 2002-09-13 Kenichi Handa <handa@etl.go.jp>
919 * syntax.c (skip_chars): Fix previous change.
920 (skip_syntaxes): Fix previous change.
922 2002-09-06 Dave Love <fx@gnu.org>
924 * config.in: Restore it.
926 2002-09-05 Dave Love <fx@gnu.org>
928 * config.in: Removed (now auto-generated).
930 * s/usg5-4.h: Fix last change.
932 * unexelf.c (unexec): Make .got handling not SGI-specific.
934 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
936 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
938 * keyboard.c (read_key_sequence): Fix type error.
940 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
943 * fontset.c (fontset_add): Return Lisp_Object.
945 2002-09-03 Dave Love <fx@gnu.org>
947 * charset.h (charset_ordered_list_tick): Declare extern.
949 2002-09-03 Kenichi Handa <handa@etl.go.jp>
951 The following changes (and some of 2002-08-20 changes of mine) are
952 for handling syntax, category, and case conversion for unibyte
953 characters by converting them to multibyte on the fly. With these
954 changes, we don't have to setup syntax and case tables for unibyte
955 characters in each language environment.
957 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
958 multibyte if necessary.
960 * bytecode.c (Fbyte_code): Likewise.
962 * character.h (LEADING_CODE_LATIN_1_MIN)
963 (LEADING_CODE_LATIN_1_MAX): New macros.
964 (unibyte_to_multibyte_table): Extern it.
965 (unibyte_char_to_multibyte): New macro.
966 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
967 (CHAR_LEADING_CODE): New macro.
968 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
970 * character.c (unibyte_to_multibyte_table): New variable.
971 (unibyte_char_to_multibyte): Move to character.h and defined as
973 (multibyte_char_to_unibyte): If C is an eight-bit character,
974 convert it to the corresponding byte value.
976 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
977 not 1, singals an error. Update the elements of
978 unibyte_to_multibyte_table.
979 (init_charset_once): Initialize unibyte_to_multibyte_table.
980 (syms_of_charset): Define the charset `iso-8859-1'.
982 * casefiddle.c (casify_object): Fix previous change.
984 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
985 as is without converting it to unibyte. In a unibyte buffer,
986 convert C to multibyte before checking the syntax.
988 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
990 * minibuf.c (Fminibuffer_complete_word): Use the macro
991 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
993 * regex.h (struct re_pattern_buffer): New member target_multibyte.
995 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
996 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
997 that is zero, convert an eight-bit char to multibyte.
998 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
1000 (PATFETCH): Convert an eight-bit char to multibyte.
1001 (HANDLE_UNIBYTE_RANGE): New macro.
1002 (regex_compile): Setup the compiled pattern for multibyte chars
1003 even if the given regex string is unibyte. Use PATFETCH_RAW
1004 instead of PATFETCH in many places. To handle `charset'
1005 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
1006 only for ASCII chars.
1007 (analyse_first) <exactn>: Simplified because the compiled pattern
1009 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
1010 <charset>: Use CHAR_LEADING_CODE to get leading codes.
1011 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
1013 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
1015 (re_search_2) In emacs, set the locale variable multibyte to 1,
1016 otherwise to 0. New local variable target_multibyte. Check it
1017 to decide the multibyteness of STR1 and STR2. If
1018 target_multibyte is zero, convert unibyte chars to multibyte
1019 before translating and checking fastmap.
1020 (TARGET_CHAR_AND_LENGTH): New macro.
1021 (re_match_2_internal): In emacs, set the locale variable multibyte
1022 to 1, otherwise to 0. New local variable target_multibyte. Check
1023 it to decide the multibyteness of STR1 and STR2. Use
1024 TARGET_CHAR_AND_LENGTH to fetch a character from D.
1025 <charset, charset_not>: If multibyte is nonzero, check fastmap
1026 only for ASCII chars. Call bcmp_translate with
1027 target_multibyte, not with multibyte.
1028 <begline>: Declare the local variable C as `unsigned'.
1029 (bcmp_translate): Change the last arg name to target_multibyte.
1031 * search.c (compile_pattern_1): Don't adjust the multibyteness of
1032 the regexp pattern and the matching target. Set cp->buf.multibyte
1033 to the multibyteness of the regexp pattern. Set
1034 cp->but.target_multibyte to the multibyteness of the matching
1036 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
1037 FETCH_STRING_CHAR_ADVANCE.
1038 (Freplace_match): Convert unibyte chars to multibyte.
1040 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
1041 unibyte chars to multibyte.
1042 (back_comment): Likewise.
1043 (scan_words): Likewise.
1044 (skip_chars): The arg syntaxp is deleted, and the code for
1045 handling syntaxes is moved to skip_syntaxes. Callers changed.
1046 Fix the case that the multibyteness of STRING and the current
1047 buffer doesn't match.
1048 (skip_syntaxes): New function.
1049 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
1051 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
1053 (scan_lists): Likewise.
1054 (Fbackward_prefix_chars): Likewise.
1055 (scan_sexps_forward): Likewise.
1057 2002-08-23 Kenichi Handa <handa@etl.go.jp>
1059 * xfaces.c (QCfontset): New variable.
1060 (LFACE_FONTSET): New macro.
1061 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
1062 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
1063 (Finternal_set_lisp_face_attribute): Handle QCfontset.
1064 (Finternal_get_lisp_face_attribute): Likewise.
1065 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
1066 check also LFACE_FONTSET_INDEX.
1067 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
1068 attrs[LFACE_FONT_INDEX].
1069 (syms_of_xfaces): Intern and staticpro QCfontset.
1071 * dispextern.h (enum lface_attribute_index): New member
1072 LFACE_FONTSET_INDEX.
1074 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
1076 2002-08-21 Kenichi Handa <handa@etl.go.jp>
1078 * coding.c (coding_set_destination): Fix coding->destination for
1079 the case converting a region.
1080 (encode_coding_utf_8): Encode eight-bit chars as single byte.
1081 (encode_coding_object): Fix coding->dst_pos and
1082 coding->dst_pos_byte for the case converting a region.
1084 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
1086 * character.h (BYTE8_STRING): New macro.
1088 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
1090 2002-08-20 Kenichi Handa <handa@etl.go.jp>
1092 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
1093 characters by octal form.
1095 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
1097 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
1098 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
1099 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
1100 (FETCH_CHAR_AS_MULTIBYTE): New macro.
1102 * casetab.c (set_canon, set_identity, shuffle): Simplified.
1104 * casefiddle.c (casify_object): Simplified. Handle the case that
1105 the case conversion change the byte length.
1106 (casify_region): Likewise
1108 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
1111 * character.c (_fetch_multibyte_char_len): This variable deleted.
1112 (syms_of_character): Setup Vprintable_chars.
1114 * editfns.c (Fchar_equal): Fix for the unibyte case.
1115 (Finsert_byte): New function.
1116 (syms_of_editfns): Defsubr it.
1118 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
1119 of direct code 0x3ffff.
1121 * search.c (Freplace_match): Fix for the unibyte case.
1123 2002-08-19 Kenichi Handa <handa@etl.go.jp>
1125 * lread.c (safe_to_load_p): Fix the logic.
1127 * syntax.c (scan_words): Don't treat characters belonging to
1128 different scripts as constituting a word.
1130 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
1132 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
1135 * emacs.c (main): In the case of --unibyte, instead of aborting on
1136 finding non-empty buffer, make it unibyte.
1138 2002-08-18 Kenichi Handa <handa@etl.go.jp>
1140 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
1141 to create a fontset.
1143 2002-08-18 Dave Love <fx@gnu.org>
1145 * character.c (Funibyte_char_to_multibyte): Doc fix.
1147 * xfns.c [HAVE_STDLIB_H]: Fix last change.
1149 2002-08-15 Kenichi Handa <handa@etl.go.jp>
1151 * fontset.c (fontset_add): Make the type `int'.
1152 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
1154 * character.c (unibyte_char_to_multibyte): Refer to
1155 charset_unibyte, not charset_primary.
1156 (multibyte_char_to_unibyte): Likewise.
1157 (Funibyte_char_to_multibyte): Likewise.
1159 * charset.h: (charset_unibyte): Extern it instead of
1162 * charset.c (charset_unibyte): Renamed from charset_primary.
1163 (Funibyte_charset): Renamed from Fprimary_charset.
1164 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
1165 (syms_of_charset): Adjusted for the above changes.
1167 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
1168 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
1169 it->multibyte_p is zero.
1171 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
1174 2002-08-08 Kenichi Handa <handa@etl.go.jp>
1176 * coding.c (Fdefine_coding_system_internal): Fix category setting
1177 for a coding system of type iso-2022.
1179 2002-08-02 Kenichi Handa <handa@etl.go.jp>
1181 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
1184 2002-08-01 Kenichi Handa <handa@etl.go.jp>
1186 * syntax.c (Vnext_word_boundary_function_table): New variable.
1187 (syms_of_syntax): Declare it as a Lisp variable.
1188 (scan_words): Call functions in Vnext_word_boundary_function_table
1191 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
1193 * fontset.c (fs_load_font): If fontp->charset is not negative,
1194 return fontp without setting its members.
1196 2002-07-31 Dave Love <fx@gnu.org>
1198 * config.in: Generated with autoheader.
1200 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
1202 * m/sparc.h (HAVE_ALLOCA): Delete.
1204 * s/irix6-5.h: Don't include strings.h.
1205 (bcopy, bzero, bcmp): Don't undef.
1207 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
1209 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
1210 (TIOCSIGSEND): Don't test IRIX6.
1211 (bcopy, bzero, bcmp): Define conditionally.
1213 2002-07-31 Kenichi Handa <handa@etl.go.jp>
1215 * buffer.c (Qas, Qmake, Qto): New variables.
1216 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
1217 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
1219 * callproc.c (Fcall_process): Don't call insert_1_both directly if
1220 we are inserting a process output into a multibyte buffer.
1222 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
1223 multibyte_char_to_unibyte.
1225 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
1226 by the primary charset, make it eight-bit char.
1227 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
1229 * charset.c: (charset_eight_bit, Qeight_bit_control): New
1231 (charset_8_bit__control, charset_8_bit_graphic,
1232 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
1233 (define_charset_internal): New function.
1234 (syms_of_charset): Call define_charset_internal for pre-defined
1237 * charset.h (charset_8_bit): Extern it.
1239 * coding.c (make_conversion_work_buffer): Adjusted for the change
1240 of Fset_buffer_multibyte.
1241 (encode_coding_raw_text): Increment p0 in the loop.
1243 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
1245 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
1246 for the change of Fset_buffer_multibyte.
1248 * fns.c (Fstring_to_multibyte): New function.
1249 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
1251 2002-07-30 Dave Love <fx@gnu.org>
1253 * xfns.c (x_put_x_image): Declare args.
1255 * xfaces.c (font_name_registry, choose_face_font): Delete unused
1257 (try_font_list): Declare an arg.
1259 * xdisp.c (message2_nolog, set_message): Declare an arg.
1261 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
1263 * syntax.c (scan_sexps_forward): Declare an arg.
1265 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
1268 * lisp.h (Fnew_fontset): Declare.
1270 * keymap.c (push_key_description): Call CHARACTERP correctly.
1272 * fontset.c (fontset_add): Declare args. Call make_number
1274 (face_for_char): Delete unused vars.
1275 (Fset_fontset_font): Doc fix. Delete unused vars.
1277 * doc.c (Fsubstitute_command_keys): Delete unused vars.
1279 * composite.c (update_compositions): Declare arg.
1281 * cm.c (calccost, cmgoto): Declare args.
1283 * charset.c: Remove `emacs' conditional. Doc fixes.
1284 (map_char_table_for_charset): Declare.
1286 * character.c (syms_of_character) <translation-table-vector>: Doc
1289 * ccl.c: Remove `emacs' conditional. Include hash table stuff
1292 2002-07-26 Kenichi Handa <handa@etl.go.jp>
1294 The following changes are to allow specifying multiple font
1295 patterns for a character range (specified by script or charset).
1297 * Makefile.in (abbrev.o): Depend on syntax.h.
1298 (xfaces.o): Depend on charset.h.
1300 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
1303 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
1305 * character.h (Vchar_script_table): Extern it.
1307 * character.c (Vscript_alist): This variable deleted.
1308 (Vchar_script_table, Qchar_script_table): New variable.
1309 (syms_of_character): Declare Vchar_script_table as a lisp variable
1312 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
1313 have property char-table-extra-slots, make no extra slot.
1315 * dispextern.h (struct face): Member `charset' deleted.
1316 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
1318 (FACE_FOR_CHAR): Likewise.
1319 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
1321 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
1323 (generate_ascii_font_name): Renamed from generate_ascii_font.
1325 * fontset.h (get_font_repertory_func): New prototype.
1326 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
1327 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
1329 * fontset.c (Qprepend, Qappend): New variables.
1330 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
1331 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
1332 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
1333 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
1334 (fontset_ref_and_range, fontset_add, reorder_font_vector)
1335 (load_font_get_repertory): New functions.
1336 (fontset_set): This function deleted.
1337 (fontset_face): New arg FACE. Return face ID, not face.
1338 Completely re-written to handle new fontset structure. Caller
1340 (free_face_fontset): Use ASET istead of AREF (X) = Y.
1341 (face_for_char): Don't call lookup_face.
1342 (make_fontset_for_ascii_face): New arg FACE.
1343 (fs_load_font): New arg CHARSET_ID. Don't check
1344 Vfont_encoding_alist here.
1345 (find_font_encoding): New function.
1346 (list_fontsets): Use STRINGP, not ! NILP.
1347 (accumulate_script_ranges): New function.
1348 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
1349 re-written to handle new fontset structure.
1350 (Ffontset_font): Return a copy of element.
1351 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
1352 docstring of font-encoding-alist.
1354 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
1355 (Fset_fotset_font): Fix arguments to 5.
1357 * msdos.c (XMenuActivate): Adjuted for the change of
1358 lookup_derived_face.
1360 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
1361 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
1362 (highlight_trailing_whitespace): Adjusted for the change of
1365 * xfaces.c: Include charset.h.
1366 (load_face_font): Argument C deleted. Caller changed.
1367 (generate_ascii_font_name): Renamed from generate_ascii_font.
1368 (font_name_registry): New function.
1369 (cache_face): Store ascii faces before non-ascii faces in buckets.
1370 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
1371 Lookup only ascii faces.
1372 (lookup_non_ascii_face): New function.
1373 (lookup_named_face): Argument C deleted. Caller changed.
1374 (lookup_derived_face): Argument C deleted. Caller changed.
1375 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
1376 a string, just call font_list with it.
1377 (choose_face_font): Arguments FACE and C deleted. New arg
1378 FONT_SPEC. Caller changed.
1379 (realize_face): Arguments C and BASE_FACE deleted. Caller
1380 (realize_x_face): Likewise.
1381 (realize_non_ascii_face): New function.
1382 (realize_x_face): Call load_face_font here.
1383 (realize_tty_face): Argument C deleted. Caller changed.
1384 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
1386 (dump_realized_face): Don't print charset of FACE.
1388 * xfns.c (x_set_font): Always call x_new_fontset and
1389 store_frame_parameter.
1390 (Fx_create_frame): Call x_new_fontset, not x_new_font.
1391 (syms_of_xfns): Set get_font_repertory_func to
1392 x_get_font_repertory.
1394 * xterm.h (x_get_font_repertory): Extern it.
1396 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
1397 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
1398 it->multibyte_p is zero.
1399 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
1400 (x_new_fontset): If FONTSETNAME doesn't match any existing
1401 fontsets, create a new one.
1402 (x_get_font_repertory): New function.
1404 2002-07-25 Kenichi Handa <handa@etl.go.jp>
1406 * coding.c (Ffind_coding_systems_region_internal): Detect an
1407 ASCII only string correctly.
1409 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
1412 2002-07-24 Kenichi Handa <handa@etl.go.jp>
1414 * lread.c: Include "coding.h".
1415 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
1416 load_each_byte, unread_char): New variables.
1417 (readchar_backlog): This variable deleted.
1418 (readchar): Return a character unless load_each_byte is nonzero.
1419 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
1420 cons. If unread_char is not -1, simply return it.
1421 (unreadchar): Handle the case that readcharfun is
1422 Qget_emacs_mule_file_char or a cons. Set unread_char if
1424 (read_multibyte): This function deleted.
1425 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
1426 (read_emacs_mule_char): New functions.
1427 (Fload): Even if the file doesn't have the extention ".elc", if
1428 safe_to_load_p returns a positive version number, assume that the
1429 file contains bytecompiled code. If the version is less than 22,
1430 load the file while decoding multibyte sequences by emacs-mule.
1431 (readevalloop): Don't use readchar_backlog.
1432 (Fread): Likewise. Pay attention to the case that STREAM is a
1434 (Fread_from_string): Pay attention to the case that STREAM is a
1436 (read_escape): The arg BYTEREP deleted.
1437 (read1): Set load_each_byte to 1 temporarily while handling
1438 #@NUMBER. Don't call read_multibyte.
1439 (read_vector): Call Fread with a cons. If readcharfun is
1440 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
1441 (read_list): If doc_reference is 2, make the cdr part string as
1443 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
1444 and Qload_force_doc_strings.
1446 2002-07-23 Kenichi Handa <handa@etl.go.jp>
1448 * xdisp.c (face_before_or_after_it_pos): Call
1449 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
1451 2002-07-22 Kenichi Handa <handa@etl.go.jp>
1453 * character.h (TRAILING_CODE_P): New macro.
1454 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
1455 (string_char_with_unification): Fix prototype.
1456 (Vscript_alist): Extern it.
1458 * character.c (Vscript_alist): New variable.
1459 (string_char_with_unification): Add `const' to local variables.
1460 (str_as_unibyte): Likewise.
1461 (string_escape_byte8): Likewise.
1462 (syms_of_character): Declare script-alist as a Lisp variable.
1464 * charset.h (Vcharset_ordered_list): Extern it.
1465 (charset_ordered_list_tick): Extern it.
1466 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
1467 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
1468 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
1469 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
1470 (Funify_charset): Adjusted for the change of Funify_charset.
1472 * charset.c (charset_ordered_list_tick): New variable.
1473 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
1474 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
1475 deunify intead of unify a charset.
1476 (string_xstring_p): Add `const' to local variables.
1477 (find_charsets_in_text): Add `const' to arguemnts and local
1479 (encode_char): Adjusted for the change of Funify_charset. Fix
1480 detecting of invalid code.
1481 (Fset_charset_priority): Increment charset_ordered_list_tick.
1482 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
1485 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
1486 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
1487 deleted. Callers changed to use
1488 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
1489 (decode_coding_ccl): Add `const' to local variables.
1490 (consume_chars): Likewise.
1491 (Ffind_coding_systems_region_internal): Likewise.
1492 (Fcheck_coding_systems_region): Likewise.
1494 * print.c (print_object): Use octal form for printing the
1495 contents of a bool vector.
1497 2002-07-18 Dave Love <fx@gnu.org>
1499 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
1500 <version == 20>: Refuse to load.
1502 2002-07-17 Dave Love <fx@gnu.org>
1504 * fns.c: Move coding.h.
1505 (Qcodeset, Qdays, Qmonths): New.
1506 (concat): Use CHARACTERP instead of INTERGERP.
1507 (Flocale_codeset): Deleted.
1508 (Flanginfo): New function.
1509 (syms_of_fns): Changed accordingly.
1511 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
1513 2002-07-16 Dave Love <fx@gnu.org>
1515 * casetab.c (init_casetab_once, init_casetab_once): Fix
1516 CHAR_TABLE_SET call.
1518 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
1520 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
1522 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
1523 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
1524 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
1526 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
1528 * coding.c (ENCODE_DESIGNATION, decode_eol)
1529 (make_conversion_work_buffer, code_conversion_restore)
1530 (Fdefine_coding_system_internal): Convert Lisp types.
1531 (code_conversion_restore): Use EQ, not ==.
1532 (Fencode_coding_string): Fix code_convert_string call.
1534 * coding.h (code_convert_region): Fix prototype.
1536 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
1538 * fontset.c (fontset_ref, fontset_set, fs_load_font)
1539 (Ffontset_info): Convert Lisp types.
1541 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
1543 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
1545 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
1547 * chartab.c: Include "...h", not <...h> in some cases.
1549 * callproc.c (Fcall_process): Remove unused variables.
1551 2002-07-12 Dave Love <fx@gnu.org>
1553 * coding.c (Fset_coding_system_priority): Allow null arg list.
1555 2002-07-03 Dave Love <fx@gnu.org>
1557 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
1558 (Fself_insert_and_exit): Use CHARACTERP.
1560 * callproc.c (Fcall_process): Remove unused vars.
1562 * xterm.c (XTread_socket): Add extra dead keysyms.
1564 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
1566 * dispextern.h: Remove prototypes for redraw_frame,
1567 redraw_garbaged_frames.
1569 * cmds.c (Fself_insert_command): Use CHARACTERP.
1571 * chartab.c (make_sub_char_table): Remove unused var.
1572 (Fset_char_table_default, Fmap_char_table): Doc fix.
1574 * keymap.c (access_keymap): Remove generic char code.
1575 (push_key_description): Use CHARACTERP.
1577 2002-07-01 Dave Love <fx@gnu.org>
1579 * charset.c: Doc fixes.
1580 (Funify_charset): Extra checking.
1582 2002-06-24 Dave Love <fx@gnu.org>
1584 * lread.c: Remove some unused variables.
1585 (safe_to_load_p): If safe, return the magic number version byte.
1586 (Fload): Maybe use load-with-code-conversion.
1588 2002-06-12 Kenichi Handa <handa@etl.go.jp>
1590 * category.c (Fmodify_category_entry): Don't modify the contents
1591 of category_set for characters out of the range. Avoid
1592 unnecessary modification.
1594 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
1595 Vchar_unify_table. The default value of the table is now nil.
1597 * character.c (syms_of_character): Setup Vchar_width_table for
1598 eight-bit-control and raw-byte chars.
1600 * charset.h (enum define_charset_arg_index): Delete
1601 charset_arg_parents and add charset_arg_subset and
1602 charset_arg_superset.
1603 (enum charset_attr_index): Delete charset_parents and add
1604 charset_subset and charset_superset.
1605 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
1606 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
1607 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
1608 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
1609 (CHARSET_SUPERSET): New macros.
1610 (charset_work): Extern it.
1611 (ENCODE_CHAR): Use charset_work.
1612 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
1613 (map_charset_chars): Extern it.
1615 * charset.c (load_charset_map): Set the default value of encoder
1616 and deunifier char-tables to nil.
1617 (map_charset_chars): Argument changed. Callers changed. Use
1618 map_char_table_for_charset instead of map_char_table.
1619 (Fmap_charset_chars): New optional args from_code and to_code.
1620 (Fdefine_charset_internal): Adjusted for the change of
1621 `define-charset' (:parents -> :subset or :superset).
1622 (charset_work): New variable.
1623 (encode_char): Adjusted for the change of
1624 Fdefine_charset_internal.
1625 (syms_of_charset): Likewise.
1626 (Ffind_charset_string): Setup the vector `charsets' correctly.
1628 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
1629 the previous change.
1630 (char_table_ref_and_range): Adjusted for the above change.
1631 (map_sub_char_table_for_charset): New function.
1632 (map_char_table_for_charset): New function.
1634 * keymap.c (describe_vector): Handle a char-table directly here.
1635 (describe_char_table): Deleted.
1637 * lisp.h (map_charset_chars): Deleted.
1639 2002-06-11 Dave Love <fx@gnu.org>
1641 * fns.c (count_combining): Comment out (unused).
1642 (Flocale_codeset): New.
1643 (syms_of_fns): Defsubr it.
1645 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
1648 2002-06-06 Dave Love <fx@gnu.org>
1650 * Makefile.in (chartab.o): Depend on charset.h
1652 2002-06-03 Kenichi Handa <handa@etl.go.jp>
1654 * character.c (syms_of_character): Set the default value of
1655 Vprintable_chars to Qnil.
1657 2002-05-31 Dave Love <fx@gnu.org>
1659 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
1661 2002-05-31 Kenichi Handa <handa@etl.go.jp>
1663 * charset.c (load_charset_map): Handle the case that from < to
1666 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
1668 (encode_coding_iso_2022): Likewise.
1669 (encode_coding_sjis): Likewise.
1670 (encode_coding_big5): Likewise.
1671 (encode_coding_charset): Likewise.
1673 2002-05-30 Kenichi Handa <handa@etl.go.jp>
1675 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
1676 not bytecompiled now.
1677 (shortlisp): Likewise.
1679 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
1680 (charset_jisx0208): New variables.
1681 (Fdefine_charset_internal): Setup them if appropriate.
1682 (init_charset_once): Initialize them to -1.
1684 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
1685 charset_jisx0208): Extern them.
1687 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
1688 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
1689 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
1690 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
1691 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
1692 and CODING_ISO_FLAG_USE_OLDJIS.
1693 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
1694 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
1695 (encode_coding_iso_2022): Change the 1st arg to
1696 ENCODE_ISO_CHARACTER to a variable.
1698 2002-05-29 Kenichi Handa <handa@etl.go.jp>
1700 * charset.h (enum define_charset_arg_index): New enums
1701 charset_arg_min_code and charset_arg_max_code.
1702 (struct charset): New member char_index_offset.
1704 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
1706 (INDEX_TO_CODE_POINT): Likewise.
1707 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
1708 args[charset_arg_max_code]. Setup charset.char_index_offset.
1709 (syms_of_charset): Fix args to Fdefine_charset_internal.
1711 2002-05-27 Dave Love <fx@gnu.org>
1713 * coding.c (decode_coding_utf_8): Reject overlong sequences.
1715 2002-05-26 Dave Love <fx@gnu.org>
1717 * coding.c: Doc fixes.
1718 (Fcoding_system_aliases): Fix return value.
1719 (Qmac): Remove (duplicated) definition.
1721 2002-05-25 Dave Love <fx@gnu.org>
1723 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
1726 * character.c (Fstring): Doc fix.
1728 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
1730 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
1732 (font-encoding-alist): Doc fix.
1734 2002-05-24 Dave Love <fx@gnu.org>
1736 * term.c (costs_set): Declare static, non-initialized for pcc.
1737 (encode_terminal_code): Remove ensued var.
1739 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
1742 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
1744 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
1745 (suffixes): Moved out of make_subsidiaries for K&R.
1747 * charset.c (map_charset_chars): Fix c_function declaration for
1750 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
1752 2002-05-23 Dave Love <fx@gnu.org>
1754 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
1756 * category.c (Fmodify_category_entry): Doc fix. Remove unused
1759 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
1761 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
1763 * coding.c (Fdefine_coding_system_internal): Fix previous change.
1764 (decode_coding_charset): Workaround for the bug of GCC 2.96.
1766 2002-05-23 Kenichi Handa <handa@etl.go.jp>
1768 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
1769 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
1770 (shortlisp): Likewise.
1772 2002-05-22 Kenichi Handa <handa@etl.go.jp>
1774 * coding.c (decode_coding_charset): Adjusted for the change of
1775 Fdefine_coding_system_internal.
1776 (Fdefine_coding_system_internal): For a coding system of
1777 `charset' type, store a list of charset IDs in
1778 `charset_attr_charset_valids' element of coding attributes.
1780 * charset.c (Fmake_char): Fix previous change.
1782 2002-05-21 Kenichi Handa <handa@etl.go.jp>
1784 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
1785 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
1786 changed. Handle 2-byte and 3-byte charsets correctly.
1787 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
1788 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
1789 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
1790 (DECODE_EMACS_MULE_21_COMPOSITION): Call
1791 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
1793 (decode_coding_emacs_mule): Handle composition correctly. Rewind
1794 `src' and `consumed_chars' correctly before calling
1796 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
1797 and alt&rule composition.
1798 (decode_coding_iso_2022): Handle composition correctly.
1799 (init_coding_once): Setup emacs_mule_bytes for private charsets.
1801 * charset.c (Fdefine_charset_internal): Fix bug for the case of
1802 re-defining a charset. If the charset has :emacs-mule-id, setup
1804 (Fmake_char): If CODE1 is nil, use the minimum code of the
1807 2002-05-20 Kenichi Handa <handa@etl.go.jp>
1809 * coding.c (encode_coding_iso_2022): If coding requires safe
1810 encoding, produce a character specified by
1811 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
1812 (encode_coding_sjis): Likewise.
1813 (encode_coding_big5): Likewise.
1814 (encode_coding_charset): Likewise.
1816 2002-05-17 Dave Love <fx@gnu.org>
1818 * xterm.c (XSetIMValues): Declare.
1820 * process.c: Conditionally include sys/wait.h, pty.h.
1822 * print.c (print_object): Fix print format for 64-bit
1825 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
1828 * buffer.c (emacs_strerror): Declare.
1829 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
1832 * fontset.c (Fclear_face_cache): Declare.
1833 (accumulate_font_info): Commented-out (unused).
1834 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
1837 * character.h (string_escape_byte8): Declare.
1839 * charset.c (load_charset_map, load_charset_map_from_file): Remove
1841 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
1842 (Fmap_charset_chars): Doc fix.
1844 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
1846 (Fset_coding_system_priority, Fset_coding_system_priority)
1847 (Fdefine_coding_system_internal): Doc fix.
1849 2002-05-16 Dave Love <fx@gnu.org>
1851 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
1853 2002-05-16 Kenichi Handa <handa@etl.go.jp>
1855 * character.c (string_escape_byte8): Make multibyte string with
1858 * charset.c (Fmake_char): Delete unnecessary code.
1860 2002-05-14 Kenichi Handa <handa@etl.go.jp>
1862 * xfns.c (x_encode_text): Allocate coding.destination here, and
1863 call encode_coding_object with dst_object Qnil.
1865 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
1866 multibyte form correctly.
1868 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
1869 against Vfont_encoding_alist.
1871 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
1872 handling of charset list.
1873 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
1874 (decode_coding_object): Move point to coding->dst_pos before
1875 calling post-read-conversion function.
1876 (encode_coding_object): Give correct arguments to
1877 pre-write-conversion. Ignore the return value of
1878 pre-write-conversion function. Pay attention to the case that
1879 pre-write-conversion changes the current buffer. If dst_object is
1880 Qt, even if coding->src_bytes is zero, allocate at least one byte
1881 to coding->destination.
1883 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
1885 * charset.c (Fmake_char): Make it more backward compatible.
1886 (Fmap_charset_chars): Fix docstring.
1888 2002-05-13 Dave Love <fx@gnu.org>
1890 * coding.c: Doc fixes.
1891 (Fdefine_coding_system_alias): Use names, not symbols, in
1892 coding-system-alist.
1894 2002-05-13 Kenichi Handa <handa@etl.go.jp>
1896 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
1897 of calling free_realized_face.
1899 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
1901 * charset.c (load_charset_map): Fix previous change.
1902 (read_hex): Don't treat SPC as a comment starter.
1903 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
1905 (Fdecode_char): Fix typo.
1907 2002-05-10 Kenichi Handa <handa@etl.go.jp>
1909 * charset.h (struct charset): New member `code_space_mask'.
1911 * coding.c (coding_set_source): Delete the local variable
1913 (encode_coding_charset): Delete the local variable charset.
1914 (Fdefine_coding_system_internal): Likewise.
1915 (Fdefine_coding_system_internal): Setup
1916 attrs[coding_attr_charset_valids] correctly.
1918 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
1919 member to check if CODE is valid or not.
1920 (Fdefine_charset_internal): Initialize `code_space_mask' member.
1921 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
1922 is within the range of charset->min_code and carset->max_code.
1924 2002-05-09 Dave Love <fx@gnu.org>
1926 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
1928 * dispextern.h (generate_ascii_font): Fix return type.
1930 * xfaces.c (generate_ascii_font): Fix arg declaration.
1932 * coding.c (coding_inherit_eol_type)
1933 (Fset_terminal_coding_system_internal)
1934 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
1936 2002-05-08 Kenichi Handa <handa@etl.go.jp>
1938 * coding.c (decode_coding_charset, encode_coding_charset): Handle
1939 multiple charsets correctly.
1941 2002-05-07 Kenichi Handa <handa@etl.go.jp>
1943 * search.c (boyer_moore): Fix handling of mulitbyte character
1946 * xdisp.c (display_mode_element): When the variable `elt' is
1947 changed, update `this' and `lisp_string'.
1949 2002-05-07 Kenichi Handa <handa@etl.go.jp>
1951 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
1953 * callproc.c (Fcall_process): Be sure to give the current buffer
1954 to decode_coding_c_string. Update PT and PT_BYTE after the
1957 * charset.c (struct charset_map_entries): New struct.
1958 (load_charset_map): Renamed from parse_charset_map. New args
1959 entries and n_entries. Caller changed.
1960 (load_charset_map_from_file): Renamed from load_charset_map.
1961 Caller changed. New arg control_flag. Call load_charset_map at
1963 (load_charset_map_from_vector): New function.
1964 (Fdefine_charset_internal): Setup charset.compact_codes_p.
1965 (encode_char): If the charset is compact, change a character index
1968 * coding.c (coding_alloc_by_making_gap): Check the case that the
1969 source and destination are the same correctly.
1970 (decode_coding_raw_text): Set coding->consumed_char and
1971 coding->consumed to 0.
1972 (produce_chars): If coding->chars_at_source is nonzero, update
1973 coding->consumed_char and coding->consumed before calling
1975 (Fdefine_coding_system_alias): Register ALIAS in
1976 Vcoding_system_alist.
1977 (syms_of_coding): Define `no-convesion' coding system at the tail.
1979 * fileio.c (Finsert_file_contents): Set coding_system instead of
1980 val. If the current buffer is multibyte, always call
1983 * xfaces.c (try_font_list): Give higher priority to fontset's
1984 family than face's family.
1986 2002-04-18 Kenichi Handa <handa@etl.go.jp>
1988 * callproc.c (Fcall_process): Be sure to give the current buffer
1989 to decode_coding_c_string.
1991 * xfaces.c (try_font_list): Give a family specified in a fontset
1992 higher priority than a family specified in a face.
1994 2002-04-09 Kenichi Handa <handa@etl.go.jp>
1996 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
1997 Fix arguments to insert_from_buffer.
1999 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
2001 2002-03-11 Kenichi Handa <handa@etl.go.jp>
2003 * coding.c (produce_chars): Set the variable `multibytep' correctly.
2004 (decode_coding_gap): Set coding->dst_multibyte correctly.
2006 2002-03-07 Kenichi Handa <handa@etl.go.jp>
2008 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
2009 (decode_coding_utf_16): Fix converting high and low bytes to
2011 (encode_coding_utf_16): Substitute coding->default_char for
2012 non-Unicode characters.
2013 (decode_coding): Don't call record_insert here.
2014 (setup_coding_system): Initialize `surrogate' of
2015 coding->spec.utf_16 to 0.
2016 (EMIT_ONE_BYTE): Fix for multibyte case.
2018 * insdel.c (insert_from_gap): Call record_insert.
2020 2002-03-04 Kenichi Handa <handa@etl.go.jp>
2022 * casefiddle.c (casify_region): Fix multibyte case.
2024 * character.c (c_string_width): Add return type `int'.
2025 (char_string_with_unification): Arg ADVANCED deleted.
2027 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
2028 (CHAR_STRING): Adjusted for the change of
2029 char_string_with_unification.
2030 (CHAR_STRING_ADVANCE): Make it do-while statement.
2032 * chartab.c (sub_char_table_set_range): Optimized for the case
2033 DEPTH == 3. Add workaround code for a GCC optimization bug.
2035 * charset.c (parse_charset_map): Remove an unused variable.
2037 * coding.c: Delete unused variables.
2039 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
2040 earlier. If inserted is zero and the coding system doesn't
2041 require flushing, don't call decode_coding_gap.
2043 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
2045 2002-03-01 Kenichi Handa <handa@etl.go.jp>
2047 The following changes are for using Unicode as an internal
2048 character model, and use UTF-8 format for buffer/string
2051 * .gdbinit (xchartable): Adjusted for the change of char table
2053 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
2055 * Makefile.in (obj): Add character.o and chartab.o.
2056 (lisp, shortlisp): Remove utf-8.elc:
2057 (*.o): For many files, change dependency on charset.h to
2058 character.h, and add dependency on character.h.
2059 (character.o, chartab.o): New targets.
2061 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
2062 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
2063 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
2066 * dired.c, filelock.c: Include "character.h".
2068 * alloc.c: Include "character.h" instead of "charset.h".
2069 (Fmake_char_table): Moved to chartab.c.
2070 (make_sub_char_table): Likewise.
2071 (syms_of_alloc): Remove defsubr for Smake_char_table.
2073 * buffer.c: Include "character.h" instead of "charset.h", don't
2075 (Fset_buffer_multibyte): Adjuted for UTF-8.
2077 * buffer.h: EXFUN Fbuffer_live_p.
2079 * callproc.c: Include "character.h" instead of "charset.h".
2080 (Fcall_process): Big change for the new code-conversion APIs.
2082 * casetab.c: Include "character.h" instead of "charset.h".
2083 (set_canon, set_identity, shuffle): Adjusted for the new
2084 map_char_table spec.
2085 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
2086 accessing the char table structure.
2088 * chartab.c: New file that implements char table.
2090 * category.c: Include "character.h".
2091 (copy_category_entry): New function.
2092 (copy_category_table): Call map_char_table and copy_category_entry.
2093 (Fmake_category_table): Initialize all top-vel slots.
2094 (char_category_set): New function.
2095 (modify_lower_category_set): Deleted.
2096 (Fmodify_category_entry): Call char_table_ref_and_range.
2098 * category.h (CATEGORY_SET): Just call char_category_set.
2100 * ccl.c: Include "character.h".
2101 (Qccl, Qcclp): New variables.
2102 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
2104 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
2105 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
2107 (ccl_driver): Types of arguments changed. Code adjusted for that.
2108 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
2110 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
2112 * ccl.h (struct ccl_program): Members eol_type and multibyte
2113 deleted. New members src_multibyte, dst_multibyte, consumed, and
2115 (struct ccl_spec): Members decoder and encoder deleted. New
2117 (CODING_SPEC_CCL_PROGRAM): New macro.
2118 (ccl_driver): Prototype updated.
2119 (Qccl, Qcclp, Fccl_program_p): Extern them.
2120 (CHECK_CCL_PROGRAM): New macro.
2122 * character.c, character.h, chartab.c: New files.
2124 * charset.c: Mostly re-written. Character and multibyte sequence
2125 handling codes are moved to character.c.
2127 * charset.h: Mostly re-written. Character and multibyte sequence
2128 handling codes are moved to character.h.
2130 * coding.c, coding.h: Mostly re-written.
2132 * composite.c: Include "character.h" instead of "charset.h".
2133 (CHAR_WIDTH): Moved to character.h.
2134 (HASH_KEY, HASH_VALUE): Deleted.
2136 * composite.h (enum composition_method): Order of enumeration
2139 * data.c: Include "character.h" instead of "charset.h".
2140 (Faref): Call CHAR_TABLE_REF for a char table.
2141 (Faset): Call CHAR_TABLE_SET for a char table.
2143 * dispextern.h (free_realized_face, check_face_attribytes,
2144 generate_ascii_font): Extern them.
2145 (free_realized_multibyte_face): Extern deleted.
2147 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
2150 * editfns.c: Include "character.h" instead of "charset.h".
2151 (Fchar_to_string): Always call CHAR_STRING.
2153 * emacs.c (main): Call init_charset_once, init_charset,
2154 syms_of_chartab, and syms_of_character.
2156 * fileio.c: Include "character.h" instead of "charset.h".
2157 (Finsert_file_contents): Big change for the new code-conversion
2159 (choose_write_coding_system): Likewise.
2160 (Fwrite_region): Likewise.
2161 (build_annotations_2): Deleted.
2162 (e_write): Big change for the new code-conversion API.
2164 * fns.c: Include "character.h" instead of "charset.h".
2165 (copy_sub_char_table): Moved to chartab.c.
2166 (Fcopy_sequence): Call copy_char_table for a char table.
2167 (concat): Delete codes calling count_multibyte.
2168 (string_char_to_byte): Adjusted for the new multibyte form.
2169 (string_byte_to_char): Likewise.
2170 (internal_equal): Adjusted for the change of char table structure.
2171 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
2172 Fchar_table_extra_slot, Fset_char_table_extra_slot,
2173 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
2174 char_table_translate, optimize_sub_char_table,
2175 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
2177 (char_table_ref_and_index): Deleted.
2178 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
2179 (Fmd5): Call preferred_coding_system instead of accessing
2180 Vcoding_category_list. Adjusted for the new code-conversion API.
2181 (syms_of_fns): Defsubr for char table related functions moved to
2184 * fontset.c: Mostly re-written.
2186 * fontset.h (struct font_info): Type of the member encoding_type
2188 (enum FONT_SPEC_INDEX): New enum.
2189 (fontset_font_pattern, fs_load_font): Prototype updated.
2190 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
2192 * indent.c: Include "character.h" instead of "charset.h".
2193 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
2196 * insdel.c: Include "character.h" instead of "charset.h".
2197 (copy_text): Don't refer to Vnonascii_translation_table.
2198 (insert_from_gap): New function.
2200 * keyboard.c: Include "character.h" instead of "charset.h".
2201 (command_loop_1): Never call direct_output_forward_char before
2202 a non-ASCII character.
2203 (read_char): If Vkeyboard_translate_table is a char table, always
2204 translated a character.
2206 * keymap.c: Include "character.h".
2207 (store_in_keymap): Handle the case that IDX is a cons.
2208 (Fdefine_key): Handle the case that KEY is a cons and the car part
2209 is also a cons (range).
2210 (push_key_description): Adjusted for the new character code.
2211 (describe_vector): Call describe_char_table for a char table.
2212 (describe_char_table): New function.
2214 * keymap.h (describe_char_table): Extern it.
2216 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
2217 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
2218 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
2219 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
2221 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
2223 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
2224 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
2225 CHARTAB_SIZE_BITS_3): New macros.
2226 (chartab_size): Extern it.
2227 (struct Lisp_Char_Table): Re-designed.
2228 (struct Lisp_Sub_Char_Table): New structure.
2229 (HASH_KEY, HASH_VALUE): Moved from fns.c.
2230 (CHARACTERBITS): Defined as 22.
2231 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
2232 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
2233 (GC_SUB_CHAR_TABLE_P): New macro.
2234 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
2235 (code_convert_string_norecord): Extern deleted.
2236 (init_character_once, syms_of_character, init_charset,
2237 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
2239 * lread.c: Include "character.h".
2240 (read_multibyte): New arg NBYTES.
2241 (read_escape): The meaning of returned *BYTEREP changed.
2242 (to_multibyte): Deleted.
2243 (read1): Adjuted the handling of char table and string.
2245 * print.c: Include "character.h" instead of "charset.h".
2246 (print_string): Convert 8-bit raw bytes to octal form by
2247 string_escape_byte8.
2248 (print_object): Adjusted for the new multibyte form. Print 8-bit
2249 raw bytes always in octal form. Handle sub char table correctly.
2251 * process.c: Include "character.h" instead of "charset.h".
2252 (read_process_output): Adjusted for the new code-conversion API.
2253 (send_process): Likewise.
2255 * puresize.h (BASE_PURESIZE): Increased.
2257 * regex.c: Include "character.h" instead of "charset.h".
2258 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
2259 (regex_compile): Accept a range whose starting and ending
2260 character have different leading bytes.
2261 (analyse_first): Adjusted for the above change.
2263 * search.c: Include "character.h" instead of "charset.h".
2264 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
2265 (Freplace_match): Adjusted for the change of
2266 multibyte_char_to_unibyte.
2268 * syntax.c: Include "character.h" instead of "charset.h".
2269 (syntax_parent_lookup): Deleted.
2270 (Fmodify_syntax_entry): Accept a cons as CHAR.
2271 (skip_chars): Adjusted for the new multibyte form.
2272 (init_syntax_once): Call char_table_set_range instead of directly
2273 accessing the structure of a char table.
2275 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
2276 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
2277 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
2278 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
2280 * term.c: Include "buffer.h" and "character.h".
2281 (encode_terminal_code): Adjusted for the new code-conversion API.
2282 (write_glyphs): Likewise.
2283 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
2285 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
2287 * xdisp.c: Include "character.h".
2288 (get_next_display_element): Adjusted for the new multibyte form.
2289 (disp_char_vector): Adjusted for the new char table structure.
2290 (decode_mode_spec_coding): Adjusted for the new structure of
2292 (decode_mode_spec): Adjusted for the new code-conversion API.
2294 * xfaces.c: Include "character.h" instead of "charset.h".
2295 (load_face_font): Adjusted for the change of choose_face_font and
2297 (generate_ascii_font): New function.
2298 (set_lface_from_font_name): Adjusted for the change of
2300 (set_font_frame_param): Adjusted for the change of
2302 (free_realized_face): Make it public.
2303 (free_realized_faces_for_fontset): Renamed from
2304 free_realized_multibyte_face. Free also faces realized for ASCII.
2305 (choose_face_font): Argments changed. Adjusted for the change of
2306 fontset_font_pattern and FS_LOAD_FONT.
2308 * xfns.c: Include "character.h".
2309 (x_encode_text): Adjusted for the new code-conversion API.
2311 * xselect.c: Don't include "charset.h".
2312 (selection_data_to_lisp_data): Adjusted for the new code
2315 * xterm.c: Include "character.h".
2316 (x_encode_char): New argument CHARSET. Caller changed.
2317 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
2319 (x_get_glyph_face_and_encoding): Likewise.
2320 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
2321 CHAR_WIDTH instead of CHARSET_WIDTH.
2322 (XTread_socket): Adjusted for the new code-conversion API.
2323 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
2324 (x_load_font): Adjusted for the change of struct font.
2327 ;; coding: iso-2022-7bit
2330 Copyright (C) 2002 Free Software Foundation, Inc.
2331 Copying and distribution of this file, with or without modification,
2332 are permitted provided the copyright notice and this notice are preserved.