1 2006-06-06 Kenichi Handa <handa@m17n.org>
3 These changes are for the new font handling codes.
5 * Makefile.in (ALL_CFLAGS): Add @FREETYPE_CFLAGS@,
6 @FONTCONFIG_CFLAGS@, and @LIBOTF_CFLAGS@.
7 (LIB_X11_LIB): If HAVE_XFT is defined, set to @XFT_LIBS@.
8 (FONTSRC, FONTOBJ): New variables.
10 (SOME_MACHINE_OBJECTS): Lib_X11_Lib.
11 (LIBES): Add @FREETYPE_LIBS@, @FONTCONFIG_LIBS@, and
13 (font.o, ftfont.o, xfont.o, xftfont.o, ftxfont.o): New targets.
14 (fontset.o, xdisp.o, xfaces.o, xfns.o, xterm.o): Depends on
17 * font.h, font.c, xfont.c, ftfont.c, xftfont.c, ftxfont.c: New
20 * character.h (Vscript_representative_chars): Extern it.
22 * character.c (Vscript_representative_chars): New variable.
23 (syms_of_character): Declare it as a Lisp variable.
25 * composite.c (get_composition_id) [USE_FONT_BACKEND]: If
26 enable_font_backend is nonzero, accept the composition method
27 COMPOSITION_WITH_GLYPH_STRING.
29 * composite.h (enum composition_method) [USE_FONT_BACKEND]: New
30 enumeration COMPOSITION_WITH_GLYPH_STRING.
32 * config.in: Re-generated.
34 * dispextern.h (struct glyph_string) [USE_FONT_BACKEND]: New
35 members clip_x, clip_y, clip_width, and clip_height.
36 (struct face) [USE_FONT_BACKEND]: New members font_info and extra.
38 * emacs.c (main) [USE_FONT_BACKEND]: Handle arg
39 --enable-font-backend. Call syms_of_font.
41 * fns.c (assoc_no_quit): New function.
43 * fontset.h (FONT_INFO_FROM_FACE): New macro.
44 (face_for_font, new_fontset_from_font)
45 (fontset_ascii_font) [USE_FONT_BACKEND]: Extern them.
47 * fontset.c [USE_FONT_BACKEND]: Include "font.h".
48 (fontset_font, fontset_ascii, face_for_char)
49 (make_fontset_for_ascii_face, Ffont_info)
50 (Finternal_char_font) [USE_FONT_BACKEND]: If enable_font_backend
51 is nonzero, use font-backend mechanism.
52 (find_font_encoding): Make it non-static.
53 (new_fontset_from_font, fontset_ascii_font) [USE_FONT_BACKEND]:
56 * frame.h (struct frame): New members resx and resy.
57 (struct frame) [USE_FONT_BACKEND]: New member font_driver_list.
58 (x_new_fontset2) [USE_FONT_BACKEND]: Extern it.
60 * frame.c [USE_FONT_BACKEND]: Include "font.h".
61 (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend
64 * lisp.h (assoc_no_quit): Extern it.
66 * xdisp.c: If USE_FONT_BACKEND is defined, include "font.h".
67 Through out the file, use FONT_INFO_FROM_FACE instead of
68 FONT_INFO_FROM_ID, use get_per_char_metric instead of
70 (handle_composition_prop) [USE_FONT_BACKEND]: If the composition
71 method is COMPOSITION_WITH_GLYPH_STRING, just set it->c to ' '.
72 (get_glyph_face_and_encoding, fill_composite_glyph_string)
73 (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
74 (x_produce_glyphs) [USE_FONT_BACKEND]: If enable_font_backend is
75 nonzero, use font-backend mechanism.
76 (get_per_char_metric): New function.
78 * xfaces.c [USE_FONT_BACKEND]: Include "font.h".
79 (set_lface_from_font_name)
80 (set_font_frame_param, free_realized_face)
81 (prepare_face_for_display, clear_face_gcs)
82 (Finternal_set_font_selection_order, realize_x_face)
83 [USE_FONT_BACKEND]: If enable_font_backend is nonzero, use
84 font-backend mechanism.
85 (clear_face_cache) [USE_FONT_BACKEND]: Don't call
87 (load_face_font) [USE_FONT_BACKEND]: Abort.
88 (face_symbolic_value, face_symbolic_weight, face_symbolic_slant)
89 (face_symbolic_swidth, face_for_font) [USE_FONT_BACKEND]: New
92 * xfns.c [USE_FONT_BACKEND]: Include "font.h".
93 (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
94 (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
95 nonzero, register all available font drivers. Call
96 x_default_font_parameter for deciding a font.
97 (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
99 * xterm.c [USE_FONT_BACKEND]: Include "font.h".
100 (x_set_mouse_face_gc, x_set_glyph_string_clipping)
101 (x_set_glyph_string_clipping_exactly)
102 (x_compute_glyph_string_overhangs)
103 (x_draw_glyph_string_foreground)
104 (x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
105 (x_free_frame_resources) [USE_FONT_BACKEND]: If
106 enable_font_backend is nonzero, use font-backend mechanism.
107 (x_new_fontset2) [USE_FONT_BACKEND]: New function.
109 2006-05-15 Kenichi Handa <handa@m17n.org>
111 * coding.h (system_eol_type): Fix synching with HEAD.
113 * coding.c (system_eol_type): Sync with HEAD.
114 (coding_inherit_eol_type): If PARENT is nil, inherit from
116 (syms_of_coding): Initialize system_eol_type.
118 * callproc.c (Fcall_process): Sync with HEAD.
120 * process.c (setup_process_coding_systems): Fix synching with
122 (read_process_output): Likewise.
123 (Fset_process_coding_system): Inherit system's eol format if
126 * fileio.c (choose_write_coding_system): Fix synching with HEAD.
128 * keymap.c (push_key_description): Fix synching with HEAD.
130 2006-05-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
132 * macgui.h (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
134 2006-04-07 Kenichi Handa <handa@m17n.org>
136 * coding.c (decode_eol): Pay attention to buffer relocation in
138 (decode_coding): Call decode_eol before restoring undo_list.
140 2006-03-20 Kenichi Handa <handa@m17n.org>
142 * charset.c (Fdefine_charset_internal): Fix setting of
145 2006-03-14 Kenichi Handa <handa@m17n.org>
147 * keyboard.c (read_char): Check if C is a character or not before
148 looking up Vkeyboard_translate_table.
150 2006-03-10 Kenichi Handa <handa@m17n.org>
152 * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
153 condition to terminate the loop.
155 2006-03-09 Kenichi Handa <handa@m17n.org>
157 * coding.c (produce_composition): Compare charbuf[i] instead of
159 (Fterminal_coding_system): Use EQ to compare Lisp objects.
161 2006-03-07 Kenichi Handa <handa@m17n.org>
163 * coding.c (DECODE_COMPOSITION_START): If the source is short, set
164 coding->result to CODING_RESULT_INSUFFICIENT_SRC.
165 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
167 (emacs_mule_char): Handle old style (Emacs 20) component character
169 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Fix parsing a composition
171 (DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
172 (decode_coding_emacs_mule): Handle invalid bytes correctly.
174 2006-03-04 Kenichi Handa <handa@m17n.org>
176 * coding.c (encode_coding_ccl): Allocate destination dynamically
179 2006-03-03 Kenichi Handa <handa@m17n.org>
181 * ccl.c (Fccl_execute_on_string): Fix the condition of terminating
182 the loop. When quitted, show a proper error message.
184 2006-03-02 Kenichi Handa <handa@m17n.org>
186 * coding.c (decode_coding): Fix previous change.
188 * xterm.c (x_set_glyph_string_clipping_exactly): Set
189 src->clip_head and src->clip_tail temporarily instead of src->hl.
191 * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
193 (Fccl_execute_on_string): Use ASET, not XSET.
195 2006-03-01 Kenichi Handa <handa@m17n.org>
197 * search.c (search_buffer): Fix handling of "\\" in a trivial
200 2006-02-28 Kenichi Handa <handa@m17n.org>
202 * coding.c (decode_coding): Fix the condition of terminating the
205 2006-02-27 Kenichi Handa <handa@m17n.org>
207 * data.c (Faset): On setting a character bigger than 255 in a
208 unibyte string, signal an error instead of make the string
211 2006-02-22 Kenichi Handa <handa@m17n.org>
213 * charset.c (map_charset_chars): Fix for ascii-compatible charset
214 made by a mapping table.
216 2006-02-21 Kenichi Handa <handa@m17n.org>
218 * xdisp.c (fill_composite_glyph_string): Check s->face is NULL or
220 (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
221 (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
223 * xterm.c (x_draw_composite_glyph_string_foreground): Check
224 s->face is NULL or not.
226 2006-02-20 Kenichi Handa <handa@m17n.org>
228 * xterm.c (x_set_glyph_string_clipping_exactly): New function.
229 (x_draw_glyph_string): Fix drawing of right_overhang and
230 left_overhang around/on cursor.
232 * xdisp.c (draw_glyphs): Fix inclusion of right_overwriting
235 * term.c (produce_glyphs): Sync to HEAD.
237 2006-02-15 Kenichi Handa <handa@m17n.org>
239 * xdisp.c (x_produce_glyphs): Handle composition with TAB.
241 2006-02-05 Kenichi Handa <handa@m17n.org>
243 * coding.c: Cancel incorrect synching with HEAD.
245 2006-02-03 Kenichi Handa <handa@m17n.org>
247 * coding.c (Fdefine_coding_system_internal): Avoid a duplicated
248 element in Vcoding_system_alist.
249 (Fdefine_coding_system_alias): Likewise.
251 2006-01-19 Kenichi Handa <handa@m17n.org>
253 * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
255 * coding.c: Sync to HEAD for handling autoload-coding-system.
256 (Qcoding_system_define_form): New variable.
257 (syms_of_coding): Intern and staticpro it.
258 (Fcoding_system_p): Check Qcoding_system_define_form.
259 (Fcheck_coding_system): Try to autoload the definition of
262 * coding.h (CODING_SYSTEM_P): If ID is not available, call
264 (CHECK_CODING_SYSTEM): If ID is not available, call
265 Fcheck_coding_system.
266 (CHECK_CODING_SYSTEM_GET_SPEC): Try also Fcheck_coding_system.
267 (CHECK_CODING_SYSTEM_GET_ID): Likewise.
269 2006-01-17 Kenichi Handa <handa@m17n.org>
271 * xterm.c (handle_one_xevent): Delete unnecessary code inserted by
274 * coding.c (code_conversion_restore): GCPRO arg.
276 2005-12-28 Kenichi Handa <handa@m17n.org>
278 * character.c (lisp_string_width): Check multibyteness of STRING.
280 2005-10-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
282 * macterm.c (mac_encode_char): Call ccl_driver with the last arg
283 Qnil. Use JIS_TO_SJIS instead of ENCODE_SJIS.
284 (decode_mac_font_name): Use decode_coding_c_string instead of
286 (x_load_font): Initialize fontp->fontset to -1. Set
287 fontp->encoding_type.
289 2005-10-17 Kenichi Handa <handa@m17n.org>
291 * search.c (search_buffer): Give up BM search on case-fold-search
292 if one of a target character has a case-equivalence of different
293 byte length even if that target charcter is an ASCII.
294 (simple_search): Fix culculation of byte length of matched text.
295 (boyer_moore): Fix handling of case-equivalent multibyte
298 2005-10-15 Kenichi Handa <handa@m17n.org>
300 * coding.c (decode_coding): Fix handling of invalid bytes.
302 2005-10-06 Kenichi Handa <handa@m17n.org>
304 * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
307 2005-09-23 Kenichi Handa <handa@m17n.org>
309 * coding.c (encode_coding_object): If a pre-write-conversion
310 function makes a new buffer, kill it.
312 2005-07-29 Kenichi Handa <handa@m17n.org>
314 * coding.c (QCascii_compatible_p): New variable.
315 (syms_of_coding): Initialize it.
316 (ONE_MORE_BYTE): Decrement `src' before calling string_char.
317 (ONE_MORE_BYTE_NO_CHECK): Likewise.
318 (record_conversion_result): Add `default:' case.
319 (coding_charset_list): Delete unused variable `coding_type'.
320 (Fdefine_coding_system_internal): Add `ascii-compatible-p'
321 property in the plist of the coding system.
322 (Fcoding_system_put): Check QCascii_compatible_p.
324 2005-06-09 Kenichi Handa <handa@m17n.org>
326 * xdisp.c (get_next_display_element): Sync with the change in
329 2005-06-06 Kenichi Handa <handa@m17n.org>
331 * callproc.c (Fcall_process): Sync with the change in
334 2005-06-05 Miles Bader <miles@gnu.org>
336 * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
337 removed calculation of frame `f', as it's now used.
339 2005-05-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
341 * macterm.c (x_font_name_to_mac_font_name): Sync with trunk
342 for the case that does not require code conversion.
344 2005-05-11 Kenichi Handa <handa@m17n.org>
346 * Makefile.in (shortlisp): Cancel previous change.
347 (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
348 (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
349 (UNIDATA): New variable.
350 (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
351 (bootstrap-emacs${EXEEXT}): Depends on charprop.el. Run
352 $(RUN_TEMACS) unconditionally.
354 2005-05-10 Kenichi Handa <handa@m17n.org>
356 * Makefile.in (shortlisp): Add ../lisp/international/charprop.el.
357 (temacs${EXEEXT}): Build charprop.el if necessary.
358 (admindir): New variable.
359 ($(lispsource)international/charprop.el): New target.
361 2005-05-04 Miles Bader <miles@gnu.org>
363 * character.c (chars-in-region): Obsolete function removed.
364 (syms_of_character): Remove its initialization.
366 2005-04-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
368 * w32select.c (validate_coding_system)
369 (setup_windows_coding_system): New functions.
370 (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
371 setup_windows_coding_system.
372 (setup_config, Fw32_get_clipboard_data): Use
373 validate_coding_system.
374 (Fx_selection_exists): Move call to setup_config to a place
375 were signals are allowed.
377 * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
378 (Fcheck_coding_system): Add declarations.
380 2005-04-28 Kenichi Handa <handa@m17n.org>
382 * s/ms-w32.h (STDC_HEADERS): Sync with the change in
385 2005-04-25 Kenichi Handa <handa@m17n.org>
387 * charset.c (load_charset_map_from_vector): Fix for the first
390 2005-04-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
392 * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
393 string as the second argument for x_new_fontset.
395 2005-04-18 Kenichi Handa <handa@m17n.org>
397 * fns.c (Fstring_as_multibyte): Fix the change for syncing with
400 2005-04-09 Kenichi Handa <handa@m17n.org>
402 * search.c (search_buffer): Fix the change for syncing with CVS
404 (search_buffer): Likewise.
406 2005-03-31 Kenichi Handa <handa@m17n.org>
408 * xdisp.c (get_next_display_element): Sync with CVS head.
410 2005-03-29 Kenichi Handa <handa@m17n.org>
412 * coding.c (decode_coding_object): Use safe_call1 instead of call1.
413 (encode_coding_object): Use safe_call instead of call2.
415 2005-03-14 Kenichi Handa <handa@m17n.org>
417 * fontset.c (set_default_ascii_font): Fix the change for
418 syncing with CVS head.
420 2005-01-30 Kenichi Handa <handa@m17n.org>
422 * fontset.c (Fset_fontset_font): Check family element of a given
425 * Makefile.in (lisp): Include charprop.el.
427 2005-01-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
429 * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
430 Not sure if it's unnecessary.
432 2005-01-16 Steven Tamm <steventamm@mac.com>
434 * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
435 some possibly unnecessary fontset checking code that crashed
436 when creating a new frame
438 2005-01-17 Kenichi Handa <handa@m17n.org>
440 * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
443 * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
445 * fringe.c (draw_fringe_bitmap_1): Fix argument to
448 2004-12-25 Kenichi Handa <handa@m17n.org>
450 * xdisp.c (get_next_display_element): Sync to the change in HEAD
453 2004-12-11 Kenichi Handa <handa@m17n.org>
455 * search.c: Sync to the change in HEAD on 2004-11-19, 20.
457 * w32console.c: Sync to the change in HEAD on 2004-12-01.
459 * coding.c: Cancel the change done in HEAD on 2004-11-30.
460 (coding_charset_list): New function.
462 * coding.h (coding_charset_list): Extern it.
464 * term.c: Sync to the change in HEAD on 2004-11-30.
466 2004-12-09 Kenichi Handa <handa@m17n.org>
468 * fontset.c (Fset_fontset_font): Call find_font_encoding with
469 concatenation of family and registry.
471 2004-12-06 Kenichi Handa <handa@m17n.org>
473 * character.h (BYTE8_STRING): Fix typo.
475 * editfns.c (Ftranslate_region_internal): Don't convert unibyte
476 string to multibyte (sync to HEAD).
478 * casefiddle.c (casify_region): Handle changes in byte-length
479 using replace_range_2 (sync to HEAD).
481 2004-11-24 Andreas Schwab <schwab@suse.de>
483 * chartab.c (map_char_table): GCPRO table and arg.
485 2004-10-29 Kenichi Handa <handa@m17n.org>
487 * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
490 2004-10-23 Kenichi Handa <handa@m17n.org>
492 * fontset.c (fs_load_font): Use fast_string_match_ignore_case
493 instead of fast_c_string_match_ignore_case.
494 (find_font_encoding): Argument changed to Lisp_Object. Use
495 fast_string_match_ignore_case instead of
496 fast_c_string_match_ignore_case. Caller changed.
498 2004-10-15 Kenichi Handa <handa@m17n.org>
500 * xdisp.c (get_next_display_element): In unibyte case, decide to
501 display in octal form by checking a chacter by
502 UNIBYTE_CHAR_HAS_MULTIBYTE_P.
504 * charset.c (Fset_unibyte_charset): Setup
505 unibyte_has_multibyte_table.
507 * character.c (unibyte_has_multibyte_table): New variable.
509 * character.h (unibyte_has_multibyte_table): Extern it.
510 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
512 2004-10-14 Kenichi Handa <handa@m17n.org>
514 * callproc.c (Fcall_process): Fix merging of 2004-10-13 change.
516 2004-10-13 Kenichi Handa <handa@m17n.org>
518 * coding.c (encode_coding_iso_2022): Fix handling of charset
521 2004-10-12 Kenichi Handa <handa@m17n.org>
523 * coding.c (setup_coding_system): If coding_system is nil, use
525 (Fterminal_coding_system): Return nil if terminal coding system is
527 (syms_of_coding): Define coding-system `undecided' here. Setup
528 terminal_coding as `undecided'.
530 2004-10-04 Kenichi Handa <handa@m17n.org>
532 * xdisp.c (message_dolog, set_message_1): Call
533 unibyte_char_to_multibyte with arg type int.
535 * fileio.c (Fsubstitute_in_file_name): Fix previous change.
537 * lread.c (read1): Fix reading of a char-table.
539 * print.c (print_object): Include sub char-table in cicularities
542 2004-10-01 Kenichi Handa <handa@m17n.org>
544 * keymap.c (where_is_internal_2): Fix for the case that KEY is a
545 cons. Append the found sequences in car of ARGS instead of
548 2004-09-28 Kenichi Handa <handa@m17n.org>
550 * fileio.c (report_file_error): Make a unibyte string from
552 (Fsubstitute_in_file_name): Fix the arg to
553 unibyte_char_to_multibyte. It is evaluated twice.
555 2004-09-19 Kenichi Handa <handa@m17n.org>
557 * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
559 2004-09-14 Kenichi Handa <handa@m17n.org>
561 * coding.c (detect_coding): Fix previous change.
563 2004-09-13 Kenichi Handa <handa@m17n.org>
565 * coding.c (detect_coding_utf_16): Don't set detect_info->found if
567 (detect_coding): Optimization for ISO-2022 when no 8-bit data is
569 (detect_coding_system): Likewise.
571 2004-09-01 Jason Rumney <jasonr@gnu.org>
573 * w32fns.c (x_to_w32_font): Update to use new coding struct.
575 2004-08-17 Kenichi Handa <handa@m17n.org>
577 * charset.c (Fdeclare_equiv_charset): Fix handing of CHARS.
578 (Fiso_charset): Likewise.
580 2004-08-03 Steven Tamm <steventamm@mac.com>
582 * macterm.c (mac_encode_char): Add charset argument and update
584 (x_new_font,x_new_fontset): Merge in changes from xterm.c;
585 switch to pure fontset
586 (decode_mac_font_name): Temporarily remove decoding
587 (x_font_name_to_mac_font_name): Temporarily remove encoding
588 (x_load_font): Temporarily remove encoding
590 2004-06-30 Kenichi Handa <handa@m17n.org>
592 * xfaces.c (Fface_font): If frame is not on a window system,
593 ignore CHARACTER arg. If HAVE_WINDOW_SYSTEM is not defined, don't
595 (split_font_name_into_vector, build_font_name_from_vector)
596 (lookup_non_ascii_face, realize_non_ascii_face): Define them only
597 whne HAVE_WINDOW_SYSTEM is defined.
599 2004-05-29 Kenichi Handa <handa@m17n.org>
601 * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
602 (x_produce_glyphs): Fix setting of members of cmp in case
603 cmp->glyph_len is zero,
605 * fontset.c (Fset_fontset_font): Docstring fixed.
606 (Ffontset_info): Make it backward compatible. New arg ALL.
608 2004-05-11 Kim F. Storm <storm@cua.dk>
610 * process.c (read_process_output): Grow decoding_buf when needed;
611 this could cause a crash in allocate_string and compact_small_strings.
613 2004-04-29 Kenichi Handa <handa@m17n.org>
615 * fileio.c (WRITE_BUF_SIZE): This macro deleted.
616 (e_write): Fix previous change.
618 2004-04-28 Kenichi Handa <handa@m17n.org>
620 * coding.c (setup_coding_system): Set coding->common_flags
621 correctly for raw-text.
622 (consume_chars): On encoding unibyte text by raw-text, don't check
624 (encode_coding): On encoding by raw-text, never use translation
627 * fileio.c (e_write): Short cut for the case of no encoding.
629 2004-04-20 Kenichi Handa <handa@m17n.org>
631 * coding.c (detect_coding): Delete unused variables.
632 (detect_coding_system): Likewise.
634 2004-04-18 Kenichi Handa <handa@m17n.org>
636 * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
637 (consume_chars): Fix handling of 8-bit bytes in unibyte source.
639 2004-04-14 Kenichi Handa <handa@m17n.org>
641 Sync all files to HEAD.
643 2004-04-14 Kenichi Handa <handa@m17n.org>
645 * coding.c (Ffind_coding_systems_region_internal): Include
646 raw-text and no-conversion in the result.
648 * fontset.h: Sync to HEAD.
650 * fontset.c: Sync to HEAD.
652 2004-04-14 Kenichi Handa <handa@m17n.org>
654 * fontset.c (find_font_encoding): Return `ascii' for unknown
656 (load_font_get_repertory): Delete unnecessary check of ENCODING of
658 (font_def_arg, add_arg, from_arg, to_arg): New args.
659 (set_fontset_font): Argument changed.
660 (Fset_fontset_font): Fix for the case that TARGET is a script
661 name and charset name.
662 (new_fontset_from_font_name): Fix argument to Fnew_fontset.
664 2004-04-13 Kenichi Handa <handa@m17n.org>
666 * fontset.c (fontset_font): Renamed from fontset_face. Return
668 (face_suitable_for_char_p): Adjusted for the change of
670 (face_for_char): Likewise.
671 (make_fontset_for_ascii_face): Fix setting of the fontset element
673 (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
675 (Ffontset_info): Adjusted for the change of fontset_font.
677 * composite.c: Sync to HEAD.
679 * search.c: Sync to HEAD.
681 * coding.c: Sync to HEAD.
682 (emacs_mule_char): Check invalid code more regidly.
684 * coding.h: Sync to HEAD.
686 * charset.c: Sync to HEAD.
688 * charset.h: Sync to HEAD.
690 * character.h (LEADING_CODE_LATIN_1_MIN)
691 (LEADING_CODE_LATIN_1_MAX): Delete these macros.
693 2004-04-08 Kenichi Handa <handa@m17n.org>
695 * category.h: Sync to HEAD.
697 * category.c: Sync to HEAD.
699 * syntax.h: Sync to HEAD.
701 * syntax.c: Sync to HEAD.
703 * regex.h: Sync to HEAD.
705 * regex.c: Sync to HEAD.
707 2004-04-07 Kenichi Handa <handa@m17n.org>
709 * editfns.c: Sync to HEAD.
710 (check_translation): New function.
711 (Ftranslate_region_internal): Handle M:N mapping.
713 2004-04-06 Kenichi Handa <handa@m17n.org>
715 * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
717 2004-03-30 Kenichi Handa <handa@m17n.org>
719 * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
721 (decode_coding_iso_2022): Fix handling of invalid designation.
723 * fileio.c (Finsert_file_contents): Be sure to call unbind_to
724 after calling code_conversion_save.
726 2004-03-11 Kenichi Handa <handa@m17n.org>
728 * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
730 * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
732 * fontset.c: Include "intervals.h".
733 (fontset_face): Fix comparing of Lisp_Objects.
734 (free_face_fontset): Fix Lisp_Object/int mixup.
735 (new_fontset_from_font_name): Likewise.
737 * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
739 * coding.c: Add many prototypes for static functions.
740 (get_translation_table): Allow max_lookup to be NULL.
741 (decode_coding): Call get_translation_table with max_lookup NULL.
742 (Ffind_coding_systems_region_internal): Likewise.
743 (Funencodable_char_position, Fcheck_coding_systems_region):
746 2004-03-11 Kenichi Handa <handa@m17n.org>
748 * coding.c (get_translation_table): Declare it as Lisp_Object.
749 (LOOKUP_TRANSLATION_TABLE): New macro.
750 (produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of
752 (consume_chars): Likewise.
754 2004-03-11 Kenichi Handa <handa@m17n.org>
756 * coding.c (MAX_ANNOTATION_LENGTH): Adjusted for the change of
757 annotation data format.
758 (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
759 Change arguments FROM and TO to single argument NCHARS. Caller
761 (decode_coding_utf_8): Pay attention to coding->charbuf_used.
762 (decode_coding_utf_16, decode_coding_emacs_mule)
763 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
764 (decode_coding_ccl, decode_coding_charset): Likewise.
765 (get_translation): New function.
766 (produce_chars): New arguments translation_table and last_block.
767 Translate characters here. Return number of carryover chars.
769 (produce_composition): New argument pos. Caller changed.
770 Adjusted for the change of annotation data format.
771 (produce_charset, produce_annotation): Likewise.
772 (decode_coding, encode_coding): Don't call translate_chars.
773 (consume_chars): New arg translation_table. Caller changed.
774 (translate_chars): Deleted.
775 (syms_of_coding): Make translation-table's number of extra slots
778 2004-03-09 Kenichi Handa <handa@m17n.org>
780 * search.c (simple_search): Fix setting this_pos_byte in backward
783 * coding.c (detect_coding_emacs_mule): Fix counting of encoded
785 (detect_coding_ccl): Fix setting of the variable valids.
787 2004-03-04 Kenichi Handa <handa@m17n.org>
789 * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
791 * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
793 * editfns.c (Ftranslate_region_internal): Renamed from
794 Ftranslate_region. Accept a char-table in TABLE.
795 (syms_of_editfns): Defsubr Stranslate_region_internal.
797 * xfaces.c (set_lface_from_font_name): If a font is specified for
798 a frame, generate a fontset from the font.
799 (build_scalable_font_name): If the scalable font is requested for
800 a specific size, don't change that size.
801 (try_font_list): Try a scalable font also in the case that a
802 pattern string is specified,
805 2004-03-03 Kenichi Handa <handa@m17n.org>
807 * xfaces.c (Fface_font): New optional arg CHARACTER.
809 2004-02-17 Kenichi Handa <handa@m17n.org>
811 * charset.h (CHARSET_OFFSET): New macro.
813 2004-02-13 Kenichi Handa <handa@m17n.org>
815 * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
817 * fontset.c (fontset_face): Handle the case that repertory is a
819 (find_font_encoding): Return nil for unknown encoding.
820 (Fset_fontset_font): Ignore a font of unknown encoding.
822 2004-02-09 Kenichi Handa <handa@m17n.org>
824 * keymap.c (describe_vector): Handle default value of a char
827 * fontset.c (fontset_face): Handle fallback fonts correctly.
828 (Ffontset_info): Return infomation about fallback fonts.
830 2004-02-06 Kenichi Handa <handa@m17n.org>
832 * fontset.c (FONTSET_DEFAULT): New macro.
833 (FONTSET_ADD): Handle the case that range is nil.
834 (fontset_add): Likewise.
835 (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
836 the case that it is nil.
837 (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
838 (syms_of_fontset): Set char-table-extra-slots property of fontset
841 * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
844 2004-01-30 Kenichi Handa <handa@m17n.org>
846 * emacs.c (main): Call init_charset after syms_of_XXX.
848 * charset.c (Vcharset_map_directory): Deleted.
849 (Vcharset_map_path): New variable
850 (load_charset_map_from_file): Use Vcharset_map_path instead.
851 (init_charset): Initialize Vcharset_map_path.
852 (syms_of_charset): Delete declaration of "charset-map-directory",
853 add declaration of "charset-map-path".
855 2004-01-29 Kenichi Handa <handa@m17n.org>
857 * fns.c (string_char_to_byte): Optimize for ASCII only string.
858 (string_byte_to_char): Likewise.
860 * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
862 * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
863 (detect_coding): Treat '\0' as normal ASCII byte..
864 (detect_coding_system): Likewise.
866 2004-01-27 Kenichi Handa <handa@m17n.org>
868 * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
870 * coding.c (QCmnemonic, QCdefalut_char)
871 (QCdecode_translation_table, QCencode_translation_table)
872 (QCpost_read_conversion, QCpre_write_conversion): New variables.
873 (get_translation_table): Return a list of translation tables if
875 (decode_coding): Call get_translation_table with ENCODEP 0.
876 (char_encodable_p): If translation_table is non-nil, always call
878 (Fdefine_coding_system_internal): Accept list of translation
879 tables as :encode-translation-table and :decode-translation-table.
880 (Fcoding_system_put): New function.
881 (syms_of_coding): Declare new symbols. Defsubr
883 (decode_coding_sjis): Handle 4th charset (typically JISX0212).
884 (encode_coding_sjis): Likewise.
886 * charset.c (map_charset_chars): Fix arg to map_charset_chars in
887 when the charset is superset type.
889 * character.c (translate_char): Accept list of translation tables.
891 2004-01-25 Kenichi Handa <handa@m17n.org>
893 * coding.h (enum coding_attr_index): New member
894 coding_attr_trans_tbl.
895 (CODING_ATTR_TRANS_TBL): New macro.
897 * coding.c (get_translation_table): New function.
898 (translate_chars): Fix the bug of skipping annotation data.
899 (decode_coding): Utilze get_translation_table.
900 (encode_coding): Likewise.
901 (char_encodable_p): Translate char if necessary.
902 (Funencodable_char_position): Likewise.
903 (Ffind_coding_systems_region_internal): Setup translation table
904 for encode in a coding system attribute vector in advance.
905 (Fcheck_coding_systems_region): Likewise.
906 (Fdefine_coding_system_internal): Allow a symbol as translation
907 table. For shift-jis type coding system, allow 4th charset.
909 2004-01-24 Kenichi Handa <handa@m17n.org>
911 * coding.c (decode_coding_sjis): Check the first byte rigidly.
913 * xdisp.c (get_next_display_element): Pass -1 as POS to
914 FACE_FOR_CHAR if displaying a C-string.
916 2004-01-23 Kenichi Handa <handa@m17n.org>
918 * composite.c (get_composition_id): Handle xoff and yoff in a
921 * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
922 (struct composition): New member lbearing and rbearing.
924 * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
925 (x_get_glyph_overhangs): Handle a composition glyph.
926 (x_produce_glyphs): Setup lbearing and rbreaing for a composition
929 * xterm.c (x_compute_glyph_string_overhangs): Handle also a
932 2004-01-18 Kenichi Handa <handa@m17n.org>
934 * print.c: Include charset.h.
935 (Vprint_charset_text_property): New variable.
936 (Qdefault): Extern it.
937 (PRINT_STRING_NON_CHARSET_FOUND)
938 (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
939 (print_check_string_result): New variable.
940 (print_check_string_charset_prop): New function.
941 (print_prune_charset_plist): New variable.
942 (print_prune_string_charset): New function.
943 (print_object): Call print_prune_string_charset if
944 Vprint_charset_text_property is not t.
945 (print_interval): Print nothing if itnerval->plist is nil.
946 (syms_of_print): Declare Vprint_charset_text_property as a lisp
947 variable. Init and staticpro print_prune_charset_plist.
949 2004-01-15 Kenichi Handa <handa@m17n.org>
951 * fontset.c (new_fontset_from_font_name): Use the specified font
952 for all characters in the new fontset.
954 * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
957 * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
958 OBJECT args for composition too.
960 * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
963 2004-01-13 Kenichi Handa <handa@m17n.org>
965 * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
967 * fontset.c (reorder_font_vector): Adjusted for the change of
969 (fontset_face): New arg id. Caller changed.
970 (face_for_char): New args pos and object.
971 (make_fontset_for_ascii_face): Adjusted for the change of FONT_DEF
973 (fs_query_fontset): Check NAME by Fassoc too.
974 (Fset_fontset_font): Allow non-XLFD font name.
975 (Ffontset_info): Adjusted for the change of FONT_DEF format.
977 * fontset.h (face_for_char): Prototype adjusted.
979 * xdisp.c (face_before_or_after_it_pos): Call FACE_FOR_CHAR with
981 (get_next_display_element): Likewise.
982 (append_space): Likewise.
983 (extend_face_to_end_of_line): Likewise.
984 (get_char_face_and_encoding): Likewise.
985 (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
986 (x_produce_glyphs): Likewise.
988 * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
991 * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
994 2004-01-03 Jason Rumney <jasonr@gnu.org>
996 * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
997 of GlobalAlloc'ed memory.
999 2003-12-29 Kenichi Handa <handa@m17n.org>
1001 * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
1003 * charset.h (charset_table_used): Delete extern.
1005 * charset.c (charset_table_used): Make it static.
1006 (map_charset_chars): Fix args to c_function with.
1008 * chartab.c (map_sub_char_table_for_charset): Fix args to
1011 * coding.h (enum coding_result_code): Delete
1012 CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
1014 * coding.c (Qinsufficient_source, Qinconsistent_eol)
1015 (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New
1017 (Vlast_code_conversion_error): New variables.
1018 (syms_of_coding): DEFSYM or DEFVAR_LISP them.
1019 (ONE_MORE_BYTE): Record error if any instead of signaling an
1020 error. If non-ASCII multibyte char is found, return the negative
1021 value of the code. All callers changed to check it.
1022 (ONE_MORE_BYTE_NO_CHECK): Likewise.
1023 (record_conversion_result): New function. All codes setting
1024 coding->result are changed to call this function.
1025 (detect_coding_utf_8): Don't use the local variable incomplete.
1026 (decode_coding_utf_8): Likewise.
1027 (emacs_mule_char): Change the second arg to `const'.
1028 (detect_coding_emacs_mule): Don't use the local variable
1030 (detect_coding_sjis): Likewise.
1031 (detect_coding_big5): Likewise.
1032 (decode_coding): Fix of flushing out unprocessed data.
1033 (make_conversion_work_buffer): Fix making of a work buffer.
1034 (decode_coding_object): Return coding->dst_object;
1036 * fontset.c (set_fontset_font): Fix args.
1038 * lisp.h (CHARACTERBITS): Define as 22.
1040 * process.c (send_process): Be sure to set coding->src_multibyte.
1042 * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
1044 2003-12-02 Kenichi Handa <handa@m17n.org>
1046 * xdisp.c (handle_auto_composed_prop): Give limit to
1047 Fnext_single_char_property_change.
1049 2003-12-02 Kenichi Handa <handa@m17n.org>
1051 * coding.c (detect_coding): Fix previous change.
1052 (detect_coding_system): Likewise.
1054 2003-12-02 Kenichi Handa <handa@m17n.org>
1056 * composite.c (syms_of_composite): Don't make the compostion hash
1059 * fontset.c (Fset_fontset_font): Fix docstring.
1061 * lisp.h (detect_coding_system): Adjust prototype.
1063 * fileio.c (kill_workbuf_unwind): Delete this function.
1064 (Finsert_file_contents): Adjust the call of detect_coding_system.
1065 Get conversion_buffer by code_conversion_save. Use the macor
1066 CODING_MAY_REQUIRE_DECODING. After decoding, update
1069 * coding.h (make_conversion_work_buffer): Delete extern.
1070 (code_conversion_save): Extern it.
1072 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
1073 (CODING_GET_INFO): Delete argument eol_type. Callers changed.
1074 (decode_coding_utf_8): Don't do eol converion.
1075 (detect_coding_utf_16): Check coding->src_chars, not
1076 coding->src_bytes. Add heuristics for those that have no
1078 (decode_coding_emacs_mule): Don't do eol converion.
1079 (decode_coding_iso_2022): Likewise.
1080 (decode_coding_sjis): Likewise.
1081 (decode_coding_big5): Likewise.
1082 (decode_coding_charset): Likewise.
1083 (adjust_coding_eol_type): Return a new coding system.
1084 (detect_coding): Don't detect eol. Fix for utf-16 detection.
1085 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
1087 (decode_coding): Pay attention to undo_list. Do eol convesion for
1088 all types of coding-systems (if necessary).
1089 (Vcode_conversion_work_buf_list): Delete it.
1090 (Vcode_conversion_reused_workbuf): Renamed from
1091 Vcode_conversion_reused_work_buf.
1092 (Vcode_conversion_workbuf_name): New variable.
1093 (reused_workbuf_in_use): New variable.
1094 (make_conversion_work_buffer): Delete the arg DEPTH.
1095 (code_conversion_restore): Argument changed to cons.
1096 (code_conversion_save): Delete the argument BUFFER. Callers
1098 (detect_coding_system): New argument src_chars. Callers changed.
1099 Fix for utf-16 detection.
1100 (init_coding_once): Don't use ISO_carriage_return.
1101 (syms_of_coding): Initialized Vcode_conversion_workbuf_name and
1102 reused_workbuf_in_use.
1104 2003-11-24 Kenichi Handa <handa@m17n.org>
1106 * keymap.c (store_in_keymap): Pay attention to the case that idx
1107 is a cons specifying a character range.
1109 * coding.c (Fdefine_coding_system_internal): Fix previous change.
1111 2003-11-23 Kenichi Handa <handa@m17n.org>
1113 * xdisp.c (handle_auto_composed_prop): Fix the case of returning
1114 HANDLED_RECOMPUTE_PROPS.
1116 * coding.c (Fdefine_coding_system_internal): Fix checking of
1117 ascii compatibility.
1119 2003-11-22 Kenichi Handa <handa@m17n.org>
1121 * charset.c (find_charsets_in_text): Delete unused locale
1123 (Fset_charset_priority): Update Vemacs_mule_charset_list too.
1125 * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
1126 Resync charset_list to Vemacs_mule_charset_list.
1128 * keymap.c (store_in_keymap): Pay attention to the case that idx
1129 is a cons specifying a character range.
1131 2003-11-18 Kenichi Handa <handa@m17n.org>
1133 * composite.c (update_compositions): Bind inhibit-read-only, etc
1134 to t before calling remove-list-of-text-properties.
1136 * print.c (print_object): Always print ASCII chars as is.
1138 2003-11-17 Kenichi Handa <handa@m17n.org>
1140 * keymap.c (Fdefine_key): Fix handling of Lucid style event type
1143 * fns.c (Fmapconcat): Signal an error if SEQUENCE is a char table.
1144 (Fmapcar): Likewise.
1147 2003-11-15 Kenichi Handa <handa@m17n.org>
1149 * syntax.c (skip_chars): Be sure to alloca char_ranges when
1152 2003-11-14 Kenichi Handa <handa@m17n.org>
1154 * xfaces.c (set_lface_from_font_name): Fix for the case that
1155 FONTNAME is not fontset name.
1157 2003-11-13 Kenichi Handa <handa@m17n.org>
1159 * fns.c (base64_encode_1): Fix previous change.
1161 2003-11-08 Kenichi Handa <handa@m17n.org>
1163 * fontset.c (set_fontset_font): New function.
1164 (Fset_fontset_font): If a font is specified for a charset, use
1165 map_charset_chars to store the font spec in a fontset.
1167 2003-10-29 Kenichi Handa <handa@m17n.org>
1169 * fontset.c (fontset_face): Create a fallback fontset on demand
1170 (make_fontset): Don't create a fallback fontset here.
1171 (free_face_fontset): Free a fallback fontset (if any) too.
1172 (n_auto_fontsets): Delete this variable.
1173 (auto_fontset_alist): New variable.
1174 (new_fontset_from_font_name): Check auto_fontset_alist.
1175 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
1176 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
1177 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
1178 Defsubr Sfontset_list_all.
1180 2003-10-24 Kenichi Handa <handa@m17n.org>
1182 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
1184 2003-10-23 Kenichi Handa <handa@m17n.org>
1186 * fontset.c (Fnew_fontset): Check NAME more rigidly.
1188 2003-10-17 Kenichi Handa <handa@m17n.org>
1190 * editfns.c (Fgoto_char): Fix docstring.
1192 2003-10-16 Kenichi Handa <handa@m17n.org>
1194 * insdel.c (insert_from_gap): Adjust intervals correctly.
1196 2003-10-12 Jason Rumney <jasonr@gnu.org>
1198 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
1199 (pfnGetFontUnicodeRanges): New dynamically loaded function.
1200 (w32_initialize): Try to load it.
1201 (x_get_font_repertory): Use it if available.
1202 (w32_encode_char): Add shortcut for unicode output.
1204 * w32fns.c (w32_load_system_font): Default charset to -1.
1205 (x_to_w32_charset): Match all fonts for unicode.
1206 (w32_to_x_charset): New parameter matching. Don't return partial
1207 or wildcard charsets.
1208 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
1209 (w32_codepage_for_font): Return CP_UNICODE for unicode.
1210 (w32_to_x_font): Match charset to real charset.
1211 (enum_font_cb2): Always list unicode versions.
1213 * makefile.w32-in (temacs): Increase EMHEAP.
1215 2003-10-11 Jason Rumney <jasonr@gnu.org>
1217 * w32term.c (w32_encode_char): New charset parameter.
1218 font_info.encoding becomes encoding_type.
1219 (x_get_font_repertory): New function. Warning: stub only!
1220 (x_new_font): Return quickly if font already set.
1221 (x_new_fontset): fontsetname parameter is Lisp_Object.
1222 Use new fs_query_fontset. Try new_fontset_from_font_name. Use
1223 fontset_name for return value.
1225 * w32term.h: Declare x_get_font_repertory.
1227 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
1228 place of find_charset_in_text. Use encode_coding_object in place
1230 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
1233 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
1235 (w32_load_system_font): Initialize charset as unicode.
1236 font_info.encoding becomes encoding_type.
1237 (w32_to_x_font): Use decode_coding_c_string in place of
1239 (x_to_w32_font): Use encode_coding_object in place of
1241 (syms_of_w32fns): Set get_font_repertory_func.
1243 * w32console.c: Include character.h. Use terminal_encode_buffer
1245 (write_glyphs): Use new version of encode_terminal_code. Use
1246 encode_coding_object in place of encode_coding.
1248 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
1249 encoding becomes encoding_type.
1251 * term.c (terminal_encode_buffer): Make externally visible.
1253 * makefile.w32-in: Add character.h dependancies.
1254 (character.o, chartab.o): New targets.
1256 2003-10-10 Kenichi Handa <handa@m17n.org>
1258 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
1259 CODING_ID_EOL_TYPE..
1261 2003-10-07 Andreas Schwab <schwab@suse.de>
1263 * coding.c (produce_chars): Revert last change.
1265 2003-10-06 Kenichi Handa <handa@m17n.org>
1267 * charset.h (charset_unicode): Extern it.
1269 * charset.c (string_xstring_p): Check by (C >= 0x100).
1270 (find_charsets_in_text): Format of the arc CHARSETS changed. New
1272 (Ffind_charset_region, Ffind_charset_string): Adjusted for the
1273 change of find_charsets_in_text.
1274 (Fsplit_char): Fix doc. Never return unknown.
1276 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
1278 * coding.c (Fdefine_coding_system_alias): Update
1279 Vcoding_system_list.
1281 * fontset.c (load_font_get_repertory): Pay attention to the case
1282 that ENCODING of a font is specified by a char-table.
1284 * xterm.c (x_get_font_repertory): Handle the case that the
1285 encoding of font is other than Unicode.
1287 2003-10-02 Kenichi Handa <handa@m17n.org>
1289 * term.c (encode_terminal_code): Don't handle glyph-table. Check
1290 if a character is encodable by the terminal coding system. If
1291 not, produces proper number of `?'s. Update
1292 terminal_encode_buffer and terminal_encode_buf_size if necessary.
1293 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
1295 2003-10-01 Kenichi Handa <handa@m17n.org>
1297 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
1299 (encode_terminal_code): Argument changed. Encode multiple
1300 characters at once. Store the result of encoding in
1301 terminal_encode_buffer.
1302 (write_glyphs): Adjusted for the change of encode_terminal_code.
1303 (insert_glyphs): Likewise.
1304 (term_init): Initialize terminal_encode_buffer and
1305 terminal_encode_buf_size.
1307 * coding.c (consume_chars): If coding->src_object is nil, don't
1310 2003-09-30 Kenichi Handa <handa@m17n.org>
1312 * character.c (char_string): Use ASCII_CHAR_P instead of
1315 2003-09-30 Kenichi Handa <handa@m17n.org>
1317 * xdisp.c (handle_auto_composed_prop): Check if the last
1318 characters of auto-composed region is newly composed with the
1319 following characters.
1320 (handle_composition_prop): Fix checking of point being inside
1323 2003-09-26 Kenichi Handa <handa@m17n.org>
1325 * fns.c (concat): Don't change multibyteness of the result by
1326 concatenating an 8-bit character.
1328 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
1329 multibyteness of the result when newelt is an 8-bit character.
1331 2003-09-29 Dave Love <fx@gnu.org>
1333 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
1336 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
1338 * xfaces.c (face_numeric_value): Declare dim size_t.
1339 (Finternal_lisp_face_equal_p): Remove unused f.
1341 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
1342 (MATRIX_ROW): Remove unused vars.
1343 (draw_glyphs, x_insert_glyphs, fast_find_position)
1344 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
1347 * regex.c (regex_compile): Remove unused var.
1349 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
1351 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
1352 (Faccessible_keymaps, where_is_internal): Remove unused vars.
1354 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
1356 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
1358 * fileio.c (Fwrite_region): Remove unused var.
1360 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
1361 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
1363 * composite.c (Fremove_list_of_text_properties): Declare.
1365 * coding.c (inhibit_pre_post_conversion): Removed (unused).
1366 (alloc_destination, produce_chars): Use EMACS_INT for byte/char
1368 (coding_inherit_eol_type): Remove unused attrs.
1369 (detect_coding): Cast arg of detect_eol.
1371 * charset.c (syms_of_charset): Remove unused var p.
1372 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
1375 * casetab.c (set_case_table): Remove unused var.
1377 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
1380 2003-09-26 Dave Love <fx@gnu.org>
1382 * xterm.c (x_bitmap_mask): Declare.
1384 2003-09-17 Dave Love <fx@gnu.org>
1386 * xterm.c (x_term_init): Fix type error.
1388 * lisp.h: Add Funibyte_char_to_multibyte.
1390 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
1391 (Fset_coding_system_priority): Doc fix.
1393 * alloc.c: Sync with HEAD version.
1395 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
1397 * indent.c (check_composition): Make start and end EMACS_INT.
1399 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
1401 * xdisp.c (handle_composition_prop, check_point_in_composition):
1402 Make buffer positions EMACS_INT.
1404 * composite.c (find_composition, run_composition_function)
1405 (update_compositions, Ffind_composition_internal): Make buffer
1406 positions EMACS_INT.
1408 * composite.h (find_composition, update_compositions): Make
1409 position args EMACS_INT.
1411 * keyboard.c (adjust_point_for_property): Make beg and end
1414 * intervals.c (get_property_and_range)
1415 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
1417 * unexalpha.c: Don't include varargs.h.
1419 2003-09-16 Dave Love <fx@gnu.org>
1421 * coding.h (ENCODE_UTF_8): New.
1423 * Makefile.in (gtkutil.o): Depend on coding.h.
1425 * coding.c (Fset_coding_system_priority): Doc fix.
1427 2003-09-16 Kenichi Handa <handa@m17n.org>
1429 * fileio.c (Finsert_file_contents): Call setup_coding_system in
1430 the case of auto saving.
1432 2003-09-10 Andreas Schwab <schwab@suse.de>
1434 * chartab.c (map_char_table): Protect `range' from GC.
1435 (map_char_table_for_charset): Likewise.
1437 2003-07-09 Kenichi Handa <handa@m17n.org>
1439 * coding.c (decode_coding_sjis): Check bytes more rigidly.
1441 2003-06-26 Kenichi Handa <handa@m17n.org>
1443 * fileio.c (choose_write_coding_system): Return a decided coding
1445 (Fwrite_region): Set Vlast_coding_system_used to the return value
1446 of choose_write_coding_system.
1448 2003-06-06 Kenichi Handa <handa@m17n.org>
1450 * charset.c (Fset_charset_priority): Pay attention to duplicated
1453 * coding.c (QCcategory): New variable.
1454 (syms_of_coding): Defsym it. Set all elements of
1455 Vcoding_category_table and their symbol values.
1456 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
1457 coding-category-XXX, and coding-category-list.
1458 (Fdefine_coding_system_internal): Add category in the plist.
1460 2003-06-05 Kenichi Handa <handa@m17n.org>
1462 * callproc.c (Fcall_process): Handle carryover correctly.
1464 * coding.c (decode_coding_iso_2022): Fix handling of invalid
1466 (raw_text_coding_system): Check NILP (coding_system).
1467 (coding_inherit_eol_type): Check NILP (coding_system) and
1469 (consume_chars): Fix for the case of raw-text.
1471 * process.c (read_process_output): Handle carryover correctly.
1473 2003-06-02 Dave Love <fx@gnu.org>
1475 * regex.c (re_search_2): Fix last change.
1477 2003-05-30 Kenichi Handa <handa@m17n.org>
1479 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
1480 target_multibyte. Even in a unibyte case, return a converted
1482 (GET_CHAR_AFTER): New macro.
1483 (PATFETCH): Translate via multibyte char.
1484 (HANDLE_UNIBYTE_RANGE): Delete this macro.
1485 (SETUP_MULTIBYTE_RANGE): New macro.
1486 (regex_compile): Setup compiled code so that its multibyteness
1487 matches that of a target. Fix the handling of "[X-YZ]" using
1488 SETUP_MULTIBYTE_RANGE.
1489 (analyse_first) <charset>: For filling fastmap for all multibyte
1490 characters, don't check by BASE_LEADING_CODE_P.
1491 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
1492 the same as RE_MULTIBYTE_P (bufp) now.
1493 (mutually_exclusive_p): Check by (! multibyte ||
1495 (TARGET_CHAR_AND_LENGTH): Delete this macro.
1496 (TRANSLATE_VIA_MULTIBYTE): New macro.
1497 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
1498 It is the same as RE_MULTIBYTE_P (bufp) now.
1499 <exactn>: Translate via multibyte.
1500 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
1502 <charset, charset_not>: Fetch a character by
1503 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
1504 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
1505 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
1506 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
1508 (bcmp_translate): Likewise.
1510 * search.c (compile_pattern): Check the member target_multibyte,
1511 not the member multibyte of buf.
1513 * lread.c (read1): While reading a string, set force_singlebyte
1514 and force_multibyte correctly.
1516 * charset.c (Fset_unibyte_charset): Fix setting up of
1517 unibyte_to_multibyte_table.
1518 (init_charset_once): Likewise.
1520 2003-05-29 Kenichi Handa <handa@m17n.org>
1522 * coding.c (setup_coding_system): If coding has
1523 post-read-conversion or pre-write-conversion, set
1524 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
1526 (decode_coding_gap): Run post-read-conversion if any.
1528 * fileio.c (Finsert_file_contents): Even if we read into a
1529 unibyte buffer, check if we must decode the result or not.
1531 2003-05-29 Kenichi Handa <handa@m17n.org>
1533 * coding.c (make_conversion_work_buffer): Change the work buffer
1534 name to the same one as that of Emacs 21.
1536 2003-05-28 Kenichi Handa <handa@m17n.org>
1538 * coding.h (make_conversion_work_buffer): Prototype adjusted.
1539 (code_conversion_restore): Don't extern it.
1541 * coding.c (detected_mask): Delete unused variable.
1542 (decode_coding_iso_2022): Pay attention to the byte sequence of
1543 CTEXT extended segment, and retain those bytes as is.
1544 (decode_coding_ccl): Delete unused variable `valids'.
1545 (setup_coding_system): Delete unused variable `category'.
1546 (consume_chars): Delete unused variable `category'. Make it work
1547 for non-multibyte case.
1548 (make_conversion_work_buffer): Argument changed.
1549 (saved_coding): Delete unused variable.
1550 (code_conversion_restore): Don't check saved_coding->destination.
1551 (code_conversion_save): New function.
1552 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
1553 instead of record_unwind_protect.
1554 (decode_coding_object, encode_coding_object): Likewise. Recover
1556 (detect_coding_system): Delete unused variable `mask'.
1557 (Fdefine_coding_system_internal): Delete unsed vaiable id;
1559 * fileio.c (kill_workbuf_unwind): New function.
1560 (Finsert_file_contents): On replacing, call
1561 make_conversion_work_buffer with correct args, and call
1562 record_unwind_protect with the first arg kill_workbuf_unwind.
1564 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
1566 2003-05-20 Kenichi Handa <handa@m17n.org>
1568 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
1570 (fontset_add): Fix for the case that TO is less than TO1.
1571 (Ffontset_info): Don't use fallback fontset on checking the
1573 (dump_fontset): New function for debugging.
1575 * coding.c (Fdefine_coding_system_internal): Fix for the case that
1576 coding_type is Qcharset.
1578 2003-05-07 Kenichi Handa <handa@m17n.org>
1580 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
1581 (map_char_table): Don't inherit the value from the parent on
1582 initializing VAL. Adjusted for the above change.
1584 2003-05-06 Kenichi Handa <handa@m17n.org>
1586 * coding.c (Qsignature, Qendian): Delete these variables.
1587 (syms_of_coding): Don't initialize them.
1588 (CATEGORY_MASK_UTF_16_AUTO): New macro.
1589 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
1591 (decode_coding_utf_16): Don't detect BOM here.
1592 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
1593 is NOT utf_16_without_bom.
1594 (setup_coding_system): For a coding system of type utf-16, check
1595 if the attribute :endian is Qbig or not (not nil or not), and set
1596 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
1597 (detect_coding): If coding type is utf-16 and BOM detection is
1598 required, detect it.
1599 (Fdefine_coding_system_internal): For a coding system of type
1600 utf-16, check if the attribute :endian is Qbig or not (not nil or
1603 2003-05-06 Kenichi Handa <handa@m17n.org>
1605 * coding.c (coding_set_source): Fix for the case that the current
1606 buffer is different from coding->src_object.
1607 (decode_coding_object): Don't use the conversion work buffer if
1608 DST_OBJECT is a buffer.
1610 2003-05-04 Dave Love <fx@gnu.org>
1612 * lread.c (read_emacs_mule_char) [len==2]: Index
1613 emacs_mule_charset correctly.
1615 2003-02-16 Dave Love <fx@gnu.org>
1617 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
1618 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
1619 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
1621 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
1622 (detected_mask): Remove Big5 bits.
1624 2003-04-09 Kenichi Handa <handa@m17n.org>
1626 The following changes are to make the font rescaling facility
1627 compatible with Emacs 21.
1629 * xfaces.c (Vface_font_rescale_alist): Renamed from
1630 Vface_resizing_fonts.
1631 (struct font_name): Rename member resizing_ratio to rescale_ratio.
1632 (font_rescale_ratio): Renamed from font_resizing_ratio.
1633 (split_font_name): Set font->rescale_ratio.
1634 (better_font_p): Pay attention to font->rescale_ratio.
1635 (build_scalable_font_name): Likewise. Change RESX, and RESY
1637 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
1640 2003-03-28 Kenichi Handa <handa@m17n.org>
1642 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
1643 (Qutf_16_le): Remove these variables.
1644 (syms_of_coding): Don't DEFSYM them.
1645 (decode_coding_utf_16): Fix handling of BOM.
1646 (encode_coding_utf_16): Fix handling of BOM.
1648 2003-03-14 Kenichi Handa <handa@m17n.org>
1650 * fileio.c (Finsert_file_contents): On replacing, before decoding
1651 the file into the work buffer, set point of the work buffer to the
1654 2003-02-13 Dave Love <fx@gnu.org>
1656 * coding.c (Fcheck_coding_systems_region): Fix type errors.
1658 2003-02-04 Dave Love <fx@gnu.org>
1660 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
1663 2003-01-31 Kenichi Handa <handa@m17n.org>
1665 * xdisp.c (SKIP_GLYPHS): New macro.
1666 (set_cursor_from_row): Pay attention to string display properties.
1668 * category.c (copy_category_entry): Fix for the case that RANGE
1671 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
1673 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
1676 2003-01-30 Kenichi Handa <handa@m17n.org>
1678 * charset.c (Fcharset_id_internal): New function.
1679 (syms_of_charset): Defsubr it.
1681 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
1682 with the last arg charset_list acquired from coding.
1683 (Fdefine_coding_system_internal): For ccl-based coding system, fix
1684 the attribute coding_attr_ccl_valids.
1686 * coding.h (enum define_coding_ccl_arg_index): Set the first
1687 member coding_arg_ccl_decoder to coding_arg_max.
1689 * ccl.h (ccl_driver): Prototype adjusted.
1691 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
1692 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
1693 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
1694 (Fccl_execute): Call ccl_driver with the last arg Qnil.
1695 (Fccl_execute_on_string): Likewise.
1697 2003-01-11 Kenichi Handa <handa@m17n.org>
1699 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
1702 * charset.c (encode_char): Fix handling of methods SUBSET and
1705 * xterm.c (x_new_fontset): Fix previous change.
1707 2003-01-10 Dave Love <fx@gnu.org>
1709 * composite.c (syms_of_composite): Make composition_hash_table
1712 2003-01-10 Kenichi Handa <handa@m17n.org>
1714 * dispextern.h (check_face_attributes, generate_ascii_font_name)
1715 (font_name_registry): Don't extern them.
1716 (split_font_name_into_vector, build_font_name_from_vector): Extern
1719 * fontset.h (Qfontset): Don't extern it.
1720 (new_fontset_from_font_name): Extern it.
1722 * fontset.c: Give 8 extra slots to fontset objects.
1723 (Qfontset_info): New variable.
1724 (syms_of_fontset): Defsym it.
1725 (FONTSET_FALLBACK): New macro.
1726 (fontset_face): Try also the default fontset.
1727 (make_fontset): Realize a fallback fontset from the default
1729 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
1730 using split_font_name_into_vector and build_font_name_from_vector.
1731 (Fset_fontset_font): Access the elements of font_spec by enum
1732 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
1733 name by using split_font_name_into_vector.
1734 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
1735 generate a proper font name from the fontset name. Update
1736 Vfontset_alias_alist.
1737 (n_auto_fontsets): New variable.
1738 (new_fontset_from_font_name): New function.
1739 (Ffont_info): Store the information about fonts generated from the
1740 default fontset in the first extra slot of the returned
1743 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
1744 (font_name_registry): Function deleted.
1745 (split_font_name_into_vector): New function.
1746 (build_font_name_from_vector): New function.
1747 (font_list): The argument REGISTRY is now a list of registry
1749 (choose_face_font): If we are choosing an ASCII font, and ATTRS
1750 specifies an explicit font name, return the name as is. Make a
1751 list of registy names.
1753 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
1755 (Fx_create_frame): Don't call x_new_fontset here. Just use
1756 x_list_fonts to check the existence of fonts.
1758 * xterm.h (x_new_fontset): Prototype adjusted.
1760 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
1761 string. Use new_fontset_from_font_name to create a fontset from a
1764 2003-01-07 Dave Love <fx@gnu.org>
1766 * Makefile.in: Fix some dependencies.
1768 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
1769 set it to nil before returning.
1771 * composite.c (update_compositions): Fix type error.
1773 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
1775 2003-01-07 Kenichi Handa <handa@m17n.org>
1777 * xterm.c (x_new_font): Optimize for the case that the font is
1778 already set for the frame.
1780 2003-01-06 Kenichi Handa <handa@m17n.org>
1782 * chartab.c (char_table_ascii): Check if the char table contents
1783 is sub-char-table or not.
1784 (char_table_set): Fix argument to char_table_ascii.
1785 (char_table_set_range): Likewise.
1787 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
1788 (detect_coding_utf_8, detect_coding_utf_16)
1789 (detect_coding_emacs_mule, detect_coding_iso_2022)
1790 (detect_coding_sjis, detect_coding_big5)
1791 (detect_coding_ccl, detect_coding_charset): Change argument MASK
1792 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
1793 sequence is valid in this coding system. Callers changed.
1794 (MAX_ANNOTATION_LENGTH): New macro.
1795 (ADD_ANNOTATION_DATA): New macro.
1796 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
1797 ADD_ANNOTATION_DATA. The format of annotation data changed.
1798 (ADD_CHARSET_DATA): New macro.
1799 (emacs_mule_char): New argument ID. Callers changed.
1800 (decode_coding_emacs_mule, decode_coding_iso_2022)
1801 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
1802 Produce charset annotation data in coding->charbuf.
1803 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
1804 to charset annotation data in coding->charbuf.
1805 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
1806 coding->common_flags if the coding system is iso-2022 based and
1808 (produce_composition): Adjusted for the new annotation data
1810 (produce_charset): New function.
1811 (produce_annotation): Handle charset annotation.
1812 (handle_composition_annotation, handle_charset_annotation): New
1814 (consume_chars): Handle charset annotation. Utilize the above two
1816 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
1817 buffer, get the deleted text as a string and set
1818 coding->src_object to that string.
1819 (detect_coding, detect_coding_system): Use the new struct
1820 coding_detection_info.
1822 * coding.h (struct coding_detection_info): New structure.
1823 (struct coding_system): Prototype of the member `detector'
1825 (CODING_ANNOTATE_CHARSET_MASK): New macro.
1827 2003-01-06 Kenichi Handa <handa@m17n.org>
1829 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
1831 2003-01-03 Dave Love <fx@gnu.org>
1833 * keymap.c (apropos_predicate, apropos_accumulate): Declare
1835 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
1836 to new local and nullify apropos_accumulate before returning.
1837 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
1839 2002-12-05 Kenichi Handa <handa@m17n.org>
1841 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
1844 2002-11-26 Dave Love <fx@gnu.org>
1846 * fns.c (Flanginfo): Call synchronize_system_time_locale.
1848 2002-11-07 Kenichi Handa <handa@m17n.org>
1850 The following changes are to make character composition happen
1851 automatically on displaying.
1853 * Makefile.in (lisp, shortlisp): Add composite.elc
1855 * composite.h (Qauto_composed, Vauto_composition_function,
1856 Qauto_composition_function): Extern them.
1858 * composite.c (Vcomposition_function_table,
1859 Qcomposition_function_table): Delete variables.
1860 (Qauto_composed, Vauto_composition_function,
1861 Qauto_composition_function): New variables.
1862 (run_composition_function): Don't call
1863 compose-chars-after-function.
1864 (update_compositions): Clear `auto-composed' text property.
1865 (compose_chars_in_text): Delete this function.
1866 (syms_of_composite): Staticpro Qauto_composed and
1867 Qauto_composition_function. Declare Vauto_composition_function as
1870 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
1872 * xdisp.c (it_props): Add an entry for Qauto_composed.
1873 (handle_auto_composed_prop): New function.
1875 * xselect.c (selection_data_to_lisp_data): Don't call
1876 compose_chars_in_text.
1878 2002-11-06 Dave Love <fx@gnu.org>
1880 * keyboard.c (read_char): Modify checking around use of
1881 Vkeyboard_translate_table.
1883 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
1886 2002-11-06 Kenichi Handa <handa@m17n.org>
1888 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
1889 the case that the last byte is '\r' correctly.
1890 (decode_coding_emacs_mule): Likewise.
1891 (decode_coding_iso_2022): Likewise.
1892 (decode_coding_sjis): Likewise.
1893 (decode_coding_big5): Likewise.
1894 (decode_coding_charset): Likewise.
1895 (produce_chars): Likewise.
1896 (decode_coding): Flushing out the unprocessed data correctly.
1897 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
1900 2002-10-31 Dave Love <fx@gnu.org>
1902 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
1904 (xaw_scroll_callback): Revert last change.
1906 2002-10-30 Kenichi Handa <handa@m17n.org>
1908 * charset.c (Fset_charset_priority): Update
1909 Viso_2022_charset_list.
1911 2002-10-29 Kenichi Handa <handa@m17n.org>
1913 * xfaces.c (Vface_resizing_fonts): New variable.
1914 (struct font_name): New member `resizing_ratio'.
1915 (font_resizing_ratio): New function.
1916 (split_font_name): Set font->resizing_ratio.
1917 (better_font_p): Pay attention to font->resizing_ratio.
1918 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
1919 RESX, and RESY fields.
1920 (try_alternative_families): Try scalable fonts if
1921 Vscalable_fonts_allowed is not Qt.
1922 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
1924 2002-10-29 Dave Love <fx@gnu.org>
1926 * xterm.c (xaw_scroll_callback): Cast correctly.
1928 2002-10-28 Dave Love <fx@gnu.org>
1930 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
1931 (lispy_kana_keys): Comment out.
1932 (make_lispy_event) [XK_kana_A]: Comment out.
1934 * xterm.c (xaw_scroll_callback): Cast call_data.
1935 (XTread_socket): Deal with ASCII keysyms.
1936 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
1938 2002-10-27 Dave Love <fx@gnu.org>
1940 * xterm.c (Vx_keysym_table): New.
1941 (syms_of_xterm): Initialize it.
1942 (XTread_socket): Use it.
1943 From head: Eliminate incorrect optimization that tried to avoid
1944 decoding the output of X*LookupString.
1945 (x_get_font_repertory): Delete charset declaration.
1947 2002-10-16 Kenichi Handa <handa@m17n.org>
1949 * coding.c (detect_coding): Fix previous change.
1950 (detect_coding_charset): If only ASCII bytes are found, return 0.
1951 (detect_coding_system): Fix previous change.
1952 (Fdefine_coding_system_internal): Setup CODING_ATTR_ASCII_COMPAT
1955 2002-10-15 Dave Love <fx@gnu.org>
1957 * coding.c (Fcheck_coding_system): Doc fix.
1959 * editfns.c (Finsert_byte): Return a proper value.
1961 2002-10-14 Kenichi Handa <handa@m17n.org>
1963 * coding.c (decode_coding): Fix args to translate_chars. Pay
1964 attention to Vstandard_translation_table_for_decode.
1965 (encode_coding): Fix args to translate_chars. Pay attention to
1966 Vstandard_translation_table_for_encode.
1968 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
1971 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
1972 not by SINGLE_BYTE_CHAR_P.
1974 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
1977 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
1980 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
1981 by SINGLE_BYTE_CHAR_P.
1983 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
1986 2002-10-14 Dave Love <fx@gnu.org>
1988 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
1990 2002-10-10 Dave Love <fx@gnu.org>
1992 * fns.c (Flanginfo): Fix typo.
1994 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
1996 2002-10-10 Kenichi Handa <handa@m17n.org>
1998 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
1999 Don't update *mask when correctly detected.
2000 (detect_coding_utf_16): Likewise.
2001 (detect_coding_emacs_mule): Likewise.
2002 (detect_coding_iso_2022): Likewise.
2003 (detect_coding_sjis): Likewise.
2004 (detect_coding_big5): Likewise.
2005 (detect_coding_ccl): Likewise.
2006 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
2007 (detect_eol): Delete the argument CODING, and add the argument
2009 (detect_coding): Adjusted for the changes above.
2010 (detect_coding_system): Likewise.
2012 2002-10-09 Kenichi Handa <handa@m17n.org>
2014 * character.c (char_string): Renamed from
2015 char_string_with_unification. Pay attention to
2017 (string_char): Renamed from string_char.
2019 * character.h (CHAR_STRING): Call char_string if C is greater than
2021 (CHAR_STRING_ADVANCE): Likewise.
2022 (STRING_CHAR): Call string_char instead of
2023 string_char_with_unification.
2024 (STRING_CHAR_AND_LENGTH): Likewise.
2025 (STRING_CHAR_ADVANCE): Likewise.
2027 2002-10-09 Dave Love <fx@gnu.org>
2029 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
2031 2002-10-07 Kenichi Handa <handa@m17n.org>
2033 * keymap.c (push_key_description): Pay attention to
2036 * regex.c (re_search_2): Fix for the case of unibyte buffer.
2038 2002-10-06 Dave Love <fx@gnu.org>
2040 * charset.c (define_charset_internal): Rename `supprementary'.
2042 * Makefile.in (lisp, shortlisp): Remove latin-N.
2044 2002-10-05 Dave Love <fx@gnu.org>
2046 * xfns.c (x_window, x_window): Use use_xim.
2048 * xterm.c (use_xim): Initialize.
2049 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
2050 (x_term_init): Maybe set use_xim.
2052 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
2054 2002-10-01 Kenichi Handa <handa@m17n.org>
2056 * search.c (search_buffer): Fix case-fold-search of multibyte
2058 (boyer_moore): Rename the last argument to char_high_bits.
2060 2002-09-27 Kenichi Handa <handa@m17n.org>
2062 * xdisp.c (display_string): Fix for the case of zero width glyph.
2064 * xfns.c (x_set_font): Change the error message of the case that
2065 x_new_fontset returns Qt.
2067 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
2068 (Finternal_set_lisp_face_attribute): Use signal_error for the
2069 error of invalid fontset.
2071 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
2074 2002-09-19 Kenichi Handa <handa@m17n.org>
2076 * regex.c (re_search_2): Fix previous change.
2078 2002-09-18 Kenichi Handa <handa@m17n.org>
2080 * syntax.c (skip_syntaxes): Fix previous change.
2082 2002-09-13 Kenichi Handa <handa@m17n.org>
2084 * syntax.c (skip_chars): Fix previous change.
2085 (skip_syntaxes): Fix previous change.
2087 2002-09-06 Dave Love <fx@gnu.org>
2089 * config.in: Restore it.
2091 2002-09-05 Dave Love <fx@gnu.org>
2093 * config.in: Removed (now auto-generated).
2095 * s/usg5-4.h: Fix last change.
2097 * unexelf.c (unexec): Make .got handling not SGI-specific.
2099 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
2101 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
2103 * keyboard.c (read_key_sequence): Fix type error.
2105 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
2108 * fontset.c (fontset_add): Return Lisp_Object.
2110 2002-09-03 Dave Love <fx@gnu.org>
2112 * charset.h (charset_ordered_list_tick): Declare extern.
2114 2002-09-03 Kenichi Handa <handa@m17n.org>
2116 The following changes (and some of 2002-08-20 changes of mine) are
2117 for handling syntax, category, and case conversion for unibyte
2118 characters by converting them to multibyte on the fly. With these
2119 changes, we don't have to setup syntax and case tables for unibyte
2120 characters in each language environment.
2122 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
2123 multibyte if necessary.
2125 * bytecode.c (Fbyte_code): Likewise.
2127 * character.h (LEADING_CODE_LATIN_1_MIN)
2128 (LEADING_CODE_LATIN_1_MAX): New macros.
2129 (unibyte_to_multibyte_table): Extern it.
2130 (unibyte_char_to_multibyte): New macro.
2131 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
2132 (CHAR_LEADING_CODE): New macro.
2133 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
2135 * character.c (unibyte_to_multibyte_table): New variable.
2136 (unibyte_char_to_multibyte): Move to character.h and defined as
2138 (multibyte_char_to_unibyte): If C is an eight-bit character,
2139 convert it to the corresponding byte value.
2141 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
2142 not 1, singals an error. Update the elements of
2143 unibyte_to_multibyte_table.
2144 (init_charset_once): Initialize unibyte_to_multibyte_table.
2145 (syms_of_charset): Define the charset `iso-8859-1'.
2147 * casefiddle.c (casify_object): Fix previous change.
2149 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
2150 as is without converting it to unibyte. In a unibyte buffer,
2151 convert C to multibyte before checking the syntax.
2153 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
2155 * minibuf.c (Fminibuffer_complete_word): Use the macro
2156 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
2158 * regex.h (struct re_pattern_buffer): New member target_multibyte.
2160 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
2161 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
2162 that is zero, convert an eight-bit char to multibyte.
2163 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
2165 (PATFETCH): Convert an eight-bit char to multibyte.
2166 (HANDLE_UNIBYTE_RANGE): New macro.
2167 (regex_compile): Setup the compiled pattern for multibyte chars
2168 even if the given regex string is unibyte. Use PATFETCH_RAW
2169 instead of PATFETCH in many places. To handle `charset'
2170 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
2171 only for ASCII chars.
2172 (analyse_first) <exactn>: Simplified because the compiled pattern
2174 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
2175 <charset>: Use CHAR_LEADING_CODE to get leading codes.
2176 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
2178 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
2180 (re_search_2) In emacs, set the locale variable multibyte to 1,
2181 otherwise to 0. New local variable target_multibyte. Check it
2182 to decide the multibyteness of STR1 and STR2. If
2183 target_multibyte is zero, convert unibyte chars to multibyte
2184 before translating and checking fastmap.
2185 (TARGET_CHAR_AND_LENGTH): New macro.
2186 (re_match_2_internal): In emacs, set the locale variable multibyte
2187 to 1, otherwise to 0. New local variable target_multibyte. Check
2188 it to decide the multibyteness of STR1 and STR2. Use
2189 TARGET_CHAR_AND_LENGTH to fetch a character from D.
2190 <charset, charset_not>: If multibyte is nonzero, check fastmap
2191 only for ASCII chars. Call bcmp_translate with
2192 target_multibyte, not with multibyte.
2193 <begline>: Declare the local variable C as `unsigned'.
2194 (bcmp_translate): Change the last arg name to target_multibyte.
2196 * search.c (compile_pattern_1): Don't adjust the multibyteness of
2197 the regexp pattern and the matching target. Set cp->buf.multibyte
2198 to the multibyteness of the regexp pattern. Set
2199 cp->but.target_multibyte to the multibyteness of the matching
2201 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
2202 FETCH_STRING_CHAR_ADVANCE.
2203 (Freplace_match): Convert unibyte chars to multibyte.
2205 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
2206 unibyte chars to multibyte.
2207 (back_comment): Likewise.
2208 (scan_words): Likewise.
2209 (skip_chars): The arg syntaxp is deleted, and the code for
2210 handling syntaxes is moved to skip_syntaxes. Callers changed.
2211 Fix the case that the multibyteness of STRING and the current
2212 buffer doesn't match.
2213 (skip_syntaxes): New function.
2214 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
2216 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
2218 (scan_lists): Likewise.
2219 (Fbackward_prefix_chars): Likewise.
2220 (scan_sexps_forward): Likewise.
2222 2002-08-23 Kenichi Handa <handa@m17n.org>
2224 * xfaces.c (QCfontset): New variable.
2225 (LFACE_FONTSET): New macro.
2226 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
2227 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
2228 (Finternal_set_lisp_face_attribute): Handle QCfontset.
2229 (Finternal_get_lisp_face_attribute): Likewise.
2230 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
2231 check also LFACE_FONTSET_INDEX.
2232 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
2233 attrs[LFACE_FONT_INDEX].
2234 (syms_of_xfaces): Intern and staticpro QCfontset.
2236 * dispextern.h (enum lface_attribute_index): New member
2237 LFACE_FONTSET_INDEX.
2239 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
2241 2002-08-21 Kenichi Handa <handa@m17n.org>
2243 * coding.c (coding_set_destination): Fix coding->destination for
2244 the case converting a region.
2245 (encode_coding_utf_8): Encode eight-bit chars as single byte.
2246 (encode_coding_object): Fix coding->dst_pos and
2247 coding->dst_pos_byte for the case converting a region.
2249 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
2251 * character.h (BYTE8_STRING): New macro.
2253 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
2255 2002-08-20 Kenichi Handa <handa@m17n.org>
2257 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
2258 characters by octal form.
2260 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
2262 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
2263 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
2264 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
2265 (FETCH_CHAR_AS_MULTIBYTE): New macro.
2267 * casetab.c (set_canon, set_identity, shuffle): Simplified.
2269 * casefiddle.c (casify_object): Simplified. Handle the case that
2270 the case conversion change the byte length.
2271 (casify_region): Likewise
2273 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
2276 * character.c (_fetch_multibyte_char_len): This variable deleted.
2277 (syms_of_character): Setup Vprintable_chars.
2279 * editfns.c (Fchar_equal): Fix for the unibyte case.
2280 (Finsert_byte): New function.
2281 (syms_of_editfns): Defsubr it.
2283 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
2284 of direct code 0x3ffff.
2286 * search.c (Freplace_match): Fix for the unibyte case.
2288 2002-08-19 Kenichi Handa <handa@m17n.org>
2290 * lread.c (safe_to_load_p): Fix the logic.
2292 * syntax.c (scan_words): Don't treat characters belonging to
2293 different scripts as constituting a word.
2295 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2297 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
2300 * emacs.c (main): In the case of --unibyte, instead of aborting on
2301 finding non-empty buffer, make it unibyte.
2303 2002-08-18 Kenichi Handa <handa@m17n.org>
2305 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
2306 to create a fontset.
2308 2002-08-18 Dave Love <fx@gnu.org>
2310 * character.c (Funibyte_char_to_multibyte): Doc fix.
2312 * xfns.c [HAVE_STDLIB_H]: Fix last change.
2314 2002-08-15 Kenichi Handa <handa@m17n.org>
2316 * fontset.c (fontset_add): Make the type `int'.
2317 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
2319 * character.c (unibyte_char_to_multibyte): Refer to
2320 charset_unibyte, not charset_primary.
2321 (multibyte_char_to_unibyte): Likewise.
2322 (Funibyte_char_to_multibyte): Likewise.
2324 * charset.h: (charset_unibyte): Extern it instead of
2327 * charset.c (charset_unibyte): Renamed from charset_primary.
2328 (Funibyte_charset): Renamed from Fprimary_charset.
2329 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
2330 (syms_of_charset): Adjusted for the above changes.
2332 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
2333 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
2334 it->multibyte_p is zero.
2336 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
2339 2002-08-08 Kenichi Handa <handa@m17n.org>
2341 * coding.c (Fdefine_coding_system_internal): Fix category setting
2342 for a coding system of type iso-2022.
2344 2002-08-02 Kenichi Handa <handa@m17n.org>
2346 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
2349 2002-08-01 Kenichi Handa <handa@m17n.org>
2351 * syntax.c (Vnext_word_boundary_function_table): New variable.
2352 (syms_of_syntax): Declare it as a Lisp variable.
2353 (scan_words): Call functions in Vnext_word_boundary_function_table
2356 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
2358 * fontset.c (fs_load_font): If fontp->charset is not negative,
2359 return fontp without setting its members.
2361 2002-07-31 Dave Love <fx@gnu.org>
2363 * config.in: Generated with autoheader.
2365 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
2367 * m/sparc.h (HAVE_ALLOCA): Delete.
2369 * s/irix6-5.h: Don't include strings.h.
2370 (bcopy, bzero, bcmp): Don't undef.
2372 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
2374 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
2375 (TIOCSIGSEND): Don't test IRIX6.
2376 (bcopy, bzero, bcmp): Define conditionally.
2378 2002-07-31 Kenichi Handa <handa@m17n.org>
2380 * buffer.c (Qas, Qmake, Qto): New variables.
2381 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
2382 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
2384 * callproc.c (Fcall_process): Don't call insert_1_both directly if
2385 we are inserting a process output into a multibyte buffer.
2387 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
2388 multibyte_char_to_unibyte.
2390 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
2391 by the primary charset, make it eight-bit char.
2392 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
2394 * charset.c: (charset_eight_bit, Qeight_bit_control): New
2396 (charset_8_bit__control, charset_8_bit_graphic,
2397 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
2398 (define_charset_internal): New function.
2399 (syms_of_charset): Call define_charset_internal for pre-defined
2402 * charset.h (charset_8_bit): Extern it.
2404 * coding.c (make_conversion_work_buffer): Adjusted for the change
2405 of Fset_buffer_multibyte.
2406 (encode_coding_raw_text): Increment p0 in the loop.
2408 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
2410 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
2411 for the change of Fset_buffer_multibyte.
2413 * fns.c (Fstring_to_multibyte): New function.
2414 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
2416 2002-07-30 Dave Love <fx@gnu.org>
2418 * xfns.c (x_put_x_image): Declare args.
2420 * xfaces.c (font_name_registry, choose_face_font): Delete unused
2422 (try_font_list): Declare an arg.
2424 * xdisp.c (message2_nolog, set_message): Declare an arg.
2426 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
2428 * syntax.c (scan_sexps_forward): Declare an arg.
2430 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
2433 * lisp.h (Fnew_fontset): Declare.
2435 * keymap.c (push_key_description): Call CHARACTERP correctly.
2437 * fontset.c (fontset_add): Declare args. Call make_number
2439 (face_for_char): Delete unused vars.
2440 (Fset_fontset_font): Doc fix. Delete unused vars.
2442 * doc.c (Fsubstitute_command_keys): Delete unused vars.
2444 * composite.c (update_compositions): Declare arg.
2446 * cm.c (calccost, cmgoto): Declare args.
2448 * charset.c: Remove `emacs' conditional. Doc fixes.
2449 (map_char_table_for_charset): Declare.
2451 * character.c (syms_of_character) <translation-table-vector>: Doc
2454 * ccl.c: Remove `emacs' conditional. Include hash table stuff
2457 2002-07-26 Kenichi Handa <handa@m17n.org>
2459 The following changes are to allow specifying multiple font
2460 patterns for a character range (specified by script or charset).
2462 * Makefile.in (abbrev.o): Depend on syntax.h.
2463 (xfaces.o): Depend on charset.h.
2465 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
2468 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
2470 * character.h (Vchar_script_table): Extern it.
2472 * character.c (Vscript_alist): This variable deleted.
2473 (Vchar_script_table, Qchar_script_table): New variable.
2474 (syms_of_character): Declare Vchar_script_table as a lisp variable
2477 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
2478 have property char-table-extra-slots, make no extra slot.
2480 * dispextern.h (struct face): Member `charset' deleted.
2481 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
2483 (FACE_FOR_CHAR): Likewise.
2484 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
2486 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
2488 (generate_ascii_font_name): Renamed from generate_ascii_font.
2490 * fontset.h (get_font_repertory_func): New prototype.
2491 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
2492 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
2494 * fontset.c (Qprepend, Qappend): New variables.
2495 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
2496 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
2497 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
2498 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
2499 (fontset_ref_and_range, fontset_add, reorder_font_vector)
2500 (load_font_get_repertory): New functions.
2501 (fontset_set): This function deleted.
2502 (fontset_face): New arg FACE. Return face ID, not face.
2503 Completely re-written to handle new fontset structure. Caller
2505 (free_face_fontset): Use ASET istead of AREF (X) = Y.
2506 (face_for_char): Don't call lookup_face.
2507 (make_fontset_for_ascii_face): New arg FACE.
2508 (fs_load_font): New arg CHARSET_ID. Don't check
2509 Vfont_encoding_alist here.
2510 (find_font_encoding): New function.
2511 (list_fontsets): Use STRINGP, not ! NILP.
2512 (accumulate_script_ranges): New function.
2513 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
2514 re-written to handle new fontset structure.
2515 (Ffontset_font): Return a copy of element.
2516 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
2517 docstring of font-encoding-alist.
2519 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
2520 (Fset_fotset_font): Fix arguments to 5.
2522 * msdos.c (XMenuActivate): Adjuted for the change of
2523 lookup_derived_face.
2525 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
2526 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2527 (highlight_trailing_whitespace): Adjusted for the change of
2530 * xfaces.c: Include charset.h.
2531 (load_face_font): Argument C deleted. Caller changed.
2532 (generate_ascii_font_name): Renamed from generate_ascii_font.
2533 (font_name_registry): New function.
2534 (cache_face): Store ascii faces before non-ascii faces in buckets.
2535 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
2536 Lookup only ascii faces.
2537 (lookup_non_ascii_face): New function.
2538 (lookup_named_face): Argument C deleted. Caller changed.
2539 (lookup_derived_face): Argument C deleted. Caller changed.
2540 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
2541 a string, just call font_list with it.
2542 (choose_face_font): Arguments FACE and C deleted. New arg
2543 FONT_SPEC. Caller changed.
2544 (realize_face): Arguments C and BASE_FACE deleted. Caller
2545 (realize_x_face): Likewise.
2546 (realize_non_ascii_face): New function.
2547 (realize_x_face): Call load_face_font here.
2548 (realize_tty_face): Argument C deleted. Caller changed.
2549 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
2551 (dump_realized_face): Don't print charset of FACE.
2553 * xfns.c (x_set_font): Always call x_new_fontset and
2554 store_frame_parameter.
2555 (Fx_create_frame): Call x_new_fontset, not x_new_font.
2556 (syms_of_xfns): Set get_font_repertory_func to
2557 x_get_font_repertory.
2559 * xterm.h (x_get_font_repertory): Extern it.
2561 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
2562 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
2563 it->multibyte_p is zero.
2564 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2565 (x_new_fontset): If FONTSETNAME doesn't match any existing
2566 fontsets, create a new one.
2567 (x_get_font_repertory): New function.
2569 2002-07-25 Kenichi Handa <handa@m17n.org>
2571 * coding.c (Ffind_coding_systems_region_internal): Detect an
2572 ASCII only string correctly.
2574 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
2577 2002-07-24 Kenichi Handa <handa@m17n.org>
2579 * lread.c: Include "coding.h".
2580 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
2581 load_each_byte, unread_char): New variables.
2582 (readchar_backlog): This variable deleted.
2583 (readchar): Return a character unless load_each_byte is nonzero.
2584 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
2585 cons. If unread_char is not -1, simply return it.
2586 (unreadchar): Handle the case that readcharfun is
2587 Qget_emacs_mule_file_char or a cons. Set unread_char if
2589 (read_multibyte): This function deleted.
2590 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
2591 (read_emacs_mule_char): New functions.
2592 (Fload): Even if the file doesn't have the extention ".elc", if
2593 safe_to_load_p returns a positive version number, assume that the
2594 file contains bytecompiled code. If the version is less than 22,
2595 load the file while decoding multibyte sequences by emacs-mule.
2596 (readevalloop): Don't use readchar_backlog.
2597 (Fread): Likewise. Pay attention to the case that STREAM is a
2599 (Fread_from_string): Pay attention to the case that STREAM is a
2601 (read_escape): The arg BYTEREP deleted.
2602 (read1): Set load_each_byte to 1 temporarily while handling
2603 #@NUMBER. Don't call read_multibyte.
2604 (read_vector): Call Fread with a cons. If readcharfun is
2605 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
2606 (read_list): If doc_reference is 2, make the cdr part string as
2608 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
2609 and Qload_force_doc_strings.
2611 2002-07-23 Kenichi Handa <handa@m17n.org>
2613 * xdisp.c (face_before_or_after_it_pos): Call
2614 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
2616 2002-07-22 Kenichi Handa <handa@m17n.org>
2618 * character.h (TRAILING_CODE_P): New macro.
2619 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
2620 (string_char_with_unification): Fix prototype.
2621 (Vscript_alist): Extern it.
2623 * character.c (Vscript_alist): New variable.
2624 (string_char_with_unification): Add `const' to local variables.
2625 (str_as_unibyte): Likewise.
2626 (string_escape_byte8): Likewise.
2627 (syms_of_character): Declare script-alist as a Lisp variable.
2629 * charset.h (Vcharset_ordered_list): Extern it.
2630 (charset_ordered_list_tick): Extern it.
2631 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
2632 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
2633 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
2634 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
2635 (Funify_charset): Adjusted for the change of Funify_charset.
2637 * charset.c (charset_ordered_list_tick): New variable.
2638 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
2639 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
2640 deunify intead of unify a charset.
2641 (string_xstring_p): Add `const' to local variables.
2642 (find_charsets_in_text): Add `const' to arguemnts and local
2644 (encode_char): Adjusted for the change of Funify_charset. Fix
2645 detecting of invalid code.
2646 (Fset_charset_priority): Increment charset_ordered_list_tick.
2647 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
2650 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
2651 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
2652 deleted. Callers changed to use
2653 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
2654 (decode_coding_ccl): Add `const' to local variables.
2655 (consume_chars): Likewise.
2656 (Ffind_coding_systems_region_internal): Likewise.
2657 (Fcheck_coding_systems_region): Likewise.
2659 * print.c (print_object): Use octal form for printing the
2660 contents of a bool vector.
2662 2002-07-18 Dave Love <fx@gnu.org>
2664 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
2665 <version == 20>: Refuse to load.
2667 2002-07-17 Dave Love <fx@gnu.org>
2669 * fns.c: Move coding.h.
2670 (Qcodeset, Qdays, Qmonths): New.
2671 (concat): Use CHARACTERP instead of INTERGERP.
2672 (Flocale_codeset): Deleted.
2673 (Flanginfo): New function.
2674 (syms_of_fns): Changed accordingly.
2676 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
2678 2002-07-16 Dave Love <fx@gnu.org>
2680 * casetab.c (init_casetab_once, init_casetab_once): Fix
2681 CHAR_TABLE_SET call.
2683 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
2685 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
2687 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
2688 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
2689 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
2691 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
2693 * coding.c (ENCODE_DESIGNATION, decode_eol)
2694 (make_conversion_work_buffer, code_conversion_restore)
2695 (Fdefine_coding_system_internal): Convert Lisp types.
2696 (code_conversion_restore): Use EQ, not ==.
2697 (Fencode_coding_string): Fix code_convert_string call.
2699 * coding.h (code_convert_region): Fix prototype.
2701 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
2703 * fontset.c (fontset_ref, fontset_set, fs_load_font)
2704 (Ffontset_info): Convert Lisp types.
2706 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
2708 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
2710 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
2712 * chartab.c: Include "...h", not <...h> in some cases.
2714 * callproc.c (Fcall_process): Remove unused variables.
2716 2002-07-12 Dave Love <fx@gnu.org>
2718 * coding.c (Fset_coding_system_priority): Allow null arg list.
2720 2002-07-03 Dave Love <fx@gnu.org>
2722 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
2723 (Fself_insert_and_exit): Use CHARACTERP.
2725 * callproc.c (Fcall_process): Remove unused vars.
2727 * xterm.c (XTread_socket): Add extra dead keysyms.
2729 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
2731 * dispextern.h: Remove prototypes for redraw_frame,
2732 redraw_garbaged_frames.
2734 * cmds.c (Fself_insert_command): Use CHARACTERP.
2736 * chartab.c (make_sub_char_table): Remove unused var.
2737 (Fset_char_table_default, Fmap_char_table): Doc fix.
2739 * keymap.c (access_keymap): Remove generic char code.
2740 (push_key_description): Use CHARACTERP.
2742 2002-07-01 Dave Love <fx@gnu.org>
2744 * charset.c: Doc fixes.
2745 (Funify_charset): Extra checking.
2747 2002-06-24 Dave Love <fx@gnu.org>
2749 * lread.c: Remove some unused variables.
2750 (safe_to_load_p): If safe, return the magic number version byte.
2751 (Fload): Maybe use load-with-code-conversion.
2753 2002-06-12 Kenichi Handa <handa@m17n.org>
2755 * category.c (Fmodify_category_entry): Don't modify the contents
2756 of category_set for characters out of the range. Avoid
2757 unnecessary modification.
2759 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
2760 Vchar_unify_table. The default value of the table is now nil.
2762 * character.c (syms_of_character): Setup Vchar_width_table for
2763 eight-bit-control and raw-byte chars.
2765 * charset.h (enum define_charset_arg_index): Delete
2766 charset_arg_parents and add charset_arg_subset and
2767 charset_arg_superset.
2768 (enum charset_attr_index): Delete charset_parents and add
2769 charset_subset and charset_superset.
2770 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
2771 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
2772 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
2773 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
2774 (CHARSET_SUPERSET): New macros.
2775 (charset_work): Extern it.
2776 (ENCODE_CHAR): Use charset_work.
2777 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
2778 (map_charset_chars): Extern it.
2780 * charset.c (load_charset_map): Set the default value of encoder
2781 and deunifier char-tables to nil.
2782 (map_charset_chars): Argument changed. Callers changed. Use
2783 map_char_table_for_charset instead of map_char_table.
2784 (Fmap_charset_chars): New optional args from_code and to_code.
2785 (Fdefine_charset_internal): Adjusted for the change of
2786 `define-charset' (:parents -> :subset or :superset).
2787 (charset_work): New variable.
2788 (encode_char): Adjusted for the change of
2789 Fdefine_charset_internal.
2790 (syms_of_charset): Likewise.
2791 (Ffind_charset_string): Setup the vector `charsets' correctly.
2793 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
2794 the previous change.
2795 (char_table_ref_and_range): Adjusted for the above change.
2796 (map_sub_char_table_for_charset): New function.
2797 (map_char_table_for_charset): New function.
2799 * keymap.c (describe_vector): Handle a char-table directly here.
2800 (describe_char_table): Deleted.
2802 * lisp.h (map_charset_chars): Deleted.
2804 2002-06-11 Dave Love <fx@gnu.org>
2806 * fns.c (count_combining): Comment out (unused).
2807 (Flocale_codeset): New.
2808 (syms_of_fns): Defsubr it.
2810 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
2813 2002-06-06 Dave Love <fx@gnu.org>
2815 * Makefile.in (chartab.o): Depend on charset.h
2817 2002-06-03 Kenichi Handa <handa@m17n.org>
2819 * character.c (syms_of_character): Set the default value of
2820 Vprintable_chars to Qnil.
2822 2002-05-31 Dave Love <fx@gnu.org>
2824 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
2826 2002-05-31 Kenichi Handa <handa@m17n.org>
2828 * charset.c (load_charset_map): Handle the case that from < to
2831 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
2833 (encode_coding_iso_2022): Likewise.
2834 (encode_coding_sjis): Likewise.
2835 (encode_coding_big5): Likewise.
2836 (encode_coding_charset): Likewise.
2838 2002-05-30 Kenichi Handa <handa@m17n.org>
2840 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
2841 not bytecompiled now.
2842 (shortlisp): Likewise.
2844 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
2845 (charset_jisx0208): New variables.
2846 (Fdefine_charset_internal): Setup them if appropriate.
2847 (init_charset_once): Initialize them to -1.
2849 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
2850 charset_jisx0208): Extern them.
2852 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
2853 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
2854 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
2855 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
2856 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
2857 and CODING_ISO_FLAG_USE_OLDJIS.
2858 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
2859 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
2860 (encode_coding_iso_2022): Change the 1st arg to
2861 ENCODE_ISO_CHARACTER to a variable.
2863 2002-05-29 Kenichi Handa <handa@m17n.org>
2865 * charset.h (enum define_charset_arg_index): New enums
2866 charset_arg_min_code and charset_arg_max_code.
2867 (struct charset): New member char_index_offset.
2869 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
2871 (INDEX_TO_CODE_POINT): Likewise.
2872 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
2873 args[charset_arg_max_code]. Setup charset.char_index_offset.
2874 (syms_of_charset): Fix args to Fdefine_charset_internal.
2876 2002-05-27 Dave Love <fx@gnu.org>
2878 * coding.c (decode_coding_utf_8): Reject overlong sequences.
2880 2002-05-26 Dave Love <fx@gnu.org>
2882 * coding.c: Doc fixes.
2883 (Fcoding_system_aliases): Fix return value.
2884 (Qmac): Remove (duplicated) definition.
2886 2002-05-25 Dave Love <fx@gnu.org>
2888 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
2891 * character.c (Fstring): Doc fix.
2893 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
2895 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
2897 (font-encoding-alist): Doc fix.
2899 2002-05-24 Dave Love <fx@gnu.org>
2901 * term.c (costs_set): Declare static, non-initialized for pcc.
2902 (encode_terminal_code): Remove ensued var.
2904 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
2907 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
2909 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
2910 (suffixes): Moved out of make_subsidiaries for K&R.
2912 * charset.c (map_charset_chars): Fix c_function declaration for
2915 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
2917 2002-05-23 Dave Love <fx@gnu.org>
2919 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
2921 * category.c (Fmodify_category_entry): Doc fix. Remove unused
2924 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
2926 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
2928 * coding.c (Fdefine_coding_system_internal): Fix previous change.
2929 (decode_coding_charset): Workaround for the bug of GCC 2.96.
2931 2002-05-23 Kenichi Handa <handa@m17n.org>
2933 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
2934 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
2935 (shortlisp): Likewise.
2937 2002-05-22 Kenichi Handa <handa@m17n.org>
2939 * coding.c (decode_coding_charset): Adjusted for the change of
2940 Fdefine_coding_system_internal.
2941 (Fdefine_coding_system_internal): For a coding system of
2942 `charset' type, store a list of charset IDs in
2943 `charset_attr_charset_valids' element of coding attributes.
2945 * charset.c (Fmake_char): Fix previous change.
2947 2002-05-21 Kenichi Handa <handa@m17n.org>
2949 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
2950 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
2951 changed. Handle 2-byte and 3-byte charsets correctly.
2952 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
2953 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
2954 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
2955 (DECODE_EMACS_MULE_21_COMPOSITION): Call
2956 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
2958 (decode_coding_emacs_mule): Handle composition correctly. Rewind
2959 `src' and `consumed_chars' correctly before calling
2961 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
2962 and alt&rule composition.
2963 (decode_coding_iso_2022): Handle composition correctly.
2964 (init_coding_once): Setup emacs_mule_bytes for private charsets.
2966 * charset.c (Fdefine_charset_internal): Fix bug for the case of
2967 re-defining a charset. If the charset has :emacs-mule-id, setup
2969 (Fmake_char): If CODE1 is nil, use the minimum code of the
2972 2002-05-20 Kenichi Handa <handa@m17n.org>
2974 * coding.c (encode_coding_iso_2022): If coding requires safe
2975 encoding, produce a character specified by
2976 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
2977 (encode_coding_sjis): Likewise.
2978 (encode_coding_big5): Likewise.
2979 (encode_coding_charset): Likewise.
2981 2002-05-17 Dave Love <fx@gnu.org>
2983 * xterm.c (XSetIMValues): Declare.
2985 * process.c: Conditionally include sys/wait.h, pty.h.
2987 * print.c (print_object): Fix print format for 64-bit
2990 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
2993 * buffer.c (emacs_strerror): Declare.
2994 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
2997 * fontset.c (Fclear_face_cache): Declare.
2998 (accumulate_font_info): Commented-out (unused).
2999 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
3002 * character.h (string_escape_byte8): Declare.
3004 * charset.c (load_charset_map, load_charset_map_from_file): Remove
3006 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
3007 (Fmap_charset_chars): Doc fix.
3009 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
3011 (Fset_coding_system_priority, Fset_coding_system_priority)
3012 (Fdefine_coding_system_internal): Doc fix.
3014 2002-05-16 Dave Love <fx@gnu.org>
3016 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
3018 2002-05-16 Kenichi Handa <handa@m17n.org>
3020 * character.c (string_escape_byte8): Make multibyte string with
3023 * charset.c (Fmake_char): Delete unnecessary code.
3025 2002-05-14 Kenichi Handa <handa@m17n.org>
3027 * xfns.c (x_encode_text): Allocate coding.destination here, and
3028 call encode_coding_object with dst_object Qnil.
3030 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
3031 multibyte form correctly.
3033 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
3034 against Vfont_encoding_alist.
3036 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
3037 handling of charset list.
3038 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
3039 (decode_coding_object): Move point to coding->dst_pos before
3040 calling post-read-conversion function.
3041 (encode_coding_object): Give correct arguments to
3042 pre-write-conversion. Ignore the return value of
3043 pre-write-conversion function. Pay attention to the case that
3044 pre-write-conversion changes the current buffer. If dst_object is
3045 Qt, even if coding->src_bytes is zero, allocate at least one byte
3046 to coding->destination.
3048 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
3050 * charset.c (Fmake_char): Make it more backward compatible.
3051 (Fmap_charset_chars): Fix docstring.
3053 2002-05-13 Dave Love <fx@gnu.org>
3055 * coding.c: Doc fixes.
3056 (Fdefine_coding_system_alias): Use names, not symbols, in
3057 coding-system-alist.
3059 2002-05-13 Kenichi Handa <handa@m17n.org>
3061 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
3062 of calling free_realized_face.
3064 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
3066 * charset.c (load_charset_map): Fix previous change.
3067 (read_hex): Don't treat SPC as a comment starter.
3068 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
3070 (Fdecode_char): Fix typo.
3072 2002-05-10 Kenichi Handa <handa@m17n.org>
3074 * charset.h (struct charset): New member `code_space_mask'.
3076 * coding.c (coding_set_source): Delete the local variable
3078 (encode_coding_charset): Delete the local variable charset.
3079 (Fdefine_coding_system_internal): Likewise.
3080 (Fdefine_coding_system_internal): Setup
3081 attrs[coding_attr_charset_valids] correctly.
3083 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
3084 member to check if CODE is valid or not.
3085 (Fdefine_charset_internal): Initialize `code_space_mask' member.
3086 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
3087 is within the range of charset->min_code and carset->max_code.
3089 2002-05-09 Dave Love <fx@gnu.org>
3091 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
3093 * dispextern.h (generate_ascii_font): Fix return type.
3095 * xfaces.c (generate_ascii_font): Fix arg declaration.
3097 * coding.c (coding_inherit_eol_type)
3098 (Fset_terminal_coding_system_internal)
3099 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
3101 2002-05-08 Kenichi Handa <handa@m17n.org>
3103 * coding.c (decode_coding_charset, encode_coding_charset): Handle
3104 multiple charsets correctly.
3106 2002-05-07 Kenichi Handa <handa@m17n.org>
3108 * search.c (boyer_moore): Fix handling of mulitbyte character
3111 * xdisp.c (display_mode_element): When the variable `elt' is
3112 changed, update `this' and `lisp_string'.
3114 2002-05-07 Kenichi Handa <handa@m17n.org>
3116 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
3118 * callproc.c (Fcall_process): Be sure to give the current buffer
3119 to decode_coding_c_string. Update PT and PT_BYTE after the
3122 * charset.c (struct charset_map_entries): New struct.
3123 (load_charset_map): Renamed from parse_charset_map. New args
3124 entries and n_entries. Caller changed.
3125 (load_charset_map_from_file): Renamed from load_charset_map.
3126 Caller changed. New arg control_flag. Call load_charset_map at
3128 (load_charset_map_from_vector): New function.
3129 (Fdefine_charset_internal): Setup charset.compact_codes_p.
3130 (encode_char): If the charset is compact, change a character index
3133 * coding.c (coding_alloc_by_making_gap): Check the case that the
3134 source and destination are the same correctly.
3135 (decode_coding_raw_text): Set coding->consumed_char and
3136 coding->consumed to 0.
3137 (produce_chars): If coding->chars_at_source is nonzero, update
3138 coding->consumed_char and coding->consumed before calling
3140 (Fdefine_coding_system_alias): Register ALIAS in
3141 Vcoding_system_alist.
3142 (syms_of_coding): Define `no-convesion' coding system at the tail.
3144 * fileio.c (Finsert_file_contents): Set coding_system instead of
3145 val. If the current buffer is multibyte, always call
3148 * xfaces.c (try_font_list): Give higher priority to fontset's
3149 family than face's family.
3151 2002-04-18 Kenichi Handa <handa@m17n.org>
3153 * callproc.c (Fcall_process): Be sure to give the current buffer
3154 to decode_coding_c_string.
3156 * xfaces.c (try_font_list): Give a family specified in a fontset
3157 higher priority than a family specified in a face.
3159 2002-04-09 Kenichi Handa <handa@m17n.org>
3161 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
3162 Fix arguments to insert_from_buffer.
3164 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
3166 2002-03-11 Kenichi Handa <handa@m17n.org>
3168 * coding.c (produce_chars): Set the variable `multibytep' correctly.
3169 (decode_coding_gap): Set coding->dst_multibyte correctly.
3171 2002-03-07 Kenichi Handa <handa@m17n.org>
3173 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
3174 (decode_coding_utf_16): Fix converting high and low bytes to
3176 (encode_coding_utf_16): Substitute coding->default_char for
3177 non-Unicode characters.
3178 (decode_coding): Don't call record_insert here.
3179 (setup_coding_system): Initialize `surrogate' of
3180 coding->spec.utf_16 to 0.
3181 (EMIT_ONE_BYTE): Fix for multibyte case.
3183 * insdel.c (insert_from_gap): Call record_insert.
3185 2002-03-04 Kenichi Handa <handa@m17n.org>
3187 * casefiddle.c (casify_region): Fix multibyte case.
3189 * character.c (c_string_width): Add return type `int'.
3190 (char_string_with_unification): Arg ADVANCED deleted.
3192 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
3193 (CHAR_STRING): Adjusted for the change of
3194 char_string_with_unification.
3195 (CHAR_STRING_ADVANCE): Make it do-while statement.
3197 * chartab.c (sub_char_table_set_range): Optimized for the case
3198 DEPTH == 3. Add workaround code for a GCC optimization bug.
3200 * charset.c (parse_charset_map): Remove an unused variable.
3202 * coding.c: Delete unused variables.
3204 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
3205 earlier. If inserted is zero and the coding system doesn't
3206 require flushing, don't call decode_coding_gap.
3208 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
3210 2002-03-01 Kenichi Handa <handa@m17n.org>
3212 The following changes are for using Unicode as an internal
3213 character model, and use UTF-8 format for buffer/string
3216 * .gdbinit (xchartable): Adjusted for the change of char table
3218 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
3220 * Makefile.in (obj): Add character.o and chartab.o.
3221 (lisp, shortlisp): Remove utf-8.elc:
3222 (*.o): For many files, change dependency on charset.h to
3223 character.h, and add dependency on character.h.
3224 (character.o, chartab.o): New targets.
3226 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
3227 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
3228 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
3231 * dired.c, filelock.c: Include "character.h".
3233 * alloc.c: Include "character.h" instead of "charset.h".
3234 (Fmake_char_table): Moved to chartab.c.
3235 (make_sub_char_table): Likewise.
3236 (syms_of_alloc): Remove defsubr for Smake_char_table.
3238 * buffer.c: Include "character.h" instead of "charset.h", don't
3240 (Fset_buffer_multibyte): Adjuted for UTF-8.
3242 * buffer.h: EXFUN Fbuffer_live_p.
3244 * callproc.c: Include "character.h" instead of "charset.h".
3245 (Fcall_process): Big change for the new code-conversion APIs.
3247 * casetab.c: Include "character.h" instead of "charset.h".
3248 (set_canon, set_identity, shuffle): Adjusted for the new
3249 map_char_table spec.
3250 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
3251 accessing the char table structure.
3253 * chartab.c: New file that implements char table.
3255 * category.c: Include "character.h".
3256 (copy_category_entry): New function.
3257 (copy_category_table): Call map_char_table and copy_category_entry.
3258 (Fmake_category_table): Initialize all top-vel slots.
3259 (char_category_set): New function.
3260 (modify_lower_category_set): Deleted.
3261 (Fmodify_category_entry): Call char_table_ref_and_range.
3263 * category.h (CATEGORY_SET): Just call char_category_set.
3265 * ccl.c: Include "character.h".
3266 (Qccl, Qcclp): New variables.
3267 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
3269 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
3270 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
3272 (ccl_driver): Types of arguments changed. Code adjusted for that.
3273 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
3275 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
3277 * ccl.h (struct ccl_program): Members eol_type and multibyte
3278 deleted. New members src_multibyte, dst_multibyte, consumed, and
3280 (struct ccl_spec): Members decoder and encoder deleted. New
3282 (CODING_SPEC_CCL_PROGRAM): New macro.
3283 (ccl_driver): Prototype updated.
3284 (Qccl, Qcclp, Fccl_program_p): Extern them.
3285 (CHECK_CCL_PROGRAM): New macro.
3287 * character.c, character.h, chartab.c: New files.
3289 * charset.c: Mostly re-written. Character and multibyte sequence
3290 handling codes are moved to character.c.
3292 * charset.h: Mostly re-written. Character and multibyte sequence
3293 handling codes are moved to character.h.
3295 * coding.c, coding.h: Mostly re-written.
3297 * composite.c: Include "character.h" instead of "charset.h".
3298 (CHAR_WIDTH): Moved to character.h.
3299 (HASH_KEY, HASH_VALUE): Deleted.
3301 * composite.h (enum composition_method): Order of enumeration
3304 * data.c: Include "character.h" instead of "charset.h".
3305 (Faref): Call CHAR_TABLE_REF for a char table.
3306 (Faset): Call CHAR_TABLE_SET for a char table.
3308 * dispextern.h (free_realized_face, check_face_attribytes,
3309 generate_ascii_font): Extern them.
3310 (free_realized_multibyte_face): Extern deleted.
3312 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
3315 * editfns.c: Include "character.h" instead of "charset.h".
3316 (Fchar_to_string): Always call CHAR_STRING.
3318 * emacs.c (main): Call init_charset_once, init_charset,
3319 syms_of_chartab, and syms_of_character.
3321 * fileio.c: Include "character.h" instead of "charset.h".
3322 (Finsert_file_contents): Big change for the new code-conversion
3324 (choose_write_coding_system): Likewise.
3325 (Fwrite_region): Likewise.
3326 (build_annotations_2): Deleted.
3327 (e_write): Big change for the new code-conversion API.
3329 * fns.c: Include "character.h" instead of "charset.h".
3330 (copy_sub_char_table): Moved to chartab.c.
3331 (Fcopy_sequence): Call copy_char_table for a char table.
3332 (concat): Delete codes calling count_multibyte.
3333 (string_char_to_byte): Adjusted for the new multibyte form.
3334 (string_byte_to_char): Likewise.
3335 (internal_equal): Adjusted for the change of char table structure.
3336 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
3337 Fchar_table_extra_slot, Fset_char_table_extra_slot,
3338 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
3339 char_table_translate, optimize_sub_char_table,
3340 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
3342 (char_table_ref_and_index): Deleted.
3343 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
3344 (Fmd5): Call preferred_coding_system instead of accessing
3345 Vcoding_category_list. Adjusted for the new code-conversion API.
3346 (syms_of_fns): Defsubr for char table related functions moved to
3349 * fontset.c: Mostly re-written.
3351 * fontset.h (struct font_info): Type of the member encoding_type
3353 (enum FONT_SPEC_INDEX): New enum.
3354 (fontset_font_pattern, fs_load_font): Prototype updated.
3355 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
3357 * indent.c: Include "character.h" instead of "charset.h".
3358 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
3361 * insdel.c: Include "character.h" instead of "charset.h".
3362 (copy_text): Don't refer to Vnonascii_translation_table.
3363 (insert_from_gap): New function.
3365 * keyboard.c: Include "character.h" instead of "charset.h".
3366 (command_loop_1): Never call direct_output_forward_char before
3367 a non-ASCII character.
3368 (read_char): If Vkeyboard_translate_table is a char table, always
3369 translated a character.
3371 * keymap.c: Include "character.h".
3372 (store_in_keymap): Handle the case that IDX is a cons.
3373 (Fdefine_key): Handle the case that KEY is a cons and the car part
3374 is also a cons (range).
3375 (push_key_description): Adjusted for the new character code.
3376 (describe_vector): Call describe_char_table for a char table.
3377 (describe_char_table): New function.
3379 * keymap.h (describe_char_table): Extern it.
3381 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
3382 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
3383 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
3384 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
3386 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
3388 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
3389 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
3390 CHARTAB_SIZE_BITS_3): New macros.
3391 (chartab_size): Extern it.
3392 (struct Lisp_Char_Table): Re-designed.
3393 (struct Lisp_Sub_Char_Table): New structure.
3394 (HASH_KEY, HASH_VALUE): Moved from fns.c.
3395 (CHARACTERBITS): Defined as 22.
3396 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
3397 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
3398 (GC_SUB_CHAR_TABLE_P): New macro.
3399 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
3400 (code_convert_string_norecord): Extern deleted.
3401 (init_character_once, syms_of_character, init_charset,
3402 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
3404 * lread.c: Include "character.h".
3405 (read_multibyte): New arg NBYTES.
3406 (read_escape): The meaning of returned *BYTEREP changed.
3407 (to_multibyte): Deleted.
3408 (read1): Adjuted the handling of char table and string.
3410 * print.c: Include "character.h" instead of "charset.h".
3411 (print_string): Convert 8-bit raw bytes to octal form by
3412 string_escape_byte8.
3413 (print_object): Adjusted for the new multibyte form. Print 8-bit
3414 raw bytes always in octal form. Handle sub char table correctly.
3416 * process.c: Include "character.h" instead of "charset.h".
3417 (read_process_output): Adjusted for the new code-conversion API.
3418 (send_process): Likewise.
3420 * puresize.h (BASE_PURESIZE): Increased.
3422 * regex.c: Include "character.h" instead of "charset.h".
3423 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
3424 (regex_compile): Accept a range whose starting and ending
3425 character have different leading bytes.
3426 (analyse_first): Adjusted for the above change.
3428 * search.c: Include "character.h" instead of "charset.h".
3429 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
3430 (Freplace_match): Adjusted for the change of
3431 multibyte_char_to_unibyte.
3433 * syntax.c: Include "character.h" instead of "charset.h".
3434 (syntax_parent_lookup): Deleted.
3435 (Fmodify_syntax_entry): Accept a cons as CHAR.
3436 (skip_chars): Adjusted for the new multibyte form.
3437 (init_syntax_once): Call char_table_set_range instead of directly
3438 accessing the structure of a char table.
3440 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
3441 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
3442 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
3443 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
3445 * term.c: Include "buffer.h" and "character.h".
3446 (encode_terminal_code): Adjusted for the new code-conversion API.
3447 (write_glyphs): Likewise.
3448 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
3450 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
3452 * xdisp.c: Include "character.h".
3453 (get_next_display_element): Adjusted for the new multibyte form.
3454 (disp_char_vector): Adjusted for the new char table structure.
3455 (decode_mode_spec_coding): Adjusted for the new structure of
3457 (decode_mode_spec): Adjusted for the new code-conversion API.
3459 * xfaces.c: Include "character.h" instead of "charset.h".
3460 (load_face_font): Adjusted for the change of choose_face_font and
3462 (generate_ascii_font): New function.
3463 (set_lface_from_font_name): Adjusted for the change of
3465 (set_font_frame_param): Adjusted for the change of
3467 (free_realized_face): Make it public.
3468 (free_realized_faces_for_fontset): Renamed from
3469 free_realized_multibyte_face. Free also faces realized for ASCII.
3470 (choose_face_font): Argments changed. Adjusted for the change of
3471 fontset_font_pattern and FS_LOAD_FONT.
3473 * xfns.c: Include "character.h".
3474 (x_encode_text): Adjusted for the new code-conversion API.
3476 * xselect.c: Don't include "charset.h".
3477 (selection_data_to_lisp_data): Adjusted for the new code
3480 * xterm.c: Include "character.h".
3481 (x_encode_char): New argument CHARSET. Caller changed.
3482 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
3484 (x_get_glyph_face_and_encoding): Likewise.
3485 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
3486 CHAR_WIDTH instead of CHARSET_WIDTH.
3487 (XTread_socket): Adjusted for the new code-conversion API.
3488 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
3489 (x_load_font): Adjusted for the change of struct font.
3492 ;; coding: iso-2022-7bit
3495 Copyright (C) 2002 Free Software Foundation, Inc.
3496 Copying and distribution of this file, with or without modification,
3497 are permitted provided the copyright notice and this notice are preserved.
3499 ;;; arch-tag: 1bff38bd-2030-46ae-9d18-f15e6006b665