1 2002-07-22 Kenichi Handa <handa@etl.go.jp>
3 * character.h (TRAILING_CODE_P): New macro.
4 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
5 (string_char_with_unification): Fix prototype.
6 (Vscript_alist): Extern it.
8 * character.c (Vscript_alist): New variable.
9 (string_char_with_unification): Add `const' to local variables.
10 (str_as_unibyte): Likewise.
11 (string_escape_byte8): Likewise.
12 (syms_of_character): Declare script-alist as a Lisp variable.
14 * charset.h (Vcharset_ordered_list): Extern it.
15 (charset_ordered_list_tick): Extern it.
16 (EMACS_MULE_LEADING_CODE_PRIVATE_11,
17 EMACS_MULE_LEADING_CODE_PRIVATE_12,
18 EMACS_MULE_LEADING_CODE_PRIVATE_21,
19 EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
20 (Funify_charset): Adjusted for the change of Funify_charset.
22 * charset.c (charset_ordered_list_tick): New variable.
23 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
24 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
25 deunify intead of unify a charset.
26 (string_xstring_p): Add `const' to local variables.
27 (find_charsets_in_text): Add `const' to arguemnts and local
29 (encode_char): Adjusted for the change of Funify_charset. Fix
30 detecting of invalid code.
31 (Fset_charset_priority): Increment charset_ordered_list_tick.
33 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12,
34 LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
35 deleted. Callers changes to use
36 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
37 (decode_coding_ccl): Add `const' to local variables.
38 (consume_chars): Likewise.
39 (Ffind_coding_systems_region_internal): Likewise.
40 (Fcheck_coding_systems_region): Likewise.
42 * print.c (print_object): Use octal form for printing the
43 contents of a bool vector.
45 2002-07-18 Dave Love <fx@gnu.org>
47 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
48 <version == 20>: Refuse to load.
50 2002-07-17 Dave Love <fx@gnu.org>
52 * fns.c: Move coding.h.
53 (Qcodeset, Qdays, Qmonths): New.
54 (concat): Use CHARACTERP instead of INTERGERP.
55 (Flocale_codeset): Deleted.
56 (Flanginfo): New function.
57 (syms_of_fns): Changed accordingly.
59 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
61 2002-07-16 Dave Love <fx@gnu.org>
63 * casetab.c (init_casetab_once, init_casetab_once): Fix
66 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
68 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
70 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
71 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
72 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
74 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
76 * coding.c (ENCODE_DESIGNATION, decode_eol)
77 (make_conversion_work_buffer, code_conversion_restore)
78 (Fdefine_coding_system_internal): Convert Lisp types.
79 (code_conversion_restore): Use EQ, not ==.
80 (Fencode_coding_string): Fix code_convert_string call.
82 * coding.h (code_convert_region): Fix prototype.
84 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
86 * fontset.c (fontset_ref, fontset_set, fs_load_font)
87 (Ffontset_info): Convert Lisp types.
89 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
91 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
93 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
95 * chartab.c: Include "...h", not <...h> in some cases.
97 * callproc.c (Fcall_process): Remove unused variables.
99 2002-07-12 Dave Love <fx@gnu.org>
101 * coding.c (Fset_coding_system_priority): Allow null arg list.
103 2002-07-03 Dave Love <fx@gnu.org>
105 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
106 (Fself_insert_and_exit): Use CHARACTERP.
108 * callproc.c (Fcall_process): Remove unused vars.
110 * xterm.c (XTread_socket): Add extra dead keysyms.
112 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
114 * dispextern.h: Remove prototypes for redraw_frame,
115 redraw_garbaged_frames.
117 * cmds.c (Fself_insert_command): Use CHARACTERP.
119 * chartab.c (make_sub_char_table): Remove unused var.
120 (Fset_char_table_default, Fmap_char_table): Doc fix.
122 * keymap.c (access_keymap): Remove generic char code.
123 (push_key_description): Use CHARACTERP.
125 2002-07-01 Dave Love <fx@gnu.org>
127 * charset.c: Doc fixes.
128 (Funify_charset): Extra checking.
130 2002-06-24 Dave Love <fx@gnu.org>
132 * lread.c: Remove some unused variables.
133 (safe_to_load_p): If safe, return the magic number version byte.
134 (Fload): Maybe use load-with-code-conversion.
136 2002-06-12 Kenichi Handa <handa@etl.go.jp>
138 * category.c (Fmodify_category_entry): Don't modify the contents
139 of category_set for characters out of the range. Avoid
140 unnecessary modification.
142 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
143 Vchar_unify_table. The default value of the table is now nil.
145 * character.c (syms_of_character): Setup Vchar_width_table for
146 eight-bit-control and raw-byte chars.
148 * charset.h (enum define_charset_arg_index): Delete
149 charset_arg_parents and add charset_arg_subset and
150 charset_arg_superset.
151 (enum charset_attr_index): Delete charset_parents and add
152 charset_subset and charset_superset.
153 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
154 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
155 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
156 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
157 (CHARSET_SUPERSET): New macros.
158 (charset_work): Extern it.
159 (ENCODE_CHAR): Use charset_work.
160 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
161 (map_charset_chars): Extern it.
163 * charset.c (load_charset_map): Set the default value of encoder
164 and deunifier char-tables to nil.
165 (map_charset_chars): Argument changed. Callers changed. Use
166 map_char_table_for_charset instead of map_char_table.
167 (Fmap_charset_chars): New optional args from_code and to_code.
168 (Fdefine_charset_internal): Adjusted for the change of
169 `define-charset' (:parents -> :subset or :superset).
170 (charset_work): New variable.
171 (encode_char): Adjusted for the change of
172 Fdefine_charset_internal.
173 (syms_of_charset): Likewise.
174 (Ffind_charset_string): Setup the vector `charsets' correctly.
176 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
178 (char_table_ref_and_range): Adjusted for the above change.
179 (map_sub_char_table_for_charset): New function.
180 (map_char_table_for_charset): New function.
182 * keymap.c (describe_vector): Handle a char-table directly here.
183 (describe_char_table): Deleted.
185 * lisp.h (map_charset_chars): Deleted.
187 2002-06-11 Dave Love <fx@gnu.org>
189 * fns.c (count_combining): Comment out (unused).
190 (Flocale_codeset): New.
191 (syms_of_fns): Defsubr it.
193 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
196 2002-06-06 Dave Love <fx@gnu.org>
198 * Makefile.in (chartab.o): Depend on charset.h
200 2002-06-03 Kenichi Handa <handa@etl.go.jp>
202 * character.c (syms_of_character): Set the default value of
203 Vprintable_chars to Qnil.
205 2002-05-31 Dave Love <fx@gnu.org>
207 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
209 2002-05-31 Kenichi Handa <handa@etl.go.jp>
211 * charset.c (load_charset_map): Handle the case that from < to
214 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
216 (encode_coding_iso_2022): Likewise.
217 (encode_coding_sjis): Likewise.
218 (encode_coding_big5): Likewise.
219 (encode_coding_charset): Likewise.
221 2002-05-30 Kenichi Handa <handa@etl.go.jp>
223 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
224 not bytecompiled now.
225 (shortlisp): Likewise.
227 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
228 (charset_jisx0208): New variables.
229 (Fdefine_charset_internal): Setup them if appropriate.
230 (init_charset_once): Initialize them to -1.
232 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
233 charset_jisx0208): Extern them.
235 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
236 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
237 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
238 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
239 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
240 and CODING_ISO_FLAG_USE_OLDJIS.
241 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
242 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
243 (encode_coding_iso_2022): Change the 1st arg to
244 ENCODE_ISO_CHARACTER to a variable.
246 2002-05-29 Kenichi Handa <handa@etl.go.jp>
248 * charset.h (enum define_charset_arg_index): New enums
249 charset_arg_min_code and charset_arg_max_code.
250 (struct charset): New member char_index_offset.
252 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
254 (INDEX_TO_CODE_POINT): Likewise.
255 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
256 args[charset_arg_max_code]. Setup charset.char_index_offset.
257 (syms_of_charset): Fix args to Fdefine_charset_internal.
259 2002-05-27 Dave Love <fx@gnu.org>
261 * coding.c (decode_coding_utf_8): Reject overlong sequences.
263 2002-05-26 Dave Love <fx@gnu.org>
265 * coding.c: Doc fixes.
266 (Fcoding_system_aliases): Fix return value.
267 (Qmac): Remove (duplicated) definition.
269 2002-05-25 Dave Love <fx@gnu.org>
271 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
274 * character.c (Fstring): Doc fix.
276 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
278 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
280 (font-encoding-alist): Doc fix.
282 2002-05-24 Dave Love <fx@gnu.org>
284 * term.c (costs_set): Declare static, non-initialized for pcc.
285 (encode_terminal_code): Remove ensued var.
287 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
290 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
292 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
293 (suffixes): Moved out of make_subsidiaries for K&R.
295 * charset.c (map_charset_chars): Fix c_function declaration for
298 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
300 2002-05-23 Dave Love <fx@gnu.org>
302 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
304 * category.c (Fmodify_category_entry): Doc fix. Remove unused
307 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
309 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
311 * coding.c (Fdefine_coding_system_internal): Fix previous change.
312 (decode_coding_charset): Workaround for the bug of GCC 2.96.
314 2002-05-23 Kenichi Handa <handa@etl.go.jp>
316 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
317 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
318 (shortlisp): Likewise.
320 2002-05-22 Kenichi Handa <handa@etl.go.jp>
322 * coding.c (decode_coding_charset): Adjusted for the change of
323 Fdefine_coding_system_internal.
324 (Fdefine_coding_system_internal): For a coding system of
325 `charset' type, store a list of charset IDs in
326 `charset_attr_charset_valids' element of coding attributes.
328 * charset.c (Fmake_char): Fix previous change.
330 2002-05-21 Kenichi Handa <handa@etl.go.jp>
332 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
333 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
334 changed. Handle 2-byte and 3-byte charsets correctly.
335 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
336 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
337 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
338 (DECODE_EMACS_MULE_21_COMPOSITION): Call
339 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
341 (decode_coding_emacs_mule): Handle composition correctly. Rewind
342 `src' and `consumed_chars' correctly before calling
344 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
345 and alt&rule composition.
346 (decode_coding_iso_2022): Handle composition correctly.
347 (init_coding_once): Setup emacs_mule_bytes for private charsets.
349 * charset.c (Fdefine_charset_internal): Fix bug for the case of
350 re-defining a charset. If the charset has :emacs-mule-id, setup
352 (Fmake_char): If CODE1 is nil, use the minimum code of the
355 2002-05-20 Kenichi Handa <handa@etl.go.jp>
357 * coding.c (encode_coding_iso_2022): If coding requires safe
358 encoding, produce a character specified by
359 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
360 (encode_coding_sjis): Likewise.
361 (encode_coding_big5): Likewise.
362 (encode_coding_charset): Likewise.
364 2002-05-17 Dave Love <fx@gnu.org>
366 * xterm.c (XSetIMValues): Declare.
368 * process.c: Conditionally include sys/wait.h, pty.h.
370 * print.c (print_object): Fix print format for 64-bit
373 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
376 * buffer.c (emacs_strerror): Declare.
377 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
380 * fontset.c (Fclear_face_cache): Declare.
381 (accumulate_font_info): Commented-out (unused).
382 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
385 * character.h (string_escape_byte8): Declare.
387 * charset.c (load_charset_map, load_charset_map_from_file): Remove
389 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
390 (Fmap_charset_chars): Doc fix.
392 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
394 (Fset_coding_system_priority, Fset_coding_system_priority)
395 (Fdefine_coding_system_internal): Doc fix.
397 2002-05-16 Dave Love <fx@gnu.org>
399 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
401 2002-05-16 Kenichi Handa <handa@etl.go.jp>
403 * character.c (string_escape_byte8): Make multibyte string with
406 * charset.c (Fmake_char): Delete unnecessary code.
408 2002-05-14 Kenichi Handa <handa@etl.go.jp>
410 * xfns.c (x_encode_text): Allocate coding.destination here, and
411 call encode_coding_object with dst_object Qnil.
413 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
414 multibyte form correctly.
416 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
417 against Vfont_encoding_alist.
419 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
420 handling of charset list.
421 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
422 (decode_coding_object): Move point to coding->dst_pos before
423 calling post-read-conversion function.
424 (encode_coding_object): Give correct arguments to
425 pre-write-conversion. Ignore the return value of
426 pre-write-conversion function. Pay attention to the case that
427 pre-write-conversion changes the current buffer. If dst_object is
428 Qt, even if coding->src_bytes is zero, allocate at least one byte
429 to coding->destination.
431 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
433 * charset.c (Fmake_char): Make it more backward compatible.
434 (Fmap_charset_chars): Fix docstring.
436 2002-05-13 Dave Love <fx@gnu.org>
438 * coding.c: Doc fixes.
439 (Fdefine_coding_system_alias): Use names, not symbols, in
442 2002-05-13 Kenichi Handa <handa@etl.go.jp>
444 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
445 of calling free_realized_face.
447 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
449 * charset.c (load_charset_map): Fix previous change.
450 (read_hex): Don't treat SPC as a comment starter.
451 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
453 (Fdecode_char): Fix typo.
455 2002-05-10 Kenichi Handa <handa@etl.go.jp>
457 * charset.h (struct charset): New member `code_space_mask'.
459 * coding.c (coding_set_source): Delete the local variable
461 (encode_coding_charset): Delete the local variable charset.
462 (Fdefine_coding_system_internal): Likewise.
463 (Fdefine_coding_system_internal): Setup
464 attrs[coding_attr_charset_valids] correctly.
466 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
467 member to check if CODE is valid or not.
468 (Fdefine_charset_internal): Initialize `code_space_mask' member.
469 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
470 is within the range of charset->min_code and carset->max_code.
472 2002-05-09 Dave Love <fx@gnu.org>
474 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
476 * dispextern.h (generate_ascii_font): Fix return type.
478 * xfaces.c (generate_ascii_font): Fix arg declaration.
480 * coding.c (coding_inherit_eol_type)
481 (Fset_terminal_coding_system_internal)
482 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
484 2002-05-08 Kenichi Handa <handa@etl.go.jp>
486 * coding.c (decode_coding_charset, encode_coding_charset): Handle
487 multiple charsets correctly.
489 2002-05-07 Kenichi Handa <handa@etl.go.jp>
491 * search.c (boyer_moore): Fix handling of mulitbyte character
494 * xdisp.c (display_mode_element): When the variable `elt' is
495 changed, update `this' and `lisp_string'.
497 2002-05-07 Kenichi Handa <handa@etl.go.jp>
499 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
501 * callproc.c (Fcall_process): Be sure to give the current buffer
502 to decode_coding_c_string. Update PT and PT_BYTE after the
505 * charset.c (struct charset_map_entries): New struct.
506 (load_charset_map): Renamed from parse_charset_map. New args
507 entries and n_entries. Caller changed.
508 (load_charset_map_from_file): Renamed from load_charset_map.
509 Caller changed. New arg control_flag. Call load_charset_map at
511 (load_charset_map_from_vector): New function.
512 (Fdefine_charset_internal): Setup charset.compact_codes_p.
513 (encode_char): If the charset is compact, change a character index
516 * coding.c (coding_alloc_by_making_gap): Check the case that the
517 source and destination are the same correctly.
518 (decode_coding_raw_text): Set coding->consumed_char and
519 coding->consumed to 0.
520 (produce_chars): If coding->chars_at_source is nonzero, update
521 coding->consumed_char and coding->consumed before calling
523 (Fdefine_coding_system_alias): Register ALIAS in
524 Vcoding_system_alist.
525 (syms_of_coding): Define `no-convesion' coding system at the tail.
527 * fileio.c (Finsert_file_contents): Set coding_system instead of
528 val. If the current buffer is multibyte, always call
531 * xfaces.c (try_font_list): Give higher priority to fontset's
532 family than face's family.
534 2002-04-18 Kenichi Handa <handa@etl.go.jp>
536 * callproc.c (Fcall_process): Be sure to give the current buffer
537 to decode_coding_c_string.
539 * xfaces.c (try_font_list): Give a family specified in a fontset
540 higher priority than a family specified in a face.
542 2002-04-09 Kenichi Handa <handa@etl.go.jp>
544 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
545 Fix arguments to insert_from_buffer.
547 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
549 2002-03-11 Kenichi Handa <handa@etl.go.jp>
551 * coding.c (produce_chars): Set the variable `multibytep' correctly.
552 (decode_coding_gap): Set coding->dst_multibyte correctly.
554 2002-03-07 Kenichi Handa <handa@etl.go.jp>
556 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
557 (decode_coding_utf_16): Fix converting high and low bytes to
559 (encode_coding_utf_16): Substitute coding->default_char for
560 non-Unicode characters.
561 (decode_coding): Don't call record_insert here.
562 (setup_coding_system): Initialize `surrogate' of
563 coding->spec.utf_16 to 0.
564 (EMIT_ONE_BYTE): Fix for multibyte case.
566 * insdel.c (insert_from_gap): Call record_insert.
568 2002-03-04 Kenichi Handa <handa@etl.go.jp>
570 * casefiddle.c (casify_region): Fix multibyte case.
572 * character.c (c_string_width): Add return type `int'.
573 (char_string_with_unification): Arg ADVANCED deleted.
575 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
576 (CHAR_STRING): Adjusted for the change of
577 char_string_with_unification.
578 (CHAR_STRING_ADVANCE): Make it do-while statement.
580 * chartab.c (sub_char_table_set_range): Optimized for the case
581 DEPTH == 3. Add workaround code for a GCC optimization bug.
583 * charset.c (parse_charset_map): Remove an unused variable.
585 * coding.c: Delete unused variables.
587 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
588 earlier. If inserted is zero and the coding system doesn't
589 require flushing, don't call decode_coding_gap.
591 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
593 2002-03-01 Kenichi Handa <handa@etl.go.jp>
595 The following changes are for using Unicode as an internal
596 character model, and use UTF-8 format for buffer/string
599 * .gdbinit (xchartable): Adjusted for the change of char table
601 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
603 * Makefile.in (obj): Add character.o and chartab.o.
604 (lisp, shortlisp): Remove utf-8.elc:
605 (*.o): For many files, change dependency on charset.h to
606 character.h, and add dependency on character.h.
607 (character.o, chartab.o): New targets.
609 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
610 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
611 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
614 * dired.c, filelock.c: Include "character.h".
616 * alloc.c: Include "character.h" instead of "charset.h".
617 (Fmake_char_table): Moved to chartab.c.
618 (make_sub_char_table): Likewise.
619 (syms_of_alloc): Remove defsubr for Smake_char_table.
621 * buffer.c: Include "character.h" instead of "charset.h", don't
623 (Fset_buffer_multibyte): Adjuted for UTF-8.
625 * buffer.h: EXFUN Fbuffer_live_p.
627 * callproc.c: Include "character.h" instead of "charset.h".
628 (Fcall_process): Big change for the new code-conversion APIs.
630 * casetab.c: Include "character.h" instead of "charset.h".
631 (set_canon, set_identity, shuffle): Adjusted for the new
633 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
634 accessing the char table structure.
636 * chartab.c: New file that implements char table.
638 * category.c: Include "character.h".
639 (copy_category_entry): New function.
640 (copy_category_table): Call map_char_table and copy_category_entry.
641 (Fmake_category_table): Initialize all top-vel slots.
642 (char_category_set): New function.
643 (modify_lower_category_set): Deleted.
644 (Fmodify_category_entry): Call char_table_ref_and_range.
646 * category.h (CATEGORY_SET): Just call char_category_set.
648 * ccl.c: Include "character.h".
649 (Qccl, Qcclp): New variables.
650 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
652 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
653 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
655 (ccl_driver): Types of arguments changed. Code adjusted for that.
656 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
658 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
660 * ccl.h (struct ccl_program): Members eol_type and multibyte
661 deleted. New members src_multibyte, dst_multibyte, consumed, and
663 (struct ccl_spec): Members decoder and encoder deleted. New
665 (CODING_SPEC_CCL_PROGRAM): New macro.
666 (ccl_driver): Prototype updated.
667 (Qccl, Qcclp, Fccl_program_p): Extern them.
668 (CHECK_CCL_PROGRAM): New macro.
670 * character.c, character.h, chartab.c: New files.
672 * charset.c: Mostly re-written. Character and multibyte sequence
673 handling codes are moved to character.c.
675 * charset.h: Mostly re-written. Character and multibyte sequence
676 handling codes are moved to character.h.
678 * coding.c, coding.h: Mostly re-written.
680 * composite.c: Include "character.h" instead of "charset.h".
681 (CHAR_WIDTH): Moved to character.h.
682 (HASH_KEY, HASH_VALUE): Deleted.
684 * composite.h (enum composition_method): Order of enumeration
687 * data.c: Include "character.h" instead of "charset.h".
688 (Faref): Call CHAR_TABLE_REF for a char table.
689 (Faset): Call CHAR_TABLE_SET for a char table.
691 * dispextern.h (free_realized_face, check_face_attribytes,
692 generate_ascii_font): Extern them.
693 (free_realized_multibyte_face): Extern deleted.
695 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
698 * editfns.c: Include "character.h" instead of "charset.h".
699 (Fchar_to_string): Always call CHAR_STRING.
701 * emacs.c (main): Call init_charset_once, init_charset,
702 syms_of_chartab, and syms_of_character.
704 * fileio.c: Include "character.h" instead of "charset.h".
705 (Finsert_file_contents): Big change for the new code-conversion
707 (choose_write_coding_system): Likewise.
708 (Fwrite_region): Likewise.
709 (build_annotations_2): Deleted.
710 (e_write): Big change for the new code-conversion API.
712 * fns.c: Include "character.h" instead of "charset.h".
713 (copy_sub_char_table): Moved to chartab.c.
714 (Fcopy_sequence): Call copy_char_table for a char table.
715 (concat): Delete codes calling count_multibyte.
716 (string_char_to_byte): Adjusted for the new multibyte form.
717 (string_byte_to_char): Likewise.
718 (internal_equal): Adjusted for the change of char table structure.
719 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
720 Fchar_table_extra_slot, Fset_char_table_extra_slot,
721 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
722 char_table_translate, optimize_sub_char_table,
723 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
725 (char_table_ref_and_index): Deleted.
726 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
727 (Fmd5): Call preferred_coding_system instead of accessing
728 Vcoding_category_list. Adjusted for the new code-conversion API.
729 (syms_of_fns): Defsubr for char table related functions moved to
732 * fontset.c: Mostly re-written.
734 * fontset.h (struct font_info): Type of the member encoding_type
736 (enum FONT_SPEC_INDEX): New enum.
737 (fontset_font_pattern, fs_load_font): Prototype updated.
738 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
740 * indent.c: Include "character.h" instead of "charset.h".
741 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
744 * insdel.c: Include "character.h" instead of "charset.h".
745 (copy_text): Don't refer to Vnonascii_translation_table.
746 (insert_from_gap): New function.
748 * keyboard.c: Include "character.h" instead of "charset.h".
749 (command_loop_1): Never call direct_output_forward_char before
750 a non-ASCII character.
751 (read_char): If Vkeyboard_translate_table is a char table, always
752 translated a character.
754 * keymap.c: Include "character.h".
755 (store_in_keymap): Handle the case that IDX is a cons.
756 (Fdefine_key): Handle the case that KEY is a cons and the car part
757 is also a cons (range).
758 (push_key_description): Adjusted for the new character code.
759 (describe_vector): Call describe_char_table for a char table.
760 (describe_char_table): New function.
762 * keymap.h (describe_char_table): Extern it.
764 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
765 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
766 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
767 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
769 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
771 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
772 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
773 CHARTAB_SIZE_BITS_3): New macros.
774 (chartab_size): Extern it.
775 (struct Lisp_Char_Table): Re-designed.
776 (struct Lisp_Sub_Char_Table): New structure.
777 (HASH_KEY, HASH_VALUE): Moved from fns.c.
778 (CHARACTERBITS): Defined as 22.
779 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
780 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
781 (GC_SUB_CHAR_TABLE_P): New macro.
782 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
783 (code_convert_string_norecord): Extern deleted.
784 (init_character_once, syms_of_character, init_charset,
785 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
787 * lread.c: Include "character.h".
788 (read_multibyte): New arg NBYTES.
789 (read_escape): The meaning of returned *BYTEREP changed.
790 (to_multibyte): Deleted.
791 (read1): Adjuted the handling of char table and string.
793 * print.c: Include "character.h" instead of "charset.h".
794 (print_string): Convert 8-bit raw bytes to octal form by
796 (print_object): Adjusted for the new multibyte form. Print 8-bit
797 raw bytes always in octal form. Handle sub char table correctly.
799 * process.c: Include "character.h" instead of "charset.h".
800 (read_process_output): Adjusted for the new code-conversion API.
801 (send_process): Likewise.
803 * puresize.h (BASE_PURESIZE): Increased.
805 * regex.c: Include "character.h" instead of "charset.h".
806 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
807 (regex_compile): Accept a range whose starting and ending
808 character have different leading bytes.
809 (analyse_first): Adjusted for the above change.
811 * search.c: Include "character.h" instead of "charset.h".
812 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
813 (Freplace_match): Adjusted for the change of
814 multibyte_char_to_unibyte.
816 * syntax.c: Include "character.h" instead of "charset.h".
817 (syntax_parent_lookup): Deleted.
818 (Fmodify_syntax_entry): Accept a cons as CHAR.
819 (skip_chars): Adjusted for the new multibyte form.
820 (init_syntax_once): Call char_table_set_range instead of directly
821 accessing the structure of a char table.
823 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
824 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
825 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
826 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
828 * term.c: Include "buffer.h" and "character.h".
829 (encode_terminal_code): Adjusted for the new code-conversion API.
830 (write_glyphs): Likewise.
831 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
833 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
835 * xdisp.c: Include "character.h".
836 (get_next_display_element): Adjusted for the new multibyte form.
837 (disp_char_vector): Adjusted for the new char table structure.
838 (decode_mode_spec_coding): Adjusted for the new structure of
840 (decode_mode_spec): Adjusted for the new code-conversion API.
842 * xfaces.c: Include "character.h" instead of "charset.h".
843 (load_face_font): Adjusted for the change of choose_face_font and
845 (generate_ascii_font): New function.
846 (set_lface_from_font_name): Adjusted for the change of
848 (set_font_frame_param): Adjusted for the change of
850 (free_realized_face): Make it public.
851 (free_realized_faces_for_fontset): Renamed from
852 free_realized_multibyte_face. Free also faces realized for ASCII.
853 (choose_face_font): Argments changed. Adjusted for the change of
854 fontset_font_pattern and FS_LOAD_FONT.
856 * xfns.c: Include "character.h".
857 (x_encode_text): Adjusted for the new code-conversion API.
859 * xselect.c: Don't include "charset.h".
860 (selection_data_to_lisp_data): Adjusted for the new code
863 * xterm.c: Include "character.h".
864 (x_encode_char): New argument CHARSET. Caller changed.
865 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
867 (x_get_glyph_face_and_encoding): Likewise.
868 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
869 CHAR_WIDTH instead of CHARSET_WIDTH.
870 (XTread_socket): Adjusted for the new code-conversion API.
871 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
872 (x_load_font): Adjusted for the change of struct font.
875 ;; coding: iso-2022-7bit
878 Copyright (C) 2002 Free Software Foundation, Inc.
879 Copying and distribution of this file, with or without modification,
880 are permitted provided the copyright notice and this notice are preserved.