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