(read_process_output): Handle carryover correctly.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
dd8c7a53
KH
12003-06-05 Kenichi Handa <handa@m17n.org>
2
3 * process.c (read_process_output): Handle carryover correctly.
4
b884eb4d
DL
52003-06-02 Dave Love <fx@gnu.org>
6
7 * regex.c (re_search_2): Fix last change.
8
dd8c7a53 92003-05-30 Kenichi Handa <handa@m17n.org>
f50e280d
KH
10
11 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
12 target_multibyte. Even in a unibyte case, return a converted
13 multibyte char.
14 (GET_CHAR_AFTER): New macro.
15 (PATFETCH): Translate via multibyte char.
16 (HANDLE_UNIBYTE_RANGE): Delete this macro.
17 (SETUP_MULTIBYTE_RANGE): New macro.
18 (regex_compile): Setup compiled code so that its multibyteness
19 matches that of a target. Fix the handling of "[X-YZ]" using
20 SETUP_MULTIBYTE_RANGE.
21 (analyse_first) <charset>: For filling fastmap for all multibyte
22 characters, don't check by BASE_LEADING_CODE_P.
23 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
24 the same as RE_MULTIBYTE_P (bufp) now.
25 (mutually_exclusive_p): Check by (! multibyte ||
26 IS_REAL_ASCII (c)).
27 (TARGET_CHAR_AND_LENGTH): Delete this macro.
28 (TRANSLATE_VIA_MULTIBYTE): New macro.
29 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
30 It is the same as RE_MULTIBYTE_P (bufp) now.
31 <exactn>: Translate via multibyte.
32 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
33 translate it.
34 <charset, charset_not>: Fetch a character by
35 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
36 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
37 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
38 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
39 by GET_CHAR_AFTER.
40 (bcmp_translate): Likewise.
41
42 * search.c (compile_pattern): Check the member target_multibyte,
43 not the member multibyte of buf.
44
45 * lread.c (read1): While reading a string, set force_singlebyte
46 and force_multibyte correctly.
47
48 * charset.c (Fset_unibyte_charset): Fix setting up of
49 unibyte_to_multibyte_table.
50 (init_charset_once): Likewise.
51
81f41166
KH
522003-05-29 Kenichi Handa <handa@m17n.org>
53
54 * coding.c (setup_coding_system): If coding has
55 post-read-conversion or pre-write-conversion, set
56 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
57 respectively.
58 (decode_coding_gap): Run post-read-conversion if any.
59
063dfaf5
KH
60 * fileio.c (Finsert_file_contents): Even if we read into a
61 unibyte buffer, check if we must decode the result or not.
62
cfd5bdb9
KH
632003-05-29 Kenichi Handa <handa@m17n.org>
64
65 * coding.c (make_conversion_work_buffer): Change the work buffer
66 name to the same one as that of Emacs 21.
67
4776e638
KH
682003-05-28 Kenichi Handa <handa@m17n.org>
69
70 * coding.h (make_conversion_work_buffer): Prototype adjusted.
71 (code_conversion_restore): Don't extern it.
72
73 * coding.c (detected_mask): Delete unused variable.
74 (decode_coding_iso_2022): Pay attention to the byte sequence of
75 CTEXT extended segment, and retain those bytes as is.
76 (decode_coding_ccl): Delete unused variable `valids'.
77 (setup_coding_system): Delete unused variable `category'.
78 (consume_chars): Delete unused variable `category'. Make it work
79 for non-multibyte case.
80 (make_conversion_work_buffer): Argument changed.
81 (saved_coding): Delete unused variable.
82 (code_conversion_restore): Don't check saved_coding->destination.
83 (code_conversion_save): New function.
84 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
85 instead of record_unwind_protect.
86 (decode_coding_object, encode_coding_object): Likewise. Recover
87 PT.
88 (detect_coding_system): Delete unused variable `mask'.
89 (Fdefine_coding_system_internal): Delete unsed vaiable id;
90
91 * fileio.c (kill_workbuf_unwind): New function.
92 (Finsert_file_contents): On replacing, call
93 make_conversion_work_buffer with correct args, and call
94 record_unwind_protect with the first arg kill_workbuf_unwind.
95
96 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
97
f106f9b0
KH
982003-05-20 Kenichi Handa <handa@m17n.org>
99
100 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
101 FONTSET_NAME.
102 (fontset_add): Fix for the case that TO is less than TO1.
103 (Ffontset_info): Don't use fallback fontset on checking the
104 default fontset.
105 (dump_fontset): New function for debugging.
106
107 * coding.c (Fdefine_coding_system_internal): Fix for the case that
108 coding_type is Qcharset.
109
ed7219f8
KH
1102003-05-07 Kenichi Handa <handa@m17n.org>
111
112 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
113 (map_char_table): Don't inherit the value from the parent on
114 initializing VAL. Adjusted for the above change.
115
fd12904b
KH
1162003-05-06 Kenichi Handa <handa@m17n.org>
117
118 * coding.c (Qsignature, Qendian): Delete these variables.
119 (syms_of_coding): Don't initialize them.
120 (CATEGORY_MASK_UTF_16_AUTO): New macro.
121 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
122 detect_info->found.
123 (decode_coding_utf_16): Don't detect BOM here.
124 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
125 is NOT utf_16_without_bom.
126 (setup_coding_system): For a coding system of type utf-16, check
127 if the attribute :endian is Qbig or not (not nil or not), and set
128 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
129 (detect_coding): If coding type is utf-16 and BOM detection is
130 required, detect it.
131 (Fdefine_coding_system_internal): For a coding system of type
132 utf-16, check if the attribute :endian is Qbig or not (not nil or
133 not).
134
bf470ae2
KH
1352003-05-06 Kenichi Handa <handa@m17n.org>
136
137 * coding.c (coding_set_source): Fix for the case that the current
138 buffer is different from coding->src_object.
139 (decode_coding_object): Don't use the conversion work buffer if
140 DST_OBJECT is a buffer.
141
407a1f19
DL
1422003-05-04 Dave Love <fx@gnu.org>
143
144 * lread.c (read_emacs_mule_char) [len==2]: Index
145 emacs_mule_charset correctly.
146
1472003-02-16 Dave Love <fx@gnu.org>
148
149 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
150 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
151 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
152 treated specially.)
153 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
154 (detected_mask): Remove Big5 bits.
155
bf470ae2 1562003-04-09 Kenichi Handa <handa@m17n.org>
c64d66eb
KH
157
158 The following changes are to make the font rescaling facility
159 compatible with Emacs 21.
160
161 * xfaces.c (Vface_font_rescale_alist): Renamed from
162 Vface_resizing_fonts.
163 (struct font_name): Rename member resizing_ratio to rescale_ratio.
164 (font_rescale_ratio): Renamed from font_resizing_ratio.
165 (split_font_name): Set font->rescale_ratio.
166 (better_font_p): Pay attention to font->rescale_ratio.
167 (build_scalable_font_name): Likewise. Change RESX, and RESY
168 fields.
169 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
170 variable.
171
bf470ae2 1722003-03-28 Kenichi Handa <handa@m17n.org>
c64d66eb
KH
173
174 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
175 (Qutf_16_le): Remove these variables.
176 (syms_of_coding): Don't DEFSYM them.
177 (decode_coding_utf_16): Fix handling of BOM.
178 (encode_coding_utf_16): Fix handling of BOM.
179
afe6e43e
KH
1802003-03-14 Kenichi Handa <handa@m17n.org>
181
182 * fileio.c (Finsert_file_contents): On replacing, before decoding
183 the file into the work buffer, set point of the work buffer to the
184 end.
185
eb1d57f0
DL
1862003-02-13 Dave Love <fx@gnu.org>
187
188 * coding.c (Fcheck_coding_systems_region): Fix type errors.
189
7258f1f7
DL
1902003-02-04 Dave Love <fx@gnu.org>
191
192 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
193 and fix C types.
194
a82f9242
KH
1952003-01-31 Kenichi Handa <handa@m17n.org>
196
197 * xdisp.c (SKIP_GLYPHS): New macro.
198 (set_cursor_from_row): Pay attention to string display properties.
199
200 * category.c (copy_category_entry): Fix for the case that RANGE
201 is an integer.
202
203 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
204
205 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
206 Qnil.
207
8dcbea82
KH
2082003-01-30 Kenichi Handa <handa@m17n.org>
209
30959a42
KH
210 * charset.c (Fcharset_id_internal): New function.
211 (syms_of_charset): Defsubr it.
212
8dcbea82
KH
213 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
214 with the last arg charset_list acquired from coding.
215 (Fdefine_coding_system_internal): For ccl-based coding system, fix
216 the attribute coding_attr_ccl_valids.
217
218 * coding.h (enum define_coding_ccl_arg_index): Set the first
219 member coding_arg_ccl_decoder to coding_arg_max.
220
221 * ccl.h (ccl_driver): Prototype adjusted.
222
223 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
224 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
225 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
226 (Fccl_execute): Call ccl_driver with the last arg Qnil.
227 (Fccl_execute_on_string): Likewise.
228
1ab88162
KH
2292003-01-11 Kenichi Handa <handa@m17n.org>
230
9a02732d
KH
231 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
232 call encode_char.
233
234 * charset.c (encode_char): Fix handling of methods SUBSET and
235 SUPERSET.
236
1ab88162
KH
237 * xterm.c (x_new_fontset): Fix previous change.
238
b418f8a6
DL
2392003-01-10 Dave Love <fx@gnu.org>
240
241 * composite.c (syms_of_composite): Make composition_hash_table
242 weak.
243
23b513e6
KH
2442003-01-10 Kenichi Handa <handa@m17n.org>
245
246 * dispextern.h (check_face_attributes, generate_ascii_font_name)
247 (font_name_registry): Don't extern them.
248 (split_font_name_into_vector, build_font_name_from_vector): Extern
249 them.
250
251 * fontset.h (Qfontset): Don't extern it.
252 (new_fontset_from_font_name): Extern it.
253
254 * fontset.c: Give 8 extra slots to fontset objects.
255 (Qfontset_info): New variable.
256 (syms_of_fontset): Defsym it.
257 (FONTSET_FALLBACK): New macro.
258 (fontset_face): Try also the default fontset.
259 (make_fontset): Realize a fallback fontset from the default
260 fontset.
261 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
262 using split_font_name_into_vector and build_font_name_from_vector.
263 (Fset_fontset_font): Access the elements of font_spec by enum
264 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
265 name by using split_font_name_into_vector.
266 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
267 generate a proper font name from the fontset name. Update
268 Vfontset_alias_alist.
269 (n_auto_fontsets): New variable.
270 (new_fontset_from_font_name): New function.
271 (Ffont_info): Store the information about fonts generated from the
272 default fontset in the first extra slot of the returned
273 char-table.
274
275 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
276 (font_name_registry): Function deleted.
277 (split_font_name_into_vector): New function.
278 (build_font_name_from_vector): New function.
279 (font_list): The argument REGISTRY is now a list of registry
280 names.
281 (choose_face_font): If we are choosing an ASCII font, and ATTRS
282 specifies an explicit font name, return the name as is. Make a
283 list of registy names.
284
285 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
286 of x_new_fontset.
287 (Fx_create_frame): Don't call x_new_fontset here. Just use
288 x_list_fonts to check the existence of fonts.
289
290 * xterm.h (x_new_fontset): Prototype adjusted.
291
292 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
293 string. Use new_fontset_from_font_name to create a fontset from a
294 font name.
295
5c2a8d5d
DL
2962003-01-07 Dave Love <fx@gnu.org>
297
298 * Makefile.in: Fix some dependencies.
299
300 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
301 set it to nil before returning.
302
303 * composite.c (update_compositions): Fix type error.
304
305 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
306
07ad7d43
KH
3072003-01-07 Kenichi Handa <handa@etl.go.jp>
308
309 * xterm.c (x_new_font): Optimize for the case that the font is
310 already set for the frame.
311
372edcb6
KH
3122003-01-06 Kenichi Handa <handa@m17n.org>
313
5a843785
KH
314 * chartab.c (char_table_ascii): Check if the char table contents
315 is sub-char-table or not.
316 (char_table_set): Fix argument to char_table_ascii.
317 (char_table_set_range): Likewise.
318
372edcb6
KH
319 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
320 (detect_coding_utf_8, detect_coding_utf_16)
321 (detect_coding_emacs_mule, detect_coding_iso_2022)
322 (detect_coding_sjis, detect_coding_big5)
323 (detect_coding_ccl, detect_coding_charset): Change argument MASK
324 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
325 sequence is valid in this coding system. Callers changed.
326 (MAX_ANNOTATION_LENGTH): New macro.
327 (ADD_ANNOTATION_DATA): New macro.
328 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
329 ADD_ANNOTATION_DATA. The format of annotation data changed.
330 (ADD_CHARSET_DATA): New macro.
331 (emacs_mule_char): New argument ID. Callers changed.
332 (decode_coding_emacs_mule, decode_coding_iso_2022)
333 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
334 Produce charset annotation data in coding->charbuf.
335 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
336 to charset annotation data in coding->charbuf.
337 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
338 coding->common_flags if the coding system is iso-2022 based and
339 uses designation.
340 (produce_composition): Adjusted for the new annotation data
341 format.
342 (produce_charset): New function.
343 (produce_annotation): Handle charset annotation.
344 (handle_composition_annotation, handle_charset_annotation): New
345 functions.
346 (consume_chars): Handle charset annotation. Utilize the above two
347 functions.
348 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
349 buffer, get the deleted text as a string and set
350 coding->src_object to that string.
351 (detect_coding, detect_coding_system): Use the new struct
352 coding_detection_info.
353
354 * coding.h (struct coding_detection_info): New structure.
355 (struct coding_system): Prototype of the member `detector'
356 adjusted.
357 (CODING_ANNOTATE_CHARSET_MASK): New macro.
358
b0f48139
KH
3592003-01-06 Kenichi Handa <handa@etl.go.jp>
360
361 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
362
ddbe25cd
DL
3632003-01-03 Dave Love <fx@gnu.org>
364
365 * keymap.c (apropos_predicate, apropos_accumulate): Declare
366 static.
367 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
368 to new local and nullify apropos_accumulate before returning.
369 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
370
d8e5d5d5
KH
3712002-12-05 Kenichi Handa <handa@m17n.org>
372
373 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
374 correctly.
375
8395d850
DL
3762002-11-26 Dave Love <fx@gnu.org>
377
378 * fns.c (Flanginfo): Call synchronize_system_time_locale.
379
6d710052
KH
3802002-11-07 Kenichi Handa <handa@m17n.org>
381
664557e2
KH
382 The following changes are to make character composition happen
383 automatically on displaying.
384
6d710052
KH
385 * Makefile.in (lisp, shortlisp): Add composite.elc
386
387 * composite.h (Qauto_composed, Vauto_composition_function,
388 Qauto_composition_function): Extern them.
389
390 * composite.c (Vcomposition_function_table,
391 Qcomposition_function_table): Delete variables.
392 (Qauto_composed, Vauto_composition_function,
393 Qauto_composition_function): New variables.
394 (run_composition_function): Don't call
395 compose-chars-after-function.
396 (update_compositions): Clear `auto-composed' text property.
397 (compose_chars_in_text): Delete this function.
398 (syms_of_composite): Staticpro Qauto_composed and
399 Qauto_composition_function. Declare Vauto_composition_function as
400 a Lisp variable.
401
402 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
403
404 * xdisp.c (it_props): Add an entry for Qauto_composed.
405 (handle_auto_composed_prop): New function.
406
407 * xselect.c (selection_data_to_lisp_data): Don't call
408 compose_chars_in_text.
409
31237400
DL
4102002-11-06 Dave Love <fx@gnu.org>
411
8395d850
DL
412 * keyboard.c (read_char): Modify checking around use of
413 Vkeyboard_translate_table.
414
31237400
DL
415 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
416 and fix C types.
417
a2309271
KH
4182002-11-06 Kenichi Handa <handa@m17n.org>
419
420 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
421 the case that the last byte is '\r' correctly.
422 (decode_coding_emacs_mule): Likewise.
423 (decode_coding_iso_2022): Likewise.
424 (decode_coding_sjis): Likewise.
425 (decode_coding_big5): Likewise.
426 (decode_coding_charset): Likewise.
427 (produce_chars): Likewise.
428 (decode_coding): Flushing out the unprocessed data correctly.
429 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
430 coding->mode.
431
f8220f02
DL
4322002-10-31 Dave Love <fx@gnu.org>
433
434 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
435 XK_ISO... case.
436 (xaw_scroll_callback): Revert last change.
437
47a62f29
KH
4382002-10-30 Kenichi Handa <handa@m17n.org>
439
440 * charset.c (Fset_charset_priority): Update
441 Viso_2022_charset_list.
442
66318d27
KH
4432002-10-29 Kenichi Handa <handa@m17n.org>
444
445 * xfaces.c (Vface_resizing_fonts): New variable.
446 (struct font_name): New member `resizing_ratio'.
447 (font_resizing_ratio): New function.
448 (split_font_name): Set font->resizing_ratio.
449 (better_font_p): Pay attention to font->resizing_ratio.
450 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
451 RESX, and RESY fields.
452 (try_alternative_families): Try scalable fonts if
453 Vscalable_fonts_allowed is not Qt.
454 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
455
bafe0027
DL
4562002-10-29 Dave Love <fx@gnu.org>
457
458 * xterm.c (xaw_scroll_callback): Cast correctly.
459
d366847c
DL
4602002-10-28 Dave Love <fx@gnu.org>
461
5fd4f266
DL
462 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
463 (lispy_kana_keys): Comment out.
464 (make_lispy_event) [XK_kana_A]: Comment out.
465
d366847c
DL
466 * xterm.c (xaw_scroll_callback): Cast call_data.
467 (XTread_socket): Deal with ASCII keysyms.
468 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
469
8d4258ad
DL
4702002-10-27 Dave Love <fx@gnu.org>
471
472 * xterm.c (Vx_keysym_table): New.
473 (syms_of_xterm): Initialize it.
474 (XTread_socket): Use it.
475 From head: Eliminate incorrect optimization that tried to avoid
476 decoding the output of X*LookupString.
477 (x_get_font_repertory): Delete charset declaration.
478
49820699
KH
4792002-10-16 Kenichi Handa <handa@m17n.org>
480
481 * coding.c (detect_coding): Fix previous change.
584948ac
KH
482 (detect_coding_charset): If only ASCII bytes are found, return 0.
483 (detect_coding_system): Fix previous change.
484 (Fdefine_coding_system_internal): Setup CODING_ATTR_ASCII_COMPAT
485 (attrs) correctly.
49820699 486
df769590
DL
4872002-10-15 Dave Love <fx@gnu.org>
488
9b3b3211
DL
489 * coding.c (Fcheck_coding_system): Doc fix.
490
df769590
DL
491 * editfns.c (Finsert_byte): Return a proper value.
492
04ceba19
KH
4932002-10-14 Kenichi Handa <handa@etl.go.jp>
494
495 * coding.c (decode_coding): Fix args to translate_chars. Pay
496 attention to Vstandard_translation_table_for_decode.
497 (encode_coding): Fix args to translate_chars. Pay attention to
498 Vstandard_translation_table_for_encode.
499
500 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
501 SINGLE_BYTE_CHAR_P.
502
503 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
504 not by SINGLE_BYTE_CHAR_P.
505
506 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
507 SINGLE_BYTE_CHAR_P.
508
509 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
510 SINGLE_BYTE_CHAR_P.
511
512 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
513 by SINGLE_BYTE_CHAR_P.
514
515 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
516 SINGLE_BYTE_CHAR_P.
517
89364cda
DL
5182002-10-14 Dave Love <fx@gnu.org>
519
520 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
521
102ae470
DL
5222002-10-10 Dave Love <fx@gnu.org>
523
3294d15a
DL
524 * fns.c (Flanginfo): Fix typo.
525
102ae470
DL
526 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
527
e2881131
KH
5282002-10-10 Kenichi Handa <handa@m17n.org>
529
530 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
531 Don't update *mask when correctly detected.
532 (detect_coding_utf_16): Likewise.
533 (detect_coding_emacs_mule): Likewise.
534 (detect_coding_iso_2022): Likewise.
535 (detect_coding_sjis): Likewise.
536 (detect_coding_big5): Likewise.
537 (detect_coding_ccl): Likewise.
538 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
539 (detect_eol): Delete the argument CODING, and add the argument
540 CATEGORY.
541 (detect_coding): Adjusted for the changes above.
542 (detect_coding_system): Likewise.
543
c3c8dc52
KH
5442002-10-09 Kenichi Handa <handa@m17n.org>
545
546 * character.c (char_string): Renamed from
547 char_string_with_unification. Pay attention to
548 CHAR_MODIFIER_MASK.
549 (string_char): Renamed from string_char.
550
551 * character.h (CHAR_STRING): Call char_string if C is greater than
552 MAX_3_BYTE_CHAR.
553 (CHAR_STRING_ADVANCE): Likewise.
554 (STRING_CHAR): Call string_char instead of
555 string_char_with_unification.
556 (STRING_CHAR_AND_LENGTH): Likewise.
557 (STRING_CHAR_ADVANCE): Likewise.
558
102ae470
DL
5592002-10-09 Dave Love <fx@gnu.org>
560
561 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
562
ba5e343c
KH
5632002-10-07 Kenichi Handa <handa@m17n.org>
564
565 * keymap.c (push_key_description): Pay attention to
566 force_multibyte.
567
568 * regex.c (re_search_2): Fix for the case of unibyte buffer.
569
0aeb059a
DL
5702002-10-06 Dave Love <fx@gnu.org>
571
3d775be9
DL
572 * charset.c (define_charset_internal): Rename `supprementary'.
573
0aeb059a
DL
574 * Makefile.in (lisp, shortlisp): Remove latin-N.
575
68352d8b
DL
5762002-10-05 Dave Love <fx@gnu.org>
577
578 * xfns.c (x_window, x_window): Use use_xim.
579
580 * xterm.c (use_xim): Initialize.
581 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
582 (x_term_init): Maybe set use_xim.
583
584 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
585
af1b4a53
KH
5862002-10-01 Kenichi Handa <handa@m17n.org>
587
588 * search.c (search_buffer): Fix case-fold-search of multibyte
589 characters.
590 (boyer_moore): Rename the last argument to char_high_bits.
591
57d83313
KH
5922002-09-27 Kenichi Handa <handa@etl.go.jp>
593
594 * xdisp.c (display_string): Fix for the case of zero width glyph.
595
596 * xfns.c (x_set_font): Change the error message of the case that
597 x_new_fontset returns Qt.
598
599 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
600 (Finternal_set_lisp_face_attribute): Use signal_error for the
601 error of invalid fontset.
602
603 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
604 fontset, return Qt.
605
89233d40
KH
6062002-09-19 Kenichi Handa <handa@etl.go.jp>
607
608 * regex.c (re_search_2): Fix previous change.
609
ade8ee9e
KH
6102002-09-18 Kenichi Handa <handa@etl.go.jp>
611
612 * syntax.c (skip_syntaxes): Fix previous change.
613
bc796a59
KH
6142002-09-13 Kenichi Handa <handa@etl.go.jp>
615
616 * syntax.c (skip_chars): Fix previous change.
617 (skip_syntaxes): Fix previous change.
618
f4e0b434
DL
6192002-09-06 Dave Love <fx@gnu.org>
620
621 * config.in: Restore it.
622
d336654e
DL
6232002-09-05 Dave Love <fx@gnu.org>
624
83f814e2
DL
625 * config.in: Removed (now auto-generated).
626
d336654e
DL
627 * s/usg5-4.h: Fix last change.
628
629 * unexelf.c (unexec): Make .got handling not SGI-specific.
630
631 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
632
633 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
634
635 * keyboard.c (read_key_sequence): Fix type error.
636
637 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
638 type error.
639
640 * fontset.c (fontset_add): Return Lisp_Object.
641
688e6cf5
DL
6422002-09-03 Dave Love <fx@gnu.org>
643
644 * charset.h (charset_ordered_list_tick): Declare extern.
645
3fd31366
KH
6462002-09-03 Kenichi Handa <handa@etl.go.jp>
647
648 The following changes (and some of 2002-08-20 changes of mine) are
649 for handling syntax, category, and case conversion for unibyte
650 characters by converting them to multibyte on the fly. With these
651 changes, we don't have to setup syntax and case tables for unibyte
652 characters in each language environment.
653
654 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
655 multibyte if necessary.
656
657 * bytecode.c (Fbyte_code): Likewise.
658
659 * character.h (LEADING_CODE_LATIN_1_MIN)
660 (LEADING_CODE_LATIN_1_MAX): New macros.
661 (unibyte_to_multibyte_table): Extern it.
662 (unibyte_char_to_multibyte): New macro.
663 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
664 (CHAR_LEADING_CODE): New macro.
665 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
666
667 * character.c (unibyte_to_multibyte_table): New variable.
668 (unibyte_char_to_multibyte): Move to character.h and defined as
669 macro.
670 (multibyte_char_to_unibyte): If C is an eight-bit character,
671 convert it to the corresponding byte value.
672
673 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
674 not 1, singals an error. Update the elements of
675 unibyte_to_multibyte_table.
676 (init_charset_once): Initialize unibyte_to_multibyte_table.
677 (syms_of_charset): Define the charset `iso-8859-1'.
678
679 * casefiddle.c (casify_object): Fix previous change.
680
681 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
682 as is without converting it to unibyte. In a unibyte buffer,
683 convert C to multibyte before checking the syntax.
684
685 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
686
687 * minibuf.c (Fminibuffer_complete_word): Use the macro
688 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
689
690 * regex.h (struct re_pattern_buffer): New member target_multibyte.
691
692 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
693 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
694 that is zero, convert an eight-bit char to multibyte.
695 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
696 non-emacs case.
697 (PATFETCH): Convert an eight-bit char to multibyte.
698 (HANDLE_UNIBYTE_RANGE): New macro.
699 (regex_compile): Setup the compiled pattern for multibyte chars
700 even if the given regex string is unibyte. Use PATFETCH_RAW
701 instead of PATFETCH in many places. To handle `charset'
702 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
703 only for ASCII chars.
704 (analyse_first) <exactn>: Simplified because the compiled pattern
705 is multibyte.
706 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
707 <charset>: Use CHAR_LEADING_CODE to get leading codes.
708 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
709 here.
710 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
711 multibyte always 1.
712 (re_search_2) In emacs, set the locale variable multibyte to 1,
713 otherwise to 0. New local variable target_multibyte. Check it
714 to decide the multibyteness of STR1 and STR2. If
715 target_multibyte is zero, convert unibyte chars to multibyte
716 before translating and checking fastmap.
717 (TARGET_CHAR_AND_LENGTH): New macro.
718 (re_match_2_internal): In emacs, set the locale variable multibyte
719 to 1, otherwise to 0. New local variable target_multibyte. Check
720 it to decide the multibyteness of STR1 and STR2. Use
721 TARGET_CHAR_AND_LENGTH to fetch a character from D.
722 <charset, charset_not>: If multibyte is nonzero, check fastmap
723 only for ASCII chars. Call bcmp_translate with
724 target_multibyte, not with multibyte.
725 <begline>: Declare the local variable C as `unsigned'.
726 (bcmp_translate): Change the last arg name to target_multibyte.
727
728 * search.c (compile_pattern_1): Don't adjust the multibyteness of
729 the regexp pattern and the matching target. Set cp->buf.multibyte
730 to the multibyteness of the regexp pattern. Set
731 cp->but.target_multibyte to the multibyteness of the matching
732 target.
733 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
734 FETCH_STRING_CHAR_ADVANCE.
735 (Freplace_match): Convert unibyte chars to multibyte.
736
737 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
738 unibyte chars to multibyte.
739 (back_comment): Likewise.
740 (scan_words): Likewise.
741 (skip_chars): The arg syntaxp is deleted, and the code for
742 handling syntaxes is moved to skip_syntaxes. Callers changed.
743 Fix the case that the multibyteness of STRING and the current
744 buffer doesn't match.
745 (skip_syntaxes): New function.
746 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
747 SINGLE_BYTE_CHAR_P.
748 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
749 chars to multibyte.
750 (scan_lists): Likewise.
751 (Fbackward_prefix_chars): Likewise.
752 (scan_sexps_forward): Likewise.
753
0ba42da6
KH
7542002-08-23 Kenichi Handa <handa@etl.go.jp>
755
756 * xfaces.c (QCfontset): New variable.
757 (LFACE_FONTSET): New macro.
758 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
759 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
760 (Finternal_set_lisp_face_attribute): Handle QCfontset.
761 (Finternal_get_lisp_face_attribute): Likewise.
762 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
763 check also LFACE_FONTSET_INDEX.
764 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
765 attrs[LFACE_FONT_INDEX].
766 (syms_of_xfaces): Intern and staticpro QCfontset.
767
768 * dispextern.h (enum lface_attribute_index): New member
769 LFACE_FONTSET_INDEX.
770
771 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
772
da13f28e
KH
7732002-08-21 Kenichi Handa <handa@etl.go.jp>
774
834c5971
KH
775 * coding.c (coding_set_destination): Fix coding->destination for
776 the case converting a region.
777 (encode_coding_utf_8): Encode eight-bit chars as single byte.
778 (encode_coding_object): Fix coding->dst_pos and
779 coding->dst_pos_byte for the case converting a region.
780
781 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
782
da13f28e
KH
783 * character.h (BYTE8_STRING): New macro.
784
785 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
786
0396028c
KH
7872002-08-20 Kenichi Handa <handa@etl.go.jp>
788
eeb7c155
KH
789 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
790 characters by octal form.
0396028c 791
eeb7c155 792 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
0396028c
KH
793
794 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
795 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
796 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
797 (FETCH_CHAR_AS_MULTIBYTE): New macro.
798
eeb7c155
KH
799 * casetab.c (set_canon, set_identity, shuffle): Simplified.
800
801 * casefiddle.c (casify_object): Simplified. Handle the case that
802 the case conversion change the byte length.
803 (casify_region): Likewise
804
805 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
806 macros.
807
0396028c 808 * character.c (_fetch_multibyte_char_len): This variable deleted.
eeb7c155
KH
809 (syms_of_character): Setup Vprintable_chars.
810
811 * editfns.c (Fchar_equal): Fix for the unibyte case.
b402f819
KH
812 (Finsert_byte): New function.
813 (syms_of_editfns): Defsubr it.
eeb7c155
KH
814
815 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
816 of direct code 0x3ffff.
817
818 * search.c (Freplace_match): Fix for the unibyte case.
0396028c 819
154f5e74
KH
8202002-08-19 Kenichi Handa <handa@etl.go.jp>
821
49aabfbd
KH
822 * lread.c (safe_to_load_p): Fix the logic.
823
8cb8232a 824 * syntax.c (scan_words): Don't treat characters belonging to
688e6cf5 825 different scripts as constituting a word.
8cb8232a
KH
826
827 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
828
688e6cf5 829 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
862aa7f9
KH
830 script.
831
154f5e74
KH
832 * emacs.c (main): In the case of --unibyte, instead of aborting on
833 finding non-empty buffer, make it unibyte.
834
8352002-08-18 Kenichi Handa <handa@etl.go.jp>
836
837 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
838 to create a fontset.
839
45cced72
DL
8402002-08-18 Dave Love <fx@gnu.org>
841
842 * character.c (Funibyte_char_to_multibyte): Doc fix.
843
844 * xfns.c [HAVE_STDLIB_H]: Fix last change.
845
ed09a18b
KH
8462002-08-15 Kenichi Handa <handa@etl.go.jp>
847
848 * fontset.c (fontset_add): Make the type `int'.
849 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
850
851 * character.c (unibyte_char_to_multibyte): Refer to
852 charset_unibyte, not charset_primary.
853 (multibyte_char_to_unibyte): Likewise.
854 (Funibyte_char_to_multibyte): Likewise.
855
856 * charset.h: (charset_unibyte): Extern it instead of
857 charset_primary.
858
859 * charset.c (charset_unibyte): Renamed from charset_primary.
860 (Funibyte_charset): Renamed from Fprimary_charset.
861 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
862 (syms_of_charset): Adjusted for the above changes.
863
864 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
865 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
866 it->multibyte_p is zero.
867
868 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
869 Extern deleted.
870
aeae5b21
KH
8712002-08-08 Kenichi Handa <handa@etl.go.jp>
872
873 * coding.c (Fdefine_coding_system_internal): Fix category setting
874 for a coding system of type iso-2022.
875
6a0a025b
KH
8762002-08-02 Kenichi Handa <handa@etl.go.jp>
877
878 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
879 -1.
880
6ab1fb6a
KH
8812002-08-01 Kenichi Handa <handa@etl.go.jp>
882
54b70fe3
KH
883 * syntax.c (Vnext_word_boundary_function_table): New variable.
884 (syms_of_syntax): Declare it as a Lisp variable.
885 (scan_words): Call functions in Vnext_word_boundary_function_table
886 if any.
887
6ab1fb6a
KH
888 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
889
890 * fontset.c (fs_load_font): If fontp->charset is not negative,
891 return fontp without setting its members.
892
4a3923ed
DL
8932002-07-31 Dave Love <fx@gnu.org>
894
895 * config.in: Generated with autoheader.
896
897 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
898
899 * m/sparc.h (HAVE_ALLOCA): Delete.
900
901 * s/irix6-5.h: Don't include strings.h.
902 (bcopy, bzero, bcmp): Don't undef.
903
904 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
905
906 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
907 (TIOCSIGSEND): Don't test IRIX6.
908 (bcopy, bzero, bcmp): Define conditionally.
909
52af23fe
KH
9102002-07-31 Kenichi Handa <handa@etl.go.jp>
911
912 * buffer.c (Qas, Qmake, Qto): New variables.
913 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
914 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
915
916 * callproc.c (Fcall_process): Don't call insert_1_both directly if
917 we are inserting a process output into a multibyte buffer.
918
919 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
920 multibyte_char_to_unibyte.
921
922 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
923 by the primary charset, make it eight-bit char.
924 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
925
926 * charset.c: (charset_eight_bit, Qeight_bit_control): New
927 variables.
928 (charset_8_bit__control, charset_8_bit_graphic,
929 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
930 (define_charset_internal): New function.
931 (syms_of_charset): Call define_charset_internal for pre-defined
932 charsets.
933
934 * charset.h (charset_8_bit): Extern it.
935
936 * coding.c (make_conversion_work_buffer): Adjusted for the change
937 of Fset_buffer_multibyte.
938 (encode_coding_raw_text): Increment p0 in the loop.
939
940 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
941
942 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
943 for the change of Fset_buffer_multibyte.
944
945 * fns.c (Fstring_to_multibyte): New function.
946 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
947
d1a6e8e7
DL
9482002-07-30 Dave Love <fx@gnu.org>
949
950 * xfns.c (x_put_x_image): Declare args.
951
952 * xfaces.c (font_name_registry, choose_face_font): Delete unused
953 vars.
954 (try_font_list): Declare an arg.
955
956 * xdisp.c (message2_nolog, set_message): Declare an arg.
957
958 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
959
960 * syntax.c (scan_sexps_forward): Declare an arg.
961
962 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
963 Declare an arg.
964
965 * lisp.h (Fnew_fontset): Declare.
966
967 * keymap.c (push_key_description): Call CHARACTERP correctly.
968
969 * fontset.c (fontset_add): Declare args. Call make_number
970 correctly.
971 (face_for_char): Delete unused vars.
972 (Fset_fontset_font): Doc fix. Delete unused vars.
973
974 * doc.c (Fsubstitute_command_keys): Delete unused vars.
975
976 * composite.c (update_compositions): Declare arg.
977
978 * cm.c (calccost, cmgoto): Declare args.
979
980 * charset.c: Remove `emacs' conditional. Doc fixes.
981 (map_char_table_for_charset): Declare.
982
983 * character.c (syms_of_character) <translation-table-vector>: Doc
984 fix.
985
986 * ccl.c: Remove `emacs' conditional. Include hash table stuff
987 from trunk.
988
002fc107
KH
9892002-07-26 Kenichi Handa <handa@etl.go.jp>
990
991 The following changes are to allow specifying multiple font
992 patterns for a character range (specified by script or charset).
993
994 * Makefile.in (abbrev.o): Depend on syntax.h.
995 (xfaces.o): Depend on charset.h.
996
997 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
998 SINGLE_BYTE_CHAR_P.
999
1000 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
1001
c57f3328
KH
1002 * character.h (Vchar_script_table): Extern it.
1003
56f86f3a
KH
1004 * character.c (Vscript_alist): This variable deleted.
1005 (Vchar_script_table, Qchar_script_table): New variable.
1006 (syms_of_character): Declare Vchar_script_table as a lisp variable
1007 and initialize it.
1008
002fc107
KH
1009 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
1010 have property char-table-extra-slots, make no extra slot.
1011
1012 * dispextern.h (struct face): Member `charset' deleted.
1013 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
1014 SINGLE_BYTE_CHAR_P.
1015 (FACE_FOR_CHAR): Likewise.
1016 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
1017 prototypes
1018 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
1019 fixed.
1020 (generate_ascii_font_name): Renamed from generate_ascii_font.
1021
1022 * fontset.h (get_font_repertory_func): New prototype.
1023 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
1024 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
1025
1026 * fontset.c (Qprepend, Qappend): New variables.
1027 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
1028 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
1029 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
1030 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
1031 (fontset_ref_and_range, fontset_add, reorder_font_vector)
1032 (load_font_get_repertory): New functions.
1033 (fontset_set): This function deleted.
1034 (fontset_face): New arg FACE. Return face ID, not face.
1035 Completely re-written to handle new fontset structure. Caller
1036 changed.
1037 (free_face_fontset): Use ASET istead of AREF (X) = Y.
1038 (face_for_char): Don't call lookup_face.
1039 (make_fontset_for_ascii_face): New arg FACE.
1040 (fs_load_font): New arg CHARSET_ID. Don't check
1041 Vfont_encoding_alist here.
1042 (find_font_encoding): New function.
1043 (list_fontsets): Use STRINGP, not ! NILP.
1044 (accumulate_script_ranges): New function.
1045 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
1046 re-written to handle new fontset structure.
1047 (Ffontset_font): Return a copy of element.
1048 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
1049 docstring of font-encoding-alist.
1050
1051 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
1052 (Fset_fotset_font): Fix arguments to 5.
1053
1054 * msdos.c (XMenuActivate): Adjuted for the change of
1055 lookup_derived_face.
1056
68352d8b
DL
1057 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
1058 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
002fc107
KH
1059 (highlight_trailing_whitespace): Adjusted for the change of
1060 lookup_named_face.
1061
1062 * xfaces.c: Include charset.h.
1063 (load_face_font): Argument C deleted. Caller changed.
1064 (generate_ascii_font_name): Renamed from generate_ascii_font.
1065 (font_name_registry): New function.
1066 (cache_face): Store ascii faces before non-ascii faces in buckets.
1067 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
1068 Lookup only ascii faces.
1069 (lookup_non_ascii_face): New function.
1070 (lookup_named_face): Argument C deleted. Caller changed.
1071 (lookup_derived_face): Argument C deleted. Caller changed.
1072 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
1073 a string, just call font_list with it.
1074 (choose_face_font): Arguments FACE and C deleted. New arg
1075 FONT_SPEC. Caller changed.
1076 (realize_face): Arguments C and BASE_FACE deleted. Caller
1077 (realize_x_face): Likewise.
1078 (realize_non_ascii_face): New function.
1079 (realize_x_face): Call load_face_font here.
1080 (realize_tty_face): Argument C deleted. Caller changed.
1081 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
1082 get a face ID.
1083 (dump_realized_face): Don't print charset of FACE.
1084
1085 * xfns.c (x_set_font): Always call x_new_fontset and
1086 store_frame_parameter.
1087 (Fx_create_frame): Call x_new_fontset, not x_new_font.
1088 (syms_of_xfns): Set get_font_repertory_func to
1089 x_get_font_repertory.
1090
1091 * xterm.h (x_get_font_repertory): Extern it.
1092
1093 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
1094 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
1095 it->multibyte_p is zero.
1096 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
1097 (x_new_fontset): If FONTSETNAME doesn't match any existing
1098 fontsets, create a new one.
1099 (x_get_font_repertory): New function.
1100
2503aa19
KH
11012002-07-25 Kenichi Handa <handa@etl.go.jp>
1102
48468dac
KH
1103 * coding.c (Ffind_coding_systems_region_internal): Detect an
1104 ASCII only string correctly.
1105
2503aa19
KH
1106 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
1107 version is 0.
1108
571407d6
KH
11092002-07-24 Kenichi Handa <handa@etl.go.jp>
1110
1111 * lread.c: Include "coding.h".
1112 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
1113 load_each_byte, unread_char): New variables.
1114 (readchar_backlog): This variable deleted.
1115 (readchar): Return a character unless load_each_byte is nonzero.
1116 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
1117 cons. If unread_char is not -1, simply return it.
1118 (unreadchar): Handle the case that readcharfun is
1119 Qget_emacs_mule_file_char or a cons. Set unread_char if
1120 necessary.
1121 (read_multibyte): This function deleted.
1122 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
1123 (read_emacs_mule_char): New functions.
1124 (Fload): Even if the file doesn't have the extention ".elc", if
1125 safe_to_load_p returns a positive version number, assume that the
1126 file contains bytecompiled code. If the version is less than 22,
1127 load the file while decoding multibyte sequences by emacs-mule.
1128 (readevalloop): Don't use readchar_backlog.
1129 (Fread): Likewise. Pay attention to the case that STREAM is a
1130 cons.
1131 (Fread_from_string): Pay attention to the case that STREAM is a
1132 cons.
1133 (read_escape): The arg BYTEREP deleted.
1134 (read1): Set load_each_byte to 1 temporarily while handling
1135 #@NUMBER. Don't call read_multibyte.
1136 (read_vector): Call Fread with a cons. If readcharfun is
1137 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
1138 (read_list): If doc_reference is 2, make the cdr part string as
1139 unibyte.
1140 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
1141 and Qload_force_doc_strings.
1142
00072992
KH
11432002-07-23 Kenichi Handa <handa@etl.go.jp>
1144
1145 * xdisp.c (face_before_or_after_it_pos): Call
1146 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
1147
7c78e542
KH
11482002-07-22 Kenichi Handa <handa@etl.go.jp>
1149
1150 * character.h (TRAILING_CODE_P): New macro.
1151 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
1152 (string_char_with_unification): Fix prototype.
1153 (Vscript_alist): Extern it.
1154
15843e6f
KH
1155 * character.c (Vscript_alist): New variable.
1156 (string_char_with_unification): Add `const' to local variables.
1157 (str_as_unibyte): Likewise.
1158 (string_escape_byte8): Likewise.
1159 (syms_of_character): Declare script-alist as a Lisp variable.
1160
7c78e542
KH
1161 * charset.h (Vcharset_ordered_list): Extern it.
1162 (charset_ordered_list_tick): Extern it.
45cced72
DL
1163 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
1164 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
1165 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
1166 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
7c78e542
KH
1167 (Funify_charset): Adjusted for the change of Funify_charset.
1168
1169 * charset.c (charset_ordered_list_tick): New variable.
1170 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
1171 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
1172 deunify intead of unify a charset.
1173 (string_xstring_p): Add `const' to local variables.
1174 (find_charsets_in_text): Add `const' to arguemnts and local
1175 variables.
1176 (encode_char): Adjusted for the change of Funify_charset. Fix
1177 detecting of invalid code.
1178 (Fset_charset_priority): Increment charset_ordered_list_tick.
95d6ca40
KH
1179 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
1180 and TO_CODE.
7c78e542 1181
45cced72
DL
1182 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
1183 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
1184 deleted. Callers changed to use
7c78e542
KH
1185 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
1186 (decode_coding_ccl): Add `const' to local variables.
1187 (consume_chars): Likewise.
1188 (Ffind_coding_systems_region_internal): Likewise.
1189 (Fcheck_coding_systems_region): Likewise.
1190
1191 * print.c (print_object): Use octal form for printing the
1192 contents of a bool vector.
1193
20df7570
DL
11942002-07-18 Dave Love <fx@gnu.org>
1195
1196 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
1197 <version == 20>: Refuse to load.
1198
6f197c07
DL
11992002-07-17 Dave Love <fx@gnu.org>
1200
98a3e976
DL
1201 * fns.c: Move coding.h.
1202 (Qcodeset, Qdays, Qmonths): New.
1203 (concat): Use CHARACTERP instead of INTERGERP.
1204 (Flocale_codeset): Deleted.
1205 (Flanginfo): New function.
1206 (syms_of_fns): Changed accordingly.
1207
6f197c07
DL
1208 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
1209
92331ddb
DL
12102002-07-16 Dave Love <fx@gnu.org>
1211
1212 * casetab.c (init_casetab_once, init_casetab_once): Fix
1213 CHAR_TABLE_SET call.
1214
1215 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
1216
1217 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
1218
1219 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
1220 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
1221 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
1222
1223 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
1224
1225 * coding.c (ENCODE_DESIGNATION, decode_eol)
1226 (make_conversion_work_buffer, code_conversion_restore)
1227 (Fdefine_coding_system_internal): Convert Lisp types.
1228 (code_conversion_restore): Use EQ, not ==.
1229 (Fencode_coding_string): Fix code_convert_string call.
1230
1231 * coding.h (code_convert_region): Fix prototype.
1232
1233 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
1234
1235 * fontset.c (fontset_ref, fontset_set, fs_load_font)
1236 (Ffontset_info): Convert Lisp types.
1237
1238 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
1239
1240 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
1241
1242 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
1243
1244 * chartab.c: Include "...h", not <...h> in some cases.
1245
1246 * callproc.c (Fcall_process): Remove unused variables.
1247
3a523150
DL
12482002-07-12 Dave Love <fx@gnu.org>
1249
1250 * coding.c (Fset_coding_system_priority): Allow null arg list.
1251
c889d9eb
DL
12522002-07-03 Dave Love <fx@gnu.org>
1253
cf8ba580
DL
1254 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
1255 (Fself_insert_and_exit): Use CHARACTERP.
1256
c889d9eb
DL
1257 * callproc.c (Fcall_process): Remove unused vars.
1258
1259 * xterm.c (XTread_socket): Add extra dead keysyms.
1260
1261 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
1262
1263 * dispextern.h: Remove prototypes for redraw_frame,
1264 redraw_garbaged_frames.
1265
1266 * cmds.c (Fself_insert_command): Use CHARACTERP.
1267
1268 * chartab.c (make_sub_char_table): Remove unused var.
1269 (Fset_char_table_default, Fmap_char_table): Doc fix.
1270
1271 * keymap.c (access_keymap): Remove generic char code.
1272 (push_key_description): Use CHARACTERP.
1273
3b9ca27d
DL
12742002-07-01 Dave Love <fx@gnu.org>
1275
1276 * charset.c: Doc fixes.
1277 (Funify_charset): Extra checking.
1278
c163613e
DL
12792002-06-24 Dave Love <fx@gnu.org>
1280
1281 * lread.c: Remove some unused variables.
1282 (safe_to_load_p): If safe, return the magic number version byte.
1283 (Fload): Maybe use load-with-code-conversion.
1284
ffc5b27f
KH
12852002-06-12 Kenichi Handa <handa@etl.go.jp>
1286
1287 * category.c (Fmodify_category_entry): Don't modify the contents
1288 of category_set for characters out of the range. Avoid
1289 unnecessary modification.
1290
1291 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
1292 Vchar_unify_table. The default value of the table is now nil.
1293
1294 * character.c (syms_of_character): Setup Vchar_width_table for
1295 eight-bit-control and raw-byte chars.
1296
1297 * charset.h (enum define_charset_arg_index): Delete
1298 charset_arg_parents and add charset_arg_subset and
c163613e 1299 charset_arg_superset.
ffc5b27f
KH
1300 (enum charset_attr_index): Delete charset_parents and add
1301 charset_subset and charset_superset.
1302 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
1303 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
1304 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
c163613e
DL
1305 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
1306 (CHARSET_SUPERSET): New macros.
ffc5b27f
KH
1307 (charset_work): Extern it.
1308 (ENCODE_CHAR): Use charset_work.
1309 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
1310 (map_charset_chars): Extern it.
1311
1312 * charset.c (load_charset_map): Set the default value of encoder
1313 and deunifier char-tables to nil.
1314 (map_charset_chars): Argument changed. Callers changed. Use
1315 map_char_table_for_charset instead of map_char_table.
1316 (Fmap_charset_chars): New optional args from_code and to_code.
1317 (Fdefine_charset_internal): Adjusted for the change of
1318 `define-charset' (:parents -> :subset or :superset).
1319 (charset_work): New variable.
1320 (encode_char): Adjusted for the change of
1321 Fdefine_charset_internal.
1322 (syms_of_charset): Likewise.
bec25acc 1323 (Ffind_charset_string): Setup the vector `charsets' correctly.
ffc5b27f
KH
1324
1325 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
1326 the previous change.
1327 (char_table_ref_and_range): Adjusted for the above change.
1328 (map_sub_char_table_for_charset): New function.
1329 (map_char_table_for_charset): New function.
1330
1331 * keymap.c (describe_vector): Handle a char-table directly here.
1332 (describe_char_table): Deleted.
1333
1334 * lisp.h (map_charset_chars): Deleted.
1335
af301c44
DL
13362002-06-11 Dave Love <fx@gnu.org>
1337
1338 * fns.c (count_combining): Comment out (unused).
1339 (Flocale_codeset): New.
1340 (syms_of_fns): Defsubr it.
1341
1342 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
1343 (size_t): Removed.
1344
bb605067
DL
13452002-06-06 Dave Love <fx@gnu.org>
1346
1347 * Makefile.in (chartab.o): Depend on charset.h
1348
998f36ff
KH
13492002-06-03 Kenichi Handa <handa@etl.go.jp>
1350
1351 * character.c (syms_of_character): Set the default value of
1352 Vprintable_chars to Qnil.
1353
6ba0a57d
DL
13542002-05-31 Dave Love <fx@gnu.org>
1355
1356 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
1357
51460fc4
KH
13582002-05-31 Kenichi Handa <handa@etl.go.jp>
1359
69b588e4
KH
1360 * charset.c (load_charset_map): Handle the case that from < to
1361 correctly.
1362
51460fc4
KH
1363 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
1364 chars.
1365 (encode_coding_iso_2022): Likewise.
1366 (encode_coding_sjis): Likewise.
1367 (encode_coding_big5): Likewise.
1368 (encode_coding_charset): Likewise.
1369
7c7dceee
KH
13702002-05-30 Kenichi Handa <handa@etl.go.jp>
1371
6ba0a57d 1372 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
2ec49574
KH
1373 not bytecompiled now.
1374 (shortlisp): Likewise.
1375
c163613e
DL
1376 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
1377 (charset_jisx0208): New variables.
7c7dceee
KH
1378 (Fdefine_charset_internal): Setup them if appropriate.
1379 (init_charset_once): Initialize them to -1.
1380
1381 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
1382 charset_jisx0208): Extern them.
1383
1384 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
1385 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
1386 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
1387 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
1388 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
1389 and CODING_ISO_FLAG_USE_OLDJIS.
1390 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
1391 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
1392 (encode_coding_iso_2022): Change the 1st arg to
1393 ENCODE_ISO_CHARACTER to a variable.
1394
d40413a6
KH
13952002-05-29 Kenichi Handa <handa@etl.go.jp>
1396
1929453f
KH
1397 * charset.h (enum define_charset_arg_index): New enums
1398 charset_arg_min_code and charset_arg_max_code.
d40413a6
KH
1399 (struct charset): New member char_index_offset.
1400
1401 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
1402 into account.
1403 (INDEX_TO_CODE_POINT): Likewise.
1404 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
1405 args[charset_arg_max_code]. Setup charset.char_index_offset.
1406 (syms_of_charset): Fix args to Fdefine_charset_internal.
1407
b0edb2c5
DL
14082002-05-27 Dave Love <fx@gnu.org>
1409
1410 * coding.c (decode_coding_utf_8): Reject overlong sequences.
1411
14122002-05-26 Dave Love <fx@gnu.org>
d88a0654
DL
1413
1414 * coding.c: Doc fixes.
1415 (Fcoding_system_aliases): Fix return value.
1416 (Qmac): Remove (duplicated) definition.
1417
8004cc7b
DL
14182002-05-25 Dave Love <fx@gnu.org>
1419
76ed8f14
DL
1420 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
1421 functions.
1422
1423 * character.c (Fstring): Doc fix.
1424
528623a0
DL
1425 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
1426
8004cc7b
DL
1427 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
1428 ids.
1429 (font-encoding-alist): Doc fix.
1430
505af245
DL
14312002-05-24 Dave Love <fx@gnu.org>
1432
1433 * term.c (costs_set): Declare static, non-initialized for pcc.
1434 (encode_terminal_code): Remove ensued var.
1435
1436 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
1437 for K&R.
1438
1439 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
1440
1441 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
1442 (suffixes): Moved out of make_subsidiaries for K&R.
1443
1444 * charset.c (map_charset_chars): Fix c_function declaration for
1445 K&R.
1446
1447 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
1448
d6afde6c
DL
14492002-05-23 Dave Love <fx@gnu.org>
1450
1451 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
1452
1453 * category.c (Fmodify_category_entry): Doc fix. Remove unused
1454 vars.
1455
f9d71dcd
KH
14562002-05-23 Yong Lu <lyongu@asia-infonet.com>
1457
1458 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
1459
1460 * coding.c (Fdefine_coding_system_internal): Fix previous change.
1461 (decode_coding_charset): Workaround for the bug of GCC 2.96.
1462
3776772e
KH
14632002-05-23 Kenichi Handa <handa@etl.go.jp>
1464
1465 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
1466 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
1467 (shortlisp): Likewise.
1468
b0a1e45e
KH
14692002-05-22 Kenichi Handa <handa@etl.go.jp>
1470
435b59f6
KH
1471 * coding.c (decode_coding_charset): Adjusted for the change of
1472 Fdefine_coding_system_internal.
1473 (Fdefine_coding_system_internal): For a coding system of
1474 `charset' type, store a list of charset IDs in
1475 `charset_attr_charset_valids' element of coding attributes.
1476
b0a1e45e
KH
1477 * charset.c (Fmake_char): Fix previous change.
1478
781d7a48
KH
14792002-05-21 Kenichi Handa <handa@etl.go.jp>
1480
1481 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
1482 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
1483 changed. Handle 2-byte and 3-byte charsets correctly.
1484 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
1485 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
1486 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
1487 (DECODE_EMACS_MULE_21_COMPOSITION): Call
1488 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
1489 sequence.
1490 (decode_coding_emacs_mule): Handle composition correctly. Rewind
1491 `src' and `consumed_chars' correctly before calling
1492 emacs_mule_char.
1493 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
1494 and alt&rule composition.
1495 (decode_coding_iso_2022): Handle composition correctly.
1496 (init_coding_once): Setup emacs_mule_bytes for private charsets.
1497
1498 * charset.c (Fdefine_charset_internal): Fix bug for the case of
1499 re-defining a charset. If the charset has :emacs-mule-id, setup
1500 emacs_mule_bytes.
cd9c1e8f
KH
1501 (Fmake_char): If CODE1 is nil, use the minimum code of the
1502 charset.
781d7a48 1503
0e56a02d
KH
15042002-05-20 Kenichi Handa <handa@etl.go.jp>
1505
1506 * coding.c (encode_coding_iso_2022): If coding requires safe
1507 encoding, produce a character specified by
1508 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
1509 (encode_coding_sjis): Likewise.
1510 (encode_coding_big5): Likewise.
1511 (encode_coding_charset): Likewise.
1512
e76af442
DL
15132002-05-17 Dave Love <fx@gnu.org>
1514
1515 * xterm.c (XSetIMValues): Declare.
1516
1517 * process.c: Conditionally include sys/wait.h, pty.h.
1518
1519 * print.c (print_object): Fix print format for 64-bit
1520 systems.
1521
1522 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
1523 systems.
1524
1525 * buffer.c (emacs_strerror): Declare.
1526 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
1527 from trunk.
1528
1529 * fontset.c (Fclear_face_cache): Declare.
1530 (accumulate_font_info): Commented-out (unused).
1531 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
1532 variables.
1533
1534 * character.h (string_escape_byte8): Declare.
1535
1536 * charset.c (load_charset_map, load_charset_map_from_file): Remove
1537 unused vars.
1538 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
1539 (Fmap_charset_chars): Doc fix.
1540
1541 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
1542 Removed.
1543 (Fset_coding_system_priority, Fset_coding_system_priority)
1544 (Fdefine_coding_system_internal): Doc fix.
1545
b1603380
DL
15462002-05-16 Dave Love <fx@gnu.org>
1547
1548 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
1549
cc5ac4b1
KH
15502002-05-16 Kenichi Handa <handa@etl.go.jp>
1551
1cba5287
KH
1552 * character.c (string_escape_byte8): Make multibyte string with
1553 correct size.
1554
cc5ac4b1
KH
1555 * charset.c (Fmake_char): Delete unnecessary code.
1556
b121a744
KH
15572002-05-14 Kenichi Handa <handa@etl.go.jp>
1558
ac87bbef
KH
1559 * xfns.c (x_encode_text): Allocate coding.destination here, and
1560 call encode_coding_object with dst_object Qnil.
1561
8c2fc311
KH
1562 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
1563 multibyte form correctly.
1564
48728c92
KH
1565 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
1566 against Vfont_encoding_alist.
1567
5afaefc1
KH
1568 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
1569 handling of charset list.
1570 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
8c2fc311
KH
1571 (decode_coding_object): Move point to coding->dst_pos before
1572 calling post-read-conversion function.
b1603380 1573 (encode_coding_object): Give correct arguments to
ac87bbef 1574 pre-write-conversion. Ignore the return value of
1cba5287 1575 pre-write-conversion function. Pay attention to the case that
b1603380 1576 pre-write-conversion changes the current buffer. If dst_object is
ac87bbef
KH
1577 Qt, even if coding->src_bytes is zero, allocate at least one byte
1578 to coding->destination.
5afaefc1
KH
1579
1580 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
1581
b121a744 1582 * charset.c (Fmake_char): Make it more backward compatible.
5afaefc1 1583 (Fmap_charset_chars): Fix docstring.
b121a744 1584
356212fe
DL
15852002-05-13 Dave Love <fx@gnu.org>
1586
1587 * coding.c: Doc fixes.
1588 (Fdefine_coding_system_alias): Use names, not symbols, in
1589 coding-system-alist.
1590
b2b3bb62
KH
15912002-05-13 Kenichi Handa <handa@etl.go.jp>
1592
1593 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
356212fe 1594 of calling free_realized_face.
b2b3bb62 1595
15d143f7
KH
15962002-05-10 Yong Lu <lyongu@asia-infonet.com>
1597
1598 * charset.c (load_charset_map): Fix previous change.
1599 (read_hex): Don't treat SPC as a comment starter.
1600 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
1601 -1.
1602 (Fdecode_char): Fix typo.
1603
16042002-05-10 Kenichi Handa <handa@etl.go.jp>
1605
1606 * charset.h (struct charset): New member `code_space_mask'.
1607
1608 * coding.c (coding_set_source): Delete the local variable
1609 beg_byte.
1610 (encode_coding_charset): Delete the local variable charset.
1611 (Fdefine_coding_system_internal): Likewise.
1612 (Fdefine_coding_system_internal): Setup
1613 attrs[coding_attr_charset_valids] correctly.
1614
1615 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
1616 member to check if CODE is valid or not.
1617 (Fdefine_charset_internal): Initialize `code_space_mask' member.
1618 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
1619 is within the range of charset->min_code and carset->max_code.
1620
b74e4686
DL
16212002-05-09 Dave Love <fx@gnu.org>
1622
1623 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
1624
1625 * dispextern.h (generate_ascii_font): Fix return type.
1626
1627 * xfaces.c (generate_ascii_font): Fix arg declaration.
1628
1629 * coding.c (coding_inherit_eol_type)
1630 (Fset_terminal_coding_system_internal)
1631 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
1632
8efbba21
KH
16332002-05-08 Kenichi Handa <handa@etl.go.jp>
1634
1635 * coding.c (decode_coding_charset, encode_coding_charset): Handle
1636 multiple charsets correctly.
1637
1a0c5ca9
KH
16382002-05-07 Kenichi Handa <handa@etl.go.jp>
1639
e4ac8240
KH
1640 * search.c (boyer_moore): Fix handling of mulitbyte character
1641 translation.
1642
1a0c5ca9
KH
1643 * xdisp.c (display_mode_element): When the variable `elt' is
1644 changed, update `this' and `lisp_string'.
1645
3d79abfb
KH
16462002-05-07 Kenichi Handa <handa@etl.go.jp>
1647
1648 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
1649
1650 * callproc.c (Fcall_process): Be sure to give the current buffer
1651 to decode_coding_c_string. Update PT and PT_BYTE after the
1652 insertion.
1653
1654 * charset.c (struct charset_map_entries): New struct.
1655 (load_charset_map): Renamed from parse_charset_map. New args
1656 entries and n_entries. Caller changed.
1657 (load_charset_map_from_file): Renamed from load_charset_map.
1658 Caller changed. New arg control_flag. Call load_charset_map at
1659 the tail.
1660 (load_charset_map_from_vector): New function.
1661 (Fdefine_charset_internal): Setup charset.compact_codes_p.
1662 (encode_char): If the charset is compact, change a character index
1663 to a code point.
1664
1665 * coding.c (coding_alloc_by_making_gap): Check the case that the
1666 source and destination are the same correctly.
1667 (decode_coding_raw_text): Set coding->consumed_char and
1668 coding->consumed to 0.
1669 (produce_chars): If coding->chars_at_source is nonzero, update
1670 coding->consumed_char and coding->consumed before calling
1671 alloc_destination.
1672 (Fdefine_coding_system_alias): Register ALIAS in
1673 Vcoding_system_alist.
1674 (syms_of_coding): Define `no-convesion' coding system at the tail.
1675
1676 * fileio.c (Finsert_file_contents): Set coding_system instead of
1677 val. If the current buffer is multibyte, always call
1678 decode_coding_gap.
1679
1680 * xfaces.c (try_font_list): Give higher priority to fontset's
1681 family than face's family.
1682
16832002-04-18 Kenichi Handa <handa@etl.go.jp>
1684
1685 * callproc.c (Fcall_process): Be sure to give the current buffer
1686 to decode_coding_c_string.
1687
1688 * xfaces.c (try_font_list): Give a family specified in a fontset
1689 higher priority than a family specified in a face.
1690
6a709baf
KH
16912002-04-09 Kenichi Handa <handa@etl.go.jp>
1692
1693 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
1694 Fix arguments to insert_from_buffer.
1695
1696 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
1697
85779cf5
KH
16982002-03-11 Kenichi Handa <handa@etl.go.jp>
1699
1700 * coding.c (produce_chars): Set the variable `multibytep' correctly.
1701 (decode_coding_gap): Set coding->dst_multibyte correctly.
1702
ed9d8bda
KH
17032002-03-07 Kenichi Handa <handa@etl.go.jp>
1704
ed9d8bda
KH
1705 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
1706 (decode_coding_utf_16): Fix converting high and low bytes to
1707 code-point.
1708 (encode_coding_utf_16): Substitute coding->default_char for
1709 non-Unicode characters.
1710 (decode_coding): Don't call record_insert here.
1711 (setup_coding_system): Initialize `surrogate' of
1712 coding->spec.utf_16 to 0.
1713 (EMIT_ONE_BYTE): Fix for multibyte case.
1714
dd6d5c01
KH
1715 * insdel.c (insert_from_gap): Call record_insert.
1716
3e4abc9e
KH
17172002-03-04 Kenichi Handa <handa@etl.go.jp>
1718
1719 * casefiddle.c (casify_region): Fix multibyte case.
1720
1721 * character.c (c_string_width): Add return type `int'.
1722 (char_string_with_unification): Arg ADVANCED deleted.
1723
1724 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
1725 (CHAR_STRING): Adjusted for the change of
1726 char_string_with_unification.
1727 (CHAR_STRING_ADVANCE): Make it do-while statement.
1728
1729 * chartab.c (sub_char_table_set_range): Optimized for the case
1730 DEPTH == 3. Add workaround code for a GCC optimization bug.
1731
85779cf5
KH
1732 * charset.c (parse_charset_map): Remove an unused variable.
1733
3e4abc9e
KH
1734 * coding.c: Delete unused variables.
1735
1736 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
1737 earlier. If inserted is zero and the coding system doesn't
1738 require flushing, don't call decode_coding_gap.
1739
1740 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
1741
222b0630
KH
17422002-03-01 Kenichi Handa <handa@etl.go.jp>
1743
1744 The following changes are for using Unicode as an internal
1745 character model, and use UTF-8 format for buffer/string
1746 representation.
1747
1748 * .gdbinit (xchartable): Adjusted for the change of char table
1749 structure.
1750 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
1751
1752 * Makefile.in (obj): Add character.o and chartab.o.
1753 (lisp, shortlisp): Remove utf-8.elc:
1754 (*.o): For many files, change dependency on charset.h to
1755 character.h, and add dependency on character.h.
1756 (character.o, chartab.o): New targets.
1757
1758 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
1759 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
1760 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
1761 of "charset.h".
1762
1763 * dired.c, filelock.c: Include "character.h".
1764
1765 * alloc.c: Include "character.h" instead of "charset.h".
1766 (Fmake_char_table): Moved to chartab.c.
1767 (make_sub_char_table): Likewise.
1768 (syms_of_alloc): Remove defsubr for Smake_char_table.
1769
1770 * buffer.c: Include "character.h" instead of "charset.h", don't
1771 include "coding.h".
1772 (Fset_buffer_multibyte): Adjuted for UTF-8.
1773
1774 * buffer.h: EXFUN Fbuffer_live_p.
1775
1776 * callproc.c: Include "character.h" instead of "charset.h".
1777 (Fcall_process): Big change for the new code-conversion APIs.
1778
1779 * casetab.c: Include "character.h" instead of "charset.h".
1780 (set_canon, set_identity, shuffle): Adjusted for the new
1781 map_char_table spec.
1782 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
1783 accessing the char table structure.
1784
1785 * chartab.c: New file that implements char table.
1786
1787 * category.c: Include "character.h".
1788 (copy_category_entry): New function.
1789 (copy_category_table): Call map_char_table and copy_category_entry.
1790 (Fmake_category_table): Initialize all top-vel slots.
1791 (char_category_set): New function.
1792 (modify_lower_category_set): Deleted.
1793 (Fmodify_category_entry): Call char_table_ref_and_range.
1794
1795 * category.h (CATEGORY_SET): Just call char_category_set.
1796
1797 * ccl.c: Include "character.h".
1798 (Qccl, Qcclp): New variables.
1799 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
1800 it's less than 256.
1801 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
1802 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
1803 and DST type.
1804 (ccl_driver): Types of arguments changed. Code adjusted for that.
1805 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
1806 ccl_driver.
1807 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
1808
1809 * ccl.h (struct ccl_program): Members eol_type and multibyte
1810 deleted. New members src_multibyte, dst_multibyte, consumed, and
1811 produced.
1812 (struct ccl_spec): Members decoder and encoder deleted. New
1813 memeber ccl.
1814 (CODING_SPEC_CCL_PROGRAM): New macro.
1815 (ccl_driver): Prototype updated.
1816 (Qccl, Qcclp, Fccl_program_p): Extern them.
1817 (CHECK_CCL_PROGRAM): New macro.
1818
1819 * character.c, character.h, chartab.c: New files.
1820
1821 * charset.c: Mostly re-written. Character and multibyte sequence
1822 handling codes are moved to character.c.
1823
1824 * charset.h: Mostly re-written. Character and multibyte sequence
1825 handling codes are moved to character.h.
1826
1827 * coding.c, coding.h: Mostly re-written.
1828
1829 * composite.c: Include "character.h" instead of "charset.h".
1830 (CHAR_WIDTH): Moved to character.h.
1831 (HASH_KEY, HASH_VALUE): Deleted.
1832
1833 * composite.h (enum composition_method): Order of enumeration
1834 symbols changed.
1835
1836 * data.c: Include "character.h" instead of "charset.h".
1837 (Faref): Call CHAR_TABLE_REF for a char table.
1838 (Faset): Call CHAR_TABLE_SET for a char table.
1839
1840 * dispextern.h (free_realized_face, check_face_attribytes,
1841 generate_ascii_font): Extern them.
1842 (free_realized_multibyte_face): Extern deleted.
1843
1844 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
1845 table structure.
1846
1847 * editfns.c: Include "character.h" instead of "charset.h".
1848 (Fchar_to_string): Always call CHAR_STRING.
1849
1850 * emacs.c (main): Call init_charset_once, init_charset,
1851 syms_of_chartab, and syms_of_character.
1852
1853 * fileio.c: Include "character.h" instead of "charset.h".
1854 (Finsert_file_contents): Big change for the new code-conversion
1855 API.
1856 (choose_write_coding_system): Likewise.
1857 (Fwrite_region): Likewise.
1858 (build_annotations_2): Deleted.
1859 (e_write): Big change for the new code-conversion API.
1860
1861 * fns.c: Include "character.h" instead of "charset.h".
1862 (copy_sub_char_table): Moved to chartab.c.
1863 (Fcopy_sequence): Call copy_char_table for a char table.
1864 (concat): Delete codes calling count_multibyte.
1865 (string_char_to_byte): Adjusted for the new multibyte form.
1866 (string_byte_to_char): Likewise.
1867 (internal_equal): Adjusted for the change of char table structure.
1868 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
1869 Fchar_table_extra_slot, Fset_char_table_extra_slot,
1870 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
1871 char_table_translate, optimize_sub_char_table,
1872 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
1873 chartab.c.
1874 (char_table_ref_and_index): Deleted.
1875 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
1876 (Fmd5): Call preferred_coding_system instead of accessing
1877 Vcoding_category_list. Adjusted for the new code-conversion API.
1878 (syms_of_fns): Defsubr for char table related functions moved to
1879 chartab.c.
1880
1881 * fontset.c: Mostly re-written.
1882
1883 * fontset.h (struct font_info): Type of the member encoding_type
1884 changed.
1885 (enum FONT_SPEC_INDEX): New enum.
1886 (fontset_font_pattern, fs_load_font): Prototype updated.
1887 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
1888
1889 * indent.c: Include "character.h" instead of "charset.h".
1890 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
1891 WIDTH_BY_CHAR_HEAD.
1892
1893 * insdel.c: Include "character.h" instead of "charset.h".
1894 (copy_text): Don't refer to Vnonascii_translation_table.
1895 (insert_from_gap): New function.
1896
1897 * keyboard.c: Include "character.h" instead of "charset.h".
1898 (command_loop_1): Never call direct_output_forward_char before
1899 a non-ASCII character.
1900 (read_char): If Vkeyboard_translate_table is a char table, always
1901 translated a character.
1902
1903 * keymap.c: Include "character.h".
1904 (store_in_keymap): Handle the case that IDX is a cons.
1905 (Fdefine_key): Handle the case that KEY is a cons and the car part
1906 is also a cons (range).
1907 (push_key_description): Adjusted for the new character code.
1908 (describe_vector): Call describe_char_table for a char table.
1909 (describe_char_table): New function.
1910
1911 * keymap.h (describe_char_table): Extern it.
1912
1913 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
1914 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
1915 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
1916 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
1917 Deleted.
1918 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
1919 structure.
1920 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
1921 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
1922 CHARTAB_SIZE_BITS_3): New macros.
1923 (chartab_size): Extern it.
1924 (struct Lisp_Char_Table): Re-designed.
1925 (struct Lisp_Sub_Char_Table): New structure.
1926 (HASH_KEY, HASH_VALUE): Moved from fns.c.
1927 (CHARACTERBITS): Defined as 22.
1928 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
1929 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
1930 (GC_SUB_CHAR_TABLE_P): New macro.
1931 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
1932 (code_convert_string_norecord): Extern deleted.
1933 (init_character_once, syms_of_character, init_charset,
1934 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
1935
1936 * lread.c: Include "character.h".
1937 (read_multibyte): New arg NBYTES.
1938 (read_escape): The meaning of returned *BYTEREP changed.
1939 (to_multibyte): Deleted.
1940 (read1): Adjuted the handling of char table and string.
1941
1942 * print.c: Include "character.h" instead of "charset.h".
1943 (print_string): Convert 8-bit raw bytes to octal form by
1944 string_escape_byte8.
1945 (print_object): Adjusted for the new multibyte form. Print 8-bit
1946 raw bytes always in octal form. Handle sub char table correctly.
1947
1948 * process.c: Include "character.h" instead of "charset.h".
1949 (read_process_output): Adjusted for the new code-conversion API.
1950 (send_process): Likewise.
1951
1952 * puresize.h (BASE_PURESIZE): Increased.
1953
1954 * regex.c: Include "character.h" instead of "charset.h".
1955 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
1956 (regex_compile): Accept a range whose starting and ending
1957 character have different leading bytes.
1958 (analyse_first): Adjusted for the above change.
1959
1960 * search.c: Include "character.h" instead of "charset.h".
1961 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
1962 (Freplace_match): Adjusted for the change of
1963 multibyte_char_to_unibyte.
1964
1965 * syntax.c: Include "character.h" instead of "charset.h".
1966 (syntax_parent_lookup): Deleted.
1967 (Fmodify_syntax_entry): Accept a cons as CHAR.
1968 (skip_chars): Adjusted for the new multibyte form.
1969 (init_syntax_once): Call char_table_set_range instead of directly
1970 accessing the structure of a char table.
1971
1972 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
1973 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
1974 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
1975 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
1976
1977 * term.c: Include "buffer.h" and "character.h".
1978 (encode_terminal_code): Adjusted for the new code-conversion API.
1979 (write_glyphs): Likewise.
1980 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
1981
1982 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
1983
1984 * xdisp.c: Include "character.h".
1985 (get_next_display_element): Adjusted for the new multibyte form.
1986 (disp_char_vector): Adjusted for the new char table structure.
1987 (decode_mode_spec_coding): Adjusted for the new structure of
1988 coding system.
1989 (decode_mode_spec): Adjusted for the new code-conversion API.
1990
1991 * xfaces.c: Include "character.h" instead of "charset.h".
1992 (load_face_font): Adjusted for the change of choose_face_font and
1993 FS_LOAD_FONT.
1994 (generate_ascii_font): New function.
1995 (set_lface_from_font_name): Adjusted for the change of
1996 FS_LOAD_FONT.
1997 (set_font_frame_param): Adjusted for the change of
1998 choose_face_font.
1999 (free_realized_face): Make it public.
2000 (free_realized_faces_for_fontset): Renamed from
2001 free_realized_multibyte_face. Free also faces realized for ASCII.
2002 (choose_face_font): Argments changed. Adjusted for the change of
2003 fontset_font_pattern and FS_LOAD_FONT.
2004
2005 * xfns.c: Include "character.h".
2006 (x_encode_text): Adjusted for the new code-conversion API.
2007
6f337974
KH
2008 * xselect.c: Don't include "charset.h".
2009 (selection_data_to_lisp_data): Adjusted for the new code
2010 covnersion API.
2011
8a78c965
KH
2012 * xterm.c: Include "character.h".
2013 (x_encode_char): New argument CHARSET. Caller changed.
2014 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
2015 SPLIT_CHAR.
2016 (x_get_glyph_face_and_encoding): Likewise.
2017 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
2018 CHAR_WIDTH instead of CHARSET_WIDTH.
2019 (XTread_socket): Adjusted for the new code-conversion API.
2020 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
2021 (x_load_font): Adjusted for the change of struct font.
2022
6922b018 2023;; Local Variables:
49b3bd82 2024;; coding: iso-2022-7bit
6922b018 2025;; End:
2a34a036 2026
3caaa30e 2027 Copyright (C) 2002 Free Software Foundation, Inc.
2a34a036
GM
2028 Copying and distribution of this file, with or without modification,
2029 are permitted provided the copyright notice and this notice are preserved.