*** empty log message ***
[bpt/emacs.git] / src / ChangeLog
1 2002-08-21 Kenichi Handa <handa@etl.go.jp>
2
3 * character.h (BYTE8_STRING): New macro.
4
5 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
6
7 2002-08-20 Kenichi Handa <handa@etl.go.jp>
8
9 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
10 characters by octal form.
11
12 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
13
14 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
15 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
16 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
17 (FETCH_CHAR_AS_MULTIBYTE): New macro.
18
19 * casetab.c (set_canon, set_identity, shuffle): Simplified.
20
21 * casefiddle.c (casify_object): Simplified. Handle the case that
22 the case conversion change the byte length.
23 (casify_region): Likewise
24
25 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
26 macros.
27
28 * character.c (_fetch_multibyte_char_len): This variable deleted.
29 (syms_of_character): Setup Vprintable_chars.
30
31 * editfns.c (Fchar_equal): Fix for the unibyte case.
32 (Finsert_byte): New function.
33 (syms_of_editfns): Defsubr it.
34
35 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
36 of direct code 0x3ffff.
37
38 * search.c (Freplace_match): Fix for the unibyte case.
39
40 2002-08-19 Kenichi Handa <handa@etl.go.jp>
41
42 * lread.c (safe_to_load_p): Fix the logic.
43
44 * syntax.c (scan_words): Don't treat characters belonging to
45 different scripts constituting a work.
46
47 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
48
49 * fontset.c (Fset_fontset_font): Treate `ascii' as charset, not
50 script.
51
52 * emacs.c (main): In the case of --unibyte, instead of aborting on
53 finding non-empty buffer, make it unibyte.
54
55 2002-08-18 Kenichi Handa <handa@etl.go.jp>
56
57 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
58 to create a fontset.
59
60 2002-08-18 Dave Love <fx@gnu.org>
61
62 * character.c (Funibyte_char_to_multibyte): Doc fix.
63
64 * xfns.c [HAVE_STDLIB_H]: Fix last change.
65
66 2002-08-15 Kenichi Handa <handa@etl.go.jp>
67
68 * fontset.c (fontset_add): Make the type `int'.
69 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
70
71 * character.c (unibyte_char_to_multibyte): Refer to
72 charset_unibyte, not charset_primary.
73 (multibyte_char_to_unibyte): Likewise.
74 (Funibyte_char_to_multibyte): Likewise.
75
76 * charset.h: (charset_unibyte): Extern it instead of
77 charset_primary.
78
79 * charset.c (charset_unibyte): Renamed from charset_primary.
80 (Funibyte_charset): Renamed from Fprimary_charset.
81 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
82 (syms_of_charset): Adjusted for the above changes.
83
84 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
85 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
86 it->multibyte_p is zero.
87
88 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
89 Extern deleted.
90
91 2002-08-08 Kenichi Handa <handa@etl.go.jp>
92
93 * coding.c (Fdefine_coding_system_internal): Fix category setting
94 for a coding system of type iso-2022.
95
96 2002-08-02 Kenichi Handa <handa@etl.go.jp>
97
98 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
99 -1.
100
101 2002-08-01 Kenichi Handa <handa@etl.go.jp>
102
103 * syntax.c (Vnext_word_boundary_function_table): New variable.
104 (syms_of_syntax): Declare it as a Lisp variable.
105 (scan_words): Call functions in Vnext_word_boundary_function_table
106 if any.
107
108 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
109
110 * fontset.c (fs_load_font): If fontp->charset is not negative,
111 return fontp without setting its members.
112
113 2002-07-31 Dave Love <fx@gnu.org>
114
115 * config.in: Generated with autoheader.
116
117 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
118
119 * m/sparc.h (HAVE_ALLOCA): Delete.
120
121 * s/irix6-5.h: Don't include strings.h.
122 (bcopy, bzero, bcmp): Don't undef.
123
124 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
125
126 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
127 (TIOCSIGSEND): Don't test IRIX6.
128 (bcopy, bzero, bcmp): Define conditionally.
129
130 2002-07-31 Kenichi Handa <handa@etl.go.jp>
131
132 * buffer.c (Qas, Qmake, Qto): New variables.
133 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
134 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
135
136 * callproc.c (Fcall_process): Don't call insert_1_both directly if
137 we are inserting a process output into a multibyte buffer.
138
139 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
140 multibyte_char_to_unibyte.
141
142 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
143 by the primary charset, make it eight-bit char.
144 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
145
146 * charset.c: (charset_eight_bit, Qeight_bit_control): New
147 variables.
148 (charset_8_bit__control, charset_8_bit_graphic,
149 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
150 (define_charset_internal): New function.
151 (syms_of_charset): Call define_charset_internal for pre-defined
152 charsets.
153
154 * charset.h (charset_8_bit): Extern it.
155
156 * coding.c (make_conversion_work_buffer): Adjusted for the change
157 of Fset_buffer_multibyte.
158 (encode_coding_raw_text): Increment p0 in the loop.
159
160 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
161
162 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
163 for the change of Fset_buffer_multibyte.
164
165 * fns.c (Fstring_to_multibyte): New function.
166 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
167
168 2002-07-30 Dave Love <fx@gnu.org>
169
170 * xfns.c (x_put_x_image): Declare args.
171
172 * xfaces.c (font_name_registry, choose_face_font): Delete unused
173 vars.
174 (try_font_list): Declare an arg.
175
176 * xdisp.c (message2_nolog, set_message): Declare an arg.
177
178 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
179
180 * syntax.c (scan_sexps_forward): Declare an arg.
181
182 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
183 Declare an arg.
184
185 * lisp.h (Fnew_fontset): Declare.
186
187 * keymap.c (push_key_description): Call CHARACTERP correctly.
188
189 * fontset.c (fontset_add): Declare args. Call make_number
190 correctly.
191 (face_for_char): Delete unused vars.
192 (Fset_fontset_font): Doc fix. Delete unused vars.
193
194 * doc.c (Fsubstitute_command_keys): Delete unused vars.
195
196 * composite.c (update_compositions): Declare arg.
197
198 * cm.c (calccost, cmgoto): Declare args.
199
200 * charset.c: Remove `emacs' conditional. Doc fixes.
201 (map_char_table_for_charset): Declare.
202
203 * character.c (syms_of_character) <translation-table-vector>: Doc
204 fix.
205
206 * ccl.c: Remove `emacs' conditional. Include hash table stuff
207 from trunk.
208
209 2002-07-26 Kenichi Handa <handa@etl.go.jp>
210
211 The following changes are to allow specifying multiple font
212 patterns for a character range (specified by script or charset).
213
214 * Makefile.in (abbrev.o): Depend on syntax.h.
215 (xfaces.o): Depend on charset.h.
216
217 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
218 SINGLE_BYTE_CHAR_P.
219
220 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
221
222 * character.h (Vchar_script_table): Extern it.
223
224 * character.c (Vscript_alist): This variable deleted.
225 (Vchar_script_table, Qchar_script_table): New variable.
226 (syms_of_character): Declare Vchar_script_table as a lisp variable
227 and initialize it.
228
229 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
230 have property char-table-extra-slots, make no extra slot.
231
232 * dispextern.h (struct face): Member `charset' deleted.
233 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
234 SINGLE_BYTE_CHAR_P.
235 (FACE_FOR_CHAR): Likewise.
236 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
237 prototypes
238 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
239 fixed.
240 (generate_ascii_font_name): Renamed from generate_ascii_font.
241
242 * fontset.h (get_font_repertory_func): New prototype.
243 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
244 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
245
246 * fontset.c (Qprepend, Qappend): New variables.
247 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
248 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
249 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
250 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
251 (fontset_ref_and_range, fontset_add, reorder_font_vector)
252 (load_font_get_repertory): New functions.
253 (fontset_set): This function deleted.
254 (fontset_face): New arg FACE. Return face ID, not face.
255 Completely re-written to handle new fontset structure. Caller
256 changed.
257 (free_face_fontset): Use ASET istead of AREF (X) = Y.
258 (face_for_char): Don't call lookup_face.
259 (make_fontset_for_ascii_face): New arg FACE.
260 (fs_load_font): New arg CHARSET_ID. Don't check
261 Vfont_encoding_alist here.
262 (find_font_encoding): New function.
263 (list_fontsets): Use STRINGP, not ! NILP.
264 (accumulate_script_ranges): New function.
265 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
266 re-written to handle new fontset structure.
267 (Ffontset_font): Return a copy of element.
268 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
269 docstring of font-encoding-alist.
270
271 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
272 (Fset_fotset_font): Fix arguments to 5.
273
274 * msdos.c (XMenuActivate): Adjuted for the change of
275 lookup_derived_face.
276
277 * xdisp.c (message_dolog, set_message_1,
278 extend_face_to_end_of_line): Use ASCII_CHAR_P, not
279 SINGLE_BYTE_CHAR_P.
280 (highlight_trailing_whitespace): Adjusted for the change of
281 lookup_named_face.
282
283 * xfaces.c: Include charset.h.
284 (load_face_font): Argument C deleted. Caller changed.
285 (generate_ascii_font_name): Renamed from generate_ascii_font.
286 (font_name_registry): New function.
287 (cache_face): Store ascii faces before non-ascii faces in buckets.
288 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
289 Lookup only ascii faces.
290 (lookup_non_ascii_face): New function.
291 (lookup_named_face): Argument C deleted. Caller changed.
292 (lookup_derived_face): Argument C deleted. Caller changed.
293 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
294 a string, just call font_list with it.
295 (choose_face_font): Arguments FACE and C deleted. New arg
296 FONT_SPEC. Caller changed.
297 (realize_face): Arguments C and BASE_FACE deleted. Caller
298 (realize_x_face): Likewise.
299 (realize_non_ascii_face): New function.
300 (realize_x_face): Call load_face_font here.
301 (realize_tty_face): Argument C deleted. Caller changed.
302 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
303 get a face ID.
304 (dump_realized_face): Don't print charset of FACE.
305
306 * xfns.c (x_set_font): Always call x_new_fontset and
307 store_frame_parameter.
308 (Fx_create_frame): Call x_new_fontset, not x_new_font.
309 (syms_of_xfns): Set get_font_repertory_func to
310 x_get_font_repertory.
311
312 * xterm.h (x_get_font_repertory): Extern it.
313
314 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
315 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
316 it->multibyte_p is zero.
317 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
318 (x_new_fontset): If FONTSETNAME doesn't match any existing
319 fontsets, create a new one.
320 (x_get_font_repertory): New function.
321
322 2002-07-25 Kenichi Handa <handa@etl.go.jp>
323
324 * coding.c (Ffind_coding_systems_region_internal): Detect an
325 ASCII only string correctly.
326
327 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
328 version is 0.
329
330 2002-07-24 Kenichi Handa <handa@etl.go.jp>
331
332 * lread.c: Include "coding.h".
333 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
334 load_each_byte, unread_char): New variables.
335 (readchar_backlog): This variable deleted.
336 (readchar): Return a character unless load_each_byte is nonzero.
337 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
338 cons. If unread_char is not -1, simply return it.
339 (unreadchar): Handle the case that readcharfun is
340 Qget_emacs_mule_file_char or a cons. Set unread_char if
341 necessary.
342 (read_multibyte): This function deleted.
343 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
344 (read_emacs_mule_char): New functions.
345 (Fload): Even if the file doesn't have the extention ".elc", if
346 safe_to_load_p returns a positive version number, assume that the
347 file contains bytecompiled code. If the version is less than 22,
348 load the file while decoding multibyte sequences by emacs-mule.
349 (readevalloop): Don't use readchar_backlog.
350 (Fread): Likewise. Pay attention to the case that STREAM is a
351 cons.
352 (Fread_from_string): Pay attention to the case that STREAM is a
353 cons.
354 (read_escape): The arg BYTEREP deleted.
355 (read1): Set load_each_byte to 1 temporarily while handling
356 #@NUMBER. Don't call read_multibyte.
357 (read_vector): Call Fread with a cons. If readcharfun is
358 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
359 (read_list): If doc_reference is 2, make the cdr part string as
360 unibyte.
361 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
362 and Qload_force_doc_strings.
363
364 2002-07-23 Kenichi Handa <handa@etl.go.jp>
365
366 * xdisp.c (face_before_or_after_it_pos): Call
367 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
368
369 2002-07-22 Kenichi Handa <handa@etl.go.jp>
370
371 * character.h (TRAILING_CODE_P): New macro.
372 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
373 (string_char_with_unification): Fix prototype.
374 (Vscript_alist): Extern it.
375
376 * character.c (Vscript_alist): New variable.
377 (string_char_with_unification): Add `const' to local variables.
378 (str_as_unibyte): Likewise.
379 (string_escape_byte8): Likewise.
380 (syms_of_character): Declare script-alist as a Lisp variable.
381
382 * charset.h (Vcharset_ordered_list): Extern it.
383 (charset_ordered_list_tick): Extern it.
384 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
385 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
386 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
387 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
388 (Funify_charset): Adjusted for the change of Funify_charset.
389
390 * charset.c (charset_ordered_list_tick): New variable.
391 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
392 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
393 deunify intead of unify a charset.
394 (string_xstring_p): Add `const' to local variables.
395 (find_charsets_in_text): Add `const' to arguemnts and local
396 variables.
397 (encode_char): Adjusted for the change of Funify_charset. Fix
398 detecting of invalid code.
399 (Fset_charset_priority): Increment charset_ordered_list_tick.
400 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
401 and TO_CODE.
402
403 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
404 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
405 deleted. Callers changed to use
406 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
407 (decode_coding_ccl): Add `const' to local variables.
408 (consume_chars): Likewise.
409 (Ffind_coding_systems_region_internal): Likewise.
410 (Fcheck_coding_systems_region): Likewise.
411
412 * print.c (print_object): Use octal form for printing the
413 contents of a bool vector.
414
415 2002-07-18 Dave Love <fx@gnu.org>
416
417 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
418 <version == 20>: Refuse to load.
419
420 2002-07-17 Dave Love <fx@gnu.org>
421
422 * fns.c: Move coding.h.
423 (Qcodeset, Qdays, Qmonths): New.
424 (concat): Use CHARACTERP instead of INTERGERP.
425 (Flocale_codeset): Deleted.
426 (Flanginfo): New function.
427 (syms_of_fns): Changed accordingly.
428
429 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
430
431 2002-07-16 Dave Love <fx@gnu.org>
432
433 * casetab.c (init_casetab_once, init_casetab_once): Fix
434 CHAR_TABLE_SET call.
435
436 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
437
438 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
439
440 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
441 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
442 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
443
444 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
445
446 * coding.c (ENCODE_DESIGNATION, decode_eol)
447 (make_conversion_work_buffer, code_conversion_restore)
448 (Fdefine_coding_system_internal): Convert Lisp types.
449 (code_conversion_restore): Use EQ, not ==.
450 (Fencode_coding_string): Fix code_convert_string call.
451
452 * coding.h (code_convert_region): Fix prototype.
453
454 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
455
456 * fontset.c (fontset_ref, fontset_set, fs_load_font)
457 (Ffontset_info): Convert Lisp types.
458
459 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
460
461 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
462
463 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
464
465 * chartab.c: Include "...h", not <...h> in some cases.
466
467 * callproc.c (Fcall_process): Remove unused variables.
468
469 2002-07-12 Dave Love <fx@gnu.org>
470
471 * coding.c (Fset_coding_system_priority): Allow null arg list.
472
473 2002-07-03 Dave Love <fx@gnu.org>
474
475 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
476 (Fself_insert_and_exit): Use CHARACTERP.
477
478 * callproc.c (Fcall_process): Remove unused vars.
479
480 * xterm.c (XTread_socket): Add extra dead keysyms.
481
482 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
483
484 * dispextern.h: Remove prototypes for redraw_frame,
485 redraw_garbaged_frames.
486
487 * cmds.c (Fself_insert_command): Use CHARACTERP.
488
489 * chartab.c (make_sub_char_table): Remove unused var.
490 (Fset_char_table_default, Fmap_char_table): Doc fix.
491
492 * keymap.c (access_keymap): Remove generic char code.
493 (push_key_description): Use CHARACTERP.
494
495 2002-07-01 Dave Love <fx@gnu.org>
496
497 * charset.c: Doc fixes.
498 (Funify_charset): Extra checking.
499
500 2002-06-24 Dave Love <fx@gnu.org>
501
502 * lread.c: Remove some unused variables.
503 (safe_to_load_p): If safe, return the magic number version byte.
504 (Fload): Maybe use load-with-code-conversion.
505
506 2002-06-12 Kenichi Handa <handa@etl.go.jp>
507
508 * category.c (Fmodify_category_entry): Don't modify the contents
509 of category_set for characters out of the range. Avoid
510 unnecessary modification.
511
512 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
513 Vchar_unify_table. The default value of the table is now nil.
514
515 * character.c (syms_of_character): Setup Vchar_width_table for
516 eight-bit-control and raw-byte chars.
517
518 * charset.h (enum define_charset_arg_index): Delete
519 charset_arg_parents and add charset_arg_subset and
520 charset_arg_superset.
521 (enum charset_attr_index): Delete charset_parents and add
522 charset_subset and charset_superset.
523 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
524 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
525 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
526 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
527 (CHARSET_SUPERSET): New macros.
528 (charset_work): Extern it.
529 (ENCODE_CHAR): Use charset_work.
530 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
531 (map_charset_chars): Extern it.
532
533 * charset.c (load_charset_map): Set the default value of encoder
534 and deunifier char-tables to nil.
535 (map_charset_chars): Argument changed. Callers changed. Use
536 map_char_table_for_charset instead of map_char_table.
537 (Fmap_charset_chars): New optional args from_code and to_code.
538 (Fdefine_charset_internal): Adjusted for the change of
539 `define-charset' (:parents -> :subset or :superset).
540 (charset_work): New variable.
541 (encode_char): Adjusted for the change of
542 Fdefine_charset_internal.
543 (syms_of_charset): Likewise.
544 (Ffind_charset_string): Setup the vector `charsets' correctly.
545
546 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
547 the previous change.
548 (char_table_ref_and_range): Adjusted for the above change.
549 (map_sub_char_table_for_charset): New function.
550 (map_char_table_for_charset): New function.
551
552 * keymap.c (describe_vector): Handle a char-table directly here.
553 (describe_char_table): Deleted.
554
555 * lisp.h (map_charset_chars): Deleted.
556
557 2002-06-11 Dave Love <fx@gnu.org>
558
559 * fns.c (count_combining): Comment out (unused).
560 (Flocale_codeset): New.
561 (syms_of_fns): Defsubr it.
562
563 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
564 (size_t): Removed.
565
566 2002-06-06 Dave Love <fx@gnu.org>
567
568 * Makefile.in (chartab.o): Depend on charset.h
569
570 2002-06-03 Kenichi Handa <handa@etl.go.jp>
571
572 * character.c (syms_of_character): Set the default value of
573 Vprintable_chars to Qnil.
574
575 2002-05-31 Dave Love <fx@gnu.org>
576
577 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
578
579 2002-05-31 Kenichi Handa <handa@etl.go.jp>
580
581 * charset.c (load_charset_map): Handle the case that from < to
582 correctly.
583
584 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
585 chars.
586 (encode_coding_iso_2022): Likewise.
587 (encode_coding_sjis): Likewise.
588 (encode_coding_big5): Likewise.
589 (encode_coding_charset): Likewise.
590
591 2002-05-30 Kenichi Handa <handa@etl.go.jp>
592
593 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
594 not bytecompiled now.
595 (shortlisp): Likewise.
596
597 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
598 (charset_jisx0208): New variables.
599 (Fdefine_charset_internal): Setup them if appropriate.
600 (init_charset_once): Initialize them to -1.
601
602 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
603 charset_jisx0208): Extern them.
604
605 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
606 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
607 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
608 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
609 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
610 and CODING_ISO_FLAG_USE_OLDJIS.
611 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
612 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
613 (encode_coding_iso_2022): Change the 1st arg to
614 ENCODE_ISO_CHARACTER to a variable.
615
616 2002-05-29 Kenichi Handa <handa@etl.go.jp>
617
618 * charset.h (enum define_charset_arg_index): New enums
619 charset_arg_min_code and charset_arg_max_code.
620 (struct charset): New member char_index_offset.
621
622 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
623 into account.
624 (INDEX_TO_CODE_POINT): Likewise.
625 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
626 args[charset_arg_max_code]. Setup charset.char_index_offset.
627 (syms_of_charset): Fix args to Fdefine_charset_internal.
628
629 2002-05-27 Dave Love <fx@gnu.org>
630
631 * coding.c (decode_coding_utf_8): Reject overlong sequences.
632
633 2002-05-26 Dave Love <fx@gnu.org>
634
635 * coding.c: Doc fixes.
636 (Fcoding_system_aliases): Fix return value.
637 (Qmac): Remove (duplicated) definition.
638
639 2002-05-25 Dave Love <fx@gnu.org>
640
641 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
642 functions.
643
644 * character.c (Fstring): Doc fix.
645
646 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
647
648 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
649 ids.
650 (font-encoding-alist): Doc fix.
651
652 2002-05-24 Dave Love <fx@gnu.org>
653
654 * term.c (costs_set): Declare static, non-initialized for pcc.
655 (encode_terminal_code): Remove ensued var.
656
657 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
658 for K&R.
659
660 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
661
662 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
663 (suffixes): Moved out of make_subsidiaries for K&R.
664
665 * charset.c (map_charset_chars): Fix c_function declaration for
666 K&R.
667
668 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
669
670 2002-05-23 Dave Love <fx@gnu.org>
671
672 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
673
674 * category.c (Fmodify_category_entry): Doc fix. Remove unused
675 vars.
676
677 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
678
679 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
680
681 * coding.c (Fdefine_coding_system_internal): Fix previous change.
682 (decode_coding_charset): Workaround for the bug of GCC 2.96.
683
684 2002-05-23 Kenichi Handa <handa@etl.go.jp>
685
686 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
687 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
688 (shortlisp): Likewise.
689
690 2002-05-22 Kenichi Handa <handa@etl.go.jp>
691
692 * coding.c (decode_coding_charset): Adjusted for the change of
693 Fdefine_coding_system_internal.
694 (Fdefine_coding_system_internal): For a coding system of
695 `charset' type, store a list of charset IDs in
696 `charset_attr_charset_valids' element of coding attributes.
697
698 * charset.c (Fmake_char): Fix previous change.
699
700 2002-05-21 Kenichi Handa <handa@etl.go.jp>
701
702 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
703 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
704 changed. Handle 2-byte and 3-byte charsets correctly.
705 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
706 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
707 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
708 (DECODE_EMACS_MULE_21_COMPOSITION): Call
709 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
710 sequence.
711 (decode_coding_emacs_mule): Handle composition correctly. Rewind
712 `src' and `consumed_chars' correctly before calling
713 emacs_mule_char.
714 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
715 and alt&rule composition.
716 (decode_coding_iso_2022): Handle composition correctly.
717 (init_coding_once): Setup emacs_mule_bytes for private charsets.
718
719 * charset.c (Fdefine_charset_internal): Fix bug for the case of
720 re-defining a charset. If the charset has :emacs-mule-id, setup
721 emacs_mule_bytes.
722 (Fmake_char): If CODE1 is nil, use the minimum code of the
723 charset.
724
725 2002-05-20 Kenichi Handa <handa@etl.go.jp>
726
727 * coding.c (encode_coding_iso_2022): If coding requires safe
728 encoding, produce a character specified by
729 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
730 (encode_coding_sjis): Likewise.
731 (encode_coding_big5): Likewise.
732 (encode_coding_charset): Likewise.
733
734 2002-05-17 Dave Love <fx@gnu.org>
735
736 * xterm.c (XSetIMValues): Declare.
737
738 * process.c: Conditionally include sys/wait.h, pty.h.
739
740 * print.c (print_object): Fix print format for 64-bit
741 systems.
742
743 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
744 systems.
745
746 * buffer.c (emacs_strerror): Declare.
747 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
748 from trunk.
749
750 * fontset.c (Fclear_face_cache): Declare.
751 (accumulate_font_info): Commented-out (unused).
752 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
753 variables.
754
755 * character.h (string_escape_byte8): Declare.
756
757 * charset.c (load_charset_map, load_charset_map_from_file): Remove
758 unused vars.
759 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
760 (Fmap_charset_chars): Doc fix.
761
762 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
763 Removed.
764 (Fset_coding_system_priority, Fset_coding_system_priority)
765 (Fdefine_coding_system_internal): Doc fix.
766
767 2002-05-16 Dave Love <fx@gnu.org>
768
769 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
770
771 2002-05-16 Kenichi Handa <handa@etl.go.jp>
772
773 * character.c (string_escape_byte8): Make multibyte string with
774 correct size.
775
776 * charset.c (Fmake_char): Delete unnecessary code.
777
778 2002-05-14 Kenichi Handa <handa@etl.go.jp>
779
780 * xfns.c (x_encode_text): Allocate coding.destination here, and
781 call encode_coding_object with dst_object Qnil.
782
783 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
784 multibyte form correctly.
785
786 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
787 against Vfont_encoding_alist.
788
789 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
790 handling of charset list.
791 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
792 (decode_coding_object): Move point to coding->dst_pos before
793 calling post-read-conversion function.
794 (encode_coding_object): Give correct arguments to
795 pre-write-conversion. Ignore the return value of
796 pre-write-conversion function. Pay attention to the case that
797 pre-write-conversion changes the current buffer. If dst_object is
798 Qt, even if coding->src_bytes is zero, allocate at least one byte
799 to coding->destination.
800
801 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
802
803 * charset.c (Fmake_char): Make it more backward compatible.
804 (Fmap_charset_chars): Fix docstring.
805
806 2002-05-13 Dave Love <fx@gnu.org>
807
808 * coding.c: Doc fixes.
809 (Fdefine_coding_system_alias): Use names, not symbols, in
810 coding-system-alist.
811
812 2002-05-13 Kenichi Handa <handa@etl.go.jp>
813
814 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
815 of calling free_realized_face.
816
817 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
818
819 * charset.c (load_charset_map): Fix previous change.
820 (read_hex): Don't treat SPC as a comment starter.
821 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
822 -1.
823 (Fdecode_char): Fix typo.
824
825 2002-05-10 Kenichi Handa <handa@etl.go.jp>
826
827 * charset.h (struct charset): New member `code_space_mask'.
828
829 * coding.c (coding_set_source): Delete the local variable
830 beg_byte.
831 (encode_coding_charset): Delete the local variable charset.
832 (Fdefine_coding_system_internal): Likewise.
833 (Fdefine_coding_system_internal): Setup
834 attrs[coding_attr_charset_valids] correctly.
835
836 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
837 member to check if CODE is valid or not.
838 (Fdefine_charset_internal): Initialize `code_space_mask' member.
839 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
840 is within the range of charset->min_code and carset->max_code.
841
842 2002-05-09 Dave Love <fx@gnu.org>
843
844 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
845
846 * dispextern.h (generate_ascii_font): Fix return type.
847
848 * xfaces.c (generate_ascii_font): Fix arg declaration.
849
850 * coding.c (coding_inherit_eol_type)
851 (Fset_terminal_coding_system_internal)
852 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
853
854 2002-05-08 Kenichi Handa <handa@etl.go.jp>
855
856 * coding.c (decode_coding_charset, encode_coding_charset): Handle
857 multiple charsets correctly.
858
859 2002-05-07 Kenichi Handa <handa@etl.go.jp>
860
861 * search.c (boyer_moore): Fix handling of mulitbyte character
862 translation.
863
864 * xdisp.c (display_mode_element): When the variable `elt' is
865 changed, update `this' and `lisp_string'.
866
867 2002-05-07 Kenichi Handa <handa@etl.go.jp>
868
869 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
870
871 * callproc.c (Fcall_process): Be sure to give the current buffer
872 to decode_coding_c_string. Update PT and PT_BYTE after the
873 insertion.
874
875 * charset.c (struct charset_map_entries): New struct.
876 (load_charset_map): Renamed from parse_charset_map. New args
877 entries and n_entries. Caller changed.
878 (load_charset_map_from_file): Renamed from load_charset_map.
879 Caller changed. New arg control_flag. Call load_charset_map at
880 the tail.
881 (load_charset_map_from_vector): New function.
882 (Fdefine_charset_internal): Setup charset.compact_codes_p.
883 (encode_char): If the charset is compact, change a character index
884 to a code point.
885
886 * coding.c (coding_alloc_by_making_gap): Check the case that the
887 source and destination are the same correctly.
888 (decode_coding_raw_text): Set coding->consumed_char and
889 coding->consumed to 0.
890 (produce_chars): If coding->chars_at_source is nonzero, update
891 coding->consumed_char and coding->consumed before calling
892 alloc_destination.
893 (Fdefine_coding_system_alias): Register ALIAS in
894 Vcoding_system_alist.
895 (syms_of_coding): Define `no-convesion' coding system at the tail.
896
897 * fileio.c (Finsert_file_contents): Set coding_system instead of
898 val. If the current buffer is multibyte, always call
899 decode_coding_gap.
900
901 * xfaces.c (try_font_list): Give higher priority to fontset's
902 family than face's family.
903
904 2002-04-18 Kenichi Handa <handa@etl.go.jp>
905
906 * callproc.c (Fcall_process): Be sure to give the current buffer
907 to decode_coding_c_string.
908
909 * xfaces.c (try_font_list): Give a family specified in a fontset
910 higher priority than a family specified in a face.
911
912 2002-04-09 Kenichi Handa <handa@etl.go.jp>
913
914 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
915 Fix arguments to insert_from_buffer.
916
917 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
918
919 2002-03-11 Kenichi Handa <handa@etl.go.jp>
920
921 * coding.c (produce_chars): Set the variable `multibytep' correctly.
922 (decode_coding_gap): Set coding->dst_multibyte correctly.
923
924 2002-03-07 Kenichi Handa <handa@etl.go.jp>
925
926 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
927 (decode_coding_utf_16): Fix converting high and low bytes to
928 code-point.
929 (encode_coding_utf_16): Substitute coding->default_char for
930 non-Unicode characters.
931 (decode_coding): Don't call record_insert here.
932 (setup_coding_system): Initialize `surrogate' of
933 coding->spec.utf_16 to 0.
934 (EMIT_ONE_BYTE): Fix for multibyte case.
935
936 * insdel.c (insert_from_gap): Call record_insert.
937
938 2002-03-04 Kenichi Handa <handa@etl.go.jp>
939
940 * casefiddle.c (casify_region): Fix multibyte case.
941
942 * character.c (c_string_width): Add return type `int'.
943 (char_string_with_unification): Arg ADVANCED deleted.
944
945 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
946 (CHAR_STRING): Adjusted for the change of
947 char_string_with_unification.
948 (CHAR_STRING_ADVANCE): Make it do-while statement.
949
950 * chartab.c (sub_char_table_set_range): Optimized for the case
951 DEPTH == 3. Add workaround code for a GCC optimization bug.
952
953 * charset.c (parse_charset_map): Remove an unused variable.
954
955 * coding.c: Delete unused variables.
956
957 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
958 earlier. If inserted is zero and the coding system doesn't
959 require flushing, don't call decode_coding_gap.
960
961 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
962
963 2002-03-01 Kenichi Handa <handa@etl.go.jp>
964
965 The following changes are for using Unicode as an internal
966 character model, and use UTF-8 format for buffer/string
967 representation.
968
969 * .gdbinit (xchartable): Adjusted for the change of char table
970 structure.
971 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
972
973 * Makefile.in (obj): Add character.o and chartab.o.
974 (lisp, shortlisp): Remove utf-8.elc:
975 (*.o): For many files, change dependency on charset.h to
976 character.h, and add dependency on character.h.
977 (character.o, chartab.o): New targets.
978
979 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
980 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
981 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
982 of "charset.h".
983
984 * dired.c, filelock.c: Include "character.h".
985
986 * alloc.c: Include "character.h" instead of "charset.h".
987 (Fmake_char_table): Moved to chartab.c.
988 (make_sub_char_table): Likewise.
989 (syms_of_alloc): Remove defsubr for Smake_char_table.
990
991 * buffer.c: Include "character.h" instead of "charset.h", don't
992 include "coding.h".
993 (Fset_buffer_multibyte): Adjuted for UTF-8.
994
995 * buffer.h: EXFUN Fbuffer_live_p.
996
997 * callproc.c: Include "character.h" instead of "charset.h".
998 (Fcall_process): Big change for the new code-conversion APIs.
999
1000 * casetab.c: Include "character.h" instead of "charset.h".
1001 (set_canon, set_identity, shuffle): Adjusted for the new
1002 map_char_table spec.
1003 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
1004 accessing the char table structure.
1005
1006 * chartab.c: New file that implements char table.
1007
1008 * category.c: Include "character.h".
1009 (copy_category_entry): New function.
1010 (copy_category_table): Call map_char_table and copy_category_entry.
1011 (Fmake_category_table): Initialize all top-vel slots.
1012 (char_category_set): New function.
1013 (modify_lower_category_set): Deleted.
1014 (Fmodify_category_entry): Call char_table_ref_and_range.
1015
1016 * category.h (CATEGORY_SET): Just call char_category_set.
1017
1018 * ccl.c: Include "character.h".
1019 (Qccl, Qcclp): New variables.
1020 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
1021 it's less than 256.
1022 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
1023 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
1024 and DST type.
1025 (ccl_driver): Types of arguments changed. Code adjusted for that.
1026 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
1027 ccl_driver.
1028 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
1029
1030 * ccl.h (struct ccl_program): Members eol_type and multibyte
1031 deleted. New members src_multibyte, dst_multibyte, consumed, and
1032 produced.
1033 (struct ccl_spec): Members decoder and encoder deleted. New
1034 memeber ccl.
1035 (CODING_SPEC_CCL_PROGRAM): New macro.
1036 (ccl_driver): Prototype updated.
1037 (Qccl, Qcclp, Fccl_program_p): Extern them.
1038 (CHECK_CCL_PROGRAM): New macro.
1039
1040 * character.c, character.h, chartab.c: New files.
1041
1042 * charset.c: Mostly re-written. Character and multibyte sequence
1043 handling codes are moved to character.c.
1044
1045 * charset.h: Mostly re-written. Character and multibyte sequence
1046 handling codes are moved to character.h.
1047
1048 * coding.c, coding.h: Mostly re-written.
1049
1050 * composite.c: Include "character.h" instead of "charset.h".
1051 (CHAR_WIDTH): Moved to character.h.
1052 (HASH_KEY, HASH_VALUE): Deleted.
1053
1054 * composite.h (enum composition_method): Order of enumeration
1055 symbols changed.
1056
1057 * data.c: Include "character.h" instead of "charset.h".
1058 (Faref): Call CHAR_TABLE_REF for a char table.
1059 (Faset): Call CHAR_TABLE_SET for a char table.
1060
1061 * dispextern.h (free_realized_face, check_face_attribytes,
1062 generate_ascii_font): Extern them.
1063 (free_realized_multibyte_face): Extern deleted.
1064
1065 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
1066 table structure.
1067
1068 * editfns.c: Include "character.h" instead of "charset.h".
1069 (Fchar_to_string): Always call CHAR_STRING.
1070
1071 * emacs.c (main): Call init_charset_once, init_charset,
1072 syms_of_chartab, and syms_of_character.
1073
1074 * fileio.c: Include "character.h" instead of "charset.h".
1075 (Finsert_file_contents): Big change for the new code-conversion
1076 API.
1077 (choose_write_coding_system): Likewise.
1078 (Fwrite_region): Likewise.
1079 (build_annotations_2): Deleted.
1080 (e_write): Big change for the new code-conversion API.
1081
1082 * fns.c: Include "character.h" instead of "charset.h".
1083 (copy_sub_char_table): Moved to chartab.c.
1084 (Fcopy_sequence): Call copy_char_table for a char table.
1085 (concat): Delete codes calling count_multibyte.
1086 (string_char_to_byte): Adjusted for the new multibyte form.
1087 (string_byte_to_char): Likewise.
1088 (internal_equal): Adjusted for the change of char table structure.
1089 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
1090 Fchar_table_extra_slot, Fset_char_table_extra_slot,
1091 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
1092 char_table_translate, optimize_sub_char_table,
1093 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
1094 chartab.c.
1095 (char_table_ref_and_index): Deleted.
1096 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
1097 (Fmd5): Call preferred_coding_system instead of accessing
1098 Vcoding_category_list. Adjusted for the new code-conversion API.
1099 (syms_of_fns): Defsubr for char table related functions moved to
1100 chartab.c.
1101
1102 * fontset.c: Mostly re-written.
1103
1104 * fontset.h (struct font_info): Type of the member encoding_type
1105 changed.
1106 (enum FONT_SPEC_INDEX): New enum.
1107 (fontset_font_pattern, fs_load_font): Prototype updated.
1108 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
1109
1110 * indent.c: Include "character.h" instead of "charset.h".
1111 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
1112 WIDTH_BY_CHAR_HEAD.
1113
1114 * insdel.c: Include "character.h" instead of "charset.h".
1115 (copy_text): Don't refer to Vnonascii_translation_table.
1116 (insert_from_gap): New function.
1117
1118 * keyboard.c: Include "character.h" instead of "charset.h".
1119 (command_loop_1): Never call direct_output_forward_char before
1120 a non-ASCII character.
1121 (read_char): If Vkeyboard_translate_table is a char table, always
1122 translated a character.
1123
1124 * keymap.c: Include "character.h".
1125 (store_in_keymap): Handle the case that IDX is a cons.
1126 (Fdefine_key): Handle the case that KEY is a cons and the car part
1127 is also a cons (range).
1128 (push_key_description): Adjusted for the new character code.
1129 (describe_vector): Call describe_char_table for a char table.
1130 (describe_char_table): New function.
1131
1132 * keymap.h (describe_char_table): Extern it.
1133
1134 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
1135 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
1136 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
1137 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
1138 Deleted.
1139 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
1140 structure.
1141 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
1142 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
1143 CHARTAB_SIZE_BITS_3): New macros.
1144 (chartab_size): Extern it.
1145 (struct Lisp_Char_Table): Re-designed.
1146 (struct Lisp_Sub_Char_Table): New structure.
1147 (HASH_KEY, HASH_VALUE): Moved from fns.c.
1148 (CHARACTERBITS): Defined as 22.
1149 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
1150 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
1151 (GC_SUB_CHAR_TABLE_P): New macro.
1152 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
1153 (code_convert_string_norecord): Extern deleted.
1154 (init_character_once, syms_of_character, init_charset,
1155 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
1156
1157 * lread.c: Include "character.h".
1158 (read_multibyte): New arg NBYTES.
1159 (read_escape): The meaning of returned *BYTEREP changed.
1160 (to_multibyte): Deleted.
1161 (read1): Adjuted the handling of char table and string.
1162
1163 * print.c: Include "character.h" instead of "charset.h".
1164 (print_string): Convert 8-bit raw bytes to octal form by
1165 string_escape_byte8.
1166 (print_object): Adjusted for the new multibyte form. Print 8-bit
1167 raw bytes always in octal form. Handle sub char table correctly.
1168
1169 * process.c: Include "character.h" instead of "charset.h".
1170 (read_process_output): Adjusted for the new code-conversion API.
1171 (send_process): Likewise.
1172
1173 * puresize.h (BASE_PURESIZE): Increased.
1174
1175 * regex.c: Include "character.h" instead of "charset.h".
1176 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
1177 (regex_compile): Accept a range whose starting and ending
1178 character have different leading bytes.
1179 (analyse_first): Adjusted for the above change.
1180
1181 * search.c: Include "character.h" instead of "charset.h".
1182 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
1183 (Freplace_match): Adjusted for the change of
1184 multibyte_char_to_unibyte.
1185
1186 * syntax.c: Include "character.h" instead of "charset.h".
1187 (syntax_parent_lookup): Deleted.
1188 (Fmodify_syntax_entry): Accept a cons as CHAR.
1189 (skip_chars): Adjusted for the new multibyte form.
1190 (init_syntax_once): Call char_table_set_range instead of directly
1191 accessing the structure of a char table.
1192
1193 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
1194 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
1195 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
1196 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
1197
1198 * term.c: Include "buffer.h" and "character.h".
1199 (encode_terminal_code): Adjusted for the new code-conversion API.
1200 (write_glyphs): Likewise.
1201 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
1202
1203 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
1204
1205 * xdisp.c: Include "character.h".
1206 (get_next_display_element): Adjusted for the new multibyte form.
1207 (disp_char_vector): Adjusted for the new char table structure.
1208 (decode_mode_spec_coding): Adjusted for the new structure of
1209 coding system.
1210 (decode_mode_spec): Adjusted for the new code-conversion API.
1211
1212 * xfaces.c: Include "character.h" instead of "charset.h".
1213 (load_face_font): Adjusted for the change of choose_face_font and
1214 FS_LOAD_FONT.
1215 (generate_ascii_font): New function.
1216 (set_lface_from_font_name): Adjusted for the change of
1217 FS_LOAD_FONT.
1218 (set_font_frame_param): Adjusted for the change of
1219 choose_face_font.
1220 (free_realized_face): Make it public.
1221 (free_realized_faces_for_fontset): Renamed from
1222 free_realized_multibyte_face. Free also faces realized for ASCII.
1223 (choose_face_font): Argments changed. Adjusted for the change of
1224 fontset_font_pattern and FS_LOAD_FONT.
1225
1226 * xfns.c: Include "character.h".
1227 (x_encode_text): Adjusted for the new code-conversion API.
1228
1229 * xselect.c: Don't include "charset.h".
1230 (selection_data_to_lisp_data): Adjusted for the new code
1231 covnersion API.
1232
1233 * xterm.c: Include "character.h".
1234 (x_encode_char): New argument CHARSET. Caller changed.
1235 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
1236 SPLIT_CHAR.
1237 (x_get_glyph_face_and_encoding): Likewise.
1238 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
1239 CHAR_WIDTH instead of CHARSET_WIDTH.
1240 (XTread_socket): Adjusted for the new code-conversion API.
1241 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
1242 (x_load_font): Adjusted for the change of struct font.
1243
1244 ;; Local Variables:
1245 ;; coding: iso-2022-7bit
1246 ;; End:
1247
1248 Copyright (C) 2002 Free Software Foundation, Inc.
1249 Copying and distribution of this file, with or without modification,
1250 are permitted provided the copyright notice and this notice are preserved.