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