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