Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-7
[bpt/emacs.git] / src / ChangeLog.unicode
1 2006-01-19 Kenichi Handa <handa@m17n.org>
2
3 * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
4
5 * coding.c: Sync to HEAD for handling autoload-coding-system.
6 (Qcoding_system_define_form): New variable.
7 (syms_of_coding): Intern and staticpro it.
8 (Fcoding_system_p): Check Qcoding_system_define_form.
9 (Fcheck_coding_system): Try to autoload the definition of
10 CODING-SYSTEM.
11
12 * coding.h (CODING_SYSTEM_P): If ID is not available, call
13 Fcoding_system_p.
14 (CHECK_CODING_SYSTEM): If ID is not available, call
15 Fcheck_coding_system.
16 (CHECK_CODING_SYSTEM_GET_SPEC): Try also Fcheck_coding_system.
17 (CHECK_CODING_SYSTEM_GET_ID): Likewise.
18
19 2006-01-17 Kenichi Handa <handa@m17n.org>
20
21 * xterm.c (handle_one_xevent): Delete unnecessary code inserted by
22 sync with HEAD.
23
24 * coding.c (code_conversion_restore): GCPRO arg.
25
26 2005-12-28 Kenichi Handa <handa@m17n.org>
27
28 * character.c (lisp_string_width): Check multibyteness of STRING.
29
30 2005-10-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
31
32 * macterm.c (mac_encode_char): Call ccl_driver with the last arg
33 Qnil. Use JIS_TO_SJIS instead of ENCODE_SJIS.
34 (decode_mac_font_name): Use decode_coding_c_string instead of
35 decode_coding.
36 (x_load_font): Initialize fontp->fontset to -1. Set
37 fontp->encoding_type.
38
39 2005-10-17 Kenichi Handa <handa@m17n.org>
40
41 * search.c (search_buffer): Give up BM search on case-fold-search
42 if one of a target character has a case-equivalence of different
43 byte length even if that target charcter is an ASCII.
44 (simple_search): Fix culculation of byte length of matched text.
45 (boyer_moore): Fix handling of case-equivalent multibyte
46 characters.
47
48 2005-10-15 Kenichi Handa <handa@m17n.org>
49
50 * coding.c (decode_coding): Fix handling of invalid bytes.
51
52 2005-10-06 Kenichi Handa <handa@m17n.org>
53
54 * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
55 Unicode characters.
56
57 2005-09-23 Kenichi Handa <handa@m17n.org>
58
59 * coding.c (encode_coding_object): If a pre-write-conversion
60 function makes a new buffer, kill it.
61
62 2005-07-29 Kenichi Handa <handa@m17n.org>
63
64 * coding.c (QCascii_compatible_p): New variable.
65 (syms_of_coding): Initialize it.
66 (ONE_MORE_BYTE): Decrement `src' before calling string_char.
67 (ONE_MORE_BYTE_NO_CHECK): Likewise.
68 (record_conversion_result): Add `default:' case.
69 (coding_charset_list): Delete unused variable `coding_type'.
70 (Fdefine_coding_system_internal): Add `ascii-compatible-p'
71 property in the plist of the coding system.
72 (Fcoding_system_put): Check QCascii_compatible_p.
73
74 2005-06-09 Kenichi Handa <handa@m17n.org>
75
76 * xdisp.c (get_next_display_element): Sync with the change in
77 HEAD (2005-06-08).
78
79 2005-06-06 Kenichi Handa <handa@m17n.org>
80
81 * callproc.c (Fcall_process): Sync with the change in
82 HEAD (2005-06-04).
83
84 2005-06-05 Miles Bader <miles@gnu.org>
85
86 * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
87 removed calculation of frame `f', as it's now used.
88
89 2005-05-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
90
91 * macterm.c (x_font_name_to_mac_font_name): Sync with trunk
92 for the case that does not require code conversion.
93
94 2005-05-11 Kenichi Handa <handa@m17n.org>
95
96 * Makefile.in (shortlisp): Cancel previous change.
97 (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
98 (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
99 (UNIDATA): New variable.
100 (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
101 (bootstrap-emacs${EXEEXT}): Depends on charprop.el. Run
102 $(RUN_TEMACS) unconditionally.
103
104 2005-05-10 Kenichi Handa <handa@m17n.org>
105
106 * Makefile.in (shortlisp): Add ../lisp/international/charprop.el.
107 (temacs${EXEEXT}): Build charprop.el if necessary.
108 (admindir): New variable.
109 ($(lispsource)international/charprop.el): New target.
110
111 2005-05-04 Miles Bader <miles@gnu.org>
112
113 * character.c (chars-in-region): Obsolete function removed.
114 (syms_of_character): Remove its initialization.
115
116 2005-04-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
117
118 * w32select.c (validate_coding_system)
119 (setup_windows_coding_system): New functions.
120 (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
121 setup_windows_coding_system.
122 (setup_config, Fw32_get_clipboard_data): Use
123 validate_coding_system.
124 (Fx_selection_exists): Move call to setup_config to a place
125 were signals are allowed.
126
127 * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
128 (Fcheck_coding_system): Add declarations.
129
130 2005-04-28 Kenichi Handa <handa@m17n.org>
131
132 * s/ms-w32.h (STDC_HEADERS): Sync with the change in
133 HEAD (2005-04-23).
134
135 2005-04-25 Kenichi Handa <handa@m17n.org>
136
137 * charset.c (load_charset_map_from_vector): Fix for the first
138 iteration.
139
140 2005-04-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
141
142 * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
143 string as the second argument for x_new_fontset.
144
145 2005-04-18 Kenichi Handa <handa@m17n.org>
146
147 * fns.c (Fstring_as_multibyte): Fix the change for syncing with
148 CVS head.
149
150 2005-04-09 Kenichi Handa <handa@m17n.org>
151
152 * search.c (search_buffer): Fix the change for syncing with CVS
153 head.
154 (search_buffer): Likewise.
155
156 2005-03-31 Kenichi Handa <handa@m17n.org>
157
158 * xdisp.c (get_next_display_element): Sync with CVS head.
159
160 2005-03-29 Kenichi Handa <handa@m17n.org>
161
162 * coding.c (decode_coding_object): Use safe_call1 instead of call1.
163 (encode_coding_object): Use safe_call instead of call2.
164
165 2005-03-14 Kenichi Handa <handa@m17n.org>
166
167 * fontset.c (set_default_ascii_font): Fix the change for
168 syncing with CVS head.
169
170 2005-01-30 Kenichi Handa <handa@m17n.org>
171
172 * fontset.c (Fset_fontset_font): Check family element of a given
173 vector.
174
175 * Makefile.in (lisp): Include charprop.el.
176
177 2005-01-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
178
179 * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
180 Not sure if it's unnecessary.
181
182 2005-01-16 Steven Tamm <steventamm@mac.com>
183
184 * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
185 some possibly unnecessary fontset checking code that crashed
186 when creating a new frame
187
188 2005-01-17 Kenichi Handa <handa@m17n.org>
189
190 * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
191 lookup_face.
192
193 * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
194
195 * fringe.c (draw_fringe_bitmap_1): Fix argument to
196 lookup_named_face.
197
198 2004-12-25 Kenichi Handa <handa@m17n.org>
199
200 * xdisp.c (get_next_display_element): Sync to the change in HEAD
201 on 2004-12-21.
202
203 2004-12-11 Kenichi Handa <handa@m17n.org>
204
205 * search.c: Sync to the change in HEAD on 2004-11-19, 20.
206
207 * w32console.c: Sync to the change in HEAD on 2004-12-01.
208
209 * coding.c: Cancel the change done in HEAD on 2004-11-30.
210 (coding_charset_list): New function.
211
212 * coding.h (coding_charset_list): Extern it.
213
214 * term.c: Sync to the change in HEAD on 2004-11-30.
215
216 2004-12-09 Kenichi Handa <handa@m17n.org>
217
218 * fontset.c (Fset_fontset_font): Call find_font_encoding with
219 concatenation of family and registry.
220
221 2004-12-06 Kenichi Handa <handa@m17n.org>
222
223 * character.h (BYTE8_STRING): Fix typo.
224
225 * editfns.c (Ftranslate_region_internal): Don't convert unibyte
226 string to multibyte (sync to HEAD).
227
228 * casefiddle.c (casify_region): Handle changes in byte-length
229 using replace_range_2 (sync to HEAD).
230
231 2004-11-24 Andreas Schwab <schwab@suse.de>
232
233 * chartab.c (map_char_table): GCPRO table and arg.
234
235 2004-10-29 Kenichi Handa <handa@m17n.org>
236
237 * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
238 already at limit.
239
240 2004-10-23 Kenichi Handa <handa@m17n.org>
241
242 * fontset.c (fs_load_font): Use fast_string_match_ignore_case
243 instead of fast_c_string_match_ignore_case.
244 (find_font_encoding): Argument changed to Lisp_Object. Use
245 fast_string_match_ignore_case instead of
246 fast_c_string_match_ignore_case. Caller changed.
247
248 2004-10-15 Kenichi Handa <handa@m17n.org>
249
250 * xdisp.c (get_next_display_element): In unibyte case, decide to
251 display in octal form by checking a chacter by
252 UNIBYTE_CHAR_HAS_MULTIBYTE_P.
253
254 * charset.c (Fset_unibyte_charset): Setup
255 unibyte_has_multibyte_table.
256
257 * character.c (unibyte_has_multibyte_table): New variable.
258
259 * character.h (unibyte_has_multibyte_table): Extern it.
260 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
261
262 2004-10-14 Kenichi Handa <handa@m17n.org>
263
264 * callproc.c (Fcall_process): Fix merging of 2004-10-13 change.
265
266 2004-10-13 Kenichi Handa <handa@m17n.org>
267
268 * coding.c (encode_coding_iso_2022): Fix handling of charset
269 annotation.
270
271 2004-10-12 Kenichi Handa <handa@m17n.org>
272
273 * coding.c (setup_coding_system): If coding_system is nil, use
274 Qundecided.
275 (Fterminal_coding_system): Return nil if terminal coding system is
276 `undecided'.
277 (syms_of_coding): Define coding-system `undecided' here. Setup
278 terminal_coding as `undecided'.
279
280 2004-10-04 Kenichi Handa <handa@m17n.org>
281
282 * xdisp.c (message_dolog, set_message_1): Call
283 unibyte_char_to_multibyte with arg type int.
284
285 * fileio.c (Fsubstitute_in_file_name): Fix previous change.
286
287 * lread.c (read1): Fix reading of a char-table.
288
289 * print.c (print_object): Include sub char-table in cicularities
290 detection.
291
292 2004-10-01 Kenichi Handa <handa@m17n.org>
293
294 * keymap.c (where_is_internal_2): Fix for the case that KEY is a
295 cons. Append the found sequences in car of ARGS instead of
296 prepending.
297
298 2004-09-28 Kenichi Handa <handa@m17n.org>
299
300 * fileio.c (report_file_error): Make a unibyte string from
301 strerror (errorno).
302 (Fsubstitute_in_file_name): Fix the arg to
303 unibyte_char_to_multibyte. It is evaluated twice.
304
305 2004-09-19 Kenichi Handa <handa@m17n.org>
306
307 * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
308
309 2004-09-14 Kenichi Handa <handa@m17n.org>
310
311 * coding.c (detect_coding): Fix previous change.
312
313 2004-09-13 Kenichi Handa <handa@m17n.org>
314
315 * coding.c (detect_coding_utf_16): Don't set detect_info->found if
316 BOM is not found.
317 (detect_coding): Optimization for ISO-2022 when no 8-bit data is
318 found.
319 (detect_coding_system): Likewise.
320
321 2004-09-01 Jason Rumney <jasonr@gnu.org>
322
323 * w32fns.c (x_to_w32_font): Update to use new coding struct.
324
325 2004-08-17 Kenichi Handa <handa@m17n.org>
326
327 * charset.c (Fdeclare_equiv_charset): Fix handing of CHARS.
328 (Fiso_charset): Likewise.
329
330 2004-08-03 Steven Tamm <steventamm@mac.com>
331
332 * macterm.c (mac_encode_char): Add charset argument and update
333 to use encoding_type
334 (x_new_font,x_new_fontset): Merge in changes from xterm.c;
335 switch to pure fontset
336 (decode_mac_font_name): Temporarily remove decoding
337 (x_font_name_to_mac_font_name): Temporarily remove encoding
338 (x_load_font): Temporarily remove encoding
339
340 2004-06-30 Kenichi Handa <handa@m17n.org>
341
342 * xfaces.c (Fface_font): If frame is not on a window system,
343 ignore CHARACTER arg. If HAVE_WINDOW_SYSTEM is not defined, don't
344 refer to face->font.
345 (split_font_name_into_vector, build_font_name_from_vector)
346 (lookup_non_ascii_face, realize_non_ascii_face): Define them only
347 whne HAVE_WINDOW_SYSTEM is defined.
348
349 2004-05-29 Kenichi Handa <handa@m17n.org>
350
351 * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
352 (x_produce_glyphs): Fix setting of members of cmp in case
353 cmp->glyph_len is zero,
354
355 * fontset.c (Fset_fontset_font): Docstring fixed.
356 (Ffontset_info): Make it backward compatible. New arg ALL.
357
358 2004-05-11 Kim F. Storm <storm@cua.dk>
359
360 * process.c (read_process_output): Grow decoding_buf when needed;
361 this could cause a crash in allocate_string and compact_small_strings.
362
363 2004-04-29 Kenichi Handa <handa@m17n.org>
364
365 * fileio.c (WRITE_BUF_SIZE): This macro deleted.
366 (e_write): Fix previous change.
367
368 2004-04-28 Kenichi Handa <handa@m17n.org>
369
370 * coding.c (setup_coding_system): Set coding->common_flags
371 correctly for raw-text.
372 (consume_chars): On encoding unibyte text by raw-text, don't check
373 multibyte form.
374 (encode_coding): On encoding by raw-text, never use translation
375 tables.
376
377 * fileio.c (e_write): Short cut for the case of no encoding.
378
379 2004-04-20 Kenichi Handa <handa@m17n.org>
380
381 * coding.c (detect_coding): Delete unused variables.
382 (detect_coding_system): Likewise.
383
384 2004-04-18 Kenichi Handa <handa@m17n.org>
385
386 * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
387 (consume_chars): Fix handling of 8-bit bytes in unibyte source.
388
389 2004-04-14 Kenichi Handa <handa@m17n.org>
390
391 Sync all files to HEAD.
392
393 2004-04-14 Kenichi Handa <handa@m17n.org>
394
395 * coding.c (Ffind_coding_systems_region_internal): Include
396 raw-text and no-conversion in the result.
397
398 * fontset.h: Sync to HEAD.
399
400 * fontset.c: Sync to HEAD.
401
402 2004-04-14 Kenichi Handa <handa@m17n.org>
403
404 * fontset.c (find_font_encoding): Return `ascii' for unknown
405 encoding.
406 (load_font_get_repertory): Delete unnecessary check of ENCODING of
407 FONT_DEF.
408 (font_def_arg, add_arg, from_arg, to_arg): New args.
409 (set_fontset_font): Argument changed.
410 (Fset_fontset_font): Fix for the case that TARGET is a script
411 name and charset name.
412 (new_fontset_from_font_name): Fix argument to Fnew_fontset.
413
414 2004-04-13 Kenichi Handa <handa@m17n.org>
415
416 * fontset.c (fontset_font): Renamed from fontset_face. Return
417 value changed.
418 (face_suitable_for_char_p): Adjusted for the change of
419 fontset_font.
420 (face_for_char): Likewise.
421 (make_fontset_for_ascii_face): Fix setting of the fontset element
422 for ASCII.
423 (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
424 to get a font name.
425 (Ffontset_info): Adjusted for the change of fontset_font.
426
427 * composite.c: Sync to HEAD.
428
429 * search.c: Sync to HEAD.
430
431 * coding.c: Sync to HEAD.
432 (emacs_mule_char): Check invalid code more regidly.
433
434 * coding.h: Sync to HEAD.
435
436 * charset.c: Sync to HEAD.
437
438 * charset.h: Sync to HEAD.
439
440 * character.h (LEADING_CODE_LATIN_1_MIN)
441 (LEADING_CODE_LATIN_1_MAX): Delete these macros.
442
443 2004-04-08 Kenichi Handa <handa@m17n.org>
444
445 * category.h: Sync to HEAD.
446
447 * category.c: Sync to HEAD.
448
449 * syntax.h: Sync to HEAD.
450
451 * syntax.c: Sync to HEAD.
452
453 * regex.h: Sync to HEAD.
454
455 * regex.c: Sync to HEAD.
456
457 2004-04-07 Kenichi Handa <handa@m17n.org>
458
459 * editfns.c: Sync to HEAD.
460 (check_translation): New function.
461 (Ftranslate_region_internal): Handle M:N mapping.
462
463 2004-04-06 Kenichi Handa <handa@m17n.org>
464
465 * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
466
467 2004-03-30 Kenichi Handa <handa@m17n.org>
468
469 * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
470 goto invalid_code.
471 (decode_coding_iso_2022): Fix handling of invalid designation.
472
473 * fileio.c (Finsert_file_contents): Be sure to call unbind_to
474 after calling code_conversion_save.
475
476 2004-03-11 Kenichi Handa <handa@m17n.org>
477
478 * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
479
480 * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
481
482 * fontset.c: Include "intervals.h".
483 (fontset_face): Fix comparing of Lisp_Objects.
484 (free_face_fontset): Fix Lisp_Object/int mixup.
485 (new_fontset_from_font_name): Likewise.
486
487 * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
488
489 * coding.c: Add many prototypes for static functions.
490 (get_translation_table): Allow max_lookup to be NULL.
491 (decode_coding): Call get_translation_table with max_lookup NULL.
492 (Ffind_coding_systems_region_internal): Likewise.
493 (Funencodable_char_position, Fcheck_coding_systems_region):
494 Likewise.
495
496 2004-03-11 Kenichi Handa <handa@m17n.org>
497
498 * coding.c (get_translation_table): Declare it as Lisp_Object.
499 (LOOKUP_TRANSLATION_TABLE): New macro.
500 (produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of
501 CHAR_TABLE_REF.
502 (consume_chars): Likewise.
503
504 2004-03-11 Kenichi Handa <handa@m17n.org>
505
506 * coding.c (MAX_ANNOTATION_LENGTH): Adjusted for the change of
507 annotation data format.
508 (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
509 Change arguments FROM and TO to single argument NCHARS. Caller
510 changed.
511 (decode_coding_utf_8): Pay attention to coding->charbuf_used.
512 (decode_coding_utf_16, decode_coding_emacs_mule)
513 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
514 (decode_coding_ccl, decode_coding_charset): Likewise.
515 (get_translation): New function.
516 (produce_chars): New arguments translation_table and last_block.
517 Translate characters here. Return number of carryover chars.
518 Caller changed.
519 (produce_composition): New argument pos. Caller changed.
520 Adjusted for the change of annotation data format.
521 (produce_charset, produce_annotation): Likewise.
522 (decode_coding, encode_coding): Don't call translate_chars.
523 (consume_chars): New arg translation_table. Caller changed.
524 (translate_chars): Deleted.
525 (syms_of_coding): Make translation-table's number of extra slots
526 2.
527
528 2004-03-09 Kenichi Handa <handa@m17n.org>
529
530 * search.c (simple_search): Fix setting this_pos_byte in backward
531 search.
532
533 * coding.c (detect_coding_emacs_mule): Fix counting of encoded
534 byte sequence.
535 (detect_coding_ccl): Fix setting of the variable valids.
536
537 2004-03-04 Kenichi Handa <handa@m17n.org>
538
539 * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
540
541 * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
542
543 * editfns.c (Ftranslate_region_internal): Renamed from
544 Ftranslate_region. Accept a char-table in TABLE.
545 (syms_of_editfns): Defsubr Stranslate_region_internal.
546
547 * xfaces.c (set_lface_from_font_name): If a font is specified for
548 a frame, generate a fontset from the font.
549 (build_scalable_font_name): If the scalable font is requested for
550 a specific size, don't change that size.
551 (try_font_list): Try a scalable font also in the case that a
552 pattern string is specified,
553
554
555 2004-03-03 Kenichi Handa <handa@m17n.org>
556
557 * xfaces.c (Fface_font): New optional arg CHARACTER.
558
559 2004-02-17 Kenichi Handa <handa@m17n.org>
560
561 * charset.h (CHARSET_OFFSET): New macro.
562
563 2004-02-13 Kenichi Handa <handa@m17n.org>
564
565 * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
566
567 * fontset.c (fontset_face): Handle the case that repertory is a
568 char-table.
569 (find_font_encoding): Return nil for unknown encoding.
570 (Fset_fontset_font): Ignore a font of unknown encoding.
571
572 2004-02-09 Kenichi Handa <handa@m17n.org>
573
574 * keymap.c (describe_vector): Handle default value of a char
575 table.
576
577 * fontset.c (fontset_face): Handle fallback fonts correctly.
578 (Ffontset_info): Return infomation about fallback fonts.
579
580 2004-02-06 Kenichi Handa <handa@m17n.org>
581
582 * fontset.c (FONTSET_DEFAULT): New macro.
583 (FONTSET_ADD): Handle the case that range is nil.
584 (fontset_add): Likewise.
585 (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
586 the case that it is nil.
587 (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
588 (syms_of_fontset): Set char-table-extra-slots property of fontset
589 to 9.
590
591 * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
592 subset or superset.
593
594 2004-01-30 Kenichi Handa <handa@m17n.org>
595
596 * emacs.c (main): Call init_charset after syms_of_XXX.
597
598 * charset.c (Vcharset_map_directory): Deleted.
599 (Vcharset_map_path): New variable
600 (load_charset_map_from_file): Use Vcharset_map_path instead.
601 (init_charset): Initialize Vcharset_map_path.
602 (syms_of_charset): Delete declaration of "charset-map-directory",
603 add declaration of "charset-map-path".
604
605 2004-01-29 Kenichi Handa <handa@m17n.org>
606
607 * fns.c (string_char_to_byte): Optimize for ASCII only string.
608 (string_byte_to_char): Likewise.
609
610 * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
611
612 * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
613 (detect_coding): Treat '\0' as normal ASCII byte..
614 (detect_coding_system): Likewise.
615
616 2004-01-27 Kenichi Handa <handa@m17n.org>
617
618 * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
619
620 * coding.c (QCmnemonic, QCdefalut_char)
621 (QCdecode_translation_table, QCencode_translation_table)
622 (QCpost_read_conversion, QCpre_write_conversion): New variables.
623 (get_translation_table): Return a list of translation tables if
624 necessary.
625 (decode_coding): Call get_translation_table with ENCODEP 0.
626 (char_encodable_p): If translation_table is non-nil, always call
627 translate_char.
628 (Fdefine_coding_system_internal): Accept list of translation
629 tables as :encode-translation-table and :decode-translation-table.
630 (Fcoding_system_put): New function.
631 (syms_of_coding): Declare new symbols. Defsubr
632 Scoding_system_put.
633 (decode_coding_sjis): Handle 4th charset (typically JISX0212).
634 (encode_coding_sjis): Likewise.
635
636 * charset.c (map_charset_chars): Fix arg to map_charset_chars in
637 when the charset is superset type.
638
639 * character.c (translate_char): Accept list of translation tables.
640
641 2004-01-25 Kenichi Handa <handa@m17n.org>
642
643 * coding.h (enum coding_attr_index): New member
644 coding_attr_trans_tbl.
645 (CODING_ATTR_TRANS_TBL): New macro.
646
647 * coding.c (get_translation_table): New function.
648 (translate_chars): Fix the bug of skipping annotation data.
649 (decode_coding): Utilze get_translation_table.
650 (encode_coding): Likewise.
651 (char_encodable_p): Translate char if necessary.
652 (Funencodable_char_position): Likewise.
653 (Ffind_coding_systems_region_internal): Setup translation table
654 for encode in a coding system attribute vector in advance.
655 (Fcheck_coding_systems_region): Likewise.
656 (Fdefine_coding_system_internal): Allow a symbol as translation
657 table. For shift-jis type coding system, allow 4th charset.
658
659 2004-01-24 Kenichi Handa <handa@m17n.org>
660
661 * coding.c (decode_coding_sjis): Check the first byte rigidly.
662
663 * xdisp.c (get_next_display_element): Pass -1 as POS to
664 FACE_FOR_CHAR if displaying a C-string.
665
666 2004-01-23 Kenichi Handa <handa@m17n.org>
667
668 * composite.c (get_composition_id): Handle xoff and yoff in a
669 composition rule.
670
671 * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
672 (struct composition): New member lbearing and rbearing.
673
674 * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
675 (x_get_glyph_overhangs): Handle a composition glyph.
676 (x_produce_glyphs): Setup lbearing and rbreaing for a composition
677 glyph.
678
679 * xterm.c (x_compute_glyph_string_overhangs): Handle also a
680 composition glyph.
681
682 2004-01-18 Kenichi Handa <handa@m17n.org>
683
684 * print.c: Include charset.h.
685 (Vprint_charset_text_property): New variable.
686 (Qdefault): Extern it.
687 (PRINT_STRING_NON_CHARSET_FOUND)
688 (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
689 (print_check_string_result): New variable.
690 (print_check_string_charset_prop): New function.
691 (print_prune_charset_plist): New variable.
692 (print_prune_string_charset): New function.
693 (print_object): Call print_prune_string_charset if
694 Vprint_charset_text_property is not t.
695 (print_interval): Print nothing if itnerval->plist is nil.
696 (syms_of_print): Declare Vprint_charset_text_property as a lisp
697 variable. Init and staticpro print_prune_charset_plist.
698
699 2004-01-15 Kenichi Handa <handa@m17n.org>
700
701 * fontset.c (new_fontset_from_font_name): Use the specified font
702 for all characters in the new fontset.
703
704 * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
705 OBJECT args.
706
707 * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
708 OBJECT args for composition too.
709
710 * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
711 OBJECT args.
712
713 2004-01-13 Kenichi Handa <handa@m17n.org>
714
715 * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
716
717 * fontset.c (reorder_font_vector): Adjusted for the change of
718 FONT_DEF format.
719 (fontset_face): New arg id. Caller changed.
720 (face_for_char): New args pos and object.
721 (make_fontset_for_ascii_face): Adjusted for the change of FONT_DEF
722 format.n
723 (fs_query_fontset): Check NAME by Fassoc too.
724 (Fset_fontset_font): Allow non-XLFD font name.
725 (Ffontset_info): Adjusted for the change of FONT_DEF format.
726
727 * fontset.h (face_for_char): Prototype adjusted.
728
729 * xdisp.c (face_before_or_after_it_pos): Call FACE_FOR_CHAR with
730 POS and OBJECT args.
731 (get_next_display_element): Likewise.
732 (append_space): Likewise.
733 (extend_face_to_end_of_line): Likewise.
734 (get_char_face_and_encoding): Likewise.
735 (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
736 (x_produce_glyphs): Likewise.
737
738 * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
739 POS and OBJECT args.
740
741 * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
742 POS and OBJECT args.
743
744 2004-01-03 Jason Rumney <jasonr@gnu.org>
745
746 * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
747 of GlobalAlloc'ed memory.
748
749 2003-12-29 Kenichi Handa <handa@m17n.org>
750
751 * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
752
753 * charset.h (charset_table_used): Delete extern.
754
755 * charset.c (charset_table_used): Make it static.
756 (map_charset_chars): Fix args to c_function with.
757
758 * chartab.c (map_sub_char_table_for_charset): Fix args to
759 c_function with.
760
761 * coding.h (enum coding_result_code): Delete
762 CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
763
764 * coding.c (Qinsufficient_source, Qinconsistent_eol)
765 (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New
766 variables.
767 (Vlast_code_conversion_error): New variables.
768 (syms_of_coding): DEFSYM or DEFVAR_LISP them.
769 (ONE_MORE_BYTE): Record error if any instead of signaling an
770 error. If non-ASCII multibyte char is found, return the negative
771 value of the code. All callers changed to check it.
772 (ONE_MORE_BYTE_NO_CHECK): Likewise.
773 (record_conversion_result): New function. All codes setting
774 coding->result are changed to call this function.
775 (detect_coding_utf_8): Don't use the local variable incomplete.
776 (decode_coding_utf_8): Likewise.
777 (emacs_mule_char): Change the second arg to `const'.
778 (detect_coding_emacs_mule): Don't use the local variable
779 incomplete.
780 (detect_coding_sjis): Likewise.
781 (detect_coding_big5): Likewise.
782 (decode_coding): Fix of flushing out unprocessed data.
783 (make_conversion_work_buffer): Fix making of a work buffer.
784 (decode_coding_object): Return coding->dst_object;
785
786 * fontset.c (set_fontset_font): Fix args.
787
788 * lisp.h (CHARACTERBITS): Define as 22.
789
790 * process.c (send_process): Be sure to set coding->src_multibyte.
791
792 * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
793
794 2003-12-02 Kenichi Handa <handa@m17n.org>
795
796 * xdisp.c (handle_auto_composed_prop): Give limit to
797 Fnext_single_char_property_change.
798
799 2003-12-02 Kenichi Handa <handa@m17n.org>
800
801 * coding.c (detect_coding): Fix previous change.
802 (detect_coding_system): Likewise.
803
804 2003-12-02 Kenichi Handa <handa@m17n.org>
805
806 * composite.c (syms_of_composite): Don't make the compostion hash
807 table week.
808
809 * fontset.c (Fset_fontset_font): Fix docstring.
810
811 * lisp.h (detect_coding_system): Adjust prototype.
812
813 * fileio.c (kill_workbuf_unwind): Delete this function.
814 (Finsert_file_contents): Adjust the call of detect_coding_system.
815 Get conversion_buffer by code_conversion_save. Use the macor
816 CODING_MAY_REQUIRE_DECODING. After decoding, update
817 coding_system.
818
819 * coding.h (make_conversion_work_buffer): Delete extern.
820 (code_conversion_save): Extern it.
821
822 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
823 (CODING_GET_INFO): Delete argument eol_type. Callers changed.
824 (decode_coding_utf_8): Don't do eol converion.
825 (detect_coding_utf_16): Check coding->src_chars, not
826 coding->src_bytes. Add heuristics for those that have no
827 signature.
828 (decode_coding_emacs_mule): Don't do eol converion.
829 (decode_coding_iso_2022): Likewise.
830 (decode_coding_sjis): Likewise.
831 (decode_coding_big5): Likewise.
832 (decode_coding_charset): Likewise.
833 (adjust_coding_eol_type): Return a new coding system.
834 (detect_coding): Don't detect eol. Fix for utf-16 detection.
835 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
836 each change.
837 (decode_coding): Pay attention to undo_list. Do eol convesion for
838 all types of coding-systems (if necessary).
839 (Vcode_conversion_work_buf_list): Delete it.
840 (Vcode_conversion_reused_workbuf): Renamed from
841 Vcode_conversion_reused_work_buf.
842 (Vcode_conversion_workbuf_name): New variable.
843 (reused_workbuf_in_use): New variable.
844 (make_conversion_work_buffer): Delete the arg DEPTH.
845 (code_conversion_restore): Argument changed to cons.
846 (code_conversion_save): Delete the argument BUFFER. Callers
847 changed.
848 (detect_coding_system): New argument src_chars. Callers changed.
849 Fix for utf-16 detection.
850 (init_coding_once): Don't use ISO_carriage_return.
851 (syms_of_coding): Initialized Vcode_conversion_workbuf_name and
852 reused_workbuf_in_use.
853
854 2003-11-24 Kenichi Handa <handa@m17n.org>
855
856 * keymap.c (store_in_keymap): Pay attention to the case that idx
857 is a cons specifying a character range.
858
859 * coding.c (Fdefine_coding_system_internal): Fix previous change.
860
861 2003-11-23 Kenichi Handa <handa@m17n.org>
862
863 * xdisp.c (handle_auto_composed_prop): Fix the case of returning
864 HANDLED_RECOMPUTE_PROPS.
865
866 * coding.c (Fdefine_coding_system_internal): Fix checking of
867 ascii compatibility.
868
869 2003-11-22 Kenichi Handa <handa@m17n.org>
870
871 * charset.c (find_charsets_in_text): Delete unused locale
872 variable.
873 (Fset_charset_priority): Update Vemacs_mule_charset_list too.
874
875 * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
876 Resync charset_list to Vemacs_mule_charset_list.
877
878 * keymap.c (store_in_keymap): Pay attention to the case that idx
879 is a cons specifying a character range.
880
881 2003-11-18 Kenichi Handa <handa@m17n.org>
882
883 * composite.c (update_compositions): Bind inhibit-read-only, etc
884 to t before calling remove-list-of-text-properties.
885
886 * print.c (print_object): Always print ASCII chars as is.
887
888 2003-11-17 Kenichi Handa <handa@m17n.org>
889
890 * keymap.c (Fdefine_key): Fix handling of Lucid style event type
891 list.
892
893 * fns.c (Fmapconcat): Signal an error if SEQUENCE is a char table.
894 (Fmapcar): Likewise.
895 (Fmapc): Likewise.
896
897 2003-11-15 Kenichi Handa <handa@m17n.org>
898
899 * syntax.c (skip_chars): Be sure to alloca char_ranges when
900 necessary.
901
902 2003-11-14 Kenichi Handa <handa@m17n.org>
903
904 * xfaces.c (set_lface_from_font_name): Fix for the case that
905 FONTNAME is not fontset name.
906
907 2003-11-13 Kenichi Handa <handa@m17n.org>
908
909 * fns.c (base64_encode_1): Fix previous change.
910
911 2003-11-08 Kenichi Handa <handa@m17n.org>
912
913 * fontset.c (set_fontset_font): New function.
914 (Fset_fontset_font): If a font is specified for a charset, use
915 map_charset_chars to store the font spec in a fontset.
916
917 2003-10-29 Kenichi Handa <handa@m17n.org>
918
919 * fontset.c (fontset_face): Create a fallback fontset on demand
920 (make_fontset): Don't create a fallback fontset here.
921 (free_face_fontset): Free a fallback fontset (if any) too.
922 (n_auto_fontsets): Delete this variable.
923 (auto_fontset_alist): New variable.
924 (new_fontset_from_font_name): Check auto_fontset_alist.
925 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
926 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
927 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
928 Defsubr Sfontset_list_all.
929
930 2003-10-24 Kenichi Handa <handa@m17n.org>
931
932 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
933
934 2003-10-23 Kenichi Handa <handa@m17n.org>
935
936 * fontset.c (Fnew_fontset): Check NAME more rigidly.
937
938 2003-10-17 Kenichi Handa <handa@m17n.org>
939
940 * editfns.c (Fgoto_char): Fix docstring.
941
942 2003-10-16 Kenichi Handa <handa@m17n.org>
943
944 * insdel.c (insert_from_gap): Adjust intervals correctly.
945
946 2003-10-12 Jason Rumney <jasonr@gnu.org>
947
948 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
949 (pfnGetFontUnicodeRanges): New dynamically loaded function.
950 (w32_initialize): Try to load it.
951 (x_get_font_repertory): Use it if available.
952 (w32_encode_char): Add shortcut for unicode output.
953
954 * w32fns.c (w32_load_system_font): Default charset to -1.
955 (x_to_w32_charset): Match all fonts for unicode.
956 (w32_to_x_charset): New parameter matching. Don't return partial
957 or wildcard charsets.
958 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
959 (w32_codepage_for_font): Return CP_UNICODE for unicode.
960 (w32_to_x_font): Match charset to real charset.
961 (enum_font_cb2): Always list unicode versions.
962
963 * makefile.w32-in (temacs): Increase EMHEAP.
964
965 2003-10-11 Jason Rumney <jasonr@gnu.org>
966
967 * w32term.c (w32_encode_char): New charset parameter.
968 font_info.encoding becomes encoding_type.
969 (x_get_font_repertory): New function. Warning: stub only!
970 (x_new_font): Return quickly if font already set.
971 (x_new_fontset): fontsetname parameter is Lisp_Object.
972 Use new fs_query_fontset. Try new_fontset_from_font_name. Use
973 fontset_name for return value.
974
975 * w32term.h: Declare x_get_font_repertory.
976
977 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
978 place of find_charset_in_text. Use encode_coding_object in place
979 of encode_coding.
980 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
981 decode_coding.
982
983 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
984 of x_new_fontset.
985 (w32_load_system_font): Initialize charset as unicode.
986 font_info.encoding becomes encoding_type.
987 (w32_to_x_font): Use decode_coding_c_string in place of
988 decode_coding.
989 (x_to_w32_font): Use encode_coding_object in place of
990 encode_coding.
991 (syms_of_w32fns): Set get_font_repertory_func.
992
993 * w32console.c: Include character.h. Use terminal_encode_buffer
994 from term.c.
995 (write_glyphs): Use new version of encode_terminal_code. Use
996 encode_coding_object in place of encode_coding.
997
998 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
999 encoding becomes encoding_type.
1000
1001 * term.c (terminal_encode_buffer): Make externally visible.
1002
1003 * makefile.w32-in: Add character.h dependancies.
1004 (character.o, chartab.o): New targets.
1005
1006 2003-10-10 Kenichi Handa <handa@m17n.org>
1007
1008 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
1009 CODING_ID_EOL_TYPE..
1010
1011 2003-10-07 Andreas Schwab <schwab@suse.de>
1012
1013 * coding.c (produce_chars): Revert last change.
1014
1015 2003-10-06 Kenichi Handa <handa@m17n.org>
1016
1017 * charset.h (charset_unicode): Extern it.
1018
1019 * charset.c (string_xstring_p): Check by (C >= 0x100).
1020 (find_charsets_in_text): Format of the arc CHARSETS changed. New
1021 arg MULTIBYTE.
1022 (Ffind_charset_region, Ffind_charset_string): Adjusted for the
1023 change of find_charsets_in_text.
1024 (Fsplit_char): Fix doc. Never return unknown.
1025
1026 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
1027
1028 * coding.c (Fdefine_coding_system_alias): Update
1029 Vcoding_system_list.
1030
1031 * fontset.c (load_font_get_repertory): Pay attention to the case
1032 that ENCODING of a font is specified by a char-table.
1033
1034 * xterm.c (x_get_font_repertory): Handle the case that the
1035 encoding of font is other than Unicode.
1036
1037 2003-10-02 Kenichi Handa <handa@m17n.org>
1038
1039 * term.c (encode_terminal_code): Don't handle glyph-table. Check
1040 if a character is encodable by the terminal coding system. If
1041 not, produces proper number of `?'s. Update
1042 terminal_encode_buffer and terminal_encode_buf_size if necessary.
1043 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
1044
1045 2003-10-01 Kenichi Handa <handa@m17n.org>
1046
1047 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
1048 variables.
1049 (encode_terminal_code): Argument changed. Encode multiple
1050 characters at once. Store the result of encoding in
1051 terminal_encode_buffer.
1052 (write_glyphs): Adjusted for the change of encode_terminal_code.
1053 (insert_glyphs): Likewise.
1054 (term_init): Initialize terminal_encode_buffer and
1055 terminal_encode_buf_size.
1056
1057 * coding.c (consume_chars): If coding->src_object is nil, don't
1058 check annotation.
1059
1060 2003-09-30 Kenichi Handa <handa@m17n.org>
1061
1062 * character.c (char_string): Use ASCII_CHAR_P instead of
1063 SINGLE_BYTE_CHAR_P.
1064
1065 2003-09-30 Kenichi Handa <handa@m17n.org>
1066
1067 * xdisp.c (handle_auto_composed_prop): Check if the last
1068 characters of auto-composed region is newly composed with the
1069 following characters.
1070 (handle_composition_prop): Fix checking of point being inside
1071 composition.
1072
1073 2003-09-26 Kenichi Handa <handa@m17n.org>
1074
1075 * fns.c (concat): Don't change multibyteness of the result by
1076 concatenating an 8-bit character.
1077
1078 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
1079 multibyteness of the result when newelt is an 8-bit character.
1080
1081 2003-09-29 Dave Love <fx@gnu.org>
1082
1083 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
1084 EMACS_INT.
1085
1086 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
1087
1088 * xfaces.c (face_numeric_value): Declare dim size_t.
1089 (Finternal_lisp_face_equal_p): Remove unused f.
1090
1091 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
1092 (MATRIX_ROW): Remove unused vars.
1093 (draw_glyphs, x_insert_glyphs, fast_find_position)
1094 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
1095 byte/char counts.
1096
1097 * regex.c (regex_compile): Remove unused var.
1098
1099 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
1100
1101 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
1102 (Faccessible_keymaps, where_is_internal): Remove unused vars.
1103
1104 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
1105
1106 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
1107
1108 * fileio.c (Fwrite_region): Remove unused var.
1109
1110 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
1111 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
1112
1113 * composite.c (Fremove_list_of_text_properties): Declare.
1114
1115 * coding.c (inhibit_pre_post_conversion): Removed (unused).
1116 (alloc_destination, produce_chars): Use EMACS_INT for byte/char
1117 counts.
1118 (coding_inherit_eol_type): Remove unused attrs.
1119 (detect_coding): Cast arg of detect_eol.
1120
1121 * charset.c (syms_of_charset): Remove unused var p.
1122 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
1123 byte/char counts.
1124
1125 * casetab.c (set_case_table): Remove unused var.
1126
1127 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
1128 unsued vars.
1129
1130 2003-09-26 Dave Love <fx@gnu.org>
1131
1132 * xterm.c (x_bitmap_mask): Declare.
1133
1134 2003-09-17 Dave Love <fx@gnu.org>
1135
1136 * xterm.c (x_term_init): Fix type error.
1137
1138 * lisp.h: Add Funibyte_char_to_multibyte.
1139
1140 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
1141 (Fset_coding_system_priority): Doc fix.
1142
1143 * alloc.c: Sync with HEAD version.
1144
1145 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
1146
1147 * indent.c (check_composition): Make start and end EMACS_INT.
1148
1149 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
1150
1151 * xdisp.c (handle_composition_prop, check_point_in_composition):
1152 Make buffer positions EMACS_INT.
1153
1154 * composite.c (find_composition, run_composition_function)
1155 (update_compositions, Ffind_composition_internal): Make buffer
1156 positions EMACS_INT.
1157
1158 * composite.h (find_composition, update_compositions): Make
1159 position args EMACS_INT.
1160
1161 * keyboard.c (adjust_point_for_property): Make beg and end
1162 EMACS_INT.
1163
1164 * intervals.c (get_property_and_range)
1165 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
1166
1167 * unexalpha.c: Don't include varargs.h.
1168
1169 2003-09-16 Dave Love <fx@gnu.org>
1170
1171 * coding.h (ENCODE_UTF_8): New.
1172
1173 * Makefile.in (gtkutil.o): Depend on coding.h.
1174
1175 * coding.c (Fset_coding_system_priority): Doc fix.
1176
1177 2003-09-16 Kenichi Handa <handa@m17n.org>
1178
1179 * fileio.c (Finsert_file_contents): Call setup_coding_system in
1180 the case of auto saving.
1181
1182 2003-09-10 Andreas Schwab <schwab@suse.de>
1183
1184 * chartab.c (map_char_table): Protect `range' from GC.
1185 (map_char_table_for_charset): Likewise.
1186
1187 2003-07-09 Kenichi Handa <handa@m17n.org>
1188
1189 * coding.c (decode_coding_sjis): Check bytes more rigidly.
1190
1191 2003-06-26 Kenichi Handa <handa@m17n.org>
1192
1193 * fileio.c (choose_write_coding_system): Return a decided coding
1194 system.
1195 (Fwrite_region): Set Vlast_coding_system_used to the return value
1196 of choose_write_coding_system.
1197
1198 2003-06-06 Kenichi Handa <handa@m17n.org>
1199
1200 * charset.c (Fset_charset_priority): Pay attention to duplicated
1201 arguments.
1202
1203 * coding.c (QCcategory): New variable.
1204 (syms_of_coding): Defsym it. Set all elements of
1205 Vcoding_category_table and their symbol values.
1206 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
1207 coding-category-XXX, and coding-category-list.
1208 (Fdefine_coding_system_internal): Add category in the plist.
1209
1210 2003-06-05 Kenichi Handa <handa@m17n.org>
1211
1212 * callproc.c (Fcall_process): Handle carryover correctly.
1213
1214 * coding.c (decode_coding_iso_2022): Fix handling of invalid
1215 bytes.
1216 (raw_text_coding_system): Check NILP (coding_system).
1217 (coding_inherit_eol_type): Check NILP (coding_system) and
1218 NILP (parent).
1219 (consume_chars): Fix for the case of raw-text.
1220
1221 * process.c (read_process_output): Handle carryover correctly.
1222
1223 2003-06-02 Dave Love <fx@gnu.org>
1224
1225 * regex.c (re_search_2): Fix last change.
1226
1227 2003-05-30 Kenichi Handa <handa@m17n.org>
1228
1229 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
1230 target_multibyte. Even in a unibyte case, return a converted
1231 multibyte char.
1232 (GET_CHAR_AFTER): New macro.
1233 (PATFETCH): Translate via multibyte char.
1234 (HANDLE_UNIBYTE_RANGE): Delete this macro.
1235 (SETUP_MULTIBYTE_RANGE): New macro.
1236 (regex_compile): Setup compiled code so that its multibyteness
1237 matches that of a target. Fix the handling of "[X-YZ]" using
1238 SETUP_MULTIBYTE_RANGE.
1239 (analyse_first) <charset>: For filling fastmap for all multibyte
1240 characters, don't check by BASE_LEADING_CODE_P.
1241 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
1242 the same as RE_MULTIBYTE_P (bufp) now.
1243 (mutually_exclusive_p): Check by (! multibyte ||
1244 IS_REAL_ASCII (c)).
1245 (TARGET_CHAR_AND_LENGTH): Delete this macro.
1246 (TRANSLATE_VIA_MULTIBYTE): New macro.
1247 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
1248 It is the same as RE_MULTIBYTE_P (bufp) now.
1249 <exactn>: Translate via multibyte.
1250 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
1251 translate it.
1252 <charset, charset_not>: Fetch a character by
1253 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
1254 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
1255 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
1256 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
1257 by GET_CHAR_AFTER.
1258 (bcmp_translate): Likewise.
1259
1260 * search.c (compile_pattern): Check the member target_multibyte,
1261 not the member multibyte of buf.
1262
1263 * lread.c (read1): While reading a string, set force_singlebyte
1264 and force_multibyte correctly.
1265
1266 * charset.c (Fset_unibyte_charset): Fix setting up of
1267 unibyte_to_multibyte_table.
1268 (init_charset_once): Likewise.
1269
1270 2003-05-29 Kenichi Handa <handa@m17n.org>
1271
1272 * coding.c (setup_coding_system): If coding has
1273 post-read-conversion or pre-write-conversion, set
1274 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
1275 respectively.
1276 (decode_coding_gap): Run post-read-conversion if any.
1277
1278 * fileio.c (Finsert_file_contents): Even if we read into a
1279 unibyte buffer, check if we must decode the result or not.
1280
1281 2003-05-29 Kenichi Handa <handa@m17n.org>
1282
1283 * coding.c (make_conversion_work_buffer): Change the work buffer
1284 name to the same one as that of Emacs 21.
1285
1286 2003-05-28 Kenichi Handa <handa@m17n.org>
1287
1288 * coding.h (make_conversion_work_buffer): Prototype adjusted.
1289 (code_conversion_restore): Don't extern it.
1290
1291 * coding.c (detected_mask): Delete unused variable.
1292 (decode_coding_iso_2022): Pay attention to the byte sequence of
1293 CTEXT extended segment, and retain those bytes as is.
1294 (decode_coding_ccl): Delete unused variable `valids'.
1295 (setup_coding_system): Delete unused variable `category'.
1296 (consume_chars): Delete unused variable `category'. Make it work
1297 for non-multibyte case.
1298 (make_conversion_work_buffer): Argument changed.
1299 (saved_coding): Delete unused variable.
1300 (code_conversion_restore): Don't check saved_coding->destination.
1301 (code_conversion_save): New function.
1302 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
1303 instead of record_unwind_protect.
1304 (decode_coding_object, encode_coding_object): Likewise. Recover
1305 PT.
1306 (detect_coding_system): Delete unused variable `mask'.
1307 (Fdefine_coding_system_internal): Delete unsed vaiable id;
1308
1309 * fileio.c (kill_workbuf_unwind): New function.
1310 (Finsert_file_contents): On replacing, call
1311 make_conversion_work_buffer with correct args, and call
1312 record_unwind_protect with the first arg kill_workbuf_unwind.
1313
1314 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
1315
1316 2003-05-20 Kenichi Handa <handa@m17n.org>
1317
1318 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
1319 FONTSET_NAME.
1320 (fontset_add): Fix for the case that TO is less than TO1.
1321 (Ffontset_info): Don't use fallback fontset on checking the
1322 default fontset.
1323 (dump_fontset): New function for debugging.
1324
1325 * coding.c (Fdefine_coding_system_internal): Fix for the case that
1326 coding_type is Qcharset.
1327
1328 2003-05-07 Kenichi Handa <handa@m17n.org>
1329
1330 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
1331 (map_char_table): Don't inherit the value from the parent on
1332 initializing VAL. Adjusted for the above change.
1333
1334 2003-05-06 Kenichi Handa <handa@m17n.org>
1335
1336 * coding.c (Qsignature, Qendian): Delete these variables.
1337 (syms_of_coding): Don't initialize them.
1338 (CATEGORY_MASK_UTF_16_AUTO): New macro.
1339 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
1340 detect_info->found.
1341 (decode_coding_utf_16): Don't detect BOM here.
1342 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
1343 is NOT utf_16_without_bom.
1344 (setup_coding_system): For a coding system of type utf-16, check
1345 if the attribute :endian is Qbig or not (not nil or not), and set
1346 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
1347 (detect_coding): If coding type is utf-16 and BOM detection is
1348 required, detect it.
1349 (Fdefine_coding_system_internal): For a coding system of type
1350 utf-16, check if the attribute :endian is Qbig or not (not nil or
1351 not).
1352
1353 2003-05-06 Kenichi Handa <handa@m17n.org>
1354
1355 * coding.c (coding_set_source): Fix for the case that the current
1356 buffer is different from coding->src_object.
1357 (decode_coding_object): Don't use the conversion work buffer if
1358 DST_OBJECT is a buffer.
1359
1360 2003-05-04 Dave Love <fx@gnu.org>
1361
1362 * lread.c (read_emacs_mule_char) [len==2]: Index
1363 emacs_mule_charset correctly.
1364
1365 2003-02-16 Dave Love <fx@gnu.org>
1366
1367 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
1368 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
1369 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
1370 treated specially.)
1371 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
1372 (detected_mask): Remove Big5 bits.
1373
1374 2003-04-09 Kenichi Handa <handa@m17n.org>
1375
1376 The following changes are to make the font rescaling facility
1377 compatible with Emacs 21.
1378
1379 * xfaces.c (Vface_font_rescale_alist): Renamed from
1380 Vface_resizing_fonts.
1381 (struct font_name): Rename member resizing_ratio to rescale_ratio.
1382 (font_rescale_ratio): Renamed from font_resizing_ratio.
1383 (split_font_name): Set font->rescale_ratio.
1384 (better_font_p): Pay attention to font->rescale_ratio.
1385 (build_scalable_font_name): Likewise. Change RESX, and RESY
1386 fields.
1387 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
1388 variable.
1389
1390 2003-03-28 Kenichi Handa <handa@m17n.org>
1391
1392 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
1393 (Qutf_16_le): Remove these variables.
1394 (syms_of_coding): Don't DEFSYM them.
1395 (decode_coding_utf_16): Fix handling of BOM.
1396 (encode_coding_utf_16): Fix handling of BOM.
1397
1398 2003-03-14 Kenichi Handa <handa@m17n.org>
1399
1400 * fileio.c (Finsert_file_contents): On replacing, before decoding
1401 the file into the work buffer, set point of the work buffer to the
1402 end.
1403
1404 2003-02-13 Dave Love <fx@gnu.org>
1405
1406 * coding.c (Fcheck_coding_systems_region): Fix type errors.
1407
1408 2003-02-04 Dave Love <fx@gnu.org>
1409
1410 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
1411 and fix C types.
1412
1413 2003-01-31 Kenichi Handa <handa@m17n.org>
1414
1415 * xdisp.c (SKIP_GLYPHS): New macro.
1416 (set_cursor_from_row): Pay attention to string display properties.
1417
1418 * category.c (copy_category_entry): Fix for the case that RANGE
1419 is an integer.
1420
1421 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
1422
1423 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
1424 Qnil.
1425
1426 2003-01-30 Kenichi Handa <handa@m17n.org>
1427
1428 * charset.c (Fcharset_id_internal): New function.
1429 (syms_of_charset): Defsubr it.
1430
1431 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
1432 with the last arg charset_list acquired from coding.
1433 (Fdefine_coding_system_internal): For ccl-based coding system, fix
1434 the attribute coding_attr_ccl_valids.
1435
1436 * coding.h (enum define_coding_ccl_arg_index): Set the first
1437 member coding_arg_ccl_decoder to coding_arg_max.
1438
1439 * ccl.h (ccl_driver): Prototype adjusted.
1440
1441 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
1442 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
1443 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
1444 (Fccl_execute): Call ccl_driver with the last arg Qnil.
1445 (Fccl_execute_on_string): Likewise.
1446
1447 2003-01-11 Kenichi Handa <handa@m17n.org>
1448
1449 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
1450 call encode_char.
1451
1452 * charset.c (encode_char): Fix handling of methods SUBSET and
1453 SUPERSET.
1454
1455 * xterm.c (x_new_fontset): Fix previous change.
1456
1457 2003-01-10 Dave Love <fx@gnu.org>
1458
1459 * composite.c (syms_of_composite): Make composition_hash_table
1460 weak.
1461
1462 2003-01-10 Kenichi Handa <handa@m17n.org>
1463
1464 * dispextern.h (check_face_attributes, generate_ascii_font_name)
1465 (font_name_registry): Don't extern them.
1466 (split_font_name_into_vector, build_font_name_from_vector): Extern
1467 them.
1468
1469 * fontset.h (Qfontset): Don't extern it.
1470 (new_fontset_from_font_name): Extern it.
1471
1472 * fontset.c: Give 8 extra slots to fontset objects.
1473 (Qfontset_info): New variable.
1474 (syms_of_fontset): Defsym it.
1475 (FONTSET_FALLBACK): New macro.
1476 (fontset_face): Try also the default fontset.
1477 (make_fontset): Realize a fallback fontset from the default
1478 fontset.
1479 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
1480 using split_font_name_into_vector and build_font_name_from_vector.
1481 (Fset_fontset_font): Access the elements of font_spec by enum
1482 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
1483 name by using split_font_name_into_vector.
1484 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
1485 generate a proper font name from the fontset name. Update
1486 Vfontset_alias_alist.
1487 (n_auto_fontsets): New variable.
1488 (new_fontset_from_font_name): New function.
1489 (Ffont_info): Store the information about fonts generated from the
1490 default fontset in the first extra slot of the returned
1491 char-table.
1492
1493 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
1494 (font_name_registry): Function deleted.
1495 (split_font_name_into_vector): New function.
1496 (build_font_name_from_vector): New function.
1497 (font_list): The argument REGISTRY is now a list of registry
1498 names.
1499 (choose_face_font): If we are choosing an ASCII font, and ATTRS
1500 specifies an explicit font name, return the name as is. Make a
1501 list of registy names.
1502
1503 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
1504 of x_new_fontset.
1505 (Fx_create_frame): Don't call x_new_fontset here. Just use
1506 x_list_fonts to check the existence of fonts.
1507
1508 * xterm.h (x_new_fontset): Prototype adjusted.
1509
1510 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
1511 string. Use new_fontset_from_font_name to create a fontset from a
1512 font name.
1513
1514 2003-01-07 Dave Love <fx@gnu.org>
1515
1516 * Makefile.in: Fix some dependencies.
1517
1518 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
1519 set it to nil before returning.
1520
1521 * composite.c (update_compositions): Fix type error.
1522
1523 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
1524
1525 2003-01-07 Kenichi Handa <handa@m17n.org>
1526
1527 * xterm.c (x_new_font): Optimize for the case that the font is
1528 already set for the frame.
1529
1530 2003-01-06 Kenichi Handa <handa@m17n.org>
1531
1532 * chartab.c (char_table_ascii): Check if the char table contents
1533 is sub-char-table or not.
1534 (char_table_set): Fix argument to char_table_ascii.
1535 (char_table_set_range): Likewise.
1536
1537 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
1538 (detect_coding_utf_8, detect_coding_utf_16)
1539 (detect_coding_emacs_mule, detect_coding_iso_2022)
1540 (detect_coding_sjis, detect_coding_big5)
1541 (detect_coding_ccl, detect_coding_charset): Change argument MASK
1542 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
1543 sequence is valid in this coding system. Callers changed.
1544 (MAX_ANNOTATION_LENGTH): New macro.
1545 (ADD_ANNOTATION_DATA): New macro.
1546 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
1547 ADD_ANNOTATION_DATA. The format of annotation data changed.
1548 (ADD_CHARSET_DATA): New macro.
1549 (emacs_mule_char): New argument ID. Callers changed.
1550 (decode_coding_emacs_mule, decode_coding_iso_2022)
1551 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
1552 Produce charset annotation data in coding->charbuf.
1553 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
1554 to charset annotation data in coding->charbuf.
1555 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
1556 coding->common_flags if the coding system is iso-2022 based and
1557 uses designation.
1558 (produce_composition): Adjusted for the new annotation data
1559 format.
1560 (produce_charset): New function.
1561 (produce_annotation): Handle charset annotation.
1562 (handle_composition_annotation, handle_charset_annotation): New
1563 functions.
1564 (consume_chars): Handle charset annotation. Utilize the above two
1565 functions.
1566 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
1567 buffer, get the deleted text as a string and set
1568 coding->src_object to that string.
1569 (detect_coding, detect_coding_system): Use the new struct
1570 coding_detection_info.
1571
1572 * coding.h (struct coding_detection_info): New structure.
1573 (struct coding_system): Prototype of the member `detector'
1574 adjusted.
1575 (CODING_ANNOTATE_CHARSET_MASK): New macro.
1576
1577 2003-01-06 Kenichi Handa <handa@m17n.org>
1578
1579 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
1580
1581 2003-01-03 Dave Love <fx@gnu.org>
1582
1583 * keymap.c (apropos_predicate, apropos_accumulate): Declare
1584 static.
1585 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
1586 to new local and nullify apropos_accumulate before returning.
1587 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
1588
1589 2002-12-05 Kenichi Handa <handa@m17n.org>
1590
1591 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
1592 correctly.
1593
1594 2002-11-26 Dave Love <fx@gnu.org>
1595
1596 * fns.c (Flanginfo): Call synchronize_system_time_locale.
1597
1598 2002-11-07 Kenichi Handa <handa@m17n.org>
1599
1600 The following changes are to make character composition happen
1601 automatically on displaying.
1602
1603 * Makefile.in (lisp, shortlisp): Add composite.elc
1604
1605 * composite.h (Qauto_composed, Vauto_composition_function,
1606 Qauto_composition_function): Extern them.
1607
1608 * composite.c (Vcomposition_function_table,
1609 Qcomposition_function_table): Delete variables.
1610 (Qauto_composed, Vauto_composition_function,
1611 Qauto_composition_function): New variables.
1612 (run_composition_function): Don't call
1613 compose-chars-after-function.
1614 (update_compositions): Clear `auto-composed' text property.
1615 (compose_chars_in_text): Delete this function.
1616 (syms_of_composite): Staticpro Qauto_composed and
1617 Qauto_composition_function. Declare Vauto_composition_function as
1618 a Lisp variable.
1619
1620 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
1621
1622 * xdisp.c (it_props): Add an entry for Qauto_composed.
1623 (handle_auto_composed_prop): New function.
1624
1625 * xselect.c (selection_data_to_lisp_data): Don't call
1626 compose_chars_in_text.
1627
1628 2002-11-06 Dave Love <fx@gnu.org>
1629
1630 * keyboard.c (read_char): Modify checking around use of
1631 Vkeyboard_translate_table.
1632
1633 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
1634 and fix C types.
1635
1636 2002-11-06 Kenichi Handa <handa@m17n.org>
1637
1638 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
1639 the case that the last byte is '\r' correctly.
1640 (decode_coding_emacs_mule): Likewise.
1641 (decode_coding_iso_2022): Likewise.
1642 (decode_coding_sjis): Likewise.
1643 (decode_coding_big5): Likewise.
1644 (decode_coding_charset): Likewise.
1645 (produce_chars): Likewise.
1646 (decode_coding): Flushing out the unprocessed data correctly.
1647 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
1648 coding->mode.
1649
1650 2002-10-31 Dave Love <fx@gnu.org>
1651
1652 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
1653 XK_ISO... case.
1654 (xaw_scroll_callback): Revert last change.
1655
1656 2002-10-30 Kenichi Handa <handa@m17n.org>
1657
1658 * charset.c (Fset_charset_priority): Update
1659 Viso_2022_charset_list.
1660
1661 2002-10-29 Kenichi Handa <handa@m17n.org>
1662
1663 * xfaces.c (Vface_resizing_fonts): New variable.
1664 (struct font_name): New member `resizing_ratio'.
1665 (font_resizing_ratio): New function.
1666 (split_font_name): Set font->resizing_ratio.
1667 (better_font_p): Pay attention to font->resizing_ratio.
1668 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
1669 RESX, and RESY fields.
1670 (try_alternative_families): Try scalable fonts if
1671 Vscalable_fonts_allowed is not Qt.
1672 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
1673
1674 2002-10-29 Dave Love <fx@gnu.org>
1675
1676 * xterm.c (xaw_scroll_callback): Cast correctly.
1677
1678 2002-10-28 Dave Love <fx@gnu.org>
1679
1680 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
1681 (lispy_kana_keys): Comment out.
1682 (make_lispy_event) [XK_kana_A]: Comment out.
1683
1684 * xterm.c (xaw_scroll_callback): Cast call_data.
1685 (XTread_socket): Deal with ASCII keysyms.
1686 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
1687
1688 2002-10-27 Dave Love <fx@gnu.org>
1689
1690 * xterm.c (Vx_keysym_table): New.
1691 (syms_of_xterm): Initialize it.
1692 (XTread_socket): Use it.
1693 From head: Eliminate incorrect optimization that tried to avoid
1694 decoding the output of X*LookupString.
1695 (x_get_font_repertory): Delete charset declaration.
1696
1697 2002-10-16 Kenichi Handa <handa@m17n.org>
1698
1699 * coding.c (detect_coding): Fix previous change.
1700 (detect_coding_charset): If only ASCII bytes are found, return 0.
1701 (detect_coding_system): Fix previous change.
1702 (Fdefine_coding_system_internal): Setup CODING_ATTR_ASCII_COMPAT
1703 (attrs) correctly.
1704
1705 2002-10-15 Dave Love <fx@gnu.org>
1706
1707 * coding.c (Fcheck_coding_system): Doc fix.
1708
1709 * editfns.c (Finsert_byte): Return a proper value.
1710
1711 2002-10-14 Kenichi Handa <handa@m17n.org>
1712
1713 * coding.c (decode_coding): Fix args to translate_chars. Pay
1714 attention to Vstandard_translation_table_for_decode.
1715 (encode_coding): Fix args to translate_chars. Pay attention to
1716 Vstandard_translation_table_for_encode.
1717
1718 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
1719 SINGLE_BYTE_CHAR_P.
1720
1721 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
1722 not by SINGLE_BYTE_CHAR_P.
1723
1724 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
1725 SINGLE_BYTE_CHAR_P.
1726
1727 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
1728 SINGLE_BYTE_CHAR_P.
1729
1730 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
1731 by SINGLE_BYTE_CHAR_P.
1732
1733 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
1734 SINGLE_BYTE_CHAR_P.
1735
1736 2002-10-14 Dave Love <fx@gnu.org>
1737
1738 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
1739
1740 2002-10-10 Dave Love <fx@gnu.org>
1741
1742 * fns.c (Flanginfo): Fix typo.
1743
1744 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
1745
1746 2002-10-10 Kenichi Handa <handa@m17n.org>
1747
1748 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
1749 Don't update *mask when correctly detected.
1750 (detect_coding_utf_16): Likewise.
1751 (detect_coding_emacs_mule): Likewise.
1752 (detect_coding_iso_2022): Likewise.
1753 (detect_coding_sjis): Likewise.
1754 (detect_coding_big5): Likewise.
1755 (detect_coding_ccl): Likewise.
1756 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
1757 (detect_eol): Delete the argument CODING, and add the argument
1758 CATEGORY.
1759 (detect_coding): Adjusted for the changes above.
1760 (detect_coding_system): Likewise.
1761
1762 2002-10-09 Kenichi Handa <handa@m17n.org>
1763
1764 * character.c (char_string): Renamed from
1765 char_string_with_unification. Pay attention to
1766 CHAR_MODIFIER_MASK.
1767 (string_char): Renamed from string_char.
1768
1769 * character.h (CHAR_STRING): Call char_string if C is greater than
1770 MAX_3_BYTE_CHAR.
1771 (CHAR_STRING_ADVANCE): Likewise.
1772 (STRING_CHAR): Call string_char instead of
1773 string_char_with_unification.
1774 (STRING_CHAR_AND_LENGTH): Likewise.
1775 (STRING_CHAR_ADVANCE): Likewise.
1776
1777 2002-10-09 Dave Love <fx@gnu.org>
1778
1779 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
1780
1781 2002-10-07 Kenichi Handa <handa@m17n.org>
1782
1783 * keymap.c (push_key_description): Pay attention to
1784 force_multibyte.
1785
1786 * regex.c (re_search_2): Fix for the case of unibyte buffer.
1787
1788 2002-10-06 Dave Love <fx@gnu.org>
1789
1790 * charset.c (define_charset_internal): Rename `supprementary'.
1791
1792 * Makefile.in (lisp, shortlisp): Remove latin-N.
1793
1794 2002-10-05 Dave Love <fx@gnu.org>
1795
1796 * xfns.c (x_window, x_window): Use use_xim.
1797
1798 * xterm.c (use_xim): Initialize.
1799 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
1800 (x_term_init): Maybe set use_xim.
1801
1802 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
1803
1804 2002-10-01 Kenichi Handa <handa@m17n.org>
1805
1806 * search.c (search_buffer): Fix case-fold-search of multibyte
1807 characters.
1808 (boyer_moore): Rename the last argument to char_high_bits.
1809
1810 2002-09-27 Kenichi Handa <handa@m17n.org>
1811
1812 * xdisp.c (display_string): Fix for the case of zero width glyph.
1813
1814 * xfns.c (x_set_font): Change the error message of the case that
1815 x_new_fontset returns Qt.
1816
1817 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
1818 (Finternal_set_lisp_face_attribute): Use signal_error for the
1819 error of invalid fontset.
1820
1821 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
1822 fontset, return Qt.
1823
1824 2002-09-19 Kenichi Handa <handa@m17n.org>
1825
1826 * regex.c (re_search_2): Fix previous change.
1827
1828 2002-09-18 Kenichi Handa <handa@m17n.org>
1829
1830 * syntax.c (skip_syntaxes): Fix previous change.
1831
1832 2002-09-13 Kenichi Handa <handa@m17n.org>
1833
1834 * syntax.c (skip_chars): Fix previous change.
1835 (skip_syntaxes): Fix previous change.
1836
1837 2002-09-06 Dave Love <fx@gnu.org>
1838
1839 * config.in: Restore it.
1840
1841 2002-09-05 Dave Love <fx@gnu.org>
1842
1843 * config.in: Removed (now auto-generated).
1844
1845 * s/usg5-4.h: Fix last change.
1846
1847 * unexelf.c (unexec): Make .got handling not SGI-specific.
1848
1849 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
1850
1851 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
1852
1853 * keyboard.c (read_key_sequence): Fix type error.
1854
1855 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
1856 type error.
1857
1858 * fontset.c (fontset_add): Return Lisp_Object.
1859
1860 2002-09-03 Dave Love <fx@gnu.org>
1861
1862 * charset.h (charset_ordered_list_tick): Declare extern.
1863
1864 2002-09-03 Kenichi Handa <handa@m17n.org>
1865
1866 The following changes (and some of 2002-08-20 changes of mine) are
1867 for handling syntax, category, and case conversion for unibyte
1868 characters by converting them to multibyte on the fly. With these
1869 changes, we don't have to setup syntax and case tables for unibyte
1870 characters in each language environment.
1871
1872 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
1873 multibyte if necessary.
1874
1875 * bytecode.c (Fbyte_code): Likewise.
1876
1877 * character.h (LEADING_CODE_LATIN_1_MIN)
1878 (LEADING_CODE_LATIN_1_MAX): New macros.
1879 (unibyte_to_multibyte_table): Extern it.
1880 (unibyte_char_to_multibyte): New macro.
1881 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
1882 (CHAR_LEADING_CODE): New macro.
1883 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
1884
1885 * character.c (unibyte_to_multibyte_table): New variable.
1886 (unibyte_char_to_multibyte): Move to character.h and defined as
1887 macro.
1888 (multibyte_char_to_unibyte): If C is an eight-bit character,
1889 convert it to the corresponding byte value.
1890
1891 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
1892 not 1, singals an error. Update the elements of
1893 unibyte_to_multibyte_table.
1894 (init_charset_once): Initialize unibyte_to_multibyte_table.
1895 (syms_of_charset): Define the charset `iso-8859-1'.
1896
1897 * casefiddle.c (casify_object): Fix previous change.
1898
1899 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
1900 as is without converting it to unibyte. In a unibyte buffer,
1901 convert C to multibyte before checking the syntax.
1902
1903 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
1904
1905 * minibuf.c (Fminibuffer_complete_word): Use the macro
1906 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
1907
1908 * regex.h (struct re_pattern_buffer): New member target_multibyte.
1909
1910 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
1911 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
1912 that is zero, convert an eight-bit char to multibyte.
1913 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
1914 non-emacs case.
1915 (PATFETCH): Convert an eight-bit char to multibyte.
1916 (HANDLE_UNIBYTE_RANGE): New macro.
1917 (regex_compile): Setup the compiled pattern for multibyte chars
1918 even if the given regex string is unibyte. Use PATFETCH_RAW
1919 instead of PATFETCH in many places. To handle `charset'
1920 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
1921 only for ASCII chars.
1922 (analyse_first) <exactn>: Simplified because the compiled pattern
1923 is multibyte.
1924 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
1925 <charset>: Use CHAR_LEADING_CODE to get leading codes.
1926 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
1927 here.
1928 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
1929 multibyte always 1.
1930 (re_search_2) In emacs, set the locale variable multibyte to 1,
1931 otherwise to 0. New local variable target_multibyte. Check it
1932 to decide the multibyteness of STR1 and STR2. If
1933 target_multibyte is zero, convert unibyte chars to multibyte
1934 before translating and checking fastmap.
1935 (TARGET_CHAR_AND_LENGTH): New macro.
1936 (re_match_2_internal): In emacs, set the locale variable multibyte
1937 to 1, otherwise to 0. New local variable target_multibyte. Check
1938 it to decide the multibyteness of STR1 and STR2. Use
1939 TARGET_CHAR_AND_LENGTH to fetch a character from D.
1940 <charset, charset_not>: If multibyte is nonzero, check fastmap
1941 only for ASCII chars. Call bcmp_translate with
1942 target_multibyte, not with multibyte.
1943 <begline>: Declare the local variable C as `unsigned'.
1944 (bcmp_translate): Change the last arg name to target_multibyte.
1945
1946 * search.c (compile_pattern_1): Don't adjust the multibyteness of
1947 the regexp pattern and the matching target. Set cp->buf.multibyte
1948 to the multibyteness of the regexp pattern. Set
1949 cp->but.target_multibyte to the multibyteness of the matching
1950 target.
1951 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
1952 FETCH_STRING_CHAR_ADVANCE.
1953 (Freplace_match): Convert unibyte chars to multibyte.
1954
1955 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
1956 unibyte chars to multibyte.
1957 (back_comment): Likewise.
1958 (scan_words): Likewise.
1959 (skip_chars): The arg syntaxp is deleted, and the code for
1960 handling syntaxes is moved to skip_syntaxes. Callers changed.
1961 Fix the case that the multibyteness of STRING and the current
1962 buffer doesn't match.
1963 (skip_syntaxes): New function.
1964 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
1965 SINGLE_BYTE_CHAR_P.
1966 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
1967 chars to multibyte.
1968 (scan_lists): Likewise.
1969 (Fbackward_prefix_chars): Likewise.
1970 (scan_sexps_forward): Likewise.
1971
1972 2002-08-23 Kenichi Handa <handa@m17n.org>
1973
1974 * xfaces.c (QCfontset): New variable.
1975 (LFACE_FONTSET): New macro.
1976 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
1977 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
1978 (Finternal_set_lisp_face_attribute): Handle QCfontset.
1979 (Finternal_get_lisp_face_attribute): Likewise.
1980 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
1981 check also LFACE_FONTSET_INDEX.
1982 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
1983 attrs[LFACE_FONT_INDEX].
1984 (syms_of_xfaces): Intern and staticpro QCfontset.
1985
1986 * dispextern.h (enum lface_attribute_index): New member
1987 LFACE_FONTSET_INDEX.
1988
1989 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
1990
1991 2002-08-21 Kenichi Handa <handa@m17n.org>
1992
1993 * coding.c (coding_set_destination): Fix coding->destination for
1994 the case converting a region.
1995 (encode_coding_utf_8): Encode eight-bit chars as single byte.
1996 (encode_coding_object): Fix coding->dst_pos and
1997 coding->dst_pos_byte for the case converting a region.
1998
1999 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
2000
2001 * character.h (BYTE8_STRING): New macro.
2002
2003 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
2004
2005 2002-08-20 Kenichi Handa <handa@m17n.org>
2006
2007 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
2008 characters by octal form.
2009
2010 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
2011
2012 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
2013 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
2014 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
2015 (FETCH_CHAR_AS_MULTIBYTE): New macro.
2016
2017 * casetab.c (set_canon, set_identity, shuffle): Simplified.
2018
2019 * casefiddle.c (casify_object): Simplified. Handle the case that
2020 the case conversion change the byte length.
2021 (casify_region): Likewise
2022
2023 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
2024 macros.
2025
2026 * character.c (_fetch_multibyte_char_len): This variable deleted.
2027 (syms_of_character): Setup Vprintable_chars.
2028
2029 * editfns.c (Fchar_equal): Fix for the unibyte case.
2030 (Finsert_byte): New function.
2031 (syms_of_editfns): Defsubr it.
2032
2033 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
2034 of direct code 0x3ffff.
2035
2036 * search.c (Freplace_match): Fix for the unibyte case.
2037
2038 2002-08-19 Kenichi Handa <handa@m17n.org>
2039
2040 * lread.c (safe_to_load_p): Fix the logic.
2041
2042 * syntax.c (scan_words): Don't treat characters belonging to
2043 different scripts as constituting a word.
2044
2045 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2046
2047 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
2048 script.
2049
2050 * emacs.c (main): In the case of --unibyte, instead of aborting on
2051 finding non-empty buffer, make it unibyte.
2052
2053 2002-08-18 Kenichi Handa <handa@m17n.org>
2054
2055 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
2056 to create a fontset.
2057
2058 2002-08-18 Dave Love <fx@gnu.org>
2059
2060 * character.c (Funibyte_char_to_multibyte): Doc fix.
2061
2062 * xfns.c [HAVE_STDLIB_H]: Fix last change.
2063
2064 2002-08-15 Kenichi Handa <handa@m17n.org>
2065
2066 * fontset.c (fontset_add): Make the type `int'.
2067 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
2068
2069 * character.c (unibyte_char_to_multibyte): Refer to
2070 charset_unibyte, not charset_primary.
2071 (multibyte_char_to_unibyte): Likewise.
2072 (Funibyte_char_to_multibyte): Likewise.
2073
2074 * charset.h: (charset_unibyte): Extern it instead of
2075 charset_primary.
2076
2077 * charset.c (charset_unibyte): Renamed from charset_primary.
2078 (Funibyte_charset): Renamed from Fprimary_charset.
2079 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
2080 (syms_of_charset): Adjusted for the above changes.
2081
2082 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
2083 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
2084 it->multibyte_p is zero.
2085
2086 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
2087 Extern deleted.
2088
2089 2002-08-08 Kenichi Handa <handa@m17n.org>
2090
2091 * coding.c (Fdefine_coding_system_internal): Fix category setting
2092 for a coding system of type iso-2022.
2093
2094 2002-08-02 Kenichi Handa <handa@m17n.org>
2095
2096 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
2097 -1.
2098
2099 2002-08-01 Kenichi Handa <handa@m17n.org>
2100
2101 * syntax.c (Vnext_word_boundary_function_table): New variable.
2102 (syms_of_syntax): Declare it as a Lisp variable.
2103 (scan_words): Call functions in Vnext_word_boundary_function_table
2104 if any.
2105
2106 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
2107
2108 * fontset.c (fs_load_font): If fontp->charset is not negative,
2109 return fontp without setting its members.
2110
2111 2002-07-31 Dave Love <fx@gnu.org>
2112
2113 * config.in: Generated with autoheader.
2114
2115 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
2116
2117 * m/sparc.h (HAVE_ALLOCA): Delete.
2118
2119 * s/irix6-5.h: Don't include strings.h.
2120 (bcopy, bzero, bcmp): Don't undef.
2121
2122 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
2123
2124 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
2125 (TIOCSIGSEND): Don't test IRIX6.
2126 (bcopy, bzero, bcmp): Define conditionally.
2127
2128 2002-07-31 Kenichi Handa <handa@m17n.org>
2129
2130 * buffer.c (Qas, Qmake, Qto): New variables.
2131 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
2132 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
2133
2134 * callproc.c (Fcall_process): Don't call insert_1_both directly if
2135 we are inserting a process output into a multibyte buffer.
2136
2137 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
2138 multibyte_char_to_unibyte.
2139
2140 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
2141 by the primary charset, make it eight-bit char.
2142 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
2143
2144 * charset.c: (charset_eight_bit, Qeight_bit_control): New
2145 variables.
2146 (charset_8_bit__control, charset_8_bit_graphic,
2147 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
2148 (define_charset_internal): New function.
2149 (syms_of_charset): Call define_charset_internal for pre-defined
2150 charsets.
2151
2152 * charset.h (charset_8_bit): Extern it.
2153
2154 * coding.c (make_conversion_work_buffer): Adjusted for the change
2155 of Fset_buffer_multibyte.
2156 (encode_coding_raw_text): Increment p0 in the loop.
2157
2158 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
2159
2160 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
2161 for the change of Fset_buffer_multibyte.
2162
2163 * fns.c (Fstring_to_multibyte): New function.
2164 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
2165
2166 2002-07-30 Dave Love <fx@gnu.org>
2167
2168 * xfns.c (x_put_x_image): Declare args.
2169
2170 * xfaces.c (font_name_registry, choose_face_font): Delete unused
2171 vars.
2172 (try_font_list): Declare an arg.
2173
2174 * xdisp.c (message2_nolog, set_message): Declare an arg.
2175
2176 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
2177
2178 * syntax.c (scan_sexps_forward): Declare an arg.
2179
2180 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
2181 Declare an arg.
2182
2183 * lisp.h (Fnew_fontset): Declare.
2184
2185 * keymap.c (push_key_description): Call CHARACTERP correctly.
2186
2187 * fontset.c (fontset_add): Declare args. Call make_number
2188 correctly.
2189 (face_for_char): Delete unused vars.
2190 (Fset_fontset_font): Doc fix. Delete unused vars.
2191
2192 * doc.c (Fsubstitute_command_keys): Delete unused vars.
2193
2194 * composite.c (update_compositions): Declare arg.
2195
2196 * cm.c (calccost, cmgoto): Declare args.
2197
2198 * charset.c: Remove `emacs' conditional. Doc fixes.
2199 (map_char_table_for_charset): Declare.
2200
2201 * character.c (syms_of_character) <translation-table-vector>: Doc
2202 fix.
2203
2204 * ccl.c: Remove `emacs' conditional. Include hash table stuff
2205 from trunk.
2206
2207 2002-07-26 Kenichi Handa <handa@m17n.org>
2208
2209 The following changes are to allow specifying multiple font
2210 patterns for a character range (specified by script or charset).
2211
2212 * Makefile.in (abbrev.o): Depend on syntax.h.
2213 (xfaces.o): Depend on charset.h.
2214
2215 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
2216 SINGLE_BYTE_CHAR_P.
2217
2218 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
2219
2220 * character.h (Vchar_script_table): Extern it.
2221
2222 * character.c (Vscript_alist): This variable deleted.
2223 (Vchar_script_table, Qchar_script_table): New variable.
2224 (syms_of_character): Declare Vchar_script_table as a lisp variable
2225 and initialize it.
2226
2227 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
2228 have property char-table-extra-slots, make no extra slot.
2229
2230 * dispextern.h (struct face): Member `charset' deleted.
2231 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
2232 SINGLE_BYTE_CHAR_P.
2233 (FACE_FOR_CHAR): Likewise.
2234 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
2235 prototypes
2236 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
2237 fixed.
2238 (generate_ascii_font_name): Renamed from generate_ascii_font.
2239
2240 * fontset.h (get_font_repertory_func): New prototype.
2241 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
2242 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
2243
2244 * fontset.c (Qprepend, Qappend): New variables.
2245 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
2246 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
2247 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
2248 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
2249 (fontset_ref_and_range, fontset_add, reorder_font_vector)
2250 (load_font_get_repertory): New functions.
2251 (fontset_set): This function deleted.
2252 (fontset_face): New arg FACE. Return face ID, not face.
2253 Completely re-written to handle new fontset structure. Caller
2254 changed.
2255 (free_face_fontset): Use ASET istead of AREF (X) = Y.
2256 (face_for_char): Don't call lookup_face.
2257 (make_fontset_for_ascii_face): New arg FACE.
2258 (fs_load_font): New arg CHARSET_ID. Don't check
2259 Vfont_encoding_alist here.
2260 (find_font_encoding): New function.
2261 (list_fontsets): Use STRINGP, not ! NILP.
2262 (accumulate_script_ranges): New function.
2263 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
2264 re-written to handle new fontset structure.
2265 (Ffontset_font): Return a copy of element.
2266 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
2267 docstring of font-encoding-alist.
2268
2269 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
2270 (Fset_fotset_font): Fix arguments to 5.
2271
2272 * msdos.c (XMenuActivate): Adjuted for the change of
2273 lookup_derived_face.
2274
2275 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
2276 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2277 (highlight_trailing_whitespace): Adjusted for the change of
2278 lookup_named_face.
2279
2280 * xfaces.c: Include charset.h.
2281 (load_face_font): Argument C deleted. Caller changed.
2282 (generate_ascii_font_name): Renamed from generate_ascii_font.
2283 (font_name_registry): New function.
2284 (cache_face): Store ascii faces before non-ascii faces in buckets.
2285 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
2286 Lookup only ascii faces.
2287 (lookup_non_ascii_face): New function.
2288 (lookup_named_face): Argument C deleted. Caller changed.
2289 (lookup_derived_face): Argument C deleted. Caller changed.
2290 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
2291 a string, just call font_list with it.
2292 (choose_face_font): Arguments FACE and C deleted. New arg
2293 FONT_SPEC. Caller changed.
2294 (realize_face): Arguments C and BASE_FACE deleted. Caller
2295 (realize_x_face): Likewise.
2296 (realize_non_ascii_face): New function.
2297 (realize_x_face): Call load_face_font here.
2298 (realize_tty_face): Argument C deleted. Caller changed.
2299 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
2300 get a face ID.
2301 (dump_realized_face): Don't print charset of FACE.
2302
2303 * xfns.c (x_set_font): Always call x_new_fontset and
2304 store_frame_parameter.
2305 (Fx_create_frame): Call x_new_fontset, not x_new_font.
2306 (syms_of_xfns): Set get_font_repertory_func to
2307 x_get_font_repertory.
2308
2309 * xterm.h (x_get_font_repertory): Extern it.
2310
2311 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
2312 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
2313 it->multibyte_p is zero.
2314 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
2315 (x_new_fontset): If FONTSETNAME doesn't match any existing
2316 fontsets, create a new one.
2317 (x_get_font_repertory): New function.
2318
2319 2002-07-25 Kenichi Handa <handa@m17n.org>
2320
2321 * coding.c (Ffind_coding_systems_region_internal): Detect an
2322 ASCII only string correctly.
2323
2324 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
2325 version is 0.
2326
2327 2002-07-24 Kenichi Handa <handa@m17n.org>
2328
2329 * lread.c: Include "coding.h".
2330 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
2331 load_each_byte, unread_char): New variables.
2332 (readchar_backlog): This variable deleted.
2333 (readchar): Return a character unless load_each_byte is nonzero.
2334 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
2335 cons. If unread_char is not -1, simply return it.
2336 (unreadchar): Handle the case that readcharfun is
2337 Qget_emacs_mule_file_char or a cons. Set unread_char if
2338 necessary.
2339 (read_multibyte): This function deleted.
2340 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
2341 (read_emacs_mule_char): New functions.
2342 (Fload): Even if the file doesn't have the extention ".elc", if
2343 safe_to_load_p returns a positive version number, assume that the
2344 file contains bytecompiled code. If the version is less than 22,
2345 load the file while decoding multibyte sequences by emacs-mule.
2346 (readevalloop): Don't use readchar_backlog.
2347 (Fread): Likewise. Pay attention to the case that STREAM is a
2348 cons.
2349 (Fread_from_string): Pay attention to the case that STREAM is a
2350 cons.
2351 (read_escape): The arg BYTEREP deleted.
2352 (read1): Set load_each_byte to 1 temporarily while handling
2353 #@NUMBER. Don't call read_multibyte.
2354 (read_vector): Call Fread with a cons. If readcharfun is
2355 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
2356 (read_list): If doc_reference is 2, make the cdr part string as
2357 unibyte.
2358 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
2359 and Qload_force_doc_strings.
2360
2361 2002-07-23 Kenichi Handa <handa@m17n.org>
2362
2363 * xdisp.c (face_before_or_after_it_pos): Call
2364 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
2365
2366 2002-07-22 Kenichi Handa <handa@m17n.org>
2367
2368 * character.h (TRAILING_CODE_P): New macro.
2369 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
2370 (string_char_with_unification): Fix prototype.
2371 (Vscript_alist): Extern it.
2372
2373 * character.c (Vscript_alist): New variable.
2374 (string_char_with_unification): Add `const' to local variables.
2375 (str_as_unibyte): Likewise.
2376 (string_escape_byte8): Likewise.
2377 (syms_of_character): Declare script-alist as a Lisp variable.
2378
2379 * charset.h (Vcharset_ordered_list): Extern it.
2380 (charset_ordered_list_tick): Extern it.
2381 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
2382 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
2383 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
2384 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
2385 (Funify_charset): Adjusted for the change of Funify_charset.
2386
2387 * charset.c (charset_ordered_list_tick): New variable.
2388 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
2389 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
2390 deunify intead of unify a charset.
2391 (string_xstring_p): Add `const' to local variables.
2392 (find_charsets_in_text): Add `const' to arguemnts and local
2393 variables.
2394 (encode_char): Adjusted for the change of Funify_charset. Fix
2395 detecting of invalid code.
2396 (Fset_charset_priority): Increment charset_ordered_list_tick.
2397 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
2398 and TO_CODE.
2399
2400 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
2401 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
2402 deleted. Callers changed to use
2403 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
2404 (decode_coding_ccl): Add `const' to local variables.
2405 (consume_chars): Likewise.
2406 (Ffind_coding_systems_region_internal): Likewise.
2407 (Fcheck_coding_systems_region): Likewise.
2408
2409 * print.c (print_object): Use octal form for printing the
2410 contents of a bool vector.
2411
2412 2002-07-18 Dave Love <fx@gnu.org>
2413
2414 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
2415 <version == 20>: Refuse to load.
2416
2417 2002-07-17 Dave Love <fx@gnu.org>
2418
2419 * fns.c: Move coding.h.
2420 (Qcodeset, Qdays, Qmonths): New.
2421 (concat): Use CHARACTERP instead of INTERGERP.
2422 (Flocale_codeset): Deleted.
2423 (Flanginfo): New function.
2424 (syms_of_fns): Changed accordingly.
2425
2426 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
2427
2428 2002-07-16 Dave Love <fx@gnu.org>
2429
2430 * casetab.c (init_casetab_once, init_casetab_once): Fix
2431 CHAR_TABLE_SET call.
2432
2433 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
2434
2435 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
2436
2437 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
2438 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
2439 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
2440
2441 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
2442
2443 * coding.c (ENCODE_DESIGNATION, decode_eol)
2444 (make_conversion_work_buffer, code_conversion_restore)
2445 (Fdefine_coding_system_internal): Convert Lisp types.
2446 (code_conversion_restore): Use EQ, not ==.
2447 (Fencode_coding_string): Fix code_convert_string call.
2448
2449 * coding.h (code_convert_region): Fix prototype.
2450
2451 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
2452
2453 * fontset.c (fontset_ref, fontset_set, fs_load_font)
2454 (Ffontset_info): Convert Lisp types.
2455
2456 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
2457
2458 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
2459
2460 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
2461
2462 * chartab.c: Include "...h", not <...h> in some cases.
2463
2464 * callproc.c (Fcall_process): Remove unused variables.
2465
2466 2002-07-12 Dave Love <fx@gnu.org>
2467
2468 * coding.c (Fset_coding_system_priority): Allow null arg list.
2469
2470 2002-07-03 Dave Love <fx@gnu.org>
2471
2472 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
2473 (Fself_insert_and_exit): Use CHARACTERP.
2474
2475 * callproc.c (Fcall_process): Remove unused vars.
2476
2477 * xterm.c (XTread_socket): Add extra dead keysyms.
2478
2479 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
2480
2481 * dispextern.h: Remove prototypes for redraw_frame,
2482 redraw_garbaged_frames.
2483
2484 * cmds.c (Fself_insert_command): Use CHARACTERP.
2485
2486 * chartab.c (make_sub_char_table): Remove unused var.
2487 (Fset_char_table_default, Fmap_char_table): Doc fix.
2488
2489 * keymap.c (access_keymap): Remove generic char code.
2490 (push_key_description): Use CHARACTERP.
2491
2492 2002-07-01 Dave Love <fx@gnu.org>
2493
2494 * charset.c: Doc fixes.
2495 (Funify_charset): Extra checking.
2496
2497 2002-06-24 Dave Love <fx@gnu.org>
2498
2499 * lread.c: Remove some unused variables.
2500 (safe_to_load_p): If safe, return the magic number version byte.
2501 (Fload): Maybe use load-with-code-conversion.
2502
2503 2002-06-12 Kenichi Handa <handa@m17n.org>
2504
2505 * category.c (Fmodify_category_entry): Don't modify the contents
2506 of category_set for characters out of the range. Avoid
2507 unnecessary modification.
2508
2509 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
2510 Vchar_unify_table. The default value of the table is now nil.
2511
2512 * character.c (syms_of_character): Setup Vchar_width_table for
2513 eight-bit-control and raw-byte chars.
2514
2515 * charset.h (enum define_charset_arg_index): Delete
2516 charset_arg_parents and add charset_arg_subset and
2517 charset_arg_superset.
2518 (enum charset_attr_index): Delete charset_parents and add
2519 charset_subset and charset_superset.
2520 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
2521 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
2522 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
2523 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
2524 (CHARSET_SUPERSET): New macros.
2525 (charset_work): Extern it.
2526 (ENCODE_CHAR): Use charset_work.
2527 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
2528 (map_charset_chars): Extern it.
2529
2530 * charset.c (load_charset_map): Set the default value of encoder
2531 and deunifier char-tables to nil.
2532 (map_charset_chars): Argument changed. Callers changed. Use
2533 map_char_table_for_charset instead of map_char_table.
2534 (Fmap_charset_chars): New optional args from_code and to_code.
2535 (Fdefine_charset_internal): Adjusted for the change of
2536 `define-charset' (:parents -> :subset or :superset).
2537 (charset_work): New variable.
2538 (encode_char): Adjusted for the change of
2539 Fdefine_charset_internal.
2540 (syms_of_charset): Likewise.
2541 (Ffind_charset_string): Setup the vector `charsets' correctly.
2542
2543 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
2544 the previous change.
2545 (char_table_ref_and_range): Adjusted for the above change.
2546 (map_sub_char_table_for_charset): New function.
2547 (map_char_table_for_charset): New function.
2548
2549 * keymap.c (describe_vector): Handle a char-table directly here.
2550 (describe_char_table): Deleted.
2551
2552 * lisp.h (map_charset_chars): Deleted.
2553
2554 2002-06-11 Dave Love <fx@gnu.org>
2555
2556 * fns.c (count_combining): Comment out (unused).
2557 (Flocale_codeset): New.
2558 (syms_of_fns): Defsubr it.
2559
2560 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
2561 (size_t): Removed.
2562
2563 2002-06-06 Dave Love <fx@gnu.org>
2564
2565 * Makefile.in (chartab.o): Depend on charset.h
2566
2567 2002-06-03 Kenichi Handa <handa@m17n.org>
2568
2569 * character.c (syms_of_character): Set the default value of
2570 Vprintable_chars to Qnil.
2571
2572 2002-05-31 Dave Love <fx@gnu.org>
2573
2574 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
2575
2576 2002-05-31 Kenichi Handa <handa@m17n.org>
2577
2578 * charset.c (load_charset_map): Handle the case that from < to
2579 correctly.
2580
2581 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
2582 chars.
2583 (encode_coding_iso_2022): Likewise.
2584 (encode_coding_sjis): Likewise.
2585 (encode_coding_big5): Likewise.
2586 (encode_coding_charset): Likewise.
2587
2588 2002-05-30 Kenichi Handa <handa@m17n.org>
2589
2590 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
2591 not bytecompiled now.
2592 (shortlisp): Likewise.
2593
2594 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
2595 (charset_jisx0208): New variables.
2596 (Fdefine_charset_internal): Setup them if appropriate.
2597 (init_charset_once): Initialize them to -1.
2598
2599 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
2600 charset_jisx0208): Extern them.
2601
2602 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
2603 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
2604 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
2605 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
2606 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
2607 and CODING_ISO_FLAG_USE_OLDJIS.
2608 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
2609 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
2610 (encode_coding_iso_2022): Change the 1st arg to
2611 ENCODE_ISO_CHARACTER to a variable.
2612
2613 2002-05-29 Kenichi Handa <handa@m17n.org>
2614
2615 * charset.h (enum define_charset_arg_index): New enums
2616 charset_arg_min_code and charset_arg_max_code.
2617 (struct charset): New member char_index_offset.
2618
2619 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
2620 into account.
2621 (INDEX_TO_CODE_POINT): Likewise.
2622 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
2623 args[charset_arg_max_code]. Setup charset.char_index_offset.
2624 (syms_of_charset): Fix args to Fdefine_charset_internal.
2625
2626 2002-05-27 Dave Love <fx@gnu.org>
2627
2628 * coding.c (decode_coding_utf_8): Reject overlong sequences.
2629
2630 2002-05-26 Dave Love <fx@gnu.org>
2631
2632 * coding.c: Doc fixes.
2633 (Fcoding_system_aliases): Fix return value.
2634 (Qmac): Remove (duplicated) definition.
2635
2636 2002-05-25 Dave Love <fx@gnu.org>
2637
2638 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
2639 functions.
2640
2641 * character.c (Fstring): Doc fix.
2642
2643 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
2644
2645 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
2646 ids.
2647 (font-encoding-alist): Doc fix.
2648
2649 2002-05-24 Dave Love <fx@gnu.org>
2650
2651 * term.c (costs_set): Declare static, non-initialized for pcc.
2652 (encode_terminal_code): Remove ensued var.
2653
2654 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
2655 for K&R.
2656
2657 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
2658
2659 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
2660 (suffixes): Moved out of make_subsidiaries for K&R.
2661
2662 * charset.c (map_charset_chars): Fix c_function declaration for
2663 K&R.
2664
2665 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
2666
2667 2002-05-23 Dave Love <fx@gnu.org>
2668
2669 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
2670
2671 * category.c (Fmodify_category_entry): Doc fix. Remove unused
2672 vars.
2673
2674 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
2675
2676 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
2677
2678 * coding.c (Fdefine_coding_system_internal): Fix previous change.
2679 (decode_coding_charset): Workaround for the bug of GCC 2.96.
2680
2681 2002-05-23 Kenichi Handa <handa@m17n.org>
2682
2683 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
2684 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
2685 (shortlisp): Likewise.
2686
2687 2002-05-22 Kenichi Handa <handa@m17n.org>
2688
2689 * coding.c (decode_coding_charset): Adjusted for the change of
2690 Fdefine_coding_system_internal.
2691 (Fdefine_coding_system_internal): For a coding system of
2692 `charset' type, store a list of charset IDs in
2693 `charset_attr_charset_valids' element of coding attributes.
2694
2695 * charset.c (Fmake_char): Fix previous change.
2696
2697 2002-05-21 Kenichi Handa <handa@m17n.org>
2698
2699 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
2700 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
2701 changed. Handle 2-byte and 3-byte charsets correctly.
2702 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
2703 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
2704 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
2705 (DECODE_EMACS_MULE_21_COMPOSITION): Call
2706 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
2707 sequence.
2708 (decode_coding_emacs_mule): Handle composition correctly. Rewind
2709 `src' and `consumed_chars' correctly before calling
2710 emacs_mule_char.
2711 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
2712 and alt&rule composition.
2713 (decode_coding_iso_2022): Handle composition correctly.
2714 (init_coding_once): Setup emacs_mule_bytes for private charsets.
2715
2716 * charset.c (Fdefine_charset_internal): Fix bug for the case of
2717 re-defining a charset. If the charset has :emacs-mule-id, setup
2718 emacs_mule_bytes.
2719 (Fmake_char): If CODE1 is nil, use the minimum code of the
2720 charset.
2721
2722 2002-05-20 Kenichi Handa <handa@m17n.org>
2723
2724 * coding.c (encode_coding_iso_2022): If coding requires safe
2725 encoding, produce a character specified by
2726 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
2727 (encode_coding_sjis): Likewise.
2728 (encode_coding_big5): Likewise.
2729 (encode_coding_charset): Likewise.
2730
2731 2002-05-17 Dave Love <fx@gnu.org>
2732
2733 * xterm.c (XSetIMValues): Declare.
2734
2735 * process.c: Conditionally include sys/wait.h, pty.h.
2736
2737 * print.c (print_object): Fix print format for 64-bit
2738 systems.
2739
2740 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
2741 systems.
2742
2743 * buffer.c (emacs_strerror): Declare.
2744 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
2745 from trunk.
2746
2747 * fontset.c (Fclear_face_cache): Declare.
2748 (accumulate_font_info): Commented-out (unused).
2749 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
2750 variables.
2751
2752 * character.h (string_escape_byte8): Declare.
2753
2754 * charset.c (load_charset_map, load_charset_map_from_file): Remove
2755 unused vars.
2756 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
2757 (Fmap_charset_chars): Doc fix.
2758
2759 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
2760 Removed.
2761 (Fset_coding_system_priority, Fset_coding_system_priority)
2762 (Fdefine_coding_system_internal): Doc fix.
2763
2764 2002-05-16 Dave Love <fx@gnu.org>
2765
2766 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
2767
2768 2002-05-16 Kenichi Handa <handa@m17n.org>
2769
2770 * character.c (string_escape_byte8): Make multibyte string with
2771 correct size.
2772
2773 * charset.c (Fmake_char): Delete unnecessary code.
2774
2775 2002-05-14 Kenichi Handa <handa@m17n.org>
2776
2777 * xfns.c (x_encode_text): Allocate coding.destination here, and
2778 call encode_coding_object with dst_object Qnil.
2779
2780 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
2781 multibyte form correctly.
2782
2783 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
2784 against Vfont_encoding_alist.
2785
2786 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
2787 handling of charset list.
2788 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
2789 (decode_coding_object): Move point to coding->dst_pos before
2790 calling post-read-conversion function.
2791 (encode_coding_object): Give correct arguments to
2792 pre-write-conversion. Ignore the return value of
2793 pre-write-conversion function. Pay attention to the case that
2794 pre-write-conversion changes the current buffer. If dst_object is
2795 Qt, even if coding->src_bytes is zero, allocate at least one byte
2796 to coding->destination.
2797
2798 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
2799
2800 * charset.c (Fmake_char): Make it more backward compatible.
2801 (Fmap_charset_chars): Fix docstring.
2802
2803 2002-05-13 Dave Love <fx@gnu.org>
2804
2805 * coding.c: Doc fixes.
2806 (Fdefine_coding_system_alias): Use names, not symbols, in
2807 coding-system-alist.
2808
2809 2002-05-13 Kenichi Handa <handa@m17n.org>
2810
2811 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
2812 of calling free_realized_face.
2813
2814 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
2815
2816 * charset.c (load_charset_map): Fix previous change.
2817 (read_hex): Don't treat SPC as a comment starter.
2818 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
2819 -1.
2820 (Fdecode_char): Fix typo.
2821
2822 2002-05-10 Kenichi Handa <handa@m17n.org>
2823
2824 * charset.h (struct charset): New member `code_space_mask'.
2825
2826 * coding.c (coding_set_source): Delete the local variable
2827 beg_byte.
2828 (encode_coding_charset): Delete the local variable charset.
2829 (Fdefine_coding_system_internal): Likewise.
2830 (Fdefine_coding_system_internal): Setup
2831 attrs[coding_attr_charset_valids] correctly.
2832
2833 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
2834 member to check if CODE is valid or not.
2835 (Fdefine_charset_internal): Initialize `code_space_mask' member.
2836 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
2837 is within the range of charset->min_code and carset->max_code.
2838
2839 2002-05-09 Dave Love <fx@gnu.org>
2840
2841 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
2842
2843 * dispextern.h (generate_ascii_font): Fix return type.
2844
2845 * xfaces.c (generate_ascii_font): Fix arg declaration.
2846
2847 * coding.c (coding_inherit_eol_type)
2848 (Fset_terminal_coding_system_internal)
2849 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
2850
2851 2002-05-08 Kenichi Handa <handa@m17n.org>
2852
2853 * coding.c (decode_coding_charset, encode_coding_charset): Handle
2854 multiple charsets correctly.
2855
2856 2002-05-07 Kenichi Handa <handa@m17n.org>
2857
2858 * search.c (boyer_moore): Fix handling of mulitbyte character
2859 translation.
2860
2861 * xdisp.c (display_mode_element): When the variable `elt' is
2862 changed, update `this' and `lisp_string'.
2863
2864 2002-05-07 Kenichi Handa <handa@m17n.org>
2865
2866 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
2867
2868 * callproc.c (Fcall_process): Be sure to give the current buffer
2869 to decode_coding_c_string. Update PT and PT_BYTE after the
2870 insertion.
2871
2872 * charset.c (struct charset_map_entries): New struct.
2873 (load_charset_map): Renamed from parse_charset_map. New args
2874 entries and n_entries. Caller changed.
2875 (load_charset_map_from_file): Renamed from load_charset_map.
2876 Caller changed. New arg control_flag. Call load_charset_map at
2877 the tail.
2878 (load_charset_map_from_vector): New function.
2879 (Fdefine_charset_internal): Setup charset.compact_codes_p.
2880 (encode_char): If the charset is compact, change a character index
2881 to a code point.
2882
2883 * coding.c (coding_alloc_by_making_gap): Check the case that the
2884 source and destination are the same correctly.
2885 (decode_coding_raw_text): Set coding->consumed_char and
2886 coding->consumed to 0.
2887 (produce_chars): If coding->chars_at_source is nonzero, update
2888 coding->consumed_char and coding->consumed before calling
2889 alloc_destination.
2890 (Fdefine_coding_system_alias): Register ALIAS in
2891 Vcoding_system_alist.
2892 (syms_of_coding): Define `no-convesion' coding system at the tail.
2893
2894 * fileio.c (Finsert_file_contents): Set coding_system instead of
2895 val. If the current buffer is multibyte, always call
2896 decode_coding_gap.
2897
2898 * xfaces.c (try_font_list): Give higher priority to fontset's
2899 family than face's family.
2900
2901 2002-04-18 Kenichi Handa <handa@m17n.org>
2902
2903 * callproc.c (Fcall_process): Be sure to give the current buffer
2904 to decode_coding_c_string.
2905
2906 * xfaces.c (try_font_list): Give a family specified in a fontset
2907 higher priority than a family specified in a face.
2908
2909 2002-04-09 Kenichi Handa <handa@m17n.org>
2910
2911 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
2912 Fix arguments to insert_from_buffer.
2913
2914 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
2915
2916 2002-03-11 Kenichi Handa <handa@m17n.org>
2917
2918 * coding.c (produce_chars): Set the variable `multibytep' correctly.
2919 (decode_coding_gap): Set coding->dst_multibyte correctly.
2920
2921 2002-03-07 Kenichi Handa <handa@m17n.org>
2922
2923 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
2924 (decode_coding_utf_16): Fix converting high and low bytes to
2925 code-point.
2926 (encode_coding_utf_16): Substitute coding->default_char for
2927 non-Unicode characters.
2928 (decode_coding): Don't call record_insert here.
2929 (setup_coding_system): Initialize `surrogate' of
2930 coding->spec.utf_16 to 0.
2931 (EMIT_ONE_BYTE): Fix for multibyte case.
2932
2933 * insdel.c (insert_from_gap): Call record_insert.
2934
2935 2002-03-04 Kenichi Handa <handa@m17n.org>
2936
2937 * casefiddle.c (casify_region): Fix multibyte case.
2938
2939 * character.c (c_string_width): Add return type `int'.
2940 (char_string_with_unification): Arg ADVANCED deleted.
2941
2942 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
2943 (CHAR_STRING): Adjusted for the change of
2944 char_string_with_unification.
2945 (CHAR_STRING_ADVANCE): Make it do-while statement.
2946
2947 * chartab.c (sub_char_table_set_range): Optimized for the case
2948 DEPTH == 3. Add workaround code for a GCC optimization bug.
2949
2950 * charset.c (parse_charset_map): Remove an unused variable.
2951
2952 * coding.c: Delete unused variables.
2953
2954 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
2955 earlier. If inserted is zero and the coding system doesn't
2956 require flushing, don't call decode_coding_gap.
2957
2958 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
2959
2960 2002-03-01 Kenichi Handa <handa@m17n.org>
2961
2962 The following changes are for using Unicode as an internal
2963 character model, and use UTF-8 format for buffer/string
2964 representation.
2965
2966 * .gdbinit (xchartable): Adjusted for the change of char table
2967 structure.
2968 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
2969
2970 * Makefile.in (obj): Add character.o and chartab.o.
2971 (lisp, shortlisp): Remove utf-8.elc:
2972 (*.o): For many files, change dependency on charset.h to
2973 character.h, and add dependency on character.h.
2974 (character.o, chartab.o): New targets.
2975
2976 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
2977 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
2978 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
2979 of "charset.h".
2980
2981 * dired.c, filelock.c: Include "character.h".
2982
2983 * alloc.c: Include "character.h" instead of "charset.h".
2984 (Fmake_char_table): Moved to chartab.c.
2985 (make_sub_char_table): Likewise.
2986 (syms_of_alloc): Remove defsubr for Smake_char_table.
2987
2988 * buffer.c: Include "character.h" instead of "charset.h", don't
2989 include "coding.h".
2990 (Fset_buffer_multibyte): Adjuted for UTF-8.
2991
2992 * buffer.h: EXFUN Fbuffer_live_p.
2993
2994 * callproc.c: Include "character.h" instead of "charset.h".
2995 (Fcall_process): Big change for the new code-conversion APIs.
2996
2997 * casetab.c: Include "character.h" instead of "charset.h".
2998 (set_canon, set_identity, shuffle): Adjusted for the new
2999 map_char_table spec.
3000 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
3001 accessing the char table structure.
3002
3003 * chartab.c: New file that implements char table.
3004
3005 * category.c: Include "character.h".
3006 (copy_category_entry): New function.
3007 (copy_category_table): Call map_char_table and copy_category_entry.
3008 (Fmake_category_table): Initialize all top-vel slots.
3009 (char_category_set): New function.
3010 (modify_lower_category_set): Deleted.
3011 (Fmodify_category_entry): Call char_table_ref_and_range.
3012
3013 * category.h (CATEGORY_SET): Just call char_category_set.
3014
3015 * ccl.c: Include "character.h".
3016 (Qccl, Qcclp): New variables.
3017 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
3018 it's less than 256.
3019 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
3020 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
3021 and DST type.
3022 (ccl_driver): Types of arguments changed. Code adjusted for that.
3023 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
3024 ccl_driver.
3025 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
3026
3027 * ccl.h (struct ccl_program): Members eol_type and multibyte
3028 deleted. New members src_multibyte, dst_multibyte, consumed, and
3029 produced.
3030 (struct ccl_spec): Members decoder and encoder deleted. New
3031 memeber ccl.
3032 (CODING_SPEC_CCL_PROGRAM): New macro.
3033 (ccl_driver): Prototype updated.
3034 (Qccl, Qcclp, Fccl_program_p): Extern them.
3035 (CHECK_CCL_PROGRAM): New macro.
3036
3037 * character.c, character.h, chartab.c: New files.
3038
3039 * charset.c: Mostly re-written. Character and multibyte sequence
3040 handling codes are moved to character.c.
3041
3042 * charset.h: Mostly re-written. Character and multibyte sequence
3043 handling codes are moved to character.h.
3044
3045 * coding.c, coding.h: Mostly re-written.
3046
3047 * composite.c: Include "character.h" instead of "charset.h".
3048 (CHAR_WIDTH): Moved to character.h.
3049 (HASH_KEY, HASH_VALUE): Deleted.
3050
3051 * composite.h (enum composition_method): Order of enumeration
3052 symbols changed.
3053
3054 * data.c: Include "character.h" instead of "charset.h".
3055 (Faref): Call CHAR_TABLE_REF for a char table.
3056 (Faset): Call CHAR_TABLE_SET for a char table.
3057
3058 * dispextern.h (free_realized_face, check_face_attribytes,
3059 generate_ascii_font): Extern them.
3060 (free_realized_multibyte_face): Extern deleted.
3061
3062 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
3063 table structure.
3064
3065 * editfns.c: Include "character.h" instead of "charset.h".
3066 (Fchar_to_string): Always call CHAR_STRING.
3067
3068 * emacs.c (main): Call init_charset_once, init_charset,
3069 syms_of_chartab, and syms_of_character.
3070
3071 * fileio.c: Include "character.h" instead of "charset.h".
3072 (Finsert_file_contents): Big change for the new code-conversion
3073 API.
3074 (choose_write_coding_system): Likewise.
3075 (Fwrite_region): Likewise.
3076 (build_annotations_2): Deleted.
3077 (e_write): Big change for the new code-conversion API.
3078
3079 * fns.c: Include "character.h" instead of "charset.h".
3080 (copy_sub_char_table): Moved to chartab.c.
3081 (Fcopy_sequence): Call copy_char_table for a char table.
3082 (concat): Delete codes calling count_multibyte.
3083 (string_char_to_byte): Adjusted for the new multibyte form.
3084 (string_byte_to_char): Likewise.
3085 (internal_equal): Adjusted for the change of char table structure.
3086 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
3087 Fchar_table_extra_slot, Fset_char_table_extra_slot,
3088 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
3089 char_table_translate, optimize_sub_char_table,
3090 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
3091 chartab.c.
3092 (char_table_ref_and_index): Deleted.
3093 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
3094 (Fmd5): Call preferred_coding_system instead of accessing
3095 Vcoding_category_list. Adjusted for the new code-conversion API.
3096 (syms_of_fns): Defsubr for char table related functions moved to
3097 chartab.c.
3098
3099 * fontset.c: Mostly re-written.
3100
3101 * fontset.h (struct font_info): Type of the member encoding_type
3102 changed.
3103 (enum FONT_SPEC_INDEX): New enum.
3104 (fontset_font_pattern, fs_load_font): Prototype updated.
3105 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
3106
3107 * indent.c: Include "character.h" instead of "charset.h".
3108 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
3109 WIDTH_BY_CHAR_HEAD.
3110
3111 * insdel.c: Include "character.h" instead of "charset.h".
3112 (copy_text): Don't refer to Vnonascii_translation_table.
3113 (insert_from_gap): New function.
3114
3115 * keyboard.c: Include "character.h" instead of "charset.h".
3116 (command_loop_1): Never call direct_output_forward_char before
3117 a non-ASCII character.
3118 (read_char): If Vkeyboard_translate_table is a char table, always
3119 translated a character.
3120
3121 * keymap.c: Include "character.h".
3122 (store_in_keymap): Handle the case that IDX is a cons.
3123 (Fdefine_key): Handle the case that KEY is a cons and the car part
3124 is also a cons (range).
3125 (push_key_description): Adjusted for the new character code.
3126 (describe_vector): Call describe_char_table for a char table.
3127 (describe_char_table): New function.
3128
3129 * keymap.h (describe_char_table): Extern it.
3130
3131 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
3132 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
3133 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
3134 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
3135 Deleted.
3136 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
3137 structure.
3138 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
3139 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
3140 CHARTAB_SIZE_BITS_3): New macros.
3141 (chartab_size): Extern it.
3142 (struct Lisp_Char_Table): Re-designed.
3143 (struct Lisp_Sub_Char_Table): New structure.
3144 (HASH_KEY, HASH_VALUE): Moved from fns.c.
3145 (CHARACTERBITS): Defined as 22.
3146 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
3147 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
3148 (GC_SUB_CHAR_TABLE_P): New macro.
3149 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
3150 (code_convert_string_norecord): Extern deleted.
3151 (init_character_once, syms_of_character, init_charset,
3152 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
3153
3154 * lread.c: Include "character.h".
3155 (read_multibyte): New arg NBYTES.
3156 (read_escape): The meaning of returned *BYTEREP changed.
3157 (to_multibyte): Deleted.
3158 (read1): Adjuted the handling of char table and string.
3159
3160 * print.c: Include "character.h" instead of "charset.h".
3161 (print_string): Convert 8-bit raw bytes to octal form by
3162 string_escape_byte8.
3163 (print_object): Adjusted for the new multibyte form. Print 8-bit
3164 raw bytes always in octal form. Handle sub char table correctly.
3165
3166 * process.c: Include "character.h" instead of "charset.h".
3167 (read_process_output): Adjusted for the new code-conversion API.
3168 (send_process): Likewise.
3169
3170 * puresize.h (BASE_PURESIZE): Increased.
3171
3172 * regex.c: Include "character.h" instead of "charset.h".
3173 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
3174 (regex_compile): Accept a range whose starting and ending
3175 character have different leading bytes.
3176 (analyse_first): Adjusted for the above change.
3177
3178 * search.c: Include "character.h" instead of "charset.h".
3179 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
3180 (Freplace_match): Adjusted for the change of
3181 multibyte_char_to_unibyte.
3182
3183 * syntax.c: Include "character.h" instead of "charset.h".
3184 (syntax_parent_lookup): Deleted.
3185 (Fmodify_syntax_entry): Accept a cons as CHAR.
3186 (skip_chars): Adjusted for the new multibyte form.
3187 (init_syntax_once): Call char_table_set_range instead of directly
3188 accessing the structure of a char table.
3189
3190 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
3191 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
3192 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
3193 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
3194
3195 * term.c: Include "buffer.h" and "character.h".
3196 (encode_terminal_code): Adjusted for the new code-conversion API.
3197 (write_glyphs): Likewise.
3198 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
3199
3200 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
3201
3202 * xdisp.c: Include "character.h".
3203 (get_next_display_element): Adjusted for the new multibyte form.
3204 (disp_char_vector): Adjusted for the new char table structure.
3205 (decode_mode_spec_coding): Adjusted for the new structure of
3206 coding system.
3207 (decode_mode_spec): Adjusted for the new code-conversion API.
3208
3209 * xfaces.c: Include "character.h" instead of "charset.h".
3210 (load_face_font): Adjusted for the change of choose_face_font and
3211 FS_LOAD_FONT.
3212 (generate_ascii_font): New function.
3213 (set_lface_from_font_name): Adjusted for the change of
3214 FS_LOAD_FONT.
3215 (set_font_frame_param): Adjusted for the change of
3216 choose_face_font.
3217 (free_realized_face): Make it public.
3218 (free_realized_faces_for_fontset): Renamed from
3219 free_realized_multibyte_face. Free also faces realized for ASCII.
3220 (choose_face_font): Argments changed. Adjusted for the change of
3221 fontset_font_pattern and FS_LOAD_FONT.
3222
3223 * xfns.c: Include "character.h".
3224 (x_encode_text): Adjusted for the new code-conversion API.
3225
3226 * xselect.c: Don't include "charset.h".
3227 (selection_data_to_lisp_data): Adjusted for the new code
3228 covnersion API.
3229
3230 * xterm.c: Include "character.h".
3231 (x_encode_char): New argument CHARSET. Caller changed.
3232 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
3233 SPLIT_CHAR.
3234 (x_get_glyph_face_and_encoding): Likewise.
3235 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
3236 CHAR_WIDTH instead of CHARSET_WIDTH.
3237 (XTread_socket): Adjusted for the new code-conversion API.
3238 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
3239 (x_load_font): Adjusted for the change of struct font.
3240
3241 ;; Local Variables:
3242 ;; coding: iso-2022-7bit
3243 ;; End:
3244
3245 Copyright (C) 2002 Free Software Foundation, Inc.
3246 Copying and distribution of this file, with or without modification,
3247 are permitted provided the copyright notice and this notice are preserved.
3248
3249 ;;; arch-tag: 1bff38bd-2030-46ae-9d18-f15e6006b665