]> code.delx.au - gnu-emacs/blob - src/ChangeLog.unicode
*** empty log message ***
[gnu-emacs] / src / ChangeLog.unicode
1 2007-04-11 Kenichi Handa <handa@m17n.org>
2
3 * character.h (CHAR_STRING): Cast C to unsigned on calling
4 char_string.
5
6 * character.c (char_string): Type of arg C changed to unsigned.
7 Signal an error if C is an invalid character code.
8
9 * editfns.c (general_insert_function): Use CHARACTERP, not INTEGERP.
10 (Fchar_to_string): Likewise.
11
12 2007-03-23 Kenichi Handa <handa@m17n.org>
13
14 * character.h (MIN_MULTIBYTE_LEADING_CODE)
15 (MAX_MULTIBYTE_LEADING_CODE): New macros.
16
17 * regex.c (analyse_first): Fix for multibyte characters in "case
18 charset:" and "case categoryspec:".
19
20 2007-03-04 Andreas Schwab <schwab@suse.de>
21
22 * Makefile.in (LIBES): Move standard libraries to the end.
23
24 2007-02-27 Kenichi Handa <handa@m17n.org>
25
26 * process.c: Cancel the change done by sync with HEAD.
27
28 2007-02-23 Kenichi Handa <handa@m17n.org>
29
30 * alloc.c (Fgarbage_collect): If nextb->text->inhibit_shrinking is
31 nonzero, don't shrink the buffer nextb.
32
33 * buffer.h (struct buffer_text): New member inhibit_shrinking.
34
35 * coding.c (coding_alloc_by_making_gap): New arg offset.
36 (alloc_destination): Call coding_alloc_by_making_gap with the arg
37 offset.
38 (decode_coding_iso_2022): Update coding->safe_charsets.
39 (decode_coding_gap): Temporarily set
40 current_buffer->text->inhibit_shrinking to 1.
41
42 2007-02-20 Kenichi Handa <handa@m17n.org>
43
44 * xterm.c (x_draw_composite_glyph_string_foreground): Fix
45 indexing into elements of s->cmp and s->char2b.
46
47 2007-02-16 Juanma Barranquero <lekktu@gmail.com>
48
49 * regex.c (RE_STRING_CHAR_AND_LENGTH) [! emacs]: Add missing arg `len'.
50
51 2007-02-16 Kenichi Handa <handa@m17n.org>
52
53 * regex.c (GET_CHAR_BEFORE_2, GET_CHAR_AFTER): Check the variable
54 target_multibyte instead of multibyte.
55 (re_match_2_internal): Call bcmp_translate with target_multibyte.
56 (bcmp_translate): Change the argument name from multibyte to
57 target_multibyte.
58
59 2007-02-15 Kenichi Handa <handa@m17n.org>
60
61 These changes are to compile a regexp into a pattern that can be
62 used both for multibyte and unibyte targets.
63
64 * Makefile.in (search.o): Depend on charset.h.
65
66 * character.c (multibyte_char_to_unibyte_safe): New function.
67
68 * search.c: Include "charset.h".
69 (compile_pattern_1): Delete argument multibyte. Don't set
70 cp->buf.target_multibyte here. Set cp->buf.charset_unibyte.
71 (compile_pattern): Don't compare cp->buf.target_multibyte.
72 Compare cp->buf.charset_unibyte.
73 (compile_pattern): Set cp->buf.target_multibyte.
74
75 * lisp.h (multibyte_char_to_unibyte_safe): Extern it.
76
77 * regex.h (struct re_pattern_buffer): New member charset_unibyte.
78
79 * regex.c (RE_STRING_CHAR, RE_STRING_CHAR_AND_LENGTH): New arg
80 multibyte. Callers changed.
81 (RE_CHAR_TO_MULTIBYTE, RE_CHAR_TO_UNIBYTE): New macros.
82 (MAKE_CHAR_MULTIBYTE, MAKE_CHAR_UNIBYTE): Deleted. Callers
83 changed to use RE_CHAR_TO_MULTIBYTE and RE_CHAR_TO_UNIBYTE
84 respectively.
85 (SETUP_ASCII_RANGE, SETUP_UNIBYTE_RANGE): New macros.
86 (SETUP_MULTIBYTE_RANGE): Generate a more compact range_table.
87 (regex_compile): Make the compiled pattern usable both for
88 multibyte and unibyte targets.
89 (analyse_first): Make the fastmap usable both for multibyte and
90 unibyte targets.
91 (TRANSLATE_VIA_MULTIBYTE): Deleted.
92 (re_match_2_internal): Pay attention to the case that the
93 multibyteness of bufp and target may be different.
94
95 2007-02-14 Kenichi Handa <handa@m17n.org>
96
97 * xdisp.c (x_produce_glyphs): When a font is not found, make the
98 empty box occupy at least one column width.
99
100 2007-01-30 Miles Bader <miles@gnu.org>
101
102 * Makefile.in: Remove redundant HAVE_XFT clause.
103
104 2006-12-20 Kenichi Handa <handa@m17n.org>
105
106 * xrdb.c (x_load_resources): Setup the default fontSet X reource.
107
108 2006-12-15 Kenichi Handa <handa@m17n.org>
109
110 * regex.c (regex_compile): Synch with HEAD.
111
112 2006-12-12 Kenichi Handa <handa@m17n.org>
113
114 * fontset.c (Finternal_char_font): Fix previous change.
115
116 2006-12-07 Kenichi Handa <handa@m17n.org>
117
118 * fontset.c (Finternal_char_font): Fix for the case of POSITION
119 being nil.
120
121 2006-12-06 Kenichi Handa <handa@m17n.org>
122
123 * xftfont.c (xftfont_open): Call FcConfigSubstitute.
124
125 2006-12-05 Kenichi Handa <handa@m17n.org>
126
127 * xftfont.c (xftfont_open): Don't enable antialias explicitly.
128
129 2006-11-30 Kenichi Handa <handa@m17n.org>
130
131 * search.c (simple_search): Fix previous change.
132
133 2006-11-29 Kenichi Handa <handa@m17n.org>
134
135 * xftfont.c (ftfont_font_format): Extern declaration.
136
137 * frame.c (x_set_font): Fix the second arg to fs_query_fontset.
138
139 * xfont.c (xfont_driver): Initialize ftfont_driver.type by 0.
140 (xfont_list): Don't directly use Lisp_Object as an operand of &&.
141
142 * ftfont.c (ftfont_driver): Initialize ftfont_driver.type by 0.
143 (ftfont_font_format): Fix previous change.
144
145 * font.h (Ffont_xlfd_name): EXFUN it.
146
147 * font.c (font_parse_xlfd): Fix the array size of `f'.
148 (register_font_driver): Use EQ to compare driver->type.
149
150 * xfns.c (xic_create_xfontset2) [USE_FONT_BACKEND]: New function.
151 (create_frame_xic) [USE_FONT_BACKEND]: Call xic_create_xfontset2.
152 (xic_set_xfontset) [USE_FONT_BACKEND]: Likewise.
153
154 2006-11-27 Kenichi Handa <handa@m17n.org>
155
156 * ftfont.c (ftfont_pattern_entity): Check if FC_FONTFORMAT is
157 defined.
158 (ftfont_list_generic_family, ftfont_list, ftfont_font_format):
159 Likewise.
160
161 2006-11-24 Kenichi Handa <handa@m17n.org>
162
163 * xfont.c (xfont_open): Set font->format.
164
165 * xftfont.c (xftfont_open): Set font->format.
166
167 * ftfont.c (ftfont_pattern_entity): Add fontformat in a pattern.
168 (ftfont_list): Include FC_FONTFORMAT in FcObject.
169 (ftfont_open): Set font->format.
170 (ftfont_font_format): New function.
171
172 * font.h (struct font): New memeber format.
173
174 * font.c (Qopentype): New variable.
175 (syms_of_font): Defsym it.
176 (Fquery_font): Change the format of the last element of the return
177 value.
178
179 2006-11-22 Kenichi Handa <handa@m17n.org>
180
181 * search.c (simple_search): Fix sync with HEAD.
182
183 2006-11-17 Kenichi Handa <handa@m17n.org>
184
185 * xfns.c (xic_create_xfontset): Try the default fontset name as a
186 last resort.
187
188 2006-11-08 Kenichi Handa <handa@m17n.org>
189
190 * coding.c (detect_coding_charset): Fix detection of multi-byte
191 charset.
192
193 2006-11-07 Bob Halley <halley@play-bow.org> (tiny change)
194
195 * ccl.c (ccl_driver): If DST is NULL, set ccl->produced to 0.
196
197 2006-10-31 Kenichi Handa <handa@m17n.org>
198
199 * xdisp.c (get_next_display_element): Set it->face_id for the
200 first component of a composition.
201 (x_produce_glyphs): Check if the font is changed or not for
202 composition.
203
204 2006-10-31 Kenichi Handa <handa@m17n.org>
205
206 (get_next_display_element): Set it->face_id for the
207 first component of a composition.
208 (x_produce_glyphs): Check if the font is changed or not for
209 composition.
210
211 2006-10-30 Kenichi Handa <handa@m17n.org>
212
213 * fontset.c (Qlatin): New variable.
214 (syms_of_fontset): Define it as a lisp symbol.
215 (Fset_fontset_font): If TARGET is `latin', use FONT_SPEC for
216 ASCII.
217
218 2006-10-27 Kenichi Handa <handa@m17n.org>
219
220 * font.c (font_unparse_fcname): Pay attention to the case that
221 some of font property is a null string.
222
223 2006-10-26 Kenichi Handa <handa@m17n.org>
224
225 * term.c: Include "composite.h".
226 (encode_terminal_code): Output all components of composition.
227 Check the size of encode_terminal_src.
228 (produce_glyphs): For compostion, call produce_composite_glyph.
229 (append_composite_glyph, produce_composite_glyph): New functions.
230
231 * xdisp.c (x_produce_glyphs): In handling composition, if a font
232 is not found, get font_info from the current ascii face.
233
234 2006-10-23 Kenichi Handa <handa@m17n.org>
235
236 * fileio.c (Finsert_file_contents): On replacing, temporarily bind
237 buffer-file-name to Qnil before calling insert_from_buffer.
238
239 * font.c (font_unparse_fcname): Pay attention to the case that
240 foundry is a null string.
241
242 2006-10-17 Kenichi Handa <handa@m17n.org>
243
244 * ftfont.c (ftfont_list): Allow registry "unicode-sip".
245
246 * font.c (Qunicode_sip): New variable.
247 (syms_of_font): Declare it as a Lisp symbol.
248
249 * font.h (Qunicode_sip): Extern it.
250
251 2006-10-16 Kenichi Handa <handa@m17n.org>
252
253 * composite.c (get_composition_id): Pay attention to TAB
254 component.
255
256 * xterm.c (x_draw_composite_glyph_string_foreground): Don't draw
257 TAB. Adjusted for the change of s->char2b which always points to
258 the first elememnt of allocated memory.
259
260 * xftfont.c (xftfont_text_extents): Fix calculation of descent
261 value.
262
263 * xdisp.c (handle_composition_prop): Set it->c to the first
264 non-TAB component.
265 (fill_composite_glyph_string): Argument changed.
266 (BUILD_COMPOSITE_GLYPH_STRING): Adjusted for the above change.
267 (x_produce_glyphs): Fix handling of left/right padding.
268
269 2006-10-04 Kenichi Handa <handa@m17n.org>
270
271 * regex.c (analyse_first): Cancel the change for synching with
272 HEAD.
273
274 2006-08-28 Kenichi Handa <handa@m17n.org>
275
276 * coding.c (detect_coding_system): Fix for handling off
277 inhibit_iso_escape_detection. Fix for the case that no coding
278 system is defined for a specific coding category.
279
280 2006-08-21 Kenichi Handa <handa@m17n.org>
281
282 * font.c (font_matching_entity): Dolete unused local var.
283
284 * xftfont.c (xftfont_open): Call XftDefaultSubstitute before
285 opening a font.
286
287 * fileio.c (Finsert_file_contents): On recovering a file, assume
288 Unix-like eol.
289 (choose_write_coding_system): On auto-saving a file, force
290 Unix-like eol.
291
292 * coding.c (setup_coding_system): Fix setting of
293 coding->common_flags based on eol_type.
294 (coding_inherit_eol_type): If PARENT is not nil, be sure to
295 inherit from it.
296
297 2006-08-04 Kenichi Handa <handa@m17n.org>
298
299 * alloc.c (NSTATICS): Increased to 0x600.
300
301 2006-08-01 Kenichi Handa <handa@m17n.org>
302
303 * ftfont.c (ftfont_driver): Set ftfont_driver.match to
304 ftfont_match.
305 (ftfont_list): Don't check :name property.
306 (ftfont_match): New function.
307 (ftfont_pattern_entity): If the pattern doesn't contain
308 FC_SPACING, don't assuce FC_MONO.
309
310 * font.h (struct font_driver): New member `match'.
311 (font_update_drivers): Prototype adjusted.
312
313 * font.c (font_parse_fcname): Don't change :name property of FONT.
314 (font_parse_name): Likewise.
315 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
316 them unconditionally.
317 (font_matching_entity): New function.
318 (font_open_by_name): Try font_matching_entity if exact match is
319 not found.
320 (font_update_drivers): Delete the arg FONT. Return a list of
321 actually used backends. Don't free faces, font caches here.
322 Don't store data in frame parameters. Don't call x_set_font.
323 (Ffont_spec): Store :name property as is.
324 (Ffont_get): Check HAVE_LIBOTF before calling font_otf_capability.
325 (Ffont_otf_gsub): Call font->driver->otf_gsub instead of
326 font_otf_gsub.
327 (Ffont_otf_gpos): Call font->driver->otf_gpos instead of
328 font_otf_gpos.
329 (Ffont_otf_alternates): Check if the driver has otf_gsub function.
330 Call font->driver->otf_gsub instead of font_otf_gsub.
331
332 * frame.c (x_set_font_backend): Do more works that were done in
333 font_update_drivers before.
334
335 * xfont.c (xfont_match): New function.
336 (xfont_driver): Set xfont_driver.match to xfont_match.
337 (xfont_draw): Set font in GC if necessary.
338
339 * ftxfont.c (ftxfont_match): New function.
340 (syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.
341
342 * xftfont.c (xftfont_match): New function.
343 (syms_of_xftfont): Set xftfont_driver.match to xftfont_match.
344
345 2006-07-28 Kenichi Handa <handa@m17n.org>
346
347 * font.h (struct font): New member scalable.
348 (struct font_driver): New arg ALTERANTE_SUBST to otf_gsub.
349 (font_otf_gsub): Prototype adjusted.
350
351 * font.c (font_otf_capability): Fix handling of the default
352 langsys.
353 (parse_gsub_gpos_spec): Type changed to void. New arg nbytes.
354 Check the contents of SPEC.
355 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE): New macros.
356 (check_gstring): New function.
357 (REPLACEMENT_CHARACTER): New macro.
358 (font_otf_gsub): New arg alternate_subst. Be sure to set all
359 glyph codes of GSTRING.
360 (font_otf_gpos): Be sure to set all glyph codes of GSTRING.
361 (font_prepare_composition): Set cmp->glyph_len.
362 (font_open_entity): Set font->scalable.
363 (Ffont_get): Handle :otf property.
364 (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
365 functions.
366 (Fquery_font): Use font->font.full_name.
367 (syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
368 Sfont_otf_alternates.
369
370 * ftfont.c (ftfont_open): Set font->font.full_name and
371 font->font.name properly. Fix calculation of font->font.height
372 and font->min_width.
373
374 * ftxfont.c (ftxfont_create_gcs): New function.
375 (ftxfont_draw_bitmap): Fix arg to ftfont_driver.get_bitmap.
376 (ftxfont_draw_backgrond): Fix filling region.
377 (ftxfont_default_fid): New function.
378 (ftxfont_open): Set xfotn->fid to the return value of
379 ftxfont_default_fid.
380 (ftxfont_prepare_face): Use ftxfont_create_gcs to create GCs.
381 (ftxfont_done_face): Free only GCs that are created by
382 ftxfont_create_gcs.
383 (ftxfont_draw): If face->gc != s->gc, create proper GCs.
384
385 * xterm.c (x_set_glyph_string_clipping_exactly) [USE_FONT_BACKEND]:
386 Clip to src->width, etc (not src->clip_XXX).
387
388 * xfns.c (x_create_tip_frame) [USE_FONT_BACKEND]: Handle
389 FontBackend frame parameter.
390
391 2006-07-26 Kenichi Handa <handa@m17n.org>
392
393 * font.h (struct font_driver_list): New member `on'.
394 (Fclear_font_cache): EXFUN it.
395 (font_update_drivers): Extern it.
396
397 * font.c (font_unparse_fcname): Fix typo (swidth->width).
398 (font_list_entities): Check driver_list->on.
399 (register_font_driver): Initalize `on' member to 0.
400 (font_update_drivers): New function.
401 (Fclear_font_cache): Check driver_list->on.
402
403 * frame.h (Qfont_backend): Extern it.
404 (x_set_font_backend): Extern it.
405
406 * frame.c (Qfont_backend): New variable.
407 (frame_parms): New element for font-backend.
408 (x_set_font_backend): New function.
409
410 * xfns.c (Fx_create_frame) [USE_FONT_BACKEND]: Handle
411 FontBackend frame parameter.
412 (x_frame_parm_handlers) [USE_FONT_BACKEND]: New element
413 x_set_font_backend.
414
415 * xfont.c (xfont_list): Don't try listing by :name property if the
416 name is not for XLFD.
417
418 2006-07-24 Kenichi Handa <handa@m17n.org>
419
420 * font.h (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
421 (LGLYPH_SET_TO): New macros.
422 (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
423 element of G is vector or not.
424 (font_at): Extern it.
425
426 * font.c: Include window.h.
427 (font_lispy_object): New function.
428 (font_prepare_composition): Check LGLYPH_FORM (g) to detect the
429 end of valid glyph.
430 (font_close_object): Fix getting (struct font *).
431 (font_at): New function.
432 (Ffont_get): If FONT is a font-object, get entity from it.
433 (Ffont_make_gstring): Initialize elements of glyphs with nil.
434 (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX. Fix
435 range check.
436 (Ffont_at): New function.
437 (syms_of_font): Defsubr Sfont_at.
438
439 * xdisp.c (it_props): Move the entry for Qauto_composed to just
440 before the entry for Qcompostion.
441 (handle_auto_composed_prop): Call auto-composition-function with 4
442 args.
443 (handle_composition_prop) [USE_FONT_BACKEND]: Set it->face_id from
444 the font in gstring.
445 (fill_composite_glyph_string) [USE_FONT_BACKEND]: Check
446 LGLYPH_FORM (g) to detect the end of valid glyph.
447 (x_produce_glyphs) [USE_FONT_BACKEND]: Don't update it->face_id if
448 we are composing with gstring.
449
450 * xterm.c (x_draw_composite_glyph_string_foreground) [USE_FONT_BACKEND]:
451 Check if adjustment is vector or not.
452
453 * Makefile.in (font.o): Make it depends on window.h.
454
455 2006-07-24 Kenichi Handa <handa@m17n.org>
456
457 * xterm.c (x_draw_composite_glyph_string_foreground): Check if
458 adjustment is vector or not.
459
460 2006-07-20 Kenichi Handa <handa@m17n.org>
461
462 * casefiddle.c (casify_object): Sync with HEAD.
463
464 2006-07-18 Miles Bader <miles@gnu.org>
465
466 * character.h (CHECK_CHARACTER): Redefine in terms of CHECK_TYPE.
467
468 2006-07-14 Kenichi Handa <handa@m17n.org>
469
470 * font.h (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
471 (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format.
472 (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
473
474 * font.c (font_merge_old_spec): Treat '*' in foundry as a wild
475 card.
476 (DEVICE_DELTA): Fix typo.
477 (font_otf_gpos): Adjusted for the change of LGLYPH format.
478 (font_prepare_composition): Likewise.
479
480 * xterm.c (x_draw_composite_glyph_string_foreground): Adjusted for
481 the change of LGLYPH format.
482
483 2006-07-07 Kenichi Handa <handa@m17n.org>
484
485 * ftfont.c (ftfont_list): Fix typo.
486 (ftfont_build_basic_charsets): Don't include letters with
487 diactrics.
488
489 2006-07-09 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
490
491 * xfaces.c (realize_non_ascii_face): Set face->extra to NULL.
492
493 * xftfont.c (xftfont_done_face): Call XftDrawDestroy only if
494 xftface_info is non-NULL.
495
496 2006-07-07 Kenichi Handa <handa@m17n.org>
497
498 * ftfont.c (ftfont_list): Fix typo.
499 (ftfont_build_basic_charsets): Don't include letters with
500 diactrics.
501
502 2006-07-05 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
503
504 * ftfont.c (ftfont_list): Move misplaced #endif
505
506 2006-07-05 Kenichi Handa <handa@m17n.org>
507
508 * ftfont.c (ftfont_list): Pay attention to the case that
509 FC_CAPABILITY is not defined.
510
511 2006-07-03 Kenichi Handa <handa@m17n.org>
512
513 * xftfont.c (xftfont_open): Set charset related members to -1.
514
515 * ftfont.c (ftfont_list): Handle QCotf property. Handling of
516 QCname fixed.
517 (ftfont_open): Set charset related members to -1.
518
519 * fontset.c (Votf_script_alist): New variable.
520 (syms_of_fontset): Initialize it.
521 (fontset_font): Delete unused variable.
522
523 * fontset.h (Votf_script_alist): Extern it.
524
525 * font.c (font_find_for_lface): Code optimized.
526
527 * font.h (font_close_object, font_merge_old_spec): Extern them.
528
529 2006-06-28 Kenichi Handa <handa@m17n.org>
530
531 * font.c (QCscalable, Qc, Qm, Qp, Qd): New variables.
532 (syms_of_font): Initialize them.
533 (font_pixel_size): Allow float value in dpi.
534 (font_prop_validate_type): Deleted.
535 (font_prop_validate_symbol, font_prop_validate_style): Argument
536 changed. Caller changed.
537 (font_prop_validate_non_neg): Renamed from
538 font_prop_validate_size.
539 (font_prop_validate_extra): Deleted.
540 (font_prop_validate_spacing): New function.
541 (font_property_table): Add elements for all known properties.
542 (get_font_prop_index): Renamed from check_font_prop_name. New
543 argument FROM. Caller changed.
544 (font_prop_validate): Validate all known properties.
545 (font_put_extra): Argument force deleted. Caller changed.
546 (font_expand_wildcards): Make it static. Fix the way of shrinking
547 the possible range.
548 (font_parse_xlfd): Arguemnt merge deleted. Fix handling of RESX,
549 RESY, SPACING, and AVGWIDTH. Don't validate property values here.
550 Caller changed.
551 (font_unparse_xlfd): Handle dpi, spacing, and scalable properties.
552 (font_parse_fcname): Arguemnt merge deleted. Fix parsing of point
553 size. Don't validate properties values here. Caller changed.
554 (font_unparse_fcname): Handle dpi, spacing, and scalable
555 properties.
556 (font_open_by_name): Delete unused variable.
557 (Ffont_spec): Likewise. Validate property values.
558 (Ffont_match_p): New function.
559
560 * font.h (QCscalable): Extern it.
561 (font_parse_xlfd, font_parse_fcname): Prototype adjusted.
562
563 * ftfont.c (ftfont_list): Handle properties dpi, spacing, and
564 scalable.
565
566 * xfont.c (xfont_query_font): Adjusted for the change of
567 font_parse_xlfd.
568 (xfont_list_pattern): New function.
569 (xfont_list): Use xfont_list_pattern.
570
571 * xftfont.c (xftfont_prepare_face): Cancel previous change.
572 (xftfont_done_face): Likewise.
573
574 2006-06-26 Kenichi Handa <handa@m17n.org>
575
576 * font.h (Flist_fonts): EXFUN it.
577
578 2006-06-25 Jason Rumney <jasonr@gnu.org>
579
580 * w32term.c (w32_initialize): Add back smoothing_type and
581 smoothing_enabled definitions.
582
583 2006-06-23 Kenichi Handa <handa@m17n.org>
584
585 * xterm.c (x_draw_glyph_string) [USE_FONT_BACKEND]: Check
586 s->face->font on determining underline position.
587
588 2006-06-21 Kenichi Handa <handa@m17n.org>
589
590 * font.c (font_parse_xlfd): Fix generating of CHARSET_REGISTRY field.
591 (font_has_char): Accept font-object too.
592 (font_find_for_lface): Try at first with a size specified in face.
593
594 * xftfont.c (xftfont_prepare_face): Make non-ascii face share
595 face->extra with ascii face.
596 (xftfont_done_face): Don't free face->extra of non-ascii face.
597
598 2006-06-20 Kenichi Handa <handa@m17n.org>
599
600 * frame.c (x_set_font) [USE_FONT_BACKEND]: Fix argument to
601 font_open_by_name.
602
603 2006-06-19 Kenichi Handa <handa@m17n.org>
604
605 * font.h (QCspacing, QCdpi): Extern them.
606 (enum font_spacing): New enum.
607 (FONT_PIXEL_SIZE_QUANTUM): New macro.
608
609 * font.c (POINT_TO_PIXEL): Don't divice POINT by 10.
610 (QCspacing, QCdpi): New variables.
611 (syms_of_font): Initialize them.
612 (font_pixel_size): New function.
613 (font_put_extra): New function.
614 (font_parse_xlfd): Fix handling of font size. Add QCdpi property
615 in FONT_EXTRA.
616 (font_parse_fcname): Handle enumenrated values (e.g. bold). Fix
617 handling font size. Add QCname property that contains only
618 unknown properties.
619 (font_score): Change argument. Caller changed. Pay attention to
620 FONT_PIXEL_SIZE_QUANTUM.
621 (font_sort_entites): Fix handling of font size.
622 (font_list_entities): Likewise.
623 (font_find_for_lface): Likewise.
624 (font_open_for_lface): Likewise.
625 (font_open_by_name): Likewise.
626 (Ffont_spec): Add QCname property that contains only unknown
627 properties.
628
629 * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq. Don't
630 include weight in listing pattern, instead check weight of each
631 listed font. Don't include scalable in pattern. Pay attention to
632 FONT_PIXEL_SIZE_QUANTUM.
633
634 2006-06-19 Kenichi Handa <handa@m17n.org>
635
636 * lread.c (read_escape): Fix the code synched with HEAD.
637
638 * font.c (font_parse_fcname): Fix parsing of point-size.
639 (font_unparse_fcname): Produce symbolic names for style
640 properties.
641 (font_list_entities): Handle float size correctly.
642 (font_open_by_name): Prefer `normal' property values if the name
643 doesn't specify them.
644
645 * fontset.c (Finternal_char_font): Use font_get_name, not
646 Ffont_xlfd_name.
647
648 * ftfont.c (ftfont_pattern_entity): Use the numeric value 100 for
649 FC_WEIGHT_REGULAR. Exclude FC_SIZE and FC_PIXEL_SIZE from listing
650 pattern. Don't force scalable.
651
652 * xftfont.c (xftfont_open): For generating a name, start from
653 96-byte buffer.
654
655 2006-06-16 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
656
657 * frame.h (x_new_fontset2): Fix prototype.
658
659 2006-06-16 Kenichi Handa <handa@m17n.org>
660
661 * font.h (struct font_driver): Member parse_name deleted.
662 (font_match_p, font_get_spec, font_parse_fcname)
663 (font_unparse_fcname): Extern them.
664 (font_get_name): Prototype adjusted.
665
666 * font.c (XLFD_SMALLNUM_MASK): Delete this macro.
667 (XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
668 (font_expand_wildcards): Fix handling ENCODING field. Avoid
669 unnecessary checks for weight, slant, and swidth.
670 (font_parse_fcname): New function.
671 (font_unparse_fcname): New function.
672 (font_parse_name): New function.
673 (font_match_p): New function.
674 (font_get_name): Return value changed to Lisp string.
675 (font_get_spec): New function.
676 (Qunspecified, Qignore_defface): Don't extern them.
677 (font_find_for_lface): Assume that LFACE is fully specified.
678 (font_load_for_face): If lface[LFACE_FONT_INDEX] is an font
679 object, use it for FACE.
680 (font_open_by_name): Call Ffont_spec with QCname prop. Don't call
681 driver->parse_name.
682 (Ffont_spec): Call font_parse_name, not font_parse_xlfd.
683
684 * fontset.h (new_fontset_from_font) [USE_FONT_BACKEND]: Prototype
685 adjusted.
686
687 * fontset.c (new_fontset_from_font) [USE_FONT_BACKEND]: Argument F
688 deleted. Don't call Fnew_fontset. Instead, directly call
689 make_fontset.
690
691 * frame.h (x_new_fontset2) [USE_FONT_BACKEND]: Prototype adjusted.
692
693 * frame.c (x_set_font) [USE_FONT_BACKEND]: Adjusted for the change
694 of x_new_fontset2.
695
696 * ftfont.c (Qmonospace, Qsans_serif, Qserif, Qmono, Qsans)
697 (Qsans__serif): New variables.
698 (ftfont_generic_family_list): New variable.
699 (syms_of_ftfont): Initialize the above variables.
700 (ftfont_pattern_entity): Argument NAME deleted.
701 (ftfont_list_generic_family): New function.
702 (ftfont_parse_name): Delete this function.
703 (ftfont_list): Try generic family only when FcFontList found no
704 font.
705 (ftfont_list_family): Fix args to FcObjectSetBuild.
706
707 * xfaces.c (check_lface_attrs) [USE_FONT_BACKEND]: Accept font
708 object in attrs[LFACE_FONT_INDEX].
709 (set_lface_from_font_name): Cancel all changes for font-backend.
710 (set_lface_from_font_and_fontset) [USE_FONT_BACKEND]: New
711 function.
712 (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: Accept a
713 font object in QCfont attribute.
714 (set_font_frame_param) [USE_FONT_BACKEND]: Likewise.
715 (realize_default_face) [USE_FONT_BACKEND]: Call
716 set_lface_from_font_and_fontset.
717
718 * xfns.c (x_default_font_parameter) [USE_FONT_BACKEND]: Try also
719 "fixed", and signal error here if no suitable font was found.
720
721 * xfont.c (xfont_parse_name): Delete this function.
722
723 * xftfont.c (xftfont_open): Change coding style of error
724 handling. Generate fontconfig's fontname pattern.
725
726 * xterm.h (struct x_output) [USE_FONT_BACKEND]: New member fontp.
727 (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro.
728
729 * xterm.c (x_new_fontset2) [USE_FONT_BACKEND]: Change arguments.
730 Both args FONTSET and FONT_OBJECT must be existing ones.
731
732 2006-06-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
733
734 * macterm.c (mac_set_unicode_keystroke_event): Don't use MAKE_CHAR.
735
736 2006-06-14 Kenichi Handa <handa@m17n.org>
737
738 * xfont.c (xfont_open, xfont_encode_char): Fix typo.
739
740 * font.h (struct font): Fix typo.
741
742 * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
743 XLFD_XXX_INDEX.
744 (enum xlfd_field_mask): New enum.
745 (intern_font_field): Argument changed. Caller changed. If digits
746 are followed by non-digits, return a symbol.
747 (font_expand_wildcards): New function.
748 (font_parse_xlfd): Fix wildcard handling.
749 (Ffont_spec): If :name is specified, reflect the info in the other
750 properties.
751
752 * ftfont.c (ftfont_pattern_entity): Fix typo.
753 (ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
754 locale.
755
756 2006-06-09 Kenichi Handa <handa@m17n.org>
757
758 * font.h (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
759
760 * font.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Moved from
761 ftfont.c.
762 (font_unparse_xlfd): Fix argument type declaration. Append "*" if
763 registry doesn't specify encoding part.
764 (font_find_for_lface): Pay attention to LFACE_FONT_INDEX.
765 (font_open_by_name): At first try parsing the name.
766 (syms_of_font): Declare Qiso8859_1, Qiso10646_1, and Qunicode_bmp
767 as Lisp symbols.
768
769 * fontset.c (reorder_font_vector): Pay attention to the case that
770 the 3rd element of font_def is nil.
771 (fontset_font): For the default fontset, append one more fontset
772 elements for a script-based font specification. Don't add script
773 attribute on finding a font.
774 (new_fontset_from_font): Unconditionally set FONTSET_ASCII to the
775 font name.
776 (fontset_ascii_font): If a font can't be opened, return nil.
777
778 * ftfont.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Moved to
779 font.c.
780 (ftfont_pattern_entity): New function.
781 (ftfont_get_cache): Assume that freetype_font_cache is already
782 initialized.
783 (ftfont_list): Handle the case that a file is specified in font
784 name. Use ftfont_pattern_entity to generate entities.
785 (ftfont_has_char): Check if the pattern contains FC_CHARSET.
786 (syms_of_ftfont): Initialize freetype_font_cache.
787
788 * xftfont.c (xftfont_open): Make the font name fontconfig's
789 style. Add BLOCK_INPUT and UNBLOCK_INPUT.
790 (xftfont_close): Free font->font.name if not NULL.
791
792 * xfont.c (xfont_list): If script is specified for a font, return
793 null_vector.
794 (xfont_list_family): Declare argument type.
795
796 * xfaces.c (set_lface_from_font_name): If a font doesn't have a
797 name, set LFACE_FONT (lface) to nil.
798
799 * xterm.c (x_new_fontset2): If an ASCII font couldn't be loaded,
800 return Qnil.
801
802 2006-06-08 Jason Rumney <jasonr@gnu.org>
803
804 * w32term.c (w32_initialize): Manually sync 2006-06-05 change from
805 HEAD.
806
807 2006-06-08 Kenichi Handa <handa@m17n.org>
808
809 * emacs.c (main): Check -enable-font-backend arg after the check
810 of -nl.
811 (standard_args): Add "-enable-font-backend".
812
813 * coding.c (Ffind_operation_coding_system): Sync with HEAD.
814
815 * callproc.c (Fcall_process): Sync with HEAD.
816
817 * coding.h (CODING_REQUIRE_ENCODING): Comment sync with HEAD.
818
819 2006-06-07 Kenichi Handa <handa@m17n.org>
820
821 * xftfont.c (xftfont_default_fid): Set fid_known to 1.
822 (struct xftdraw_list, xftdraw_list): Delete them.
823 (register_xftdraw, check_xftdraw): Delete them.
824 (xftfont_prepare_face): Don't call register_xftdraw.
825 (xftfont_done_face): Don't call check_xftdraw.
826 (xftfont_draw): Get backroudn color only when with_background is
827 nonzero.
828
829 * xfont.c (xfont_encode_char): Fix calculation of char2b.
830
831 2006-06-06 Kenichi Handa <handa@m17n.org>
832
833 These changes are for the new font handling codes.
834
835 * Makefile.in (ALL_CFLAGS): Add @FREETYPE_CFLAGS@,
836 @FONTCONFIG_CFLAGS@, and @LIBOTF_CFLAGS@.
837 (LIB_X11_LIB): If HAVE_XFT is defined, set to @XFT_LIBS@.
838 (FONTSRC, FONTOBJ): New variables.
839 (obj): Add $(FONTOBJ).
840 (SOME_MACHINE_OBJECTS): Lib_X11_Lib.
841 (LIBES): Add @FREETYPE_LIBS@, @FONTCONFIG_LIBS@, and
842 @LIBOTF_LIBS@.
843 (font.o, ftfont.o, xfont.o, xftfont.o, ftxfont.o): New targets.
844 (fontset.o, xdisp.o, xfaces.o, xfns.o, xterm.o): Depends on
845 $(FONTSRC).
846
847 * font.h, font.c, xfont.c, ftfont.c, xftfont.c, ftxfont.c: New
848 files.
849
850 * character.h (Vscript_representative_chars): Extern it.
851
852 * character.c (Vscript_representative_chars): New variable.
853 (syms_of_character): Declare it as a Lisp variable.
854
855 * composite.c (get_composition_id) [USE_FONT_BACKEND]: If
856 enable_font_backend is nonzero, accept the composition method
857 COMPOSITION_WITH_GLYPH_STRING.
858
859 * composite.h (enum composition_method) [USE_FONT_BACKEND]: New
860 enumeration COMPOSITION_WITH_GLYPH_STRING.
861
862 * config.in: Re-generated.
863
864 * dispextern.h (struct glyph_string) [USE_FONT_BACKEND]: New
865 members clip_x, clip_y, clip_width, and clip_height.
866 (struct face) [USE_FONT_BACKEND]: New members font_info and extra.
867
868 * emacs.c (main) [USE_FONT_BACKEND]: Handle arg
869 --enable-font-backend. Call syms_of_font.
870
871 * fns.c (assoc_no_quit): New function.
872
873 * fontset.h (FONT_INFO_FROM_FACE): New macro.
874 (face_for_font, new_fontset_from_font)
875 (fontset_ascii_font) [USE_FONT_BACKEND]: Extern them.
876
877 * fontset.c [USE_FONT_BACKEND]: Include "font.h".
878 (fontset_font, fontset_ascii, face_for_char)
879 (make_fontset_for_ascii_face, Ffont_info)
880 (Finternal_char_font) [USE_FONT_BACKEND]: If enable_font_backend
881 is nonzero, use font-backend mechanism.
882 (find_font_encoding): Make it non-static.
883 (new_fontset_from_font, fontset_ascii_font) [USE_FONT_BACKEND]:
884 New functions.
885
886 * frame.h (struct frame): New members resx and resy.
887 (struct frame) [USE_FONT_BACKEND]: New member font_driver_list.
888 (x_new_fontset2) [USE_FONT_BACKEND]: Extern it.
889
890 * frame.c [USE_FONT_BACKEND]: Include "font.h".
891 (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend
892 mechanism.
893
894 * lisp.h (assoc_no_quit): Extern it.
895
896 * xdisp.c: If USE_FONT_BACKEND is defined, include "font.h".
897 Through out the file, use FONT_INFO_FROM_FACE instead of
898 FONT_INFO_FROM_ID, use get_per_char_metric instead of
899 rif->per_char_metric.
900 (handle_composition_prop) [USE_FONT_BACKEND]: If the composition
901 method is COMPOSITION_WITH_GLYPH_STRING, just set it->c to ' '.
902 (get_glyph_face_and_encoding, fill_composite_glyph_string)
903 (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
904 (x_produce_glyphs) [USE_FONT_BACKEND]: If enable_font_backend is
905 nonzero, use font-backend mechanism.
906 (get_per_char_metric): New function.
907
908 * xfaces.c [USE_FONT_BACKEND]: Include "font.h".
909 (set_lface_from_font_name)
910 (set_font_frame_param, free_realized_face)
911 (prepare_face_for_display, clear_face_gcs)
912 (Finternal_set_font_selection_order, realize_x_face)
913 [USE_FONT_BACKEND]: If enable_font_backend is nonzero, use
914 font-backend mechanism.
915 (clear_face_cache) [USE_FONT_BACKEND]: Don't call
916 clear_font_table.
917 (load_face_font) [USE_FONT_BACKEND]: Abort.
918 (face_symbolic_value, face_symbolic_weight, face_symbolic_slant)
919 (face_symbolic_swidth, face_for_font) [USE_FONT_BACKEND]: New
920 functions.
921
922 * xfns.c [USE_FONT_BACKEND]: Include "font.h".
923 (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
924 (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
925 nonzero, register all available font drivers. Call
926 x_default_font_parameter for deciding a font.
927 (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
928
929 * xterm.c [USE_FONT_BACKEND]: Include "font.h".
930 (x_set_mouse_face_gc, x_set_glyph_string_clipping)
931 (x_set_glyph_string_clipping_exactly)
932 (x_compute_glyph_string_overhangs)
933 (x_draw_glyph_string_foreground)
934 (x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
935 (x_free_frame_resources) [USE_FONT_BACKEND]: If
936 enable_font_backend is nonzero, use font-backend mechanism.
937 (x_new_fontset2) [USE_FONT_BACKEND]: New function.
938
939 2006-05-15 Kenichi Handa <handa@m17n.org>
940
941 * coding.h (system_eol_type): Fix synching with HEAD.
942
943 * coding.c (system_eol_type): Sync with HEAD.
944 (coding_inherit_eol_type): If PARENT is nil, inherit from
945 system_eol_type.
946 (syms_of_coding): Initialize system_eol_type.
947
948 * callproc.c (Fcall_process): Sync with HEAD.
949
950 * process.c (setup_process_coding_systems): Fix synching with
951 HEAD.
952 (read_process_output): Likewise.
953 (Fset_process_coding_system): Inherit system's eol format if
954 necessary.
955
956 * fileio.c (choose_write_coding_system): Fix synching with HEAD.
957
958 * keymap.c (push_key_description): Fix synching with HEAD.
959
960 2006-05-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
961
962 * macgui.h (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
963
964 2006-04-07 Kenichi Handa <handa@m17n.org>
965
966 * coding.c (decode_eol): Pay attention to buffer relocation in
967 del_range_2.
968 (decode_coding): Call decode_eol before restoring undo_list.
969
970 2006-03-20 Kenichi Handa <handa@m17n.org>
971
972 * charset.c (Fdefine_charset_internal): Fix setting of
973 emacs_mule_bytes.
974
975 2006-03-14 Kenichi Handa <handa@m17n.org>
976
977 * keyboard.c (read_char): Check if C is a character or not before
978 looking up Vkeyboard_translate_table.
979
980 2006-03-10 Kenichi Handa <handa@m17n.org>
981
982 * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
983 condition to terminate the loop.
984
985 2006-03-09 Kenichi Handa <handa@m17n.org>
986
987 * coding.c (produce_composition): Compare charbuf[i] instead of
988 args[i] against 0.
989 (Fterminal_coding_system): Use EQ to compare Lisp objects.
990
991 2006-03-07 Kenichi Handa <handa@m17n.org>
992
993 * coding.c (DECODE_COMPOSITION_START): If the source is short, set
994 coding->result to CODING_RESULT_INSUFFICIENT_SRC.
995 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
996 detect_coding.
997 (emacs_mule_char): Handle old style (Emacs 20) component character
998 of a composition.
999 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Fix parsing a composition
1000 rule.
1001 (DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
1002 (decode_coding_emacs_mule): Handle invalid bytes correctly.
1003
1004 2006-03-04 Kenichi Handa <handa@m17n.org>
1005
1006 * coding.c (encode_coding_ccl): Allocate destination dynamically
1007 when necessary.
1008
1009 2006-03-03 Kenichi Handa <handa@m17n.org>
1010
1011 * ccl.c (Fccl_execute_on_string): Fix the condition of terminating
1012 the loop. When quitted, show a proper error message.
1013
1014 2006-03-02 Kenichi Handa <handa@m17n.org>
1015
1016 * coding.c (decode_coding): Fix previous change.
1017
1018 * xterm.c (x_set_glyph_string_clipping_exactly): Set
1019 src->clip_head and src->clip_tail temporarily instead of src->hl.
1020
1021 * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
1022 character sequence.
1023 (Fccl_execute_on_string): Use ASET, not XSET.
1024
1025 2006-03-01 Kenichi Handa <handa@m17n.org>
1026
1027 * search.c (search_buffer): Fix handling of "\\" in a trivial
1028 regexp.
1029
1030 2006-02-28 Kenichi Handa <handa@m17n.org>
1031
1032 * coding.c (decode_coding): Fix the condition of terminating the
1033 decoding loop.
1034
1035 2006-02-27 Kenichi Handa <handa@m17n.org>
1036
1037 * data.c (Faset): On setting a character bigger than 255 in a
1038 unibyte string, signal an error instead of make the string
1039 multibyte.
1040
1041 2006-02-22 Kenichi Handa <handa@m17n.org>
1042
1043 * charset.c (map_charset_chars): Fix for ascii-compatible charset
1044 made by a mapping table.
1045
1046 2006-02-21 Kenichi Handa <handa@m17n.org>
1047
1048 * xdisp.c (fill_composite_glyph_string): Check s->face is NULL or
1049 not.
1050 (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
1051 (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
1052
1053 * xterm.c (x_draw_composite_glyph_string_foreground): Check
1054 s->face is NULL or not.
1055
1056 2006-02-20 Kenichi Handa <handa@m17n.org>
1057
1058 * xterm.c (x_set_glyph_string_clipping_exactly): New function.
1059 (x_draw_glyph_string): Fix drawing of right_overhang and
1060 left_overhang around/on cursor.
1061
1062 * xdisp.c (draw_glyphs): Fix inclusion of right_overwriting
1063 glyphs.
1064
1065 * term.c (produce_glyphs): Sync to HEAD.
1066
1067 2006-02-15 Kenichi Handa <handa@m17n.org>
1068
1069 * xdisp.c (x_produce_glyphs): Handle composition with TAB.
1070
1071 2006-02-05 Kenichi Handa <handa@m17n.org>
1072
1073 * coding.c: Cancel incorrect synching with HEAD.
1074
1075 2006-02-03 Kenichi Handa <handa@m17n.org>
1076
1077 * coding.c (Fdefine_coding_system_internal): Avoid a duplicated
1078 element in Vcoding_system_alist.
1079 (Fdefine_coding_system_alias): Likewise.
1080
1081 2006-01-19 Kenichi Handa <handa@m17n.org>
1082
1083 * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
1084
1085 * coding.c: Sync to HEAD for handling autoload-coding-system.
1086 (Qcoding_system_define_form): New variable.
1087 (syms_of_coding): Intern and staticpro it.
1088 (Fcoding_system_p): Check Qcoding_system_define_form.
1089 (Fcheck_coding_system): Try to autoload the definition of
1090 CODING-SYSTEM.
1091
1092 * coding.h (CODING_SYSTEM_P): If ID is not available, call
1093 Fcoding_system_p.
1094 (CHECK_CODING_SYSTEM): If ID is not available, call
1095 Fcheck_coding_system.
1096 (CHECK_CODING_SYSTEM_GET_SPEC): Try also Fcheck_coding_system.
1097 (CHECK_CODING_SYSTEM_GET_ID): Likewise.
1098
1099 2006-01-17 Kenichi Handa <handa@m17n.org>
1100
1101 * xterm.c (handle_one_xevent): Delete unnecessary code inserted by
1102 sync with HEAD.
1103
1104 * coding.c (code_conversion_restore): GCPRO arg.
1105
1106 2005-12-28 Kenichi Handa <handa@m17n.org>
1107
1108 * character.c (lisp_string_width): Check multibyteness of STRING.
1109
1110 2005-10-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1111
1112 * macterm.c (mac_encode_char): Call ccl_driver with the last arg
1113 Qnil. Use JIS_TO_SJIS instead of ENCODE_SJIS.
1114 (decode_mac_font_name): Use decode_coding_c_string instead of
1115 decode_coding.
1116 (x_load_font): Initialize fontp->fontset to -1. Set
1117 fontp->encoding_type.
1118
1119 2005-10-17 Kenichi Handa <handa@m17n.org>
1120
1121 * search.c (search_buffer): Give up BM search on case-fold-search
1122 if one of a target character has a case-equivalence of different
1123 byte length even if that target charcter is an ASCII.
1124 (simple_search): Fix culculation of byte length of matched text.
1125 (boyer_moore): Fix handling of case-equivalent multibyte
1126 characters.
1127
1128 2005-10-15 Kenichi Handa <handa@m17n.org>
1129
1130 * coding.c (decode_coding): Fix handling of invalid bytes.
1131
1132 2005-10-06 Kenichi Handa <handa@m17n.org>
1133
1134 * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
1135 Unicode characters.
1136
1137 2005-09-23 Kenichi Handa <handa@m17n.org>
1138
1139 * coding.c (encode_coding_object): If a pre-write-conversion
1140 function makes a new buffer, kill it.
1141
1142 2005-07-29 Kenichi Handa <handa@m17n.org>
1143
1144 * coding.c (QCascii_compatible_p): New variable.
1145 (syms_of_coding): Initialize it.
1146 (ONE_MORE_BYTE): Decrement `src' before calling string_char.
1147 (ONE_MORE_BYTE_NO_CHECK): Likewise.
1148 (record_conversion_result): Add `default:' case.
1149 (coding_charset_list): Delete unused variable `coding_type'.
1150 (Fdefine_coding_system_internal): Add `ascii-compatible-p'
1151 property in the plist of the coding system.
1152 (Fcoding_system_put): Check QCascii_compatible_p.
1153
1154 2005-06-09 Kenichi Handa <handa@m17n.org>
1155
1156 * xdisp.c (get_next_display_element): Sync with the change in
1157 HEAD (2005-06-08).
1158
1159 2005-06-06 Kenichi Handa <handa@m17n.org>
1160
1161 * callproc.c (Fcall_process): Sync with the change in
1162 HEAD (2005-06-04).
1163
1164 2005-06-05 Miles Bader <miles@gnu.org>
1165
1166 * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
1167 removed calculation of frame `f', as it's now used.
1168
1169 2005-05-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1170
1171 * macterm.c (x_font_name_to_mac_font_name): Sync with trunk
1172 for the case that does not require code conversion.
1173
1174 2005-05-11 Kenichi Handa <handa@m17n.org>
1175
1176 * Makefile.in (shortlisp): Cancel previous change.
1177 (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
1178 (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
1179 (UNIDATA): New variable.
1180 (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
1181 (bootstrap-emacs${EXEEXT}): Depends on charprop.el. Run
1182 $(RUN_TEMACS) unconditionally.
1183
1184 2005-05-10 Kenichi Handa <handa@m17n.org>
1185
1186 * Makefile.in (shortlisp): Add ../lisp/international/charprop.el.
1187 (temacs${EXEEXT}): Build charprop.el if necessary.
1188 (admindir): New variable.
1189 ($(lispsource)international/charprop.el): New target.
1190
1191 2005-05-04 Miles Bader <miles@gnu.org>
1192
1193 * character.c (chars-in-region): Obsolete function removed.
1194 (syms_of_character): Remove its initialization.
1195
1196 2005-04-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
1197
1198 * w32select.c (validate_coding_system)
1199 (setup_windows_coding_system): New functions.
1200 (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
1201 setup_windows_coding_system.
1202 (setup_config, Fw32_get_clipboard_data): Use
1203 validate_coding_system.
1204 (Fx_selection_exists): Move call to setup_config to a place
1205 were signals are allowed.
1206
1207 * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
1208 (Fcheck_coding_system): Add declarations.
1209
1210 2005-04-28 Kenichi Handa <handa@m17n.org>
1211
1212 * s/ms-w32.h (STDC_HEADERS): Sync with the change in
1213 HEAD (2005-04-23).
1214
1215 2005-04-25 Kenichi Handa <handa@m17n.org>
1216
1217 * charset.c (load_charset_map_from_vector): Fix for the first
1218 iteration.
1219
1220 2005-04-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1221
1222 * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
1223 string as the second argument for x_new_fontset.
1224
1225 2005-04-18 Kenichi Handa <handa@m17n.org>
1226
1227 * fns.c (Fstring_as_multibyte): Fix the change for syncing with
1228 CVS head.
1229
1230 2005-04-09 Kenichi Handa <handa@m17n.org>
1231
1232 * search.c (search_buffer): Fix the change for syncing with CVS
1233 head.
1234 (search_buffer): Likewise.
1235
1236 2005-03-31 Kenichi Handa <handa@m17n.org>
1237
1238 * xdisp.c (get_next_display_element): Sync with CVS head.
1239
1240 2005-03-29 Kenichi Handa <handa@m17n.org>
1241
1242 * coding.c (decode_coding_object): Use safe_call1 instead of call1.
1243 (encode_coding_object): Use safe_call instead of call2.
1244
1245 2005-03-14 Kenichi Handa <handa@m17n.org>
1246
1247 * fontset.c (set_default_ascii_font): Fix the change for
1248 syncing with CVS head.
1249
1250 2005-01-30 Kenichi Handa <handa@m17n.org>
1251
1252 * fontset.c (Fset_fontset_font): Check family element of a given
1253 vector.
1254
1255 * Makefile.in (lisp): Include charprop.el.
1256
1257 2005-01-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1258
1259 * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
1260 Not sure if it's unnecessary.
1261
1262 2005-01-16 Steven Tamm <steventamm@mac.com>
1263
1264 * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
1265 some possibly unnecessary fontset checking code that crashed
1266 when creating a new frame
1267
1268 2005-01-17 Kenichi Handa <handa@m17n.org>
1269
1270 * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
1271 lookup_face.
1272
1273 * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
1274
1275 * fringe.c (draw_fringe_bitmap_1): Fix argument to
1276 lookup_named_face.
1277
1278 2004-12-25 Kenichi Handa <handa@m17n.org>
1279
1280 * xdisp.c (get_next_display_element): Sync to the change in HEAD
1281 on 2004-12-21.
1282
1283 2004-12-11 Kenichi Handa <handa@m17n.org>
1284
1285 * search.c: Sync to the change in HEAD on 2004-11-19, 20.
1286
1287 * w32console.c: Sync to the change in HEAD on 2004-12-01.
1288
1289 * coding.c: Cancel the change done in HEAD on 2004-11-30.
1290 (coding_charset_list): New function.
1291
1292 * coding.h (coding_charset_list): Extern it.
1293
1294 * term.c: Sync to the change in HEAD on 2004-11-30.
1295
1296 2004-12-09 Kenichi Handa <handa@m17n.org>
1297
1298 * fontset.c (Fset_fontset_font): Call find_font_encoding with
1299 concatenation of family and registry.
1300
1301 2004-12-06 Kenichi Handa <handa@m17n.org>
1302
1303 * character.h (BYTE8_STRING): Fix typo.
1304
1305 * editfns.c (Ftranslate_region_internal): Don't convert unibyte
1306 string to multibyte (sync to HEAD).
1307
1308 * casefiddle.c (casify_region): Handle changes in byte-length
1309 using replace_range_2 (sync to HEAD).
1310
1311 2004-11-24 Andreas Schwab <schwab@suse.de>
1312
1313 * chartab.c (map_char_table): GCPRO table and arg.
1314
1315 2004-10-29 Kenichi Handa <handa@m17n.org>
1316
1317 * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
1318 already at limit.
1319
1320 2004-10-23 Kenichi Handa <handa@m17n.org>
1321
1322 * fontset.c (fs_load_font): Use fast_string_match_ignore_case
1323 instead of fast_c_string_match_ignore_case.
1324 (find_font_encoding): Argument changed to Lisp_Object. Use
1325 fast_string_match_ignore_case instead of
1326 fast_c_string_match_ignore_case. Caller changed.
1327
1328 2004-10-15 Kenichi Handa <handa@m17n.org>
1329
1330 * xdisp.c (get_next_display_element): In unibyte case, decide to
1331 display in octal form by checking a chacter by
1332 UNIBYTE_CHAR_HAS_MULTIBYTE_P.
1333
1334 * charset.c (Fset_unibyte_charset): Setup
1335 unibyte_has_multibyte_table.
1336
1337 * character.c (unibyte_has_multibyte_table): New variable.
1338
1339 * character.h (unibyte_has_multibyte_table): Extern it.
1340 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
1341
1342 2004-10-14 Kenichi Handa <handa@m17n.org>
1343
1344 * callproc.c (Fcall_process): Fix merging of 2004-10-13 change.
1345
1346 2004-10-13 Kenichi Handa <handa@m17n.org>
1347
1348 * coding.c (encode_coding_iso_2022): Fix handling of charset
1349 annotation.
1350
1351 2004-10-12 Kenichi Handa <handa@m17n.org>
1352
1353 * coding.c (setup_coding_system): If coding_system is nil, use
1354 Qundecided.
1355 (Fterminal_coding_system): Return nil if terminal coding system is
1356 `undecided'.
1357 (syms_of_coding): Define coding-system `undecided' here. Setup
1358 terminal_coding as `undecided'.
1359
1360 2004-10-04 Kenichi Handa <handa@m17n.org>
1361
1362 * xdisp.c (message_dolog, set_message_1): Call
1363 unibyte_char_to_multibyte with arg type int.
1364
1365 * fileio.c (Fsubstitute_in_file_name): Fix previous change.
1366
1367 * lread.c (read1): Fix reading of a char-table.
1368
1369 * print.c (print_object): Include sub char-table in cicularities
1370 detection.
1371
1372 2004-10-01 Kenichi Handa <handa@m17n.org>
1373
1374 * keymap.c (where_is_internal_2): Fix for the case that KEY is a
1375 cons. Append the found sequences in car of ARGS instead of
1376 prepending.
1377
1378 2004-09-28 Kenichi Handa <handa@m17n.org>
1379
1380 * fileio.c (report_file_error): Make a unibyte string from
1381 strerror (errorno).
1382 (Fsubstitute_in_file_name): Fix the arg to
1383 unibyte_char_to_multibyte. It is evaluated twice.
1384
1385 2004-09-19 Kenichi Handa <handa@m17n.org>
1386
1387 * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
1388
1389 2004-09-14 Kenichi Handa <handa@m17n.org>
1390
1391 * coding.c (detect_coding): Fix previous change.
1392
1393 2004-09-13 Kenichi Handa <handa@m17n.org>
1394
1395 * coding.c (detect_coding_utf_16): Don't set detect_info->found if
1396 BOM is not found.
1397 (detect_coding): Optimization for ISO-2022 when no 8-bit data is
1398 found.
1399 (detect_coding_system): Likewise.
1400
1401 2004-09-01 Jason Rumney <jasonr@gnu.org>
1402
1403 * w32fns.c (x_to_w32_font): Update to use new coding struct.
1404
1405 2004-08-17 Kenichi Handa <handa@m17n.org>
1406
1407 * charset.c (Fdeclare_equiv_charset): Fix handing of CHARS.
1408 (Fiso_charset): Likewise.
1409
1410 2004-08-03 Steven Tamm <steventamm@mac.com>
1411
1412 * macterm.c (mac_encode_char): Add charset argument and update
1413 to use encoding_type
1414 (x_new_font,x_new_fontset): Merge in changes from xterm.c;
1415 switch to pure fontset
1416 (decode_mac_font_name): Temporarily remove decoding
1417 (x_font_name_to_mac_font_name): Temporarily remove encoding
1418 (x_load_font): Temporarily remove encoding
1419
1420 2004-06-30 Kenichi Handa <handa@m17n.org>
1421
1422 * xfaces.c (Fface_font): If frame is not on a window system,
1423 ignore CHARACTER arg. If HAVE_WINDOW_SYSTEM is not defined, don't
1424 refer to face->font.
1425 (split_font_name_into_vector, build_font_name_from_vector)
1426 (lookup_non_ascii_face, realize_non_ascii_face): Define them only
1427 whne HAVE_WINDOW_SYSTEM is defined.
1428
1429 2004-05-29 Kenichi Handa <handa@m17n.org>
1430
1431 * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
1432 (x_produce_glyphs): Fix setting of members of cmp in case
1433 cmp->glyph_len is zero,
1434
1435 * fontset.c (Fset_fontset_font): Docstring fixed.
1436 (Ffontset_info): Make it backward compatible. New arg ALL.
1437
1438 2004-05-11 Kim F. Storm <storm@cua.dk>
1439
1440 * process.c (read_process_output): Grow decoding_buf when needed;
1441 this could cause a crash in allocate_string and compact_small_strings.
1442
1443 2004-04-29 Kenichi Handa <handa@m17n.org>
1444
1445 * fileio.c (WRITE_BUF_SIZE): This macro deleted.
1446 (e_write): Fix previous change.
1447
1448 2004-04-28 Kenichi Handa <handa@m17n.org>
1449
1450 * coding.c (setup_coding_system): Set coding->common_flags
1451 correctly for raw-text.
1452 (consume_chars): On encoding unibyte text by raw-text, don't check
1453 multibyte form.
1454 (encode_coding): On encoding by raw-text, never use translation
1455 tables.
1456
1457 * fileio.c (e_write): Short cut for the case of no encoding.
1458
1459 2004-04-20 Kenichi Handa <handa@m17n.org>
1460
1461 * coding.c (detect_coding): Delete unused variables.
1462 (detect_coding_system): Likewise.
1463
1464 2004-04-18 Kenichi Handa <handa@m17n.org>
1465
1466 * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
1467 (consume_chars): Fix handling of 8-bit bytes in unibyte source.
1468
1469 2004-04-14 Kenichi Handa <handa@m17n.org>
1470
1471 Sync all files to HEAD.
1472
1473 2004-04-14 Kenichi Handa <handa@m17n.org>
1474
1475 * coding.c (Ffind_coding_systems_region_internal): Include
1476 raw-text and no-conversion in the result.
1477
1478 * fontset.h: Sync to HEAD.
1479
1480 * fontset.c: Sync to HEAD.
1481
1482 2004-04-14 Kenichi Handa <handa@m17n.org>
1483
1484 * fontset.c (find_font_encoding): Return `ascii' for unknown
1485 encoding.
1486 (load_font_get_repertory): Delete unnecessary check of ENCODING of
1487 FONT_DEF.
1488 (font_def_arg, add_arg, from_arg, to_arg): New args.
1489 (set_fontset_font): Argument changed.
1490 (Fset_fontset_font): Fix for the case that TARGET is a script
1491 name and charset name.
1492 (new_fontset_from_font_name): Fix argument to Fnew_fontset.
1493
1494 2004-04-13 Kenichi Handa <handa@m17n.org>
1495
1496 * fontset.c (fontset_font): Renamed from fontset_face. Return
1497 value changed.
1498 (face_suitable_for_char_p): Adjusted for the change of
1499 fontset_font.
1500 (face_for_char): Likewise.
1501 (make_fontset_for_ascii_face): Fix setting of the fontset element
1502 for ASCII.
1503 (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
1504 to get a font name.
1505 (Ffontset_info): Adjusted for the change of fontset_font.
1506
1507 * composite.c: Sync to HEAD.
1508
1509 * search.c: Sync to HEAD.
1510
1511 * coding.c: Sync to HEAD.
1512 (emacs_mule_char): Check invalid code more regidly.
1513
1514 * coding.h: Sync to HEAD.
1515
1516 * charset.c: Sync to HEAD.
1517
1518 * charset.h: Sync to HEAD.
1519
1520 * character.h (LEADING_CODE_LATIN_1_MIN)
1521 (LEADING_CODE_LATIN_1_MAX): Delete these macros.
1522
1523 2004-04-08 Kenichi Handa <handa@m17n.org>
1524
1525 * category.h: Sync to HEAD.
1526
1527 * category.c: Sync to HEAD.
1528
1529 * syntax.h: Sync to HEAD.
1530
1531 * syntax.c: Sync to HEAD.
1532
1533 * regex.h: Sync to HEAD.
1534
1535 * regex.c: Sync to HEAD.
1536
1537 2004-04-07 Kenichi Handa <handa@m17n.org>
1538
1539 * editfns.c: Sync to HEAD.
1540 (check_translation): New function.
1541 (Ftranslate_region_internal): Handle M:N mapping.
1542
1543 2004-04-06 Kenichi Handa <handa@m17n.org>
1544
1545 * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
1546
1547 2004-03-30 Kenichi Handa <handa@m17n.org>
1548
1549 * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
1550 goto invalid_code.
1551 (decode_coding_iso_2022): Fix handling of invalid designation.
1552
1553 * fileio.c (Finsert_file_contents): Be sure to call unbind_to
1554 after calling code_conversion_save.
1555
1556 2004-03-11 Kenichi Handa <handa@m17n.org>
1557
1558 * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
1559
1560 * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
1561
1562 * fontset.c: Include "intervals.h".
1563 (fontset_face): Fix comparing of Lisp_Objects.
1564 (free_face_fontset): Fix Lisp_Object/int mixup.
1565 (new_fontset_from_font_name): Likewise.
1566
1567 * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
1568
1569 * coding.c: Add many prototypes for static functions.
1570 (get_translation_table): Allow max_lookup to be NULL.
1571 (decode_coding): Call get_translation_table with max_lookup NULL.
1572 (Ffind_coding_systems_region_internal): Likewise.
1573 (Funencodable_char_position, Fcheck_coding_systems_region):
1574 Likewise.
1575
1576 2004-03-11 Kenichi Handa <handa@m17n.org>
1577
1578 * coding.c (get_translation_table): Declare it as Lisp_Object.
1579 (LOOKUP_TRANSLATION_TABLE): New macro.
1580 (produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of
1581 CHAR_TABLE_REF.
1582 (consume_chars): Likewise.
1583
1584 2004-03-11 Kenichi Handa <handa@m17n.org>
1585
1586 * coding.c (MAX_ANNOTATION_LENGTH): Adjusted for the change of
1587 annotation data format.
1588 (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
1589 Change arguments FROM and TO to single argument NCHARS. Caller
1590 changed.
1591 (decode_coding_utf_8): Pay attention to coding->charbuf_used.
1592 (decode_coding_utf_16, decode_coding_emacs_mule)
1593 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
1594 (decode_coding_ccl, decode_coding_charset): Likewise.
1595 (get_translation): New function.
1596 (produce_chars): New arguments translation_table and last_block.
1597 Translate characters here. Return number of carryover chars.
1598 Caller changed.
1599 (produce_composition): New argument pos. Caller changed.
1600 Adjusted for the change of annotation data format.
1601 (produce_charset, produce_annotation): Likewise.
1602 (decode_coding, encode_coding): Don't call translate_chars.
1603 (consume_chars): New arg translation_table. Caller changed.
1604 (translate_chars): Deleted.
1605 (syms_of_coding): Make translation-table's number of extra slots
1606 2.
1607
1608 2004-03-09 Kenichi Handa <handa@m17n.org>
1609
1610 * search.c (simple_search): Fix setting this_pos_byte in backward
1611 search.
1612
1613 * coding.c (detect_coding_emacs_mule): Fix counting of encoded
1614 byte sequence.
1615 (detect_coding_ccl): Fix setting of the variable valids.
1616
1617 2004-03-04 Kenichi Handa <handa@m17n.org>
1618
1619 * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
1620
1621 * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
1622
1623 * editfns.c (Ftranslate_region_internal): Renamed from
1624 Ftranslate_region. Accept a char-table in TABLE.
1625 (syms_of_editfns): Defsubr Stranslate_region_internal.
1626
1627 * xfaces.c (set_lface_from_font_name): If a font is specified for
1628 a frame, generate a fontset from the font.
1629 (build_scalable_font_name): If the scalable font is requested for
1630 a specific size, don't change that size.
1631 (try_font_list): Try a scalable font also in the case that a
1632 pattern string is specified,
1633
1634
1635 2004-03-03 Kenichi Handa <handa@m17n.org>
1636
1637 * xfaces.c (Fface_font): New optional arg CHARACTER.
1638
1639 2004-02-17 Kenichi Handa <handa@m17n.org>
1640
1641 * charset.h (CHARSET_OFFSET): New macro.
1642
1643 2004-02-13 Kenichi Handa <handa@m17n.org>
1644
1645 * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
1646
1647 * fontset.c (fontset_face): Handle the case that repertory is a
1648 char-table.
1649 (find_font_encoding): Return nil for unknown encoding.
1650 (Fset_fontset_font): Ignore a font of unknown encoding.
1651
1652 2004-02-09 Kenichi Handa <handa@m17n.org>
1653
1654 * keymap.c (describe_vector): Handle default value of a char
1655 table.
1656
1657 * fontset.c (fontset_face): Handle fallback fonts correctly.
1658 (Ffontset_info): Return infomation about fallback fonts.
1659
1660 2004-02-06 Kenichi Handa <handa@m17n.org>
1661
1662 * fontset.c (FONTSET_DEFAULT): New macro.
1663 (FONTSET_ADD): Handle the case that range is nil.
1664 (fontset_add): Likewise.
1665 (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
1666 the case that it is nil.
1667 (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
1668 (syms_of_fontset): Set char-table-extra-slots property of fontset
1669 to 9.
1670
1671 * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
1672 subset or superset.
1673
1674 2004-01-30 Kenichi Handa <handa@m17n.org>
1675
1676 * emacs.c (main): Call init_charset after syms_of_XXX.
1677
1678 * charset.c (Vcharset_map_directory): Deleted.
1679 (Vcharset_map_path): New variable
1680 (load_charset_map_from_file): Use Vcharset_map_path instead.
1681 (init_charset): Initialize Vcharset_map_path.
1682 (syms_of_charset): Delete declaration of "charset-map-directory",
1683 add declaration of "charset-map-path".
1684
1685 2004-01-29 Kenichi Handa <handa@m17n.org>
1686
1687 * fns.c (string_char_to_byte): Optimize for ASCII only string.
1688 (string_byte_to_char): Likewise.
1689
1690 * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
1691
1692 * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
1693 (detect_coding): Treat '\0' as normal ASCII byte..
1694 (detect_coding_system): Likewise.
1695
1696 2004-01-27 Kenichi Handa <handa@m17n.org>
1697
1698 * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
1699
1700 * coding.c (QCmnemonic, QCdefalut_char)
1701 (QCdecode_translation_table, QCencode_translation_table)
1702 (QCpost_read_conversion, QCpre_write_conversion): New variables.
1703 (get_translation_table): Return a list of translation tables if
1704 necessary.
1705 (decode_coding): Call get_translation_table with ENCODEP 0.
1706 (char_encodable_p): If translation_table is non-nil, always call
1707 translate_char.
1708 (Fdefine_coding_system_internal): Accept list of translation
1709 tables as :encode-translation-table and :decode-translation-table.
1710 (Fcoding_system_put): New function.
1711 (syms_of_coding): Declare new symbols. Defsubr
1712 Scoding_system_put.
1713 (decode_coding_sjis): Handle 4th charset (typically JISX0212).
1714 (encode_coding_sjis): Likewise.
1715
1716 * charset.c (map_charset_chars): Fix arg to map_charset_chars in
1717 when the charset is superset type.
1718
1719 * character.c (translate_char): Accept list of translation tables.
1720
1721 2004-01-25 Kenichi Handa <handa@m17n.org>
1722
1723 * coding.h (enum coding_attr_index): New member
1724 coding_attr_trans_tbl.
1725 (CODING_ATTR_TRANS_TBL): New macro.
1726
1727 * coding.c (get_translation_table): New function.
1728 (translate_chars): Fix the bug of skipping annotation data.
1729 (decode_coding): Utilze get_translation_table.
1730 (encode_coding): Likewise.
1731 (char_encodable_p): Translate char if necessary.
1732 (Funencodable_char_position): Likewise.
1733 (Ffind_coding_systems_region_internal): Setup translation table
1734 for encode in a coding system attribute vector in advance.
1735 (Fcheck_coding_systems_region): Likewise.
1736 (Fdefine_coding_system_internal): Allow a symbol as translation
1737 table. For shift-jis type coding system, allow 4th charset.
1738
1739 2004-01-24 Kenichi Handa <handa@m17n.org>
1740
1741 * coding.c (decode_coding_sjis): Check the first byte rigidly.
1742
1743 * xdisp.c (get_next_display_element): Pass -1 as POS to
1744 FACE_FOR_CHAR if displaying a C-string.
1745
1746 2004-01-23 Kenichi Handa <handa@m17n.org>
1747
1748 * composite.c (get_composition_id): Handle xoff and yoff in a
1749 composition rule.
1750
1751 * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
1752 (struct composition): New member lbearing and rbearing.
1753
1754 * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
1755 (x_get_glyph_overhangs): Handle a composition glyph.
1756 (x_produce_glyphs): Setup lbearing and rbreaing for a composition
1757 glyph.
1758
1759 * xterm.c (x_compute_glyph_string_overhangs): Handle also a
1760 composition glyph.
1761
1762 2004-01-18 Kenichi Handa <handa@m17n.org>
1763
1764 * print.c: Include charset.h.
1765 (Vprint_charset_text_property): New variable.
1766 (Qdefault): Extern it.
1767 (PRINT_STRING_NON_CHARSET_FOUND)
1768 (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
1769 (print_check_string_result): New variable.
1770 (print_check_string_charset_prop): New function.
1771 (print_prune_charset_plist): New variable.
1772 (print_prune_string_charset): New function.
1773 (print_object): Call print_prune_string_charset if
1774 Vprint_charset_text_property is not t.
1775 (print_interval): Print nothing if itnerval->plist is nil.
1776 (syms_of_print): Declare Vprint_charset_text_property as a lisp
1777 variable. Init and staticpro print_prune_charset_plist.
1778
1779 2004-01-15 Kenichi Handa <handa@m17n.org>
1780
1781 * fontset.c (new_fontset_from_font_name): Use the specified font
1782 for all characters in the new fontset.
1783
1784 * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
1785 OBJECT args.
1786
1787 * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
1788 OBJECT args for composition too.
1789
1790 * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
1791 OBJECT args.
1792
1793 2004-01-13 Kenichi Handa <handa@m17n.org>
1794
1795 * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
1796
1797 * fontset.c (reorder_font_vector): Adjusted for the change of
1798 FONT_DEF format.
1799 (fontset_face): New arg id. Caller changed.
1800 (face_for_char): New args pos and object.
1801 (make_fontset_for_ascii_face): Adjusted for the change of FONT_DEF
1802 format.n
1803 (fs_query_fontset): Check NAME by Fassoc too.
1804 (Fset_fontset_font): Allow non-XLFD font name.
1805 (Ffontset_info): Adjusted for the change of FONT_DEF format.
1806
1807 * fontset.h (face_for_char): Prototype adjusted.
1808
1809 * xdisp.c (face_before_or_after_it_pos): Call FACE_FOR_CHAR with
1810 POS and OBJECT args.
1811 (get_next_display_element): Likewise.
1812 (append_space): Likewise.
1813 (extend_face_to_end_of_line): Likewise.
1814 (get_char_face_and_encoding): Likewise.
1815 (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
1816 (x_produce_glyphs): Likewise.
1817
1818 * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
1819 POS and OBJECT args.
1820
1821 * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
1822 POS and OBJECT args.
1823
1824 2004-01-03 Jason Rumney <jasonr@gnu.org>
1825
1826 * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
1827 of GlobalAlloc'ed memory.
1828
1829 2003-12-29 Kenichi Handa <handa@m17n.org>
1830
1831 * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
1832
1833 * charset.h (charset_table_used): Delete extern.
1834
1835 * charset.c (charset_table_used): Make it static.
1836 (map_charset_chars): Fix args to c_function with.
1837
1838 * chartab.c (map_sub_char_table_for_charset): Fix args to
1839 c_function with.
1840
1841 * coding.h (enum coding_result_code): Delete
1842 CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
1843
1844 * coding.c (Qinsufficient_source, Qinconsistent_eol)
1845 (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New
1846 variables.
1847 (Vlast_code_conversion_error): New variables.
1848 (syms_of_coding): DEFSYM or DEFVAR_LISP them.
1849 (ONE_MORE_BYTE): Record error if any instead of signaling an
1850 error. If non-ASCII multibyte char is found, return the negative
1851 value of the code. All callers changed to check it.
1852 (ONE_MORE_BYTE_NO_CHECK): Likewise.
1853 (record_conversion_result): New function. All codes setting
1854 coding->result are changed to call this function.
1855 (detect_coding_utf_8): Don't use the local variable incomplete.
1856 (decode_coding_utf_8): Likewise.
1857 (emacs_mule_char): Change the second arg to `const'.
1858 (detect_coding_emacs_mule): Don't use the local variable
1859 incomplete.
1860 (detect_coding_sjis): Likewise.
1861 (detect_coding_big5): Likewise.
1862 (decode_coding): Fix of flushing out unprocessed data.
1863 (make_conversion_work_buffer): Fix making of a work buffer.
1864 (decode_coding_object): Return coding->dst_object;
1865
1866 * fontset.c (set_fontset_font): Fix args.
1867
1868 * lisp.h (CHARACTERBITS): Define as 22.
1869
1870 * process.c (send_process): Be sure to set coding->src_multibyte.
1871
1872 * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
1873
1874 2003-12-02 Kenichi Handa <handa@m17n.org>
1875
1876 * xdisp.c (handle_auto_composed_prop): Give limit to
1877 Fnext_single_char_property_change.
1878
1879 2003-12-02 Kenichi Handa <handa@m17n.org>
1880
1881 * coding.c (detect_coding): Fix previous change.
1882 (detect_coding_system): Likewise.
1883
1884 2003-12-02 Kenichi Handa <handa@m17n.org>
1885
1886 * composite.c (syms_of_composite): Don't make the compostion hash
1887 table week.
1888
1889 * fontset.c (Fset_fontset_font): Fix docstring.
1890
1891 * lisp.h (detect_coding_system): Adjust prototype.
1892
1893 * fileio.c (kill_workbuf_unwind): Delete this function.
1894 (Finsert_file_contents): Adjust the call of detect_coding_system.
1895 Get conversion_buffer by code_conversion_save. Use the macor
1896 CODING_MAY_REQUIRE_DECODING. After decoding, update
1897 coding_system.
1898
1899 * coding.h (make_conversion_work_buffer): Delete extern.
1900 (code_conversion_save): Extern it.
1901
1902 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
1903 (CODING_GET_INFO): Delete argument eol_type. Callers changed.
1904 (decode_coding_utf_8): Don't do eol converion.
1905 (detect_coding_utf_16): Check coding->src_chars, not
1906 coding->src_bytes. Add heuristics for those that have no
1907 signature.
1908 (decode_coding_emacs_mule): Don't do eol converion.
1909 (decode_coding_iso_2022): Likewise.
1910 (decode_coding_sjis): Likewise.
1911 (decode_coding_big5): Likewise.
1912 (decode_coding_charset): Likewise.
1913 (adjust_coding_eol_type): Return a new coding system.
1914 (detect_coding): Don't detect eol. Fix for utf-16 detection.
1915 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
1916 each change.
1917 (decode_coding): Pay attention to undo_list. Do eol convesion for
1918 all types of coding-systems (if necessary).
1919 (Vcode_conversion_work_buf_list): Delete it.
1920 (Vcode_conversion_reused_workbuf): Renamed from
1921 Vcode_conversion_reused_work_buf.
1922 (Vcode_conversion_workbuf_name): New variable.
1923 (reused_workbuf_in_use): New variable.
1924 (make_conversion_work_buffer): Delete the arg DEPTH.
1925 (code_conversion_restore): Argument changed to cons.
1926 (code_conversion_save): Delete the argument BUFFER. Callers
1927 changed.
1928 (detect_coding_system): New argument src_chars. Callers changed.
1929 Fix for utf-16 detection.
1930 (init_coding_once): Don't use ISO_carriage_return.
1931 (syms_of_coding): Initialized Vcode_conversion_workbuf_name and
1932 reused_workbuf_in_use.
1933
1934 2003-11-24 Kenichi Handa <handa@m17n.org>
1935
1936 * keymap.c (store_in_keymap): Pay attention to the case that idx
1937 is a cons specifying a character range.
1938
1939 * coding.c (Fdefine_coding_system_internal): Fix previous change.
1940
1941 2003-11-23 Kenichi Handa <handa@m17n.org>
1942
1943 * xdisp.c (handle_auto_composed_prop): Fix the case of returning
1944 HANDLED_RECOMPUTE_PROPS.
1945
1946 * coding.c (Fdefine_coding_system_internal): Fix checking of
1947 ascii compatibility.
1948
1949 2003-11-22 Kenichi Handa <handa@m17n.org>
1950
1951 * charset.c (find_charsets_in_text): Delete unused locale
1952 variable.
1953 (Fset_charset_priority): Update Vemacs_mule_charset_list too.
1954
1955 * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
1956 Resync charset_list to Vemacs_mule_charset_list.
1957
1958 * keymap.c (store_in_keymap): Pay attention to the case that idx
1959 is a cons specifying a character range.
1960
1961 2003-11-18 Kenichi Handa <handa@m17n.org>
1962
1963 * composite.c (update_compositions): Bind inhibit-read-only, etc
1964 to t before calling remove-list-of-text-properties.
1965
1966 * print.c (print_object): Always print ASCII chars as is.
1967
1968 2003-11-17 Kenichi Handa <handa@m17n.org>
1969
1970 * keymap.c (Fdefine_key): Fix handling of Lucid style event type
1971 list.
1972
1973 * fns.c (Fmapconcat): Signal an error if SEQUENCE is a char table.
1974 (Fmapcar): Likewise.
1975 (Fmapc): Likewise.
1976
1977 2003-11-15 Kenichi Handa <handa@m17n.org>
1978
1979 * syntax.c (skip_chars): Be sure to alloca char_ranges when
1980 necessary.
1981
1982 2003-11-14 Kenichi Handa <handa@m17n.org>
1983
1984 * xfaces.c (set_lface_from_font_name): Fix for the case that
1985 FONTNAME is not fontset name.
1986
1987 2003-11-13 Kenichi Handa <handa@m17n.org>
1988
1989 * fns.c (base64_encode_1): Fix previous change.
1990
1991 2003-11-08 Kenichi Handa <handa@m17n.org>
1992
1993 * fontset.c (set_fontset_font): New function.
1994 (Fset_fontset_font): If a font is specified for a charset, use
1995 map_charset_chars to store the font spec in a fontset.
1996
1997 2003-10-29 Kenichi Handa <handa@m17n.org>
1998
1999 * fontset.c (fontset_face): Create a fallback fontset on demand
2000 (make_fontset): Don't create a fallback fontset here.
2001 (free_face_fontset): Free a fallback fontset (if any) too.
2002 (n_auto_fontsets): Delete this variable.
2003 (auto_fontset_alist): New variable.
2004 (new_fontset_from_font_name): Check auto_fontset_alist.
2005 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
2006 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
2007 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
2008 Defsubr Sfontset_list_all.
2009
2010 2003-10-24 Kenichi Handa <handa@m17n.org>
2011
2012 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
2013
2014 2003-10-23 Kenichi Handa <handa@m17n.org>
2015
2016 * fontset.c (Fnew_fontset): Check NAME more rigidly.
2017
2018 2003-10-17 Kenichi Handa <handa@m17n.org>
2019
2020 * editfns.c (Fgoto_char): Fix docstring.
2021
2022 2003-10-16 Kenichi Handa <handa@m17n.org>
2023
2024 * insdel.c (insert_from_gap): Adjust intervals correctly.
2025
2026 2003-10-12 Jason Rumney <jasonr@gnu.org>
2027
2028 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
2029 (pfnGetFontUnicodeRanges): New dynamically loaded function.
2030 (w32_initialize): Try to load it.
2031 (x_get_font_repertory): Use it if available.
2032 (w32_encode_char): Add shortcut for unicode output.
2033
2034 * w32fns.c (w32_load_system_font): Default charset to -1.
2035 (x_to_w32_charset): Match all fonts for unicode.
2036 (w32_to_x_charset): New parameter matching. Don't return partial
2037 or wildcard charsets.
2038 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
2039 (w32_codepage_for_font): Return CP_UNICODE for unicode.
2040 (w32_to_x_font): Match charset to real charset.
2041 (enum_font_cb2): Always list unicode versions.
2042
2043 * makefile.w32-in (temacs): Increase EMHEAP.
2044
2045 2003-10-11 Jason Rumney <jasonr@gnu.org>
2046
2047 * w32term.c (w32_encode_char): New charset parameter.
2048 font_info.encoding becomes encoding_type.
2049 (x_get_font_repertory): New function. Warning: stub only!
2050 (x_new_font): Return quickly if font already set.
2051 (x_new_fontset): fontsetname parameter is Lisp_Object.
2052 Use new fs_query_fontset. Try new_fontset_from_font_name. Use
2053 fontset_name for return value.
2054
2055 * w32term.h: Declare x_get_font_repertory.
2056
2057 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
2058 place of find_charset_in_text. Use encode_coding_object in place
2059 of encode_coding.
2060 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
2061 decode_coding.
2062
2063 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
2064 of x_new_fontset.
2065 (w32_load_system_font): Initialize charset as unicode.
2066 font_info.encoding becomes encoding_type.
2067 (w32_to_x_font): Use decode_coding_c_string in place of
2068 decode_coding.
2069 (x_to_w32_font): Use encode_coding_object in place of
2070 encode_coding.
2071 (syms_of_w32fns): Set get_font_repertory_func.
2072
2073 * w32console.c: Include character.h. Use terminal_encode_buffer
2074 from term.c.
2075 (write_glyphs): Use new version of encode_terminal_code. Use
2076 encode_coding_object in place of encode_coding.
2077
2078 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
2079 encoding becomes encoding_type.
2080
2081 * term.c (terminal_encode_buffer): Make externally visible.
2082
2083 * makefile.w32-in: Add character.h dependancies.
2084 (character.o, chartab.o): New targets.
2085
2086 2003-10-10 Kenichi Handa <handa@m17n.org>
2087
2088 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
2089 CODING_ID_EOL_TYPE..
2090
2091 2003-10-07 Andreas Schwab <schwab@suse.de>
2092
2093 * coding.c (produce_chars): Revert last change.
2094
2095 2003-10-06 Kenichi Handa <handa@m17n.org>
2096
2097 * charset.h (charset_unicode): Extern it.
2098
2099 * charset.c (string_xstring_p): Check by (C >= 0x100).
2100 (find_charsets_in_text): Format of the arc CHARSETS changed. New
2101 arg MULTIBYTE.
2102 (Ffind_charset_region, Ffind_charset_string): Adjusted for the
2103 change of find_charsets_in_text.
2104 (Fsplit_char): Fix doc. Never return unknown.
2105
2106 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
2107
2108 * coding.c (Fdefine_coding_system_alias): Update
2109 Vcoding_system_list.
2110
2111 * fontset.c (load_font_get_repertory): Pay attention to the case
2112 that ENCODING of a font is specified by a char-table.
2113
2114 * xterm.c (x_get_font_repertory): Handle the case that the
2115 encoding of font is other than Unicode.
2116
2117 2003-10-02 Kenichi Handa <handa@m17n.org>
2118
2119 * term.c (encode_terminal_code): Don't handle glyph-table. Check
2120 if a character is encodable by the terminal coding system. If
2121 not, produces proper number of `?'s. Update
2122 terminal_encode_buffer and terminal_encode_buf_size if necessary.
2123 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
2124
2125 2003-10-01 Kenichi Handa <handa@m17n.org>
2126
2127 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
2128 variables.
2129 (encode_terminal_code): Argument changed. Encode multiple
2130 characters at once. Store the result of encoding in
2131 terminal_encode_buffer.
2132 (write_glyphs): Adjusted for the change of encode_terminal_code.
2133 (insert_glyphs): Likewise.
2134 (term_init): Initialize terminal_encode_buffer and
2135 terminal_encode_buf_size.
2136
2137 * coding.c (consume_chars): If coding->src_object is nil, don't
2138 check annotation.
2139
2140 2003-09-30 Kenichi Handa <handa@m17n.org>
2141
2142 * character.c (char_string): Use ASCII_CHAR_P instead of
2143 SINGLE_BYTE_CHAR_P.
2144
2145 2003-09-30 Kenichi Handa <handa@m17n.org>
2146
2147 * xdisp.c (handle_auto_composed_prop): Check if the last
2148 characters of auto-composed region is newly composed with the
2149 following characters.
2150 (handle_composition_prop): Fix checking of point being inside
2151 composition.
2152
2153 2003-09-26 Kenichi Handa <handa@m17n.org>
2154
2155 * fns.c (concat): Don't change multibyteness of the result by
2156 concatenating an 8-bit character.
2157
2158 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
2159 multibyteness of the result when newelt is an 8-bit character.
2160
2161 2003-09-29 Dave Love <fx@gnu.org>
2162
2163 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
2164 EMACS_INT.
2165
2166 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
2167
2168 * xfaces.c (face_numeric_value): Declare dim size_t.
2169 (Finternal_lisp_face_equal_p): Remove unused f.
2170
2171 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
2172 (MATRIX_ROW): Remove unused vars.
2173 (draw_glyphs, x_insert_glyphs, fast_find_position)
2174 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
2175 byte/char counts.
2176
2177 * regex.c (regex_compile): Remove unused var.
2178
2179 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
2180
2181 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
2182 (Faccessible_keymaps, where_is_internal): Remove unused vars.
2183
2184 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
2185
2186 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
2187
2188 * fileio.c (Fwrite_region): Remove unused var.
2189
2190 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
2191 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
2192
2193 * composite.c (Fremove_list_of_text_properties): Declare.
2194
2195 * coding.c (inhibit_pre_post_conversion): Removed (unused).
2196 (alloc_destination, produce_chars): Use EMACS_INT for byte/char
2197 counts.
2198 (coding_inherit_eol_type): Remove unused attrs.
2199 (detect_coding): Cast arg of detect_eol.
2200
2201 * charset.c (syms_of_charset): Remove unused var p.
2202 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
2203 byte/char counts.
2204
2205 * casetab.c (set_case_table): Remove unused var.
2206
2207 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
2208 unsued vars.
2209
2210 2003-09-26 Dave Love <fx@gnu.org>
2211
2212 * xterm.c (x_bitmap_mask): Declare.
2213
2214 2003-09-17 Dave Love <fx@gnu.org>
2215
2216 * xterm.c (x_term_init): Fix type error.
2217
2218 * lisp.h: Add Funibyte_char_to_multibyte.
2219
2220 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
2221 (Fset_coding_system_priority): Doc fix.
2222
2223 * alloc.c: Sync with HEAD version.
2224
2225 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
2226
2227 * indent.c (check_composition): Make start and end EMACS_INT.
2228
2229 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
2230
2231 * xdisp.c (handle_composition_prop, check_point_in_composition):
2232 Make buffer positions EMACS_INT.
2233
2234 * composite.c (find_composition, run_composition_function)
2235 (update_compositions, Ffind_composition_internal): Make buffer
2236 positions EMACS_INT.
2237
2238 * composite.h (find_composition, update_compositions): Make
2239 position args EMACS_INT.
2240
2241 * keyboard.c (adjust_point_for_property): Make beg and end
2242 EMACS_INT.
2243
2244 * intervals.c (get_property_and_range)
2245 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
2246
2247 * unexalpha.c: Don't include varargs.h.
2248
2249 2003-09-16 Dave Love <fx@gnu.org>
2250
2251 * coding.h (ENCODE_UTF_8): New.
2252
2253 * Makefile.in (gtkutil.o): Depend on coding.h.
2254
2255 * coding.c (Fset_coding_system_priority): Doc fix.
2256
2257 2003-09-16 Kenichi Handa <handa@m17n.org>
2258
2259 * fileio.c (Finsert_file_contents): Call setup_coding_system in
2260 the case of auto saving.
2261
2262 2003-09-10 Andreas Schwab <schwab@suse.de>
2263
2264 * chartab.c (map_char_table): Protect `range' from GC.
2265 (map_char_table_for_charset): Likewise.
2266
2267 2003-07-09 Kenichi Handa <handa@m17n.org>
2268
2269 * coding.c (decode_coding_sjis): Check bytes more rigidly.
2270
2271 2003-06-26 Kenichi Handa <handa@m17n.org>
2272
2273 * fileio.c (choose_write_coding_system): Return a decided coding
2274 system.
2275 (Fwrite_region): Set Vlast_coding_system_used to the return value
2276 of choose_write_coding_system.
2277
2278 2003-06-06 Kenichi Handa <handa@m17n.org>
2279
2280 * charset.c (Fset_charset_priority): Pay attention to duplicated
2281 arguments.
2282
2283 * coding.c (QCcategory): New variable.
2284 (syms_of_coding): Defsym it. Set all elements of
2285 Vcoding_category_table and their symbol values.
2286 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
2287 coding-category-XXX, and coding-category-list.
2288 (Fdefine_coding_system_internal): Add category in the plist.
2289
2290 2003-06-05 Kenichi Handa <handa@m17n.org>
2291
2292 * callproc.c (Fcall_process): Handle carryover correctly.
2293
2294 * coding.c (decode_coding_iso_2022): Fix handling of invalid
2295 bytes.
2296 (raw_text_coding_system): Check NILP (coding_system).
2297 (coding_inherit_eol_type): Check NILP (coding_system) and
2298 NILP (parent).
2299 (consume_chars): Fix for the case of raw-text.
2300
2301 * process.c (read_process_output): Handle carryover correctly.
2302
2303 2003-06-02 Dave Love <fx@gnu.org>
2304
2305 * regex.c (re_search_2): Fix last change.
2306
2307 2003-05-30 Kenichi Handa <handa@m17n.org>
2308
2309 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
2310 target_multibyte. Even in a unibyte case, return a converted
2311 multibyte char.
2312 (GET_CHAR_AFTER): New macro.
2313 (PATFETCH): Translate via multibyte char.
2314 (HANDLE_UNIBYTE_RANGE): Delete this macro.
2315 (SETUP_MULTIBYTE_RANGE): New macro.
2316 (regex_compile): Setup compiled code so that its multibyteness
2317 matches that of a target. Fix the handling of "[X-YZ]" using
2318 SETUP_MULTIBYTE_RANGE.
2319 (analyse_first) <charset>: For filling fastmap for all multibyte
2320 characters, don't check by BASE_LEADING_CODE_P.
2321 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
2322 the same as RE_MULTIBYTE_P (bufp) now.
2323 (mutually_exclusive_p): Check by (! multibyte ||
2324 IS_REAL_ASCII (c)).
2325 (TARGET_CHAR_AND_LENGTH): Delete this macro.
2326 (TRANSLATE_VIA_MULTIBYTE): New macro.
2327 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
2328 It is the same as RE_MULTIBYTE_P (bufp) now.
2329 <exactn>: Translate via multibyte.
2330 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
2331 translate it.
2332 <charset, charset_not>: Fetch a character by
2333 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
2334 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
2335 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
2336 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
2337 by GET_CHAR_AFTER.
2338 (bcmp_translate): Likewise.
2339
2340 * search.c (compile_pattern): Check the member target_multibyte,
2341 not the member multibyte of buf.
2342
2343 * lread.c (read1): While reading a string, set force_singlebyte
2344 and force_multibyte correctly.
2345
2346 * charset.c (Fset_unibyte_charset): Fix setting up of
2347 unibyte_to_multibyte_table.
2348 (init_charset_once): Likewise.
2349
2350 2003-05-29 Kenichi Handa <handa@m17n.org>
2351
2352 * coding.c (setup_coding_system): If coding has
2353 post-read-conversion or pre-write-conversion, set
2354 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
2355 respectively.
2356 (decode_coding_gap): Run post-read-conversion if any.
2357
2358 * fileio.c (Finsert_file_contents): Even if we read into a
2359 unibyte buffer, check if we must decode the result or not.
2360
2361 2003-05-29 Kenichi Handa <handa@m17n.org>
2362
2363 * coding.c (make_conversion_work_buffer): Change the work buffer
2364 name to the same one as that of Emacs 21.
2365
2366 2003-05-28 Kenichi Handa <handa@m17n.org>
2367
2368 * coding.h (make_conversion_work_buffer): Prototype adjusted.
2369 (code_conversion_restore): Don't extern it.
2370
2371 * coding.c (detected_mask): Delete unused variable.
2372 (decode_coding_iso_2022): Pay attention to the byte sequence of
2373 CTEXT extended segment, and retain those bytes as is.
2374 (decode_coding_ccl): Delete unused variable `valids'.
2375 (setup_coding_system): Delete unused variable `category'.
2376 (consume_chars): Delete unused variable `category'. Make it work
2377 for non-multibyte case.
2378 (make_conversion_work_buffer): Argument changed.
2379 (saved_coding): Delete unused variable.
2380 (code_conversion_restore): Don't check saved_coding->destination.
2381 (code_conversion_save): New function.
2382 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
2383 instead of record_unwind_protect.
2384 (decode_coding_object, encode_coding_object): Likewise. Recover
2385 PT.
2386 (detect_coding_system): Delete unused variable `mask'.
2387 (Fdefine_coding_system_internal): Delete unsed vaiable id;
2388
2389 * fileio.c (kill_workbuf_unwind): New function.
2390 (Finsert_file_contents): On replacing, call
2391 make_conversion_work_buffer with correct args, and call
2392 record_unwind_protect with the first arg kill_workbuf_unwind.
2393
2394 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
2395
2396 2003-05-20 Kenichi Handa <handa@m17n.org>
2397
2398 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
2399 FONTSET_NAME.
2400 (fontset_add): Fix for the case that TO is less than TO1.
2401 (Ffontset_info): Don't use fallback fontset on checking the
2402 default fontset.
2403 (dump_fontset): New function for debugging.
2404
2405 * coding.c (Fdefine_coding_system_internal): Fix for the case that
2406 coding_type is Qcharset.
2407
2408 2003-05-07 Kenichi Handa <handa@m17n.org>
2409
2410 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
2411 (map_char_table): Don't inherit the value from the parent on
2412 initializing VAL. Adjusted for the above change.
2413
2414 2003-05-06 Kenichi Handa <handa@m17n.org>
2415
2416 * coding.c (Qsignature, Qendian): Delete these variables.
2417 (syms_of_coding): Don't initialize them.
2418 (CATEGORY_MASK_UTF_16_AUTO): New macro.
2419 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
2420 detect_info->found.
2421 (decode_coding_utf_16): Don't detect BOM here.
2422 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
2423 is NOT utf_16_without_bom.
2424 (setup_coding_system): For a coding system of type utf-16, check
2425 if the attribute :endian is Qbig or not (not nil or not), and set
2426 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
2427 (detect_coding): If coding type is utf-16 and BOM detection is
2428 required, detect it.
2429 (Fdefine_coding_system_internal): For a coding system of type
2430 utf-16, check if the attribute :endian is Qbig or not (not nil or
2431 not).
2432
2433 2003-05-06 Kenichi Handa <handa@m17n.org>
2434
2435 * coding.c (coding_set_source): Fix for the case that the current
2436 buffer is different from coding->src_object.
2437 (decode_coding_object): Don't use the conversion work buffer if
2438 DST_OBJECT is a buffer.
2439
2440 2003-05-04 Dave Love <fx@gnu.org>
2441
2442 * lread.c (read_emacs_mule_char) [len==2]: Index
2443 emacs_mule_charset correctly.
2444
2445 2003-02-16 Dave Love <fx@gnu.org>
2446
2447 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
2448 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
2449 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
2450 treated specially.)
2451 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
2452 (detected_mask): Remove Big5 bits.
2453
2454 2003-04-09 Kenichi Handa <handa@m17n.org>
2455
2456 The following changes are to make the font rescaling facility
2457 compatible with Emacs 21.
2458
2459 * xfaces.c (Vface_font_rescale_alist): Renamed from
2460 Vface_resizing_fonts.
2461 (struct font_name): Rename member resizing_ratio to rescale_ratio.
2462 (font_rescale_ratio): Renamed from font_resizing_ratio.
2463 (split_font_name): Set font->rescale_ratio.
2464 (better_font_p): Pay attention to font->rescale_ratio.
2465 (build_scalable_font_name): Likewise. Change RESX, and RESY
2466 fields.
2467 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
2468 variable.
2469
2470 2003-03-28 Kenichi Handa <handa@m17n.org>
2471
2472 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
2473 (Qutf_16_le): Remove these variables.
2474 (syms_of_coding): Don't DEFSYM them.
2475 (decode_coding_utf_16): Fix handling of BOM.
2476 (encode_coding_utf_16): Fix handling of BOM.
2477
2478 2003-03-14 Kenichi Handa <handa@m17n.org>
2479
2480 * fileio.c (Finsert_file_contents): On replacing, before decoding
2481 the file into the work buffer, set point of the work buffer to the
2482 end.
2483
2484 2003-02-13 Dave Love <fx@gnu.org>
2485
2486 * coding.c (Fcheck_coding_systems_region): Fix type errors.
2487
2488 2003-02-04 Dave Love <fx@gnu.org>
2489
2490 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
2491 and fix C types.
2492
2493 2003-01-31 Kenichi Handa <handa@m17n.org>
2494
2495 * xdisp.c (SKIP_GLYPHS): New macro.
2496 (set_cursor_from_row): Pay attention to string display properties.
2497
2498 * category.c (copy_category_entry): Fix for the case that RANGE
2499 is an integer.
2500
2501 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
2502
2503 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
2504 Qnil.
2505
2506 2003-01-30 Kenichi Handa <handa@m17n.org>
2507
2508 * charset.c (Fcharset_id_internal): New function.
2509 (syms_of_charset): Defsubr it.
2510
2511 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
2512 with the last arg charset_list acquired from coding.
2513 (Fdefine_coding_system_internal): For ccl-based coding system, fix
2514 the attribute coding_attr_ccl_valids.
2515
2516 * coding.h (enum define_coding_ccl_arg_index): Set the first
2517 member coding_arg_ccl_decoder to coding_arg_max.
2518
2519 * ccl.h (ccl_driver): Prototype adjusted.
2520
2521 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
2522 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
2523 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
2524 (Fccl_execute): Call ccl_driver with the last arg Qnil.
2525 (Fccl_execute_on_string): Likewise.
2526
2527 2003-01-11 Kenichi Handa <handa@m17n.org>
2528
2529 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
2530 call encode_char.
2531
2532 * charset.c (encode_char): Fix handling of methods SUBSET and
2533 SUPERSET.
2534
2535 * xterm.c (x_new_fontset): Fix previous change.
2536
2537 2003-01-10 Dave Love <fx@gnu.org>
2538
2539 * composite.c (syms_of_composite): Make composition_hash_table
2540 weak.
2541
2542 2003-01-10 Kenichi Handa <handa@m17n.org>
2543
2544 * dispextern.h (check_face_attributes, generate_ascii_font_name)
2545 (font_name_registry): Don't extern them.
2546 (split_font_name_into_vector, build_font_name_from_vector): Extern
2547 them.
2548
2549 * fontset.h (Qfontset): Don't extern it.
2550 (new_fontset_from_font_name): Extern it.
2551
2552 * fontset.c: Give 8 extra slots to fontset objects.
2553 (Qfontset_info): New variable.
2554 (syms_of_fontset): Defsym it.
2555 (FONTSET_FALLBACK): New macro.
2556 (fontset_face): Try also the default fontset.
2557 (make_fontset): Realize a fallback fontset from the default
2558 fontset.
2559 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
2560 using split_font_name_into_vector and build_font_name_from_vector.
2561 (Fset_fontset_font): Access the elements of font_spec by enum
2562 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
2563 name by using split_font_name_into_vector.
2564 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
2565 generate a proper font name from the fontset name. Update
2566 Vfontset_alias_alist.
2567 (n_auto_fontsets): New variable.
2568 (new_fontset_from_font_name): New function.
2569 (Ffont_info): Store the information about fonts generated from the
2570 default fontset in the first extra slot of the returned
2571 char-table.
2572
2573 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
2574 (font_name_registry): Function deleted.
2575 (split_font_name_into_vector): New function.
2576 (build_font_name_from_vector): New function.
2577 (font_list): The argument REGISTRY is now a list of registry
2578 names.
2579 (choose_face_font): If we are choosing an ASCII font, and ATTRS
2580 specifies an explicit font name, return the name as is. Make a
2581 list of registy names.
2582
2583 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
2584 of x_new_fontset.
2585 (Fx_create_frame): Don't call x_new_fontset here. Just use
2586 x_list_fonts to check the existence of fonts.
2587
2588 * xterm.h (x_new_fontset): Prototype adjusted.
2589
2590 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
2591 string. Use new_fontset_from_font_name to create a fontset from a
2592 font name.
2593
2594 2003-01-07 Dave Love <fx@gnu.org>
2595
2596 * Makefile.in: Fix some dependencies.
2597
2598 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
2599 set it to nil before returning.
2600
2601 * composite.c (update_compositions): Fix type error.
2602
2603 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
2604
2605 2003-01-07 Kenichi Handa <handa@m17n.org>
2606
2607 * xterm.c (x_new_font): Optimize for the case that the font is
2608 already set for the frame.
2609
2610 2003-01-06 Kenichi Handa <handa@m17n.org>
2611
2612 * chartab.c (char_table_ascii): Check if the char table contents
2613 is sub-char-table or not.
2614 (char_table_set): Fix argument to char_table_ascii.
2615 (char_table_set_range): Likewise.
2616
2617 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
2618 (detect_coding_utf_8, detect_coding_utf_16)
2619 (detect_coding_emacs_mule, detect_coding_iso_2022)
2620 (detect_coding_sjis, detect_coding_big5)
2621 (detect_coding_ccl, detect_coding_charset): Change argument MASK
2622 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
2623 sequence is valid in this coding system. Callers changed.
2624 (MAX_ANNOTATION_LENGTH): New macro.
2625 (ADD_ANNOTATION_DATA): New macro.
2626 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
2627 ADD_ANNOTATION_DATA. The format of annotation data changed.
2628 (ADD_CHARSET_DATA): New macro.
2629 (emacs_mule_char): New argument ID. Callers changed.
2630 (decode_coding_emacs_mule, decode_coding_iso_2022)
2631 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
2632 Produce charset annotation data in coding->charbuf.
2633 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
2634 to charset annotation data in coding->charbuf.
2635 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
2636 coding->common_flags if the coding system is iso-2022 based and
2637 uses designation.
2638 (produce_composition): Adjusted for the new annotation data
2639 format.
2640 (produce_charset): New function.
2641 (produce_annotation): Handle charset annotation.
2642 (handle_composition_annotation, handle_charset_annotation): New
2643 functions.
2644 (consume_chars): Handle charset annotation. Utilize the above two
2645 functions.
2646 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
2647 buffer, get the deleted text as a string and set
2648 coding->src_object to that string.
2649 (detect_coding, detect_coding_system): Use the new struct
2650 coding_detection_info.
2651
2652 * coding.h (struct coding_detection_info): New structure.
2653 (struct coding_system): Prototype of the member `detector'
2654 adjusted.
2655 (CODING_ANNOTATE_CHARSET_MASK): New macro.
2656
2657 2003-01-06 Kenichi Handa <handa@m17n.org>
2658
2659 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
2660
2661 2003-01-03 Dave Love <fx@gnu.org>
2662
2663 * keymap.c (apropos_predicate, apropos_accumulate): Declare
2664 static.
2665 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
2666 to new local and nullify apropos_accumulate before returning.
2667 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
2668
2669 2002-12-05 Kenichi Handa <handa@m17n.org>
2670
2671 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
2672 correctly.
2673
2674 2002-11-26 Dave Love <fx@gnu.org>
2675
2676 * fns.c (Flanginfo): Call synchronize_system_time_locale.
2677
2678 2002-11-07 Kenichi Handa <handa@m17n.org>
2679
2680 The following changes are to make character composition happen
2681 automatically on displaying.
2682
2683 * Makefile.in (lisp, shortlisp): Add composite.elc
2684
2685 * composite.h (Qauto_composed, Vauto_composition_function,
2686 Qauto_composition_function): Extern them.
2687
2688 * composite.c (Vcomposition_function_table,
2689 Qcomposition_function_table): Delete variables.
2690 (Qauto_composed, Vauto_composition_function,
2691 Qauto_composition_function): New variables.
2692 (run_composition_function): Don't call
2693 compose-chars-after-function.
2694 (update_compositions): Clear `auto-composed' text property.
2695 (compose_chars_in_text): Delete this function.
2696 (syms_of_composite): Staticpro Qauto_composed and
2697 Qauto_composition_function. Declare Vauto_composition_function as
2698 a Lisp variable.
2699
2700 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
2701
2702 * xdisp.c (it_props): Add an entry for Qauto_composed.
2703 (handle_auto_composed_prop): New function.
2704
2705 * xselect.c (selection_data_to_lisp_data): Don't call
2706 compose_chars_in_text.
2707
2708 2002-11-06 Dave Love <fx@gnu.org>
2709
2710 * keyboard.c (read_char): Modify checking around use of
2711 Vkeyboard_translate_table.
2712
2713 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
2714 and fix C types.
2715
2716 2002-11-06 Kenichi Handa <handa@m17n.org>
2717
2718 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
2719 the case that the last byte is '\r' correctly.
2720 (decode_coding_emacs_mule): Likewise.
2721 (decode_coding_iso_2022): Likewise.
2722 (decode_coding_sjis): Likewise.
2723 (decode_coding_big5): Likewise.
2724 (decode_coding_charset): Likewise.
2725 (produce_chars): Likewise.
2726 (decode_coding): Flushing out the unprocessed data correctly.
2727 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
2728 coding->mode.
2729
2730 2002-10-31 Dave Love <fx@gnu.org>
2731
2732 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
2733 XK_ISO... case.
2734 (xaw_scroll_callback): Revert last change.
2735
2736 2002-10-30 Kenichi Handa <handa@m17n.org>
2737
2738 * charset.c (Fset_charset_priority): Update
2739 Viso_2022_charset_list.
2740
2741 2002-10-29 Kenichi Handa <handa@m17n.org>
2742
2743 * xfaces.c (Vface_resizing_fonts): New variable.
2744 (struct font_name): New member `resizing_ratio'.
2745 (font_resizing_ratio): New function.
2746 (split_font_name): Set font->resizing_ratio.
2747 (better_font_p): Pay attention to font->resizing_ratio.
2748 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
2749 RESX, and RESY fields.
2750 (try_alternative_families): Try scalable fonts if
2751 Vscalable_fonts_allowed is not Qt.
2752 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
2753
2754 2002-10-29 Dave Love <fx@gnu.org>
2755
2756 * xterm.c (xaw_scroll_callback): Cast correctly.
2757
2758 2002-10-28 Dave Love <fx@gnu.org>
2759
2760 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
2761 (lispy_kana_keys): Comment out.
2762 (make_lispy_event) [XK_kana_A]: Comment out.
2763
2764 * xterm.c (xaw_scroll_callback): Cast call_data.
2765 (XTread_socket): Deal with ASCII keysyms.
2766 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
2767
2768 2002-10-27 Dave Love <fx@gnu.org>
2769
2770 * xterm.c (Vx_keysym_table): New.
2771 (syms_of_xterm): Initialize it.
2772 (XTread_socket): Use it.
2773 From head: Eliminate incorrect optimization that tried to avoid
2774 decoding the output of X*LookupString.
2775 (x_get_font_repertory): Delete charset declaration.
2776
2777 2002-10-16 Kenichi Handa <handa@m17n.org>
2778
2779 * coding.c (detect_coding): Fix previous change.
2780 (detect_coding_charset): If only ASCII bytes are found, return 0.
2781 (detect_coding_system): Fix previous change.
2782 (Fdefine_coding_system_internal): Setup CODING_ATTR_ASCII_COMPAT
2783 (attrs) correctly.
2784
2785 2002-10-15 Dave Love <fx@gnu.org>
2786
2787 * coding.c (Fcheck_coding_system): Doc fix.
2788
2789 * editfns.c (Finsert_byte): Return a proper value.
2790
2791 2002-10-14 Kenichi Handa <handa@m17n.org>
2792
2793 * coding.c (decode_coding): Fix args to translate_chars. Pay
2794 attention to Vstandard_translation_table_for_decode.
2795 (encode_coding): Fix args to translate_chars. Pay attention to
2796 Vstandard_translation_table_for_encode.
2797
2798 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
2799 SINGLE_BYTE_CHAR_P.
2800
2801 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
2802 not by SINGLE_BYTE_CHAR_P.
2803
2804 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
2805 SINGLE_BYTE_CHAR_P.
2806
2807 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
2808 SINGLE_BYTE_CHAR_P.
2809
2810 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
2811 by SINGLE_BYTE_CHAR_P.
2812
2813 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
2814 SINGLE_BYTE_CHAR_P.
2815
2816 2002-10-14 Dave Love <fx@gnu.org>
2817
2818 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
2819
2820 2002-10-10 Dave Love <fx@gnu.org>
2821
2822 * fns.c (Flanginfo): Fix typo.
2823
2824 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
2825
2826 2002-10-10 Kenichi Handa <handa@m17n.org>
2827
2828 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
2829 Don't update *mask when correctly detected.
2830 (detect_coding_utf_16): Likewise.
2831 (detect_coding_emacs_mule): Likewise.
2832 (detect_coding_iso_2022): Likewise.
2833 (detect_coding_sjis): Likewise.
2834 (detect_coding_big5): Likewise.
2835 (detect_coding_ccl): Likewise.
2836 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
2837 (detect_eol): Delete the argument CODING, and add the argument
2838 CATEGORY.
2839 (detect_coding): Adjusted for the changes above.
2840 (detect_coding_system): Likewise.
2841
2842 2002-10-09 Kenichi Handa <handa@m17n.org>
2843
2844 * character.c (char_string): Renamed from
2845 char_string_with_unification. Pay attention to
2846 CHAR_MODIFIER_MASK.
2847 (string_char): Renamed from string_char.
2848
2849 * character.h (CHAR_STRING): Call char_string if C is greater than
2850 MAX_3_BYTE_CHAR.
2851 (CHAR_STRING_ADVANCE): Likewise.
2852 (STRING_CHAR): Call string_char instead of
2853 string_char_with_unification.
2854 (STRING_CHAR_AND_LENGTH): Likewise.
2855 (STRING_CHAR_ADVANCE): Likewise.
2856
2857 2002-10-09 Dave Love <fx@gnu.org>
2858
2859 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
2860
2861 2002-10-07 Kenichi Handa <handa@m17n.org>
2862
2863 * keymap.c (push_key_description): Pay attention to
2864 force_multibyte.
2865
2866 * regex.c (re_search_2): Fix for the case of unibyte buffer.
2867
2868 2002-10-06 Dave Love <fx@gnu.org>
2869
2870 * charset.c (define_charset_internal): Rename `supprementary'.
2871
2872 * Makefile.in (lisp, shortlisp): Remove latin-N.
2873
2874 2002-10-05 Dave Love <fx@gnu.org>
2875
2876 * xfns.c (x_window, x_window): Use use_xim.
2877
2878 * xterm.c (use_xim): Initialize.
2879 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
2880 (x_term_init): Maybe set use_xim.
2881
2882 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
2883
2884 2002-10-01 Kenichi Handa <handa@m17n.org>
2885
2886 * search.c (search_buffer): Fix case-fold-search of multibyte
2887 characters.
2888 (boyer_moore): Rename the last argument to char_high_bits.
2889
2890 2002-09-27 Kenichi Handa <handa@m17n.org>
2891
2892 * xdisp.c (display_string): Fix for the case of zero width glyph.
2893
2894 * xfns.c (x_set_font): Change the error message of the case that
2895 x_new_fontset returns Qt.
2896
2897 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
2898 (Finternal_set_lisp_face_attribute): Use signal_error for the
2899 error of invalid fontset.
2900
2901 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
2902 fontset, return Qt.
2903
2904 2002-09-19 Kenichi Handa <handa@m17n.org>
2905
2906 * regex.c (re_search_2): Fix previous change.
2907
2908 2002-09-18 Kenichi Handa <handa@m17n.org>
2909
2910 * syntax.c (skip_syntaxes): Fix previous change.
2911
2912 2002-09-13 Kenichi Handa <handa@m17n.org>
2913
2914 * syntax.c (skip_chars): Fix previous change.
2915 (skip_syntaxes): Fix previous change.
2916
2917 2002-09-06 Dave Love <fx@gnu.org>
2918
2919 * config.in: Restore it.
2920
2921 2002-09-05 Dave Love <fx@gnu.org>
2922
2923 * config.in: Removed (now auto-generated).
2924
2925 * s/usg5-4.h: Fix last change.
2926
2927 * unexelf.c (unexec): Make .got handling not SGI-specific.
2928
2929 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
2930
2931 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
2932
2933 * keyboard.c (read_key_sequence): Fix type error.
2934
2935 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
2936 type error.
2937
2938 * fontset.c (fontset_add): Return Lisp_Object.
2939
2940 2002-09-03 Dave Love <fx@gnu.org>
2941
2942 * charset.h (charset_ordered_list_tick): Declare extern.
2943
2944 2002-09-03 Kenichi Handa <handa@m17n.org>
2945
2946 The following changes (and some of 2002-08-20 changes of mine) are
2947 for handling syntax, category, and case conversion for unibyte
2948 characters by converting them to multibyte on the fly. With these
2949 changes, we don't have to setup syntax and case tables for unibyte
2950 characters in each language environment.
2951
2952 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
2953 multibyte if necessary.
2954
2955 * bytecode.c (Fbyte_code): Likewise.
2956
2957 * character.h (LEADING_CODE_LATIN_1_MIN)
2958 (LEADING_CODE_LATIN_1_MAX): New macros.
2959 (unibyte_to_multibyte_table): Extern it.
2960 (unibyte_char_to_multibyte): New macro.
2961 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
2962 (CHAR_LEADING_CODE): New macro.
2963 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
2964
2965 * character.c (unibyte_to_multibyte_table): New variable.
2966 (unibyte_char_to_multibyte): Move to character.h and defined as
2967 macro.
2968 (multibyte_char_to_unibyte): If C is an eight-bit character,
2969 convert it to the corresponding byte value.
2970
2971 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
2972 not 1, singals an error. Update the elements of
2973 unibyte_to_multibyte_table.
2974 (init_charset_once): Initialize unibyte_to_multibyte_table.
2975 (syms_of_charset): Define the charset `iso-8859-1'.
2976
2977 * casefiddle.c (casify_object): Fix previous change.
2978
2979 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
2980 as is without converting it to unibyte. In a unibyte buffer,
2981 convert C to multibyte before checking the syntax.
2982
2983 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
2984
2985 * minibuf.c (Fminibuffer_complete_word): Use the macro
2986 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
2987
2988 * regex.h (struct re_pattern_buffer): New member target_multibyte.
2989
2990 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
2991 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
2992 that is zero, convert an eight-bit char to multibyte.
2993 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
2994 non-emacs case.
2995 (PATFETCH): Convert an eight-bit char to multibyte.
2996 (HANDLE_UNIBYTE_RANGE): New macro.
2997 (regex_compile): Setup the compiled pattern for multibyte chars
2998 even if the given regex string is unibyte. Use PATFETCH_RAW
2999 instead of PATFETCH in many places. To handle `charset'
3000 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
3001 only for ASCII chars.
3002 (analyse_first) <exactn>: Simplified because the compiled pattern
3003 is multibyte.
3004 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
3005 <charset>: Use CHAR_LEADING_CODE to get leading codes.
3006 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
3007 here.
3008 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
3009 multibyte always 1.
3010 (re_search_2) In emacs, set the locale variable multibyte to 1,
3011 otherwise to 0. New local variable target_multibyte. Check it
3012 to decide the multibyteness of STR1 and STR2. If
3013 target_multibyte is zero, convert unibyte chars to multibyte
3014 before translating and checking fastmap.
3015 (TARGET_CHAR_AND_LENGTH): New macro.
3016 (re_match_2_internal): In emacs, set the locale variable multibyte
3017 to 1, otherwise to 0. New local variable target_multibyte. Check
3018 it to decide the multibyteness of STR1 and STR2. Use
3019 TARGET_CHAR_AND_LENGTH to fetch a character from D.
3020 <charset, charset_not>: If multibyte is nonzero, check fastmap
3021 only for ASCII chars. Call bcmp_translate with
3022 target_multibyte, not with multibyte.
3023 <begline>: Declare the local variable C as `unsigned'.
3024 (bcmp_translate): Change the last arg name to target_multibyte.
3025
3026 * search.c (compile_pattern_1): Don't adjust the multibyteness of
3027 the regexp pattern and the matching target. Set cp->buf.multibyte
3028 to the multibyteness of the regexp pattern. Set
3029 cp->but.target_multibyte to the multibyteness of the matching
3030 target.
3031 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
3032 FETCH_STRING_CHAR_ADVANCE.
3033 (Freplace_match): Convert unibyte chars to multibyte.
3034
3035 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
3036 unibyte chars to multibyte.
3037 (back_comment): Likewise.
3038 (scan_words): Likewise.
3039 (skip_chars): The arg syntaxp is deleted, and the code for
3040 handling syntaxes is moved to skip_syntaxes. Callers changed.
3041 Fix the case that the multibyteness of STRING and the current
3042 buffer doesn't match.
3043 (skip_syntaxes): New function.
3044 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
3045 SINGLE_BYTE_CHAR_P.
3046 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
3047 chars to multibyte.
3048 (scan_lists): Likewise.
3049 (Fbackward_prefix_chars): Likewise.
3050 (scan_sexps_forward): Likewise.
3051
3052 2002-08-23 Kenichi Handa <handa@m17n.org>
3053
3054 * xfaces.c (QCfontset): New variable.
3055 (LFACE_FONTSET): New macro.
3056 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
3057 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
3058 (Finternal_set_lisp_face_attribute): Handle QCfontset.
3059 (Finternal_get_lisp_face_attribute): Likewise.
3060 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
3061 check also LFACE_FONTSET_INDEX.
3062 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
3063 attrs[LFACE_FONT_INDEX].
3064 (syms_of_xfaces): Intern and staticpro QCfontset.
3065
3066 * dispextern.h (enum lface_attribute_index): New member
3067 LFACE_FONTSET_INDEX.
3068
3069 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
3070
3071 2002-08-21 Kenichi Handa <handa@m17n.org>
3072
3073 * coding.c (coding_set_destination): Fix coding->destination for
3074 the case converting a region.
3075 (encode_coding_utf_8): Encode eight-bit chars as single byte.
3076 (encode_coding_object): Fix coding->dst_pos and
3077 coding->dst_pos_byte for the case converting a region.
3078
3079 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
3080
3081 * character.h (BYTE8_STRING): New macro.
3082
3083 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
3084
3085 2002-08-20 Kenichi Handa <handa@m17n.org>
3086
3087 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
3088 characters by octal form.
3089
3090 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
3091
3092 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
3093 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
3094 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
3095 (FETCH_CHAR_AS_MULTIBYTE): New macro.
3096
3097 * casetab.c (set_canon, set_identity, shuffle): Simplified.
3098
3099 * casefiddle.c (casify_object): Simplified. Handle the case that
3100 the case conversion change the byte length.
3101 (casify_region): Likewise
3102
3103 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
3104 macros.
3105
3106 * character.c (_fetch_multibyte_char_len): This variable deleted.
3107 (syms_of_character): Setup Vprintable_chars.
3108
3109 * editfns.c (Fchar_equal): Fix for the unibyte case.
3110 (Finsert_byte): New function.
3111 (syms_of_editfns): Defsubr it.
3112
3113 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
3114 of direct code 0x3ffff.
3115
3116 * search.c (Freplace_match): Fix for the unibyte case.
3117
3118 2002-08-19 Kenichi Handa <handa@m17n.org>
3119
3120 * lread.c (safe_to_load_p): Fix the logic.
3121
3122 * syntax.c (scan_words): Don't treat characters belonging to
3123 different scripts as constituting a word.
3124
3125 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
3126
3127 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
3128 script.
3129
3130 * emacs.c (main): In the case of --unibyte, instead of aborting on
3131 finding non-empty buffer, make it unibyte.
3132
3133 2002-08-18 Kenichi Handa <handa@m17n.org>
3134
3135 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
3136 to create a fontset.
3137
3138 2002-08-18 Dave Love <fx@gnu.org>
3139
3140 * character.c (Funibyte_char_to_multibyte): Doc fix.
3141
3142 * xfns.c [HAVE_STDLIB_H]: Fix last change.
3143
3144 2002-08-15 Kenichi Handa <handa@m17n.org>
3145
3146 * fontset.c (fontset_add): Make the type `int'.
3147 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
3148
3149 * character.c (unibyte_char_to_multibyte): Refer to
3150 charset_unibyte, not charset_primary.
3151 (multibyte_char_to_unibyte): Likewise.
3152 (Funibyte_char_to_multibyte): Likewise.
3153
3154 * charset.h: (charset_unibyte): Extern it instead of
3155 charset_primary.
3156
3157 * charset.c (charset_unibyte): Renamed from charset_primary.
3158 (Funibyte_charset): Renamed from Fprimary_charset.
3159 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
3160 (syms_of_charset): Adjusted for the above changes.
3161
3162 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
3163 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
3164 it->multibyte_p is zero.
3165
3166 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
3167 Extern deleted.
3168
3169 2002-08-08 Kenichi Handa <handa@m17n.org>
3170
3171 * coding.c (Fdefine_coding_system_internal): Fix category setting
3172 for a coding system of type iso-2022.
3173
3174 2002-08-02 Kenichi Handa <handa@m17n.org>
3175
3176 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
3177 -1.
3178
3179 2002-08-01 Kenichi Handa <handa@m17n.org>
3180
3181 * syntax.c (Vnext_word_boundary_function_table): New variable.
3182 (syms_of_syntax): Declare it as a Lisp variable.
3183 (scan_words): Call functions in Vnext_word_boundary_function_table
3184 if any.
3185
3186 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
3187
3188 * fontset.c (fs_load_font): If fontp->charset is not negative,
3189 return fontp without setting its members.
3190
3191 2002-07-31 Dave Love <fx@gnu.org>
3192
3193 * config.in: Generated with autoheader.
3194
3195 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
3196
3197 * m/sparc.h (HAVE_ALLOCA): Delete.
3198
3199 * s/irix6-5.h: Don't include strings.h.
3200 (bcopy, bzero, bcmp): Don't undef.
3201
3202 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
3203
3204 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
3205 (TIOCSIGSEND): Don't test IRIX6.
3206 (bcopy, bzero, bcmp): Define conditionally.
3207
3208 2002-07-31 Kenichi Handa <handa@m17n.org>
3209
3210 * buffer.c (Qas, Qmake, Qto): New variables.
3211 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
3212 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
3213
3214 * callproc.c (Fcall_process): Don't call insert_1_both directly if
3215 we are inserting a process output into a multibyte buffer.
3216
3217 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
3218 multibyte_char_to_unibyte.
3219
3220 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
3221 by the primary charset, make it eight-bit char.
3222 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
3223
3224 * charset.c: (charset_eight_bit, Qeight_bit_control): New
3225 variables.
3226 (charset_8_bit__control, charset_8_bit_graphic,
3227 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
3228 (define_charset_internal): New function.
3229 (syms_of_charset): Call define_charset_internal for pre-defined
3230 charsets.
3231
3232 * charset.h (charset_8_bit): Extern it.
3233
3234 * coding.c (make_conversion_work_buffer): Adjusted for the change
3235 of Fset_buffer_multibyte.
3236 (encode_coding_raw_text): Increment p0 in the loop.
3237
3238 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
3239
3240 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
3241 for the change of Fset_buffer_multibyte.
3242
3243 * fns.c (Fstring_to_multibyte): New function.
3244 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
3245
3246 2002-07-30 Dave Love <fx@gnu.org>
3247
3248 * xfns.c (x_put_x_image): Declare args.
3249
3250 * xfaces.c (font_name_registry, choose_face_font): Delete unused
3251 vars.
3252 (try_font_list): Declare an arg.
3253
3254 * xdisp.c (message2_nolog, set_message): Declare an arg.
3255
3256 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
3257
3258 * syntax.c (scan_sexps_forward): Declare an arg.
3259
3260 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
3261 Declare an arg.
3262
3263 * lisp.h (Fnew_fontset): Declare.
3264
3265 * keymap.c (push_key_description): Call CHARACTERP correctly.
3266
3267 * fontset.c (fontset_add): Declare args. Call make_number
3268 correctly.
3269 (face_for_char): Delete unused vars.
3270 (Fset_fontset_font): Doc fix. Delete unused vars.
3271
3272 * doc.c (Fsubstitute_command_keys): Delete unused vars.
3273
3274 * composite.c (update_compositions): Declare arg.
3275
3276 * cm.c (calccost, cmgoto): Declare args.
3277
3278 * charset.c: Remove `emacs' conditional. Doc fixes.
3279 (map_char_table_for_charset): Declare.
3280
3281 * character.c (syms_of_character) <translation-table-vector>: Doc
3282 fix.
3283
3284 * ccl.c: Remove `emacs' conditional. Include hash table stuff
3285 from trunk.
3286
3287 2002-07-26 Kenichi Handa <handa@m17n.org>
3288
3289 The following changes are to allow specifying multiple font
3290 patterns for a character range (specified by script or charset).
3291
3292 * Makefile.in (abbrev.o): Depend on syntax.h.
3293 (xfaces.o): Depend on charset.h.
3294
3295 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
3296 SINGLE_BYTE_CHAR_P.
3297
3298 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
3299
3300 * character.h (Vchar_script_table): Extern it.
3301
3302 * character.c (Vscript_alist): This variable deleted.
3303 (Vchar_script_table, Qchar_script_table): New variable.
3304 (syms_of_character): Declare Vchar_script_table as a lisp variable
3305 and initialize it.
3306
3307 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
3308 have property char-table-extra-slots, make no extra slot.
3309
3310 * dispextern.h (struct face): Member `charset' deleted.
3311 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
3312 SINGLE_BYTE_CHAR_P.
3313 (FACE_FOR_CHAR): Likewise.
3314 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
3315 prototypes
3316 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
3317 fixed.
3318 (generate_ascii_font_name): Renamed from generate_ascii_font.
3319
3320 * fontset.h (get_font_repertory_func): New prototype.
3321 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
3322 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
3323
3324 * fontset.c (Qprepend, Qappend): New variables.
3325 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
3326 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
3327 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
3328 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
3329 (fontset_ref_and_range, fontset_add, reorder_font_vector)
3330 (load_font_get_repertory): New functions.
3331 (fontset_set): This function deleted.
3332 (fontset_face): New arg FACE. Return face ID, not face.
3333 Completely re-written to handle new fontset structure. Caller
3334 changed.
3335 (free_face_fontset): Use ASET istead of AREF (X) = Y.
3336 (face_for_char): Don't call lookup_face.
3337 (make_fontset_for_ascii_face): New arg FACE.
3338 (fs_load_font): New arg CHARSET_ID. Don't check
3339 Vfont_encoding_alist here.
3340 (find_font_encoding): New function.
3341 (list_fontsets): Use STRINGP, not ! NILP.
3342 (accumulate_script_ranges): New function.
3343 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
3344 re-written to handle new fontset structure.
3345 (Ffontset_font): Return a copy of element.
3346 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
3347 docstring of font-encoding-alist.
3348
3349 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
3350 (Fset_fotset_font): Fix arguments to 5.
3351
3352 * msdos.c (XMenuActivate): Adjuted for the change of
3353 lookup_derived_face.
3354
3355 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
3356 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
3357 (highlight_trailing_whitespace): Adjusted for the change of
3358 lookup_named_face.
3359
3360 * xfaces.c: Include charset.h.
3361 (load_face_font): Argument C deleted. Caller changed.
3362 (generate_ascii_font_name): Renamed from generate_ascii_font.
3363 (font_name_registry): New function.
3364 (cache_face): Store ascii faces before non-ascii faces in buckets.
3365 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
3366 Lookup only ascii faces.
3367 (lookup_non_ascii_face): New function.
3368 (lookup_named_face): Argument C deleted. Caller changed.
3369 (lookup_derived_face): Argument C deleted. Caller changed.
3370 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
3371 a string, just call font_list with it.
3372 (choose_face_font): Arguments FACE and C deleted. New arg
3373 FONT_SPEC. Caller changed.
3374 (realize_face): Arguments C and BASE_FACE deleted. Caller
3375 (realize_x_face): Likewise.
3376 (realize_non_ascii_face): New function.
3377 (realize_x_face): Call load_face_font here.
3378 (realize_tty_face): Argument C deleted. Caller changed.
3379 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
3380 get a face ID.
3381 (dump_realized_face): Don't print charset of FACE.
3382
3383 * xfns.c (x_set_font): Always call x_new_fontset and
3384 store_frame_parameter.
3385 (Fx_create_frame): Call x_new_fontset, not x_new_font.
3386 (syms_of_xfns): Set get_font_repertory_func to
3387 x_get_font_repertory.
3388
3389 * xterm.h (x_get_font_repertory): Extern it.
3390
3391 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
3392 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
3393 it->multibyte_p is zero.
3394 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
3395 (x_new_fontset): If FONTSETNAME doesn't match any existing
3396 fontsets, create a new one.
3397 (x_get_font_repertory): New function.
3398
3399 2002-07-25 Kenichi Handa <handa@m17n.org>
3400
3401 * coding.c (Ffind_coding_systems_region_internal): Detect an
3402 ASCII only string correctly.
3403
3404 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
3405 version is 0.
3406
3407 2002-07-24 Kenichi Handa <handa@m17n.org>
3408
3409 * lread.c: Include "coding.h".
3410 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
3411 load_each_byte, unread_char): New variables.
3412 (readchar_backlog): This variable deleted.
3413 (readchar): Return a character unless load_each_byte is nonzero.
3414 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
3415 cons. If unread_char is not -1, simply return it.
3416 (unreadchar): Handle the case that readcharfun is
3417 Qget_emacs_mule_file_char or a cons. Set unread_char if
3418 necessary.
3419 (read_multibyte): This function deleted.
3420 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
3421 (read_emacs_mule_char): New functions.
3422 (Fload): Even if the file doesn't have the extention ".elc", if
3423 safe_to_load_p returns a positive version number, assume that the
3424 file contains bytecompiled code. If the version is less than 22,
3425 load the file while decoding multibyte sequences by emacs-mule.
3426 (readevalloop): Don't use readchar_backlog.
3427 (Fread): Likewise. Pay attention to the case that STREAM is a
3428 cons.
3429 (Fread_from_string): Pay attention to the case that STREAM is a
3430 cons.
3431 (read_escape): The arg BYTEREP deleted.
3432 (read1): Set load_each_byte to 1 temporarily while handling
3433 #@NUMBER. Don't call read_multibyte.
3434 (read_vector): Call Fread with a cons. If readcharfun is
3435 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
3436 (read_list): If doc_reference is 2, make the cdr part string as
3437 unibyte.
3438 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
3439 and Qload_force_doc_strings.
3440
3441 2002-07-23 Kenichi Handa <handa@m17n.org>
3442
3443 * xdisp.c (face_before_or_after_it_pos): Call
3444 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
3445
3446 2002-07-22 Kenichi Handa <handa@m17n.org>
3447
3448 * character.h (TRAILING_CODE_P): New macro.
3449 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
3450 (string_char_with_unification): Fix prototype.
3451 (Vscript_alist): Extern it.
3452
3453 * character.c (Vscript_alist): New variable.
3454 (string_char_with_unification): Add `const' to local variables.
3455 (str_as_unibyte): Likewise.
3456 (string_escape_byte8): Likewise.
3457 (syms_of_character): Declare script-alist as a Lisp variable.
3458
3459 * charset.h (Vcharset_ordered_list): Extern it.
3460 (charset_ordered_list_tick): Extern it.
3461 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
3462 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
3463 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
3464 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
3465 (Funify_charset): Adjusted for the change of Funify_charset.
3466
3467 * charset.c (charset_ordered_list_tick): New variable.
3468 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
3469 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
3470 deunify intead of unify a charset.
3471 (string_xstring_p): Add `const' to local variables.
3472 (find_charsets_in_text): Add `const' to arguemnts and local
3473 variables.
3474 (encode_char): Adjusted for the change of Funify_charset. Fix
3475 detecting of invalid code.
3476 (Fset_charset_priority): Increment charset_ordered_list_tick.
3477 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
3478 and TO_CODE.
3479
3480 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
3481 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
3482 deleted. Callers changed to use
3483 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
3484 (decode_coding_ccl): Add `const' to local variables.
3485 (consume_chars): Likewise.
3486 (Ffind_coding_systems_region_internal): Likewise.
3487 (Fcheck_coding_systems_region): Likewise.
3488
3489 * print.c (print_object): Use octal form for printing the
3490 contents of a bool vector.
3491
3492 2002-07-18 Dave Love <fx@gnu.org>
3493
3494 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
3495 <version == 20>: Refuse to load.
3496
3497 2002-07-17 Dave Love <fx@gnu.org>
3498
3499 * fns.c: Move coding.h.
3500 (Qcodeset, Qdays, Qmonths): New.
3501 (concat): Use CHARACTERP instead of INTERGERP.
3502 (Flocale_codeset): Deleted.
3503 (Flanginfo): New function.
3504 (syms_of_fns): Changed accordingly.
3505
3506 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
3507
3508 2002-07-16 Dave Love <fx@gnu.org>
3509
3510 * casetab.c (init_casetab_once, init_casetab_once): Fix
3511 CHAR_TABLE_SET call.
3512
3513 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
3514
3515 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
3516
3517 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
3518 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
3519 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
3520
3521 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
3522
3523 * coding.c (ENCODE_DESIGNATION, decode_eol)
3524 (make_conversion_work_buffer, code_conversion_restore)
3525 (Fdefine_coding_system_internal): Convert Lisp types.
3526 (code_conversion_restore): Use EQ, not ==.
3527 (Fencode_coding_string): Fix code_convert_string call.
3528
3529 * coding.h (code_convert_region): Fix prototype.
3530
3531 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
3532
3533 * fontset.c (fontset_ref, fontset_set, fs_load_font)
3534 (Ffontset_info): Convert Lisp types.
3535
3536 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
3537
3538 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
3539
3540 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
3541
3542 * chartab.c: Include "...h", not <...h> in some cases.
3543
3544 * callproc.c (Fcall_process): Remove unused variables.
3545
3546 2002-07-12 Dave Love <fx@gnu.org>
3547
3548 * coding.c (Fset_coding_system_priority): Allow null arg list.
3549
3550 2002-07-03 Dave Love <fx@gnu.org>
3551
3552 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
3553 (Fself_insert_and_exit): Use CHARACTERP.
3554
3555 * callproc.c (Fcall_process): Remove unused vars.
3556
3557 * xterm.c (XTread_socket): Add extra dead keysyms.
3558
3559 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
3560
3561 * dispextern.h: Remove prototypes for redraw_frame,
3562 redraw_garbaged_frames.
3563
3564 * cmds.c (Fself_insert_command): Use CHARACTERP.
3565
3566 * chartab.c (make_sub_char_table): Remove unused var.
3567 (Fset_char_table_default, Fmap_char_table): Doc fix.
3568
3569 * keymap.c (access_keymap): Remove generic char code.
3570 (push_key_description): Use CHARACTERP.
3571
3572 2002-07-01 Dave Love <fx@gnu.org>
3573
3574 * charset.c: Doc fixes.
3575 (Funify_charset): Extra checking.
3576
3577 2002-06-24 Dave Love <fx@gnu.org>
3578
3579 * lread.c: Remove some unused variables.
3580 (safe_to_load_p): If safe, return the magic number version byte.
3581 (Fload): Maybe use load-with-code-conversion.
3582
3583 2002-06-12 Kenichi Handa <handa@m17n.org>
3584
3585 * category.c (Fmodify_category_entry): Don't modify the contents
3586 of category_set for characters out of the range. Avoid
3587 unnecessary modification.
3588
3589 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
3590 Vchar_unify_table. The default value of the table is now nil.
3591
3592 * character.c (syms_of_character): Setup Vchar_width_table for
3593 eight-bit-control and raw-byte chars.
3594
3595 * charset.h (enum define_charset_arg_index): Delete
3596 charset_arg_parents and add charset_arg_subset and
3597 charset_arg_superset.
3598 (enum charset_attr_index): Delete charset_parents and add
3599 charset_subset and charset_superset.
3600 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
3601 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
3602 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
3603 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
3604 (CHARSET_SUPERSET): New macros.
3605 (charset_work): Extern it.
3606 (ENCODE_CHAR): Use charset_work.
3607 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
3608 (map_charset_chars): Extern it.
3609
3610 * charset.c (load_charset_map): Set the default value of encoder
3611 and deunifier char-tables to nil.
3612 (map_charset_chars): Argument changed. Callers changed. Use
3613 map_char_table_for_charset instead of map_char_table.
3614 (Fmap_charset_chars): New optional args from_code and to_code.
3615 (Fdefine_charset_internal): Adjusted for the change of
3616 `define-charset' (:parents -> :subset or :superset).
3617 (charset_work): New variable.
3618 (encode_char): Adjusted for the change of
3619 Fdefine_charset_internal.
3620 (syms_of_charset): Likewise.
3621 (Ffind_charset_string): Setup the vector `charsets' correctly.
3622
3623 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
3624 the previous change.
3625 (char_table_ref_and_range): Adjusted for the above change.
3626 (map_sub_char_table_for_charset): New function.
3627 (map_char_table_for_charset): New function.
3628
3629 * keymap.c (describe_vector): Handle a char-table directly here.
3630 (describe_char_table): Deleted.
3631
3632 * lisp.h (map_charset_chars): Deleted.
3633
3634 2002-06-11 Dave Love <fx@gnu.org>
3635
3636 * fns.c (count_combining): Comment out (unused).
3637 (Flocale_codeset): New.
3638 (syms_of_fns): Defsubr it.
3639
3640 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
3641 (size_t): Removed.
3642
3643 2002-06-06 Dave Love <fx@gnu.org>
3644
3645 * Makefile.in (chartab.o): Depend on charset.h
3646
3647 2002-06-03 Kenichi Handa <handa@m17n.org>
3648
3649 * character.c (syms_of_character): Set the default value of
3650 Vprintable_chars to Qnil.
3651
3652 2002-05-31 Dave Love <fx@gnu.org>
3653
3654 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
3655
3656 2002-05-31 Kenichi Handa <handa@m17n.org>
3657
3658 * charset.c (load_charset_map): Handle the case that from < to
3659 correctly.
3660
3661 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
3662 chars.
3663 (encode_coding_iso_2022): Likewise.
3664 (encode_coding_sjis): Likewise.
3665 (encode_coding_big5): Likewise.
3666 (encode_coding_charset): Likewise.
3667
3668 2002-05-30 Kenichi Handa <handa@m17n.org>
3669
3670 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
3671 not bytecompiled now.
3672 (shortlisp): Likewise.
3673
3674 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
3675 (charset_jisx0208): New variables.
3676 (Fdefine_charset_internal): Setup them if appropriate.
3677 (init_charset_once): Initialize them to -1.
3678
3679 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
3680 charset_jisx0208): Extern them.
3681
3682 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
3683 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
3684 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
3685 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
3686 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
3687 and CODING_ISO_FLAG_USE_OLDJIS.
3688 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
3689 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
3690 (encode_coding_iso_2022): Change the 1st arg to
3691 ENCODE_ISO_CHARACTER to a variable.
3692
3693 2002-05-29 Kenichi Handa <handa@m17n.org>
3694
3695 * charset.h (enum define_charset_arg_index): New enums
3696 charset_arg_min_code and charset_arg_max_code.
3697 (struct charset): New member char_index_offset.
3698
3699 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
3700 into account.
3701 (INDEX_TO_CODE_POINT): Likewise.
3702 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
3703 args[charset_arg_max_code]. Setup charset.char_index_offset.
3704 (syms_of_charset): Fix args to Fdefine_charset_internal.
3705
3706 2002-05-27 Dave Love <fx@gnu.org>
3707
3708 * coding.c (decode_coding_utf_8): Reject overlong sequences.
3709
3710 2002-05-26 Dave Love <fx@gnu.org>
3711
3712 * coding.c: Doc fixes.
3713 (Fcoding_system_aliases): Fix return value.
3714 (Qmac): Remove (duplicated) definition.
3715
3716 2002-05-25 Dave Love <fx@gnu.org>
3717
3718 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
3719 functions.
3720
3721 * character.c (Fstring): Doc fix.
3722
3723 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
3724
3725 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
3726 ids.
3727 (font-encoding-alist): Doc fix.
3728
3729 2002-05-24 Dave Love <fx@gnu.org>
3730
3731 * term.c (costs_set): Declare static, non-initialized for pcc.
3732 (encode_terminal_code): Remove ensued var.
3733
3734 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
3735 for K&R.
3736
3737 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
3738
3739 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
3740 (suffixes): Moved out of make_subsidiaries for K&R.
3741
3742 * charset.c (map_charset_chars): Fix c_function declaration for
3743 K&R.
3744
3745 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
3746
3747 2002-05-23 Dave Love <fx@gnu.org>
3748
3749 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
3750
3751 * category.c (Fmodify_category_entry): Doc fix. Remove unused
3752 vars.
3753
3754 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
3755
3756 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
3757
3758 * coding.c (Fdefine_coding_system_internal): Fix previous change.
3759 (decode_coding_charset): Workaround for the bug of GCC 2.96.
3760
3761 2002-05-23 Kenichi Handa <handa@m17n.org>
3762
3763 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
3764 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
3765 (shortlisp): Likewise.
3766
3767 2002-05-22 Kenichi Handa <handa@m17n.org>
3768
3769 * coding.c (decode_coding_charset): Adjusted for the change of
3770 Fdefine_coding_system_internal.
3771 (Fdefine_coding_system_internal): For a coding system of
3772 `charset' type, store a list of charset IDs in
3773 `charset_attr_charset_valids' element of coding attributes.
3774
3775 * charset.c (Fmake_char): Fix previous change.
3776
3777 2002-05-21 Kenichi Handa <handa@m17n.org>
3778
3779 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
3780 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
3781 changed. Handle 2-byte and 3-byte charsets correctly.
3782 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
3783 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
3784 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
3785 (DECODE_EMACS_MULE_21_COMPOSITION): Call
3786 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
3787 sequence.
3788 (decode_coding_emacs_mule): Handle composition correctly. Rewind
3789 `src' and `consumed_chars' correctly before calling
3790 emacs_mule_char.
3791 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
3792 and alt&rule composition.
3793 (decode_coding_iso_2022): Handle composition correctly.
3794 (init_coding_once): Setup emacs_mule_bytes for private charsets.
3795
3796 * charset.c (Fdefine_charset_internal): Fix bug for the case of
3797 re-defining a charset. If the charset has :emacs-mule-id, setup
3798 emacs_mule_bytes.
3799 (Fmake_char): If CODE1 is nil, use the minimum code of the
3800 charset.
3801
3802 2002-05-20 Kenichi Handa <handa@m17n.org>
3803
3804 * coding.c (encode_coding_iso_2022): If coding requires safe
3805 encoding, produce a character specified by
3806 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
3807 (encode_coding_sjis): Likewise.
3808 (encode_coding_big5): Likewise.
3809 (encode_coding_charset): Likewise.
3810
3811 2002-05-17 Dave Love <fx@gnu.org>
3812
3813 * xterm.c (XSetIMValues): Declare.
3814
3815 * process.c: Conditionally include sys/wait.h, pty.h.
3816
3817 * print.c (print_object): Fix print format for 64-bit
3818 systems.
3819
3820 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
3821 systems.
3822
3823 * buffer.c (emacs_strerror): Declare.
3824 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
3825 from trunk.
3826
3827 * fontset.c (Fclear_face_cache): Declare.
3828 (accumulate_font_info): Commented-out (unused).
3829 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
3830 variables.
3831
3832 * character.h (string_escape_byte8): Declare.
3833
3834 * charset.c (load_charset_map, load_charset_map_from_file): Remove
3835 unused vars.
3836 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
3837 (Fmap_charset_chars): Doc fix.
3838
3839 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
3840 Removed.
3841 (Fset_coding_system_priority, Fset_coding_system_priority)
3842 (Fdefine_coding_system_internal): Doc fix.
3843
3844 2002-05-16 Dave Love <fx@gnu.org>
3845
3846 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
3847
3848 2002-05-16 Kenichi Handa <handa@m17n.org>
3849
3850 * character.c (string_escape_byte8): Make multibyte string with
3851 correct size.
3852
3853 * charset.c (Fmake_char): Delete unnecessary code.
3854
3855 2002-05-14 Kenichi Handa <handa@m17n.org>
3856
3857 * xfns.c (x_encode_text): Allocate coding.destination here, and
3858 call encode_coding_object with dst_object Qnil.
3859
3860 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
3861 multibyte form correctly.
3862
3863 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
3864 against Vfont_encoding_alist.
3865
3866 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
3867 handling of charset list.
3868 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
3869 (decode_coding_object): Move point to coding->dst_pos before
3870 calling post-read-conversion function.
3871 (encode_coding_object): Give correct arguments to
3872 pre-write-conversion. Ignore the return value of
3873 pre-write-conversion function. Pay attention to the case that
3874 pre-write-conversion changes the current buffer. If dst_object is
3875 Qt, even if coding->src_bytes is zero, allocate at least one byte
3876 to coding->destination.
3877
3878 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
3879
3880 * charset.c (Fmake_char): Make it more backward compatible.
3881 (Fmap_charset_chars): Fix docstring.
3882
3883 2002-05-13 Dave Love <fx@gnu.org>
3884
3885 * coding.c: Doc fixes.
3886 (Fdefine_coding_system_alias): Use names, not symbols, in
3887 coding-system-alist.
3888
3889 2002-05-13 Kenichi Handa <handa@m17n.org>
3890
3891 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
3892 of calling free_realized_face.
3893
3894 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
3895
3896 * charset.c (load_charset_map): Fix previous change.
3897 (read_hex): Don't treat SPC as a comment starter.
3898 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
3899 -1.
3900 (Fdecode_char): Fix typo.
3901
3902 2002-05-10 Kenichi Handa <handa@m17n.org>
3903
3904 * charset.h (struct charset): New member `code_space_mask'.
3905
3906 * coding.c (coding_set_source): Delete the local variable
3907 beg_byte.
3908 (encode_coding_charset): Delete the local variable charset.
3909 (Fdefine_coding_system_internal): Likewise.
3910 (Fdefine_coding_system_internal): Setup
3911 attrs[coding_attr_charset_valids] correctly.
3912
3913 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
3914 member to check if CODE is valid or not.
3915 (Fdefine_charset_internal): Initialize `code_space_mask' member.
3916 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
3917 is within the range of charset->min_code and carset->max_code.
3918
3919 2002-05-09 Dave Love <fx@gnu.org>
3920
3921 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
3922
3923 * dispextern.h (generate_ascii_font): Fix return type.
3924
3925 * xfaces.c (generate_ascii_font): Fix arg declaration.
3926
3927 * coding.c (coding_inherit_eol_type)
3928 (Fset_terminal_coding_system_internal)
3929 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
3930
3931 2002-05-08 Kenichi Handa <handa@m17n.org>
3932
3933 * coding.c (decode_coding_charset, encode_coding_charset): Handle
3934 multiple charsets correctly.
3935
3936 2002-05-07 Kenichi Handa <handa@m17n.org>
3937
3938 * search.c (boyer_moore): Fix handling of mulitbyte character
3939 translation.
3940
3941 * xdisp.c (display_mode_element): When the variable `elt' is
3942 changed, update `this' and `lisp_string'.
3943
3944 2002-05-07 Kenichi Handa <handa@m17n.org>
3945
3946 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
3947
3948 * callproc.c (Fcall_process): Be sure to give the current buffer
3949 to decode_coding_c_string. Update PT and PT_BYTE after the
3950 insertion.
3951
3952 * charset.c (struct charset_map_entries): New struct.
3953 (load_charset_map): Renamed from parse_charset_map. New args
3954 entries and n_entries. Caller changed.
3955 (load_charset_map_from_file): Renamed from load_charset_map.
3956 Caller changed. New arg control_flag. Call load_charset_map at
3957 the tail.
3958 (load_charset_map_from_vector): New function.
3959 (Fdefine_charset_internal): Setup charset.compact_codes_p.
3960 (encode_char): If the charset is compact, change a character index
3961 to a code point.
3962
3963 * coding.c (coding_alloc_by_making_gap): Check the case that the
3964 source and destination are the same correctly.
3965 (decode_coding_raw_text): Set coding->consumed_char and
3966 coding->consumed to 0.
3967 (produce_chars): If coding->chars_at_source is nonzero, update
3968 coding->consumed_char and coding->consumed before calling
3969 alloc_destination.
3970 (Fdefine_coding_system_alias): Register ALIAS in
3971 Vcoding_system_alist.
3972 (syms_of_coding): Define `no-convesion' coding system at the tail.
3973
3974 * fileio.c (Finsert_file_contents): Set coding_system instead of
3975 val. If the current buffer is multibyte, always call
3976 decode_coding_gap.
3977
3978 * xfaces.c (try_font_list): Give higher priority to fontset's
3979 family than face's family.
3980
3981 2002-04-18 Kenichi Handa <handa@m17n.org>
3982
3983 * callproc.c (Fcall_process): Be sure to give the current buffer
3984 to decode_coding_c_string.
3985
3986 * xfaces.c (try_font_list): Give a family specified in a fontset
3987 higher priority than a family specified in a face.
3988
3989 2002-04-09 Kenichi Handa <handa@m17n.org>
3990
3991 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
3992 Fix arguments to insert_from_buffer.
3993
3994 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
3995
3996 2002-03-11 Kenichi Handa <handa@m17n.org>
3997
3998 * coding.c (produce_chars): Set the variable `multibytep' correctly.
3999 (decode_coding_gap): Set coding->dst_multibyte correctly.
4000
4001 2002-03-07 Kenichi Handa <handa@m17n.org>
4002
4003 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
4004 (decode_coding_utf_16): Fix converting high and low bytes to
4005 code-point.
4006 (encode_coding_utf_16): Substitute coding->default_char for
4007 non-Unicode characters.
4008 (decode_coding): Don't call record_insert here.
4009 (setup_coding_system): Initialize `surrogate' of
4010 coding->spec.utf_16 to 0.
4011 (EMIT_ONE_BYTE): Fix for multibyte case.
4012
4013 * insdel.c (insert_from_gap): Call record_insert.
4014
4015 2002-03-04 Kenichi Handa <handa@m17n.org>
4016
4017 * casefiddle.c (casify_region): Fix multibyte case.
4018
4019 * character.c (c_string_width): Add return type `int'.
4020 (char_string_with_unification): Arg ADVANCED deleted.
4021
4022 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
4023 (CHAR_STRING): Adjusted for the change of
4024 char_string_with_unification.
4025 (CHAR_STRING_ADVANCE): Make it do-while statement.
4026
4027 * chartab.c (sub_char_table_set_range): Optimized for the case
4028 DEPTH == 3. Add workaround code for a GCC optimization bug.
4029
4030 * charset.c (parse_charset_map): Remove an unused variable.
4031
4032 * coding.c: Delete unused variables.
4033
4034 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
4035 earlier. If inserted is zero and the coding system doesn't
4036 require flushing, don't call decode_coding_gap.
4037
4038 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
4039
4040 2002-03-01 Kenichi Handa <handa@m17n.org>
4041
4042 The following changes are for using Unicode as an internal
4043 character model, and use UTF-8 format for buffer/string
4044 representation.
4045
4046 * .gdbinit (xchartable): Adjusted for the change of char table
4047 structure.
4048 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
4049
4050 * Makefile.in (obj): Add character.o and chartab.o.
4051 (lisp, shortlisp): Remove utf-8.elc:
4052 (*.o): For many files, change dependency on charset.h to
4053 character.h, and add dependency on character.h.
4054 (character.o, chartab.o): New targets.
4055
4056 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
4057 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
4058 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
4059 of "charset.h".
4060
4061 * dired.c, filelock.c: Include "character.h".
4062
4063 * alloc.c: Include "character.h" instead of "charset.h".
4064 (Fmake_char_table): Moved to chartab.c.
4065 (make_sub_char_table): Likewise.
4066 (syms_of_alloc): Remove defsubr for Smake_char_table.
4067
4068 * buffer.c: Include "character.h" instead of "charset.h", don't
4069 include "coding.h".
4070 (Fset_buffer_multibyte): Adjuted for UTF-8.
4071
4072 * buffer.h: EXFUN Fbuffer_live_p.
4073
4074 * callproc.c: Include "character.h" instead of "charset.h".
4075 (Fcall_process): Big change for the new code-conversion APIs.
4076
4077 * casetab.c: Include "character.h" instead of "charset.h".
4078 (set_canon, set_identity, shuffle): Adjusted for the new
4079 map_char_table spec.
4080 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
4081 accessing the char table structure.
4082
4083 * chartab.c: New file that implements char table.
4084
4085 * category.c: Include "character.h".
4086 (copy_category_entry): New function.
4087 (copy_category_table): Call map_char_table and copy_category_entry.
4088 (Fmake_category_table): Initialize all top-vel slots.
4089 (char_category_set): New function.
4090 (modify_lower_category_set): Deleted.
4091 (Fmodify_category_entry): Call char_table_ref_and_range.
4092
4093 * category.h (CATEGORY_SET): Just call char_category_set.
4094
4095 * ccl.c: Include "character.h".
4096 (Qccl, Qcclp): New variables.
4097 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
4098 it's less than 256.
4099 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
4100 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
4101 and DST type.
4102 (ccl_driver): Types of arguments changed. Code adjusted for that.
4103 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
4104 ccl_driver.
4105 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
4106
4107 * ccl.h (struct ccl_program): Members eol_type and multibyte
4108 deleted. New members src_multibyte, dst_multibyte, consumed, and
4109 produced.
4110 (struct ccl_spec): Members decoder and encoder deleted. New
4111 memeber ccl.
4112 (CODING_SPEC_CCL_PROGRAM): New macro.
4113 (ccl_driver): Prototype updated.
4114 (Qccl, Qcclp, Fccl_program_p): Extern them.
4115 (CHECK_CCL_PROGRAM): New macro.
4116
4117 * character.c, character.h, chartab.c: New files.
4118
4119 * charset.c: Mostly re-written. Character and multibyte sequence
4120 handling codes are moved to character.c.
4121
4122 * charset.h: Mostly re-written. Character and multibyte sequence
4123 handling codes are moved to character.h.
4124
4125 * coding.c, coding.h: Mostly re-written.
4126
4127 * composite.c: Include "character.h" instead of "charset.h".
4128 (CHAR_WIDTH): Moved to character.h.
4129 (HASH_KEY, HASH_VALUE): Deleted.
4130
4131 * composite.h (enum composition_method): Order of enumeration
4132 symbols changed.
4133
4134 * data.c: Include "character.h" instead of "charset.h".
4135 (Faref): Call CHAR_TABLE_REF for a char table.
4136 (Faset): Call CHAR_TABLE_SET for a char table.
4137
4138 * dispextern.h (free_realized_face, check_face_attribytes,
4139 generate_ascii_font): Extern them.
4140 (free_realized_multibyte_face): Extern deleted.
4141
4142 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
4143 table structure.
4144
4145 * editfns.c: Include "character.h" instead of "charset.h".
4146 (Fchar_to_string): Always call CHAR_STRING.
4147
4148 * emacs.c (main): Call init_charset_once, init_charset,
4149 syms_of_chartab, and syms_of_character.
4150
4151 * fileio.c: Include "character.h" instead of "charset.h".
4152 (Finsert_file_contents): Big change for the new code-conversion
4153 API.
4154 (choose_write_coding_system): Likewise.
4155 (Fwrite_region): Likewise.
4156 (build_annotations_2): Deleted.
4157 (e_write): Big change for the new code-conversion API.
4158
4159 * fns.c: Include "character.h" instead of "charset.h".
4160 (copy_sub_char_table): Moved to chartab.c.
4161 (Fcopy_sequence): Call copy_char_table for a char table.
4162 (concat): Delete codes calling count_multibyte.
4163 (string_char_to_byte): Adjusted for the new multibyte form.
4164 (string_byte_to_char): Likewise.
4165 (internal_equal): Adjusted for the change of char table structure.
4166 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
4167 Fchar_table_extra_slot, Fset_char_table_extra_slot,
4168 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
4169 char_table_translate, optimize_sub_char_table,
4170 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
4171 chartab.c.
4172 (char_table_ref_and_index): Deleted.
4173 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
4174 (Fmd5): Call preferred_coding_system instead of accessing
4175 Vcoding_category_list. Adjusted for the new code-conversion API.
4176 (syms_of_fns): Defsubr for char table related functions moved to
4177 chartab.c.
4178
4179 * fontset.c: Mostly re-written.
4180
4181 * fontset.h (struct font_info): Type of the member encoding_type
4182 changed.
4183 (enum FONT_SPEC_INDEX): New enum.
4184 (fontset_font_pattern, fs_load_font): Prototype updated.
4185 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
4186
4187 * indent.c: Include "character.h" instead of "charset.h".
4188 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
4189 WIDTH_BY_CHAR_HEAD.
4190
4191 * insdel.c: Include "character.h" instead of "charset.h".
4192 (copy_text): Don't refer to Vnonascii_translation_table.
4193 (insert_from_gap): New function.
4194
4195 * keyboard.c: Include "character.h" instead of "charset.h".
4196 (command_loop_1): Never call direct_output_forward_char before
4197 a non-ASCII character.
4198 (read_char): If Vkeyboard_translate_table is a char table, always
4199 translated a character.
4200
4201 * keymap.c: Include "character.h".
4202 (store_in_keymap): Handle the case that IDX is a cons.
4203 (Fdefine_key): Handle the case that KEY is a cons and the car part
4204 is also a cons (range).
4205 (push_key_description): Adjusted for the new character code.
4206 (describe_vector): Call describe_char_table for a char table.
4207 (describe_char_table): New function.
4208
4209 * keymap.h (describe_char_table): Extern it.
4210
4211 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
4212 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
4213 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
4214 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
4215 Deleted.
4216 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
4217 structure.
4218 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
4219 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
4220 CHARTAB_SIZE_BITS_3): New macros.
4221 (chartab_size): Extern it.
4222 (struct Lisp_Char_Table): Re-designed.
4223 (struct Lisp_Sub_Char_Table): New structure.
4224 (HASH_KEY, HASH_VALUE): Moved from fns.c.
4225 (CHARACTERBITS): Defined as 22.
4226 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
4227 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
4228 (GC_SUB_CHAR_TABLE_P): New macro.
4229 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
4230 (code_convert_string_norecord): Extern deleted.
4231 (init_character_once, syms_of_character, init_charset,
4232 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
4233
4234 * lread.c: Include "character.h".
4235 (read_multibyte): New arg NBYTES.
4236 (read_escape): The meaning of returned *BYTEREP changed.
4237 (to_multibyte): Deleted.
4238 (read1): Adjuted the handling of char table and string.
4239
4240 * print.c: Include "character.h" instead of "charset.h".
4241 (print_string): Convert 8-bit raw bytes to octal form by
4242 string_escape_byte8.
4243 (print_object): Adjusted for the new multibyte form. Print 8-bit
4244 raw bytes always in octal form. Handle sub char table correctly.
4245
4246 * process.c: Include "character.h" instead of "charset.h".
4247 (read_process_output): Adjusted for the new code-conversion API.
4248 (send_process): Likewise.
4249
4250 * puresize.h (BASE_PURESIZE): Increased.
4251
4252 * regex.c: Include "character.h" instead of "charset.h".
4253 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
4254 (regex_compile): Accept a range whose starting and ending
4255 character have different leading bytes.
4256 (analyse_first): Adjusted for the above change.
4257
4258 * search.c: Include "character.h" instead of "charset.h".
4259 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
4260 (Freplace_match): Adjusted for the change of
4261 multibyte_char_to_unibyte.
4262
4263 * syntax.c: Include "character.h" instead of "charset.h".
4264 (syntax_parent_lookup): Deleted.
4265 (Fmodify_syntax_entry): Accept a cons as CHAR.
4266 (skip_chars): Adjusted for the new multibyte form.
4267 (init_syntax_once): Call char_table_set_range instead of directly
4268 accessing the structure of a char table.
4269
4270 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
4271 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
4272 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
4273 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
4274
4275 * term.c: Include "buffer.h" and "character.h".
4276 (encode_terminal_code): Adjusted for the new code-conversion API.
4277 (write_glyphs): Likewise.
4278 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
4279
4280 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
4281
4282 * xdisp.c: Include "character.h".
4283 (get_next_display_element): Adjusted for the new multibyte form.
4284 (disp_char_vector): Adjusted for the new char table structure.
4285 (decode_mode_spec_coding): Adjusted for the new structure of
4286 coding system.
4287 (decode_mode_spec): Adjusted for the new code-conversion API.
4288
4289 * xfaces.c: Include "character.h" instead of "charset.h".
4290 (load_face_font): Adjusted for the change of choose_face_font and
4291 FS_LOAD_FONT.
4292 (generate_ascii_font): New function.
4293 (set_lface_from_font_name): Adjusted for the change of
4294 FS_LOAD_FONT.
4295 (set_font_frame_param): Adjusted for the change of
4296 choose_face_font.
4297 (free_realized_face): Make it public.
4298 (free_realized_faces_for_fontset): Renamed from
4299 free_realized_multibyte_face. Free also faces realized for ASCII.
4300 (choose_face_font): Argments changed. Adjusted for the change of
4301 fontset_font_pattern and FS_LOAD_FONT.
4302
4303 * xfns.c: Include "character.h".
4304 (x_encode_text): Adjusted for the new code-conversion API.
4305
4306 * xselect.c: Don't include "charset.h".
4307 (selection_data_to_lisp_data): Adjusted for the new code
4308 covnersion API.
4309
4310 * xterm.c: Include "character.h".
4311 (x_encode_char): New argument CHARSET. Caller changed.
4312 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
4313 SPLIT_CHAR.
4314 (x_get_glyph_face_and_encoding): Likewise.
4315 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
4316 CHAR_WIDTH instead of CHARSET_WIDTH.
4317 (XTread_socket): Adjusted for the new code-conversion API.
4318 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
4319 (x_load_font): Adjusted for the change of struct font.
4320
4321 ;; Local Variables:
4322 ;; coding: iso-2022-7bit
4323 ;; End:
4324
4325 Copyright (C) 2002 Free Software Foundation, Inc.
4326 Copying and distribution of this file, with or without modification,
4327 are permitted provided the copyright notice and this notice are preserved.
4328
4329 ;;; arch-tag: 1bff38bd-2030-46ae-9d18-f15e6006b665