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