1 2007-12-02 Andreas Schwab <schwab@suse.de>
3 * xdisp.c (back_to_previous_visible_line_start): Fix type of beg
6 2007-12-01 Jason Rumney <jasonr@gnu.org>
8 * w32font.c (w32font_driver): Add new fields.
10 2007-12-01 Kenichi Handa <handa@ni.aist.go.jp>
12 * config.in: Re-generated.
14 * Makefile.in (ALL_CFLAGS): Add @M17N_FLT_CFLAGS@.
15 (FONTSRC, FONTOBJ) [HAVE_WINDOW_SYSTEM]: Set them unconditionally.
16 (LIBES): Add @M17N_FLT_CFLAGS@.
18 * composite.c (compose_text): Don't treat the new style
19 composition specially.
21 * emacs.c (main): Call syms_of_font unconditionally.
23 * font.h (FONT_ENTITY_NOT_LOADABLE)
24 (FONT_ENTITY_SET_NOT_LOADABLE): New macros.
25 (LGSTRING_XXXX, LGLYPH_XXX): Adjusted for the change of lispy
27 (struct font_driver): New member shape.
28 (font_registry_charsets): Extern. it.
29 (font_find_for_lface): Prototype adjusted.
30 (font_prepare_composition): Likewise.
31 (font_otf_capability, font_drive_otf): Delete their externs.
33 * font.c [HAVE_M17N_FLT]: Include <m17n-flt.h>.
34 (font_charset_alist): Moved from xfont.c and renamed.
35 (font_registry_charsets): Likewise.
36 (font_prop_validate_otf): New function.
37 (font_property_table): Register it for QCotf.
38 (DEVICE_DELTA, adjust_anchor, REPLACEMENT_CHARACTER)
39 (font_drive_otf): Deleted.
40 (font_prepare_composition): New arg F. Adjusted for the change of
42 (font_find_for_lface): New arg C.
43 (font_load_for_face): Adjusted for the change of
45 (Ffont_make_gstring): Adjusted for the change of lispy gstring.
46 (Ffont_fill_gstring): Likewise.
47 (Ffont_shape_text): New function.
48 (Fopen_font): If the font size is not given, use 12-pixel.
49 (Ffont_at): New arg STRING.
50 (syms_of_font): Initalize font_charset_alist. Declare
51 Ffont_shape_text as a Lisp function. Call syms_of_XXfont
54 * fontset.c (fontset_find_font) [USE_FONT_BACKEND]: Try multiple
55 fonts of the same font-spec. Change the format of RFONT-DEF.
56 (face_for_char): Adjusted for the change of RFONT-DEF.
57 (make_fontset_for_ascii_face): Likewise.
58 (Finternal_char_font): Likewise.
59 (Fset_fontset_font) [USE_FONT_BACKEND]: Handle new format of
64 * ftfont.c: Don't include Freetype headers. Include "ftfont.h".
65 (struct ftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
66 (ftfont_open) [HAVE_LIBOTF]: Initialize the above members.
67 (ftfont_driver) [HAVE_LIBOTF, HAVE_M17N_FLT]: Don't set
68 font_otf_capability and font_drive_otf, set ftfont_shape.
69 (ftfont_list): Adjusted for the change of :otf property value.
70 (struct MFLTFontFT) [HAVE_LIBOTF, HAVE_M17N_FLT]: New struct.
71 (ftfont_get_glyph_id, ftfont_get_metrics, ftfont_check_otf)
72 (adjust_anchor, ftfont_drive_otf, ftfont_shape_by_flt)
73 (ftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.s
74 (DEVICE_DELTA) [HAVE_LIBOTF, HAVE_M17N_FLT]: New macro.
75 (otf_gstring, gstring, m17n_flt_initialized): New variables.
77 * w32term.c (x_draw_composite_glyph_string_foreground): Adjusted
78 for the change of lispy gstring.
80 * xdisp.c (handle_composition_prop): Adjusted for the change of
81 lispy gstring. Call a function for auto-composition with the
83 (fill_composite_glyph_string): Adjusted for the change of lispy
85 (x_produce_glyphs): Adjusted for the change of
86 font_prepare_compositionl.
88 * xfaces.c (set_font_frame_param): Adjusted for the change of
91 * xfont.c (x_font_charset_alist): Moved to font.c and renamed.
92 (xfont_registry_charsets): Likewise. Caller changed.
93 (syms_of_xfont): Don't handle x_font_charset_alist.
95 * xftfont.c: Include "ftfont.h".
96 (struct xftfont_info) [HAVE_LIBOTF]: New members maybe_otf and
98 (xftfont_open) [HAVE_LIBOTF]: Initialize the above members.
99 (xftfont_close) [HAVE_LIBOTF]: Close otf.
100 (xftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
101 (syms_of_xftfont) [HAVE_LIBOTF, HAVE_M17N_FLT]: Set
102 xftfont_driver.shape to xftfont_shape.
104 * xterm.c (x_draw_composite_glyph_string_foreground): Adjusted for
105 the change of lispy gstring.
107 2007-11-29 Kenichi Handa <handa@ni.aist.go.jp>
109 * ftxfont.c (ftxfont_end_for_frame): Fix array indexing error.
111 2007-12-01 Jason Rumney <jasonr@gnu.org>
113 * w32font.c (w32font_draw): Fill background manually.
115 2007-11-23 Jason Rumney <jasonr@gnu.org>
117 * font.c (Qfontp): Remove unused symbol.
118 (QCantialias): New symbol.
119 (syms_of_font): Define it.
120 (font_property_table): Set a validator for QCantialias.
122 * w32font.c (CLEARTYPE_QUALITY, CLEARTYPE_NATURAL_QUALITY): Define
124 (QCfamily): Share with xfaces.c.
125 (Qstandard, Qsubpixel, Qnatural): New symbols.
126 (syms_of_w32font): Define them. Don't define QCfamily here.
127 (w32_antialias_type, lispy_antialias_type): New functions.
128 (w32_enumfont_pattern_entity): New arg requested_font.
129 Set antialias parameter if non-default was requested.
130 (fill_in_logfont): Fill in lfQuality if :antialias specified.
132 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
134 * lread.c (read1): Undo the previous change.
136 2007-11-21 CHENG Gao <chenggao@gmail.com> (tiny change)
138 * frame.c (Fdelete_frame): Call font_update_drivers only when
139 USE_FONT_BACKEND is defined..
141 2007-11-19 Kenichi Handa <handa@ni.aist.go.jp>
143 * font.h (struct font_bitmap): New member bits_per_pixel.
144 (struct font_driver): New members start_for_frame and end_for_frame.
145 (struct font_data_list): New struct.
146 (font_put_frame_data, font_get_frame_data): Extern them.
148 * frame.h (struct frame): New member font_data_list.
150 * font.c (font_update_drivers): Call driver->start_for_frame and
151 driver->end_for_frame at proper timings.
152 (font_put_frame_data, font_get_frame_data): New functions.
153 (Ffont_spec): Add usage in the docstring.
155 * frame.c (make_frame): Initialize f->font_data_list to NULL.
156 (Fdelete_frame): Call font_update_drivers.
158 * xftfont.c (struct xftface_info): Delete the member xft_draw.
159 (xftfont_prepare_face): Adjusted for the above change.
160 (xftfont_done_face): Likewise.
161 (xftfont_get_xft_draw): New function.
162 (xftfont_draw): Get XftDraw by xftfont_get_xft_draw.
163 (xftfont_end_for_frame): New function.
164 (syms_of_xftfont): Set xftfont_driver.end_for_frame.
166 * ftxfont.c (ftxfont_get_gcs): Renamed from ftxfont_create_gcs.
167 Argument changed. Cache GCs in the per-frame data.
168 (struct ftxfont_frame_data): New struct.
169 (ftxfont_draw_bitmap): New arg gc_fore and flush.
170 (ftxfont_prepare_face, ftxfont_done_face): Delete them.
171 (ftxfont_draw): Get GCs by ftxfont_get_gcs. Reflect s->clip in
173 (ftxfont_end_for_frame): New function.
174 (syms_of_ftxfont): Set ftxfont_driver.end_for_frame.
176 * ftfont.c (ftfont_get_bitmap): Set bitmap->bits_per_pixel.
178 2007-11-18 Kenichi Handa <handa@m17n.org>
180 * xselect.c (Vselection_coding_system)
181 (Vnext_selection_coding_system): Delete them.
182 (syms_of_xselect): Don't declare selection-coding-system and
183 next-selection-coding-system. They are declared in select.el.
185 2007-11-17 Jason Rumney <jasonr@gnu.org>
187 * w32term.h (WM_UNICHAR, UNICODE_NOCHAR): Define if not already.
189 * w32fns.c: Include imm.h.
190 (get_composition_string_fn, get_ime_context_fn): New optional
192 (globals_of_w32fns): Load them from imm32.dll.
193 (ignore_ime_char): New flag.
194 (w32_wnd_proc): Handle WM_UNICHAR, WM_IME_CHAR and
195 WM_IME_ENDCOMPOSITION messages.
197 * w32term.c (w32_read_socket) [WM_UNICHAR]: Handle as
198 MULTIBYTE_CHAR_KEYSTROKE_EVENT.
200 2007-11-14 Kenichi Handa <handa@ni.aist.go.jp>
202 * lread.c (READCHAR): Call readchar with the 2nd arg NULL.
203 (READCHAR_REPORT_MULTIBYTE): New macro.
204 (readchar): New 2nd arg MULTIBYTE.
205 (read1): Use READCHAR_REPORT_MULTIBYTE for the first read. Make
206 symbol's name multibyte according to the multibyteness of the
209 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
211 * xfaces.c (face_for_overlay_string): Call lookup_face with
212 correct arguments (fix of synching with the trunk).
214 2007-11-05 Kenichi Handa <handa@m17n.org>
216 * font.c (font_prop_validate_symbol): The argument prop_index is
218 (font_prop_validate_style, font_prop_validate_non_neg)
219 (font_prop_validate_spacing): Likewise.
220 (font_property_table): Arguments to validater changed. Callers
222 (font_lispy_object): Deleted.
223 (font_at): Use font_find_object instead fo font_lispy_object.
225 2007-11-02 Kenichi Handa <handa@ni.aist.go.jp>
227 * fileio.c (Fexpand_file_name): Adjust multibyteness of directory
230 2007-10-27 Jason Rumney <jasonr@gnu.org>
232 * w32font.c (add_font_name_to_list): Avoid vertical fonts.
233 (font_matches_spec): Remove debug output.
234 (add_font_entity_to_list): Avoid using substituted fonts.
236 2007-10-21 Jason Rumney <jasonr@gnu.org>
238 * doc.c (Fsnarf_documentation):
239 * Makefile.in (temacs${EXEEXT}, mostlyclean): Undo last change.
241 2007-10-12 Miles Bader <miles@gnu.org>
243 * src/dispextern.h (struct glyph_row): Only define "clip" field if
244 HAVE_WINDOW_SYSTEM is defined.
246 2007-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
248 Fix up multi-tty merge.
250 * xterm.c (handle_one_xevent): Remove duplicate code and fix up nesting
253 * xfaces.c (free_realized_face, clear_face_gcs):
254 Include font_done_for_face in the input_blocked section, just in case.
256 * xdisp.c (decode_mode_spec): Use terminal-local coding systems.
257 (get_char_face_and_encoding): Undo last change and remove the *other*
258 duplicate definition (i.e. keep the one that's better scoped and that
259 includes code for the font-backend).
261 * terminal.c (create_terminal): Default keyboard_coding to
262 `no-conversion' and terminal_coding to `undecided'.
264 * lread.c (read1): Use XSETPVECTYPE to set a pseudovector's tag.
266 * fontset.c (free_realized_fontsets): Check that the table entry does
267 contain a fontset before trying to compare it to `base'.
269 * emacs.c (main): Move syms_of_data, syms_of_fileio, syms_of_alloc,
270 syms_of_charset, and syms_of_coding earlier because init_window_once
271 now needs Vcoding_system_hash_table to be setup.
273 * coding.h (default_buffer_file_coding): Remove.
275 * coding.c (default_buffer_file_coding): Remove.
276 (Fterminal_coding_system, Fkeyboard_coding_system): Use ->id rather
277 than ->symbol, and use the terminal-local coding system.
278 (syms_of_coding): Don't setup the coding-systems that are not
280 (Fdefine_coding_system_internal): Use XCAR/XCDR.
282 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
283 Use XSETPVECTYPE now that XSETCHAR_TABLE doesn't set the tag anymore.
285 * alloc.c (Fmake_char_table, make_sub_char_table): Remove. They're now
286 in chartab.c and were re-added here by mistake.
287 (Fpurecopy): Use XSETPVECTYPE after copying a COMPILED pseudovector.
289 * doc.c (Fsnarf_documentation):
290 * Makefile.in (temacs${EXEEXT}, mostlyclean): Move buildobj.lst from
293 * ChangeLog.10: Add mistakenly removed entry.
295 2007-10-12 Dan Nicolaescu <dann@ics.uci.edu>
297 * Makefile.in (fringe.o, minibuf.o): Fix dependencies.
299 2007-10-11 Miles Bader <miles@gnu.org>
301 * xdisp.c (get_char_face_and_encoding): Remove extraneous definition.
302 Add extra args to FACE_FOR_CHAR.
304 2007-09-20 Kenichi Handa <handa@m17n.org>
306 * keymap.c (where_is_internal_1): If key is a cons, store the copy
309 * chartab.c (map_sub_char_table): If the range contains just one
310 character, call the function with that character even if the depth
312 (map_char_table): Likewise.
314 2007-09-19 Jason Rumney <jasonr@gnu.org>
316 * w32font.c (w32font_text_extents): Calculate metrics for the
319 2007-09-15 Jason Rumney <jasonr@gnu.org>
321 * w32xfns.c (get_next_msg): Consolidate WM_PAINT messages.
323 2007-09-13 Jason Rumney <jasonr@gnu.org>
325 * w32term.c (x_set_glyph_string_clipping): Use
326 get_glyph_string_clip_rects.
327 (x_set_glyph_string_clipping_exactly): Adjusted for the change of
329 (x_draw_glyph_string): Likewise.
331 * w32font.c (w32font_draw): Do clipping here.
333 2007-09-13 Kenichi Handa <handa@m17n.org>
335 * xftfont.c (xftfont_draw): Adjusted for the change of struct
338 * xterm.c (x_set_glyph_string_clipping): Use
339 get_glyph_string_clip_rects.
340 (x_set_glyph_string_clipping_exactly): Adjusted for the change of
342 (x_draw_glyph_string): Likewise.
344 * xdisp.c (get_glyph_string_clip_rects): Reflect s->row->clip to
345 the resulting clip(s}.
346 (expose_overlaps): Add arg r. Callers changed. Set it ot
347 row->clip temporarily.
348 (expose_window): Redraw rows overlapping the exposed area.
350 * dispextern.h (struct glyph_row): New member clip.
351 (struct glyph_string): Delete members clip_x, clip_y, clip_width,
352 clip_height, new member clip, and num_clips.
354 2007-09-07 Kenichi Handa <handa@m17n.org>
356 * data.c (Fchar_or_string_p): Fix docstring.
358 2007-08-22 Kenichi Handa <handa@m17n.org>
360 * xftfont.c (xftfont_draw): If s->font_info != s->face->font_info,
361 create a temporal XftDraw object.
363 2007-07-26 Kenichi Handa <handa@m17n.org>
365 * font.c (Ffontp): Fix docstring.
367 * coding.c (detect_coding_iso_2022): Don't treat SI/SO codes as a
368 strong evidence of ISO-2022.
370 2007-07-23 Kenichi Handa <handa@m17n.org>
372 * abbrev.c (abbrev_check_chars): Use CHAR_TABLE_REF, not
373 SYNTAX_ENTRY_FOLLOW_PARENT.
375 2007-06-29 Stefan Monnier <monnier@iro.umontreal.ca>
377 * fns.c (weak_hash_tables): Rename from Vweak_hash_tables and change
379 (make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
380 Update to the new type of weak_hash_tables and next_weak.
382 * lisp.h (struct Lisp_Hash_Table): Change next_weak from Lisp_Object to
383 a plain C pointer to Lisp_Hash_Table.
385 * lisp.h (XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
386 (GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
387 (GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
388 (GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
389 (GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
390 (GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
391 (GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
392 (GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
393 (GC_EQ): Remove since they've been identical to their non-GC_
394 alter-egos ever since the markbit was eradicated.
413 * src/xterm.c: Replace uses of GC_* macros with the non-GC_ versions.
415 2007-06-25 Kenichi Handa <handa@m17n.org>
417 * chartab.c (map_sub_char_table): Make it work for the top-level
418 char-table. Fix handling of parent char-table.
419 (map_char_table): Adjust for the above change.
421 2007-06-24 Jason Rumney <jasonr@gnu.org>
423 * w32font.c (Qgdi): Rename from Qw32.
425 2007-06-22 Jason Rumney <jasonr@gnu.org>
427 * w32bdf.c (get_quoted_string): Make function static.
429 2007-06-20 Kenichi Handa <handa@m17n.org>
431 * xftfont.c (xftfont_open): If one of font's ASCII glyph has
432 bigger ascent and descent than those of the font, use them as
433 font's ascent and descent.
435 2007-06-18 Kenichi Handa <handa@m17n.org>
437 * Makefile.in (${lispsource}international/charprop.el): Move this
438 target within "#ifdef HAVE_UNIDATA" and "#endif".
440 2007-06-16 Kenichi Handa <handa@m17n.org>
442 * Makefile.in (lisp): Add ${lispsource}language/tai-viet.el.
443 (shortlisp): Add ../lisp/language/tai-viet.el.
445 2007-06-15 Ulrich Mueller <ulm@gentoo.org> (tiny change)
447 * Makefile.in (${lispsource}international/charprop.el): Depend on
450 2007-06-13 Jason Rumney <jasonr@gnu.org>
452 * w32font.c (w32font_close): Delete the GDI font object.
454 * w32menu.c: Include character.h
456 * w32proc.c: Likewise.
458 * w32select.c: Likewise.
460 * makefile.w32-in (w32proc.o): Depend on character.h
462 2007-06-11 Jason Rumney <jasonr@gnu.org>
464 * w32fns.c (syms_of_w32fns): Use DEFSYM macro.
466 * w32menu.c (syms_of_w32menu): Likewise.
468 * w32proc.c (syms_of_ntproc): Likewise.
470 * w32select.c (syms_of_w32select): Likewise.
472 * w32term.c (syms_of_w32term): Likewise.
474 2007-06-06 Jason Rumney <jasonr@gnu.org>
476 * w32font.c (w32font_draw): Delete brush after using it.
478 2007-06-04 Jason Rumney <jasonr@gnu.org>
480 * w32font.c (w32font_open): Don't set font_idx.
481 (w32font_text_extents): Try GetTextExtentPoint32W before defaulting
483 (w32font_draw): Fill background explicitly.
485 2007-06-03 Jason Rumney <jasonr@gnu.org>
487 * w32term.c (w32_initialize): Don't call w32font_initialize.
489 * w32font.c (w32font_info): Remove subranges.
490 (QCsubranges, Qmodern, Qswiss, Qroman): Remove.
491 (QCfamily, Qmonospace, Qsans_serif, Qmono, Qsans, Qsans__serif)
492 (Qraster, Qoutline, Qlatin, Qgreek, Qcoptic, Qcyrillic, Qarmenian)
493 (Qhebrew, Qarabic, Qsyriac, Qnko, Qthaana, Qdevanagari, Qbengali)
494 (Qgurmukhi, Qgujarati, Qoriya, Qtamil, Qtelugu, Qkannada)
495 (Qmalayalam, Qsinhala, Qthai, Qlao, Qtibetan, Qmyanmar, Qgeorgian)
496 (Qhangul, Qethiopic, Qcherokee, Qcanadian_aboriginal, Qogham)
497 (Qrunic, Qkhmer, Qmongolian, Qsymbol, Qbraille, Qhan)
498 (Qideographic_description, Qcjk_misc, Qkana, Qbopomofo, Qkanbun)
499 (Qyi, Qbyzantine_musical_symbol, Qmusical_symbol, Qmathematical):
501 (font_callback_data): New struct.
502 (w32font_list, w32font_match): Use it.
503 (w32font_open): Don't populate subranges.
504 (w32font_has_char): Use script Lisp symbols, not subrange bitmask.
505 (w32font_encode_char): Always return unicode code-point as-is.
506 (w32font_text_extents): Supply a tranformation matrix to
507 GetGlyphOutline. Never look up by glyph index. Avoid looping
508 twice. Use unicode version of GetTexExtentPoint32 instead of
510 (set_fonts_frame): Remove
511 (w32_enumfont_pattern_entity): Add frame parameter, use it to
512 set frame parameter. Use backward compatible fake foundries.
513 Save generic family in extra slot under QCfamily. Make width slot
514 constant. Save QCspacing value. Save list of scripts instead of
516 (w32_generic_family, logfonts_match, font_matches_spec): New functions.
517 (add_font_entity_to_list): Use font_callback_data struct. Filter
519 (add_one_font_entity_to_list): Use font_callback_data struct.
520 (w32_registry): Default to iso10646_1;
521 (fill_in_logfont): Use dpi from extra slot. Don't bother with
522 string font registries. Don't fill in font name if it is a generic
523 family name, fill family instead. Use spacing, family and script
524 extra info to fill pitch, family and charset fields.
525 (list_all_matching_fonts): Use font_callback_data struct.
526 (unicode_range_for_char): Remove.
527 (font_supported_scripts): New function.
528 (w32font_initialize): Remove.
529 (syms_of_w32font): Update which symbols are defined.
531 2007-06-02 Jason Rumney <jasonr@gnu.org>
533 * font.c (font_pixel_size): Reverse assq_no_quit args.
535 * w32term.h (FONT_WIDTH): Report max width, not average.
536 (FONT_MAX_WIDTH): Remove.
537 (FONT_AVG_WIDTH): New macro.
539 * xfaces.c (Fx_list_fonts) [WINDOWSNT]: Remove Windows only
540 redefinition of FONT_WIDTH.
542 * w32term.c (x_font_min_bounds): Use FONT_AVG_WIDTH.
543 (w32_cache_char_metrics): Use FONT_WIDTH.
545 * w32fns.c (w32_load_system_font, w32_list_fonts): Use FONT_AVG_WIDTH.
547 2007-06-01 Jason Rumney <jasonr@gnu.org>
549 * w32font.c (w32font_open): Make lfHeight negative.
551 * w32fns.c (x_default_font_parameter): Use new style font name.
552 (Fx_create_frame, x_create_tip_frame): Initialize resx and resy.
554 2007-05-31 Jason Rumney <jasonr@gnu.org>
556 * w32font.c (QCsubranges): New symbol.
557 (w32font_open, w32font_has_char): Get subranges from subproperty
559 (w32_enumfont_pattern_entity): Set subranges as subproperty of extra.
560 (syms_of_w32font): Define :subranges symbol.
562 * font.c (font_put_extra): Expose externally.
564 * font.h (font_put_extra): Moved declaration from font.c.
566 * font.c (Ffont_get): Use font driver to determine otf capability.
567 (adjust_anchor): Check if driver defines anchor_point before using.
569 * w32font.c (w32font_open): Handle size, height and pixel_size better.
570 (w32font_draw): Use options.
571 (w32_enumfont_pattern_entity): Set size to 0 for scalable fonts.
572 Fix detection of truetype fonts.
573 (registry_to_w32_charset): Handle charsets other than iso8859-1
574 expressed as lisp symbols.
575 (w32_registry): Express charset as lisp symbol.
576 (fill_in_logfont): Reverse pixel and point height logic.
577 Don't set width here. Set quality to default.
579 * w32fns.c (w32_load_system_font): Fix detecting FIXED_PITCH fonts.
580 (x_to_w32_font): Fill in lfPitchAndFamily correctly.
582 * xterm.c (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
583 Remove redundant loop and allocation.
585 * makefile.w32-in (font.o, w32font.o): New objects.
586 (fontset.o, xdisp.o, xfaces.o, w32fns.o, w32term.o): Depend on font.h
587 (FONTOBJ): New group of objects conditioned on USE_FONT_BACKEND.
589 * xdisp.c (fill_composite_glyph_string): Make the first arg to
590 STORE_XCHARB a valid l-value.
592 * w32term.c (w32_native_per_char_metric): Swap width and rbearing
593 calculations for non-Truetype fonts.
594 (x_draw_glyph_string): Sync with xterm.c.
595 (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]: Remove
597 (w32_initialize) [USE_FONT_BACKEND]: Call w32font_initialize.
599 * w32term.h (w32_output_data) [USE_FONT_BACKEND]: Add fontp member.
600 (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro from xterm.h.
602 * w32fns.c [USE_FONT_BACKEND]: Port font backend changes from xfns.c.
603 (x_to_w32_charset, w32_to_x_charset): Expose externally.
605 * w32font.c: New file for w32 font backend.
607 2007-05-28 Kenichi Handa <handa@m17n.org>
609 * term.c: Don't include "buffer.h" twice.
611 2007-05-21 Kenichi Handa <handa@m17n.org>
613 * syntax.c (skip_syntaxes): Synch with the trunk.
615 2007-05-14 Kenichi Handa <handa@m17n.org>
617 * character.c (Funibyte_string): New function.
618 (syms_of_character): Defsubr it.
620 2007-05-01 Jason Rumney <jasonr@gnu.org>
622 * w32term.c [USE_FONT_BACKEND]:
623 (x_get_font_repertory, note_mouse_movement, x_set_mouse_face_gc):
624 (x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly):
625 (x_draw_glyph_string, x_draw_glyph_string_foreground):
626 (x_draw_composite_glyph_string_foreground, x_new_fontset2):
627 (x_free_frame_resources): Sync with xterm.c.
629 2007-04-29 Andreas Schwab <schwab@suse.de>
631 * lread.c (read1): Use CHAR_TABLE_STANDARD_SLOTS to validate
634 2007-04-26 Kenichi Handa <handa@m17n.org>
636 * font.c (check_otf_features): Define it regardless of
639 2007-04-25 Kenichi Handa <handa@m17n.org>
641 * ftfont.c (ftfont_driver): Delete font_otf_gsub and
642 font_otf_gpos, add font_drive_otf.
644 * fontset.c (fontset_find_font): Pay attention to font size
645 specified for a font.
646 (reorder_font_vector): Check contents of font_def.
648 * font.c (struct otf_list): Delete it.
649 (otf_list): Make it a lisp variable..
650 (otf_open): Use lispy otf_list.
651 (generate_otf_features): Renamed from parse_gsub_gpos_spec.
652 (check_otf_features): New function.
653 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): New
655 (font_drive_otf): New function merging font_otf_gsub and
657 (font_open_for_lface): New arg spec. Change argument order.
658 (font_load_for_face): Adjusted for the change of
660 (Ffont_drive_otf): New function merging Ffont_otf_gsub and
662 (syms_of_font): Staticpro otf_list. Delete defsubr of
663 Sfont_otf_gsub and Sfont_otf_gpos. Defsubr Sfont_drive_otf.
665 * xfaces.c (set_font_frame_param): Adjusted for the change of
668 * font.h (font_open_for_lface): Adjust prototype.
669 (struct font_driver): Delete members otf_gsub and otf_gpos, add
671 (font_otf_gsub, font_otf_gpos): Delete externs.
672 (font_drive_otf): Extern it.
674 2007-04-24 Kenichi Handa <handa@m17n.org>
676 * font.c (font_at): If the window W is not on a window system,
679 * coding.c (produce_chars): Don't call insert_from_gap if no
680 characters to produce.
681 (encode_coding): Likewise.
683 2007-04-17 Kenichi Handa <handa@m17n.org>
685 * fontset.c (free_realized_fontsets): Avoid unnecessary call of
688 * xfaces.c (face_for_font): Check also face->font==font->font.font.
690 2007-04-16 Miles Bader <miles@gnu.org>
692 * emacs.c (main): Change default value of `enable_font_backend' to 1.
693 Parse "--disable-font-backend" option.
694 (standard_args): Add "--disable-font-backend" option.
696 2007-04-13 Kenichi Handa <handa@m17n.org>
698 * fontset.c (fontset_find_font): New function.
699 (fontset_font): Use fontset_find_font.
700 (make_fontset_for_ascii_face): Don't set face ID in rfont_def.
701 Register the specified font for all Latin characters.
702 (new_fontset_from_font): Register the specified font for all Latin
704 (dump_fontset): For a realized fontset, include the base fontset
705 name in the returned vector.
707 2007-04-11 Kenichi Handa <handa@m17n.org>
709 * character.h (CHAR_STRING): Cast C to unsigned on calling
712 * character.c (char_string): Type of arg C changed to unsigned.
713 Signal an error if C is an invalid character code.
715 * editfns.c (general_insert_function): Use CHARACTERP, not INTEGERP.
716 (Fchar_to_string): Likewise.
718 2007-03-23 Kenichi Handa <handa@m17n.org>
720 * character.h (MIN_MULTIBYTE_LEADING_CODE)
721 (MAX_MULTIBYTE_LEADING_CODE): New macros.
723 * regex.c (analyse_first): Fix for multibyte characters in "case
724 charset:" and "case categoryspec:".
726 2007-03-04 Andreas Schwab <schwab@suse.de>
728 * Makefile.in (LIBES): Move standard libraries to the end.
730 2007-02-27 Kenichi Handa <handa@m17n.org>
732 * process.c: Cancel the change done by sync with HEAD.
734 2007-02-23 Kenichi Handa <handa@m17n.org>
736 * alloc.c (Fgarbage_collect): If nextb->text->inhibit_shrinking is
737 nonzero, don't shrink the buffer nextb.
739 * buffer.h (struct buffer_text): New member inhibit_shrinking.
741 * coding.c (coding_alloc_by_making_gap): New arg offset.
742 (alloc_destination): Call coding_alloc_by_making_gap with the arg
744 (decode_coding_iso_2022): Update coding->safe_charsets.
745 (decode_coding_gap): Temporarily set
746 current_buffer->text->inhibit_shrinking to 1.
748 2007-02-20 Kenichi Handa <handa@m17n.org>
750 * xterm.c (x_draw_composite_glyph_string_foreground): Fix
751 indexing into elements of s->cmp and s->char2b.
753 2007-02-16 Juanma Barranquero <lekktu@gmail.com>
755 * regex.c (RE_STRING_CHAR_AND_LENGTH) [! emacs]: Add missing arg `len'.
757 2007-02-16 Kenichi Handa <handa@m17n.org>
759 * regex.c (GET_CHAR_BEFORE_2, GET_CHAR_AFTER): Check the variable
760 target_multibyte instead of multibyte.
761 (re_match_2_internal): Call bcmp_translate with target_multibyte.
762 (bcmp_translate): Change the argument name from multibyte to
765 2007-02-15 Kenichi Handa <handa@m17n.org>
767 These changes are to compile a regexp into a pattern that can be
768 used both for multibyte and unibyte targets.
770 * Makefile.in (search.o): Depend on charset.h.
772 * character.c (multibyte_char_to_unibyte_safe): New function.
774 * search.c: Include "charset.h".
775 (compile_pattern_1): Delete argument multibyte. Don't set
776 cp->buf.target_multibyte here. Set cp->buf.charset_unibyte.
777 (compile_pattern): Don't compare cp->buf.target_multibyte.
778 Compare cp->buf.charset_unibyte.
779 (compile_pattern): Set cp->buf.target_multibyte.
781 * lisp.h (multibyte_char_to_unibyte_safe): Extern it.
783 * regex.h (struct re_pattern_buffer): New member charset_unibyte.
785 * regex.c (RE_STRING_CHAR, RE_STRING_CHAR_AND_LENGTH): New arg
786 multibyte. Callers changed.
787 (RE_CHAR_TO_MULTIBYTE, RE_CHAR_TO_UNIBYTE): New macros.
788 (MAKE_CHAR_MULTIBYTE, MAKE_CHAR_UNIBYTE): Deleted. Callers
789 changed to use RE_CHAR_TO_MULTIBYTE and RE_CHAR_TO_UNIBYTE
791 (SETUP_ASCII_RANGE, SETUP_UNIBYTE_RANGE): New macros.
792 (SETUP_MULTIBYTE_RANGE): Generate a more compact range_table.
793 (regex_compile): Make the compiled pattern usable both for
794 multibyte and unibyte targets.
795 (analyse_first): Make the fastmap usable both for multibyte and
797 (TRANSLATE_VIA_MULTIBYTE): Deleted.
798 (re_match_2_internal): Pay attention to the case that the
799 multibyteness of bufp and target may be different.
801 2007-02-14 Kenichi Handa <handa@m17n.org>
803 * xdisp.c (x_produce_glyphs): When a font is not found, make the
804 empty box occupy at least one column width.
806 2007-01-30 Miles Bader <miles@gnu.org>
808 * Makefile.in: Remove redundant HAVE_XFT clause.
810 2006-12-20 Kenichi Handa <handa@m17n.org>
812 * xrdb.c (x_load_resources): Setup the default fontSet X reource.
814 2006-12-15 Kenichi Handa <handa@m17n.org>
816 * regex.c (regex_compile): Synch with HEAD.
818 2006-12-12 Kenichi Handa <handa@m17n.org>
820 * fontset.c (Finternal_char_font): Fix previous change.
822 2006-12-07 Kenichi Handa <handa@m17n.org>
824 * fontset.c (Finternal_char_font): Fix for the case of POSITION
827 2006-12-06 Kenichi Handa <handa@m17n.org>
829 * xftfont.c (xftfont_open): Call FcConfigSubstitute.
831 2006-12-05 Kenichi Handa <handa@m17n.org>
833 * xftfont.c (xftfont_open): Don't enable antialias explicitly.
835 2006-11-30 Kenichi Handa <handa@m17n.org>
837 * search.c (simple_search): Fix previous change.
839 2006-11-29 Kenichi Handa <handa@m17n.org>
841 * xftfont.c (ftfont_font_format): Extern declaration.
843 * frame.c (x_set_font): Fix the second arg to fs_query_fontset.
845 * xfont.c (xfont_driver): Initialize ftfont_driver.type by 0.
846 (xfont_list): Don't directly use Lisp_Object as an operand of &&.
848 * ftfont.c (ftfont_driver): Initialize ftfont_driver.type by 0.
849 (ftfont_font_format): Fix previous change.
851 * font.h (Ffont_xlfd_name): EXFUN it.
853 * font.c (font_parse_xlfd): Fix the array size of `f'.
854 (register_font_driver): Use EQ to compare driver->type.
856 * xfns.c (xic_create_xfontset2) [USE_FONT_BACKEND]: New function.
857 (create_frame_xic) [USE_FONT_BACKEND]: Call xic_create_xfontset2.
858 (xic_set_xfontset) [USE_FONT_BACKEND]: Likewise.
860 2006-11-27 Kenichi Handa <handa@m17n.org>
862 * ftfont.c (ftfont_pattern_entity): Check if FC_FONTFORMAT is
864 (ftfont_list_generic_family, ftfont_list, ftfont_font_format):
867 2006-11-24 Kenichi Handa <handa@m17n.org>
869 * xfont.c (xfont_open): Set font->format.
871 * xftfont.c (xftfont_open): Set font->format.
873 * ftfont.c (ftfont_pattern_entity): Add fontformat in a pattern.
874 (ftfont_list): Include FC_FONTFORMAT in FcObject.
875 (ftfont_open): Set font->format.
876 (ftfont_font_format): New function.
878 * font.h (struct font): New memeber format.
880 * font.c (Qopentype): New variable.
881 (syms_of_font): Defsym it.
882 (Fquery_font): Change the format of the last element of the return
885 2006-11-22 Kenichi Handa <handa@m17n.org>
887 * search.c (simple_search): Fix sync with HEAD.
889 2006-11-17 Kenichi Handa <handa@m17n.org>
891 * xfns.c (xic_create_xfontset): Try the default fontset name as a
894 2006-11-08 Kenichi Handa <handa@m17n.org>
896 * coding.c (detect_coding_charset): Fix detection of multi-byte
899 2006-11-07 Bob Halley <halley@play-bow.org> (tiny change)
901 * ccl.c (ccl_driver): If DST is NULL, set ccl->produced to 0.
903 2006-10-31 Kenichi Handa <handa@m17n.org>
905 * xdisp.c (get_next_display_element): Set it->face_id for the
906 first component of a composition.
907 (x_produce_glyphs): Check if the font is changed or not for
910 2006-10-31 Kenichi Handa <handa@m17n.org>
912 (get_next_display_element): Set it->face_id for the
913 first component of a composition.
914 (x_produce_glyphs): Check if the font is changed or not for
917 2006-10-30 Kenichi Handa <handa@m17n.org>
919 * fontset.c (Qlatin): New variable.
920 (syms_of_fontset): Define it as a lisp symbol.
921 (Fset_fontset_font): If TARGET is `latin', use FONT_SPEC for
924 2006-10-27 Kenichi Handa <handa@m17n.org>
926 * font.c (font_unparse_fcname): Pay attention to the case that
927 some of font property is a null string.
929 2006-10-26 Kenichi Handa <handa@m17n.org>
931 * term.c: Include "composite.h".
932 (encode_terminal_code): Output all components of composition.
933 Check the size of encode_terminal_src.
934 (produce_glyphs): For compostion, call produce_composite_glyph.
935 (append_composite_glyph, produce_composite_glyph): New functions.
937 * xdisp.c (x_produce_glyphs): In handling composition, if a font
938 is not found, get font_info from the current ascii face.
940 2006-10-23 Kenichi Handa <handa@m17n.org>
942 * fileio.c (Finsert_file_contents): On replacing, temporarily bind
943 buffer-file-name to Qnil before calling insert_from_buffer.
945 * font.c (font_unparse_fcname): Pay attention to the case that
946 foundry is a null string.
948 2006-10-17 Kenichi Handa <handa@m17n.org>
950 * ftfont.c (ftfont_list): Allow registry "unicode-sip".
952 * font.c (Qunicode_sip): New variable.
953 (syms_of_font): Declare it as a Lisp symbol.
955 * font.h (Qunicode_sip): Extern it.
957 2006-10-16 Kenichi Handa <handa@m17n.org>
959 * composite.c (get_composition_id): Pay attention to TAB
962 * xterm.c (x_draw_composite_glyph_string_foreground): Don't draw
963 TAB. Adjusted for the change of s->char2b which always points to
964 the first elememnt of allocated memory.
966 * xftfont.c (xftfont_text_extents): Fix calculation of descent
969 * xdisp.c (handle_composition_prop): Set it->c to the first
971 (fill_composite_glyph_string): Argument changed.
972 (BUILD_COMPOSITE_GLYPH_STRING): Adjusted for the above change.
973 (x_produce_glyphs): Fix handling of left/right padding.
975 2006-10-04 Kenichi Handa <handa@m17n.org>
977 * regex.c (analyse_first): Cancel the change for synching with
980 2006-08-28 Kenichi Handa <handa@m17n.org>
982 * coding.c (detect_coding_system): Fix for handling off
983 inhibit_iso_escape_detection. Fix for the case that no coding
984 system is defined for a specific coding category.
986 2006-08-21 Kenichi Handa <handa@m17n.org>
988 * font.c (font_matching_entity): Dolete unused local var.
990 * xftfont.c (xftfont_open): Call XftDefaultSubstitute before
993 * fileio.c (Finsert_file_contents): On recovering a file, assume
995 (choose_write_coding_system): On auto-saving a file, force
998 * coding.c (setup_coding_system): Fix setting of
999 coding->common_flags based on eol_type.
1000 (coding_inherit_eol_type): If PARENT is not nil, be sure to
1003 2006-08-04 Kenichi Handa <handa@m17n.org>
1005 * alloc.c (NSTATICS): Increased to 0x600.
1007 2006-08-01 Kenichi Handa <handa@m17n.org>
1009 * ftfont.c (ftfont_driver): Set ftfont_driver.match to
1011 (ftfont_list): Don't check :name property.
1012 (ftfont_match): New function.
1013 (ftfont_pattern_entity): If the pattern doesn't contain
1014 FC_SPACING, don't assuce FC_MONO.
1016 * font.h (struct font_driver): New member `match'.
1017 (font_update_drivers): Prototype adjusted.
1019 * font.c (font_parse_fcname): Don't change :name property of FONT.
1020 (font_parse_name): Likewise.
1021 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
1022 them unconditionally.
1023 (font_matching_entity): New function.
1024 (font_open_by_name): Try font_matching_entity if exact match is
1026 (font_update_drivers): Delete the arg FONT. Return a list of
1027 actually used backends. Don't free faces, font caches here.
1028 Don't store data in frame parameters. Don't call x_set_font.
1029 (Ffont_spec): Store :name property as is.
1030 (Ffont_get): Check HAVE_LIBOTF before calling font_otf_capability.
1031 (Ffont_otf_gsub): Call font->driver->otf_gsub instead of
1033 (Ffont_otf_gpos): Call font->driver->otf_gpos instead of
1035 (Ffont_otf_alternates): Check if the driver has otf_gsub function.
1036 Call font->driver->otf_gsub instead of font_otf_gsub.
1038 * frame.c (x_set_font_backend): Do more works that were done in
1039 font_update_drivers before.
1041 * xfont.c (xfont_match): New function.
1042 (xfont_driver): Set xfont_driver.match to xfont_match.
1043 (xfont_draw): Set font in GC if necessary.
1045 * ftxfont.c (ftxfont_match): New function.
1046 (syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.
1048 * xftfont.c (xftfont_match): New function.
1049 (syms_of_xftfont): Set xftfont_driver.match to xftfont_match.
1051 2006-07-28 Kenichi Handa <handa@m17n.org>
1053 * font.h (struct font): New member scalable.
1054 (struct font_driver): New arg ALTERANTE_SUBST to otf_gsub.
1055 (font_otf_gsub): Prototype adjusted.
1057 * font.c (font_otf_capability): Fix handling of the default
1059 (parse_gsub_gpos_spec): Type changed to void. New arg nbytes.
1060 Check the contents of SPEC.
1061 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE): New macros.
1062 (check_gstring): New function.
1063 (REPLACEMENT_CHARACTER): New macro.
1064 (font_otf_gsub): New arg alternate_subst. Be sure to set all
1065 glyph codes of GSTRING.
1066 (font_otf_gpos): Be sure to set all glyph codes of GSTRING.
1067 (font_prepare_composition): Set cmp->glyph_len.
1068 (font_open_entity): Set font->scalable.
1069 (Ffont_get): Handle :otf property.
1070 (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
1072 (Fquery_font): Use font->font.full_name.
1073 (syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
1074 Sfont_otf_alternates.
1076 * ftfont.c (ftfont_open): Set font->font.full_name and
1077 font->font.name properly. Fix calculation of font->font.height
1078 and font->min_width.
1080 * ftxfont.c (ftxfont_create_gcs): New function.
1081 (ftxfont_draw_bitmap): Fix arg to ftfont_driver.get_bitmap.
1082 (ftxfont_draw_backgrond): Fix filling region.
1083 (ftxfont_default_fid): New function.
1084 (ftxfont_open): Set xfotn->fid to the return value of
1085 ftxfont_default_fid.
1086 (ftxfont_prepare_face): Use ftxfont_create_gcs to create GCs.
1087 (ftxfont_done_face): Free only GCs that are created by
1089 (ftxfont_draw): If face->gc != s->gc, create proper GCs.
1091 * xterm.c (x_set_glyph_string_clipping_exactly) [USE_FONT_BACKEND]:
1092 Clip to src->width, etc (not src->clip_XXX).
1094 * xfns.c (x_create_tip_frame) [USE_FONT_BACKEND]: Handle
1095 FontBackend frame parameter.
1097 2006-07-26 Kenichi Handa <handa@m17n.org>
1099 * font.h (struct font_driver_list): New member `on'.
1100 (Fclear_font_cache): EXFUN it.
1101 (font_update_drivers): Extern it.
1103 * font.c (font_unparse_fcname): Fix typo (swidth->width).
1104 (font_list_entities): Check driver_list->on.
1105 (register_font_driver): Initalize `on' member to 0.
1106 (font_update_drivers): New function.
1107 (Fclear_font_cache): Check driver_list->on.
1109 * frame.h (Qfont_backend): Extern it.
1110 (x_set_font_backend): Extern it.
1112 * frame.c (Qfont_backend): New variable.
1113 (frame_parms): New element for font-backend.
1114 (x_set_font_backend): New function.
1116 * xfns.c (Fx_create_frame) [USE_FONT_BACKEND]: Handle
1117 FontBackend frame parameter.
1118 (x_frame_parm_handlers) [USE_FONT_BACKEND]: New element
1121 * xfont.c (xfont_list): Don't try listing by :name property if the
1122 name is not for XLFD.
1124 2006-07-24 Kenichi Handa <handa@m17n.org>
1126 * font.h (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
1127 (LGLYPH_SET_TO): New macros.
1128 (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
1129 element of G is vector or not.
1130 (font_at): Extern it.
1132 * font.c: Include window.h.
1133 (font_lispy_object): New function.
1134 (font_prepare_composition): Check LGLYPH_FORM (g) to detect the
1136 (font_close_object): Fix getting (struct font *).
1137 (font_at): New function.
1138 (Ffont_get): If FONT is a font-object, get entity from it.
1139 (Ffont_make_gstring): Initialize elements of glyphs with nil.
1140 (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX. Fix
1142 (Ffont_at): New function.
1143 (syms_of_font): Defsubr Sfont_at.
1145 * xdisp.c (it_props): Move the entry for Qauto_composed to just
1146 before the entry for Qcompostion.
1147 (handle_auto_composed_prop): Call auto-composition-function with 4
1149 (handle_composition_prop) [USE_FONT_BACKEND]: Set it->face_id from
1150 the font in gstring.
1151 (fill_composite_glyph_string) [USE_FONT_BACKEND]: Check
1152 LGLYPH_FORM (g) to detect the end of valid glyph.
1153 (x_produce_glyphs) [USE_FONT_BACKEND]: Don't update it->face_id if
1154 we are composing with gstring.
1156 * xterm.c (x_draw_composite_glyph_string_foreground) [USE_FONT_BACKEND]:
1157 Check if adjustment is vector or not.
1159 * Makefile.in (font.o): Make it depends on window.h.
1161 2006-07-24 Kenichi Handa <handa@m17n.org>
1163 * xterm.c (x_draw_composite_glyph_string_foreground): Check if
1164 adjustment is vector or not.
1166 2006-07-20 Kenichi Handa <handa@m17n.org>
1168 * casefiddle.c (casify_object): Sync with HEAD.
1170 2006-07-18 Miles Bader <miles@gnu.org>
1172 * character.h (CHECK_CHARACTER): Redefine in terms of CHECK_TYPE.
1174 2006-07-14 Kenichi Handa <handa@m17n.org>
1176 * font.h (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
1177 (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format.
1178 (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
1180 * font.c (font_merge_old_spec): Treat '*' in foundry as a wild
1182 (DEVICE_DELTA): Fix typo.
1183 (font_otf_gpos): Adjusted for the change of LGLYPH format.
1184 (font_prepare_composition): Likewise.
1186 * xterm.c (x_draw_composite_glyph_string_foreground): Adjusted for
1187 the change of LGLYPH format.
1189 2006-07-07 Kenichi Handa <handa@m17n.org>
1191 * ftfont.c (ftfont_list): Fix typo.
1192 (ftfont_build_basic_charsets): Don't include letters with
1195 2006-07-09 Jan Dj
\e,Ad
\e(Brv <jan.h.d@swipnet.se>
1197 * xfaces.c (realize_non_ascii_face): Set face->extra to NULL.
1199 * xftfont.c (xftfont_done_face): Call XftDrawDestroy only if
1200 xftface_info is non-NULL.
1202 2006-07-07 Kenichi Handa <handa@m17n.org>
1204 * ftfont.c (ftfont_list): Fix typo.
1205 (ftfont_build_basic_charsets): Don't include letters with
1208 2006-07-05 Jan Dj
\e,Ad
\e(Brv <jan.h.d@swipnet.se>
1210 * ftfont.c (ftfont_list): Move misplaced #endif
1212 2006-07-05 Kenichi Handa <handa@m17n.org>
1214 * ftfont.c (ftfont_list): Pay attention to the case that
1215 FC_CAPABILITY is not defined.
1217 2006-07-03 Kenichi Handa <handa@m17n.org>
1219 * xftfont.c (xftfont_open): Set charset related members to -1.
1221 * ftfont.c (ftfont_list): Handle QCotf property. Handling of
1223 (ftfont_open): Set charset related members to -1.
1225 * fontset.c (Votf_script_alist): New variable.
1226 (syms_of_fontset): Initialize it.
1227 (fontset_font): Delete unused variable.
1229 * fontset.h (Votf_script_alist): Extern it.
1231 * font.c (font_find_for_lface): Code optimized.
1233 * font.h (font_close_object, font_merge_old_spec): Extern them.
1235 2006-06-28 Kenichi Handa <handa@m17n.org>
1237 * font.c (QCscalable, Qc, Qm, Qp, Qd): New variables.
1238 (syms_of_font): Initialize them.
1239 (font_pixel_size): Allow float value in dpi.
1240 (font_prop_validate_type): Deleted.
1241 (font_prop_validate_symbol, font_prop_validate_style): Argument
1242 changed. Caller changed.
1243 (font_prop_validate_non_neg): Renamed from
1244 font_prop_validate_size.
1245 (font_prop_validate_extra): Deleted.
1246 (font_prop_validate_spacing): New function.
1247 (font_property_table): Add elements for all known properties.
1248 (get_font_prop_index): Renamed from check_font_prop_name. New
1249 argument FROM. Caller changed.
1250 (font_prop_validate): Validate all known properties.
1251 (font_put_extra): Argument force deleted. Caller changed.
1252 (font_expand_wildcards): Make it static. Fix the way of shrinking
1254 (font_parse_xlfd): Arguemnt merge deleted. Fix handling of RESX,
1255 RESY, SPACING, and AVGWIDTH. Don't validate property values here.
1257 (font_unparse_xlfd): Handle dpi, spacing, and scalable properties.
1258 (font_parse_fcname): Arguemnt merge deleted. Fix parsing of point
1259 size. Don't validate properties values here. Caller changed.
1260 (font_unparse_fcname): Handle dpi, spacing, and scalable
1262 (font_open_by_name): Delete unused variable.
1263 (Ffont_spec): Likewise. Validate property values.
1264 (Ffont_match_p): New function.
1266 * font.h (QCscalable): Extern it.
1267 (font_parse_xlfd, font_parse_fcname): Prototype adjusted.
1269 * ftfont.c (ftfont_list): Handle properties dpi, spacing, and
1272 * xfont.c (xfont_query_font): Adjusted for the change of
1274 (xfont_list_pattern): New function.
1275 (xfont_list): Use xfont_list_pattern.
1277 * xftfont.c (xftfont_prepare_face): Cancel previous change.
1278 (xftfont_done_face): Likewise.
1280 2006-06-26 Kenichi Handa <handa@m17n.org>
1282 * font.h (Flist_fonts): EXFUN it.
1284 2006-06-25 Jason Rumney <jasonr@gnu.org>
1286 * w32term.c (w32_initialize): Add back smoothing_type and
1287 smoothing_enabled definitions.
1289 2006-06-23 Kenichi Handa <handa@m17n.org>
1291 * xterm.c (x_draw_glyph_string) [USE_FONT_BACKEND]: Check
1292 s->face->font on determining underline position.
1294 2006-06-21 Kenichi Handa <handa@m17n.org>
1296 * font.c (font_parse_xlfd): Fix generating of CHARSET_REGISTRY field.
1297 (font_has_char): Accept font-object too.
1298 (font_find_for_lface): Try at first with a size specified in face.
1300 * xftfont.c (xftfont_prepare_face): Make non-ascii face share
1301 face->extra with ascii face.
1302 (xftfont_done_face): Don't free face->extra of non-ascii face.
1304 2006-06-20 Kenichi Handa <handa@m17n.org>
1306 * frame.c (x_set_font) [USE_FONT_BACKEND]: Fix argument to
1309 2006-06-19 Kenichi Handa <handa@m17n.org>
1311 * font.h (QCspacing, QCdpi): Extern them.
1312 (enum font_spacing): New enum.
1313 (FONT_PIXEL_SIZE_QUANTUM): New macro.
1315 * font.c (POINT_TO_PIXEL): Don't divice POINT by 10.
1316 (QCspacing, QCdpi): New variables.
1317 (syms_of_font): Initialize them.
1318 (font_pixel_size): New function.
1319 (font_put_extra): New function.
1320 (font_parse_xlfd): Fix handling of font size. Add QCdpi property
1322 (font_parse_fcname): Handle enumenrated values (e.g. bold). Fix
1323 handling font size. Add QCname property that contains only
1325 (font_score): Change argument. Caller changed. Pay attention to
1326 FONT_PIXEL_SIZE_QUANTUM.
1327 (font_sort_entites): Fix handling of font size.
1328 (font_list_entities): Likewise.
1329 (font_find_for_lface): Likewise.
1330 (font_open_for_lface): Likewise.
1331 (font_open_by_name): Likewise.
1332 (Ffont_spec): Add QCname property that contains only unknown
1335 * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq. Don't
1336 include weight in listing pattern, instead check weight of each
1337 listed font. Don't include scalable in pattern. Pay attention to
1338 FONT_PIXEL_SIZE_QUANTUM.
1340 2006-06-19 Kenichi Handa <handa@m17n.org>
1342 * lread.c (read_escape): Fix the code synched with HEAD.
1344 * font.c (font_parse_fcname): Fix parsing of point-size.
1345 (font_unparse_fcname): Produce symbolic names for style
1347 (font_list_entities): Handle float size correctly.
1348 (font_open_by_name): Prefer `normal' property values if the name
1349 doesn't specify them.
1351 * fontset.c (Finternal_char_font): Use font_get_name, not
1354 * ftfont.c (ftfont_pattern_entity): Use the numeric value 100 for
1355 FC_WEIGHT_REGULAR. Exclude FC_SIZE and FC_PIXEL_SIZE from listing
1356 pattern. Don't force scalable.
1358 * xftfont.c (xftfont_open): For generating a name, start from
1361 2006-06-16 Jan Dj
\e,Ad
\e(Brv <jan.h.d@swipnet.se>
1363 * frame.h (x_new_fontset2): Fix prototype.
1365 2006-06-16 Kenichi Handa <handa@m17n.org>
1367 * font.h (struct font_driver): Member parse_name deleted.
1368 (font_match_p, font_get_spec, font_parse_fcname)
1369 (font_unparse_fcname): Extern them.
1370 (font_get_name): Prototype adjusted.
1372 * font.c (XLFD_SMALLNUM_MASK): Delete this macro.
1373 (XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
1374 (font_expand_wildcards): Fix handling ENCODING field. Avoid
1375 unnecessary checks for weight, slant, and swidth.
1376 (font_parse_fcname): New function.
1377 (font_unparse_fcname): New function.
1378 (font_parse_name): New function.
1379 (font_match_p): New function.
1380 (font_get_name): Return value changed to Lisp string.
1381 (font_get_spec): New function.
1382 (Qunspecified, Qignore_defface): Don't extern them.
1383 (font_find_for_lface): Assume that LFACE is fully specified.
1384 (font_load_for_face): If lface[LFACE_FONT_INDEX] is an font
1385 object, use it for FACE.
1386 (font_open_by_name): Call Ffont_spec with QCname prop. Don't call
1388 (Ffont_spec): Call font_parse_name, not font_parse_xlfd.
1390 * fontset.h (new_fontset_from_font) [USE_FONT_BACKEND]: Prototype
1393 * fontset.c (new_fontset_from_font) [USE_FONT_BACKEND]: Argument F
1394 deleted. Don't call Fnew_fontset. Instead, directly call
1397 * frame.h (x_new_fontset2) [USE_FONT_BACKEND]: Prototype adjusted.
1399 * frame.c (x_set_font) [USE_FONT_BACKEND]: Adjusted for the change
1402 * ftfont.c (Qmonospace, Qsans_serif, Qserif, Qmono, Qsans)
1403 (Qsans__serif): New variables.
1404 (ftfont_generic_family_list): New variable.
1405 (syms_of_ftfont): Initialize the above variables.
1406 (ftfont_pattern_entity): Argument NAME deleted.
1407 (ftfont_list_generic_family): New function.
1408 (ftfont_parse_name): Delete this function.
1409 (ftfont_list): Try generic family only when FcFontList found no
1411 (ftfont_list_family): Fix args to FcObjectSetBuild.
1413 * xfaces.c (check_lface_attrs) [USE_FONT_BACKEND]: Accept font
1414 object in attrs[LFACE_FONT_INDEX].
1415 (set_lface_from_font_name): Cancel all changes for font-backend.
1416 (set_lface_from_font_and_fontset) [USE_FONT_BACKEND]: New
1418 (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: Accept a
1419 font object in QCfont attribute.
1420 (set_font_frame_param) [USE_FONT_BACKEND]: Likewise.
1421 (realize_default_face) [USE_FONT_BACKEND]: Call
1422 set_lface_from_font_and_fontset.
1424 * xfns.c (x_default_font_parameter) [USE_FONT_BACKEND]: Try also
1425 "fixed", and signal error here if no suitable font was found.
1427 * xfont.c (xfont_parse_name): Delete this function.
1429 * xftfont.c (xftfont_open): Change coding style of error
1430 handling. Generate fontconfig's fontname pattern.
1432 * xterm.h (struct x_output) [USE_FONT_BACKEND]: New member fontp.
1433 (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro.
1435 * xterm.c (x_new_fontset2) [USE_FONT_BACKEND]: Change arguments.
1436 Both args FONTSET and FONT_OBJECT must be existing ones.
1438 2006-06-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1440 * macterm.c (mac_set_unicode_keystroke_event): Don't use MAKE_CHAR.
1442 2006-06-14 Kenichi Handa <handa@m17n.org>
1444 * xfont.c (xfont_open, xfont_encode_char): Fix typo.
1446 * font.h (struct font): Fix typo.
1448 * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
1450 (enum xlfd_field_mask): New enum.
1451 (intern_font_field): Argument changed. Caller changed. If digits
1452 are followed by non-digits, return a symbol.
1453 (font_expand_wildcards): New function.
1454 (font_parse_xlfd): Fix wildcard handling.
1455 (Ffont_spec): If :name is specified, reflect the info in the other
1458 * ftfont.c (ftfont_pattern_entity): Fix typo.
1459 (ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
1462 2006-06-09 Kenichi Handa <handa@m17n.org>
1464 * font.h (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
1466 * font.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Moved from
1468 (font_unparse_xlfd): Fix argument type declaration. Append "*" if
1469 registry doesn't specify encoding part.
1470 (font_find_for_lface): Pay attention to LFACE_FONT_INDEX.
1471 (font_open_by_name): At first try parsing the name.
1472 (syms_of_font): Declare Qiso8859_1, Qiso10646_1, and Qunicode_bmp
1475 * fontset.c (reorder_font_vector): Pay attention to the case that
1476 the 3rd element of font_def is nil.
1477 (fontset_font): For the default fontset, append one more fontset
1478 elements for a script-based font specification. Don't add script
1479 attribute on finding a font.
1480 (new_fontset_from_font): Unconditionally set FONTSET_ASCII to the
1482 (fontset_ascii_font): If a font can't be opened, return nil.
1484 * ftfont.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Moved to
1486 (ftfont_pattern_entity): New function.
1487 (ftfont_get_cache): Assume that freetype_font_cache is already
1489 (ftfont_list): Handle the case that a file is specified in font
1490 name. Use ftfont_pattern_entity to generate entities.
1491 (ftfont_has_char): Check if the pattern contains FC_CHARSET.
1492 (syms_of_ftfont): Initialize freetype_font_cache.
1494 * xftfont.c (xftfont_open): Make the font name fontconfig's
1495 style. Add BLOCK_INPUT and UNBLOCK_INPUT.
1496 (xftfont_close): Free font->font.name if not NULL.
1498 * xfont.c (xfont_list): If script is specified for a font, return
1500 (xfont_list_family): Declare argument type.
1502 * xfaces.c (set_lface_from_font_name): If a font doesn't have a
1503 name, set LFACE_FONT (lface) to nil.
1505 * xterm.c (x_new_fontset2): If an ASCII font couldn't be loaded,
1508 2006-06-08 Jason Rumney <jasonr@gnu.org>
1510 * w32term.c (w32_initialize): Manually sync 2006-06-05 change from
1513 2006-06-08 Kenichi Handa <handa@m17n.org>
1515 * emacs.c (main): Check -enable-font-backend arg after the check
1517 (standard_args): Add "-enable-font-backend".
1519 * coding.c (Ffind_operation_coding_system): Sync with HEAD.
1521 * callproc.c (Fcall_process): Sync with HEAD.
1523 * coding.h (CODING_REQUIRE_ENCODING): Comment sync with HEAD.
1525 2006-06-07 Kenichi Handa <handa@m17n.org>
1527 * xftfont.c (xftfont_default_fid): Set fid_known to 1.
1528 (struct xftdraw_list, xftdraw_list): Delete them.
1529 (register_xftdraw, check_xftdraw): Delete them.
1530 (xftfont_prepare_face): Don't call register_xftdraw.
1531 (xftfont_done_face): Don't call check_xftdraw.
1532 (xftfont_draw): Get backroudn color only when with_background is
1535 * xfont.c (xfont_encode_char): Fix calculation of char2b.
1537 2006-06-06 Kenichi Handa <handa@m17n.org>
1539 These changes are for the new font handling codes.
1541 * Makefile.in (ALL_CFLAGS): Add @FREETYPE_CFLAGS@,
1542 @FONTCONFIG_CFLAGS@, and @LIBOTF_CFLAGS@.
1543 (LIB_X11_LIB): If HAVE_XFT is defined, set to @XFT_LIBS@.
1544 (FONTSRC, FONTOBJ): New variables.
1545 (obj): Add $(FONTOBJ).
1546 (SOME_MACHINE_OBJECTS): Lib_X11_Lib.
1547 (LIBES): Add @FREETYPE_LIBS@, @FONTCONFIG_LIBS@, and
1549 (font.o, ftfont.o, xfont.o, xftfont.o, ftxfont.o): New targets.
1550 (fontset.o, xdisp.o, xfaces.o, xfns.o, xterm.o): Depends on
1553 * font.h, font.c, xfont.c, ftfont.c, xftfont.c, ftxfont.c: New
1556 * character.h (Vscript_representative_chars): Extern it.
1558 * character.c (Vscript_representative_chars): New variable.
1559 (syms_of_character): Declare it as a Lisp variable.
1561 * composite.c (get_composition_id) [USE_FONT_BACKEND]: If
1562 enable_font_backend is nonzero, accept the composition method
1563 COMPOSITION_WITH_GLYPH_STRING.
1565 * composite.h (enum composition_method) [USE_FONT_BACKEND]: New
1566 enumeration COMPOSITION_WITH_GLYPH_STRING.
1568 * config.in: Re-generated.
1570 * dispextern.h (struct glyph_string) [USE_FONT_BACKEND]: New
1571 members clip_x, clip_y, clip_width, and clip_height.
1572 (struct face) [USE_FONT_BACKEND]: New members font_info and extra.
1574 * emacs.c (main) [USE_FONT_BACKEND]: Handle arg
1575 --enable-font-backend. Call syms_of_font.
1577 * fns.c (assoc_no_quit): New function.
1579 * fontset.h (FONT_INFO_FROM_FACE): New macro.
1580 (face_for_font, new_fontset_from_font)
1581 (fontset_ascii_font) [USE_FONT_BACKEND]: Extern them.
1583 * fontset.c [USE_FONT_BACKEND]: Include "font.h".
1584 (fontset_font, fontset_ascii, face_for_char)
1585 (make_fontset_for_ascii_face, Ffont_info)
1586 (Finternal_char_font) [USE_FONT_BACKEND]: If enable_font_backend
1587 is nonzero, use font-backend mechanism.
1588 (find_font_encoding): Make it non-static.
1589 (new_fontset_from_font, fontset_ascii_font) [USE_FONT_BACKEND]:
1592 * frame.h (struct frame): New members resx and resy.
1593 (struct frame) [USE_FONT_BACKEND]: New member font_driver_list.
1594 (x_new_fontset2) [USE_FONT_BACKEND]: Extern it.
1596 * frame.c [USE_FONT_BACKEND]: Include "font.h".
1597 (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend
1600 * lisp.h (assoc_no_quit): Extern it.
1602 * xdisp.c: If USE_FONT_BACKEND is defined, include "font.h".
1603 Through out the file, use FONT_INFO_FROM_FACE instead of
1604 FONT_INFO_FROM_ID, use get_per_char_metric instead of
1605 rif->per_char_metric.
1606 (handle_composition_prop) [USE_FONT_BACKEND]: If the composition
1607 method is COMPOSITION_WITH_GLYPH_STRING, just set it->c to ' '.
1608 (get_glyph_face_and_encoding, fill_composite_glyph_string)
1609 (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
1610 (x_produce_glyphs) [USE_FONT_BACKEND]: If enable_font_backend is
1611 nonzero, use font-backend mechanism.
1612 (get_per_char_metric): New function.
1614 * xfaces.c [USE_FONT_BACKEND]: Include "font.h".
1615 (set_lface_from_font_name)
1616 (set_font_frame_param, free_realized_face)
1617 (prepare_face_for_display, clear_face_gcs)
1618 (Finternal_set_font_selection_order, realize_x_face)
1619 [USE_FONT_BACKEND]: If enable_font_backend is nonzero, use
1620 font-backend mechanism.
1621 (clear_face_cache) [USE_FONT_BACKEND]: Don't call
1623 (load_face_font) [USE_FONT_BACKEND]: Abort.
1624 (face_symbolic_value, face_symbolic_weight, face_symbolic_slant)
1625 (face_symbolic_swidth, face_for_font) [USE_FONT_BACKEND]: New
1628 * xfns.c [USE_FONT_BACKEND]: Include "font.h".
1629 (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
1630 (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
1631 nonzero, register all available font drivers. Call
1632 x_default_font_parameter for deciding a font.
1633 (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
1635 * xterm.c [USE_FONT_BACKEND]: Include "font.h".
1636 (x_set_mouse_face_gc, x_set_glyph_string_clipping)
1637 (x_set_glyph_string_clipping_exactly)
1638 (x_compute_glyph_string_overhangs)
1639 (x_draw_glyph_string_foreground)
1640 (x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
1641 (x_free_frame_resources) [USE_FONT_BACKEND]: If
1642 enable_font_backend is nonzero, use font-backend mechanism.
1643 (x_new_fontset2) [USE_FONT_BACKEND]: New function.
1645 2006-05-15 Kenichi Handa <handa@m17n.org>
1647 * coding.h (system_eol_type): Fix synching with HEAD.
1649 * coding.c (system_eol_type): Sync with HEAD.
1650 (coding_inherit_eol_type): If PARENT is nil, inherit from
1652 (syms_of_coding): Initialize system_eol_type.
1654 * callproc.c (Fcall_process): Sync with HEAD.
1656 * process.c (setup_process_coding_systems): Fix synching with
1658 (read_process_output): Likewise.
1659 (Fset_process_coding_system): Inherit system's eol format if
1662 * fileio.c (choose_write_coding_system): Fix synching with HEAD.
1664 * keymap.c (push_key_description): Fix synching with HEAD.
1666 2006-05-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1668 * macgui.h (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
1670 2006-04-07 Kenichi Handa <handa@m17n.org>
1672 * coding.c (decode_eol): Pay attention to buffer relocation in
1674 (decode_coding): Call decode_eol before restoring undo_list.
1676 2006-03-20 Kenichi Handa <handa@m17n.org>
1678 * charset.c (Fdefine_charset_internal): Fix setting of
1681 2006-03-14 Kenichi Handa <handa@m17n.org>
1683 * keyboard.c (read_char): Check if C is a character or not before
1684 looking up Vkeyboard_translate_table.
1686 2006-03-10 Kenichi Handa <handa@m17n.org>
1688 * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
1689 condition to terminate the loop.
1691 2006-03-09 Kenichi Handa <handa@m17n.org>
1693 * coding.c (produce_composition): Compare charbuf[i] instead of
1695 (Fterminal_coding_system): Use EQ to compare Lisp objects.
1697 2006-03-07 Kenichi Handa <handa@m17n.org>
1699 * coding.c (DECODE_COMPOSITION_START): If the source is short, set
1700 coding->result to CODING_RESULT_INSUFFICIENT_SRC.
1701 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
1703 (emacs_mule_char): Handle old style (Emacs 20) component character
1705 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Fix parsing a composition
1707 (DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
1708 (decode_coding_emacs_mule): Handle invalid bytes correctly.
1710 2006-03-04 Kenichi Handa <handa@m17n.org>
1712 * coding.c (encode_coding_ccl): Allocate destination dynamically
1715 2006-03-03 Kenichi Handa <handa@m17n.org>
1717 * ccl.c (Fccl_execute_on_string): Fix the condition of terminating
1718 the loop. When quitted, show a proper error message.
1720 2006-03-02 Kenichi Handa <handa@m17n.org>
1722 * coding.c (decode_coding): Fix previous change.
1724 * xterm.c (x_set_glyph_string_clipping_exactly): Set
1725 src->clip_head and src->clip_tail temporarily instead of src->hl.
1727 * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
1729 (Fccl_execute_on_string): Use ASET, not XSET.
1731 2006-03-01 Kenichi Handa <handa@m17n.org>
1733 * search.c (search_buffer): Fix handling of "\\" in a trivial
1736 2006-02-28 Kenichi Handa <handa@m17n.org>
1738 * coding.c (decode_coding): Fix the condition of terminating the
1741 2006-02-27 Kenichi Handa <handa@m17n.org>
1743 * data.c (Faset): On setting a character bigger than 255 in a
1744 unibyte string, signal an error instead of make the string
1747 2006-02-22 Kenichi Handa <handa@m17n.org>
1749 * charset.c (map_charset_chars): Fix for ascii-compatible charset
1750 made by a mapping table.
1752 2006-02-21 Kenichi Handa <handa@m17n.org>
1754 * xdisp.c (fill_composite_glyph_string): Check s->face is NULL or
1756 (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
1757 (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
1759 * xterm.c (x_draw_composite_glyph_string_foreground): Check
1760 s->face is NULL or not.
1762 2006-02-20 Kenichi Handa <handa@m17n.org>
1764 * xterm.c (x_set_glyph_string_clipping_exactly): New function.
1765 (x_draw_glyph_string): Fix drawing of right_overhang and
1766 left_overhang around/on cursor.
1768 * xdisp.c (draw_glyphs): Fix inclusion of right_overwriting
1771 * term.c (produce_glyphs): Sync to HEAD.
1773 2006-02-15 Kenichi Handa <handa@m17n.org>
1775 * xdisp.c (x_produce_glyphs): Handle composition with TAB.
1777 2006-02-05 Kenichi Handa <handa@m17n.org>
1779 * coding.c: Cancel incorrect synching with HEAD.
1781 2006-02-03 Kenichi Handa <handa@m17n.org>
1783 * coding.c (Fdefine_coding_system_internal): Avoid a duplicated
1784 element in Vcoding_system_alist.
1785 (Fdefine_coding_system_alias): Likewise.
1787 2006-01-19 Kenichi Handa <handa@m17n.org>
1789 * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
1791 * coding.c: Sync to HEAD for handling autoload-coding-system.
1792 (Qcoding_system_define_form): New variable.
1793 (syms_of_coding): Intern and staticpro it.
1794 (Fcoding_system_p): Check Qcoding_system_define_form.
1795 (Fcheck_coding_system): Try to autoload the definition of
1798 * coding.h (CODING_SYSTEM_P): If ID is not available, call
1800 (CHECK_CODING_SYSTEM): If ID is not available, call
1801 Fcheck_coding_system.
1802 (CHECK_CODING_SYSTEM_GET_SPEC): Try also Fcheck_coding_system.
1803 (CHECK_CODING_SYSTEM_GET_ID): Likewise.
1805 2006-01-17 Kenichi Handa <handa@m17n.org>
1807 * xterm.c (handle_one_xevent): Delete unnecessary code inserted by
1810 * coding.c (code_conversion_restore): GCPRO arg.
1812 2005-12-28 Kenichi Handa <handa@m17n.org>
1814 * character.c (lisp_string_width): Check multibyteness of STRING.
1816 2005-10-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1818 * macterm.c (mac_encode_char): Call ccl_driver with the last arg
1819 Qnil. Use JIS_TO_SJIS instead of ENCODE_SJIS.
1820 (decode_mac_font_name): Use decode_coding_c_string instead of
1822 (x_load_font): Initialize fontp->fontset to -1. Set
1823 fontp->encoding_type.
1825 2005-10-17 Kenichi Handa <handa@m17n.org>
1827 * search.c (search_buffer): Give up BM search on case-fold-search
1828 if one of a target character has a case-equivalence of different
1829 byte length even if that target charcter is an ASCII.
1830 (simple_search): Fix culculation of byte length of matched text.
1831 (boyer_moore): Fix handling of case-equivalent multibyte
1834 2005-10-15 Kenichi Handa <handa@m17n.org>
1836 * coding.c (decode_coding): Fix handling of invalid bytes.
1838 2005-10-06 Kenichi Handa <handa@m17n.org>
1840 * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
1843 2005-09-23 Kenichi Handa <handa@m17n.org>
1845 * coding.c (encode_coding_object): If a pre-write-conversion
1846 function makes a new buffer, kill it.
1848 2005-07-29 Kenichi Handa <handa@m17n.org>
1850 * coding.c (QCascii_compatible_p): New variable.
1851 (syms_of_coding): Initialize it.
1852 (ONE_MORE_BYTE): Decrement `src' before calling string_char.
1853 (ONE_MORE_BYTE_NO_CHECK): Likewise.
1854 (record_conversion_result): Add `default:' case.
1855 (coding_charset_list): Delete unused variable `coding_type'.
1856 (Fdefine_coding_system_internal): Add `ascii-compatible-p'
1857 property in the plist of the coding system.
1858 (Fcoding_system_put): Check QCascii_compatible_p.
1860 2005-06-09 Kenichi Handa <handa@m17n.org>
1862 * xdisp.c (get_next_display_element): Sync with the change in
1865 2005-06-06 Kenichi Handa <handa@m17n.org>
1867 * callproc.c (Fcall_process): Sync with the change in
1870 2005-06-05 Miles Bader <miles@gnu.org>
1872 * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
1873 removed calculation of frame `f', as it's now used.
1875 2005-05-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1877 * macterm.c (x_font_name_to_mac_font_name): Sync with trunk
1878 for the case that does not require code conversion.
1880 2005-05-11 Kenichi Handa <handa@m17n.org>
1882 * Makefile.in (shortlisp): Cancel previous change.
1883 (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
1884 (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
1885 (UNIDATA): New variable.
1886 (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
1887 (bootstrap-emacs${EXEEXT}): Depends on charprop.el. Run
1888 $(RUN_TEMACS) unconditionally.
1890 2005-05-10 Kenichi Handa <handa@m17n.org>
1892 * Makefile.in (shortlisp): Add ../lisp/international/charprop.el.
1893 (temacs${EXEEXT}): Build charprop.el if necessary.
1894 (admindir): New variable.
1895 ($(lispsource)international/charprop.el): New target.
1897 2005-05-04 Miles Bader <miles@gnu.org>
1899 * character.c (chars-in-region): Obsolete function removed.
1900 (syms_of_character): Remove its initialization.
1902 2005-04-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
1904 * w32select.c (validate_coding_system)
1905 (setup_windows_coding_system): New functions.
1906 (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
1907 setup_windows_coding_system.
1908 (setup_config, Fw32_get_clipboard_data): Use
1909 validate_coding_system.
1910 (Fx_selection_exists): Move call to setup_config to a place
1911 were signals are allowed.
1913 * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
1914 (Fcheck_coding_system): Add declarations.
1916 2005-04-28 Kenichi Handa <handa@m17n.org>
1918 * s/ms-w32.h (STDC_HEADERS): Sync with the change in
1921 2005-04-25 Kenichi Handa <handa@m17n.org>
1923 * charset.c (load_charset_map_from_vector): Fix for the first
1926 2005-04-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1928 * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
1929 string as the second argument for x_new_fontset.
1931 2005-04-18 Kenichi Handa <handa@m17n.org>
1933 * fns.c (Fstring_as_multibyte): Fix the change for syncing with
1936 2005-04-09 Kenichi Handa <handa@m17n.org>
1938 * search.c (search_buffer): Fix the change for syncing with CVS
1940 (search_buffer): Likewise.
1942 2005-03-31 Kenichi Handa <handa@m17n.org>
1944 * xdisp.c (get_next_display_element): Sync with CVS head.
1946 2005-03-29 Kenichi Handa <handa@m17n.org>
1948 * coding.c (decode_coding_object): Use safe_call1 instead of call1.
1949 (encode_coding_object): Use safe_call instead of call2.
1951 2005-03-14 Kenichi Handa <handa@m17n.org>
1953 * fontset.c (set_default_ascii_font): Fix the change for
1954 syncing with CVS head.
1956 2005-01-30 Kenichi Handa <handa@m17n.org>
1958 * fontset.c (Fset_fontset_font): Check family element of a given
1961 * Makefile.in (lisp): Include charprop.el.
1963 2005-01-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1965 * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
1966 Not sure if it's unnecessary.
1968 2005-01-16 Steven Tamm <steventamm@mac.com>
1970 * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
1971 some possibly unnecessary fontset checking code that crashed
1972 when creating a new frame
1974 2005-01-17 Kenichi Handa <handa@m17n.org>
1976 * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
1979 * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
1981 * fringe.c (draw_fringe_bitmap_1): Fix argument to
1984 2004-12-25 Kenichi Handa <handa@m17n.org>
1986 * xdisp.c (get_next_display_element): Sync to the change in HEAD
1989 2004-12-11 Kenichi Handa <handa@m17n.org>
1991 * search.c: Sync to the change in HEAD on 2004-11-19, 20.
1993 * w32console.c: Sync to the change in HEAD on 2004-12-01.
1995 * coding.c: Cancel the change done in HEAD on 2004-11-30.
1996 (coding_charset_list): New function.
1998 * coding.h (coding_charset_list): Extern it.
2000 * term.c: Sync to the change in HEAD on 2004-11-30.
2002 2004-12-09 Kenichi Handa <handa@m17n.org>
2004 * fontset.c (Fset_fontset_font): Call find_font_encoding with
2005 concatenation of family and registry.
2007 2004-12-06 Kenichi Handa <handa@m17n.org>
2009 * character.h (BYTE8_STRING): Fix typo.
2011 * editfns.c (Ftranslate_region_internal): Don't convert unibyte
2012 string to multibyte (sync to HEAD).
2014 * casefiddle.c (casify_region): Handle changes in byte-length
2015 using replace_range_2 (sync to HEAD).
2017 2004-11-24 Andreas Schwab <schwab@suse.de>
2019 * chartab.c (map_char_table): GCPRO table and arg.
2021 2004-10-29 Kenichi Handa <handa@m17n.org>
2023 * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
2026 2004-10-23 Kenichi Handa <handa@m17n.org>
2028 * fontset.c (fs_load_font): Use fast_string_match_ignore_case
2029 instead of fast_c_string_match_ignore_case.
2030 (find_font_encoding): Argument changed to Lisp_Object. Use
2031 fast_string_match_ignore_case instead of
2032 fast_c_string_match_ignore_case. Caller changed.
2034 2004-10-15 Kenichi Handa <handa@m17n.org>
2036 * xdisp.c (get_next_display_element): In unibyte case, decide to
2037 display in octal form by checking a chacter by
2038 UNIBYTE_CHAR_HAS_MULTIBYTE_P.
2040 * charset.c (Fset_unibyte_charset): Setup
2041 unibyte_has_multibyte_table.
2043 * character.c (unibyte_has_multibyte_table): New variable.
2045 * character.h (unibyte_has_multibyte_table): Extern it.
2046 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
2048 2004-10-14 Kenichi Handa <handa@m17n.org>
2050 * callproc.c (Fcall_process): Fix merging of 2004-10-13 change.
2052 2004-10-13 Kenichi Handa <handa@m17n.org>
2054 * coding.c (encode_coding_iso_2022): Fix handling of charset
2057 2004-10-12 Kenichi Handa <handa@m17n.org>
2059 * coding.c (setup_coding_system): If coding_system is nil, use
2061 (Fterminal_coding_system): Return nil if terminal coding system is
2063 (syms_of_coding): Define coding-system `undecided' here. Setup
2064 terminal_coding as `undecided'.
2066 2004-10-04 Kenichi Handa <handa@m17n.org>
2068 * xdisp.c (message_dolog, set_message_1): Call
2069 unibyte_char_to_multibyte with arg type int.
2071 * fileio.c (Fsubstitute_in_file_name): Fix previous change.
2073 * lread.c (read1): Fix reading of a char-table.
2075 * print.c (print_object): Include sub char-table in cicularities
2078 2004-10-01 Kenichi Handa <handa@m17n.org>
2080 * keymap.c (where_is_internal_2): Fix for the case that KEY is a
2081 cons. Append the found sequences in car of ARGS instead of
2084 2004-09-28 Kenichi Handa <handa@m17n.org>
2086 * fileio.c (report_file_error): Make a unibyte string from
2088 (Fsubstitute_in_file_name): Fix the arg to
2089 unibyte_char_to_multibyte. It is evaluated twice.
2091 2004-09-19 Kenichi Handa <handa@m17n.org>
2093 * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
2095 2004-09-14 Kenichi Handa <handa@m17n.org>
2097 * coding.c (detect_coding): Fix previous change.
2099 2004-09-13 Kenichi Handa <handa@m17n.org>
2101 * coding.c (detect_coding_utf_16): Don't set detect_info->found if
2103 (detect_coding): Optimization for ISO-2022 when no 8-bit data is
2105 (detect_coding_system): Likewise.
2107 2004-09-01 Jason Rumney <jasonr@gnu.org>
2109 * w32fns.c (x_to_w32_font): Update to use new coding struct.
2111 2004-08-17 Kenichi Handa <handa@m17n.org>
2113 * charset.c (Fdeclare_equiv_charset): Fix handing of CHARS.
2114 (Fiso_charset): Likewise.
2116 2004-08-03 Steven Tamm <steventamm@mac.com>
2118 * macterm.c (mac_encode_char): Add charset argument and update
2119 to use encoding_type.
2120 (x_new_font,x_new_fontset): Merge in changes from xterm.c;
2121 switch to pure fontset
2122 (decode_mac_font_name): Temporarily remove decoding
2123 (x_font_name_to_mac_font_name): Temporarily remove encoding
2124 (x_load_font): Temporarily remove encoding
2126 2004-06-30 Kenichi Handa <handa@m17n.org>
2128 * xfaces.c (Fface_font): If frame is not on a window system,
2129 ignore CHARACTER arg. If HAVE_WINDOW_SYSTEM is not defined, don't
2130 refer to face->font.
2131 (split_font_name_into_vector, build_font_name_from_vector)
2132 (lookup_non_ascii_face, realize_non_ascii_face): Define them only
2133 whne HAVE_WINDOW_SYSTEM is defined.
2135 2004-05-29 Kenichi Handa <handa@m17n.org>
2137 * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
2138 (x_produce_glyphs): Fix setting of members of cmp in case
2139 cmp->glyph_len is zero,
2141 * fontset.c (Fset_fontset_font): Docstring fixed.
2142 (Ffontset_info): Make it backward compatible. New arg ALL.
2144 2004-05-11 Kim F. Storm <storm@cua.dk>
2146 * process.c (read_process_output): Grow decoding_buf when needed;
2147 this could cause a crash in allocate_string and compact_small_strings.
2149 2004-04-29 Kenichi Handa <handa@m17n.org>
2151 * fileio.c (WRITE_BUF_SIZE): This macro deleted.
2152 (e_write): Fix previous change.
2154 2004-04-28 Kenichi Handa <handa@m17n.org>
2156 * coding.c (setup_coding_system): Set coding->common_flags
2157 correctly for raw-text.
2158 (consume_chars): On encoding unibyte text by raw-text, don't check
2160 (encode_coding): On encoding by raw-text, never use translation
2163 * fileio.c (e_write): Short cut for the case of no encoding.
2165 2004-04-20 Kenichi Handa <handa@m17n.org>
2167 * coding.c (detect_coding): Delete unused variables.
2168 (detect_coding_system): Likewise.
2170 2004-04-18 Kenichi Handa <handa@m17n.org>
2172 * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
2173 (consume_chars): Fix handling of 8-bit bytes in unibyte source.
2175 2004-04-14 Kenichi Handa <handa@m17n.org>
2177 Sync all files to HEAD.
2179 2004-04-14 Kenichi Handa <handa@m17n.org>
2181 * coding.c (Ffind_coding_systems_region_internal): Include
2182 raw-text and no-conversion in the result.
2184 * fontset.h: Sync to HEAD.
2186 * fontset.c: Sync to HEAD.
2188 2004-04-14 Kenichi Handa <handa@m17n.org>
2190 * fontset.c (find_font_encoding): Return `ascii' for unknown
2192 (load_font_get_repertory): Delete unnecessary check of ENCODING of
2194 (font_def_arg, add_arg, from_arg, to_arg): New args.
2195 (set_fontset_font): Argument changed.
2196 (Fset_fontset_font): Fix for the case that TARGET is a script
2197 name and charset name.
2198 (new_fontset_from_font_name): Fix argument to Fnew_fontset.
2200 2004-04-13 Kenichi Handa <handa@m17n.org>
2202 * fontset.c (fontset_font): Renamed from fontset_face. Return
2204 (face_suitable_for_char_p): Adjusted for the change of
2206 (face_for_char): Likewise.
2207 (make_fontset_for_ascii_face): Fix setting of the fontset element
2209 (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
2211 (Ffontset_info): Adjusted for the change of fontset_font.
2213 * composite.c: Sync to HEAD.
2215 * search.c: Sync to HEAD.
2217 * coding.c: Sync to HEAD.
2218 (emacs_mule_char): Check invalid code more regidly.
2220 * coding.h: Sync to HEAD.
2222 * charset.c: Sync to HEAD.
2224 * charset.h: Sync to HEAD.
2226 * character.h (LEADING_CODE_LATIN_1_MIN)
2227 (LEADING_CODE_LATIN_1_MAX): Delete these macros.
2229 2004-04-08 Kenichi Handa <handa@m17n.org>
2231 * category.h: Sync to HEAD.
2233 * category.c: Sync to HEAD.
2235 * syntax.h: Sync to HEAD.
2237 * syntax.c: Sync to HEAD.
2239 * regex.h: Sync to HEAD.
2241 * regex.c: Sync to HEAD.
2243 2004-04-07 Kenichi Handa <handa@m17n.org>
2245 * editfns.c: Sync to HEAD.
2246 (check_translation): New function.
2247 (Ftranslate_region_internal): Handle M:N mapping.
2249 2004-04-06 Kenichi Handa <handa@m17n.org>
2251 * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
2253 2004-03-30 Kenichi Handa <handa@m17n.org>
2255 * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
2257 (decode_coding_iso_2022): Fix handling of invalid designation.
2259 * fileio.c (Finsert_file_contents): Be sure to call unbind_to
2260 after calling code_conversion_save.
2262 2004-03-11 Kenichi Handa <handa@m17n.org>
2264 * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
2266 * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
2268 * fontset.c: Include "intervals.h".
2269 (fontset_face): Fix comparing of Lisp_Objects.
2270 (free_face_fontset): Fix Lisp_Object/int mixup.
2271 (new_fontset_from_font_name): Likewise.
2273 * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
2275 * coding.c: Add many prototypes for static functions.
2276 (get_translation_table): Allow max_lookup to be NULL.
2277 (decode_coding): Call get_translation_table with max_lookup NULL.
2278 (Ffind_coding_systems_region_internal): Likewise.
2279 (Funencodable_char_position, Fcheck_coding_systems_region):
2282 2004-03-11 Kenichi Handa <handa@m17n.org>
2284 * coding.c (get_translation_table): Declare it as Lisp_Object.
2285 (LOOKUP_TRANSLATION_TABLE): New macro.
2286 (produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of
2288 (consume_chars): Likewise.
2290 2004-03-11 Kenichi Handa <handa@m17n.org>
2292 * coding.c (MAX_ANNOTATION_LENGTH): Adjusted for the change of
2293 annotation data format.
2294 (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
2295 Change arguments FROM and TO to single argument NCHARS. Caller
2297 (decode_coding_utf_8): Pay attention to coding->charbuf_used.
2298 (decode_coding_utf_16, decode_coding_emacs_mule)
2299 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
2300 (decode_coding_ccl, decode_coding_charset): Likewise.
2301 (get_translation): New function.
2302 (produce_chars): New arguments translation_table and last_block.
2303 Translate characters here. Return number of carryover chars.
2305 (produce_composition): New argument pos. Caller changed.
2306 Adjusted for the change of annotation data format.
2307 (produce_charset, produce_annotation): Likewise.
2308 (decode_coding, encode_coding): Don't call translate_chars.
2309 (consume_chars): New arg translation_table. Caller changed.
2310 (translate_chars): Deleted.
2311 (syms_of_coding): Make translation-table's number of extra slots
2314 2004-03-09 Kenichi Handa <handa@m17n.org>
2316 * search.c (simple_search): Fix setting this_pos_byte in backward
2319 * coding.c (detect_coding_emacs_mule): Fix counting of encoded
2321 (detect_coding_ccl): Fix setting of the variable valids.
2323 2004-03-04 Kenichi Handa <handa@m17n.org>
2325 * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
2327 * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
2329 * editfns.c (Ftranslate_region_internal): Renamed from
2330 Ftranslate_region. Accept a char-table in TABLE.
2331 (syms_of_editfns): Defsubr Stranslate_region_internal.
2333 * xfaces.c (set_lface_from_font_name): If a font is specified for
2334 a frame, generate a fontset from the font.
2335 (build_scalable_font_name): If the scalable font is requested for
2336 a specific size, don't change that size.
2337 (try_font_list): Try a scalable font also in the case that a
2338 pattern string is specified,
2341 2004-03-03 Kenichi Handa <handa@m17n.org>
2343 * xfaces.c (Fface_font): New optional arg CHARACTER.
2345 2004-02-17 Kenichi Handa <handa@m17n.org>
2347 * charset.h (CHARSET_OFFSET): New macro.
2349 2004-02-13 Kenichi Handa <handa@m17n.org>
2351 * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
2353 * fontset.c (fontset_face): Handle the case that repertory is a
2355 (find_font_encoding): Return nil for unknown encoding.
2356 (Fset_fontset_font): Ignore a font of unknown encoding.
2358 2004-02-09 Kenichi Handa <handa@m17n.org>
2360 * keymap.c (describe_vector): Handle default value of a char
2363 * fontset.c (fontset_face): Handle fallback fonts correctly.
2364 (Ffontset_info): Return infomation about fallback fonts.
2366 2004-02-06 Kenichi Handa <handa@m17n.org>
2368 * fontset.c (FONTSET_DEFAULT): New macro.
2369 (FONTSET_ADD): Handle the case that range is nil.
2370 (fontset_add): Likewise.
2371 (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
2372 the case that it is nil.
2373 (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
2374 (syms_of_fontset): Set char-table-extra-slots property of fontset
2377 * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
2380 2004-01-30 Kenichi Handa <handa@m17n.org>
2382 * emacs.c (main): Call init_charset after syms_of_XXX.
2384 * charset.c (Vcharset_map_directory): Deleted.
2385 (Vcharset_map_path): New variable
2386 (load_charset_map_from_file): Use Vcharset_map_path instead.
2387 (init_charset): Initialize Vcharset_map_path.
2388 (syms_of_charset): Delete declaration of "charset-map-directory",
2389 add declaration of "charset-map-path".
2391 2004-01-29 Kenichi Handa <handa@m17n.org>
2393 * fns.c (string_char_to_byte): Optimize for ASCII only string.
2394 (string_byte_to_char): Likewise.
2396 * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
2398 * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
2399 (detect_coding): Treat '\0' as normal ASCII byte..
2400 (detect_coding_system): Likewise.
2402 2004-01-27 Kenichi Handa <handa@m17n.org>
2404 * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
2406 * coding.c (QCmnemonic, QCdefalut_char)
2407 (QCdecode_translation_table, QCencode_translation_table)
2408 (QCpost_read_conversion, QCpre_write_conversion): New variables.
2409 (get_translation_table): Return a list of translation tables if
2411 (decode_coding): Call get_translation_table with ENCODEP 0.
2412 (char_encodable_p): If translation_table is non-nil, always call
2414 (Fdefine_coding_system_internal): Accept list of translation
2415 tables as :encode-translation-table and :decode-translation-table.
2416 (Fcoding_system_put): New function.
2417 (syms_of_coding): Declare new symbols. Defsubr
2419 (decode_coding_sjis): Handle 4th charset (typically JISX0212).
2420 (encode_coding_sjis): Likewise.
2422 * charset.c (map_charset_chars): Fix arg to map_charset_chars in
2423 when the charset is superset type.
2425 * character.c (translate_char): Accept list of translation tables.
2427 2004-01-25 Kenichi Handa <handa@m17n.org>
2429 * coding.h (enum coding_attr_index): New member
2430 coding_attr_trans_tbl.
2431 (CODING_ATTR_TRANS_TBL): New macro.
2433 * coding.c (get_translation_table): New function.
2434 (translate_chars): Fix the bug of skipping annotation data.
2435 (decode_coding): Utilze get_translation_table.
2436 (encode_coding): Likewise.
2437 (char_encodable_p): Translate char if necessary.
2438 (Funencodable_char_position): Likewise.
2439 (Ffind_coding_systems_region_internal): Setup translation table
2440 for encode in a coding system attribute vector in advance.
2441 (Fcheck_coding_systems_region): Likewise.
2442 (Fdefine_coding_system_internal): Allow a symbol as translation
2443 table. For shift-jis type coding system, allow 4th charset.
2445 2004-01-24 Kenichi Handa <handa@m17n.org>
2447 * coding.c (decode_coding_sjis): Check the first byte rigidly.
2449 * xdisp.c (get_next_display_element): Pass -1 as POS to
2450 FACE_FOR_CHAR if displaying a C-string.
2452 2004-01-23 Kenichi Handa <handa@m17n.org>
2454 * composite.c (get_composition_id): Handle xoff and yoff in a
2457 * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
2458 (struct composition): New member lbearing and rbearing.
2460 * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
2461 (x_get_glyph_overhangs): Handle a composition glyph.
2462 (x_produce_glyphs): Setup lbearing and rbreaing for a composition
2465 * xterm.c (x_compute_glyph_string_overhangs): Handle also a
2468 2004-01-18 Kenichi Handa <handa@m17n.org>
2470 * print.c: Include charset.h.
2471 (Vprint_charset_text_property): New variable.
2472 (Qdefault): Extern it.
2473 (PRINT_STRING_NON_CHARSET_FOUND)
2474 (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
2475 (print_check_string_result): New variable.
2476 (print_check_string_charset_prop): New function.
2477 (print_prune_charset_plist): New variable.
2478 (print_prune_string_charset): New function.
2479 (print_object): Call print_prune_string_charset if
2480 Vprint_charset_text_property is not t.
2481 (print_interval): Print nothing if itnerval->plist is nil.
2482 (syms_of_print): Declare Vprint_charset_text_property as a lisp
2483 variable. Init and staticpro print_prune_charset_plist.
2485 2004-01-15 Kenichi Handa <handa@m17n.org>
2487 * fontset.c (new_fontset_from_font_name): Use the specified font
2488 for all characters in the new fontset.
2490 * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
2493 * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
2494 OBJECT args for composition too.
2496 * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
2499 2004-01-13 Kenichi Handa <handa@m17n.org>
2501 * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
2503 * fontset.c (reorder_font_vector): Adjusted for the change of
2505 (fontset_face): New arg id. Caller changed.
2506 (face_for_char): New args pos and object.
2507 (make_fontset_for_ascii_face): Adjusted for the change of FONT_DEF
2509 (fs_query_fontset): Check NAME by Fassoc too.
2510 (Fset_fontset_font): Allow non-XLFD font name.
2511 (Ffontset_info): Adjusted for the change of FONT_DEF format.
2513 * fontset.h (face_for_char): Prototype adjusted.
2515 * xdisp.c (face_before_or_after_it_pos): Call FACE_FOR_CHAR with
2516 POS and OBJECT args.
2517 (get_next_display_element): Likewise.
2518 (append_space): Likewise.
2519 (extend_face_to_end_of_line): Likewise.
2520 (get_char_face_and_encoding): Likewise.
2521 (BUILD_COMPOSITE_GLYPH_STRING): Likewise.
2522 (x_produce_glyphs): Likewise.
2524 * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
2525 POS and OBJECT args.
2527 * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
2528 POS and OBJECT args.
2530 2004-01-03 Jason Rumney <jasonr@gnu.org>
2532 * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
2533 of GlobalAlloc'ed memory.
2535 2003-12-29 Kenichi Handa <handa@m17n.org>
2537 * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
2539 * charset.h (charset_table_used): Delete extern.
2541 * charset.c (charset_table_used): Make it static.
2542 (map_charset_chars): Fix args to c_function with.
2544 * chartab.c (map_sub_char_table_for_charset): Fix args to
2547 * coding.h (enum coding_result_code): Delete
2548 CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
2550 * coding.c (Qinsufficient_source, Qinconsistent_eol)
2551 (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New
2553 (Vlast_code_conversion_error): New variables.
2554 (syms_of_coding): DEFSYM or DEFVAR_LISP them.
2555 (ONE_MORE_BYTE): Record error if any instead of signaling an
2556 error. If non-ASCII multibyte char is found, return the negative
2557 value of the code. All callers changed to check it.
2558 (ONE_MORE_BYTE_NO_CHECK): Likewise.
2559 (record_conversion_result): New function. All codes setting
2560 coding->result are changed to call this function.
2561 (detect_coding_utf_8): Don't use the local variable incomplete.
2562 (decode_coding_utf_8): Likewise.
2563 (emacs_mule_char): Change the second arg to `const'.
2564 (detect_coding_emacs_mule): Don't use the local variable
2566 (detect_coding_sjis): Likewise.
2567 (detect_coding_big5): Likewise.
2568 (decode_coding): Fix of flushing out unprocessed data.
2569 (make_conversion_work_buffer): Fix making of a work buffer.
2570 (decode_coding_object): Return coding->dst_object;
2572 * fontset.c (set_fontset_font): Fix args.
2574 * lisp.h (CHARACTERBITS): Define as 22.
2576 * process.c (send_process): Be sure to set coding->src_multibyte.
2578 * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
2580 2003-12-02 Kenichi Handa <handa@m17n.org>
2582 * xdisp.c (handle_auto_composed_prop): Give limit to
2583 Fnext_single_char_property_change.
2585 2003-12-02 Kenichi Handa <handa@m17n.org>
2587 * coding.c (detect_coding): Fix previous change.
2588 (detect_coding_system): Likewise.
2590 2003-12-02 Kenichi Handa <handa@m17n.org>
2592 * composite.c (syms_of_composite): Don't make the compostion hash
2595 * fontset.c (Fset_fontset_font): Fix docstring.
2597 * lisp.h (detect_coding_system): Adjust prototype.
2599 * fileio.c (kill_workbuf_unwind): Delete this function.
2600 (Finsert_file_contents): Adjust the call of detect_coding_system.
2601 Get conversion_buffer by code_conversion_save. Use the macor
2602 CODING_MAY_REQUIRE_DECODING. After decoding, update
2605 * coding.h (make_conversion_work_buffer): Delete extern.
2606 (code_conversion_save): Extern it.
2608 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
2609 (CODING_GET_INFO): Delete argument eol_type. Callers changed.
2610 (decode_coding_utf_8): Don't do eol converion.
2611 (detect_coding_utf_16): Check coding->src_chars, not
2612 coding->src_bytes. Add heuristics for those that have no
2614 (decode_coding_emacs_mule): Don't do eol converion.
2615 (decode_coding_iso_2022): Likewise.
2616 (decode_coding_sjis): Likewise.
2617 (decode_coding_big5): Likewise.
2618 (decode_coding_charset): Likewise.
2619 (adjust_coding_eol_type): Return a new coding system.
2620 (detect_coding): Don't detect eol. Fix for utf-16 detection.
2621 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
2623 (decode_coding): Pay attention to undo_list. Do eol convesion for
2624 all types of coding-systems (if necessary).
2625 (Vcode_conversion_work_buf_list): Delete it.
2626 (Vcode_conversion_reused_workbuf): Renamed from
2627 Vcode_conversion_reused_work_buf.
2628 (Vcode_conversion_workbuf_name): New variable.
2629 (reused_workbuf_in_use): New variable.
2630 (make_conversion_work_buffer): Delete the arg DEPTH.
2631 (code_conversion_restore): Argument changed to cons.
2632 (code_conversion_save): Delete the argument BUFFER. Callers
2634 (detect_coding_system): New argument src_chars. Callers changed.
2635 Fix for utf-16 detection.
2636 (init_coding_once): Don't use ISO_carriage_return.
2637 (syms_of_coding): Initialized Vcode_conversion_workbuf_name and
2638 reused_workbuf_in_use.
2640 2003-11-24 Kenichi Handa <handa@m17n.org>
2642 * keymap.c (store_in_keymap): Pay attention to the case that idx
2643 is a cons specifying a character range.
2645 * coding.c (Fdefine_coding_system_internal): Fix previous change.
2647 2003-11-23 Kenichi Handa <handa@m17n.org>
2649 * xdisp.c (handle_auto_composed_prop): Fix the case of returning
2650 HANDLED_RECOMPUTE_PROPS.
2652 * coding.c (Fdefine_coding_system_internal): Fix checking of
2653 ascii compatibility.
2655 2003-11-22 Kenichi Handa <handa@m17n.org>
2657 * charset.c (find_charsets_in_text): Delete unused locale
2659 (Fset_charset_priority): Update Vemacs_mule_charset_list too.
2661 * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
2662 Resync charset_list to Vemacs_mule_charset_list.
2664 * keymap.c (store_in_keymap): Pay attention to the case that idx
2665 is a cons specifying a character range.
2667 2003-11-18 Kenichi Handa <handa@m17n.org>
2669 * composite.c (update_compositions): Bind inhibit-read-only, etc
2670 to t before calling remove-list-of-text-properties.
2672 * print.c (print_object): Always print ASCII chars as is.
2674 2003-11-17 Kenichi Handa <handa@m17n.org>
2676 * keymap.c (Fdefine_key): Fix handling of Lucid style event type
2679 * fns.c (Fmapconcat): Signal an error if SEQUENCE is a char table.
2680 (Fmapcar): Likewise.
2683 2003-11-15 Kenichi Handa <handa@m17n.org>
2685 * syntax.c (skip_chars): Be sure to alloca char_ranges when
2688 2003-11-14 Kenichi Handa <handa@m17n.org>
2690 * xfaces.c (set_lface_from_font_name): Fix for the case that
2691 FONTNAME is not fontset name.
2693 2003-11-13 Kenichi Handa <handa@m17n.org>
2695 * fns.c (base64_encode_1): Fix previous change.
2697 2003-11-08 Kenichi Handa <handa@m17n.org>
2699 * fontset.c (set_fontset_font): New function.
2700 (Fset_fontset_font): If a font is specified for a charset, use
2701 map_charset_chars to store the font spec in a fontset.
2703 2003-10-29 Kenichi Handa <handa@m17n.org>
2705 * fontset.c (fontset_face): Create a fallback fontset on demand
2706 (make_fontset): Don't create a fallback fontset here.
2707 (free_face_fontset): Free a fallback fontset (if any) too.
2708 (n_auto_fontsets): Delete this variable.
2709 (auto_fontset_alist): New variable.
2710 (new_fontset_from_font_name): Check auto_fontset_alist.
2711 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
2712 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
2713 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
2714 Defsubr Sfontset_list_all.
2716 2003-10-24 Kenichi Handa <handa@m17n.org>
2718 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
2720 2003-10-23 Kenichi Handa <handa@m17n.org>
2722 * fontset.c (Fnew_fontset): Check NAME more rigidly.
2724 2003-10-17 Kenichi Handa <handa@m17n.org>
2726 * editfns.c (Fgoto_char): Fix docstring.
2728 2003-10-16 Kenichi Handa <handa@m17n.org>
2730 * insdel.c (insert_from_gap): Adjust intervals correctly.
2732 2003-10-12 Jason Rumney <jasonr@gnu.org>
2734 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
2735 (pfnGetFontUnicodeRanges): New dynamically loaded function.
2736 (w32_initialize): Try to load it.
2737 (x_get_font_repertory): Use it if available.
2738 (w32_encode_char): Add shortcut for unicode output.
2740 * w32fns.c (w32_load_system_font): Default charset to -1.
2741 (x_to_w32_charset): Match all fonts for unicode.
2742 (w32_to_x_charset): New parameter matching. Don't return partial
2743 or wildcard charsets.
2744 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
2745 (w32_codepage_for_font): Return CP_UNICODE for unicode.
2746 (w32_to_x_font): Match charset to real charset.
2747 (enum_font_cb2): Always list unicode versions.
2749 * makefile.w32-in (temacs): Increase EMHEAP.
2751 2003-10-11 Jason Rumney <jasonr@gnu.org>
2753 * w32term.c (w32_encode_char): New charset parameter.
2754 font_info.encoding becomes encoding_type.
2755 (x_get_font_repertory): New function. Warning: stub only!
2756 (x_new_font): Return quickly if font already set.
2757 (x_new_fontset): fontsetname parameter is Lisp_Object.
2758 Use new fs_query_fontset. Try new_fontset_from_font_name. Use
2759 fontset_name for return value.
2761 * w32term.h: Declare x_get_font_repertory.
2763 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
2764 place of find_charset_in_text. Use encode_coding_object in place
2766 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
2769 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
2771 (w32_load_system_font): Initialize charset as unicode.
2772 font_info.encoding becomes encoding_type.
2773 (w32_to_x_font): Use decode_coding_c_string in place of
2775 (x_to_w32_font): Use encode_coding_object in place of
2777 (syms_of_w32fns): Set get_font_repertory_func.
2779 * w32console.c: Include character.h. Use terminal_encode_buffer
2781 (write_glyphs): Use new version of encode_terminal_code. Use
2782 encode_coding_object in place of encode_coding.
2784 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
2785 encoding becomes encoding_type.
2787 * term.c (terminal_encode_buffer): Make externally visible.
2789 * makefile.w32-in: Add character.h dependancies.
2790 (character.o, chartab.o): New targets.
2792 2003-10-10 Kenichi Handa <handa@m17n.org>
2794 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
2795 CODING_ID_EOL_TYPE..
2797 2003-10-07 Andreas Schwab <schwab@suse.de>
2799 * coding.c (produce_chars): Revert last change.
2801 2003-10-06 Kenichi Handa <handa@m17n.org>
2803 * charset.h (charset_unicode): Extern it.
2805 * charset.c (string_xstring_p): Check by (C >= 0x100).
2806 (find_charsets_in_text): Format of the arc CHARSETS changed. New
2808 (Ffind_charset_region, Ffind_charset_string): Adjusted for the
2809 change of find_charsets_in_text.
2810 (Fsplit_char): Fix doc. Never return unknown.
2812 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
2814 * coding.c (Fdefine_coding_system_alias): Update
2815 Vcoding_system_list.
2817 * fontset.c (load_font_get_repertory): Pay attention to the case
2818 that ENCODING of a font is specified by a char-table.
2820 * xterm.c (x_get_font_repertory): Handle the case that the
2821 encoding of font is other than Unicode.
2823 2003-10-02 Kenichi Handa <handa@m17n.org>
2825 * term.c (encode_terminal_code): Don't handle glyph-table. Check
2826 if a character is encodable by the terminal coding system. If
2827 not, produces proper number of `?'s. Update
2828 terminal_encode_buffer and terminal_encode_buf_size if necessary.
2829 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
2831 2003-10-01 Kenichi Handa <handa@m17n.org>
2833 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
2835 (encode_terminal_code): Argument changed. Encode multiple
2836 characters at once. Store the result of encoding in
2837 terminal_encode_buffer.
2838 (write_glyphs): Adjusted for the change of encode_terminal_code.
2839 (insert_glyphs): Likewise.
2840 (term_init): Initialize terminal_encode_buffer and
2841 terminal_encode_buf_size.
2843 * coding.c (consume_chars): If coding->src_object is nil, don't
2846 2003-09-30 Kenichi Handa <handa@m17n.org>
2848 * character.c (char_string): Use ASCII_CHAR_P instead of
2851 2003-09-30 Kenichi Handa <handa@m17n.org>
2853 * xdisp.c (handle_auto_composed_prop): Check if the last
2854 characters of auto-composed region is newly composed with the
2855 following characters.
2856 (handle_composition_prop): Fix checking of point being inside
2859 2003-09-26 Kenichi Handa <handa@m17n.org>
2861 * fns.c (concat): Don't change multibyteness of the result by
2862 concatenating an 8-bit character.
2864 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
2865 multibyteness of the result when newelt is an 8-bit character.
2867 2003-09-29 Dave Love <fx@gnu.org>
2869 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
2872 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
2874 * xfaces.c (face_numeric_value): Declare dim size_t.
2875 (Finternal_lisp_face_equal_p): Remove unused f.
2877 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
2878 (MATRIX_ROW): Remove unused vars.
2879 (draw_glyphs, x_insert_glyphs, fast_find_position)
2880 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
2883 * regex.c (regex_compile): Remove unused var.
2885 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
2887 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
2888 (Faccessible_keymaps, where_is_internal): Remove unused vars.
2890 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
2892 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
2894 * fileio.c (Fwrite_region): Remove unused var.
2896 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
2897 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
2899 * composite.c (Fremove_list_of_text_properties): Declare.
2901 * coding.c (inhibit_pre_post_conversion): Removed (unused).
2902 (alloc_destination, produce_chars): Use EMACS_INT for byte/char
2904 (coding_inherit_eol_type): Remove unused attrs.
2905 (detect_coding): Cast arg of detect_eol.
2907 * charset.c (syms_of_charset): Remove unused var p.
2908 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
2911 * casetab.c (set_case_table): Remove unused var.
2913 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
2916 2003-09-26 Dave Love <fx@gnu.org>
2918 * xterm.c (x_bitmap_mask): Declare.
2920 2003-09-17 Dave Love <fx@gnu.org>
2922 * xterm.c (x_term_init): Fix type error.
2924 * lisp.h: Add Funibyte_char_to_multibyte.
2926 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
2927 (Fset_coding_system_priority): Doc fix.
2929 * alloc.c: Sync with HEAD version.
2931 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
2933 * indent.c (check_composition): Make start and end EMACS_INT.
2935 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
2937 * xdisp.c (handle_composition_prop, check_point_in_composition):
2938 Make buffer positions EMACS_INT.
2940 * composite.c (find_composition, run_composition_function)
2941 (update_compositions, Ffind_composition_internal): Make buffer
2942 positions EMACS_INT.
2944 * composite.h (find_composition, update_compositions): Make
2945 position args EMACS_INT.
2947 * keyboard.c (adjust_point_for_property): Make beg and end
2950 * intervals.c (get_property_and_range):
2951 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
2953 * unexalpha.c: Don't include varargs.h.
2955 2003-09-16 Dave Love <fx@gnu.org>
2957 * coding.h (ENCODE_UTF_8): New.
2959 * Makefile.in (gtkutil.o): Depend on coding.h.
2961 * coding.c (Fset_coding_system_priority): Doc fix.
2963 2003-09-16 Kenichi Handa <handa@m17n.org>
2965 * fileio.c (Finsert_file_contents): Call setup_coding_system in
2966 the case of auto saving.
2968 2003-09-10 Andreas Schwab <schwab@suse.de>
2970 * chartab.c (map_char_table): Protect `range' from GC.
2971 (map_char_table_for_charset): Likewise.
2973 2003-07-09 Kenichi Handa <handa@m17n.org>
2975 * coding.c (decode_coding_sjis): Check bytes more rigidly.
2977 2003-06-26 Kenichi Handa <handa@m17n.org>
2979 * fileio.c (choose_write_coding_system): Return a decided coding
2981 (Fwrite_region): Set Vlast_coding_system_used to the return value
2982 of choose_write_coding_system.
2984 2003-06-06 Kenichi Handa <handa@m17n.org>
2986 * charset.c (Fset_charset_priority): Pay attention to duplicated
2989 * coding.c (QCcategory): New variable.
2990 (syms_of_coding): Defsym it. Set all elements of
2991 Vcoding_category_table and their symbol values.
2992 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
2993 coding-category-XXX, and coding-category-list.
2994 (Fdefine_coding_system_internal): Add category in the plist.
2996 2003-06-05 Kenichi Handa <handa@m17n.org>
2998 * callproc.c (Fcall_process): Handle carryover correctly.
3000 * coding.c (decode_coding_iso_2022): Fix handling of invalid
3002 (raw_text_coding_system): Check NILP (coding_system).
3003 (coding_inherit_eol_type): Check NILP (coding_system) and
3005 (consume_chars): Fix for the case of raw-text.
3007 * process.c (read_process_output): Handle carryover correctly.
3009 2003-06-02 Dave Love <fx@gnu.org>
3011 * regex.c (re_search_2): Fix last change.
3013 2003-05-30 Kenichi Handa <handa@m17n.org>
3015 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
3016 target_multibyte. Even in a unibyte case, return a converted
3018 (GET_CHAR_AFTER): New macro.
3019 (PATFETCH): Translate via multibyte char.
3020 (HANDLE_UNIBYTE_RANGE): Delete this macro.
3021 (SETUP_MULTIBYTE_RANGE): New macro.
3022 (regex_compile): Setup compiled code so that its multibyteness
3023 matches that of a target. Fix the handling of "[X-YZ]" using
3024 SETUP_MULTIBYTE_RANGE.
3025 (analyse_first) <charset>: For filling fastmap for all multibyte
3026 characters, don't check by BASE_LEADING_CODE_P.
3027 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
3028 the same as RE_MULTIBYTE_P (bufp) now.
3029 (mutually_exclusive_p): Check by (! multibyte ||
3031 (TARGET_CHAR_AND_LENGTH): Delete this macro.
3032 (TRANSLATE_VIA_MULTIBYTE): New macro.
3033 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
3034 It is the same as RE_MULTIBYTE_P (bufp) now.
3035 <exactn>: Translate via multibyte.
3036 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
3038 <charset, charset_not>: Fetch a character by
3039 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
3040 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
3041 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
3042 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
3044 (bcmp_translate): Likewise.
3046 * search.c (compile_pattern): Check the member target_multibyte,
3047 not the member multibyte of buf.
3049 * lread.c (read1): While reading a string, set force_singlebyte
3050 and force_multibyte correctly.
3052 * charset.c (Fset_unibyte_charset): Fix setting up of
3053 unibyte_to_multibyte_table.
3054 (init_charset_once): Likewise.
3056 2003-05-29 Kenichi Handa <handa@m17n.org>
3058 * coding.c (setup_coding_system): If coding has
3059 post-read-conversion or pre-write-conversion, set
3060 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
3062 (decode_coding_gap): Run post-read-conversion if any.
3064 * fileio.c (Finsert_file_contents): Even if we read into a
3065 unibyte buffer, check if we must decode the result or not.
3067 2003-05-29 Kenichi Handa <handa@m17n.org>
3069 * coding.c (make_conversion_work_buffer): Change the work buffer
3070 name to the same one as that of Emacs 21.
3072 2003-05-28 Kenichi Handa <handa@m17n.org>
3074 * coding.h (make_conversion_work_buffer): Prototype adjusted.
3075 (code_conversion_restore): Don't extern it.
3077 * coding.c (detected_mask): Delete unused variable.
3078 (decode_coding_iso_2022): Pay attention to the byte sequence of
3079 CTEXT extended segment, and retain those bytes as is.
3080 (decode_coding_ccl): Delete unused variable `valids'.
3081 (setup_coding_system): Delete unused variable `category'.
3082 (consume_chars): Delete unused variable `category'. Make it work
3083 for non-multibyte case.
3084 (make_conversion_work_buffer): Argument changed.
3085 (saved_coding): Delete unused variable.
3086 (code_conversion_restore): Don't check saved_coding->destination.
3087 (code_conversion_save): New function.
3088 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
3089 instead of record_unwind_protect.
3090 (decode_coding_object, encode_coding_object): Likewise. Recover
3092 (detect_coding_system): Delete unused variable `mask'.
3093 (Fdefine_coding_system_internal): Delete unsed vaiable id;
3095 * fileio.c (kill_workbuf_unwind): New function.
3096 (Finsert_file_contents): On replacing, call
3097 make_conversion_work_buffer with correct args, and call
3098 record_unwind_protect with the first arg kill_workbuf_unwind.
3100 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
3102 2003-05-20 Kenichi Handa <handa@m17n.org>
3104 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not
3106 (fontset_add): Fix for the case that TO is less than TO1.
3107 (Ffontset_info): Don't use fallback fontset on checking the
3109 (dump_fontset): New function for debugging.
3111 * coding.c (Fdefine_coding_system_internal): Fix for the case that
3112 coding_type is Qcharset.
3114 2003-05-07 Kenichi Handa <handa@m17n.org>
3116 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
3117 (map_char_table): Don't inherit the value from the parent on
3118 initializing VAL. Adjusted for the above change.
3120 2003-05-06 Kenichi Handa <handa@m17n.org>
3122 * coding.c (Qsignature, Qendian): Delete these variables.
3123 (syms_of_coding): Don't initialize them.
3124 (CATEGORY_MASK_UTF_16_AUTO): New macro.
3125 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
3127 (decode_coding_utf_16): Don't detect BOM here.
3128 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
3129 is NOT utf_16_without_bom.
3130 (setup_coding_system): For a coding system of type utf-16, check
3131 if the attribute :endian is Qbig or not (not nil or not), and set
3132 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
3133 (detect_coding): If coding type is utf-16 and BOM detection is
3134 required, detect it.
3135 (Fdefine_coding_system_internal): For a coding system of type
3136 utf-16, check if the attribute :endian is Qbig or not (not nil or
3139 2003-05-06 Kenichi Handa <handa@m17n.org>
3141 * coding.c (coding_set_source): Fix for the case that the current
3142 buffer is different from coding->src_object.
3143 (decode_coding_object): Don't use the conversion work buffer if
3144 DST_OBJECT is a buffer.
3146 2003-05-04 Dave Love <fx@gnu.org>
3148 * lread.c (read_emacs_mule_char) [len==2]: Index
3149 emacs_mule_charset correctly.
3151 2003-02-16 Dave Love <fx@gnu.org>
3153 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
3154 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
3155 (Fdecode_big5_char, Fencode_big5_char): Deleted. (Big5 no longer
3157 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
3158 (detected_mask): Remove Big5 bits.
3160 2003-04-09 Kenichi Handa <handa@m17n.org>
3162 The following changes are to make the font rescaling facility
3163 compatible with Emacs 21.
3165 * xfaces.c (Vface_font_rescale_alist): Renamed from
3166 Vface_resizing_fonts.
3167 (struct font_name): Rename member resizing_ratio to rescale_ratio.
3168 (font_rescale_ratio): Renamed from font_resizing_ratio.
3169 (split_font_name): Set font->rescale_ratio.
3170 (better_font_p): Pay attention to font->rescale_ratio.
3171 (build_scalable_font_name): Likewise. Change RESX, and RESY
3173 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
3176 2003-03-28 Kenichi Handa <handa@m17n.org>
3178 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
3179 (Qutf_16_le): Remove these variables.
3180 (syms_of_coding): Don't DEFSYM them.
3181 (decode_coding_utf_16): Fix handling of BOM.
3182 (encode_coding_utf_16): Fix handling of BOM.
3184 2003-03-14 Kenichi Handa <handa@m17n.org>
3186 * fileio.c (Finsert_file_contents): On replacing, before decoding
3187 the file into the work buffer, set point of the work buffer to the
3190 2003-02-13 Dave Love <fx@gnu.org>
3192 * coding.c (Fcheck_coding_systems_region): Fix type errors.
3194 2003-02-04 Dave Love <fx@gnu.org>
3196 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
3199 2003-01-31 Kenichi Handa <handa@m17n.org>
3201 * xdisp.c (SKIP_GLYPHS): New macro.
3202 (set_cursor_from_row): Pay attention to string display properties.
3204 * category.c (copy_category_entry): Fix for the case that RANGE
3207 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
3209 * w32term.c (w32_encode_char): Call ccl_driver with the last arg
3212 2003-01-30 Kenichi Handa <handa@m17n.org>
3214 * charset.c (Fcharset_id_internal): New function.
3215 (syms_of_charset): Defsubr it.
3217 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
3218 with the last arg charset_list acquired from coding.
3219 (Fdefine_coding_system_internal): For ccl-based coding system, fix
3220 the attribute coding_attr_ccl_valids.
3222 * coding.h (enum define_coding_ccl_arg_index): Set the first
3223 member coding_arg_ccl_decoder to coding_arg_max.
3225 * ccl.h (ccl_driver): Prototype adjusted.
3227 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
3228 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
3229 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
3230 (Fccl_execute): Call ccl_driver with the last arg Qnil.
3231 (Fccl_execute_on_string): Likewise.
3233 2003-01-11 Kenichi Handa <handa@m17n.org>
3235 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
3238 * charset.c (encode_char): Fix handling of methods SUBSET and
3241 * xterm.c (x_new_fontset): Fix previous change.
3243 2003-01-10 Dave Love <fx@gnu.org>
3245 * composite.c (syms_of_composite): Make composition_hash_table
3248 2003-01-10 Kenichi Handa <handa@m17n.org>
3250 * dispextern.h (check_face_attributes, generate_ascii_font_name)
3251 (font_name_registry): Don't extern them.
3252 (split_font_name_into_vector, build_font_name_from_vector): Extern
3255 * fontset.h (Qfontset): Don't extern it.
3256 (new_fontset_from_font_name): Extern it.
3258 * fontset.c: Give 8 extra slots to fontset objects.
3259 (Qfontset_info): New variable.
3260 (syms_of_fontset): Defsym it.
3261 (FONTSET_FALLBACK): New macro.
3262 (fontset_face): Try also the default fontset.
3263 (make_fontset): Realize a fallback fontset from the default
3265 (generate_ascii_font_name): Moved from xfaces.c. Rewritten by
3266 using split_font_name_into_vector and build_font_name_from_vector.
3267 (Fset_fontset_font): Access the elements of font_spec by enum
3268 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
3269 name by using split_font_name_into_vector.
3270 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
3271 generate a proper font name from the fontset name. Update
3272 Vfontset_alias_alist.
3273 (n_auto_fontsets): New variable.
3274 (new_fontset_from_font_name): New function.
3275 (Ffont_info): Store the information about fonts generated from the
3276 default fontset in the first extra slot of the returned
3279 * xfaces.c (generate_ascii_font_name): Moved to fontset.c.
3280 (font_name_registry): Function deleted.
3281 (split_font_name_into_vector): New function.
3282 (build_font_name_from_vector): New function.
3283 (font_list): The argument REGISTRY is now a list of registry
3285 (choose_face_font): If we are choosing an ASCII font, and ATTRS
3286 specifies an explicit font name, return the name as is. Make a
3287 list of registy names.
3289 * xfns.c (x_set_font, x_create_tip_frame): Adjusted to the change
3291 (Fx_create_frame): Don't call x_new_fontset here. Just use
3292 x_list_fonts to check the existence of fonts.
3294 * xterm.h (x_new_fontset): Prototype adjusted.
3296 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
3297 string. Use new_fontset_from_font_name to create a fontset from a
3300 2003-01-07 Dave Love <fx@gnu.org>
3302 * Makefile.in: Fix some dependencies.
3304 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
3305 set it to nil before returning.
3307 * composite.c (update_compositions): Fix type error.
3309 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
3311 2003-01-07 Kenichi Handa <handa@m17n.org>
3313 * xterm.c (x_new_font): Optimize for the case that the font is
3314 already set for the frame.
3316 2003-01-06 Kenichi Handa <handa@m17n.org>
3318 * chartab.c (char_table_ascii): Check if the char table contents
3319 is sub-char-table or not.
3320 (char_table_set): Fix argument to char_table_ascii.
3321 (char_table_set_range): Likewise.
3323 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
3324 (detect_coding_utf_8, detect_coding_utf_16)
3325 (detect_coding_emacs_mule, detect_coding_iso_2022)
3326 (detect_coding_sjis, detect_coding_big5)
3327 (detect_coding_ccl, detect_coding_charset): Change argument MASK
3328 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
3329 sequence is valid in this coding system. Callers changed.
3330 (MAX_ANNOTATION_LENGTH): New macro.
3331 (ADD_ANNOTATION_DATA): New macro.
3332 (ADD_COMPOSITION_DATA): Argument changed. Callers changed. Call
3333 ADD_ANNOTATION_DATA. The format of annotation data changed.
3334 (ADD_CHARSET_DATA): New macro.
3335 (emacs_mule_char): New argument ID. Callers changed.
3336 (decode_coding_emacs_mule, decode_coding_iso_2022)
3337 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
3338 Produce charset annotation data in coding->charbuf.
3339 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
3340 to charset annotation data in coding->charbuf.
3341 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
3342 coding->common_flags if the coding system is iso-2022 based and
3344 (produce_composition): Adjusted for the new annotation data
3346 (produce_charset): New function.
3347 (produce_annotation): Handle charset annotation.
3348 (handle_composition_annotation, handle_charset_annotation): New
3350 (consume_chars): Handle charset annotation. Utilize the above two
3352 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
3353 buffer, get the deleted text as a string and set
3354 coding->src_object to that string.
3355 (detect_coding, detect_coding_system): Use the new struct
3356 coding_detection_info.
3358 * coding.h (struct coding_detection_info): New structure.
3359 (struct coding_system): Prototype of the member `detector'
3361 (CODING_ANNOTATE_CHARSET_MASK): New macro.
3363 2003-01-06 Kenichi Handa <handa@m17n.org>
3365 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
3367 2003-01-03 Dave Love <fx@gnu.org>
3369 * keymap.c (apropos_predicate, apropos_accumulate): Declare
3371 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
3372 to new local and nullify apropos_accumulate before returning.
3373 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
3375 2002-12-05 Kenichi Handa <handa@m17n.org>
3377 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
3380 2002-11-26 Dave Love <fx@gnu.org>
3382 * fns.c (Flanginfo): Call synchronize_system_time_locale.
3384 2002-11-07 Kenichi Handa <handa@m17n.org>
3386 The following changes are to make character composition happen
3387 automatically on displaying.
3389 * Makefile.in (lisp, shortlisp): Add composite.elc
3391 * composite.h (Qauto_composed, Vauto_composition_function,
3392 Qauto_composition_function): Extern them.
3394 * composite.c (Vcomposition_function_table,
3395 Qcomposition_function_table): Delete variables.
3396 (Qauto_composed, Vauto_composition_function,
3397 Qauto_composition_function): New variables.
3398 (run_composition_function): Don't call
3399 compose-chars-after-function.
3400 (update_compositions): Clear `auto-composed' text property.
3401 (compose_chars_in_text): Delete this function.
3402 (syms_of_composite): Staticpro Qauto_composed and
3403 Qauto_composition_function. Declare Vauto_composition_function as
3406 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
3408 * xdisp.c (it_props): Add an entry for Qauto_composed.
3409 (handle_auto_composed_prop): New function.
3411 * xselect.c (selection_data_to_lisp_data): Don't call
3412 compose_chars_in_text.
3414 2002-11-06 Dave Love <fx@gnu.org>
3416 * keyboard.c (read_char): Modify checking around use of
3417 Vkeyboard_translate_table.
3419 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
3422 2002-11-06 Kenichi Handa <handa@m17n.org>
3424 * coding.c (decode_coding_utf_8): When eol_type is Qdos, handle
3425 the case that the last byte is '\r' correctly.
3426 (decode_coding_emacs_mule): Likewise.
3427 (decode_coding_iso_2022): Likewise.
3428 (decode_coding_sjis): Likewise.
3429 (decode_coding_big5): Likewise.
3430 (decode_coding_charset): Likewise.
3431 (produce_chars): Likewise.
3432 (decode_coding): Flushing out the unprocessed data correctly.
3433 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of
3436 2002-10-31 Dave Love <fx@gnu.org>
3438 * xterm.c (XTread_socket): Fix changes for defined keysyms. Add
3440 (xaw_scroll_callback): Revert last change.
3442 2002-10-30 Kenichi Handa <handa@m17n.org>
3444 * charset.c (Fset_charset_priority): Update
3445 Viso_2022_charset_list.
3447 2002-10-29 Kenichi Handa <handa@m17n.org>
3449 * xfaces.c (Vface_resizing_fonts): New variable.
3450 (struct font_name): New member `resizing_ratio'.
3451 (font_resizing_ratio): New function.
3452 (split_font_name): Set font->resizing_ratio.
3453 (better_font_p): Pay attention to font->resizing_ratio.
3454 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
3455 RESX, and RESY fields.
3456 (try_alternative_families): Try scalable fonts if
3457 Vscalable_fonts_allowed is not Qt.
3458 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
3460 2002-10-29 Dave Love <fx@gnu.org>
3462 * xterm.c (xaw_scroll_callback): Cast correctly.
3464 2002-10-28 Dave Love <fx@gnu.org>
3466 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
3467 (lispy_kana_keys): Comment out.
3468 (make_lispy_event) [XK_kana_A]: Comment out.
3470 * xterm.c (xaw_scroll_callback): Cast call_data.
3471 (XTread_socket): Deal with ASCII keysyms.
3472 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
3474 2002-10-27 Dave Love <fx@gnu.org>
3476 * xterm.c (Vx_keysym_table): New.
3477 (syms_of_xterm): Initialize it.
3478 (XTread_socket): Use it.
3479 From head: Eliminate incorrect optimization that tried to avoid
3480 decoding the output of X*LookupString.
3481 (x_get_font_repertory): Delete charset declaration.
3483 2002-10-16 Kenichi Handa <handa@m17n.org>
3485 * coding.c (detect_coding): Fix previous change.
3486 (detect_coding_charset): If only ASCII bytes are found, return 0.
3487 (detect_coding_system): Fix previous change.
3488 (Fdefine_coding_system_internal): Setup
3489 CODING_ATTR_ASCII_COMPAT (attrs) correctly.
3491 2002-10-15 Dave Love <fx@gnu.org>
3493 * coding.c (Fcheck_coding_system): Doc fix.
3495 * editfns.c (Finsert_byte): Return a proper value.
3497 2002-10-14 Kenichi Handa <handa@m17n.org>
3499 * coding.c (decode_coding): Fix args to translate_chars. Pay
3500 attention to Vstandard_translation_table_for_decode.
3501 (encode_coding): Fix args to translate_chars. Pay attention to
3502 Vstandard_translation_table_for_encode.
3504 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
3507 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
3508 not by SINGLE_BYTE_CHAR_P.
3510 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
3513 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
3516 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
3517 by SINGLE_BYTE_CHAR_P.
3519 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
3522 2002-10-14 Dave Love <fx@gnu.org>
3524 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
3526 2002-10-10 Dave Love <fx@gnu.org>
3528 * fns.c (Flanginfo): Fix typo.
3530 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
3532 2002-10-10 Kenichi Handa <handa@m17n.org>
3534 * coding.c (detect_coding_utf_8): Check incomplete byte sequence.
3535 Don't update *mask when correctly detected.
3536 (detect_coding_utf_16): Likewise.
3537 (detect_coding_emacs_mule): Likewise.
3538 (detect_coding_iso_2022): Likewise.
3539 (detect_coding_sjis): Likewise.
3540 (detect_coding_big5): Likewise.
3541 (detect_coding_ccl): Likewise.
3542 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
3543 (detect_eol): Delete the argument CODING, and add the argument
3545 (detect_coding): Adjusted for the changes above.
3546 (detect_coding_system): Likewise.
3548 2002-10-09 Kenichi Handa <handa@m17n.org>
3550 * character.c (char_string): Renamed from
3551 char_string_with_unification. Pay attention to
3553 (string_char): Renamed from string_char.
3555 * character.h (CHAR_STRING): Call char_string if C is greater than
3557 (CHAR_STRING_ADVANCE): Likewise.
3558 (STRING_CHAR): Call string_char instead of
3559 string_char_with_unification.
3560 (STRING_CHAR_AND_LENGTH): Likewise.
3561 (STRING_CHAR_ADVANCE): Likewise.
3563 2002-10-09 Dave Love <fx@gnu.org>
3565 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
3567 2002-10-07 Kenichi Handa <handa@m17n.org>
3569 * keymap.c (push_key_description): Pay attention to
3572 * regex.c (re_search_2): Fix for the case of unibyte buffer.
3574 2002-10-06 Dave Love <fx@gnu.org>
3576 * charset.c (define_charset_internal): Rename `supprementary'.
3578 * Makefile.in (lisp, shortlisp): Remove latin-N.
3580 2002-10-05 Dave Love <fx@gnu.org>
3582 * xfns.c (x_window, x_window): Use use_xim.
3584 * xterm.c (use_xim): Initialize.
3585 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
3586 (x_term_init): Maybe set use_xim.
3588 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
3590 2002-10-01 Kenichi Handa <handa@m17n.org>
3592 * search.c (search_buffer): Fix case-fold-search of multibyte
3594 (boyer_moore): Rename the last argument to char_high_bits.
3596 2002-09-27 Kenichi Handa <handa@m17n.org>
3598 * xdisp.c (display_string): Fix for the case of zero width glyph.
3600 * xfns.c (x_set_font): Change the error message of the case that
3601 x_new_fontset returns Qt.
3603 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
3604 (Finternal_set_lisp_face_attribute): Use signal_error for the
3605 error of invalid fontset.
3607 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
3610 2002-09-19 Kenichi Handa <handa@m17n.org>
3612 * regex.c (re_search_2): Fix previous change.
3614 2002-09-18 Kenichi Handa <handa@m17n.org>
3616 * syntax.c (skip_syntaxes): Fix previous change.
3618 2002-09-13 Kenichi Handa <handa@m17n.org>
3620 * syntax.c (skip_chars): Fix previous change.
3621 (skip_syntaxes): Fix previous change.
3623 2002-09-06 Dave Love <fx@gnu.org>
3625 * config.in: Restore it.
3627 2002-09-05 Dave Love <fx@gnu.org>
3629 * config.in: Removed (now auto-generated).
3631 * s/usg5-4.h: Fix last change.
3633 * unexelf.c (unexec): Make .got handling not SGI-specific.
3635 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
3637 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
3639 * keyboard.c (read_key_sequence): Fix type error.
3641 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
3644 * fontset.c (fontset_add): Return Lisp_Object.
3646 2002-09-03 Dave Love <fx@gnu.org>
3648 * charset.h (charset_ordered_list_tick): Declare extern.
3650 2002-09-03 Kenichi Handa <handa@m17n.org>
3652 The following changes (and some of 2002-08-20 changes of mine) are
3653 for handling syntax, category, and case conversion for unibyte
3654 characters by converting them to multibyte on the fly. With these
3655 changes, we don't have to setup syntax and case tables for unibyte
3656 characters in each language environment.
3658 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
3659 multibyte if necessary.
3661 * bytecode.c (Fbyte_code): Likewise.
3663 * character.h (LEADING_CODE_LATIN_1_MIN)
3664 (LEADING_CODE_LATIN_1_MAX): New macros.
3665 (unibyte_to_multibyte_table): Extern it.
3666 (unibyte_char_to_multibyte): New macro.
3667 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
3668 (CHAR_LEADING_CODE): New macro.
3669 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
3671 * character.c (unibyte_to_multibyte_table): New variable.
3672 (unibyte_char_to_multibyte): Move to character.h and defined as
3674 (multibyte_char_to_unibyte): If C is an eight-bit character,
3675 convert it to the corresponding byte value.
3677 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
3678 not 1, singals an error. Update the elements of
3679 unibyte_to_multibyte_table.
3680 (init_charset_once): Initialize unibyte_to_multibyte_table.
3681 (syms_of_charset): Define the charset `iso-8859-1'.
3683 * casefiddle.c (casify_object): Fix previous change.
3685 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
3686 as is without converting it to unibyte. In a unibyte buffer,
3687 convert C to multibyte before checking the syntax.
3689 * lisp.h (unibyte_char_to_multibyte): Extern deleted.
3691 * minibuf.c (Fminibuffer_complete_word): Use the macro
3692 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
3694 * regex.h (struct re_pattern_buffer): New member target_multibyte.
3696 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
3697 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
3698 that is zero, convert an eight-bit char to multibyte.
3699 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
3701 (PATFETCH): Convert an eight-bit char to multibyte.
3702 (HANDLE_UNIBYTE_RANGE): New macro.
3703 (regex_compile): Setup the compiled pattern for multibyte chars
3704 even if the given regex string is unibyte. Use PATFETCH_RAW
3705 instead of PATFETCH in many places. To handle `charset'
3706 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
3707 only for ASCII chars.
3708 (analyse_first) <exactn>: Simplified because the compiled pattern
3710 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
3711 <charset>: Use CHAR_LEADING_CODE to get leading codes.
3712 <categoryspec>: If multibyte, setup fastmap only for ASCII chars
3714 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
3716 (re_search_2): In emacs, set the locale variable multibyte to 1,
3717 otherwise to 0. New local variable target_multibyte. Check it
3718 to decide the multibyteness of STR1 and STR2. If
3719 target_multibyte is zero, convert unibyte chars to multibyte
3720 before translating and checking fastmap.
3721 (TARGET_CHAR_AND_LENGTH): New macro.
3722 (re_match_2_internal): In emacs, set the locale variable multibyte
3723 to 1, otherwise to 0. New local variable target_multibyte. Check
3724 it to decide the multibyteness of STR1 and STR2. Use
3725 TARGET_CHAR_AND_LENGTH to fetch a character from D.
3726 <charset, charset_not>: If multibyte is nonzero, check fastmap
3727 only for ASCII chars. Call bcmp_translate with
3728 target_multibyte, not with multibyte.
3729 <begline>: Declare the local variable C as `unsigned'.
3730 (bcmp_translate): Change the last arg name to target_multibyte.
3732 * search.c (compile_pattern_1): Don't adjust the multibyteness of
3733 the regexp pattern and the matching target. Set cp->buf.multibyte
3734 to the multibyteness of the regexp pattern. Set
3735 cp->but.target_multibyte to the multibyteness of the matching
3737 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
3738 FETCH_STRING_CHAR_ADVANCE.
3739 (Freplace_match): Convert unibyte chars to multibyte.
3741 * syntax.c (char_quoted): Use FETCH_CHAR_AS_MULTIBYTE to convert
3742 unibyte chars to multibyte.
3743 (back_comment): Likewise.
3744 (scan_words): Likewise.
3745 (skip_chars): The arg syntaxp is deleted, and the code for
3746 handling syntaxes is moved to skip_syntaxes. Callers changed.
3747 Fix the case that the multibyteness of STRING and the current
3748 buffer doesn't match.
3749 (skip_syntaxes): New function.
3750 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
3752 (Fforward_comment): Use FETCH_CHAR_AS_MULTIBYTE to convert unibyte
3754 (scan_lists): Likewise.
3755 (Fbackward_prefix_chars): Likewise.
3756 (scan_sexps_forward): Likewise.
3758 2002-08-23 Kenichi Handa <handa@m17n.org>
3760 * xfaces.c (QCfontset): New variable.
3761 (LFACE_FONTSET): New macro.
3762 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
3763 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
3764 (Finternal_set_lisp_face_attribute): Handle QCfontset.
3765 (Finternal_get_lisp_face_attribute): Likewise.
3766 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
3767 check also LFACE_FONTSET_INDEX.
3768 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
3769 attrs[LFACE_FONT_INDEX].
3770 (syms_of_xfaces): Intern and staticpro QCfontset.
3772 * dispextern.h (enum lface_attribute_index): New member
3773 LFACE_FONTSET_INDEX.
3775 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
3777 2002-08-21 Kenichi Handa <handa@m17n.org>
3779 * coding.c (coding_set_destination): Fix coding->destination for
3780 the case converting a region.
3781 (encode_coding_utf_8): Encode eight-bit chars as single byte.
3782 (encode_coding_object): Fix coding->dst_pos and
3783 coding->dst_pos_byte for the case converting a region.
3785 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
3787 * character.h (BYTE8_STRING): New macro.
3789 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
3791 2002-08-20 Kenichi Handa <handa@m17n.org>
3793 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
3794 characters by octal form.
3796 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
3798 * buffer.h (_fetch_multibyte_char_len): Extern deleted.
3799 (FETCH_MULTIBYTE_CHAR): Don't use _fetch_multibyte_char_len.
3800 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
3801 (FETCH_CHAR_AS_MULTIBYTE): New macro.
3803 * casetab.c (set_canon, set_identity, shuffle): Simplified.
3805 * casefiddle.c (casify_object): Simplified. Handle the case that
3806 the case conversion change the byte length.
3807 (casify_region): Likewise
3809 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New
3812 * character.c (_fetch_multibyte_char_len): This variable deleted.
3813 (syms_of_character): Setup Vprintable_chars.
3815 * editfns.c (Fchar_equal): Fix for the unibyte case.
3816 (Finsert_byte): New function.
3817 (syms_of_editfns): Defsubr it.
3819 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
3820 of direct code 0x3ffff.
3822 * search.c (Freplace_match): Fix for the unibyte case.
3824 2002-08-19 Kenichi Handa <handa@m17n.org>
3826 * lread.c (safe_to_load_p): Fix the logic.
3828 * syntax.c (scan_words): Don't treat characters belonging to
3829 different scripts as constituting a word.
3831 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
3833 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not
3836 * emacs.c (main): In the case of --unibyte, instead of aborting on
3837 finding non-empty buffer, make it unibyte.
3839 2002-08-18 Kenichi Handa <handa@m17n.org>
3841 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
3842 to create a fontset.
3844 2002-08-18 Dave Love <fx@gnu.org>
3846 * character.c (Funibyte_char_to_multibyte): Doc fix.
3848 * xfns.c [HAVE_STDLIB_H]: Fix last change.
3850 2002-08-15 Kenichi Handa <handa@m17n.org>
3852 * fontset.c (fontset_add): Make the type `int'.
3853 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
3855 * character.c (unibyte_char_to_multibyte): Refer to
3856 charset_unibyte, not charset_primary.
3857 (multibyte_char_to_unibyte): Likewise.
3858 (Funibyte_char_to_multibyte): Likewise.
3860 * charset.h: (charset_unibyte): Extern it instead of
3863 * charset.c (charset_unibyte): Renamed from charset_primary.
3864 (Funibyte_charset): Renamed from Fprimary_charset.
3865 (Fset_unibyte_charset): Renamed from Fset_primary_charset.
3866 (syms_of_charset): Adjusted for the above changes.
3868 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
3869 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
3870 it->multibyte_p is zero.
3872 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
3875 2002-08-08 Kenichi Handa <handa@m17n.org>
3877 * coding.c (Fdefine_coding_system_internal): Fix category setting
3878 for a coding system of type iso-2022.
3880 2002-08-02 Kenichi Handa <handa@m17n.org>
3882 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET
3885 2002-08-01 Kenichi Handa <handa@m17n.org>
3887 * syntax.c (Vnext_word_boundary_function_table): New variable.
3888 (syms_of_syntax): Declare it as a Lisp variable.
3889 (scan_words): Call functions in Vnext_word_boundary_function_table
3892 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
3894 * fontset.c (fs_load_font): If fontp->charset is not negative,
3895 return fontp without setting its members.
3897 2002-07-31 Dave Love <fx@gnu.org>
3899 * config.in: Generated with autoheader.
3901 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
3903 * m/sparc.h (HAVE_ALLOCA): Delete.
3905 * s/irix6-5.h: Don't include strings.h.
3906 (bcopy, bzero, bcmp): Don't undef.
3908 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
3910 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
3911 (TIOCSIGSEND): Don't test IRIX6.
3912 (bcopy, bzero, bcmp): Define conditionally.
3914 2002-07-31 Kenichi Handa <handa@m17n.org>
3916 * buffer.c (Qas, Qmake, Qto): New variables.
3917 (Fset_buffer_multibyte): New optional arg METHOD. Caller changed.
3918 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
3920 * callproc.c (Fcall_process): Don't call insert_1_both directly if
3921 we are inserting a process output into a multibyte buffer.
3923 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
3924 multibyte_char_to_unibyte.
3926 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
3927 by the primary charset, make it eight-bit char.
3928 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
3930 * charset.c: (charset_eight_bit, Qeight_bit_control): New
3932 (charset_8_bit__control, charset_8_bit_graphic,
3933 Qeight_bit_control, Qeight_bit_graphic): These variables deleted.
3934 (define_charset_internal): New function.
3935 (syms_of_charset): Call define_charset_internal for pre-defined
3938 * charset.h (charset_8_bit): Extern it.
3940 * coding.c (make_conversion_work_buffer): Adjusted for the change
3941 of Fset_buffer_multibyte.
3942 (encode_coding_raw_text): Increment p0 in the loop.
3944 * lisp.h (Fset_buffer_multibyte): Prototype adjusted.
3946 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjusted
3947 for the change of Fset_buffer_multibyte.
3949 * fns.c (Fstring_to_multibyte): New function.
3950 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
3952 2002-07-30 Dave Love <fx@gnu.org>
3954 * xfns.c (x_put_x_image): Declare args.
3956 * xfaces.c (font_name_registry, choose_face_font): Delete unused
3958 (try_font_list): Declare an arg.
3960 * xdisp.c (message2_nolog, set_message): Declare an arg.
3962 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
3964 * syntax.c (scan_sexps_forward): Declare an arg.
3966 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
3969 * lisp.h (Fnew_fontset): Declare.
3971 * keymap.c (push_key_description): Call CHARACTERP correctly.
3973 * fontset.c (fontset_add): Declare args. Call make_number
3975 (face_for_char): Delete unused vars.
3976 (Fset_fontset_font): Doc fix. Delete unused vars.
3978 * doc.c (Fsubstitute_command_keys): Delete unused vars.
3980 * composite.c (update_compositions): Declare arg.
3982 * cm.c (calccost, cmgoto): Declare args.
3984 * charset.c: Remove `emacs' conditional. Doc fixes.
3985 (map_char_table_for_charset): Declare.
3987 * character.c (syms_of_character) <translation-table-vector>: Doc
3990 * ccl.c: Remove `emacs' conditional. Include hash table stuff
3993 2002-07-26 Kenichi Handa <handa@m17n.org>
3995 The following changes are to allow specifying multiple font
3996 patterns for a character range (specified by script or charset).
3998 * Makefile.in (abbrev.o): Depend on syntax.h.
3999 (xfaces.o): Depend on charset.h.
4001 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
4004 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
4006 * character.h (Vchar_script_table): Extern it.
4008 * character.c (Vscript_alist): This variable deleted.
4009 (Vchar_script_table, Qchar_script_table): New variable.
4010 (syms_of_character): Declare Vchar_script_table as a lisp variable
4013 * chartab.c (Fmake_char_table): Doc fixed. If PURPOSE doesn't
4014 have property char-table-extra-slots, make no extra slot.
4016 * dispextern.h (struct face): Member `charset' deleted.
4017 (FACE_SUITABLE_FOR_CHAR_P): Use ASCII_CHAR_P, not
4019 (FACE_FOR_CHAR): Likewise.
4020 (choose_face_font, lookup_non_ascii_face, font_name_registry): Add
4022 (lookup_face, lookup_named_face, lookup_derived_face): Prototype
4024 (generate_ascii_font_name): Renamed from generate_ascii_font.
4026 * fontset.h (get_font_repertory_func): New prototype.
4027 (make_fontset_for_ascii_face, fs_load_font): Prototypes fixed.
4028 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
4030 * fontset.c (Qprepend, Qappend): New variables.
4031 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): These macros deleted.
4032 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
4033 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
4034 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
4035 (fontset_ref_and_range, fontset_add, reorder_font_vector)
4036 (load_font_get_repertory): New functions.
4037 (fontset_set): This function deleted.
4038 (fontset_face): New arg FACE. Return face ID, not face.
4039 Completely re-written to handle new fontset structure. Caller
4041 (free_face_fontset): Use ASET istead of AREF (X) = Y.
4042 (face_for_char): Don't call lookup_face.
4043 (make_fontset_for_ascii_face): New arg FACE.
4044 (fs_load_font): New arg CHARSET_ID. Don't check
4045 Vfont_encoding_alist here.
4046 (find_font_encoding): New function.
4047 (list_fontsets): Use STRINGP, not ! NILP.
4048 (accumulate_script_ranges): New function.
4049 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
4050 re-written to handle new fontset structure.
4051 (Ffontset_font): Return a copy of element.
4052 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
4053 docstring of font-encoding-alist.
4055 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
4056 (Fset_fotset_font): Fix arguments to 5.
4058 * msdos.c (XMenuActivate): Adjuted for the change of
4059 lookup_derived_face.
4061 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
4062 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
4063 (highlight_trailing_whitespace): Adjusted for the change of
4066 * xfaces.c: Include charset.h.
4067 (load_face_font): Argument C deleted. Caller changed.
4068 (generate_ascii_font_name): Renamed from generate_ascii_font.
4069 (font_name_registry): New function.
4070 (cache_face): Store ascii faces before non-ascii faces in buckets.
4071 (lookup_face): Arguments C and BASE_FACE deleted. Caller changed.
4072 Lookup only ascii faces.
4073 (lookup_non_ascii_face): New function.
4074 (lookup_named_face): Argument C deleted. Caller changed.
4075 (lookup_derived_face): Argument C deleted. Caller changed.
4076 (try_font_list): New arg PATTERN. Caller changed. If PATTERN is
4077 a string, just call font_list with it.
4078 (choose_face_font): Arguments FACE and C deleted. New arg
4079 FONT_SPEC. Caller changed.
4080 (realize_face): Arguments C and BASE_FACE deleted. Caller
4081 (realize_x_face): Likewise.
4082 (realize_non_ascii_face): New function.
4083 (realize_x_face): Call load_face_font here.
4084 (realize_tty_face): Argument C deleted. Caller changed.
4085 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
4087 (dump_realized_face): Don't print charset of FACE.
4089 * xfns.c (x_set_font): Always call x_new_fontset and
4090 store_frame_parameter.
4091 (Fx_create_frame): Call x_new_fontset, not x_new_font.
4092 (syms_of_xfns): Set get_font_repertory_func to
4093 x_get_font_repertory.
4095 * xterm.h (x_get_font_repertory): Extern it.
4097 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
4098 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
4099 it->multibyte_p is zero.
4100 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
4101 (x_new_fontset): If FONTSETNAME doesn't match any existing
4102 fontsets, create a new one.
4103 (x_get_font_repertory): New function.
4105 2002-07-25 Kenichi Handa <handa@m17n.org>
4107 * coding.c (Ffind_coding_systems_region_internal): Detect an
4108 ASCII only string correctly.
4110 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
4113 2002-07-24 Kenichi Handa <handa@m17n.org>
4115 * lread.c: Include "coding.h".
4116 (Qget_emacs_mule_file_char, Qload_force_doc_strings,
4117 load_each_byte, unread_char): New variables.
4118 (readchar_backlog): This variable deleted.
4119 (readchar): Return a character unless load_each_byte is nonzero.
4120 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
4121 cons. If unread_char is not -1, simply return it.
4122 (unreadchar): Handle the case that readcharfun is
4123 Qget_emacs_mule_file_char or a cons. Set unread_char if
4125 (read_multibyte): This function deleted.
4126 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
4127 (read_emacs_mule_char): New functions.
4128 (Fload): Even if the file doesn't have the extention ".elc", if
4129 safe_to_load_p returns a positive version number, assume that the
4130 file contains bytecompiled code. If the version is less than 22,
4131 load the file while decoding multibyte sequences by emacs-mule.
4132 (readevalloop): Don't use readchar_backlog.
4133 (Fread): Likewise. Pay attention to the case that STREAM is a
4135 (Fread_from_string): Pay attention to the case that STREAM is a
4137 (read_escape): The arg BYTEREP deleted.
4138 (read1): Set load_each_byte to 1 temporarily while handling
4139 #@NUMBER. Don't call read_multibyte.
4140 (read_vector): Call Fread with a cons. If readcharfun is
4141 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
4142 (read_list): If doc_reference is 2, make the cdr part string as
4144 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
4145 and Qload_force_doc_strings.
4147 2002-07-23 Kenichi Handa <handa@m17n.org>
4149 * xdisp.c (face_before_or_after_it_pos): Call
4150 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
4152 2002-07-22 Kenichi Handa <handa@m17n.org>
4154 * character.h (TRAILING_CODE_P): New macro.
4155 (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset.
4156 (string_char_with_unification): Fix prototype.
4157 (Vscript_alist): Extern it.
4159 * character.c (Vscript_alist): New variable.
4160 (string_char_with_unification): Add `const' to local variables.
4161 (str_as_unibyte): Likewise.
4162 (string_escape_byte8): Likewise.
4163 (syms_of_character): Declare script-alist as a Lisp variable.
4165 * charset.h (Vcharset_ordered_list): Extern it.
4166 (charset_ordered_list_tick): Extern it.
4167 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
4168 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
4169 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
4170 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros
4171 (Funify_charset): Adjusted for the change of Funify_charset.
4173 * charset.c (charset_ordered_list_tick): New variable.
4174 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
4175 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
4176 deunify intead of unify a charset.
4177 (string_xstring_p): Add `const' to local variables.
4178 (find_charsets_in_text): Add `const' to arguemnts and local
4180 (encode_char): Adjusted for the change of Funify_charset. Fix
4181 detecting of invalid code.
4182 (Fset_charset_priority): Increment charset_ordered_list_tick.
4183 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
4186 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
4187 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros
4188 deleted. Callers changed to use
4189 EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
4190 (decode_coding_ccl): Add `const' to local variables.
4191 (consume_chars): Likewise.
4192 (Ffind_coding_systems_region_internal): Likewise.
4193 (Fcheck_coding_systems_region): Likewise.
4195 * print.c (print_object): Use octal form for printing the
4196 contents of a bool vector.
4198 2002-07-18 Dave Love <fx@gnu.org>
4200 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
4201 <version == 20>: Refuse to load.
4203 2002-07-17 Dave Love <fx@gnu.org>
4205 * fns.c: Move coding.h.
4206 (Qcodeset, Qdays, Qmonths): New.
4207 (concat): Use CHARACTERP instead of INTERGERP.
4208 (Flocale_codeset): Deleted.
4209 (Flanginfo): New function.
4210 (syms_of_fns): Changed accordingly.
4212 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
4214 2002-07-16 Dave Love <fx@gnu.org>
4216 * casetab.c (init_casetab_once, init_casetab_once): Fix
4217 CHAR_TABLE_SET call.
4219 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
4221 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
4223 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
4224 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
4225 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
4227 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
4229 * coding.c (ENCODE_DESIGNATION, decode_eol)
4230 (make_conversion_work_buffer, code_conversion_restore)
4231 (Fdefine_coding_system_internal): Convert Lisp types.
4232 (code_conversion_restore): Use EQ, not ==.
4233 (Fencode_coding_string): Fix code_convert_string call.
4235 * coding.h (code_convert_region): Fix prototype.
4237 * dispextern.h (redraw_frame, redraw_garbaged_frames): Removed.
4239 * fontset.c (fontset_ref, fontset_set, fs_load_font)
4240 (Ffontset_info): Convert Lisp types.
4242 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
4244 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
4246 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
4248 * chartab.c: Include "...h", not <...h> in some cases.
4250 * callproc.c (Fcall_process): Remove unused variables.
4252 2002-07-12 Dave Love <fx@gnu.org>
4254 * coding.c (Fset_coding_system_priority): Allow null arg list.
4256 2002-07-03 Dave Love <fx@gnu.org>
4258 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
4259 (Fself_insert_and_exit): Use CHARACTERP.
4261 * callproc.c (Fcall_process): Remove unused vars.
4263 * xterm.c (XTread_socket): Add extra dead keysyms.
4265 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
4267 * dispextern.h: Remove prototypes for redraw_frame,
4268 redraw_garbaged_frames.
4270 * cmds.c (Fself_insert_command): Use CHARACTERP.
4272 * chartab.c (make_sub_char_table): Remove unused var.
4273 (Fset_char_table_default, Fmap_char_table): Doc fix.
4275 * keymap.c (access_keymap): Remove generic char code.
4276 (push_key_description): Use CHARACTERP.
4278 2002-07-01 Dave Love <fx@gnu.org>
4280 * charset.c: Doc fixes.
4281 (Funify_charset): Extra checking.
4283 2002-06-24 Dave Love <fx@gnu.org>
4285 * lread.c: Remove some unused variables.
4286 (safe_to_load_p): If safe, return the magic number version byte.
4287 (Fload): Maybe use load-with-code-conversion.
4289 2002-06-12 Kenichi Handa <handa@m17n.org>
4291 * category.c (Fmodify_category_entry): Don't modify the contents
4292 of category_set for characters out of the range. Avoid
4293 unnecessary modification.
4295 * character.h (MAYBE_UNIFY_CHAR): Adjusted for the change of
4296 Vchar_unify_table. The default value of the table is now nil.
4298 * character.c (syms_of_character): Setup Vchar_width_table for
4299 eight-bit-control and raw-byte chars.
4301 * charset.h (enum define_charset_arg_index): Delete
4302 charset_arg_parents and add charset_arg_subset and
4303 charset_arg_superset.
4304 (enum charset_attr_index): Delete charset_parents and add
4305 charset_subset and charset_superset.
4306 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
4307 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
4308 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Macros deleted.
4309 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
4310 (CHARSET_SUPERSET): New macros.
4311 (charset_work): Extern it.
4312 (ENCODE_CHAR): Use charset_work.
4313 (CHAR_CHARSET_P): Adjusted for the change of encoder format.
4314 (map_charset_chars): Extern it.
4316 * charset.c (load_charset_map): Set the default value of encoder
4317 and deunifier char-tables to nil.
4318 (map_charset_chars): Argument changed. Callers changed. Use
4319 map_char_table_for_charset instead of map_char_table.
4320 (Fmap_charset_chars): New optional args from_code and to_code.
4321 (Fdefine_charset_internal): Adjusted for the change of
4322 `define-charset' (:parents -> :subset or :superset).
4323 (charset_work): New variable.
4324 (encode_char): Adjusted for the change of
4325 Fdefine_charset_internal.
4326 (syms_of_charset): Likewise.
4327 (Ffind_charset_string): Setup the vector `charsets' correctly.
4329 * chartab.c (sub_char_table_ref_and_range): New arg defalt. Fix
4330 the previous change.
4331 (char_table_ref_and_range): Adjusted for the above change.
4332 (map_sub_char_table_for_charset): New function.
4333 (map_char_table_for_charset): New function.
4335 * keymap.c (describe_vector): Handle a char-table directly here.
4336 (describe_char_table): Deleted.
4338 * lisp.h (map_charset_chars): Deleted.
4340 2002-06-11 Dave Love <fx@gnu.org>
4342 * fns.c (count_combining): Comment out (unused).
4343 (Flocale_codeset): New.
4344 (syms_of_fns): Defsubr it.
4346 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
4349 2002-06-06 Dave Love <fx@gnu.org>
4351 * Makefile.in (chartab.o): Depend on charset.h
4353 2002-06-03 Kenichi Handa <handa@m17n.org>
4355 * character.c (syms_of_character): Set the default value of
4356 Vprintable_chars to Qnil.
4358 2002-05-31 Dave Love <fx@gnu.org>
4360 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
4362 2002-05-31 Kenichi Handa <handa@m17n.org>
4364 * charset.c (load_charset_map): Handle the case that from < to
4367 * coding.c (encode_coding_emacs_mule): Pay attention to raw-8-bit
4369 (encode_coding_iso_2022): Likewise.
4370 (encode_coding_sjis): Likewise.
4371 (encode_coding_big5): Likewise.
4372 (encode_coding_charset): Likewise.
4374 2002-05-30 Kenichi Handa <handa@m17n.org>
4376 * Makefile.in (lisp): Change chinese.elc to chinese.el. They are
4377 not bytecompiled now.
4378 (shortlisp): Likewise.
4380 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
4381 (charset_jisx0208): New variables.
4382 (Fdefine_charset_internal): Setup them if appropriate.
4383 (init_charset_once): Initialize them to -1.
4385 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978,
4386 charset_jisx0208): Extern them.
4388 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro
4389 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
4390 (CODING_ISO_FLAG_FULL_SUPPORT): Macro definition changed.
4391 (setup_iso_safe_charsets): Fix arguemtns to Fassq.
4392 (DECODE_DESIGNATION): Pay attention to CODING_ISO_FLAG_USE_ROMAN
4393 and CODING_ISO_FLAG_USE_OLDJIS.
4394 (ENCODE_ISO_CHARACTER_DIMENSION1): Likewise.
4395 (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
4396 (encode_coding_iso_2022): Change the 1st arg to
4397 ENCODE_ISO_CHARACTER to a variable.
4399 2002-05-29 Kenichi Handa <handa@m17n.org>
4401 * charset.h (enum define_charset_arg_index): New enums
4402 charset_arg_min_code and charset_arg_max_code.
4403 (struct charset): New member char_index_offset.
4405 * charset.c (CODE_POINT_TO_INDEX): Take charset->char_index_offset
4407 (INDEX_TO_CODE_POINT): Likewise.
4408 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
4409 args[charset_arg_max_code]. Setup charset.char_index_offset.
4410 (syms_of_charset): Fix args to Fdefine_charset_internal.
4412 2002-05-27 Dave Love <fx@gnu.org>
4414 * coding.c (decode_coding_utf_8): Reject overlong sequences.
4416 2002-05-26 Dave Love <fx@gnu.org>
4418 * coding.c: Doc fixes.
4419 (Fcoding_system_aliases): Fix return value.
4420 (Qmac): Remove (duplicated) definition.
4422 2002-05-25 Dave Love <fx@gnu.org>
4424 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
4427 * character.c (Fstring): Doc fix.
4429 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
4431 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
4433 (font-encoding-alist): Doc fix.
4435 2002-05-24 Dave Love <fx@gnu.org>
4437 * term.c (costs_set): Declare static, non-initialized for pcc.
4438 (encode_terminal_code): Remove ensued var.
4440 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
4443 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
4445 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
4446 (suffixes): Moved out of make_subsidiaries for K&R.
4448 * charset.c (map_charset_chars): Fix c_function declaration for
4451 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
4453 2002-05-23 Dave Love <fx@gnu.org>
4455 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
4457 * category.c (Fmodify_category_entry): Doc fix. Remove unused
4460 2002-05-23 Yong Lu <lyongu@asia-infonet.com>
4462 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
4464 * coding.c (Fdefine_coding_system_internal): Fix previous change.
4465 (decode_coding_charset): Workaround for the bug of GCC 2.96.
4467 2002-05-23 Kenichi Handa <handa@m17n.org>
4469 * Makefile.in (lisp): Change cyrillic.elc to cyrillic.el,
4470 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
4471 (shortlisp): Likewise.
4473 2002-05-22 Kenichi Handa <handa@m17n.org>
4475 * coding.c (decode_coding_charset): Adjusted for the change of
4476 Fdefine_coding_system_internal.
4477 (Fdefine_coding_system_internal): For a coding system of
4478 `charset' type, store a list of charset IDs in
4479 `charset_attr_charset_valids' element of coding attributes.
4481 * charset.c (Fmake_char): Fix previous change.
4483 2002-05-21 Kenichi Handa <handa@m17n.org>
4485 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
4486 (emacs_mule_char): New arg src. Delete arg `composition'. Caller
4487 changed. Handle 2-byte and 3-byte charsets correctly.
4488 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Renamed from
4489 DECODE_EMACS_MULE_COMPOSITION_RULE. Caller changed.
4490 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
4491 (DECODE_EMACS_MULE_21_COMPOSITION): Call
4492 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
4494 (decode_coding_emacs_mule): Handle composition correctly. Rewind
4495 `src' and `consumed_chars' correctly before calling
4497 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
4498 and alt&rule composition.
4499 (decode_coding_iso_2022): Handle composition correctly.
4500 (init_coding_once): Setup emacs_mule_bytes for private charsets.
4502 * charset.c (Fdefine_charset_internal): Fix bug for the case of
4503 re-defining a charset. If the charset has :emacs-mule-id, setup
4505 (Fmake_char): If CODE1 is nil, use the minimum code of the
4508 2002-05-20 Kenichi Handa <handa@m17n.org>
4510 * coding.c (encode_coding_iso_2022): If coding requires safe
4511 encoding, produce a character specified by
4512 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
4513 (encode_coding_sjis): Likewise.
4514 (encode_coding_big5): Likewise.
4515 (encode_coding_charset): Likewise.
4517 2002-05-17 Dave Love <fx@gnu.org>
4519 * xterm.c (XSetIMValues): Declare.
4521 * process.c: Conditionally include sys/wait.h, pty.h.
4523 * print.c (print_object): Fix print format for 64-bit
4526 * keyboard.c (modify_event_symbol): Fix print format for 64-bit
4529 * buffer.c (emacs_strerror): Declare.
4530 (MMAP_ALLOCATED_P, mmap_enlarge, syms_of_buffer): Import changes
4533 * fontset.c (Fclear_face_cache): Declare.
4534 (accumulate_font_info): Commented-out (unused).
4535 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
4538 * character.h (string_escape_byte8): Declare.
4540 * charset.c (load_charset_map, load_charset_map_from_file): Remove
4542 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
4543 (Fmap_charset_chars): Doc fix.
4545 * coding.c (Vchar_coding_system_table, Qchar_coding_system):
4547 (Fset_coding_system_priority, Fset_coding_system_priority)
4548 (Fdefine_coding_system_internal): Doc fix.
4550 2002-05-16 Dave Love <fx@gnu.org>
4552 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
4554 2002-05-16 Kenichi Handa <handa@m17n.org>
4556 * character.c (string_escape_byte8): Make multibyte string with
4559 * charset.c (Fmake_char): Delete unnecessary code.
4561 2002-05-14 Kenichi Handa <handa@m17n.org>
4563 * xfns.c (x_encode_text): Allocate coding.destination here, and
4564 call encode_coding_object with dst_object Qnil.
4566 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
4567 multibyte form correctly.
4569 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
4570 against Vfont_encoding_alist.
4572 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
4573 handling of charset list.
4574 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
4575 (decode_coding_object): Move point to coding->dst_pos before
4576 calling post-read-conversion function.
4577 (encode_coding_object): Give correct arguments to
4578 pre-write-conversion. Ignore the return value of
4579 pre-write-conversion function. Pay attention to the case that
4580 pre-write-conversion changes the current buffer. If dst_object is
4581 Qt, even if coding->src_bytes is zero, allocate at least one byte
4582 to coding->destination.
4584 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
4586 * charset.c (Fmake_char): Make it more backward compatible.
4587 (Fmap_charset_chars): Fix docstring.
4589 2002-05-13 Dave Love <fx@gnu.org>
4591 * coding.c: Doc fixes.
4592 (Fdefine_coding_system_alias): Use names, not symbols, in
4593 coding-system-alist.
4595 2002-05-13 Kenichi Handa <handa@m17n.org>
4597 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
4598 of calling free_realized_face.
4600 2002-05-10 Yong Lu <lyongu@asia-infonet.com>
4602 * charset.c (load_charset_map): Fix previous change.
4603 (read_hex): Don't treat SPC as a comment starter.
4604 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
4606 (Fdecode_char): Fix typo.
4608 2002-05-10 Kenichi Handa <handa@m17n.org>
4610 * charset.h (struct charset): New member `code_space_mask'.
4612 * coding.c (coding_set_source): Delete the local variable
4614 (encode_coding_charset): Delete the local variable charset.
4615 (Fdefine_coding_system_internal): Likewise.
4616 (Fdefine_coding_system_internal): Setup
4617 attrs[coding_attr_charset_valids] correctly.
4619 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
4620 member to check if CODE is valid or not.
4621 (Fdefine_charset_internal): Initialize `code_space_mask' member.
4622 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
4623 is within the range of charset->min_code and carset->max_code.
4625 2002-05-09 Dave Love <fx@gnu.org>
4627 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
4629 * dispextern.h (generate_ascii_font): Fix return type.
4631 * xfaces.c (generate_ascii_font): Fix arg declaration.
4633 * coding.c (coding_inherit_eol_type)
4634 (Fset_terminal_coding_system_internal)
4635 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
4637 2002-05-08 Kenichi Handa <handa@m17n.org>
4639 * coding.c (decode_coding_charset, encode_coding_charset): Handle
4640 multiple charsets correctly.
4642 2002-05-07 Kenichi Handa <handa@m17n.org>
4644 * search.c (boyer_moore): Fix handling of mulitbyte character
4647 * xdisp.c (display_mode_element): When the variable `elt' is
4648 changed, update `this' and `lisp_string'.
4650 2002-05-07 Kenichi Handa <handa@m17n.org>
4652 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
4654 * callproc.c (Fcall_process): Be sure to give the current buffer
4655 to decode_coding_c_string. Update PT and PT_BYTE after the
4658 * charset.c (struct charset_map_entries): New struct.
4659 (load_charset_map): Renamed from parse_charset_map. New args
4660 entries and n_entries. Caller changed.
4661 (load_charset_map_from_file): Renamed from load_charset_map.
4662 Caller changed. New arg control_flag. Call load_charset_map at
4664 (load_charset_map_from_vector): New function.
4665 (Fdefine_charset_internal): Setup charset.compact_codes_p.
4666 (encode_char): If the charset is compact, change a character index
4669 * coding.c (coding_alloc_by_making_gap): Check the case that the
4670 source and destination are the same correctly.
4671 (decode_coding_raw_text): Set coding->consumed_char and
4672 coding->consumed to 0.
4673 (produce_chars): If coding->chars_at_source is nonzero, update
4674 coding->consumed_char and coding->consumed before calling
4676 (Fdefine_coding_system_alias): Register ALIAS in
4677 Vcoding_system_alist.
4678 (syms_of_coding): Define `no-convesion' coding system at the tail.
4680 * fileio.c (Finsert_file_contents): Set coding_system instead of
4681 val. If the current buffer is multibyte, always call
4684 * xfaces.c (try_font_list): Give higher priority to fontset's
4685 family than face's family.
4687 2002-04-18 Kenichi Handa <handa@m17n.org>
4689 * callproc.c (Fcall_process): Be sure to give the current buffer
4690 to decode_coding_c_string.
4692 * xfaces.c (try_font_list): Give a family specified in a fontset
4693 higher priority than a family specified in a face.
4695 2002-04-09 Kenichi Handa <handa@m17n.org>
4697 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
4698 Fix arguments to insert_from_buffer.
4700 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
4702 2002-03-11 Kenichi Handa <handa@m17n.org>
4704 * coding.c (produce_chars): Set the variable `multibytep' correctly.
4705 (decode_coding_gap): Set coding->dst_multibyte correctly.
4707 2002-03-07 Kenichi Handa <handa@m17n.org>
4709 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
4710 (decode_coding_utf_16): Fix converting high and low bytes to
4712 (encode_coding_utf_16): Substitute coding->default_char for
4713 non-Unicode characters.
4714 (decode_coding): Don't call record_insert here.
4715 (setup_coding_system): Initialize `surrogate' of
4716 coding->spec.utf_16 to 0.
4717 (EMIT_ONE_BYTE): Fix for multibyte case.
4719 * insdel.c (insert_from_gap): Call record_insert.
4721 2002-03-04 Kenichi Handa <handa@m17n.org>
4723 * casefiddle.c (casify_region): Fix multibyte case.
4725 * character.c (c_string_width): Add return type `int'.
4726 (char_string_with_unification): Arg ADVANCED deleted.
4728 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
4729 (CHAR_STRING): Adjusted for the change of
4730 char_string_with_unification.
4731 (CHAR_STRING_ADVANCE): Make it do-while statement.
4733 * chartab.c (sub_char_table_set_range): Optimized for the case
4734 DEPTH == 3. Add workaround code for a GCC optimization bug.
4736 * charset.c (parse_charset_map): Remove an unused variable.
4738 * coding.c: Delete unused variables.
4740 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
4741 earlier. If inserted is zero and the coding system doesn't
4742 require flushing, don't call decode_coding_gap.
4744 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
4746 2002-03-01 Kenichi Handa <handa@m17n.org>
4748 The following changes are for using Unicode as an internal
4749 character model, and use UTF-8 format for buffer/string
4752 * .gdbinit (xchartable): Adjusted for the change of char table
4754 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
4756 * Makefile.in (obj): Add character.o and chartab.o.
4757 (lisp, shortlisp): Remove utf-8.elc:
4758 (*.o): For many files, change dependency on charset.h to
4759 character.h, and add dependency on character.h.
4760 (character.o, chartab.o): New targets.
4762 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c,
4763 doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c,
4764 w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
4767 * dired.c, filelock.c: Include "character.h".
4769 * alloc.c: Include "character.h" instead of "charset.h".
4770 (Fmake_char_table): Moved to chartab.c.
4771 (make_sub_char_table): Likewise.
4772 (syms_of_alloc): Remove defsubr for Smake_char_table.
4774 * buffer.c: Include "character.h" instead of "charset.h", don't
4776 (Fset_buffer_multibyte): Adjuted for UTF-8.
4778 * buffer.h: EXFUN Fbuffer_live_p.
4780 * callproc.c: Include "character.h" instead of "charset.h".
4781 (Fcall_process): Big change for the new code-conversion APIs.
4783 * casetab.c: Include "character.h" instead of "charset.h".
4784 (set_canon, set_identity, shuffle): Adjusted for the new
4785 map_char_table spec.
4786 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
4787 accessing the char table structure.
4789 * chartab.c: New file that implements char table.
4791 * category.c: Include "character.h".
4792 (copy_category_entry): New function.
4793 (copy_category_table): Call map_char_table and copy_category_entry.
4794 (Fmake_category_table): Initialize all top-vel slots.
4795 (char_category_set): New function.
4796 (modify_lower_category_set): Deleted.
4797 (Fmodify_category_entry): Call char_table_ref_and_range.
4799 * category.h (CATEGORY_SET): Just call char_category_set.
4801 * ccl.c: Include "character.h".
4802 (Qccl, Qcclp): New variables.
4803 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
4805 (CCL_WRITE_MULTIBYTE_CHAR): Deleted.
4806 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjusted for the change of SRC
4808 (ccl_driver): Types of arguments changed. Code adjusted for that.
4809 (Fccl_execute, Fccl_execute_on_string): Adjusted for the change of
4811 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
4813 * ccl.h (struct ccl_program): Members eol_type and multibyte
4814 deleted. New members src_multibyte, dst_multibyte, consumed, and
4816 (struct ccl_spec): Members decoder and encoder deleted. New
4818 (CODING_SPEC_CCL_PROGRAM): New macro.
4819 (ccl_driver): Prototype updated.
4820 (Qccl, Qcclp, Fccl_program_p): Extern them.
4821 (CHECK_CCL_PROGRAM): New macro.
4823 * character.c, character.h, chartab.c: New files.
4825 * charset.c: Mostly re-written. Character and multibyte sequence
4826 handling codes are moved to character.c.
4828 * charset.h: Mostly re-written. Character and multibyte sequence
4829 handling codes are moved to character.h.
4831 * coding.c, coding.h: Mostly re-written.
4833 * composite.c: Include "character.h" instead of "charset.h".
4834 (CHAR_WIDTH): Moved to character.h.
4835 (HASH_KEY, HASH_VALUE): Deleted.
4837 * composite.h (enum composition_method): Order of enumeration
4840 * data.c: Include "character.h" instead of "charset.h".
4841 (Faref): Call CHAR_TABLE_REF for a char table.
4842 (Faset): Call CHAR_TABLE_SET for a char table.
4844 * dispextern.h (free_realized_face, check_face_attribytes,
4845 generate_ascii_font): Extern them.
4846 (free_realized_multibyte_face): Extern deleted.
4848 * disptab.h (DISP_CHAR_VECTOR): Adjusted for the change of char
4851 * editfns.c: Include "character.h" instead of "charset.h".
4852 (Fchar_to_string): Always call CHAR_STRING.
4854 * emacs.c (main): Call init_charset_once, init_charset,
4855 syms_of_chartab, and syms_of_character.
4857 * fileio.c: Include "character.h" instead of "charset.h".
4858 (Finsert_file_contents): Big change for the new code-conversion
4860 (choose_write_coding_system): Likewise.
4861 (Fwrite_region): Likewise.
4862 (build_annotations_2): Deleted.
4863 (e_write): Big change for the new code-conversion API.
4865 * fns.c: Include "character.h" instead of "charset.h".
4866 (copy_sub_char_table): Moved to chartab.c.
4867 (Fcopy_sequence): Call copy_char_table for a char table.
4868 (concat): Delete codes calling count_multibyte.
4869 (string_char_to_byte): Adjusted for the new multibyte form.
4870 (string_byte_to_char): Likewise.
4871 (internal_equal): Adjusted for the change of char table structure.
4872 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent,
4873 Fchar_table_extra_slot, Fset_char_table_extra_slot,
4874 Fchar_table_range, Fset_char_table_range, Fset_char_table_default,
4875 char_table_translate, optimize_sub_char_table,
4876 Foptimize_char_table, map_char_table, Fmap_char_table): Moved to
4878 (char_table_ref_and_index): Deleted.
4879 (HASH_KEY, HASH_VALUE): Moved to lisp.h.
4880 (Fmd5): Call preferred_coding_system instead of accessing
4881 Vcoding_category_list. Adjusted for the new code-conversion API.
4882 (syms_of_fns): Defsubr for char table related functions moved to
4885 * fontset.c: Mostly re-written.
4887 * fontset.h (struct font_info): Type of the member encoding_type
4889 (enum FONT_SPEC_INDEX): New enum.
4890 (fontset_font_pattern, fs_load_font): Prototype updated.
4891 (FS_LOAD_FONT): Adjusted for the change of fs_load_font.
4893 * indent.c: Include "character.h" instead of "charset.h".
4894 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of
4897 * insdel.c: Include "character.h" instead of "charset.h".
4898 (copy_text): Don't refer to Vnonascii_translation_table.
4899 (insert_from_gap): New function.
4901 * keyboard.c: Include "character.h" instead of "charset.h".
4902 (command_loop_1): Never call direct_output_forward_char before
4903 a non-ASCII character.
4904 (read_char): If Vkeyboard_translate_table is a char table, always
4905 translated a character.
4907 * keymap.c: Include "character.h".
4908 (store_in_keymap): Handle the case that IDX is a cons.
4909 (Fdefine_key): Handle the case that KEY is a cons and the car part
4910 is also a cons (range).
4911 (push_key_description): Adjusted for the new character code.
4912 (describe_vector): Call describe_char_table for a char table.
4913 (describe_char_table): New function.
4915 * keymap.h (describe_char_table): Extern it.
4917 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
4918 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
4919 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
4920 SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
4922 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
4924 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
4925 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
4926 CHARTAB_SIZE_BITS_3): New macros.
4927 (chartab_size): Extern it.
4928 (struct Lisp_Char_Table): Re-designed.
4929 (struct Lisp_Sub_Char_Table): New structure.
4930 (HASH_KEY, HASH_VALUE): Moved from fns.c.
4931 (CHARACTERBITS): Defined as 22.
4932 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
4933 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
4934 (GC_SUB_CHAR_TABLE_P): New macro.
4935 (Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
4936 (code_convert_string_norecord): Extern deleted.
4937 (init_character_once, syms_of_character, init_charset,
4938 syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
4940 * lread.c: Include "character.h".
4941 (read_multibyte): New arg NBYTES.
4942 (read_escape): The meaning of returned *BYTEREP changed.
4943 (to_multibyte): Deleted.
4944 (read1): Adjuted the handling of char table and string.
4946 * print.c: Include "character.h" instead of "charset.h".
4947 (print_string): Convert 8-bit raw bytes to octal form by
4948 string_escape_byte8.
4949 (print_object): Adjusted for the new multibyte form. Print 8-bit
4950 raw bytes always in octal form. Handle sub char table correctly.
4952 * process.c: Include "character.h" instead of "charset.h".
4953 (read_process_output): Adjusted for the new code-conversion API.
4954 (send_process): Likewise.
4956 * puresize.h (BASE_PURESIZE): Increased.
4958 * regex.c: Include "character.h" instead of "charset.h".
4959 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
4960 (regex_compile): Accept a range whose starting and ending
4961 character have different leading bytes.
4962 (analyse_first): Adjusted for the above change.
4964 * search.c: Include "character.h" instead of "charset.h".
4965 (search_buffer, boyer_moore): Adjusted for the new multibyte form.
4966 (Freplace_match): Adjusted for the change of
4967 multibyte_char_to_unibyte.
4969 * syntax.c: Include "character.h" instead of "charset.h".
4970 (syntax_parent_lookup): Deleted.
4971 (Fmodify_syntax_entry): Accept a cons as CHAR.
4972 (skip_chars): Adjusted for the new multibyte form.
4973 (init_syntax_once): Call char_table_set_range instead of directly
4974 accessing the structure of a char table.
4976 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
4977 (SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
4978 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
4979 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
4981 * term.c: Include "buffer.h" and "character.h".
4982 (encode_terminal_code): Adjusted for the new code-conversion API.
4983 (write_glyphs): Likewise.
4984 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
4986 * w32term.c (x_new_font): Adjusted for the change of FS_LOAD_FONT.
4988 * xdisp.c: Include "character.h".
4989 (get_next_display_element): Adjusted for the new multibyte form.
4990 (disp_char_vector): Adjusted for the new char table structure.
4991 (decode_mode_spec_coding): Adjusted for the new structure of
4993 (decode_mode_spec): Adjusted for the new code-conversion API.
4995 * xfaces.c: Include "character.h" instead of "charset.h".
4996 (load_face_font): Adjusted for the change of choose_face_font and
4998 (generate_ascii_font): New function.
4999 (set_lface_from_font_name): Adjusted for the change of
5001 (set_font_frame_param): Adjusted for the change of
5003 (free_realized_face): Make it public.
5004 (free_realized_faces_for_fontset): Renamed from
5005 free_realized_multibyte_face. Free also faces realized for ASCII.
5006 (choose_face_font): Argments changed. Adjusted for the change of
5007 fontset_font_pattern and FS_LOAD_FONT.
5009 * xfns.c: Include "character.h".
5010 (x_encode_text): Adjusted for the new code-conversion API.
5012 * xselect.c: Don't include "charset.h".
5013 (selection_data_to_lisp_data): Adjusted for the new code
5016 * xterm.c: Include "character.h".
5017 (x_encode_char): New argument CHARSET. Caller changed.
5018 (x_get_char_face_and_encoding): Call ENCODE_CHAR instead of
5020 (x_get_glyph_face_and_encoding): Likewise.
5021 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
5022 CHAR_WIDTH instead of CHARSET_WIDTH.
5023 (XTread_socket): Adjusted for the new code-conversion API.
5024 (x_new_font): Adjusted for the change of FS_LOAD_FONT.
5025 (x_load_font): Adjusted for the change of struct font.
5028 ;; coding: iso-2022-7bit
5031 Copyright (C) 2002 Free Software Foundation, Inc.
5032 Copying and distribution of this file, with or without modification,
5033 are permitted provided the copyright notice and this notice are preserved.
5035 ;;; arch-tag: 1bff38bd-2030-46ae-9d18-f15e6006b665