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