1 2002-07-31 Kenichi Handa <handa@etl.go.jp>
3 * buffer.c (Qas, Qmake, Qto): New variables.
4 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
5 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
7 * callproc.c (Fcall_process): Don't call insert_1_both directly if
8 we are inserting a process output into a multibyte buffer.
10 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
11 multibyte_char_to_unibyte.
13 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
14 by the primary charset, make it eight-bit char.
15 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
17 * charset.c: (charset_eight_bit, Qeight_bit_control): New
19 (charset_8_bit__control, charset_8_bit_graphic,
20 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
21 (define_charset_internal): New function.
22 (syms_of_charset): Call define_charset_internal for pre-defined
25 * charset.h (charset_8_bit): Extern it.
27 * coding.c (make_conversion_work_buffer): Adjusted for the change
28 of Fset_buffer_multibyte.
29 (encode_coding_raw_text): Increment p0 in the loop.
31 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
33 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
34 for the change of Fset_buffer_multibyte.
36 * fns.c (Fstring_to_multibyte): New function.
37 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
39 2002-07-30 Dave Love <fx@gnu.org>
41 * xfns.c (x_put_x_image): Declare args.
43 * xfaces.c (font_name_registry, choose_face_font): Delete unused
45 (try_font_list): Declare an arg.
47 * xdisp.c (message2_nolog, set_message): Declare an arg.
49 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
51 * syntax.c (scan_sexps_forward): Declare an arg.
53 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
56 * lisp.h (Fnew_fontset): Declare.
58 * keymap.c (push_key_description): Call CHARACTERP correctly.
60 * fontset.c (fontset_add): Declare args. Call make_number
62 (face_for_char): Delete unused vars.
63 (Fset_fontset_font): Doc fix. Delete unused vars.
65 * doc.c (Fsubstitute_command_keys): Delete unused vars.
67 * composite.c (update_compositions): Declare arg.
69 * cm.c (calccost, cmgoto): Declare args.
71 * charset.c: Remove `emacs' conditional. Doc fixes.
72 (map_char_table_for_charset): Declare.
74 * character.c (syms_of_character) <translation-table-vector>: Doc
77 * ccl.c: Remove `emacs' conditional. Include hash table stuff
80 2002-07-26 Kenichi Handa <handa@etl.go.jp>
82 The following changes are to allow specifying multiple font
83 patterns for a character range (specified by script or charset).
85 * Makefile.in (abbrev.o): Depend on syntax.h.
86 (xfaces.o): Depend on charset.h.
88 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
91 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
93 * character.h (Vchar_script_table): Extern it.
95 * character.c (Vscript_alist): This variable deleted.
96 (Vchar_script_table, Qchar_script_table): New variable.
97 (syms_of_character): Declare Vchar_script_table as a lisp variable
100 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
101 have property char-table-extra-slots, make no extra slot.
103 * dispextern.h (struct face): Member `charset' deleted.
104 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
106 (FACE_FOR_CHAR): Likewise.
107 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
109 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
111 (generate_ascii_font_name): Renamed from generate_ascii_font.
113 * fontset.h (get_font_repertory_func): New prototype.
114 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
115 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
117 * fontset.c (Qprepend, Qappend): New variables.
118 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
119 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
120 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
121 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
122 (fontset_ref_and_range, fontset_add, reorder_font_vector)
123 (load_font_get_repertory): New functions.
124 (fontset_set): This function deleted.
125 (fontset_face): New arg FACE. Return face ID, not face.
126 Completely re-written to handle new fontset structure. Caller
128 (free_face_fontset): Use ASET istead of AREF (X) = Y.
129 (face_for_char): Don't call lookup_face.
130 (make_fontset_for_ascii_face): New arg FACE.
131 (fs_load_font): New arg CHARSET_ID. Don't check
132 Vfont_encoding_alist here.
133 (find_font_encoding): New function.
134 (list_fontsets): Use STRINGP, not ! NILP.
135 (accumulate_script_ranges): New function.
136 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
137 re-written to handle new fontset structure.
138 (Ffontset_font): Return a copy of element.
139 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
140 docstring of font-encoding-alist.
142 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
143 (Fset_fotset_font): Fix arguments to 5.
145 * msdos.c (XMenuActivate): Adjuted for the change of
148 * xdisp.c (message_dolog, set_message_1,
149 extend_face_to_end_of_line): Use ASCII_CHAR_P, not
151 (highlight_trailing_whitespace): Adjusted for the change of
154 * xfaces.c: Include charset.h.
155 (load_face_font): Argument C deleted. Caller changed.
156 (generate_ascii_font_name): Renamed from generate_ascii_font.
157 (font_name_registry): New function.
158 (cache_face): Store ascii faces before non-ascii faces in buckets.
159 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
160 Lookup only ascii faces.
161 (lookup_non_ascii_face): New function.
162 (lookup_named_face): Argument C deleted. Caller changed.
163 (lookup_derived_face): Argument C deleted. Caller changed.
164 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
165 a string, just call font_list with it.
166 (choose_face_font): Arguments FACE and C deleted. New arg
167 FONT_SPEC. Caller changed.
168 (realize_face): Arguments C and BASE_FACE deleted. Caller
169 (realize_x_face): Likewise.
170 (realize_non_ascii_face): New function.
171 (realize_x_face): Call load_face_font here.
172 (realize_tty_face): Argument C deleted. Caller changed.
173 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
175 (dump_realized_face): Don't print charset of FACE.
177 * xfns.c (x_set_font): Always call x_new_fontset and
178 store_frame_parameter.
179 (Fx_create_frame): Call x_new_fontset, not x_new_font.
180 (syms_of_xfns): Set get_font_repertory_func to
181 x_get_font_repertory.
183 * xterm.h (x_get_font_repertory): Extern it.
185 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
186 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
187 it->multibyte_p is zero.
188 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
189 (x_new_fontset): If FONTSETNAME doesn't match any existing
190 fontsets, create a new one.
191 (x_get_font_repertory): New function.
193 2002-07-25 Kenichi Handa <handa@etl.go.jp>
195 * coding.c (Ffind_coding_systems_region_internal): Detect an
196 ASCII only string correctly.
198 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
201 2002-07-24 Kenichi Handa <handa@etl.go.jp>
203 * lread.c: Include "coding.h".
204 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
205 load_each_byte, unread_char): New variables.
206 (readchar_backlog): This variable deleted.
207 (readchar): Return a character unless load_each_byte is nonzero.
208 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
209 cons. If unread_char is not -1, simply return it.
210 (unreadchar): Handle the case that readcharfun is
211 Qget_emacs_mule_file_char or a cons. Set unread_char if
213 (read_multibyte): This function deleted.
214 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
215 (read_emacs_mule_char): New functions.
216 (Fload): Even if the file doesn't have the extention ".elc", if
217 safe_to_load_p returns a positive version number, assume that the
218 file contains bytecompiled code. If the version is less than 22,
219 load the file while decoding multibyte sequences by emacs-mule.
220 (readevalloop): Don't use readchar_backlog.
221 (Fread): Likewise. Pay attention to the case that STREAM is a
223 (Fread_from_string): Pay attention to the case that STREAM is a
225 (read_escape): The arg BYTEREP deleted.
226 (read1): Set load_each_byte to 1 temporarily while handling
227 #@NUMBER. Don't call read_multibyte.
228 (read_vector): Call Fread with a cons. If readcharfun is
229 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
230 (read_list): If doc_reference is 2, make the cdr part string as
232 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
233 and Qload_force_doc_strings.
235 2002-07-23 Kenichi Handa <handa@etl.go.jp>
237 * xdisp.c (face_before_or_after_it_pos): Call
238 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
240 2002-07-22 Kenichi Handa <handa@etl.go.jp>
242 * character.h (TRAILING_CODE_P): New macro.
243 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
244 (string_char_with_unification): Fix prototype.
245 (Vscript_alist): Extern it.
247 * character.c (Vscript_alist): New variable.
248 (string_char_with_unification): Add `const' to local variables.
249 (str_as_unibyte): Likewise.
250 (string_escape_byte8): Likewise.
251 (syms_of_character): Declare script-alist as a Lisp variable.
253 * charset.h (Vcharset_ordered_list): Extern it.
254 (charset_ordered_list_tick): Extern it.
255 (EMACS_MULE_LEADING_CODE_PRIVATE_11,
256 EMACS_MULE_LEADING_CODE_PRIVATE_12,
257 EMACS_MULE_LEADING_CODE_PRIVATE_21,
258 EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
259 (Funify_charset): Adjusted for the change of Funify_charset.
261 * charset.c (charset_ordered_list_tick): New variable.
262 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
263 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
264 deunify intead of unify a charset.
265 (string_xstring_p): Add `const' to local variables.
266 (find_charsets_in_text): Add `const' to arguemnts and local
268 (encode_char): Adjusted for the change of Funify_charset. Fix
269 detecting of invalid code.
270 (Fset_charset_priority): Increment charset_ordered_list_tick.
271 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
274 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12,
275 LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
276 deleted. Callers changes to use
277 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
278 (decode_coding_ccl): Add `const' to local variables.
279 (consume_chars): Likewise.
280 (Ffind_coding_systems_region_internal): Likewise.
281 (Fcheck_coding_systems_region): Likewise.
283 * print.c (print_object): Use octal form for printing the
284 contents of a bool vector.
286 2002-07-18 Dave Love <fx@gnu.org>
288 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
289 <version == 20>: Refuse to load.
291 2002-07-17 Dave Love <fx@gnu.org>
293 * fns.c: Move coding.h.
294 (Qcodeset, Qdays, Qmonths): New.
295 (concat): Use CHARACTERP instead of INTERGERP.
296 (Flocale_codeset): Deleted.
297 (Flanginfo): New function.
298 (syms_of_fns): Changed accordingly.
300 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
302 2002-07-16 Dave Love <fx@gnu.org>
304 * casetab.c (init_casetab_once, init_casetab_once): Fix
307 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
309 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
311 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
312 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
313 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
315 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
317 * coding.c (ENCODE_DESIGNATION, decode_eol)
318 (make_conversion_work_buffer, code_conversion_restore)
319 (Fdefine_coding_system_internal): Convert Lisp types.
320 (code_conversion_restore): Use EQ, not ==.
321 (Fencode_coding_string): Fix code_convert_string call.
323 * coding.h (code_convert_region): Fix prototype.
325 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
327 * fontset.c (fontset_ref, fontset_set, fs_load_font)
328 (Ffontset_info): Convert Lisp types.
330 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
332 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
334 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
336 * chartab.c: Include "...h", not <...h> in some cases.
338 * callproc.c (Fcall_process): Remove unused variables.
340 2002-07-12 Dave Love <fx@gnu.org>
342 * coding.c (Fset_coding_system_priority): Allow null arg list.
344 2002-07-03 Dave Love <fx@gnu.org>
346 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
347 (Fself_insert_and_exit): Use CHARACTERP.
349 * callproc.c (Fcall_process): Remove unused vars.
351 * xterm.c (XTread_socket): Add extra dead keysyms.
353 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
355 * dispextern.h: Remove prototypes for redraw_frame,
356 redraw_garbaged_frames.
358 * cmds.c (Fself_insert_command): Use CHARACTERP.
360 * chartab.c (make_sub_char_table): Remove unused var.
361 (Fset_char_table_default, Fmap_char_table): Doc fix.
363 * keymap.c (access_keymap): Remove generic char code.
364 (push_key_description): Use CHARACTERP.
366 2002-07-01 Dave Love <fx@gnu.org>
368 * charset.c: Doc fixes.
369 (Funify_charset): Extra checking.
371 2002-06-24 Dave Love <fx@gnu.org>
373 * lread.c: Remove some unused variables.
374 (safe_to_load_p): If safe, return the magic number version byte.
375 (Fload): Maybe use load-with-code-conversion.
377 2002-06-12 Kenichi Handa <handa@etl.go.jp>
379 * category.c (Fmodify_category_entry): Don't modify the contents
380 of category_set for characters out of the range. Avoid
381 unnecessary modification.
383 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
384 Vchar_unify_table. The default value of the table is now nil.
386 * character.c (syms_of_character): Setup Vchar_width_table for
387 eight-bit-control and raw-byte chars.
389 * charset.h (enum define_charset_arg_index): Delete
390 charset_arg_parents and add charset_arg_subset and
391 charset_arg_superset.
392 (enum charset_attr_index): Delete charset_parents and add
393 charset_subset and charset_superset.
394 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
395 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
396 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
397 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
398 (CHARSET_SUPERSET): New macros.
399 (charset_work): Extern it.
400 (ENCODE_CHAR): Use charset_work.
401 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
402 (map_charset_chars): Extern it.
404 * charset.c (load_charset_map): Set the default value of encoder
405 and deunifier char-tables to nil.
406 (map_charset_chars): Argument changed. Callers changed. Use
407 map_char_table_for_charset instead of map_char_table.
408 (Fmap_charset_chars): New optional args from_code and to_code.
409 (Fdefine_charset_internal): Adjusted for the change of
410 `define-charset' (:parents -> :subset or :superset).
411 (charset_work): New variable.
412 (encode_char): Adjusted for the change of
413 Fdefine_charset_internal.
414 (syms_of_charset): Likewise.
415 (Ffind_charset_string): Setup the vector `charsets' correctly.
417 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
419 (char_table_ref_and_range): Adjusted for the above change.
420 (map_sub_char_table_for_charset): New function.
421 (map_char_table_for_charset): New function.
423 * keymap.c (describe_vector): Handle a char-table directly here.
424 (describe_char_table): Deleted.
426 * lisp.h (map_charset_chars): Deleted.
428 2002-06-11 Dave Love <fx@gnu.org>
430 * fns.c (count_combining): Comment out (unused).
431 (Flocale_codeset): New.
432 (syms_of_fns): Defsubr it.
434 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
437 2002-06-06 Dave Love <fx@gnu.org>
439 * Makefile.in (chartab.o): Depend on charset.h
441 2002-06-03 Kenichi Handa <handa@etl.go.jp>
443 * character.c (syms_of_character): Set the default value of
444 Vprintable_chars to Qnil.
446 2002-05-31 Dave Love <fx@gnu.org>
448 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
450 2002-05-31 Kenichi Handa <handa@etl.go.jp>
452 * charset.c (load_charset_map): Handle the case that from < to
455 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
457 (encode_coding_iso_2022): Likewise.
458 (encode_coding_sjis): Likewise.
459 (encode_coding_big5): Likewise.
460 (encode_coding_charset): Likewise.
462 2002-05-30 Kenichi Handa <handa@etl.go.jp>
464 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
465 not bytecompiled now.
466 (shortlisp): Likewise.
468 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
469 (charset_jisx0208): New variables.
470 (Fdefine_charset_internal): Setup them if appropriate.
471 (init_charset_once): Initialize them to -1.
473 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
474 charset_jisx0208): Extern them.
476 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
477 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
478 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
479 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
480 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
481 and CODING_ISO_FLAG_USE_OLDJIS.
482 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
483 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
484 (encode_coding_iso_2022): Change the 1st arg to
485 ENCODE_ISO_CHARACTER to a variable.
487 2002-05-29 Kenichi Handa <handa@etl.go.jp>
489 * charset.h (enum define_charset_arg_index): New enums
490 charset_arg_min_code and charset_arg_max_code.
491 (struct charset): New member char_index_offset.
493 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
495 (INDEX_TO_CODE_POINT): Likewise.
496 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
497 args[charset_arg_max_code]. Setup charset.char_index_offset.
498 (syms_of_charset): Fix args to Fdefine_charset_internal.
500 2002-05-27 Dave Love <fx@gnu.org>
502 * coding.c (decode_coding_utf_8): Reject overlong sequences.
504 2002-05-26 Dave Love <fx@gnu.org>
506 * coding.c: Doc fixes.
507 (Fcoding_system_aliases): Fix return value.
508 (Qmac): Remove (duplicated) definition.
510 2002-05-25 Dave Love <fx@gnu.org>
512 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
515 * character.c (Fstring): Doc fix.
517 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
519 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
521 (font-encoding-alist): Doc fix.
523 2002-05-24 Dave Love <fx@gnu.org>
525 * term.c (costs_set): Declare static, non-initialized for pcc.
526 (encode_terminal_code): Remove ensued var.
528 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
531 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
533 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
534 (suffixes): Moved out of make_subsidiaries for K&R.
536 * charset.c (map_charset_chars): Fix c_function declaration for
539 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
541 2002-05-23 Dave Love <fx@gnu.org>
543 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
545 * category.c (Fmodify_category_entry): Doc fix. Remove unused
548 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
550 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
552 * coding.c (Fdefine_coding_system_internal): Fix previous change.
553 (decode_coding_charset): Workaround for the bug of GCC 2.96.
555 2002-05-23 Kenichi Handa <handa@etl.go.jp>
557 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
558 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
559 (shortlisp): Likewise.
561 2002-05-22 Kenichi Handa <handa@etl.go.jp>
563 * coding.c (decode_coding_charset): Adjusted for the change of
564 Fdefine_coding_system_internal.
565 (Fdefine_coding_system_internal): For a coding system of
566 `charset' type, store a list of charset IDs in
567 `charset_attr_charset_valids' element of coding attributes.
569 * charset.c (Fmake_char): Fix previous change.
571 2002-05-21 Kenichi Handa <handa@etl.go.jp>
573 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
574 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
575 changed. Handle 2-byte and 3-byte charsets correctly.
576 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
577 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
578 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
579 (DECODE_EMACS_MULE_21_COMPOSITION): Call
580 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
582 (decode_coding_emacs_mule): Handle composition correctly. Rewind
583 `src' and `consumed_chars' correctly before calling
585 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
586 and alt&rule composition.
587 (decode_coding_iso_2022): Handle composition correctly.
588 (init_coding_once): Setup emacs_mule_bytes for private charsets.
590 * charset.c (Fdefine_charset_internal): Fix bug for the case of
591 re-defining a charset. If the charset has :emacs-mule-id, setup
593 (Fmake_char): If CODE1 is nil, use the minimum code of the
596 2002-05-20 Kenichi Handa <handa@etl.go.jp>
598 * coding.c (encode_coding_iso_2022): If coding requires safe
599 encoding, produce a character specified by
600 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
601 (encode_coding_sjis): Likewise.
602 (encode_coding_big5): Likewise.
603 (encode_coding_charset): Likewise.
605 2002-05-17 Dave Love <fx@gnu.org>
607 * xterm.c (XSetIMValues): Declare.
609 * process.c: Conditionally include sys/wait.h, pty.h.
611 * print.c (print_object): Fix print format for 64-bit
614 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
617 * buffer.c (emacs_strerror): Declare.
618 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
621 * fontset.c (Fclear_face_cache): Declare.
622 (accumulate_font_info): Commented-out (unused).
623 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
626 * character.h (string_escape_byte8): Declare.
628 * charset.c (load_charset_map, load_charset_map_from_file): Remove
630 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
631 (Fmap_charset_chars): Doc fix.
633 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
635 (Fset_coding_system_priority, Fset_coding_system_priority)
636 (Fdefine_coding_system_internal): Doc fix.
638 2002-05-16 Dave Love <fx@gnu.org>
640 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
642 2002-05-16 Kenichi Handa <handa@etl.go.jp>
644 * character.c (string_escape_byte8): Make multibyte string with
647 * charset.c (Fmake_char): Delete unnecessary code.
649 2002-05-14 Kenichi Handa <handa@etl.go.jp>
651 * xfns.c (x_encode_text): Allocate coding.destination here, and
652 call encode_coding_object with dst_object Qnil.
654 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
655 multibyte form correctly.
657 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
658 against Vfont_encoding_alist.
660 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
661 handling of charset list.
662 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
663 (decode_coding_object): Move point to coding->dst_pos before
664 calling post-read-conversion function.
665 (encode_coding_object): Give correct arguments to
666 pre-write-conversion. Ignore the return value of
667 pre-write-conversion function. Pay attention to the case that
668 pre-write-conversion changes the current buffer. If dst_object is
669 Qt, even if coding->src_bytes is zero, allocate at least one byte
670 to coding->destination.
672 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
674 * charset.c (Fmake_char): Make it more backward compatible.
675 (Fmap_charset_chars): Fix docstring.
677 2002-05-13 Dave Love <fx@gnu.org>
679 * coding.c: Doc fixes.
680 (Fdefine_coding_system_alias): Use names, not symbols, in
683 2002-05-13 Kenichi Handa <handa@etl.go.jp>
685 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
686 of calling free_realized_face.
688 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
690 * charset.c (load_charset_map): Fix previous change.
691 (read_hex): Don't treat SPC as a comment starter.
692 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
694 (Fdecode_char): Fix typo.
696 2002-05-10 Kenichi Handa <handa@etl.go.jp>
698 * charset.h (struct charset): New member `code_space_mask'.
700 * coding.c (coding_set_source): Delete the local variable
702 (encode_coding_charset): Delete the local variable charset.
703 (Fdefine_coding_system_internal): Likewise.
704 (Fdefine_coding_system_internal): Setup
705 attrs[coding_attr_charset_valids] correctly.
707 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
708 member to check if CODE is valid or not.
709 (Fdefine_charset_internal): Initialize `code_space_mask' member.
710 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
711 is within the range of charset->min_code and carset->max_code.
713 2002-05-09 Dave Love <fx@gnu.org>
715 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
717 * dispextern.h (generate_ascii_font): Fix return type.
719 * xfaces.c (generate_ascii_font): Fix arg declaration.
721 * coding.c (coding_inherit_eol_type)
722 (Fset_terminal_coding_system_internal)
723 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
725 2002-05-08 Kenichi Handa <handa@etl.go.jp>
727 * coding.c (decode_coding_charset, encode_coding_charset): Handle
728 multiple charsets correctly.
730 2002-05-07 Kenichi Handa <handa@etl.go.jp>
732 * search.c (boyer_moore): Fix handling of mulitbyte character
735 * xdisp.c (display_mode_element): When the variable `elt' is
736 changed, update `this' and `lisp_string'.
738 2002-05-07 Kenichi Handa <handa@etl.go.jp>
740 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
742 * callproc.c (Fcall_process): Be sure to give the current buffer
743 to decode_coding_c_string. Update PT and PT_BYTE after the
746 * charset.c (struct charset_map_entries): New struct.
747 (load_charset_map): Renamed from parse_charset_map. New args
748 entries and n_entries. Caller changed.
749 (load_charset_map_from_file): Renamed from load_charset_map.
750 Caller changed. New arg control_flag. Call load_charset_map at
752 (load_charset_map_from_vector): New function.
753 (Fdefine_charset_internal): Setup charset.compact_codes_p.
754 (encode_char): If the charset is compact, change a character index
757 * coding.c (coding_alloc_by_making_gap): Check the case that the
758 source and destination are the same correctly.
759 (decode_coding_raw_text): Set coding->consumed_char and
760 coding->consumed to 0.
761 (produce_chars): If coding->chars_at_source is nonzero, update
762 coding->consumed_char and coding->consumed before calling
764 (Fdefine_coding_system_alias): Register ALIAS in
765 Vcoding_system_alist.
766 (syms_of_coding): Define `no-convesion' coding system at the tail.
768 * fileio.c (Finsert_file_contents): Set coding_system instead of
769 val. If the current buffer is multibyte, always call
772 * xfaces.c (try_font_list): Give higher priority to fontset's
773 family than face's family.
775 2002-04-18 Kenichi Handa <handa@etl.go.jp>
777 * callproc.c (Fcall_process): Be sure to give the current buffer
778 to decode_coding_c_string.
780 * xfaces.c (try_font_list): Give a family specified in a fontset
781 higher priority than a family specified in a face.
783 2002-04-09 Kenichi Handa <handa@etl.go.jp>
785 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
786 Fix arguments to insert_from_buffer.
788 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
790 2002-03-11 Kenichi Handa <handa@etl.go.jp>
792 * coding.c (produce_chars): Set the variable `multibytep' correctly.
793 (decode_coding_gap): Set coding->dst_multibyte correctly.
795 2002-03-07 Kenichi Handa <handa@etl.go.jp>
797 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
798 (decode_coding_utf_16): Fix converting high and low bytes to
800 (encode_coding_utf_16): Substitute coding->default_char for
801 non-Unicode characters.
802 (decode_coding): Don't call record_insert here.
803 (setup_coding_system): Initialize `surrogate' of
804 coding->spec.utf_16 to 0.
805 (EMIT_ONE_BYTE): Fix for multibyte case.
807 * insdel.c (insert_from_gap): Call record_insert.
809 2002-03-04 Kenichi Handa <handa@etl.go.jp>
811 * casefiddle.c (casify_region): Fix multibyte case.
813 * character.c (c_string_width): Add return type `int'.
814 (char_string_with_unification): Arg ADVANCED deleted.
816 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
817 (CHAR_STRING): Adjusted for the change of
818 char_string_with_unification.
819 (CHAR_STRING_ADVANCE): Make it do-while statement.
821 * chartab.c (sub_char_table_set_range): Optimized for the case
822 DEPTH == 3. Add workaround code for a GCC optimization bug.
824 * charset.c (parse_charset_map): Remove an unused variable.
826 * coding.c: Delete unused variables.
828 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
829 earlier. If inserted is zero and the coding system doesn't
830 require flushing, don't call decode_coding_gap.
832 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
834 2002-03-01 Kenichi Handa <handa@etl.go.jp>
836 The following changes are for using Unicode as an internal
837 character model, and use UTF-8 format for buffer/string
840 * .gdbinit (xchartable): Adjusted for the change of char table
842 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
844 * Makefile.in (obj): Add character.o and chartab.o.
845 (lisp, shortlisp): Remove utf-8.elc:
846 (*.o): For many files, change dependency on charset.h to
847 character.h, and add dependency on character.h.
848 (character.o, chartab.o): New targets.
850 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
851 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
852 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
855 * dired.c, filelock.c: Include "character.h".
857 * alloc.c: Include "character.h" instead of "charset.h".
858 (Fmake_char_table): Moved to chartab.c.
859 (make_sub_char_table): Likewise.
860 (syms_of_alloc): Remove defsubr for Smake_char_table.
862 * buffer.c: Include "character.h" instead of "charset.h", don't
864 (Fset_buffer_multibyte): Adjuted for UTF-8.
866 * buffer.h: EXFUN Fbuffer_live_p.
868 * callproc.c: Include "character.h" instead of "charset.h".
869 (Fcall_process): Big change for the new code-conversion APIs.
871 * casetab.c: Include "character.h" instead of "charset.h".
872 (set_canon, set_identity, shuffle): Adjusted for the new
874 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
875 accessing the char table structure.
877 * chartab.c: New file that implements char table.
879 * category.c: Include "character.h".
880 (copy_category_entry): New function.
881 (copy_category_table): Call map_char_table and copy_category_entry.
882 (Fmake_category_table): Initialize all top-vel slots.
883 (char_category_set): New function.
884 (modify_lower_category_set): Deleted.
885 (Fmodify_category_entry): Call char_table_ref_and_range.
887 * category.h (CATEGORY_SET): Just call char_category_set.
889 * ccl.c: Include "character.h".
890 (Qccl, Qcclp): New variables.
891 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
893 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
894 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
896 (ccl_driver): Types of arguments changed. Code adjusted for that.
897 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
899 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
901 * ccl.h (struct ccl_program): Members eol_type and multibyte
902 deleted. New members src_multibyte, dst_multibyte, consumed, and
904 (struct ccl_spec): Members decoder and encoder deleted. New
906 (CODING_SPEC_CCL_PROGRAM): New macro.
907 (ccl_driver): Prototype updated.
908 (Qccl, Qcclp, Fccl_program_p): Extern them.
909 (CHECK_CCL_PROGRAM): New macro.
911 * character.c, character.h, chartab.c: New files.
913 * charset.c: Mostly re-written. Character and multibyte sequence
914 handling codes are moved to character.c.
916 * charset.h: Mostly re-written. Character and multibyte sequence
917 handling codes are moved to character.h.
919 * coding.c, coding.h: Mostly re-written.
921 * composite.c: Include "character.h" instead of "charset.h".
922 (CHAR_WIDTH): Moved to character.h.
923 (HASH_KEY, HASH_VALUE): Deleted.
925 * composite.h (enum composition_method): Order of enumeration
928 * data.c: Include "character.h" instead of "charset.h".
929 (Faref): Call CHAR_TABLE_REF for a char table.
930 (Faset): Call CHAR_TABLE_SET for a char table.
932 * dispextern.h (free_realized_face, check_face_attribytes,
933 generate_ascii_font): Extern them.
934 (free_realized_multibyte_face): Extern deleted.
936 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
939 * editfns.c: Include "character.h" instead of "charset.h".
940 (Fchar_to_string): Always call CHAR_STRING.
942 * emacs.c (main): Call init_charset_once, init_charset,
943 syms_of_chartab, and syms_of_character.
945 * fileio.c: Include "character.h" instead of "charset.h".
946 (Finsert_file_contents): Big change for the new code-conversion
948 (choose_write_coding_system): Likewise.
949 (Fwrite_region): Likewise.
950 (build_annotations_2): Deleted.
951 (e_write): Big change for the new code-conversion API.
953 * fns.c: Include "character.h" instead of "charset.h".
954 (copy_sub_char_table): Moved to chartab.c.
955 (Fcopy_sequence): Call copy_char_table for a char table.
956 (concat): Delete codes calling count_multibyte.
957 (string_char_to_byte): Adjusted for the new multibyte form.
958 (string_byte_to_char): Likewise.
959 (internal_equal): Adjusted for the change of char table structure.
960 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
961 Fchar_table_extra_slot, Fset_char_table_extra_slot,
962 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
963 char_table_translate, optimize_sub_char_table,
964 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
966 (char_table_ref_and_index): Deleted.
967 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
968 (Fmd5): Call preferred_coding_system instead of accessing
969 Vcoding_category_list. Adjusted for the new code-conversion API.
970 (syms_of_fns): Defsubr for char table related functions moved to
973 * fontset.c: Mostly re-written.
975 * fontset.h (struct font_info): Type of the member encoding_type
977 (enum FONT_SPEC_INDEX): New enum.
978 (fontset_font_pattern, fs_load_font): Prototype updated.
979 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
981 * indent.c: Include "character.h" instead of "charset.h".
982 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
985 * insdel.c: Include "character.h" instead of "charset.h".
986 (copy_text): Don't refer to Vnonascii_translation_table.
987 (insert_from_gap): New function.
989 * keyboard.c: Include "character.h" instead of "charset.h".
990 (command_loop_1): Never call direct_output_forward_char before
991 a non-ASCII character.
992 (read_char): If Vkeyboard_translate_table is a char table, always
993 translated a character.
995 * keymap.c: Include "character.h".
996 (store_in_keymap): Handle the case that IDX is a cons.
997 (Fdefine_key): Handle the case that KEY is a cons and the car part
998 is also a cons (range).
999 (push_key_description): Adjusted for the new character code.
1000 (describe_vector): Call describe_char_table for a char table.
1001 (describe_char_table): New function.
1003 * keymap.h (describe_char_table): Extern it.
1005 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
1006 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
1007 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
1008 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
1010 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
1012 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
1013 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
1014 CHARTAB_SIZE_BITS_3): New macros.
1015 (chartab_size): Extern it.
1016 (struct Lisp_Char_Table): Re-designed.
1017 (struct Lisp_Sub_Char_Table): New structure.
1018 (HASH_KEY, HASH_VALUE): Moved from fns.c.
1019 (CHARACTERBITS): Defined as 22.
1020 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
1021 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
1022 (GC_SUB_CHAR_TABLE_P): New macro.
1023 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
1024 (code_convert_string_norecord): Extern deleted.
1025 (init_character_once, syms_of_character, init_charset,
1026 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
1028 * lread.c: Include "character.h".
1029 (read_multibyte): New arg NBYTES.
1030 (read_escape): The meaning of returned *BYTEREP changed.
1031 (to_multibyte): Deleted.
1032 (read1): Adjuted the handling of char table and string.
1034 * print.c: Include "character.h" instead of "charset.h".
1035 (print_string): Convert 8-bit raw bytes to octal form by
1036 string_escape_byte8.
1037 (print_object): Adjusted for the new multibyte form. Print 8-bit
1038 raw bytes always in octal form. Handle sub char table correctly.
1040 * process.c: Include "character.h" instead of "charset.h".
1041 (read_process_output): Adjusted for the new code-conversion API.
1042 (send_process): Likewise.
1044 * puresize.h (BASE_PURESIZE): Increased.
1046 * regex.c: Include "character.h" instead of "charset.h".
1047 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
1048 (regex_compile): Accept a range whose starting and ending
1049 character have different leading bytes.
1050 (analyse_first): Adjusted for the above change.
1052 * search.c: Include "character.h" instead of "charset.h".
1053 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
1054 (Freplace_match): Adjusted for the change of
1055 multibyte_char_to_unibyte.
1057 * syntax.c: Include "character.h" instead of "charset.h".
1058 (syntax_parent_lookup): Deleted.
1059 (Fmodify_syntax_entry): Accept a cons as CHAR.
1060 (skip_chars): Adjusted for the new multibyte form.
1061 (init_syntax_once): Call char_table_set_range instead of directly
1062 accessing the structure of a char table.
1064 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
1065 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
1066 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
1067 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
1069 * term.c: Include "buffer.h" and "character.h".
1070 (encode_terminal_code): Adjusted for the new code-conversion API.
1071 (write_glyphs): Likewise.
1072 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
1074 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
1076 * xdisp.c: Include "character.h".
1077 (get_next_display_element): Adjusted for the new multibyte form.
1078 (disp_char_vector): Adjusted for the new char table structure.
1079 (decode_mode_spec_coding): Adjusted for the new structure of
1081 (decode_mode_spec): Adjusted for the new code-conversion API.
1083 * xfaces.c: Include "character.h" instead of "charset.h".
1084 (load_face_font): Adjusted for the change of choose_face_font and
1086 (generate_ascii_font): New function.
1087 (set_lface_from_font_name): Adjusted for the change of
1089 (set_font_frame_param): Adjusted for the change of
1091 (free_realized_face): Make it public.
1092 (free_realized_faces_for_fontset): Renamed from
1093 free_realized_multibyte_face. Free also faces realized for ASCII.
1094 (choose_face_font): Argments changed. Adjusted for the change of
1095 fontset_font_pattern and FS_LOAD_FONT.
1097 * xfns.c: Include "character.h".
1098 (x_encode_text): Adjusted for the new code-conversion API.
1100 * xselect.c: Don't include "charset.h".
1101 (selection_data_to_lisp_data): Adjusted for the new code
1104 * xterm.c: Include "character.h".
1105 (x_encode_char): New argument CHARSET. Caller changed.
1106 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
1108 (x_get_glyph_face_and_encoding): Likewise.
1109 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
1110 CHAR_WIDTH instead of CHARSET_WIDTH.
1111 (XTread_socket): Adjusted for the new code-conversion API.
1112 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
1113 (x_load_font): Adjusted for the change of struct font.
1116 ;; coding: iso-2022-7bit
1119 Copyright (C) 2002 Free Software Foundation, Inc.
1120 Copying and distribution of this file, with or without modification,
1121 are permitted provided the copyright notice and this notice are preserved.