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