*** empty log message ***
[emacs/old-mirror.git] / src / ChangeLog
blob0bbf3e61612f449e3ce0db3012c1f94b89dc86ea
1 2008-10-01  Adrian Robert  <Adrian.B.Robert@gmail.com>
3         * nsfont.m (nsfont_spec_to_traits): Use UnXX masks only for non-normal
4         styles.
5         (nsfont_open): Reenable the cache.
7 2008-10-01  Adrian Robert  <Adrian.B.Robert@gmail.com>
9         * font.c (font_matching_entity): Reflect ATTRS in font selection.
10         (font_find_for_lface) [HAVE_NS]: Don't ignore case.
12 2008-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
14         * dispnew.c (Fsend_string_to_terminal): Don't try to send a string to
15         a suspended terminal.
17 2008-09-30  Michael Albinus  <michael.albinus@gmx.de>
19         * dbusbind.c (xd_signature): Use strcat instead of sprintf.
21 2008-09-30  Eli Zaretskii  <eliz@gnu.org>
23         * Makefile.in (MSDOS_SUPPORT): Remove ccl.elc and codepage.elc.
25 2008-09-30  Chong Yidong  <cyd@stupidchicken.com>
27         * xdisp.c (move_it_to): Don't advance the iterator if the last tab
28         in a continued line coincides with a line beginning.
30 2008-09-29  Adrian Robert  <Adrian.B.Robert@gmail.com>
32         * nsfont.m (nsfont_trait_distance): Fix bug.
33         (nsfont_list): Return a list rather than a vector (syncs with Handa
34         changes of 2008-05-14).
35         (nsfont_open): Improve logging.
37 2008-09-29  Andreas Schwab  <schwab@suse.de>
39         * keyboard.c (syms_of_keyboard) <input-decode-map>: Doc fix.
41 2008-09-28  Martin Rudalics  <rudalics@gmx.at>
43         * character.c (Fchar_resolve_modifiers): Rewrite Elisp function
44         name as char-resolve-modifiers.
45         Reported by: Markus Triska <markus.triska@gmx.at>
47 2008-09-28  Dan Nicolaescu  <dann@ics.uci.edu>
49         * dispnew.c (init_display): Return earlier when running as a daemon.
51 2008-09-27  Adrian Robert  <Adrian.B.Robert@gmail.com>
53         * nsfont.m (nsfont_draw): Fix up composition rendering (cmp_from, ...).
55 2008-09-27  Eli Zaretskii  <eliz@gnu.org>
57         * composite.c (Fcomposition_get_gstring)
58         (Fcompose_region_internal, Fcompose_string_internal)
59         (Ffind_composition_internal): Doc fix.
60         (syms_of_composite) <compose-chars-after-function>: Doc fix.
61         (syms_of_composite) <auto-composition-function>: Doc fix.
62         (syms_of_composite) <composition-function-table>: Doc fix.
64 2008-09-25  Chong Yidong  <cyd@stupidchicken.com>
66         * search.c (wordify): New argument for lax word-ends.
67         (Fword_search_forward_lax, Fword_search_backward_lax): New funs.
69 2008-09-24  Dan Nicolaescu  <dann@ics.uci.edu>
71         * lisp.h (is_daemon): Declare.
72         * dispnew.c (init_display): Do not try to initialize the terminal
73         when running as a daemon.
75 2008-09-22  Chong Yidong  <cyd@stupidchicken.com>
77         * nsfns.m (compute_tip_xy): Use x_display_pixel_width and
78         x_display_pixel_height.
80 2008-09-22  Martin Rudalics  <rudalics@gmx.at>
82         * undo.c (record_point): Don't call Fundo_boundary for first
83         change.  (Bug#731)
85 2008-09-22  Juanma Barranquero  <lekktu@gmail.com>
87         * emacs.c (Fdaemonp): Doc fix.
89 2008-09-22  Dan Nicolaescu  <dann@ics.uci.edu>
91         * emacs.c (main): Place #ifdef in the proper place.
93 2008-09-21  Dan Nicolaescu  <dann@ics.uci.edu>
95         * emacs.c (standard_args): Add --daemon.
96         (main): Disconnect from the terminal when --daemon is passed.
97         (is_daemon): New variable.
98         (Fdaemonp): New function.
99         (syms_of_emacs): Defsubr it.
101 2008-09-20  Chong Yidong  <cyd@stupidchicken.com>
103         * xdisp.c (get_next_display_element): Handle string display
104         correctly when checking for the end of a box run.
106 2008-09-20  Glenn Morris  <rgm@gnu.org>
108         * fileio.c (Qdelete_by_moving_to_trash): New Lisp_Object.
109         (syms_of_fileio): Add Qdelete_by_moving_to_trash.
110         (Frename_file): Avoid copying to trash if a rename involves
111         a delete.  (Bug#964).
113 2008-09-20  Eli Zaretskii  <eliz@gnu.org>
115         * keyboard.c (Fset_quit_char, Fset_input_meta_mode)
116         (Fset_output_flow_control, Fcurrent_input_mode): Support MSDOS
117         frames as well as termcap frames.
118         (handle_interrupt): Remove "#ifndef MSDOS" around the call to
119         get_named_tty.
121 2008-09-19  Eli Zaretskii  <eliz@gnu.org>
123         * process.c (procfs_system_process_attributes): Fix cmdline in
124         case /proc/PID/cmdline is empty.
126         * xterm.c (x_wm_set_size_hint): Use x_display_pixel_width and
127         x_display_pixel_height.
129 2008-09-19  Juanma Barranquero  <lekktu@gmail.com>
131         * frame.c (x_fullscreen_adjust): Declare var as Display_Info.
133         * w32fns.c (Fx_display_pixel_width, Fx_display_pixel_height)
134         (compute_tip_xy): Use x_display_pixel_width, x_display_pixel_height.
136 2008-09-19  Dan Nicolaescu  <dann@ics.uci.edu>
138         * dispextern.h (struct it): Move line_wrap away from the middle of
139         bitfields.  Move voffset in struct iterator_stack_entry after the
140         bitfields.  Move tab_width near after another short.
142 2008-09-18  Dan Nicolaescu  <dann@ics.uci.edu>
144         * frame.h (struct frame): Move alpha from the middle of bitfields.
146         * window.h (struct window): Move frozen_window_start_p after the
147         rest of the bitfields to reduce padding.
149 2008-09-18  Chong Yidong  <cyd@stupidchicken.com>
151         * xterm.h (x_display_info): Remove `height' and `width' members.
153         * nsterm.h (ns_display_info): Remove `height' and `width' members.
155         * w32term.h (w32_display_info): Remove `height', `width',
156         `height_in', and `width_in' members.
158         * xterm.c (x_display_pixel_height, x_display_pixel_width): New
159         functions.
160         (x_calc_absolute_position): Use them.
161         (x_term_init): Omit removed `height' and `width' members.
163         * w32term.c (x_display_pixel_height, x_display_pixel_width): New
164         functions.
165         (w32_read_socket, x_calc_absolute_position): Use them.
166         (w32_initialize_display_info, w32_term_init): Omit removed members
167         of w32_display_info.
169         * nsterm.m (x_display_pixel_height, x_display_pixel_width): New
170         functions.
171         (ns_initialize_display_info): Omit removed members of
172         ns_display_info.
174         * xterm.c (x_display_pixel_height, x_display_pixel_width): New
175         functions.
176         (x_calc_absolute_position): Use them.
177         (x_term_init): Omit removed `height' and `width' members.
179         * xfns.c (Fx_display_pixel_width, Fx_display_pixel_height)
180         (compute_tip_xy): Use x_display_pixel_height and
181         x_display_pixel_width.
183         * frame.c (x_fullscreen_adjust): Use x_display_pixel_height and
184         x_display_pixel_width.
186         * xmenu.c (menu_position_func): Use x_display_pixel_height and
187         x_display_pixel_width.
189 2008-09-18  Kenichi Handa  <handa@m17n.org>
191         * composite.c (fill_gstring_header): Don't check FROM and TO here.
192         (composition_compute_stop_pos): Fix handling of static composition.
193         (Fcomposition_get_gstring): Check FROM and TO at first.
195 2008-09-17  Stefan Monnier  <monnier@iro.umontreal.ca>
197         * composite.c (Fcomposition_get_gstring): Yet another int/Lisp_Oject
198         mixup (YAILOM).
200 2008-09-17  Chong Yidong  <cyd@stupidchicken.com>
202         * indent.c (Fvertical_motion): Use position reported by iterator
203         instead of PT for determining screen motion (bug#943).
205 2008-09-17  Romain Francoise  <romain@orebokech.com>
207         * composite.c (composition_adjust_point): Fix int/EMACS_INT mixup.
209 2008-09-17  Kenichi Handa  <handa@m17n.org>
211         * ftfont.c (ftfont_shape_by_flt): Downcase family name.
213         * composite.c (Fcomposition_get_gstring): Make bigger gstring_work
214         if necessary.
216 2008-09-16  Kenichi Handa  <handa@m17n.org>
218         * coding.c (make_conversion_work_buffer): Avoid calling
219         Fget_buffer_create if it is not necessary.
221 2008-09-15  Martin Rudalics  <rudalics@gmx.at>
223         * window.c (Fselect_window): Don't update window_select_count and
224         use_time when norecord is not nil.
226 2008-09-14  Kenichi Handa  <handa@m17n.org>
228         * fileio.c (Finsert_file_contents): Delete incorrect decrement of
229         specpdl_ptr.
231 2008-09-12  Kenichi Handa  <handa@m17n.org>
233         * indent.c (scan_for_column): Don't handle automatic composition
234         if the current buffer is not associated with a window.
236         * composite.c (composition_reseat_it): If the current buffer is
237         not associated with a window, ignore the automatic composition.
238         (find_automatic_composition): Likewise.
240 2008-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
242         * term.c (close_gpm): New fun extracted from Fgpm_mouse_stop.
243         (Fgpm_mouse_stop): Use it.
244         * termhooks.h (close_gpm): Declare.
245         * keyboard.c (tty_read_avail_input): Forcefully close the gpm
246         connection if Gpm_GetEvent fails.
248         * window.c (set_window_buffer): Always preserve current-buffer.
250 2008-09-12  Glenn Morris  <rgm@gnu.org>
252         * charset.c (init_charset): Warn if etc/charsets not found.  (Bug#909)
254 2008-09-11  Glenn Morris  <rgm@gnu.org>
256         * charset.c (charset-map-path): Doc fix.
258 2008-09-10  Kenichi Handa  <handa@m17n.org>
260         * xdisp.c (handle_composition_prop): Set it->cmp_it.ch to -1.
262         * font.c (Ffont_shape_gstring): Make glyphs of non-nil adjustment
263         compose a grapheme cluster with the preceding base glyph.
265         * composite.c (composition_compute_stop_pos): Fix previous change.
266         Reset cmp_it->id to -1 at first.
268 2008-09-10  Glenn Morris  <rgm@gnu.org>
270         * Makefile.in (character.o, chartab.o): Fix config.h typo.
272 2008-09-09  Chong Yidong  <cyd@stupidchicken.com>
274         * keyboard.c (read_key_sequence): Reapply translation maps when
275         switching keyboards.
277 2008-09-09  Kenichi Handa  <handa@m17n.org>
279         * ftfont.c (ftfont_shape_by_flt): Use "combining" FLT for ASCII
280         characters.
282         * composite.c (FORWARD_CHAR): Fix calculation
283         of (POSITION).pos_byte.
284         (composition_compute_stop_pos): Limit the search of composition to
285         at most 500 characters ahead.  If we reach the limit or find a
286         newline, set cmp_it->ch to -2 and return 0.
287         (composition_reseat_it): Handle the case that cmp_it->ch is -2.
289 2008-09-08  Kenichi Handa  <handa@m17n.org>
291         * indent.c (Fvertical_motion): Be sure to set
292         it_overshoot_expected if it.cmp_it.id is non-negative.
294 2008-09-07  Andreas Schwab  <schwab@suse.de>
296         * callproc.c (Fcall_process): Don't hold references to string data
297         across garbage collection.  Move initialisation of new_argv down
298         to avoid compiler bug.
300 2008-09-07  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
302         * process.c (Fsystem_process_attributes): Doc fix.
304 2008-09-07  Chong Yidong  <cyd@stupidchicken.com>
306         * callproc.c (Fcall_process): Canonicalize current directory name.
308         * xdisp.c (move_it_to): When moving by vpos, ensure that the
309         iterator advances to the next line if the current line ends in a
310         continued tab.
312 2008-09-07  Teodor Zlatanov  <tzz@lifelogs.com>
314         * nsfont.m (nsfont_draw): Fix the references to missing gidx data
315         member to point to cmp_from.
317         * xdisp.c: Doc fix for references to gidx data member.
319 2008-09-07  Stefan Monnier  <monnier@iro.umontreal.ca>
321         * buffer.c (Fbuffer_swap_text): Reset window->point markers.
323 2008-09-07  Kenichi Handa  <handa@m17n.org>
325         * composite.c (FORWARD_CHAR): Check STOP after
326         incrementing (POSITION).pos.
328 2008-09-06  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
330         * process.c (Fsystem_process_attributes): Doc fix.
332 2008-09-06  Chong Yidong  <cyd@stupidchicken.com>
334         * keyboard.c (Ftop_level): Doc fix.
336 2008-09-06  Eli Zaretskii  <eliz@gnu.org>
338         * xmenu.c (xmenu_show) [!HAVE_X_WINDOWS]: If frame has a
339         minibuffer, don't let lower part of menu invade the echo area.
341         * msdos.c (IT_menu_display): Use STRING_CHAR_ADVANCE instead of a
342         "char *q" to access menu text and advance through it.  Revert the
343         change that displayed ">" instead of ASCII character 0x10.
345 2008-09-05  Eli Zaretskii  <eliz@gnu.org>
347         * menu.c (single_menu_item) [!HAVE_BOXES]: Enable emulation of
348         toggle boxes and radio buttons on MS-DOS as well.
350 2008-09-05  Kenichi Handa  <handa@m17n.org>
352         * composite.c (autocmp_chars): Check lookback count.
353         (composition_compute_stop_pos): Set cmp_it->lookback.
354         (composition_reseat_it): Check lookback count.
355         (struct position_record): New struct.
356         (FORWARD_CHAR, BACKWARD_CHAR, CHAR_COMPOSABLE_P): New macros.
357         (find_automatic_composition): New function.
358         (composition_adjust_point): Use find_automatic_composition.
360         * dispextern.h (struct composition_it): New member lookback.
362 2008-09-02  Chong Yidong  <cyd@stupidchicken.com>
364         * indent.c (Fvertical_motion): Don't call move_it_by_lines again
365         if moving by a single line.
367 2008-09-02  Andreas Schwab  <schwab@suse.de>
369         * xterm.c (x_delete_display): Fix merge error.
371         * fileio.c (Fexpand_file_name): Remove unused variables.
373 2008-09-02  Eli Zaretskii  <eliz@gnu.org>
375         * fileio.c (Fexpand_file_name): Copy argument `name' into local
376         storage on all platforms, not just on DOS_NT.
378 2008-09-02  Jason Rumney  <jasonr@gnu.org>
380         * w32menu.c (Fx_popup_menu, Fx_popup_dialog, w32_menu_show): Ensure
381         mouse is not grabbed after menu is finished.
383 2008-09-01  Chong Yidong  <cyd@stupidchicken.com>
385         * xfaces.c (Finternal_set_alternative_font_family_alist)
386         (Finternal_set_alternative_font_registry_alist): Properly copy
387         entire alist structure.
389 2008-09-01  Kenichi Handa  <handa@m17n.org>
391         * ftfont.c (ftfont_spec_pattern): Don't create a charset of the
392         representative chars of the script is a vector.
393         (ftfont_list): Handle the case the representative chars of the
394         script is a vector.
396         * character.c (syms_of_character): Docstring of
397         script-representative-chars fixed.
399 2008-08-31  Eli Zaretskii  <eliz@gnu.org>
401         * msdos.c (BUILD_CHAR_GLYPH): New macro.
402         (IT_menu_display): Use it instead of SET_CHAR_GLYPH to construct
403         the menu.  Allocate larger buffer for `text', to account for
404         possible ^C characters.
406 2008-08-31  Martin Rudalics  <rudalics@gmx.at>
408         * xdisp.c (prepare_menu_bars): Don't call
409         Vwindow_size_change_functions with arg Qt.
411 2008-08-31  Stefan Monnier  <monnier@iro.umontreal.ca>
413         * font.h (font_range):
414         * fileio.c (report_file_error):
415         * composite.c (composition_update_it): Yet another int/Lisp_Oject mixup.
417 2008-08-30  Glenn Morris  <rgm@gnu.org>
419         * data.c (Fmake_variable_frame_local): Doc fix.
421         * frame.c (Fmodify_frame_parameters): Doc fix.
423 2008-08-30  Eli Zaretskii  <eliz@gnu.org>
425         * w32.c (init_user_info): Allocate buf[] with xmalloc using the size
426         needed by GetTokenInformation.
427         (w32_system_process_attributes): Check return values of all system
428         APIs.
430         * msdos.c (IT_display_cursor): Write "CURSOR ON/OFF" to termscript
431         only when the state changes.
432         (IT_update_begin, IT_update_end): Add termscript trace.
434         * w16select.c (Fw16_set_clipboard_data): Don't encode text if
435         clipboard is unavailable.  Set dst to NULL if it doesn't point to
436         malloc'ed data.
437         (Fw16_get_clipboard_data): Initialize htext to NULL, to avoid
438         passing random values to xfree.
440         * dispnew.c (init_display): Set `tty's association in frame's
441         parameters alist to the name of the terminal device, if that is
442         known.
444 2008-08-29  Jason Rumney  <jasonr@gnu.org>
446         * w32uniscribe.c (uniscribe_check_otf): Don't fallback on DFLT script.
448 2008-08-29  Eli Zaretskii  <eliz@gnu.org>
450         * composite.c (fill_gstring_body): Avoid compiler warnings.
452         * font.c (font_fill_lglyph_metrics): Use EMACS_INT in
453         LGLYPH_SET_CODE to avoid compiler warnings.
455         * makefile.w32-in ($(BLD)/w32uniscribe.$(O)): Depend on composite.h
457         * composite.h (LGLYPH_SET_CODE): Cast `val' to EMACS_INT.
459         * w32uniscribe.c (uniscribe_shape): Shut up compiler warning in
460         LGLYPH_SET_CODE.
462 2008-08-29  Kenichi Handa  <handa@m17n.org>
464         * fileio.c (report_file_error): Don't downcase the first character
465         of errstring if it is still unibyte.
467 2008-08-29  Kenichi Handa  <handa@m17n.org>
469         These changes are to re-implement the automatic composition so
470         that it doesn't use text properties.
472         * Makefile.in (ftfont.o): Depend on composite.h.
473         (composite.o): Depend dispextern.h, font.h, frame, and window.h.
475         * character.h (Vunicode_category_table): Extern it.
477         * character.c (Vunicode_category_table): New variable.
478         (syms_of_character): DEFVAR_LISP Vunicode_category_table.
480         * chartab.c (optimize_sub_char_table): Perform more greedy
481         optimization.
483         * composite.h (enum composition_method): Delete
484         COMPOSITION_WITH_GLYPH_STRING.
485         (COMPOSITION_METHOD): Don't check COMPOSITION_WITH_GLYPH_STRING.
486         (Vcomposition_function_table): Extern it.
487         (LGSTRING_XXX, LGLYPH_XXX): Macros moved from font.h.
488         (composition_gstring_put_cache, composition_gstring_from_id)
489         (composition_gstring_p, composition_gstring_width)
490         (composition_compute_stop_pos, composition_reseat_it)
491         (composition_update_it, composition_adjust_point): Extern them.
492         (Fcomposition_get_gstring): EXFUN it.
494         * composite.c: Include window.h, frame.h, dispextern.h font.h.
495         (Vcomposition_function_table)
496         (get_composition_id): Don't handle COMPOSITION_WITH_GLYPH_STRING.
497         (gstring_hash_table, gstring_work, gstring_work_headers): New
498         variables.
499         (gstring_lookup_cache, composition_gstring_put_cache)
500         (composition_gstring_from_id, composition_gstring_p)
501         (composition_gstring_width, fill_gstring_header)
502         (fill_gstring_body, autocmp_chars, composition_compute_stop_pos)
503         (composition_reseat_it, composition_update_it)
504         (composition_adjust_point, Fcomposition_get_gstring): New
505         functions.
506         (syms_of_composite): Initialize gstring_hash_table, gstrint_work,
507         and gstring_work_headers.  DEFVAR_LISP composition-function-table.
508         Defsubr compostion_get_gstring.
510         * dispextern.h (struct glyph): New union u.cmp.  Delete the member
511         cmp_id.
512         (struct glyph_string): Delete the member gidx.  New members
513         cmp_id, cmp_from, and cmp_to.
514         (enum it_method): Delete GET_FROM_COMPOSITION.
515         (struct composition_it): New struct.
516         (struct it): New member cmp_it, and iterator_stack_entry.cmp_it.
517         Delete c, len, cmp_id, cmp_len in u.comp.
519         * font.h (enum lgstring_indices): Delete it.
520         (LGSTRING_XXX, LGLYPH_XXX): These macros moved to composite.h.
521         (enum lglyph_indices): Likewise.
522         (font_range): Extern adjusted.
523         (font_fill_lglyph_metrics): Extern it.
525         * font.c (QCf): New variable.
526         (check_gstring): Use LGSTRING_GLYPH_LEN, not LGSTRING_LENGTH.
527         (font_prepare_composition): Delete this function.
528         (font_range): Type and arguments changed.
529         (Ffont_make_gstring, Ffont_fill_gstring): Delete them.
530         (font_fill_lglyph_metrics): New function.
531         (Ffont_shape_text): Renamed to Ffont_shape_gstring and arguments
532         changed.
533         (syms_of_font): DEFSYM QCf.  Delete defsubr for
534         Sfont_make_gstring, Sfont_fill_gstring, Sfont_shape_text.  Defsubr
535         Sfont_shape_gstring.
537         * fontset.h (font_for_char): Extern it.
539         * fontset.c (font_for_char): New function.
541         * ftfont.c: Include composite.h.
542         (ftfont_resolve_generic_family): Add langset "en" to pattern.
543         (ftfont_shape_by_flt): Use LGSTRING_GLYPH_LEN, not
544         LGSTRING_LENGTH.
546         * indent.c: Include composite.h and dispextern.h.
547         (check_composition): Delete this function.
548         (scan_for_column): Handle composition by
549         composition_compute_stop_pos, composition_reseat_it, and
550         composition_update_it.
551         (compute_motion): Likewise.
552         (Fvertical_motion): Fix checking of composition.
554         * keyboard.c (adjust_point_for_property): Check composition by
555         composition_adjust_point.
557         * nsterm.m (ns_draw_glyph_string): Adjusted for the change of
558         struct glyph_string.
560         * term.c (encode_terminal_code): Adjusted for the change of struct
561         glyph.
562         (append_composite_glyph): Adjusted for the change of struct it and
563         struct glyph.
564         (produce_composite_glyph): Likewise.
566         * w32term.c (x_draw_composite_glyph_string_foreground): Adjusted
567         for the change of struct glyph_string.
568         (x_draw_glyph_string): Likewise.
570         * w32uniscribe.c (struct uniscribe_font_info): Include composite.h.
571         (uniscribe_shape): Use LGSTRING_GLYPH_LEN, not LGSTRING_LENGTH.
573         * xdisp.c: Include font.h.
574         (it_props): Delete the entry for Qauto_composed.
575         (init_iterator): Initialize it->cmp_it.id to -1.
576         (compute_stop_pos): Call composition_compute_stop_pos.
577         (face_before_or_after_it_pos): Adjusted for the change of struct
578         it.
579         (handle_auto_composed_prop): Delete it.
580         (handle_composition_prop): Handle only static composition.
581         (next_overlay_string): Remove it->method == GET_FROM_COMPOSITION
582         from xassert.  Initialize it->cmp_it.stop_pos.
583         (push_it): Adjusted for the change of struct it.
584         (pop_it): Likewise.
585         (get_next_element): Delete next_element_from_composition.
586         (CHAR_COMPOSED_P): New macro.
587         (get_next_display_element): For automatic composition, get a face
588         from the font in the glyph-string.
589         (set_iterator_to_next): For GET_FROM_BUFFER and GET_FROM_STRING,
590         check composition by it->cmp_it.id.  Delete GET_FROM_COMPOSITION
591         case.
592         (next_element_from_string): Check if the character at the current
593         position is composed by CHAR_COMPOSED_P.
594         (next_element_from_buffer): Likewise.
595         (next_element_from_composition): Adjusted for the change of struct
596         it.  Update it->cmp_it.
597         (dump_glyph): Adjusted for the change of struct glyph.
598         (fill_composite_glyph_string): Adjusted for the change of struct
599         it and struct glyph.  Don't handle automatic composition here.
600         (fill_gstring_glyph_string): New function.
601         (x_get_glyph_overhangs): Handle automatic composition.
602         (BUILD_COMPOSITE_GLYPH_STRING): Adjusted for the change of struct
603         glyph.
604         (BUILD_GSTRING_GLYPH_STRING): New macro.
605         (BUILD_GLYPH_STRINGS): Call BUILD_GSTRING_GLYPH_STRING for
606         automatic composition.
607         (append_composite_glyph): Adjusted for the change of struct it and
608         struct glyph.
609         (x_produce_glyphs): Adjusted for the change of struct it.
611         * xterm.c (x_draw_composite_glyph_string_foreground): Adjusted for
612         the change of struct glyph_string.
613         (x_draw_glyph_string): Likewise.
615 2008-08-29  Glenn Morris  <rgm@gnu.org>
617         * buffer.c (word-wrap): Doc fix.
618         * xdisp.c (truncate-partial-width-windows): Doc fix.
619         Increase default to 50.
621 2008-08-29  Chong Yidong  <cyd@stupidchicken.com>
623         * xdisp.c (update_tool_bar_unwind): New function.
624         (update_tool_bar): Temporarily set selected frame before building
625         tool-bar items.
627 2008-08-28  Michael Albinus  <michael.albinus@gmx.de>
629         * dbusbind.c (XD_ERROR, XD_DEBUG_MESSAGE): Use strncpy and
630         snprintf, respectively.
631         (xd_append_arg): Convert strings with Fstring_make_unibyte.
633 2008-08-28  Chong Yidong  <cyd@stupidchicken.com>
635         * Makefile.in: Revert (undocumented) 2008-08-20 change adding
636         LDFLAGS to GNUstep CC invocation.
638 2008-08-27  Chong Yidong  <cyd@stupidchicken.com>
640         * indent.c (Fvertical_motion): Revert last change.  Handle the
641         general case where we are moving forward, and PT spans multiple
642         screen lines.
644         * eval.c (find_handler_clause): Temporarily increase
645         max-lisp-eval-depth while printing the backtrace buffer, to
646         guarantee that help-mode code can run.
648 2008-08-27  Eli Zaretskii  <eliz@gnu.org>
650         * msdos.c (Fmsdos_remember_default_colors): Don't reverse frame
651         colors under -rv.
652         (IT_set_frame_parameters): Don't swap foreground and background
653         colors if `(reverse . t)' is present in the frame properties.
654         (internal_terminal_init): Call init_frame_faces only for the
655         initial frame.
657 2008-08-27  Andreas Schwab  <schwab@suse.de>
659         * dired.c (Ffile_attributes): Avoid compiler warning in bitshift.
661 2008-08-27  Andreas Schwab  <schwab@suse.de>
663         * search.c (search_buffer): Set char_base to zero only at the end.
665 2008-08-27  Kenichi Handa  <handa@m17n.org>
667         * fileio.c (report_file_error): Fix handling of multibyte error
668         string.
670 2008-08-27  Andreas Seltenreich  <seltenreich@gmx.de>
672         * xterm.c (x_term_init): Temporarily hide the partially
673         initialized terminal while calling vendor-specific-keysyms.
675 2008-08-26  Eli Zaretskii  <eliz@gnu.org>
677         * msdos.c (internal_terminal_init): Most initializations done only
678         once, especially initial_screen_colors[] and termscript open.
680 2008-08-26  Chong Yidong  <cyd@stupidchicken.com>
682         * eval.c (Fcondition_case): Doc fix.
684         * widgetprv.h (EmacsFramePart): Change font member to the new font
685         struct.
687         * widget.c: Include character.h and font.h for XSETFONT.
688         (setup_frame_gcs): Compute X font id from font struct, just once.
690 2008-08-26  Eli Zaretskii  <eliz@gnu.org>
692         * term.c (get_named_tty): Fix last change.
694 2008-08-26  Chong Yidong  <cyd@stupidchicken.com>
696         * indent.c (Fvertical_motion): If moving forward starting from a
697         multi-line string, move the iterator to the last line of that
698         string.
700 2008-08-25  Eli Zaretskii  <eliz@gnu.org>
702         * frame.c (do_switch_frame): Mark previously displayed frame as
703         obscured for FRAME_MSDOS_P frames as well.
705 2008-08-24  Eli Zaretskii  <eliz@gnu.org>
707         * frame.c (make_terminal_frame): Initialize f->terminal,
708         f->terminal->reference_count, and scroll bars on MS-DOS as well.
709         Set the top frame to newly created frame.
710         (Fmake_terminal_frame): Reuse the_only_display_info.
712         * vm-limit.c (get_lim_data) [MSDOS]: Use alternative methods of
713         estimating available memory.
715 2008-08-23  David Reitter <david.reitter@gmail.com>
717         * nsterm.m (ns_draw_window_cursor): Don't call
718         NSDisableScreenUpdates and NSEnableScreenUpdates on
719         non-NS_IMPL_COCOA systems.
721 2008-08-23  Andreas Schwab  <schwab@suse.de>
723         * process.c (procfs_system_process_attributes): Fix use of
724         uninitialized variables.
726 2008-08-23  Eli Zaretskii  <eliz@gnu.org>
728         * emacs.c (main) [MSDOS]: Call syms_of_xmenu.
730         * dispnew.c (init_display): Remove MS-DOS specific conditions for
731         calling tty-set-up-initial-frame-faces.
733         * xmenu.c (Fx_popup_dialog, Fx_popup_menu, xmenu_show): Allow
734         MSDOS frames along with X frames.
736         * termhooks.h (TERMINAL_ACTIVE_P): Handle output_msdos_raw in
737         addition to output_termcap.
739         * xdisp.c (redisplay_internal) [MSDOS]: Don't call set_tty_color_mode.
741         * termchar.h (FRAME_TTY): Support output_msdos_raw.
742         (struct tty_display_info) [MSDOS]: Add fields related to mouse
743         highlight.
745         * process.c [!subprocesses]: Define QCname.
746         (syms_of_process): Intern and staticpro it.
748         * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
749         Adjust for changes in encoding/decoding routines.  Use
750         encode_coding_object and decode_coding_object instead of
751         encode_coding and decode_coding.
753         * sysdep.c (init_sys_modes): Call dos_ttraw with tty_out as
754         argument.
756         * dosfns.c: Include frame.h before termhooks.h.
757         (dos_cleanup): Use CURTTY ()->termscript instead of a global
758         variable termscript.
760         * s/msdos.h (USER_FULL_NAME): Define.
761         (SYSTEM_PURESIZE_EXTRA): Bump up to 100K.
763         * editfns.c (USER_FULL_NAME): Define to pw->pw_gecos if undefined.
764         (Fuser_full_name): Use USER_FULL_NAME instead of a literal
765         pw->pw_gecos.
767         * keyboard.c (handle_interrupt) [MSDOS]: Call cursor_to with
768         SELECTED_FRAME as additional (1st) argument.
769         (tty_read_avail_input): Handle output_msdos_raw in
770         addition to output_termcap.
772         * msdos.c: Include frame.h before termhooks.h.
773         (mouse_on, mouse_off, mouse_moveto, mouse_init)
774         (msdos_set_cursor_shape, IT_set_face, IT_write_glyphs)
775         (show_mouse_face, IT_clear_end_of_line, IT_clear_screen)
776         (IT_clear_to_end, IT_cursor_to, IT_display_cursor, IT_cmgoto)
777         (IT_set_terminal_modes, IT_reset_terminal_modes)
778         (IT_set_frame_parameters): Use tty->termscript instead of a global
779         variable termscript.
780         (IT_write_glyphs): Use tty->terminal->terminal_coding instead of a
781         global variable terminal_coding.  Don't refer to
782         Vnonascii_translation_table.
783         (internal_terminal_init): Set Vwindow_system in current_kboard.
784         Don't use TTY_CHAR_INS_DEL_OK.  Set Vinitial_window_system.
785         Announce date and time of session start, if termscript is open.
786         Don't zero out the_only_display_info (it is done in
787         term.c:init_tty).  Open termscript only of not already open.  Log
788         "SCREEN SAVED" here, instead of IT_set_terminal_modes.  Init mouse
789         here instead of dos_ttraw.  Don't initialize display if this is an
790         initial tty.  Don't set FRAME_FONT.
791         (Vwindow_system_version): Bump to 23.
792         (dos_ttraw): Accept a TTY argument; all callers fixed.  If mouse
793         is available, set up mouse_position_hook.
794         (dos_ttraw, IT_set_terminal_modes): If called with initial
795         terminal, do nothing.
796         (IT_set_frame_parameters): Handle the Qtty_type frame
797         parameter by calling internal_terminal_init.
798         (dos_set_window_size, show_mouse_face)
799         (clear_mouse_face, IT_note_mode_line_highlight)
800         (IT_note_mouse_highlight, IT_update_begin, IT_frame_up_to_date)
801         (dos_rawgetc): Use tty_display_info instead of x_display_info.
802         (initialize_msdos_display): New function.
803         (IT_cursor_to, IT_clear_to_end, IT_clear_screen)
804         (IT_clear_end_of_line, IT_insert_glyphs, IT_write_glyphs)
805         (IT_delete_glyphs, IT_ring_bell, IT_reset_terminal_modes)
806         (IT_set_terminal_modes, IT_set_terminal_window, IT_update_begin):
807         Accept additional argument: a pointer to a frame.  All callers
808         changed.
809         (request_sigio, unrequest_sigio): Don't define, now defined on
810         sysdep.c.
811         (IT_write_glyphs): Rewrite to use encode_terminal_code.
813         * term.c [MSDOS]: Include msdos.h.
814         (init_tty) [MSDOS]: Reuse most of WINDOWSNT branch.  Change cpp
815         conditional to DOS_NT.  Allow only one call to this function in a
816         session.  Don't allocate a new struct tty_display_info; instead,
817         reuse the_only_display_info.  Call get_tty_size to get screen
818         dimensions.  Call init_baud_rate to set bad_rate.
819         (dissociate_if_controlling_tty) [MSDOS]: Ifdef away function body.
820         (Fsuspend_tty) [MSDOS]: Don't close input and output.
821         (Fresume_tty) [MSDOS]: Don't reopen the TTY; instead, use
822         stdin/stdout.
823         (get_tty_terminal, get_named_tty, Ftty_type)
824         (Fcontrolling_tty_p): Handle output_msdos_raw in addition to
825         output_termcap.
826         (Fresume_tty, Fsuspend_tty, init_tty, delete_tty): Call
827         add_keyboard_wait_descriptor and delete_keyboard_wait_descriptor
828         only when subprocesses are supported
830         * frame.c (make_terminal_frame) [MSDOS]: Adjust initialization of
831         f->output_data.x.
832         (Fmake_terminal_frame) [MSDOS]: Don't allow creation of new
833         terminal devices.
835         * msdos.h Remove definition of struct x_display_info and struct
836         x_output.
837         (FRAME_FONT): Use output_data.tty.
838         (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Don't define.
839         (struct x_display_info): Renamed from display_info.  All users in
840         msdos.c changed.
841         (struct x_output): Remove background_pixel and foreground_pixel.
842         (the_only_display_info): Renamed from the_only_x_display.
843         (dos_ttraw): Update prototype.
845         * Makefile.in (MSDOS_OBJ): Add xmenu.o.
846         (SOME_MACHINE_LISP): Add ../lisp/term/pc-win.elc.
848 2008-08-23  Jason Rumney  <jasonr@gnu.org>
850         * image.c (enum tiff_keyword_index, tiff_format): Add :index keyword.
851         (fn_TIFFSetDirectory): New library function used.
852         (init_tiff_functions) [HAVE_NTGUI]: Initialize it.
853         (tiff_load): Use :index to select among multiple images.  Set count
854         property when multiple images exist.
855         (gif_format): Use :index, not :image.
857 2008-08-23  Chong Yidong  <cyd@stupidchicken.com>
859         * xdisp.c (try_scrolling): Check INT_MAX instead of
860         MOST_POSITIVE_FIXNUM for maximum integer value.  Include limits.h
861         to obtain INT_MAX.
863 2008-08-21  İsmail Dönmez  <ismail@namtrac.org>  (tiny change)
865         * xterm.c (x_delete_display): Don't call XrmDestroyDatabase on GTK+.
867 2008-08-21  Christian Faulhammer  <opfer@gentoo.org>  (tiny change)
869         * Makefile.in (temacs${EXEEXT}): On GNUstep, link to appropriate
870         GNUstep library location.
872 2008-08-21  Chong Yidong  <cyd@stupidchicken.com>
874         * xfaces.c (x_update_menu_appearance): Check validity of menu font
875         before using it.
877         * puresize.h (BASE_PURESIZE): Increase to 1250000.
879 2008-08-20  Adrian Robert  <Adrian.B.Robert@gmail.com>
881         * nsfns.m (ns-read-file-name): Add casts to avoid warning.
882         (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly.
883         * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil.
884         * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration.
885         (EmacsApp-cursor_blink_handler): Remove declaration.
886         * nsterm.m (ns_draw_glyph_string): Update first conditional body to
887         match 01 Feb 2008 changes in xterm.c.
888         (ns_read_socket): Add cast to avoid warning.
889         (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on
890         GNUstep.
892 2008-08-20  Chong Yidong  <cyd@stupidchicken.com>
894         * xselect.c (x_get_foreign_selection): Return nil if desired
895         selection could not be obtained, instead of signalling an error.
897 2008-08-20  David Reitter  <david.reitter@gmail.com>
899         * nsfns.m (ns_lisp_to_cursor_type): Replace with generic xfns.c.
900         * nsterm.m: Remove ns-specific code for cursor blinking.
901         (ns_draw_window_cursor): Clear cursor properly rather than
902         redrawing the area.  Respect width of bar cursors.
903         These changes enable the use of generic blink-cursor-mode and
904         generic cursor types in NS and support smooth cursor movements (do
905         not blink off after command).
906         * xdisp.c (get_phys_cursor_geometry): Redraw wider rectangle on
907         Nextstep, too.
909 2008-08-19  Kenichi Handa  <handa@m17n.org>
911         * font.c (Vfont_log_deferred): New variable.
912         (font_add_log): Check Vfont_log_deferred.
913         (font_deferred_log): New function.
915         * font.h (font_deferred_log): Extern it.
917         * fontset.c (reorder_font_vector): Use encoding charset of fonts
918         for sorting.
919         (face_for_char): Use deferred log.
921 2008-08-18  Kenichi Handa  <handa@m17n.org>
923         * fontset.c (face_for_char): Add font log.
925         * font.c (font_add_log): Add the font properties :script, :lang,
926         and :otf in the log.
928 2008-08-17  Chong Yidong  <cyd@stupidchicken.com>
930         * xdisp.c: Remove dead code.
931         (handle_invisible_prop, next_overlay_string): Defer call to
932         setup_for_ellipsis.
933         (handle_stop, set_iterator_to_next): Call setup_for_ellipsis.
935 2008-08-15  Chong Yidong  <cyd@stupidchicken.com>
937         * xfaces.c (lookup_derived_face): Properly handle possible zero
938         return value of get_lface_attributes.
939         (merge_faces): Don't tell lookup_derived_face to signal an error
940         if face is not found.
942         * dired.c (Fdirectory_files): Doc fix.
944         * process.c (make_process): Initialize kill_without_query struct
945         member.
947 2008-08-15  Eli Zaretskii  <eliz@gnu.org>
949         * w32.c (w32_system_process_attributes) [_MSC_VER < 1300]:
950         Alternative calculation of totphys for Visual Studio 6.
952         * w32fns.c [_MSC_VER && _MSC_VER < 1300]: Declare HMONITOR.
954         * w32.c (_MEMORY_STATUS_EX, MEMORY_STATUS_EX, LPMEMORY_STATUS_EX):
955         Rename from _MEMORYSTATUSEX, MEMORYSTATUSEX, LPMEMORYSTATUSEX.
956         All users changed.
957         (stat): Only root directory passed to GetDriveType.  Allow RAM
958         disk as well as local fixed disk when w32-get-true-file-attributes
959         is set to `local'.
960         (CopySid_Proc, EqualSid_Proc, GetLengthSid_Proc): New typedefs.
961         (equal_sid, get_length_sid, copy_sid): New wrapper functions.
962         (w32_cached_id, w32_add_to_cache): New functions.
963         (get_name_and_id): Look account names in the cache before calling
964         lookup_account_sid.
965         (g_b_init_get_length_sid, g_b_init_equal_sid, g_b_init_copy_sid):
966         New initialization flags.
967         (globals_of_w32): Initialize them to zero.
968         (w32_system_process_attributes): Use w32_cached_id and
969         w32_add_to_cache.
971 2008-08-14  Lawrence Mitchell  <wence@gmx.li>
973         * lread.c (Fread_char, Fread_char_exclusive): If no character
974         event is read before timeout is reached, return nil, rather than
975         converting to a number.
977 2008-08-14  Chong Yidong  <cyd@stupidchicken.com>
979         * fns.c (use_dialog_box): Doc fix.
981         * s/darwin.h: Undefine HAVE_RES_INIT, which appears to be harmful
982         on OS X.
984 2008-08-13  Chong Yidong  <cyd@stupidchicken.com>
986         * frame.c (Qns_parse_geometry): New var.
987         (Fx_parse_geometry): For HAVE_NS, call ns-parse-geometry.
989 2008-08-11  Chong Yidong  <cyd@stupidchicken.com>
991         * xdisp.c (x_produce_glyphs): Handle the case when font has no
992         space character in calculating tabs.
994 2008-08-11  Dan Nicolaescu  <dann@ics.uci.edu>
996         * Makefile.in (bootstrap-emacs): Use ln -f in the CANNOT_DUMP case.
998 2008-08-10  Glenn Morris  <rgm@gnu.org>
1000         * process.c (procfs_system_process_attributes): Use EMACS_INTs to
1001         silence gcc "limited range of data type" warnings in some
1002         make_fixnum_or_float calls.
1004 2008-08-09  Eli Zaretskii  <eliz@gnu.org>
1006         * w32.c (w32_system_process_attributes): If the process does not
1007         exist, return nil.
1009         * w32.c: Include thelp32.h, psapi.h and coding.h.
1010         (_MEMORYSTATUSEX, _PROCESS_MEMORY_COUNTERS_EX): New struct
1011         declarations.
1012         (CreateToolhelp32Snapshot_Proc, Process32First_Proc)
1013         (Process32Next_Proc): New typedefs.
1014         (g_b_init_create_toolhelp32_snapshot, g_b_init_process32_first)
1015         (g_b_init_process32_next, g_b_init_open_thread_token)
1016         (g_b_init_impersonate_self, g_b_init_revert_to_self)
1017         (g_b_init_get_process_memory_info, g_b_init_global_memory_status)
1018         (g_b_init_get_process_working_set_size)
1019         (g_b_init_global_memory_status_ex): New static variables.
1020         (globals_of_w32): Initialize them.
1021         (create_toolhelp32_snapshot, process32_first, process32_next)
1022         (open_thread_token, impersonate_self, revert_to_self)
1023         (get_process_memory_info, get_process_working_set_size)
1024         (global_memory_status, global_memory_status_ex): New wrapper
1025         functions.
1026         (w32_list_system_processes, w32_system_process_attributes)
1027         (enable_privilege, restore_privilege, ltime, process_times):
1028         New functions.
1029         (convert_time_raw): New function.
1030         (convert_time): Remove conversion of FILETIME into time in 100
1031         nsec units, call convert_time_raw instead.
1033         * process.h (w32_list_system_processes, w32_system_process_attributes):
1034         Add prototypes.
1035         (Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname)
1036         (Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcutime)
1037         (Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs, Quser, Qgroup)
1038         (Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime): Add extern declarations.
1040         * process.c (Fsystem_process_attributes): Doc fix.
1042 2008-08-08  Chong Yidong  <cyd@stupidchicken.com>
1044         * xdisp.c (move_it_to): When stopping at a charpos, check if that's
1045         a continued multi-char glyph; if so, advance to the actual glyph.
1047 2008-08-07  Dan Nicolaescu  <dann@ics.uci.edu>
1049         * s/darwin.h (OTHER_FILES): Do not define here, defined in config.in.
1051         * Makefile.in (ALL_OBJC_CFLAGS): New variable.
1052         (.m.o): Use it.
1053         * config.in: Regenerate.
1055 2008-08-07  Chong Yidong  <cyd@stupidchicken.com>
1057         * xdisp.c (redisplay_window): Revert last change.
1058         (try_window): Check bottom scroll margin too.
1060 2008-08-06  Adrian Robert  <Adrian.B.Robert@gmail.com>
1062         * config.in: Regenerate.
1064         * Makefile.in (emacs): Remove ifndef NS conditional for 'emacs
1065         -list-load-path-shadows'.
1066         (nsgui.h): Reduce number of things depending on it.
1068 2008-08-06  Chong Yidong  <cyd@stupidchicken.com>
1070         * xdisp.c (try_scrolling): Use iterator to find the scroll margin,
1071         instead of window-end which does the wrong thing at eob.
1072         (try_cursor_movement): Minor optimization.
1073         (redisplay_window): If scroll margin is defined, don't assume
1074         window doesn't need scrolling.
1076 2008-08-06  Adrian Robert  <Adrian.B.Robert@gmail.com>
1078         * config.in: Regenerate.
1080         * Makefile.in: Move nsXXX.m dependencies into big alphabetical list.
1081         (mostlyclean): Don't delete *.d under NS.
1083         * nsterm.h (NS_HAVE_INTEGER): Change to NS_HAVE_NSINTEGER.
1085 2008-08-06  Kenichi Handa  <handa@m17n.org>
1087         * xfont.c (xfont_list_family): Return a list of symbols, not strings.
1089 2008-08-06  Andreas Schwab  <schwab@suse.de>
1091         * config.in: Regenerate.
1093 2008-08-05  Chong Yidong  <cyd@stupidchicken.com>
1095         * xdisp.c (redisplay_window): Don't enforce scroll-margin when
1096         forcing a window start.
1098         * fileio.c (Vauto_save_list_file_name): Move here from file.el.
1099         (auto_save_1): Update modtime when auto-save-list-file-name is on.
1101 2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
1103         * emacs.c (main): Under NS, set working dir to HOME when get a "psn"
1104         argument.
1106 2008-08-05  Juanma Barranquero  <lekktu@gmail.com>
1108         * buffer.c (syms_of_buffer) <scroll-up-aggressively>:
1109         <scroll-down-aggressively, before-change-functions>:
1110         <after-change-functions>: Reflow docstrings.
1112 2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
1113             Ken Raeburn  <raeburn@gnu.org>
1115         Dock menu customization, based on a patch by Ken Raeburn, plus some
1116         other fixes.
1117         * nsmenu.m (dockMenu): New variable.
1118         (EmacsDialog -clicked:): Fix mistake in change of 2008-07-17.
1120         * nsterm.h (dockMenu): Declare.
1122         * nsterm.m (KEY_NS_NEW_FRAME): New definition.
1123         (ns_term_init): Initialize dockMenu.
1124         (EmacsApp -newFrame:, -applicationDockMenu:): New methods.
1125         (EmacsView -windowShouldClose:): Don't behave specially if <= 1 frame
1126         left.
1128         * lisp.h (LSB_TAG): Use on DARWIN_OS, not NS_IMPL_COCOA.
1130 2008-08-04  Chong Yidong  <cyd@stupidchicken.com>
1132         * nsterm.h: Test directly for NS_HAVE_INTEGER before defining it.
1134         * config.in: Regenerate.
1136 2008-08-04  Seiji Zenitani  <zenitani@mac.com>
1138         * nsfns.m (x-create-frame): Set the frame parameter alpha to nil.
1140 2008-08-04  Chong Yidong  <cyd@stupidchicken.com>
1142         * nsterm.h (find_and_call_menu_selection): Fix prototype.
1144 2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
1146         * emacs.c (main: unexec_init_emacs_zone): Call if on DARWIN_OS.
1148         * keyboard.h: Comment an #endif.
1150         * lisp.h (have_menus_p): Adjust comment.
1152         * menu.c (find_and_return_menu_selection): Fix comparison with
1153         client_data.
1155         * nsmenu.m (popup_activated_flag): New variable.
1156         (popup_activated): New function.
1157         (menu-or-popup-active-p): New exported lisp definition.
1158         (ns_popup_menu): Set popup_activated_flag.  Call discard_menu_items()
1159         when popup done.
1160         (ns_popup_dialog): Set popup_activated_flag.
1162         * nsterm.m (EmacsView -conversationIdentifier): Use NSInteger
1163         version for GNUstep (handled by conditional typedef in nsterm.m).
1164         (ns_get_color): Remove special-casing for "darkblue", "dark blue" (now
1165         in rgb.txt).
1167         * process.c (init_process): Use DARWIN_OS, not DARWIN.
1169         * sysselect.h: Conditionalize init_process undef on DARWIN_OS.
1171         * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): Do it also under NS.
1173         * xdisp.c (redisplay_internal, note_mouse_highlight): Under NS,
1174         shortcircuit if popup_activated like GTK and X toolkit.
1176         * m/inter386.h: Change DARWIN to DARWIN_OS.
1178         * s/darwin.h: Add #define DARWIN_OS.  Get rid of C_SWITCH_SYSTEM def.
1179         Change LIBS_MACGUI to LIBS_NSGUI.  Move temacs-conditionalized defs
1180         closer to C_SWITCH_SYSTEM_TEMACS so usage is understood.  Expand
1181         comment on NO_SOCK_SIGIO.
1183 2008-08-03  Chong Yidong  <cyd@stupidchicken.com>
1185         * nsterm.m (windowDidResize): Remove stopModal call.
1187 2008-08-03  Andreas Schwab  <schwab@suse.de>
1189         * vm-limit.c (get_lim_data) [HAVE_GETRLIMIT && RLIMIT_AS]: Define.
1190         (check_memory_limits): Don't handle HAVE_GETRLIMIT here.
1192 2008-08-02  Chong Yidong  <cyd@stupidchicken.com>
1194         * vm-limit.c (check_memory_limits): Don't use getrlimit on cygwin.
1195         Don't use uninitialized pointer variable when using getrlimit.
1197 2008-08-02  Jason Rumney  <jasonr@gnu.org>
1199         * w32font.c (compute_metrics): Don't mess with glyph_idx setting here.
1201 2008-08-02  Eli Zaretskii  <eliz@gnu.org>
1203         * alloc.c (NSTATICS): Bump to 0x640.
1205         * s/gnu-linux.h (HAVE_PROCFS, LISTPROC, PROCATTR): New defines.
1207         * lisp.h: Add prototype for directory_files_internal.
1209         * process.c (Fsystem_processes_list, Fsystem_process_attributes):
1210         New functions.
1211         (syms_of_process): Defsubr them.  Add initializations for various
1212         Q* symbols used in procfs_system_process_attributes.
1213         (procfs_list_system_processes, procfs_system_process_attributes)
1214         [HAVE_PROCFS]: New functions.
1215         (time_from_jiffies, ltime_from_jiffies, get_up_time, procfs_ttyname)
1216         (procfs_get_total_memory): New functions.
1218 2008-08-01  Juanma Barranquero  <lekktu@gmail.com>
1220         * xfaces.c (Fx_load_color_file): Fix previous change;
1221         it is #ifdef WINDOWSNT, not WINDOWS_NT.
1223 2008-08-01  Michael Albinus  <michael.albinus@gmx.de>
1225         * dbusbind.c (xd_read_message): Handle D-Bus error messages.
1227 2008-08-01  Adrian Robert  <Adrian.B.Robert@gmail.com>
1229         * nsterm.h (NSInteger, NSUInteger): Add defines for non-Leopard.
1231 2008-08-01  Chong Yidong  <cyd@stupidchicken.com>
1233         * nsfns.m (ns_frame_parm_handlers): Add empty entry for x_set_alpha.
1235         * nsterm.m (EmacsApp -application:openFiles:): GNUStep does not
1236         define NSApplicationDelegateReplySuccess.
1237         (EmacsView -converstationIdentifier): Use long instead of
1238         NSInteger for GNUStep, since it doesn't have NSInteger.
1240         * xmenu.c: Revert last change.
1242         * keyboard.h: Fix last change.
1244 2008-08-01  Juanma Barranquero  <lekktu@gmail.com>
1246         * xfaces.c (x-load-color-file): Use RGB() instead of manually shifting
1247         on Windows.
1249 2008-08-01  Adrian Robert  <Adrian.B.Robert@gmail.com>
1251         Warning clearing and clean-up in NS port.
1252         * keyboard.h (xmalloc_widget_value, digest_single_submenu):
1253         Add prototypes.
1254         * nsgui.h (FACE_DEFAULT): Remove, unused.
1255         (XGCValues): Change colors to unsigned long.
1256         * nsterm.h (EmacsApp): Add declaration of all methods implemented in
1257         nsterm.m.
1258         (EmacsMenu -addItemWithWidgetValue:): Change to use NSMenuItem class.
1259         (ns_list_fonts): Remove, unused.
1260         (ns_font_to_xlfd, ns_fontname_to_xlfd): Drop prototypes.
1261         * nsfns.m (interpret_services_menu): Use NSMenuItem class.
1262         * nsfont.m (nsfont_open): Fix cast error in glyphs,metrics alloc.
1263         (nsfont_draw): Compare face colors to 0, not nil.
1264         * nsmenu.m (struct widget_value): Drop unneeded declaration.
1265         (EmacsMenu -addItemWithWidgetValue:, -fillWithWidgetValue:)
1266         (-addSubmenuWithTitle:): Use NSMenuItem class.
1267         (ns_popup_menu): Use NO, not NULL, for enabled setting.
1268         * nsterm.m (ns_draw_glyph_string): Don't compare font to ~0.
1269         (ns_clip_to_row): Make gc arg a BOOL.
1270         (ns_draw_fringe_bitmap, ns_draw_window_cursor): Use YES, NO in
1271         ns_clip_to_row() call.
1272         (ns_draw_glyph_string): Drop face comparison to ~0 (no longer
1273         used).  Cast FRAME_FONT assignments.
1274         (ns_read_socket): Cast call to EmacsApp-fulfillService:withArg:.
1275         (ns_string_to_lispmod): Change arg to const char.
1276         (ns_term_init): Use NSMenuItem class.
1277         (EmacsApp -openFile:): Move to different section of file.
1278         (EmacsApp -application:openFiles:): Don't return a value, call
1279         -replyToOpenOrPrint:.
1280         (EmacsView -keyDown:): Fix up cast.
1281         (EmacsView -converstationIdentifier): Use NSInteger instead of long.
1282         (EmacsView -menuDown:): Cast tag in call to
1283         find_and_call_menu_selection().
1284         (ns_list_fonts): Remove, unused.
1285         (ns_font_to_xlfd): Make static.  Cast result of UTF8String.
1286         (ns_fontname_to_xlfd): Make static.
1287         * w32menu.c (xmalloc_widget_value, digest_single_submenu):
1288         Remove prototypes (now in keyboard.h).
1289         (next_menubar_widget_id): Remove, unused.
1290         * xmenu.c (xmalloc_widget_value, digest_single_submenu):
1291         Remove prototypes (now in keyboard.h).
1292         * xfaces.c (ns_list_fonts, w32_list_fonts): Remove, unused.
1294 2008-08-01  Dan Nicolaescu  <dann@ics.uci.edu>
1296         * Makefile.in (dispnew.o, gtkutil.o, sound.o, atimer.o)
1297         (floatfns.o): Depend on syssignal.h.
1298         (term.o): Depend on syssignal.h, systty.h, and $(INTERVAL_SRC).
1300         * systty.h: Fix previous change that removed BSD_TERMIOS.
1301         Add comments to #ifdefs.
1303 2008-08-01  Adrian Robert  <Adrian.B.Robert@gmail.com>
1305         * w32fns.c (w32-load-color-file): Remove.
1306         (x-open-connection): Use renamed Fx_load_color_file.
1307         * xfaces.c (x-load-color-file): Add.
1308         * nsterm.m (ns_initialize): Load colors from etc/rgb.txt instead of
1309         Emacs.clr.
1310         (hide_hourglass): BLOCK_INPUT before UNBLOCK.
1312 2008-07-31  Michael Albinus  <michael.albinus@gmx.de>
1314         * dbusbind.c (Fdbus_call_method_asynchronously)
1315         (Fdbus_method_error_internal): New defuns.
1316         (xd_read_message): Handle also reply messages.
1317         (Vdbus_registered_functions_table): Extend docstring.
1319 2008-07-31  Juanma Barranquero  <lekktu@gmail.com>
1321         * keyboard.c (gobble_input): Fix previous change.
1323 2008-07-31  Dan Nicolaescu  <dann@ics.uci.edu>
1325         * bitmaps/README:
1326         * xfns.c:
1327         * termcap.c:
1328         * term.c:
1329         * syswait.h:
1330         * systty.h:
1331         * systime.h:
1332         * syssignal.h:
1333         * sysdep.c:
1334         * process.h:
1335         * process.c:
1336         * print.c:
1337         * ndir.h:
1338         * lread.c:
1339         * keyboard.c:
1340         * getpagesize.h:
1341         * floatfns.c:
1342         * fileio.c:
1343         * emacs.c:
1344         * doc.c:
1345         * dispnew.c:
1346         * dired.c:
1347         * data.c:
1348         * callproc.c:
1349         * buffer.c:
1350         * README:
1351         * Makefile.in:
1352         * s/template.h:
1353         * s/msdos.h:
1354         * m/vax.h: Remove VMS support.
1355         * s/vms.h:
1356         * vlimit.h:
1357         * uaf.h:
1358         * temacs.opt:
1359         * param.h:
1360         * ioctl.h: Remove file.
1362 2008-07-31  Dan Nicolaescu  <dann@ics.uci.edu>
1364         * s/ms-w32.h (MULTI_KBOARD): Remove.
1365         * xterm.c:
1366         * xselect.c:
1367         * xfns.c:
1368         * window.c:
1369         * w32term.c:
1370         * w32fns.c:
1371         * terminal.c:
1372         * termhooks.h:
1373         * term.c:
1374         * sysdep.c:
1375         * keyboard.h:
1376         * keyboard.c:
1377         * frame.h:
1378         * frame.c:
1379         * frame.c: Remove references to MULTI_KBOARD, it is now the default.
1380         * config.in: Regenerate.
1382 2008-07-30  Jason Rumney  <jasonr@gnu.org>
1384         * w32font.h (struct w32font_info): Use unicode version of textmetrics.
1386         * w32font.c (w32font_encode_char): Leave as unicode if in range.
1387         (w32font_open_internal): Get unicode version of textmetrics.
1388         Don't enable or disable glyph indices here.
1389         (w32font_open): Disable use of glyph indices.
1391         * w32uniscribe.c (uniscribe_open): Enable use of glyph indices.
1393 2008-07-30  Chong Yidong  <cyd@stupidchicken.com>
1395         * minibuf.c (Vread_buffer_function): Doc fix.
1397 2008-07-30  John Paul Wallington  <jpw@pobox.com>
1399         * minibuf.c (read_buffer_completion_ignore_case): New var.
1400         (Fread_buffer): Use it.
1402 2008-07-30  Dan Nicolaescu  <dann@ics.uci.edu>
1404         * systty.h (sensemode): Remove empty #if.  Remove reference to
1405         BSD_TERMIOS, unused.
1407         * sysdep.c: Remove reference to DGUX.
1408         (closedir): Remove reference to BROKEN_CLOSEDIR, unused.
1410         * config.in: Regenerate.
1412 2008-07-30  Jason Rumney  <jasonr@gnu.org>
1414         * w32uniscribe.c (uniscribe_encode_char): Fix glyph buffer size.
1416 2008-07-29  Jason Rumney  <jasonr@gnu.org>
1418         * w32uniscribe.c (uniscribe_shape): Avoid using context if cache
1419         is populated.
1420         (uniscribe_encode_char): Always use uniscribe.
1421         Avoid using context if cache is populated.
1423 2008-07-29  Jan Djärv  <jan.h.d@swipnet.se>
1425         * xmenu.c (Fx_menu_bar_open_internal): Use activate_item signal to
1426         open menu.
1428         * gtkutil.c (menu_nav_ended): Remove.
1429         (create_menus): Remove signal connect for menu_nav_ended.
1431 2008-07-28  Chong Yidong  <cyd@stupidchicken.com>
1433         * xdisp.c (redisplay_window): Check return value of
1434         compute_window_start_on_continuation_line before forcing a window
1435         start.
1437 2008-07-28  Jason Rumney  <jasonr@gnu.org>
1439         * w32font.c (w32font_text_extents): Use w32_metric_cache consistently.
1441         * w32term.c (w32_enable_unicode_output, cleartype_active):
1442         Remove obsolete display options.
1443         (x_draw_glyph_string_background): Don't use old cleartype_active
1444         workaround.
1445         (w32_initialize): Remove cleartype_active initialization.
1446         (syms_of_w32term): Remove w32_enable_unicode_output initialization.
1448 2008-07-28  Andreas Schwab  <schwab@suse.de>
1450         * lisp.h (init_weak_hash_tables, syms_of_font)
1451         (xd_read_queued_messages, syms_of_dbusbind): Declare.
1452         (remove_hash_entry): Don't declare.
1453         * eval.c (maybe_call_debugger): Make static and move before use.
1454         * gtkutil.c: Include <X11/Xft/Xft.h> if HAVE_XFT.
1455         * xdisp.c: Include "gtkutil.h" if USE_GTK.
1456         * xterm.h (x_set_frame_alpha): Declare.
1458 2008-07-28  Jan Djärv  <jan.h.d@swipnet.se>
1460         * gtkutil.c (menu_nav_ended): Revert change from 2008-07-24.
1461         (create_menus): Connect selection-done to menu_nav_ended.
1463 2008-07-27  Adrian Robert  <Adrian.B.Robert@gmail.com>
1465         * nsfns.m (x-create-frame): Add copy of parms argument to beginning.
1466         Set Vx_resource_name to a fallback.  Replace read of 'buffered'
1467         parameter with read of 'alpha' one.
1468         (Qns_frame_parameter): Remove.
1469         * nsselection.m (selection-coding-system)
1470         (next-selection-coding-system, Vselection_coding_system)
1471         (Vnext_selection_coding_system): Drop.
1473 2008-07-27  Adrian Robert  <Adrian.B.Robert@gmail.com>
1475         * nsfns.m (do-applescript, do_applescript): Rename to
1476         ns-do-applescript, ns_do_applescript, and move within file.
1478 2008-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
1480         Remove support for Mac Carbon.
1481         * mactoolbox.c:
1482         * macterm.h:
1483         * macterm.c:
1484         * macselect.c:
1485         * macmenu.c:
1486         * macgui.h:
1487         * macfns.c:
1488         * mac.c: Remove file.
1489         * s/darwin.h:
1490         * m/intel386.h:
1491         * xfaces.c:
1492         * xdisp.c:
1493         * window.c:
1494         * tparam.c:
1495         * termhooks.h:
1496         * termcap.c:
1497         * term.c:
1498         * syssignal.h:
1499         * sysselect.h:
1500         * sysdep.c:
1501         * process.c:
1502         * lread.c:
1503         * lisp.h:
1504         * keyboard.c:
1505         * image.c:
1506         * fringe.c:
1507         * frame.h:
1508         * frame.c:
1509         * fontset.c:
1510         * font.h:
1511         * font.c:
1512         * fns.c:
1513         * fileio.c:
1514         * emacs.c:
1515         * dispnew.c:
1516         * dispextern.h:
1517         * config.in:
1518         * atimer.c:
1519         * Makefile.in: Remove code for Carbon
1521 2008-07-26 YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1523         * macterm.c (XDrawLine) [USE_MAC_IMAGE_IO]: Remove spurious return.
1525 2008-07-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1527         * macterm.h (kCGBitmapByteOrder32Host): New define for
1528         non-universal SDKs.
1530         * image.c (mac_create_cg_image_from_image, image_load_image_io)
1531         [USE_MAC_IMAGE_IO]: Remove conditionals for kCGBitmapByteOrder32Host.
1533         * macterm.c (XDrawLine, XCreatePixmapFromBitmapData)
1534         [USE_MAC_IMAGE_IO]: Remove conditionals for kCGBitmapByteOrder32Host.
1536 2008-07-26  David Robinow  <drobinow@gmail.com>  (tiny change)
1538         * w32inevt.c: Include dispextern.h.
1540 2008-07-26  Andreas Schwab  <schwab@suse.de>
1542         * print.c (print_object): Fix off-by-one in last change.
1544 2008-07-25  Juanma Barranquero  <lekktu@gmail.com>
1546         * term.c (syms_of_term): Don't initialize default_orig_pair,
1547         default_set_foreground and default_set_background on Windows.
1549 2008-07-25  Jason Rumney  <jasonr@gnu.org>
1551         * w32uniscribe.c (uniscribe_shape): Pass NULL for control arg to
1552         ScriptItemize.  Clean up return value checking.  Remove unused
1553         variables.
1554         (uniscribe_encode_char): Encode non-BMP characters with uniscribe
1555         shaping engine.
1557         * w32font.c (w32font_has_char): Handle the case where we can't
1558         determine the script for a character.
1560 2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
1562         * term.c (syms_of_term): Initialize default_orig_pair,
1563         default_set_foreground, and default_set_background.
1565         * getloadavg.c (nl): Rename to name_list to avoid ncurses.h
1566         clash (bug#86).
1567         (getloadavg): Callers changed.
1569         * image.c (svg_load_image): Fix last change.
1570         (svg_load_image): Use rsvg_handle_get_dimensions to check that
1571         image size is valid.  Use g_object_unref instead of deprecated
1572         rsvg_handle_free to free rsvg handle.
1573         (x_from_xcolors): Don't initialize pixmap (silence compiler).
1575 2008-07-25  Jason Rumney  <jasonr@gnu.org>
1577         * w32font.c (w32font_encode_char): Encode characters outside BMP as
1578         surrogates before looking up glyph index.
1579         (w32font_text_extents): Encode as surrogates if falling back to
1580         functions that need UTF-16 wide chars.
1582         * w32uniscribe.c (uniscribe_encode_char): Encode characters outside
1583         BMP as surrogates before looking up glyph index.
1585 2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
1587         * image.c (svg_load_image): Check for failure in return value of
1588         rsvg_handle_get_pixbuf.  Free rsvg handle when done.
1590 2008-07-25  Jason Rumney  <jasonr@gnu.org>
1592         * w32font.c (Fx_select_font): Reverse sense of second arg.
1594 2008-07-24  Stefan Monnier  <monnier@iro.umontreal.ca>
1596         * syntax.c (struct lisp_parse_state, char_quoted, inc_bytepos)
1597         (dec_bytepos, find_defun_start): Use EMACS_INT for buffer positions.
1599         * puresize.h (PURESIZE_CHECKING_RATIO): New macro.
1600         (PURESIZE): Use it.
1602 2008-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
1604         * m/amdx86-64.h (HAVE_LIB64_DIR): Consolidate ifdefs.
1605         * m/alpha.h (TEXT_END):
1606         * m/ibmrs6000.h (TEXT_END):
1607         * m/macppc.h (TEXT_END):
1608         * s/darwin.h (TEXT_END):
1609         * s/msdos.h (TEXT_END): Remove, unused.
1610         * s/gnu-linux.h (BSD_PGRPS): Add a comment.
1611         * s/cygwin.h: Remove comment.
1613         * ecrt0.c (NODOT_GLOBAL_START): Remove code, unused.
1614         (DOT_GLOBAL_START): Remove conditional, redundant for CRT0_DUMMIES.
1615         * m/intel386.h (DOT_GLOBAL_START):
1616         * m/vax.h (DOT_GLOBAL_START): Remove, redundant with CRT0_DUMMIES.
1617         (USG): Remove, file not used on USG platforms.
1619         * Makefile.in (HAVE_X11): Remove empty #else.
1621 2008-07-24  Andreas Schwab  <schwab@suse.de>
1623         * fileio.c (Finsert_file_contents): Properly adjust undo list
1624         after format conversion.
1626 2008-07-24  Jan Djärv  <jan.h.d@swipnet.se>
1628         * gtkutil.c (xg_get_font_name): Cast w to GTK_FONT_SELECTION_DIALOG.
1629         (menu_nav_ended): Remove.
1630         (create_menus): Remove signal connect for menu_nav_ended.
1631         (xg_update_menubar): Also take deactivate_cb as parameter, pass it to
1632         create_menus.
1633         (xg_modify_menubar_widgets): Pass deactivate_cb to xg_update_menubar.
1635 2008-07-23  Jason Rumney  <jasonr@gnu.org>
1637         * w32font.c (w32_enumfont_pattern_entity): Return height consistent
1638         with opened font.
1639         (w32font_open): Set font type to gdi.
1641         * w32uniscribe.c (uniscribe_open): Set font type to uniscribe.
1643 2008-07-23  Dan Nicolaescu  <dann@ics.uci.edu>
1645         * s/usg5-4.h (ADDR_CORRECT): Remove, unused.
1646         * unexaix.c (ADDR_CORRECT): Remove conditional, the only user
1647         defines it.
1648         * unexec.c (ADDR_CORRECT): Define unconditionally.
1650         * m/ibmrs6000.h (C_SWITCH_MACHINE): Remove.
1652         * unexec.c: Remove code depending on !COFF and USG, the file is
1653         not used for such systems.
1655         * s/netbsd.h (A_TEXT_OFFSET, A_TEXT_SEEK):
1656         * s/freebsd.h (A_TEXT_OFFSET, A_TEXT_SEEK): Remove, unused.
1657         (LD_SWITCH_SYSTEM_1): Remove, update users.
1659         * s/darwin.h (DATA_END):
1660         * m/intel386.h (DATA_END):
1661         * m/ibmrs6000.h (DATA_END):
1662         * m/alpha.h (DATA_END): Remove, unused.
1664         * config.in: Regenerate.
1665         * s/ms-w32.h (subprocesses): Define unconditionally.
1666         * s/template.h (subprocesses): Update comment.
1667         * s/vms.h (subprocesses):
1668         * s/usg5-4.h (subprocesses):
1669         * s/hpux10-20.h (subprocesses):
1670         * s/gnu-linux.h (subprocesses):
1671         * s/cygwin.h (subprocesses):
1672         * s/bsd-common.h (subprocesses):
1673         * s/aix4-2.h (subprocesses):
1674         * s/darwin.h (subprocesses): Do not define, defined by default now.
1676         * Makefile.in (C_SWITCH_SITE, LD_SWITCH_SITE): Remove, unused.
1677         Remove all references.
1678         (temacs): Add GNUStep specific ld flags.
1680         * nsterm.m (syms_of_nsterm): Provide ns, not ns-windowing,
1681         similarly to what X does.
1683 2008-07-22  Adrian Robert  <Adrian.B.Robert@gmail.com>
1685         * nsfns.m (x-list-fonts): Remove.
1686         (syms_of_nsfns): Drop the x-list-fonts declaration.
1687         * nsterm.m: Get rid of remaining "//" comments.
1689 2008-07-22  Chong Yidong  <cyd@stupidchicken.com>
1691         * xselect.c (Fx_rotate_cut_buffers_internal): Doc fix.
1693         * nsselect.m (Fns_selection_exists_p, Fns_selection_owner_p)
1694         (Fx_get_selection_internal, Fns_rotate_cut_buffers_internal)
1695         (Fns_own_selection_internal, Fx_disown_selection_internal)
1696         (Fns_get_cut_buffer_internal, Fns_store_cut_buffer_internal):
1698         * nsmenu.m (Fns_reset_menu, Fx_popup_menu): Change to use 'doc: /*
1699         ... */' style of docstrings.  Doc fixes.
1701 2008-07-22  Dan Nicolaescu  <dann@ics.uci.edu>
1703         * terminfo.c (UP, BC, PC): Undo previous change.
1705         * nsfns.m: Rename ns prefixed functions/variables to the
1706         corresponding x versions.  Update references.
1708 2008-07-22  Stefan Monnier  <monnier@iro.umontreal.ca>
1710         * syntax.c (char_quoted): Check "charpos > beg" before decrementing.
1712 2008-07-22  Dan Nicolaescu  <dann@ics.uci.edu>
1714         * nsfns.m (x_set_menu_bar_lines, x_set_tool_bar_lines):
1715         Remove forwarding functions.
1716         (ns_set_menu_bar_lines): Rename to x_set_menu_bar_lines, make
1717         non-static.
1718         (ns_set_tool_bar_lines): Rename to x_set_tool_bar_lines, make
1719         non-static.
1720         (ns_frame_parm_handlers): Use the new names.
1721         (syms_of_nsfns): Move to the end of file.
1723         * nsterm.m (syms_of_nsterm): Move to the end of file.
1725         * dispnew.c (init_display): Remove code for X10.
1727 2008-07-22  Jason Rumney  <jasonr@gnu.org>
1729         * w32proc.c (Fw32_long_file_name): Don't append dir separator to
1730         bare drive.
1732 2008-07-22  Adrian Robert  <Adrian.B.Robert@gmail.com>
1734         * nsterm.m (syms_of_nsterm): Remove debugging println.
1736 2008-07-22  David Reitter  <david.reitter@gmail.com>
1738         * nsfns.m (do_applescript, F_do_applescript): NS version of the
1739         Carbon implementation of the same functionality: execute arbitrary
1740         AppleScript code.
1742 2008-07-21  Adrian Robert  <Adrian.B.Robert@gmail.com>
1744         * nsfns.m (Fx_create_frame, Fx_read_file_name, Fx_get_resource)
1745         (Fx_set_resource, Fx_set_alpha, Fx_server_max_request_size)
1746         (Fx_server_vendor, Fx_server_version, Fx_display_screens)
1747         (Fx_display_mm_height, Fx_display_mm_width)
1748         (Fx_display_backing_store, Fx_display_visual_class)
1749         (Fx_display_save_under, Fx_open_connection)
1750         (Fx_close_connection, Fx_hide_emacs, Fx_font_name)
1751         (Fx_list_colors, Fx_perform_service, Fx_color_defined_p)
1752         (Fx_color_values, Fxw_display_color_p, Fx_display_grayscale_p)
1753         (Fx_display_pixel_width, Fx_display_pixel_height)
1754         (Fx_display_usable_bounds, Fx_display_planes)
1755         (Fx_display_color_cells, Vns_icon_type_alist): Change to use 'doc: /*
1756         ... */' style of docstrings.
1758 2008-07-21  Dan Nicolaescu  <dann@ics.uci.edu>
1760         * m/mips.h (LOAD_AVE_TYPE, LOAD_AVE_CVT): Do not define, not used
1761         on this platform.
1762         (mips):
1763         * m/iris4d.h (mips): Do not define.
1764         * sysdep.c (init_sys_modes): Use __mips__ instead of mips.
1766         * m/ibmrs6000.h (LD_SWITCH_SITE): Remove.
1768         * image.c:
1769         * nsfns.m:
1770         * nsselect.m:
1771         * nsterm.h:
1772         * nsterm.m: Rename ns prefixed functions/variables to the
1773         corresponding x versions.  Update references.
1775         * m/ibms390x.h (NO_REMAP): Do not undefine.
1777         * m/amdx86-64.h: Use SOLARIS2 instead of sun.
1779 2008-07-21  Chong Yidong  <cyd@stupidchicken.com>
1781         * nsfns.m: Change NS to Nextstep in docstrings and error messages.
1782         (Fns_create_frame, Fns_read_file_name, Fns_get_resource)
1783         (Fns_set_resource, Fns_set_alpha, Fns_server_max_request_size)
1784         (Fns_server_vendor, Fns_server_version, Fns_display_screens)
1785         (Fns_display_mm_height, Fns_display_mm_width)
1786         (Fns_display_backing_store, Fns_display_visual_class)
1787         (Fns_display_save_under, Fns_open_connection)
1788         (Fns_close_connection, Fns_hide_emacs, Fns_font_name)
1789         (Fns_list_colors, Fns_perform_service, Fns_color_defined_p)
1790         (Fns_color_values, Fxw_display_color_p, Fx_display_grayscale_p)
1791         (Fns_display_pixel_width, Fns_display_pixel_height)
1792         (Fns_display_usable_bounds, Fx_display_planes)
1793         (Fns_display_color_cells, Vns_icon_type_alist): Doc fixes.
1795 2008-07-21  Ami Fischman  <ami@fischman.org>  (tiny change)
1797         * print.c (print_object): Check print_depth before searching for
1798         circularities.
1800 2008-07-21  Michael Albinus  <michael.albinus@gmx.de>
1802         * dbusbind.c (Fdbus_register_signal): Use sprintf + strcat instead
1803         only sprintf.
1805 2008-07-21  Kenichi Handa  <handa@m17n.org>
1807         * ftfont.c (adjust_anchor): Check if DeltaValue is not NULL.
1809 2008-07-20  Andreas Schwab  <schwab@suse.de>
1811         * syntax.c (find_start_pos, find_start_value)
1812         (find_start_value_byte, find_start_begv, find_defun_start)
1813         (back_comment, scan_sexps_forward): Use EMACS_INT for buffer positions.
1815 2008-07-20  Dan Nicolaescu  <dann@ics.uci.edu>
1817         * s/sol2-3.h: Insert contents of s/sol2.h.
1818         (LD_SWITCH_SYSTEM): Remove redundant definition.
1819         * s/sol2.h: Remove, unused.
1821 2008-07-20  Adrian Robert  <Adrian.B.Robert@gmail.com>
1823         * nsterm.m (ns_get_color): Recognize HSB,AHSB be synonyms for HSV,AHSV.
1825 2008-07-20  Adrian Robert  <Adrian.B.Robert@gmail.com>
1827         * Makefile.in (ns_appdir): Fix typo in find command.
1829 2008-07-20  Dan Nicolaescu  <dann@ics.uci.edu>
1831         * m/intel386.h (NO_REMAP): Do no define for USG, not used.
1833         * s/usg5-4.h (LIBS_SYSTEM): Remove, system for which this was
1834         added not supported anymore.
1836         * s/usg5-4-2.h (LIBS_SYSTEM):
1837         * s/sol2.h (LIBS_SYSTEM): Do not undefine.
1839         * s/netbsd.h (GETPGRP_NO_ARG, N_TRELOFF):
1840         * s/lynxos.h (GETPGRP_NO_ARG):
1841         * s/hpux10-20.h (NO_SIOCTL_H):
1842         * s/gnu.h (GETPGRP_NO_ARG):
1843         * s/gnu-linux.h (NO_SIOCTL_H):
1844         * s/freebsd.h (GETPGRP_NO_ARG, N_TRELOFF):
1845         * s/cygwin.h (GETPGRP_NO_ARG):
1846         * s/irix6-5.h (LIBS_SYSTEM, GETPGRP_NO_ARG): Remove, unused.
1847         (C_DEBUG_SWITCH): Remove duplicate definition.
1849         * m/ibms390.h: Remove boilerplate comments.
1851         * sysdep.c (closedir): Use SOLARIS2 instead of sun && USG5_4.
1853         * process.c (HAVE_SERIAL): Consolidate ifdefs.
1854         (wait_reading_process_output): Remove code for SunOS, platform not
1855         supported anymore.  Use SOLARIS2 instead of sun.
1857 2008-07-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
1859         * font.c (font_open_by_name): Under NS, default lface height to zero.
1860         (font_open_for_lface): Under NS, set size based on frame fontsize.
1861         * nsterm.m (EmacsView-changeFont:): Remove some commented code.
1862         * frame.c (x_set_frame_parameters): Remove HAVE_NS ifdef.
1864 2008-07-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
1866         * nsterm.m (ns_antialias_text, ns_use_qd_smoothing)
1867         (ns_use_system_highlight_color): Switch these from DEFVAR_BOOL to
1868         DEFVAR_LISP and change all code accordingly to use Qt/Qnil instead of
1869         YES/NO.
1870         * nsterm.h (prevUseHighlightColor): Make a Lisp_Object.
1871         * nsfont.m (nsfont_draw): Treat ns_use_qd_smoothing as Lisp_Object.
1872         * Makefile.in (clean): Clear out build destination dir.
1874 2008-07-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
1876         * Makefile.in (nsgui.h-related dependencies): Remove abbrev, xfns,
1877         xterm, xselect.
1878         * lisp.h: Remove declaration of hash_remove.
1879         * nsgui.h: Remove redefinitions of hash_remove.
1880         * fns.c (hash_remove): Rename to hash_remove_from_table.
1882 2008-07-19  Seiji Zenitani  <zenitani@mac.com>
1884         * nsfont.m (nsfont_fmember_to_entity, nsfont_make_fontset_for_font):
1885         strdup() the family UTF8String before modifying it.
1887 2008-07-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
1889         * nsterm.m (ns_maybe_dumpglyphs_background): Compare result from
1890         NS_FACE_BACKGROUND with 0 instead of nil.
1891         * nsfont.m (nsfont_draw): Same.
1893 2008-07-19  Chong Yidong  <cyd@stupidchicken.com>
1895         * nsfns.m (ns_set_background_color): Fix crash.
1897 2008-07-18  Chong Yidong  <cyd@stupidchicken.com>
1899         * Makefile.in (SOME_MACHINE_LISP): Remove ns-carbon-compat.elc.
1901 2008-07-18  Dan Nicolaescu  <dann@ics.uci.edu>
1903         * puresize.h (BASE_PURESIZE): Increase to 1240000.
1905 2008-07-17  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1907         * gtkutil.c: Include <config.h> instead of "config.h".
1909         * lisp.h (Foverlay_buffer): Add EXFUN.
1911         * process.c (create_process) [!WINDOWSNT && FD_CLOEXEC]: Wait for
1912         child process to complete child_setup.  Undo 2005-09-21 change.
1914         * s/darwin.h: Mention setsid after vfork.
1916 2008-07-17  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1918         * Makefile.in (frame.o, keyboard.o, xdisp.o, xfaces.o):
1919         Depend on macgui.h.
1921         * macfns.c (Fx_server_version): Don't use gestaltSystemVersionMajor,
1922         gestaltSystemVersionMinor, or gestaltSystemVersionBugFix.
1924         * macterm.c (keycode_to_xkeysym_table): Add entries for f17, f18,
1925         and f19.
1926         [MAC_OSX] (fn_keycode_to_keycode_table): Likewise.
1928         * macterm.h (gestaltSystemVersionMajor, gestaltSystemVersionMinor)
1929         (gestaltSystemVersionBugFix) [MAC_OS_X_VERSION_MAX_ALLOWED < 1040]:
1930         Remove enumerators.
1932         * mactoolbox.c [USE_MAC_TSM] (mac_handle_text_input_event):
1933         Check if FACE_FROM_ID returns NULL.
1935 2008-07-17  David Robinow  <drobinow@gmail.com>  (tiny change)
1937         * w32inevt.c (change_frame_size): Remove extern declaration.
1938         (resize_event, maybe_generate_resize_event): Pass SAFE arg to
1939         change_frame_size.
1941 2008-07-17  Adrian Robert  <Adrian.B.Robert@gmail.com>
1943         * getloadavg.c: Revert last change (2008-07-15).
1945 2008-07-17  Adrian Robert  <Adrian.B.Robert@gmail.com>
1947         * Makefile.in: Replace emacsapp, emacsbindir, emacsappsrc variables
1948         set here with ns_appdir, ns_appresdir, ns_appbindir, ns_appsrc) set
1949         from configure.
1951 2008-07-17  Dan Nicolaescu  <dann@ics.uci.edu>
1953         * s/sol2.h:
1954         * s/sol2-4.h: Reorganize conditionals.
1956         * ecrt0.c: Remove code depending on m68000, not used anymore.
1958         * fns.c (hash_remove): Make static.
1959         * lisp.h (hash_remove): Don't prototype.
1961         * m/ibmrs6000.h:
1962         * m/ibms390x.h:
1963         * m/macppc.h: Remove boilerplate comments.
1965         * m/sparc.h (A_TEXT_OFFSET, A_TEXT_SEEK): Remove, only used on
1966         Solaris, which does not need them.
1968         * m/vax.h: Remove comments about unsupported systems.
1970         * s/darwin.h: Reorganize ifdefs.
1972 2008-07-17  Andreas Schwab  <schwab@suse.de>
1974         * s/cygwin.h (LIB_STANDARD_LIBSRC): Don't define.
1976 2008-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
1978         Use SDATA.  Follow coding convention of placing operators at
1979         beginning of next line rather than end of previous line, and placing
1980         spaces around infix operators.
1982         * Makefile.in: Undef LIB_STANDARD before defining it to silence warning
1983         in case it was defined already.
1984         USE @GNUSTEP_MAKEFILES@ rather than envvars.
1985         * nsterm.m (ns_term_init): Pass Qt and Qnil rather than YES/NO to
1986         ns_default.
1987         (applicationShouldTerminate, setValuesFromPanel): Use EQ to compare
1988         Lisp_Objects.
1989         * nsterm.h (Fx_display_grayscale_p, Fx_display_planes)
1990         (ns_defined_color, ns_color_to_lisp): Declare.
1991         * nsselect.m (ns_handle_selection_request, ns_handle_selection_clear)
1992         (Fns_own_selection_internal): Make the big ugly hack more explicit, so
1993         it's accepted even with USE_LISP_UNION_TYPE.
1994         * nsmenu.m (ns_update_menubar): Use EQ to compare Lisp_Objects.
1995         (update_frame_tool_bar): Remove apparently obsolete tests for
1996         non-integerness of f->tool_bar_lines.
1997         (windowShouldClose, addButton, clicked, runDialogAt): Make the big ugly
1998         hack more explicit, so it's accepted even with USE_LISP_UNION_TYPE.
1999         * nsfont.m (nsfont_driver): Use just 0 rather than an invalid cast.
2000         (nsfont_open): Don't confuse NULL for Qnil.
2001         * nsfns.m (ns_implicitly_set_icon_type): Use EQ to compare Lisp_Objects.
2002         * menu.h (find_and_call_menu_selection):
2003         * menu.c (find_and_call_menu_selection): Use just int for vector size.
2004         (find_and_return_menu_selection): Always return something.
2005         * frame.h: Include dispextern.h for Display_Info.
2006         (display_x_get_resource): Declare.
2008 2008-07-16  Adrian Robert  <Adrian.B.Robert@gmail.com>
2010         * syntax.c: Remove stdio.h include accidentally introduced in
2011         Emacs.app commit.
2012         * Makefile.in: Change GNUSTEP to NS_IMPL_GNUSTEP, COCOA to
2013         NS_IMPL_COCOA.
2014         * keyboard.c (handle_async_input, input_available_signal): Remove
2015         BSD4_1 conditional code, introduced accidentally in Emacs.app commit.
2017 2008-07-16  Stefan Monnier  <monnier@iro.umontreal.ca>
2019         * nsterm.m (lisp_to_mod): Use parse_solitary_modifier instead.
2020         (ns_lisp_to_color): Don't mess with internal Lisp data fields.
2021         (ns_term_init, ns_term_shutdown, initFrameFromEmacs, ns_list_fonts):
2022         Use SDATA.
2024         * keymap.c: Remove all NS-specific code.
2025         (where_is_preferred_modifier, Vwhere_is_preferred_modifier): New vars.
2026         (preferred_sequence_p): Rename from ascii_sequence_p; pay attention to
2027         where_is_preferred_modifier, return a different value depending on how
2028         preferred is the binding.
2029         (where_is_internal): Adjust accordingly.
2030         (Fwhere_is_internal): Refresh where_is_preferred_modifier.
2031         Adjust to new preferred_sequence_p.
2032         (syms_of_keymap): Declare `where-is-preferred-modifier'.
2033         * keyboard.c (parse_solitary_modifier): Not static any more.
2034         * keyboard.h (parse_solitary_modifier): Declare.
2036 2008-07-16  Andreas Schwab  <schwab@suse.de>
2038         * Makefile.in (SOME_MACHINE_LISP): Remove easy-mmode, fix spelling
2039         of easymenu.
2041 2008-07-16  Chong Yidong  <cyd@stupidchicken.com>
2043         * xdisp.c (move_it_in_display_line): Account for word wrap, so
2044         that we don't move off the line.
2046 2008-07-16  Stefan Monnier  <monnier@iro.umontreal.ca>
2048         * keyboard.c (Qsuper): Remove.
2049         (parse_menu_item): Don't call where_is_internal specially for NS.
2051 2008-07-16  Dan Nicolaescu  <dann@ics.uci.edu>
2053         * s/gnu-linux.h: Remove boilerplate comments.
2055         * m/alpha.h (__ELF__): Consolidate conditions.
2057         * m/m68k.h (linux): Use GNU_LINUX instead.
2058         Remove boilerplate comments.
2060         * m/intel386.h: Undo refactoring from previous change.
2061         (LIB_STANDARD): All systems that define USG define LIB_STANDARD
2062         too, remove dead code.
2063         (linux): Use GNU_LINUX instead.
2065 2008-07-16  Jason Rumney  <jasonr@gnu.org>
2067         * w32gui.h: Repeat 26 June changes lost by last change.
2069 2008-07-16  Dan Nicolaescu  <dann@ics.uci.edu>
2071         * systty.h: Remove code for Aix on 386, unsupported platform.
2073         * s/ms-w32.h: Remove boilerplate comments.
2074         (fcloseall, fgetchar, flushall, fputchar, getw, putw): Remove, unused.
2076         * s/gnu-linux.h (TERM): Remove support.
2077         (HAVE_SYSVIPC): Remove, unused.
2078         (A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Remove, not used
2079         for this system.
2081         * process.c: Remove support for IRIS, unused.
2082         Remove support for TERM, not relevant anymore.
2084         * unexalpha.c (DEFAULT_ENTRY_ADDRESS): Remove, replace the only
2085         used with the definition.
2087         * s/aix4-2.h (static): Do not undef.
2089         * m/ibmrs6000.h: Remove code depending on USG5_4, this file is
2090         only used on Aix.
2091         (HAVE_SYSVIPC): Remove, unused.
2093         * m/hp800.h (CANNOT_DUMP): Do not undef.
2095         * m/alpha.h: Fix comment.
2097         * s/usg5-4.h (HAVE_SYSVIPC): Remove, unused.
2098         (USG_SHARED_LIBRARIES): Remove, only used in unexec.c which is not
2099         used by this configuration.
2100         * emacs.c: Remove code depending on USG_SHARED_LIBRARIES.
2101         * unexec.c: Remove code depending on HPUX and
2102         USG_SHARED_LIBRARIES, not used with this file.  Remove code
2103         depending on IRIS, unused.  Remove if 0-ed code.
2105         * s/template.h: Remove comments about static.
2107         * sysdep.c: Remove code depending on NEED_PTEM_H, unused.
2108         Remove if 0-ed code.
2109         (baud_convert): Don't depend on BAUD_CONVERT, all definitions the
2110         were the same as the default.
2111         * s/vms.h (BAUD_CONVERT): Remove, same as the default.
2112         Remove boilerplate comments.
2113         * s/hpux10-20.h (BAUD_CONVERT): Remove, same as the default.
2114         (HAVE_SYSVIPC): Remove, unused.
2115         (LD_SWITCH_SYSTEM_TEMACS): Simplify, hp9000s700 not supported anymore.
2117         * m/ia64.h (PNTR_COMPARISON_TYPE): Remove, same as the default.
2118         Remove boilerplate comments.
2119         * m/amdx86-64.h (PNTR_COMPARISON_TYPE): Remove, same as the default.
2120         Remove boilerplate comments.
2121         * m/ibms390x.h (PNTR_COMPARISON_TYPE): Remove, same as the default.
2122         Remove boilerplate comments.
2123         * lisp.h (PNTR_COMPARISON_TYPE): Define it unconditionally.
2125         * m/intel386.h (DATA_SEG_BITS): Remove definitions, only used on
2126         USG systems which do not use DATA_SEG_BITS.
2127         Refactor code.  Remove boilerplate comments.
2129         * m/ibms390.h:
2130         * m/m68k.h:
2131         * s/bsd-common.h:
2132         * s/cygwin.h:
2133         * s/darwin.h:
2134         * s/freebsd.h:
2135         * s/gnu.h:
2136         * s/msdos.h: Remove boilerplate comments.
2138         * m/iris4d.h: Remove boilerplate comments and code for systems that
2139          do not use this file.
2140         (IRIS_4D): Remove, unused.
2142         * m/mips.h: Remove boilerplate comments and code for systems that
2143          do not use this file.
2144         (SIGN_EXTEND_CHAR):
2145         * m/arm.h (SIGN_EXTEND_CHAR): Remove, unused.
2146         * unexmips.c: Remove file, unused.
2148         * editfns.c (Fuser_full_name): Replace the only use of
2149         USER_FULL_NAME with its value.
2150         * config.in: Regenerate.
2152 2008-07-16  David Reitter  <david.reitter@gmail.com>
2154         * Makefile.in: Add ns-win, ns-carbon-compat, easy-mmode and
2155         easy-menu to SOME_MACHINE_LISP for the new NeXTstep port.
2157 2008-07-16  Glenn Morris  <rgm@gnu.org>
2159         * emacs.c (system-type): Doc fix.
2161 2008-07-15  Stefan Monnier  <monnier@iro.umontreal.ca>
2163         * keyboard.c (parse_menu_item): Don't use cachelist, even under NS.
2164         If the cache doesn't work, let's fix it, rather than work around it.
2166 2008-07-15  Adrian Robert  <Adrian.B.Robert@gmail.com>
2168         * Makefile.in: Correct additions for nsfont.o in last commit.
2169         * nsfont.m: New file (forgot last commit).
2171 2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
2173         * callproc.c (set_initial_environment): Initialize
2174         Vprocess_environment under CANNOT_DUMP (fixes crash when
2175         batch-compiling for bootstrap).
2177 2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
2178             YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
2180         (make_initial_frame): Call init_frame_faces(f) in CANNOT_DUMP case --
2181         fix crash due to different init order.
2183 2008-07-15  Adrian Robert  <Adrian.B.Robert@gmail.com>
2185         Changes and additions for NeXTstep windowing system (Cocoa and
2186         GNUstep) support.
2188         * Makefile.in:
2189         * config.in: Support defines and build commands for NS port.
2190         * blockinput.h (BLOCK_INPUT, UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT)
2191         (UNBLOCK_INPUT_TO): Don't use under NS unless EXPERIMENTAL_CONTROL_G.
2192         * dispextern.h: Include nsgui.h and add needed typedefs under NS
2193         windowing.
2194         (struct face): Add synth_ital field.
2195         * dispnew.c: Include nsterm.h when compiling under NS windowing.
2196         (init_display): Initialize Vinitial_window_system to "ns" when so
2197         compiled.
2198         * emacs.c: Include GSConfig.h when compiling under GNUstep.
2199         (display_arg): Use under NS.
2200         (main): Under NS, allocate autorelease pool and handle command line
2201         args.  Move syms_of_xmenu() call under #ifdef HAVE_X_WINDOWS.
2202         (standard_args): Add NS-specific args.
2203         (shut_down_emacs): Shut down NS terminal if compiled under NS.
2204         * font.c (DEFAULT_ENCODING): New variable.
2205         (font_find_for_lface): Use it.
2206         (syms_of_font): Load syms_of_nsfont under NS.
2207         * font.h: Declare nsfont_driver when compiled under NS.
2208         * fontset.c: When compiling under NS, include nsterm.h.
2209         (fontset_from_font): Autoconstruct fontset under NS.
2210         * frame.c (various): Under NS, include nsterm.h, add Qns window system
2211         symbol, document and use it.
2212         (do_switch_frame): When for_deletion under Cocoa, add
2213         Fraise_frame(Qnil).
2214         (x_set_frame_parameters): Ensure font attribute changes are picked up.
2215         (x_get_arg): Allow "yes" and "no" as boolean values.
2216         (syms_of_frame): Declare Qns.  Init Vdefault_frame_scroll_bars to
2217         Qright under Cocoa.
2218         (focus-follows-mouse): Default to 0 under NS.
2219         * frame.h (enum output_method): Add output_ns.
2220         (external_tool_bar, external_menu_bar, FRAME_EXTERNAL_TOOLBAR)
2221         (FRAME_EXTERNAL_MENU_BAR): Use under NS.
2222         (FRAME_WINDOW_P): NS-specific definition.
2223         * fringe.c (max_used_fringe_bitmap): Make public.
2224         * getloadavg.c (mach/mach.h): Include it under NeXT descendant OS's.
2225         (getloadavg): Use NeXT code under descendant OS's.
2226         * image.c (includes and header section, x_create_bitmap_from_data)
2227         (x_create_bitmap_from_file, free_bitmap_record, image_background)
2228         (image_background_transparent, x_clear_image_1)
2229         (x_create_x_image_and_pixmap, x_destroy_x_image, x_put_x_image)
2230         (Create_Pixmap_From_Bitmap_Data, xpm_load_image, lookup_rgb_color)
2231         (x_to_xcolors, x_from_xcolors, x_disable_image)
2232         (x_build_heuristic_mask, syms_of_image): Add NS support parallel to
2233         other GUIs, including XPM support using code originally written for
2234         Carbon GUI.
2235         (png_load, jpeg_load, tiff_load, gif_load): Add implementations
2236         using NS API.
2237         (image_ascent): Use font metrics macros instead of direct struct field
2238         access.
2239         * keyboard.c (includes): Add nsterm.h when compiling under NS.
2240         (kbd_buffer_get_event): Handle NS as other GUI windowing systems.
2241         Also, handle NS as GTK for menu bar purposes.
2242         (make_lispy_event): Handle NS as other GUI windowing systems, and as X
2243         toolkit where they differ.
2244         (parse_menu_item): Prefer keybindings using 'super' modifier.  Also,
2245         use cachelist, still needed under NS.
2246         * keyboard.h (ENCODE_MENU_STRING, XtPointer, Boolean): Handle as NTGUI.
2247         (struct widget_value): Define it here for menu.c.
2248         * keymap.c (includes): Include modifier internals.
2249         (lisp_to_mod, modifier_sequence_p): New functions, compiled only under
2250         NS.
2251         (where_is_internal, Fwhere_is_internal): When compiled under NS, add
2252         support for preferring sequences using certain modifiers, specified by
2253         the FIRSTONLY argument.
2254         * lisp.h (hash_remove): Rename to avoid name clash when compiling
2255         under NS GNUstep implementation.
2256         (USE_LSB_TAG): Use it under Cocoa when compiling under NS.
2257         * lread.c (init_lread): Treat NS as HAVE_CARBON for turn_off_warning.
2258         * menu.c: Include nsterm.h under NS.
2259         (single_menu_item, parse_single_submenu, xmalloc_widget_value)
2260         (free_menubar_widget_tree_value, update_submenu_strings)
2261         (find_and_call_menu_selection): Treat NS as X and NT.
2262         (find_and_return_menu_selection): New function, used for popup menus.
2263         * nsgui.h:
2264         * nsterm.h:
2265         * nsfns.m:
2266         * nsimage.m:
2267         * nsmenu.m:
2268         * nsselect.m:
2269         * nsterm.m: New files.
2270         * process.c (wait_reading_process_output): Under NS, call ns_select()
2271         instead of plain select().
2272         * syntax.c (char_quoted): Under NS, avoid a crash when called near
2273         beginning of buffer.
2274         * sysselect.h (init_process): Rename when compiling under Cocoa to
2275         avoid name conflict.
2276         * termhooks.h (display_info): Add ns_display_info to union.
2277         * terminal.c (Fterminal_live_p): Add ns to terminal types.
2278         * terminfo.c (UP, BC, PC): Don't declare when compiling under NS in
2279         COCOA environment.
2280         * unexnext.c: Update to work with mach API on Mac OS X, and to use new
2281         unexec() signature.  (Note, this will dump, but the resulting file
2282         crashes; unexosx is used instead; keeping around for reference and
2283         possible aid in getting dump working under GNUstep.)
2284         * w32gui.h (button_type, widget_value): Remove definitions (now in
2285         keyboard.h).
2286         * window.c: Include nsterm.h when compiling under NS.
2287         * xdisp.c (includes): Include nsterm.h when compiling under NS.
2288         (set_frame_menubar, update_menu_bar, display_menu_bar): Handle NS as
2289         other GUI windowing systems.
2290         (update_tool_bar, redisplay_tool_bar, redisplay_window): Handle NS as
2291         GTK.
2292         (x_consider_frame_title): Under NS, set icon type and frame
2293         modified-state indicator; use ns_set_name_as_filename() when using
2294         formatted title.
2295         (update_window_cursor): Make public when compiling under NS.
2296         (display_hourglass_p, syms_of_xdisp, hourglass_shown_p)
2297         (hourglass_atimer, Vhourglass_delay
2298         * xfaces.c (header section, init_frame_faces, clear_font_table)
2299         (defined_color, unload_color, x_face_list_fonts)
2300         (prepare_face_for_display): Add NS support parallel to other GUIs.
2301         Emulate GCs like other non-X GUIs.
2302         (split_font_name): Don't lowercase font name under NS.
2303         (merge_face_ref, Finternal_set_lisp_face_attribute): Support stippling
2304         under NS.
2305         * s/darwin.h: Add support for compilation under NS.
2307 2008-07-15  Jason Rumney  <jasonr@gnu.org>
2309         * w32fns.c (Fx_create_frame): Remove duplicate unwind_protect.
2310         (w32_show_hourglass): Rename from show_hourglass.
2311         (w32_hide_hourglass): Rename from hide_hourglass.
2312         (DEFAULT_HOURGLASS_DELAY): Revert from last change.
2313         (Vhourglass_delay): Declare extern.
2314         (hourglass_started): Remove.
2316         * xdisp.c (Vhourglass_delay): Remove static.
2317         (hourglass_started, start_hourglass, cancel_hourglass):
2318         Don't include these versions on WINDOWSNT.
2320 2008-07-15  Adrian Robert  <Adrian.B.Robert@gmail.com>
2322         * dispextern.h (hourglass_shown_p, hourglass_atimer): New extern
2323         variables (formerly in xfns.c).
2324         (show_hourglass, hide_hourglass): New prototypes (same).
2325         * xdisp.c (display_hourglass_p, hourglass_shown_p, hourglass_atimer)
2326         (Vhourglass_delay, DEFAULT_HOURGLASS_DELAY): New variables (formerly
2327         in xfns.c).
2328         (syms_of_xdisp): Declare/initialize display-hourglass,
2329         hourglass-delay.  Initialize hourglass_atimer, hourglass_shown_p.
2330         (hourglass_started, start_hourglass, cancel_hourglass): New functions,
2331         formerly in xfns.c.
2332         * xfns.c (display_hourglass_p, hourglass_atimer, hourglass_shown_p)
2333         (Vhourglass_delay, DEFAULT_HOURGLASS_DELAY, hourglass_started)
2334         (start_hourglass, cancel_hourglass): Remove.
2335         (show_hourglass, hide_hourglass): Remove prototypes and static
2336         modifiers.
2337         (syms_of_xfns): Remove display-hourglass, hourglass-delay,
2338         hourglass_atimer, hourglass_shown_p declaration/initialization.
2339         * macfns.c (display_hourglass_p, hourglass_atimer, hourglass_shown_p)
2340         (Vhourglass_delay, DEFAULT_HOURGLASS_DELAY, hourglass_started)
2341         (start_hourglass, cancel_hourglass): Remove.
2342         (show_hourglass, hide_hourglass): Remove prototypes and static
2343         modifiers.
2344         (syms_of_macfns): Remove display-hourglass, hourglass-delay,
2345         hourglass_atimer, hourglass_shown_p declaration/initialization.
2346         * w32fns.c (display_hourglass_p, Vhourglass_delay)
2347         (DEFAULT_HOURGLASS_DELAY): Remove.
2348         (syms_of_w32fns): Remove display-hourglass, hourglass-delay,
2349         hourglass_shown_p declaration/initialization.
2351 2008-07-14  Jason Rumney  <jasonr@gnu.org>
2353         * w32fns.c (w32_get_arg): Remove wrapper function.
2354         (w32_createwindow, x_icon, x_create_tip_frame): Use x_get_arg
2355         directly.
2356         (Fx_create_frame): Sync with xfns.c.  Use x_get_arg directly.
2358 2008-07-14  Kenichi Handa  <handa@m17n.org>
2360         * xfont.c (xfont_open): Add workaround for X's bug.
2362 2008-07-14  Emanuele Giaquinta  <emanuele.giaquinta@gmail.com>  (tiny change)
2364         * fontset.c: Include <stdio.h> unconditionally.
2366 2008-07-13  Michael Albinus  <michael.albinus@gmx.de>
2368         * dbusbind.c (Fdbus_register_signal): Allow also signal arguments
2369         for filtering.
2371 2008-07-13  Dan Nicolaescu  <dann@ics.uci.edu>
2373         * s/vms.h: Use __GNUC__ instead of _GNUC_.
2375         * m/macppc.h:
2376         * m/alpha.h: Use GNU_LINUX instead of LINUX.  Reorganize conditionals.
2378         * m/ibms390x.h (XINT, XUINT): Don't define, same as the default
2379         (SPECIAL_EMACS_INT):
2380         * m/ia64.h (SPECIAL_EMACS_INT):
2381         * m/amdx86-64.h (SPECIAL_EMACS_INT):
2382         * s/gnu.h (NLIST_STRUCT):
2383         * s/aix4-2.h (X11R5_INHIBIT_I18N):
2384         * s/gnu-linux.h (LINUX):
2385         * s/msdos.h (HAVE_FACES):
2386         * s/ms-w32.h (HAVE_FACES): Don't define, unused.
2388         * systty.h:
2389         * sysdep.c (setup_pty): Don't depend on SYSV_PTYS, it is not used
2390         anymore.
2392 2008-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
2394         * syswait.h: Remove old if 0 code.  Do not define WAITTYPE, it was
2395         always defined as int.
2397         * s/netbsd.h (HAVE_UNION_WAIT, HAVE_WAIT_HEADER, WAIT_USE_INT):
2398         * s/gnu.h (HAVE_WAIT_HEADER, WAIT_USE_INT, HAVE_UNION_WAIT):
2399         * s/gnu-linux.h (HAVE_WAIT_HEADER):
2400         * s/freebsd.h (HAVE_WAIT_HEADER):
2401         * s/bsd-common.h (HAVE_UNION_WAIT):
2402         * s/aix4-2.h (HAVE_WAIT_HEADER):
2403         * m/mips.h (HAVE_UNION_WAIT):
2404         * s/usg5-4.h (HAVE_WAIT_HEADER, WAITTYPE): Do not define, not used.
2405         (COFF, static): Do not define, they are undefined later in the file.
2407         * process.c (update_status): Don't use a union.
2408         (status_convert):
2409         (sigchld_handler): Use int instead of WAITTYPE.
2411 2008-07-12  Chong Yidong  <cyd@stupidchicken.com>
2413         * indent.c (Fvertical_motion): Restore hscroll before moving to
2414         goal column.
2416 2008-07-11  Dan Nicolaescu  <dann@ics.uci.edu>
2418         * lisp.h: Remove left over code.
2420 2008-07-11  Andreas Schwab  <schwab@suse.de>
2422         * lisp.h: Fix logic in last change.
2424         * menu.h: New file.
2425         * menu.c: Include it.
2426         * xmenu.c: Likewise.
2427         * Makefile.in: Update dependencies.
2429 2008-07-11  Kenichi Handa  <handa@m17n.org>
2431         * fontset.c (fontset_from_font): Cancel the previous change.
2433 2008-07-11  Dan Nicolaescu  <dann@ics.uci.edu>
2435         * lisp.h:
2436         * w32heap.c:
2437         * emacs.c:
2438         * alloc.c: Replace all references of NO_UNION_TYPE with
2439         USE_LISP_UNION_TYPE.
2441         * m/xtensa.h (NO_UNION_TYPE):
2442         * m/vax.h (NO_UNION_TYPE):
2443         * m/template.h (NO_UNION_TYPE):
2444         * m/sparc.h (NO_UNION_TYPE):
2445         * m/mips.h (NO_UNION_TYPE):
2446         * m/macppc.h (NO_UNION_TYPE):
2447         * m/m68k.h (NO_UNION_TYPE):
2448         * m/iris4d.h (NO_UNION_TYPE):
2449         * m/intel386.h (NO_UNION_TYPE):
2450         * m/ibms390x.h (NO_UNION_TYPE):
2451         * m/ibms390.h (NO_UNION_TYPE):
2452         * m/ibmrs6000.h (NO_UNION_TYPE):
2453         * m/ia64.h (NO_UNION_TYPE):
2454         * m/hp800.h (NO_UNION_TYPE):
2455         * m/arm.h (NO_UNION_TYPE):
2456         * m/amdx86-64.h (NO_UNION_TYPE):
2457         * m/alpha.h (NO_UNION_TYPE): Remove definition, all platform were
2458         defining it the same.
2460 2008-07-10  Chong Yidong  <cyd@stupidchicken.com>
2462         * xdisp.c (move_it_to): Backtrack if past the edge of a wrapped line.
2464 2008-07-10  Dan Nicolaescu  <dann@ics.uci.edu>
2466         * fileio.c:
2467         * sysdep.c
2468         * systty.h:
2469         * m/ibmrs6000.h:
2470         * m/iris4d.h:
2471         * s/aix4-2.h:
2472         * s/freebsd.h:
2473         * s/gnu-linux.h:
2474         * s/hpux10-20.h:
2475         * s/hpux11.h:
2476         * s/netbsd.h:
2477         * s/sol2-3.h:
2478         * s/sol2-4.h:
2479         * s/sol2.h:
2480         * s/usg5-4.h:
2481         * s/vms.h: Remove references to unused variables.
2483 2008-07-10  Andreas Schwab  <schwab@suse.de>
2485         * ftfont.c (ftfont_resolve_generic_family): Remove foundry from
2486         pattern before matching the generic family.
2488 2008-07-10  Dan Nicolaescu  <dann@ics.uci.edu>
2490         * unexec.c:
2491         * s/vms.h:
2492         * s/usg5-4-2.h:
2493         * s/sol2-5.h:
2494         * s/freebsd.h:
2495         * s/darwin.h: Remove dead code.
2497         * m/template.h:
2498         * m/sparc.h:
2499         * m/mips.h:
2500         * m/m68k.h:
2501         * m/iris4d.h:
2502         * m/intel386.h:
2503         * m/ibms390x.h:
2504         * m/ibms390.h:
2505         * m/ia64.h:
2506         * m/hp800.h:
2507         * m/arm.h:
2508         * m/amdx86-64.h: Remove dead code and references to unused
2509         and compiler defined symbols.
2511         * unexmips.c:
2512         * unexelf.c: Remove references to desupported systems.
2514         * m/powermac.h: Remove file, it is now identical to m/macppc.h.
2516         * m/powermac.h: Remove boilerplate comments.
2517         (NO_REMAP): Remove unused definition.
2519         * m/macppc.h (UNEXEC, NO_TERMIO): Don't define, the s/ files
2520         define them.
2522 2008-07-10  Kenichi Handa  <handa@m17n.org>
2524         * xfont.c (xfont_open): Log the reason of failure.
2526 2008-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
2528         * fontset.c (fontset_get_font_group):
2529         * font.c (font_check_otf): Specify argument types.
2531 2008-07-09  Kenichi Handa  <handa@m17n.org>
2533         * coding.c (detect_coding_utf_8): Set detect_info->found only when
2534         non-ASCII char is found.
2536         * fontset.c (fontset_compare_rfontdef): Fix plus/minus.
2537         (reorder_font_vector): Change the arg preferred_family to font.
2538         Prefer the spec matching with font.
2539         (fontset_get_font_group): New function.
2540         (fontset_find_font): Change the format of an element of a realized
2541         fontset.  Use fontset_get_font_group.
2542         (fontset_font): Try the current fontset, the default fontset, the
2543         fallbacks of the current fontset, and the fallbacks of the default
2544         fontset in this order.
2545         (face_for_char): Delete the shortcut to use the current font.
2546         (fontset_from_font): Don't set fonts for Latin in the fontset.
2548         * font.h (font_make_object, font_match_p): Adjust prototypes.
2550         * ftfont.h [FT_BDF_H]: Include FT_BDF_H.
2552         * font.c (font_make_object): New arg entity and pixelsize.
2553         (font_check_otf_features, font_check_otf): New functions.
2554         (font_match_p): Check :lang, :script, and :otf properties.
2556         * xfont.c (xfont_open): Adjust it for the change of
2557         font_make_object.
2558         (xfont_text_extents): Fix initial setting of metrics.
2560         * ftfont.c (struct ftfont_info): New member index, delete member
2561         fc_charset_idx.  Make the member order compatible with struct
2562         xftfont_info.
2563         (fc_charset_table): Change charset names to registry names.
2564         (ftfont_pattern_entity): Delete the args registry and
2565         fc_charset_idx.  Change the value of :font-entity property
2566         to (FONTNAME . INDEX).  Always set :registry property to
2567         `iso10646-1'.
2568         (struct ftfont_cache_data): New struct.
2569         (ftfont_lookup_cache): New arg for_face.
2570         (ftfont_get_fc_charset, ftfont_get_otf): New functions.
2571         (ftfont_driver): Set the member otf_capability.
2572         (ftfont_get_charset): Adjust it for the change of
2573         fc_charset_table.
2574         (OTF_TAG_SYM): New macro.
2575         (ftfont_spec_pattern): Delete the arg fc_charset_idx.  Adjust it
2576         for the change of fc_charset_table.
2577         (ftfont_list): Adjust it for the change of ftfont_spec_pattern and
2578         ftfont_pattern_entity.  Add FC_INDEX to objset.
2579         (ftfont_match): Adjust it for the change of ftfont_spec_pattern
2580         and ftfont_pattern_entity.
2581         (ftfont_open): Adjust it for the change of ftfont_lookup_cache,
2582         font_make_object, struct ftfont_info.
2583         (ftfont_has_char): Use ftfont_get_fc_charset.
2584         (ftfont_otf_features, ftfont_otf_capability): New functions.
2585         (ftfont_shape): Use ftfont_get_otf.
2586         (ftfont_text_extents): Fix initial setting of metrics.
2588         * xftfont.c (struct xftfont_info): New member ft_size.  Make the
2589         member order compatible with struct ftfont_info.
2590         (xftfont_open): Add FC_CHARSET to the pattern.  Set
2591         xftfont_info->ft_size.  Don't unlock the face.  Check BDF
2592         properties if appropriate.
2593         (xftfont_close): Unlock the face.
2594         (xftfont_anchor_point, xftfont_shape): Deleted.
2595         (syms_of_xftfont): Don't set members anchor_point and shape of
2596         xftfont_driver.
2598         * w32uniscribe.c (uniscribe_open): Adjust it for the change of
2599         font_make_object.
2601         * w32font.c (w32font_open): Adjust it for the change of
2602         font_make_object.
2603         (w32font_open_internal): Don't set properties of font_object here.
2605 2008-07-08  Chong Yidong  <cyd@stupidchicken.com>
2607         * macfns.c (x_create_tip_frame):
2608         * w32fns.c (x_create_tip_frame):
2609         * xfns.c (x_create_tip_frame): Pass parameter argument to
2610         face-set-after-frame-default.
2612         * xfaces.c (Finternal_merge_in_global_face): Save merged
2613         attributes for the default face back into the face vector.
2615 2008-07-08  Andreas Schwab  <schwab@suse.de>
2617         * fontset.h: Declare fontset_from_font.  Don't declare
2618         new_fontset_from_font and fontset_from_font_name.
2619         * xterm.c: Include "fontset.h".
2620         * Makefile.in (xterm.o): Update dependencies.
2622 2008-07-08  Glenn Morris  <rgm@gnu.org>
2624         * m/sparc.h: Define __sparc__ rather than sparc.  (Bug#507.)
2625         * alloc.c, ecrt0.c: Use __sparc__ rather than sparc.
2627 2008-07-07  Chong Yidong  <cyd@stupidchicken.com>
2629         * frame.c (Qinhibit_face_set_after_frame_default): Var deleted.
2630         (x_set_frame_parameters): Don't bind it.
2632 2008-07-07  Juanma Barranquero  <lekktu@gmail.com>
2634         * w32fns.c (map_w32_filename): Declare extern.
2636 2008-07-07  Jason Rumney  <jasonr@gnu.org>
2638         * w32term.c (WS_EX_LAYERED): Define if not already.
2640 2008-07-06  Chong Yidong  <cyd@stupidchicken.com>
2642         * xfaces.c (set_font_frame_param): Don't try to set the font
2643         parameter if it is still unspecified in the lface.
2645 2008-07-05  Chong Yidong  <cyd@stupidchicken.com>
2647         * xfaces.c (Finternal_merge_in_global_face): Don't realize default
2648         face if it didn't already exist.
2650         * xdisp.c (try_window_id): Give up if word-wrapping is on.
2652 2008-07-05  Andreas Schwab  <schwab@suse.de>
2654         * xdisp.c (get_it_property): Move out of HAVE_WINDOW_SYSTEM section.
2656 2008-07-05  Chong Yidong  <cyd@stupidchicken.com>
2658         * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Turn it off if
2659         word-wrapping.
2660         (IT_DISPLAYING_WHITESPACE): New macro.
2661         (move_it_in_display_line_to): Handle MOVE_TO_X requests properly
2662         when word-wrapping.  Simplify word-wrapping logic.  Use correct
2663         pixel positions when saving copies of the iterator.
2664         (display_line): Use proper wrap point if the last character on a
2665         line was preceded by whitespace.
2667 2008-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>
2669         * Makefile.in (${etc}DOC): Depend on ${lisp} rather than ${shortlisp}.
2671 2008-07-04  Kenichi Handa  <handa@m17n.org>
2673         * fns.c (Fstring_to_unibyte): Delete the arg ACCEPT-LATIN-1.
2675         * lisp.h: EXFUN adjusted for the change of Fstring_to_unibyte.
2677 2008-07-02  Jason Rumney  <jasonr@gnu.org>
2679         * xfns.c (syms_of_xfns): Only define x-select-font when both
2680         HAVE_FREETYPE and USE_GTK
2682         * xdisp.c (next_element_from_display_vector): Move assignment out
2683         of if statement.
2685 2008-07-02  Toru Tsuneyoshi  <t_tuneyosi@hotmail.com>
2687         * lisp.h (Qdelete_file, Qdelete_directory): Declare extern.
2689         * fileio.c (delete_by_moving_to_trash, Qmove_file_to_trash): New vars.
2690         (syms_of_fileio): Initialize and export them.
2691         (Fdelete_directory, Fdelete_file): Optionally delete via trash.
2693         * w32fns.c (FOF_NO_CONNECTED_ELEMENTS): Define if not already.
2694         (Fsystem_move_file_to_trash): New function.
2695         (syms_of_w32fns): Export it to lisp.
2697 2008-07-01  Jason Rumney  <jasonr@gnu.org>
2699         * w32font.c (w32font_text_extents): Don't count overhang as part
2700         of width.
2702 2008-06-30  Miles Bader  <miles@gnu.org>
2704         * dispextern.h (struct glyph, struct it, struct iterator_stack_entry):
2705         Add `avoid_cursor_p' field.
2707         * xdisp.c (push_it, pop_it): Save/restore avoid_cursor_p field.
2708         (set_cursor_from_row): Skip glyphs with avoid_cursor_p set.
2709         (append_glyph, append_composite_glyph, produce_image_glyph)
2710         (append_stretch_glyph): Initialize avoid_cursor_p.
2711         (get_it_property): Rename from `get_line_height_property'.
2712         (x_produce_glyphs): Use get_it_property.
2713         (handle_line_prefix, push_display_prop): New functions.
2714         (display_line, move_it_in_display_line_to): Handle line/wrap prefixes.
2715         (Vwrap_prefix, Qwrap_prefix, Vline_prefix, Qline_prefix):
2716         New variables.
2717         (syms_of_xdisp): Initialize them.
2719 2008-06-30  Kenichi Handa  <handa@m17n.org>
2721         * xftfont.c (xftfont_open): Don't call FcConfigSubstitute and
2722         XftDefaultSubstitute (they are called in XftFontMatch).
2723         (xftfont_open): Fix args to ftfont_font_format.
2725         * ftfont.c (fc_charset_table): New member lang.
2726         (ftfont_resolve_generic_family): New arg pattern.
2727         (ftfont_spec_pattern): Check fc_cahrset_table[]->lang.
2728         (ftfont_list): Call ftfont_resolve_generic_family with `pattern'.
2729         (ftfont_open): Fix args to ftfont_font_format.
2730         (ftfont_font_format): New arg filename.
2732 2008-06-30  Chong Yidong  <cyd@stupidchicken.com>
2734         * xfaces.c (Finternal_merge_in_global_face): If default face was
2735         modified, realize it again.  Update the font face attribute.
2737 2008-06-29  Jason Rumney  <jasonr@gnu.org>
2739         * w32term.c (x_set_frame_alpha): Fix logic.
2741 2008-06-29  Kenichi Handa  <handa@m17n.org>
2743         * fontset.c (Finternal_char_font): Return font-object instead of
2744         font-name.
2746         * composite.c (get_composition_id): Fix the width calculation for TAB.
2748 2008-06-29  Stefan Monnier  <monnier@iro.umontreal.ca>
2750         * indent.c (Fvertical_motion): Properly handle float column arg.
2752 2008-06-28  Jason Rumney  <jasonr@gnu.org>
2754         * w32term.c (pfnGetFontUnicodeRanges): Remove unused function pointer.
2755         (pfnSetLayeredWindowAttributes): New function pointer.
2756         (w32_initialize): Initialize it when supported.
2757         (x_set_frame_alpha): New function.
2759         * w32fns.c (Fx_create_frame): Initialize frame parameter `alpha'.
2760         (w32_frame_parm_handlers): Set alpha handler.
2762         * frame.c (x_set_alpha) [HAVE_NTGUI]: Call x_set_frame_alpha.
2764 2008-06-27  Jason Rumney  <jasonr@gnu.org>
2766         * w32fns.c (x_to_w32_font, w32_to_x_font, x_to_w32_weight)
2767         (w32_to_x_weight, w32_to_all_x_charsets): Remove obsolete functions.
2768         (w32_to_x_charset, x_to_w32_charset)
2769         (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
2770         (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
2771         (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
2772         (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
2773         (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
2774         (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
2775         (Qw32_charset_mac, Vw32_charset_info_alist): Move to w32font.c.
2776         (Qw32_charset_unicode): Remove.
2777         (syms_of_w32fns): Update for above changes.
2779         * w32font.c (w32_to_x_charset, x_to_w32_charset)
2780         (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
2781         (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
2782         (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
2783         (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
2784         (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
2785         (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
2786         (Qw32_charset_mac, Vw32_charset_info_alist): Move from w32fns.c.
2787         (syms_of_w32font): Update for above changes.
2789 2008-06-27  Dan Nicolaescu  <dann@ics.uci.edu>
2791         * s/usg5-4.h: Fix previous change: keep the correct branch of a
2792         removed #if.
2793         (USG_SHARED_LIBRARIES): Remove duplicate definition.
2795 2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
2796             Eli Zaretskii  <eliz@gnu.org>
2798         * makefile.w32-in (LOCAL_FLAGS):
2799         Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
2801         * sysdep.c (_spawnlp, _getpid):
2802         Declare with explicit _cdecl instead of _CRTAPI1.
2804         * editfns.c (Fget_internal_run_time):
2805         Check for WINDOWSNT with #ifdef, not #if.
2807 2008-06-26  Jason Rumney  <jasonr@gnu.org>
2809         * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros.
2811         * w32term.c (x_draw_glyph_string_foreground)
2812         (x_draw_composite_glyph_string_foreground): Sync with xterm.c.
2813         Use FONT_HANDLE macro.
2814         (x_draw_glyph_string): Use FONT_TEXTMETRIC macro.
2816         * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape)
2817         (uniscribe_encode_char): Use FONT_HANDLE macro.
2819         * w32font.c (Fx_select_font): Use FONT_HANDLE macro.
2820         (w32font_text_extents): Use precast w32_font.
2821         (w32font_close): Free cached metrics.
2822         (w32font_open_internal): Allocate space for name on stack.
2824 2008-06-26  Chong Yidong  <cyd@stupidchicken.com>
2826         * xdisp.c (extend_face_to_end_of_line): Fix last change.
2828 2008-06-26  Jason Rumney  <jasonr@gnu.org>
2830         * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro.
2831         (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants.
2833 2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
2835         * Makefile.in (SOME_MACHINE_OBJECTS): Remove w32bdf.o.
2837 2008-06-26  Jason Rumney  <jasonr@gnu.org>
2839         * w32bdf.c, w32bdf.h: Remove obsolete files.
2841         * makefile.w32-in: Remove refs to w32bdf.h and w32bdf.c.
2843         * w32gui.h: Don't include w32bdf.h.
2844         (XCharStruct, enum w32_char_font_type, W32FontStruct):
2845         Remove obsolete font support.
2847         * w32font.h (struct w32font_info): Remove compat_w32_font.
2848         Add hfont member.
2849         (FONT_COMPAT): Remove obsolete macro.
2851         * w32font.c (w32font_close): Remove compat code.  Delete hfont member.
2852         (w32font_encode_char, w32font_text_extents): Use new hfont member.
2853         (w32font_open_internal): Remove compat code.  Set new hfont member.
2854         (Fx_select_font): Use new hfont member.
2856         * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape)
2857         (uniscribe_encode_char): Use new hfont member.
2859         * w32term.c (x_draw_glyph_string_foreground)
2860         (x_draw_composite_glyph_string_foreground): Use new hfont member.
2861         (x_draw_glyph_string): Use metrics in w32font_info.
2863 2008-06-26  Kenichi Handa  <handa@m17n.org>
2865         * xdisp.c (handle_auto_composed_prop): Fix for the terminal case.
2867 2008-06-26  Dan Nicolaescu  <dann@ics.uci.edu>
2869         * unexnext.c:
2870         * m/ews4800.h:
2871         * m/hp9000s300.h:
2872         * m/ibm370aix.h:
2873         * m/mips-siemens.h:
2874         * m/ncr386.h:
2875         * m/next.h:
2876         * m/pmax.h:
2877         * m/powerpcle.h:
2878         * m/tandem-s2.h:
2879         * s/386bsd.h:
2880         * s/bsd386.h:
2881         * s/bsd4-1.h:
2882         * s/bsd4-2.h:
2883         * s/bsdos2-1.h:
2884         * s/bsdos2.h:
2885         * s/bsdos3.h:
2886         * s/bsdos4.h:
2887         * s/nextstep.h:
2888         * s/ultrix4-3.h:
2889         * s/usg5-0.h:
2890         * s/usg5-2-2.h:
2891         * s/usg5-2.h:
2892         * s/usg5-4-3.h:
2893         * s/ux4800.h:
2894         * s/uxpds.h:
2895         * s/uxpv.h: Remove support for obsolete systems.
2896         * s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
2897         Remove, insert contents in s/hpux-10.20.h.
2898         * s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
2899         Remove, insert contents in s/aix4-2.h.
2900         * s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
2901         * s/bsd4-3.h: Rename to ...
2902         * s/bsd-common.h: ... this.
2903         * data.c:
2904         * doc.c:
2905         * ecrt0.c:
2906         * emacs.c:
2907         * fileio.c:
2908         * floatfns.c:
2909         * keyboard.c:
2910         * mem-limits.h:
2911         * print.c:
2912         * process.c:
2913         * sysdep.c:
2914         * syssignal.h:
2915         * systty.h:
2916         * syswait.h:
2917         * term.c:
2918         * unexec.c:
2919         * unexelf.c:
2920         * unexhp9k800.c:
2921         * m/hp800.h:
2922         * m/ibmrs6000.h:
2923         * m/mips.h:
2924         * m/vax.h:
2925         * s/darwin.h:
2926         * s/freebsd.h:
2927         * s/gnu.h:
2928         * s/ms-w32.h:
2929         * s/msdos.h:
2930         * s/netbsd.h:
2931         * s/template.h: Remove references to obsolete variables.
2933         * Makefile.in: Add dependencies for all unexec files.
2934         (admindir): Remove unused variable.
2935         (UNEXEC_SRC): Remove references.
2937 2008-06-25  Chong Yidong  <cyd@stupidchicken.com>
2939         * xfns.c (x_default_font_parameter): If Xft is available, first
2940         try Monospace-12 for the default font.
2942 2008-06-25  Jason Rumney  <jasonr@gnu.org>
2944         * xdisp.c (get_glyph_face_and_encoding): Encode invalid glyphs as 0.
2946 2008-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
2948         * bytecode.c (Fbyte_code): Disable debugging code that doesn't compile.
2950         * buffer.c (syms_of_buffer): Remove default-word-wrap.
2952 2008-06-25  Juanma Barranquero  <lekktu@gmail.com>
2954         * xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>: Doc fix.
2955         <scroll-conservatively>: Fix typo in docstring.
2957         * xselect.c (Fx_send_client_event): Doc fix.
2959 2008-06-25  Kenichi Handa  <handa@m17n.org>
2961         * xfaces.c (Fx_list_fonts): Call Flist_fonts with the arg PREFER.
2963         * font.c (font_parse_fcname): Remove unused variables.
2964         (font_sort_entites): Delete the arg SPEC.  Caller changed.
2965         Fix for the case of ! best_only.
2966         (font_delete_unmatched): Check DPI and AVGWIDTH too.
2968         * lisp.h (Fstring_to_unibyte): EXFUN it.
2970         * character.h (str_to_unibyte): Extern it.
2972         * character.c (str_to_unibyte): New function.
2974         * fns.c (Fstring_to_unibyte): New function.
2975         (syms_of_fns): Defsubr it.
2977 2008-06-24  Kenichi Handa  <handa@m17n.org>
2979         * font.c (font_score): Even if the PIXEL_SIZE is the same, check
2980         DPI too.
2981         (font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.
2983 2008-06-24  Andreas Schwab  <schwab@suse.de>
2985         * Makefile.in (${lispsource}loaddefs.el): Rename from
2986         ../lisp/loaddefs.el.
2987         (bootstrap-clean): Do what distclean does but don't remove
2988         Makefile.
2989         (distclean): Depend on bootstrap-clean and remove Makefile.
2991 2008-06-24  Chong Yidong  <cyd@stupidchicken.com>
2993         * buffer.h (struct buffer): New member word_wrap.
2995         * buffer.c (syms_of_buffer): New variables default-word-wrap and
2996         word-wrap.
2997         (init_buffer_once): Initialize them.
2999         * dispextern.h (struct it): Replace bool truncate_lines_p with a
3000         line_wrap enum possessing three possible values.
3002         * termopts.h: Replace truncate_partial_width_windows with
3003         Vtruncate_partial_width_windows.
3005         * dispnew.c (direct_output_for_insert): Avoid direct output when
3006         inserting a space with word wrap on.
3008         * indent.c (compute_motion): Obey integer values of
3009         truncate-partial-width-windows.
3011         * xdisp.c (Vtruncate_partial_width_windows): New Lisp_Object,
3012         replacing truncate_partial_width_windows.
3013         (init_iterator): If Vtruncate_partial_width_windows is an integer,
3014         truncate only if the window width is below that integer.
3015         (start_display, resize_mini_window, produce_stretch_glyph)
3016         (display_string, move_it_in_display_line_to): Use line_wrap.
3017         (back_to_previous_visible_line_start, reseat_1): Reset
3018         string_from_display_prop_p.
3019         (display_line): Extend default face to end of line when wrapping.
3021 2008-06-24  Kim F. Storm  <storm@cua.dk>
3023         * xdisp.c (display_line, move_it_in_display_line_to): Add ability
3024         to wrap continued lines at word boundaries.
3026 2008-06-24  Jason Rumney  <jasonr@gnu.org>
3028         * font.c (Ffont_face_attributes): Multiply pixel size before point
3029         conversion to avoid multiplying rounding error.
3031 2008-06-23  Jason Rumney  <jasonr@gnu.org>
3033         * w32term.c (x_draw_glyph_string_background)
3034         (x_draw_glyph_string): Remove old bdf font code.
3036         * w32term.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE): Remove.
3038 2008-06-22  Kenichi Handa  <handa@m17n.org>
3040         * font.c (font_find_for_lface): Try the adstyle specified in
3041         the property of LFACE_FONT of LFACE (if any).
3043 2008-06-21  Seiji Zenitani  <zenitani@mac.com>
3044             Ryo Yoshitake  <ryo@shiftmode.net>
3046         * xterm.c (x_set_frame_alpha): Add x_catch_errors for bug#437.
3048 2008-06-22  Stefan Monnier  <monnier@iro.umontreal.ca>
3050         * Makefile.in (${lisp} ${SOME_MACHINE_LISP}, ../lisp/loaddefs.el):
3051         Use $(BOOTSTRAPEMACS) rather than witness-emacs.
3052         (bootstrap-emacs${EXEEXT}): Merge witness-emacs into it.
3053         (witness-emacs): Remove.
3054         (lisp, shortlisp): Move loaddefs.el earlier.
3055         (mostlyclean): Forget about witness-emacs.
3057 2008-06-22  Glenn Morris  <rgm@gnu.org>
3059         * Makefile.in (witness-emacs): Depend on temacs${EXEEXT}.
3060         (.SUFFIXES): Declare .el.elc as a suffix rule, for non-GNU makes.
3062 2008-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
3064         * Makefile.in (PRECOMP): Remove.
3065         (${lisp} ${SOME_MACHINE_LISP}): Remove pseudo dependency on PRECOMP.
3066         (witness-emacs): Run `compile-first'.
3067         (.el.elc): Use the new compile-onefile target.
3069 2008-06-21  Kenichi Handa  <handa@m17n.org>
3071         * xftfont.c (xftfont_open): Handle QCembolden only when
3072         FC_EMBOLDEN is defined.
3074 2008-06-21  Andreas Schwab  <schwab@suse.de>
3076         * Makefile.in (witness-emacs): Use ../lisp, not $(lispsource).
3077         (.el.elc): Likewise.
3079 2008-06-21  Miles Bader  <miles@gnu.org>
3081         * Makefile.in (../lisp/loaddefs.el): Build autoloads in the lisp
3082         build dir, not the lisp source dir.
3084 2008-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
3086         * Makefile.in (emacs${EXEEXT}): Link the new emacs to bootstrap-emacs.
3087         (bootstrapclean): Remove.
3088         (.el.elc): New rule.
3089         (PRECOMP): New var.
3090         (../lisp/subdirs.el): Remove.
3091         (bootstrap-emacs${EXEEXT}): Remove subdirs.el and charpro.el dependency.
3092         (witness-emacs): New target.
3093         (mostlyclean): Remove witness-emacs as well.
3094         (../lisp/loaddefs.el, ${lisp} ${SOME_MACHINE_LISP}):
3095         Add witness-emacs dependency.
3097 2008-06-20  Chong Yidong  <cyd@stupidchicken.com>
3099         * font.c (Ffont_face_attributes): Omit key-attribute pairs not
3100         defined by the font.
3102 2008-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
3104         * Makefile.in (emacs${EXEEXT}): Depend on the machine-specific files.
3105         (bootstrap-clean): New target that keeps TAGS around.
3106         (../lisp/subdirs.el, ../lisp/loaddefs.el): New targets.
3107         (bootstrap-emacs${EXEEXT}): Depend on subdirs.el.
3109 2008-06-20  Jason Rumney  <jasonr@gnu.org>
3111         * w32fns.c, w32term.c, w32term.h, w32gui.h [OLD_FONT]:
3112         Remove obsolete font code.
3114         * w32font.c (font_matches_spec): Use csb bitfield from font signature
3115         to determine language support.
3117 2008-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
3119         * sysdep.c (cfsetspeed): New fun extracted from the code.
3120         (cfmakeraw): Move before first use.
3122 2008-06-20  Angelo Graziosi  <angelo.graziosi@alice.it>  (tiny change)
3124         * sysdep.c (cfmakeraw): Provide fallback implementation.
3125         (serial_configure): Provide fallback implementation of cfsetspeed.
3127 2008-06-20  Kenichi Handa  <handa@m17n.org>
3129         * xftfont.c (xftfont_open): Add FOUNDRY, SPACING, DPI, SCALABLE to
3130         the pattern.
3132         * fontset.c (fontset_from_font): Copy font_spec before changing
3133         the elements.
3135         * xfns.c (x_default_font_parameter): Try "monospace-12" too.
3137 2008-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
3139         * w32fns.c, xfns.c (x_default_font_parameter): Only set `font-param'
3140         for explicit `font' parameters.
3142         * frame.c (x_set_font): Remove unexplained call to fix inf-recursion.
3144 2008-06-19  Kenichi Handa  <handa@m17n.org>
3146         * frame.c: Include <ctype.h>.
3147         (x_set_font_backend): Allow spacing characters in the X resource
3148         for FontBackend.
3150 2008-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
3152         * w32fns.c, xfns.c (Qfont_param): New var.
3153         (syms_of_w32fns): Initialize it.
3154         (x_default_font_parameter): Record explicit `font' into
3155         `font-parameter'.
3157 2008-06-18  Kenichi Handa  <handa@m17n.org>
3159         * font.c (font_parse_xlfd): Fix previous change.
3160         (font_parse_fcname): Don't use :fc-unknown-spec.
3161         (FRAME_X_DISPLAY_INFO): Be sure to have at least 1 pixel height.
3162         (Fcopy_font_spec): Preserve the order of elements in FONT_EXTRA.
3163         (font_add_log): Prepend the driver name to the resulting fonts.
3165         * ftfont.c (ftfont_pattern_entity): New arg extra.  Caller changed.
3166         (ftfont_spec_pattern): Don't check QCfc_unknown_spec and QCname.
3167         (ftfont_list) [FC_FONTFORMAT]: Include FC_FONTFORMAT in objset.
3169         * xftfont.c (QChinting , QCautohint, QChintstyle, QCrgba)
3170         (QCembolden): New variables.
3171         (syms_of_xftfont): DEFSYM them.
3172         (xftfont_open): Call XftFontMatch.  Don't trust the result of
3173         XftTextExtents8 if the pixel_size is less than 5.
3175 2008-06-18  Andreas Schwab  <schwab@suse.de>
3177         * font.c (Ffont_face_attributes): Only define if HAVE_WINDOW_SYSTEM.
3178         (syms_of_font): Only defsubr if HAVE_WINDOW_SYSTEM.
3180 2008-06-18  Jason Rumney  <jasonr@gnu.org>
3182         * w32font.c (w32font_list, w32font_match): Add logging.
3184         * w32uniscribe.c (uniscribe_list, uniscribe_match): Add logging.
3186 2008-06-17  Chong Yidong  <cyd@stupidchicken.com>
3188         * font.c (font_parse_fcname): Store divider characters for
3189         unknown-spec list.  For known key symbols, intern using correct
3190         symbol name.
3192 2008-06-17  Kenichi Handa  <handa@m17n.org>
3194         * xfaces.c (realize_default_face): If the frame is not on window
3195         system, set the fontset of face to nil.
3197 2008-06-17  Naohiro Aota  <nao.aota@gmail.com>  (tiny change)
3199         * fontset.c (fontset_pattern_regexp): Escape some reg-expr characters.
3201 2008-06-16  Juanma Barranquero  <lekktu@gmail.com>
3203         * dispextern.h (lookup_non_ascii_face, split_font_name_into_vector)
3204         (build_font_name_from_vector): Delete externs.
3206         * xfaces.c (struct font_name): Don't declare.
3208 2008-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
3210         * font.c (font_unparse_gtkname): Use EQ to compare Lisp_Objects.
3212 2008-06-16  Chong Yidong  <cyd@stupidchicken.com>
3214         * font.c (font_parse_fcname): Fix handling of unknown-spec string.
3216 2008-06-16  Juanma Barranquero  <lekktu@gmail.com>
3218         * font.c (Ffont_spec): Fix usage in docstring.
3219         (Ffont_face_attributes): Doc fix.
3221 2008-06-16  Andreas Schwab  <schwab@suse.de>
3223         * font.c (Ffont_face_attributes): Fix definition.
3225 2008-06-16  Jason Rumney  <jasonr@gnu.org>
3227         * font.h (font_style_symbolic_from_value): Remove.
3229         * font.c (font_style_symbolic_from_value): Remove.
3230         (font_style_symbolic): Revert to pre 2008-06-13 version.
3232         * w32font.c (w32_to_fc_weight): New function.
3233         (w32font_full_name, logfont_to_fcname): Use it.
3235 2008-06-16  Kenichi Handa  <handa@m17n.org>
3237         * font.c (font_check_object): Delete it.
3238         (font_clear_cache): Check if a font-object is alive.
3239         (font_open_entity): Likewise.  Set FONT_OBJLST_INDEX of a
3240         font-object to nil.
3241         (font_close_object): Don't check FONT_CLOSE_OBJECT.
3242         (font_at): Don't call font_check_object.
3243         (Ffont_get): Return a symbol for :weight, :slant, and :width.
3245 2008-06-16  Katsumi Yamaoka  <yamaoka@jpl.org>
3247         * puresize.h (BASE_PURESIZE): Increase to 1230000.
3249 2008-06-16  Chong Yidong  <cyd@stupidchicken.com>
3251         * font.c (font_parse_fcname): Correctly parse KEY=VAL values.
3253 2008-06-15  Chong Yidong  <cyd@stupidchicken.com>
3255         * font.c (font_parse_fcname): Only one decimal point.
3256         (font_unparse_fcname): Handle data in family and foundry indices
3257         as symbols, not strings.
3258         (font_unparse_gtkname, Ffont_face_attributes): New functions.
3260         * xfns.c (Fx_select_font): Give GTK font dialog the default font name.
3262         * font.h (font_unparse_gtkname): Add prototype.
3264 2008-06-15  Naohiro Aota  <nao.aota@gmail.com>  (tiny change)
3266         * fontset.c (fontset_pattern_regexp): Escape `+' characters in pattern.
3268 2008-06-15  Andreas Schwab  <schwab@suse.de>
3270         * font.c (font_update_drivers): Fix crash when no drivers match.
3272 2008-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
3274         * xfns.c (Fx_create_frame): internal-border-width default to 0 for Gtk.
3275         * gtkutil.c (xg_create_frame_widgets): Don't set internal_border_width.
3277 2008-06-14  Stefan Monnier  <monnier@iro.umontreal.ca>
3279         * xdisp.c (syms_of_xdisp): Default underline-minimum-offset to 1.
3281 2008-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
3283         * process.c (Fserial_process_configure, Fprocess_send_eof):
3284         Use EQ to compare Lisp_Objects.
3286 2008-06-13  Jason Rumney  <jasonr@gnu.org>
3288         * w32fns.c (Fw32_select_font): Remove old font API function.
3290         * w32font.c (logfont_to_fcname): New function.
3291         (Fx_select_font): New font dialog function compatible with
3292         GTK/fontconfig version.
3294         * font.c (font_style_symbolic_from_value): New function.
3295         (font_style_symbolic): Use it.
3297         * font.h (font_style_symbolic_from_value): Declare new function.
3299 2008-06-13  Juanma Barranquero  <lekktu@gmail.com>
3301         * font.c (syms_of_font) <font-weight-table, font-slant-table>:
3302         <font-width-table>: Fix typos in docstrings.
3304 2008-06-13  Daniel Engeler  <engeler@gmail.com>
3306         These changes add serial port access.
3307         * process.c: Add HAVE_SERIAL.
3308         (Fdelete_process, Fprocess_status, Fset_process_buffer)
3309         (Fset_process_filter, Fset_process_sentinel, Fprocess_contact)
3310         (list_processes_1, select_wrapper, Fstop_process)
3311         (Fcontinue_process, Fprocess_send_eof, kill_buffer_processes)
3312         (status_notify): Modify to handle serial processes.
3313         [HAVE_SERIAL] (Fserial_process_configure)
3314         [HAVE_SERIAL] (make_serial_process_unwind, Fmake_serial_process):
3315         New functions.
3316         * process.h (struct Lisp_Process): Add `type'.
3317         * sysdep.c [HAVE_TERMIOS] (serial_open, serial_configure):
3318         New functions.
3319         * w32.c (_sys_read_ahead, sys_read, sys_write): Modify to handle
3320         serial ports.
3321         (serial_open, serial_configure) New functions.
3322         * w32.h: Add FILE_SERIAL.
3323         (struct _child_process): Add ovl_read, ovl_write.
3325 2008-06-13  Kenichi Handa  <handa@m17n.org>
3327         * dispextern.h (enum lface_attribute_index): New member
3328         LFACE_FOUNDRY_INDEX.
3330         * font.c (font_score): Delete arg alternate_families.  Check only
3331         weight, slant, width, and size.  Ignore the difference of alias
3332         style symbols.
3333         (font_sort_entites): Adjust for the above change.  Reflect the
3334         order of font-driver to scores.
3335         (font_list_entities): Don't check alternate_familes here.
3336         (font_clear_prop): Handle foundry.
3337         (font_update_lface): Don't parse "foundry-family" form here.
3338         Handle FONT_FOUNDRY_INDEX.
3339         (font_find_for_lface): Likewise.  Handle alternate families here.
3340         If registry is nil, try iso8859-1 and ascii-0.
3341         (font_open_for_lface): Pay attention to size in ENTITY.
3342         (font_open_by_name): Simplify by calling font_load_for_lface.
3343         (free_font_driver_list): Delete it.
3344         (font_update_drivers): Preserve the order of backends.
3345         (syms_of_font): Setting of sort_shift_bits adjusted for the change
3346         of font_score and font_sort_entites.
3347         (font_update_sort_order): Likewise.
3349         * xfaces.c (LFACE_FOUNDRY): New macro.
3350         (check_lface_attrs): Check foundry.
3351         (set_lface_from_font): Don't parse "FOUNDRY-FAMILY" form.
3352         (merge_face_vectors): Check foundry.
3353         (merge_face_ref): Likewise.
3354         (Finternal_set_lisp_face_attribute): Likewise.
3355         (x_update_menu_appearance): Likewise.
3356         (Finternal_get_lisp_face_attribute): Likewise.
3357         (lface_hash): Likewise.
3358         (lface_same_font_attributes_p): Likewise.
3359         (x_supports_face_attributes_p): Likewise.
3360         (tty_supports_face_attributes_p): Likewise.
3361         (Finternal_set_alternative_font_family_alist): Intern strings.
3362         (Finternal_set_alternative_font_registry_alist): Downcase strings.
3363         (realize_default_face): Set LFACE_FOUNDRY (lface).
3365         * xfns.c (Fx_create_frame, x_create_tip_frame): Register X
3366         font-driver at first.
3368         * ftfont.c (ftfont_font_format) [! FC_FONTFORMAT]: Declare "int len;".
3370 2008-06-12  Emanuele Giaquinta  <emanuele.giaquinta@gmail.com>  (tiny change)
3372         * lread.c (Fload): Use xfree, not free on saved_doc_string.
3374 2008-06-12  Jim Meyering  <meyering@redhat.com>
3376         Make unexec_free handle NULL the same way free does.
3377         * unexmacosx.c (unexec_free): Ignore a NULL argument.
3379 2008-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
3381         * character.h (CHAR_TO_BYTE_SAFE): New macro.
3382         * character.c (Fmultibyte_char_to_unibyte): Obey the docstring.
3383         * regex.c (RE_CHAR_TO_UNIBYTE): Use the new macro.
3384         (WEAK_ALIAS): Simplify.
3385         * syntax.c (skip_chars): Don't mark non-byte chars in the fastmap
3386         when searching a unibyte buffer.
3388 2008-06-12  Chong Yidong  <cyd@stupidchicken.com>
3390         * xfns.c (Fx_select_font): Rename from x-font-dialog.
3392 2008-06-12  Juanma Barranquero  <lekktu@gmail.com>
3394         * w32font.c: Include ctype.h.
3396 2008-06-11  Jason Rumney  <jasonr@gnu.org>
3398         * w32font.c (w32font_encode_char): Detect missing glyphs that are
3399         misreported as space.
3400         (add_font_entity_to_list): Support unicode-bmp and unicode-sip
3401         as aliases for registry iso10646-1.
3403 2008-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
3405         * buffer.c (clone_per_buffer_values): Skip `name'.
3407 2008-06-11  Chong Yidong  <cyd@stupidchicken.com>
3409         * font.c (font_parse_fcname): Fix last change; accept decimal
3410         points in font size.
3412 2008-06-10  Jason Rumney  <jasonr@gnu.org>
3414         * w32uniscribe.c (add_opentype_font_name_to_list):
3415         Skip non unicode fonts.
3417 2008-06-10  Chong Yidong  <cyd@stupidchicken.com>
3419         * xfns.c (Fx_font_dialog): New function.
3421         * gtkutil.c (xg_dialog_response_cb): Rename from
3422         xg_file_response_callback.
3423         (pop_down_dialog): Rename from pop_down_file_dialog.
3424         (xg_get_file_name): Callers changed.
3425         (xg_get_font_name): New function.
3427         * gtkutil.h (xg_get_font_name): Insert prototype.
3429 2008-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
3431         * xdisp.c (underline_minimum_offset): Rename from xterm.c's
3432         x_underline_minimum_display_offset.
3433         (syms_of_xdisp): Declare it here rather than in xterm.c.
3434         * dispextern.h (underline_minimum_offset): Declare it.
3435         * w32term.c (x_draw_glyph_string): Use it.
3436         * xterm.c (x_underline_minimum_display_offset): Move to xdisp.c.
3437         (syms_of_xterm): Don't declare it any more.
3438         (x_draw_glyph_string): Adjust to the new name.
3440 2008-06-10  David De La Harpe Golden  <david@harpegolden.net>  (tiny change)
3442         * xterm.c (x_underline_minimum_display_offset): New var.
3443         (x_draw_glyph_string): Use it.
3444         (syms_of_xterm): Declare it.
3446 2008-06-10  Chong Yidong  <cyd@stupidchicken.com>
3448         * font.c (font_parse_fcname): Accept GTK-style font names too.
3450 2008-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
3452         * dired.c (file_name_completion): Don't return t if the match is exact
3453         but with different capitalization.
3454         * minibuf.c (Ftry_completion): Simplify.
3456         * window.c (Vwindow_point_insertion_type): New var.
3457         (set_window_buffer): Use it.
3458         (syms_of_window): Init and export it to Lisp.
3460 2008-06-10  Kenichi Handa  <handa@m17n.org>
3462         * font.h (font_intern_prop): Prototype adjusted.
3464         * font.c (font_intern_prop): New arg force_symbol.
3465         (font_parse_xlfd, font_parse_fcname, font_parse_family_registry):
3466         Adjust for the change of font_intern_prop.
3468         * ftfont.c (ftfont_pattern_entity):
3469         * w32font.c (add_font_name_to_list, w32_enumfont_pattern_entity)
3470         (w32_registry):
3471         * w32uniscribe.c (add_opentype_font_name_to_list): Adjust for
3472         the change of font_intern_prop.
3474 2008-06-09  Juanma Barranquero  <lekktu@gmail.com>
3476         * w32menu.c (digest_single_submenu): Declare extern.
3478 2008-06-09  Jason Rumney  <jasonr@gnu.org>
3480         * w32term.c (x_make_frame_visible): Use alternate restore flags.
3482         * w32menu.c (Fx_popup_menu): Unwind protect while building menu.
3483         (parse_single_submenu): Remove.
3484         (digest_single_submenu): Remove.
3485         (syms_of_w32menu): Don't initialise variables that have moved
3486         to menu.c.
3487         (set_frame_menubar): Sync with version in xmenu.c.
3488         (w32_menu_show): Sync with xmenu_show in xmenu.c.
3490         * menu.c (single_keymap_panes, push_menu_pane, push_menu_item):
3491         Make static again.
3493 2008-06-09  Jason Rumney  <jasonr@gnu.org>
3495         Changes to w32 files related to the move of common menu code
3496         to menu.c on 2008-06-08 by Chong Yidong.
3498         * menu.c [HAVE_NTGUI]: Include w32term.h, move widget related
3499         defs to w32gui.h.
3500         (single_keymap_panes, push_menu_item, push_menu_pane):
3501         Make globally visible.
3503         * w32menu.c (enum button_type, widget_value, local_heap, local_alloc)
3504         (local_free, malloc_widget_value, free_widget_value)
3505         (MENU_ITEMS_ITEM_NAME, MENU_ITEMS_ITEM_ENABLE, MENU_ITEMS_ITEM_VALUE)
3506         (MENU_ITEMS_ITEM_EQUIV_KEY, MENU_ITEMS_ITEM_DEFINITION)
3507         (MENU_ITEMS_ITEM_TYPE, MENU_ITEMS_ITEM_SELECTED, MENU_ITEMS_ITEM_HELP)
3508         (MENU_ITEMS_ITEM_LENGTH, enum menu_item_idx): Remove defs.
3509         (menu_items, menu_items_allocated, menu_items_used)
3510         (menu_items_n_panes, menu_items_submenu_depth): Remove global vars.
3511         (init_menu_items, finish_menu_items, discard_menu_items)
3512         (grow_menu_items, push_submenu_start, push_submenu_end)
3513         (push_left_right_boundary, push_menu_pane, push_menu_item)
3514         (keymap_panes, single_keymap_panes, list_of_panes, list_of_items)
3515         (free_menubar_widget_tree_value, parse_single_submenu)
3516         (update_submenu_strings): Remove functions.
3517         (xmalloc_widget_value): Remove and declare extern.
3519         * makefile.w32-in ($(SRC)/menu.$(O)): New target.
3520         (OBJ1): Build it.
3522         * w32gui.h (widget_value, XtPointer, Boolean, enum button_type)
3523         (local_heap, local_alloc, local_free, malloc_widget_value)
3524         (free_widget_value): Define here.
3526 2008-06-09  Kenichi Handa  <handa@m17n.org>
3528         * font.h (Qascii_0): Extern it.
3530         * font.c (Qascii_0): New variable.
3531         (syms_of_font): DEFSYM it.
3532         (font_open_by_name): If the registry "iso8859-1" fails, try also
3533         "ascii-0".
3535         * ftfont.c (ftfont_spec_pattern): Accept the registry `ascii-0'.
3537 2008-06-08  Kenichi Handa  <handa@m17n.org>
3539         * .gdbinit (xfont): New command.
3541 2008-06-08  Andreas Schwab  <schwab@suse.de>
3543         * menu.c [HAVE_X_WINDOWS]: Include "xterm.h".
3544         * Makefile.in (menu.o): Update dependencies.
3546         * Makefile.in (obj): Always add menu.o.
3547         * emacs.c (main): Always call syms_of_menu.
3548         * keyboard.h: Remove extra #ifdef HAVE_X_WINDOW.
3550 2008-06-08  Chong Yidong  <cyd@stupidchicken.com>
3552         * Makefile.in: Compile menu.c.
3554         * lisp.h: Declare syms_of_menu.
3556         * emacs.c (main): Call syms_of_menu.
3558         * keyboard.h: Relocate platform-independent menu definitions from
3559         xmenu.c.
3561         * menu.c: New file.  Relocate platform-independent menu
3562         definitions from xmenu.c.  Suggested by Adrian Robert.
3564         * xmenu.c: Remove platform-independent menu definitions.
3565         (menu_items menu_items_inuse, menu_items_allocated)
3566         (menu_items_used, menu_items_n_panes)
3567         (menu_items_submenu_depth): Move to keyboard.h.
3568         (init_menu_items, finish_menu_items, unuse_menu_items)
3569         (discard_menu_items, restore_menu_items, save_menu_items)
3570         (grow_menu_items, push_submenu_start, push_submenu_end)
3571         (push_left_right_boundary, push_menu_pane, push_menu_item)
3572         (keymap_panes, single_keymap_panes, single_menu_item)
3573         (list_of_panes, list_of_items, find_and_call_menu_selection)
3574         (xmalloc_widget_value, free_menubar_widget_value_tree)
3575         (parse_single_submenu, digest_single_submenu)
3576         (update_submenu_strings): Move to menu.c.
3578 2008-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
3580         * dispnew.c (Flast_nonminibuf_frame): Handle the NULL case.
3582 2008-06-06  Miles Bader  <miles@gnu.org>
3584         * xdisp.c (x_produce_glyphs): Calculate tab width based on current
3585         face, not frame default.
3587 2008-06-05  Martin Rudalics  <rudalics@gmx.at>
3589         * window.c (pop_up_windows, pop_up_frames)
3590         (display_buffer_reuse_frames, Vpop_up_frame_function)
3591         (Vdisplay_buffer_function, Veven_window_heights)
3592         (Vspecial_display_buffer_names, Vspecial_display_regexps)
3593         (Vspecial_display_function, Vsame_window_buffer_names)
3594         (Vsame_window_regexps, split_height_threshold)
3595         (Vsplit_window_preferred_function): Move those vars to window.el.
3596         (display_buffer_1, Fspecial_display_p, Fsame_window_p)
3597         (Fdisplay_buffer): Move those functions to window.el.
3598         (syms_of_window): Remove corresponding declarations.
3599         (display_buffer): New function.
3600         (temp_output_buffer_show, Fother_window_for_scrolling): Use it.
3601         * dispnew.c (Flast_nonminibuf_frame): New function.
3602         * buffer.c (Fpop_to_buffer): Move to window.el.
3604 2008-06-05  Stefan Monnier  <monnier@iro.umontreal.ca>
3606         * data.c (set_internal): Fix up call to let_shadows_buffer_binding_p.
3608 2008-06-05  Kenichi Handa  <handa@m17n.org>
3610         * coding.c (detect_coding): Fix previous change.
3611         (detect_coding_system): Likewise.
3613 2008-06-05  Stefan Monnier  <monnier@iro.umontreal.ca>
3615         * character.h (MAKE_CHAR_MULTIBYTE): Check the arg is a (uni)byte.
3617         * keymap.c (Vminibuffer_local_filename_must_match_map):
3618         Rename from Vminibuffer_local_must_match_filename_map.
3619         (syms_of_keymap):
3620         * minibuf.c (Fcompleting_read): Adjust accordingly.
3621         * commands.h: Rename declaration as well.
3623 2008-06-05  Kenichi Handa  <handa@m17n.org>
3625         * font.c (Ffont_spec): Don't use font_parse_family_registry for
3626         family name.
3627         (Ffont_put): Likewise.
3629         * fontset.c (fontset_find_font): Call font_open_for_lface with the
3630         current font-spec.
3632         * xfont.c (xfont_list): Don't set registry to iso8859-1 even if it
3633         is unspecified.
3635         * xfaces.c (realize_x_face): If the font-related face attributes
3636         are the same as those of default face, realize a new fontset from
3637         default->fontset.
3638         (Fx_family_fonts): Use font_parse_family_registry instead of Ffont_put.
3640 2008-06-05  Stefan Monnier  <monnier@iro.umontreal.ca>
3642         * xdisp.c (move_it_in_display_line_to): Improve the type of its args.
3643         (move_it_in_display_line): New wrapper.
3645         * window.c (window_scroll_pixel_based_preserve_x)
3646         (window_scroll_preserve_hpos, window_scroll_preserve_vpos): New vars.
3647         (window_scroll_pixel_based, window_scroll_line_based):
3648         Use them to preserve column positions.
3649         (syms_of_window): Initialize them.
3651         * indent.c (Fvertical_motion): Extend first arg to allow passing an
3652         (HPOS . VPOS) pair.
3654         * dispextern.h (move_it_in_display_line): Declare.
3656 2008-06-05  Juanma Barranquero  <lekktu@gmail.com>
3658         * window.c (Fwindow_parameter): Return VALUE, not (PARAMETER . VALUE).
3659         (Fwindow_parameters): Return copy of parameter alist.  Doc fix.
3660         (Fset_window_parameter): Return VALUE, not parameter alist.  Doc fix.
3662 2008-06-04  Juanma Barranquero  <lekktu@gmail.com>
3664         * window.c (Fset_window_parameter): Doc fix.
3665         (Fwindow_parameters, Fwindow_parameter): Remove redundant check.
3667 2008-06-04  Joakim Verona  <joakim@verona.se>
3669         * window.h (struct window): Add new member window_parameters.
3671         * window.c (Fwindow_parameters, Fwindow_parameter)
3672         (Fset_window_parameter): New defuns.
3673         (syms_of_window): Defsubr the new defuns.
3674         (make_window): Initialize window_parameters to nil.
3676 2008-06-04  John Paul Wallington  <jpw@pobox.com>
3678         * eval.c (Fdefmacro): Doc fix.
3680 2008-06-04  Kenichi Handa  <handa@m17n.org>
3682         * coding.c (detect_coding): Fix handling of coding->head_ascii.
3683         Be sure to call setup_coding_system when we find a proper coding system.
3684         (detect_coding_system): Fix handling of coding->head_ascii.
3686 2008-06-03  Andreas Schwab  <schwab@suse.de>
3688         * font.c (font_prop_validate_spacing): Fix last change.
3690 2008-06-03  Kenichi Handa  <handa@m17n.org>
3692         * font.c (font_prop_validate_spacing): Handle uppercase symbols.
3693         (font_parse_fcname): Fix handling of unknown key.
3695         * xfont.c (xfont_list): Try an alias.
3697         * charset.c (char_charset): Return NULL if the arg charset_list is
3698         specified and C doesn't belong to any of them.
3700 2008-06-02  Chip Coldwell  <coldwell@redhat.com>
3702         * font.c (font_pixel_size): Don't take cdr of an integer.
3704 2008-06-02  Jim Meyering  <meyering@redhat.com>
3706         Make "xfree (NULL)" a no-op; remove useless if-before-xfree.
3707         * alloc.c (xfree): Return right away for a NULL arg.
3708         * lread.c (nosuffix): Remove now-useless if-before-xfree tests.
3709         * gtkutil.c (xg_gtk_scroll_destroy): Likewise.
3710         * mac.c (create_apple_event_from_event_ref): Likewise.
3711         (create_apple_event_from_drag_ref, cfstring_create_normalized):
3712         Likewise.
3713         * doprnt.c (doprnt1): Likewise.
3714         * frame.c (frame): Likewise.
3715         * keyboard.c (wipe_kboard): Likewise.
3716         * macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap)
3717         (init_font_name_table, mac_unload_font, x_delete_display): Likewise.
3718         * term.c (tty_default_color_capabilities, maybe_fatal)
3719         (delete_tty): Likewise.
3720         * w16select.c (string): Likewise.
3721         * w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise.
3722         * w32bdf.c (w32_free_bdf_font): Likewise.
3723         * w32fns.c (w32_unload_font): Likewise.
3724         * w32font.c (w32font_close): Likewise.
3725         * window.c (size_window): Likewise.
3726         * xselect.c (receive_incremental_selection): Likewise.
3727         * xterm.c (x_free_frame_resources, x_delete_display): Likewise.
3728         * mactoolbox.c (create_apple_event_from_drag_ref): Likewise.
3729         * w32.c (stat): Likewise.
3731         Remove useless if-before-free tests.
3732         * editfns.c (Fset_time_zone_rule): Likewise.
3733         * lread.c (nosuffix): Likewise.
3734         * ralloc.c (get_bloc): Likewise.
3735         * regex.c (reg_free): Likewise.
3736         * xftfont.c (xftfont_open, xftfont_close): Likewise.
3737         * xrdb.c (get_user_app, get_environ_db, x_load_resources): Likewise.
3738         * xsmfns.c (smc_save_yourself_CB): Likewise.
3740 2008-06-02  Kenichi Handa  <handa@m17n.org>
3742         * font.c (font_find_for_lface): Handle float font size.
3743         (font_open_for_lface): Likewise.
3745         * xfaces.c (x_supports_face_attributes_p): Check face->font before
3746         comparing the properties.
3748 2008-06-01  Jason Rumney  <jasonr@gnu.org>
3750         * w32font.c (w32_enumfont_pattern_entity): Use requested registry.
3751         Treat iso10646-1 and Windows DEFAULT_CHARSET specially.
3752         Duplicate iso8859-1 fonts as iso10646-1 if no registry specified.
3753         Don't add empty script list.
3754         (w32_registry): Only map DEFAULT_CHARSET to iso10646-1 here.
3756 2008-06-01  Dan Nicolaescu  <dann@ics.uci.edu>
3758         * Makefile.in (dot, dotdot): Remove, update users.
3759         ".." has been used elsewhere in the file for a long time.
3760         (LIBXT_STATIC): Remove conditional based on unused variable.
3762 2008-06-01  Miles Bader  <miles@gnu.org>
3764         * xfaces.c (Vface_remapping_alist): New variable.
3765         (syms_of_xfaces): Initialize it.
3766         (enum named_merge_point_kind): New type.
3767         (struct named_merge_point): Add `named_merge_point_kind' field.
3768         (push_named_merge_point): Make cycle detection respect different
3769         named-merge-point kinds.
3770         (lface_from_face_name_no_resolve): Rename from `lface_from_face_name'.
3771         Remove face-name alias resolution.
3772         (lface_from_face_name): New definition using
3773         `lface_from_face_name_no_resolve'.
3774         (get_lface_attributes_no_remap): Rename from `get_lface_attributes'.
3775         Call lface_from_face_name_no_resolve instead of lface_from_face_name.
3776         (get_lface_attributes): New definition that layers face-remapping on
3777         top of get_lface_attributes_no_remap.  New arg `named_merge_points'.
3778         (lookup_basic_face): New function.
3779         (lookup_derived_face): Pass new last arg to `get_lface_attributes'.
3780         (realize_named_face): Call `get_lface_attributes_no_remap' instead of
3781         `get_lface_attributes'.
3782         (face_at_buffer_position): Use `lookup_basic_face' to lookup
3783         DEFAULT_FACE_ID if necessary.  When optimizing the default-face case,
3784         return default_face's face-id instead of the constant DEFAULT_FACE_ID.
3786         * xdisp.c (init_iterator): Pass base_face_id through
3787         `lookup_basic_face' when we actually use it as a face-id.
3788         (handle_single_display_prop): Use `lookup_basic_face' to lookup
3789         DEFAULT_FACE_ID.
3791         * fontset.c (Finternal_char_font): Use `lookup_basic_face' to
3792         lookup the initial face-id.
3794         * dispextern.h (lookup_basic_face, Vface_remapping_alist): New decls.
3796 2008-06-01  Juanma Barranquero  <lekktu@gmail.com>
3798         * textprop.c (syms_of_textprop) <text-property-default-nonsticky>:
3799         (Fremove_text_properties): Fix typos in docstrings.
3801 2008-05-31  Kenichi Handa  <handa@m17n.org>
3803         * font.c (font_list_entities): Fix the car part of data to be
3804         stored in the cache.
3806         * ftfont.c (ftfont_font_format): Don't use strcasestr.
3808 2008-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
3810         * chartab.c (Foptimize_char_table, optimize_sub_char_table):
3811         Add a `test' argument so another predicate than `equal' can be used.
3812         (map_sub_char_table): Use `eq' rather than `equal' to merge ranges.
3813         (map_char_table): Remove unused vars `c' and `i'.
3814         * lisp.h (Foptimize_char_table): Adjust declaration.
3815         * charset.c (Fclear_charset_maps): Adjust call to Foptimize_char_table.
3817 2008-05-30  Kenichi Handa  <handa@m17n.org>
3819         * font.c (Ffont_info): Define only if HAVE_WINDOW_SYSTEM is defined.
3820         (syms_of_font): Defsubr Sfont_info only if HAVE_WINDOW_SYSTEM is
3821         defined.
3823 2008-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
3825         * data.c (Fmake_variable_buffer_local, Fmake_local_variable)
3826         (Fmake_variable_frame_local): Disallow mixing buffer-local and
3827         frame-local settings for the same variable.
3829 2008-05-30  Kenichi Handa  <handa@m17n.org>
3831         * fontset.c (Ffont_info): Move to font.c.
3832         (syms_of_fontset): Delete defsubr of Sfont_info.
3834         * font.c (font_style_to_value, font_score): Delete casting of the
3835         args to xstcasecmp.
3836         (register_font_driver): Increment num_font_drivers only when
3837         registering the driver globally.
3838         (Ffont_info): Move from fontset.c.  Handle a font object too.
3839         (syms_of_font): Defsubr Sfont_info.
3841 2008-05-29  Kenichi Handa  <handa@m17n.org>
3843         * coding.h (enum define_coding_utf8_arg_index): New enum.
3844         (enum coding_attr_index): Change coding_attr_utf_16_bom to
3845         coding_attr_utf_bom.
3846         (enum utf_bom_type): Rename from utf_16_bom_type.
3847         (struct utf_16_spec): Adjust for the above change.
3848         (struct coding_system): Add utf_8_bom in `spec' union.
3850         * coding.c (CODING_UTF_8_BOM): New macro.
3851         (enum coding_category): Delete coding_category_utf_8, add
3852         coding_category_utf_8_auto, coding_category_utf_8_nosig, and
3853         coding_category_utf_8_sig.
3854         (CATEGORY_MASK_UTF_8): Delete it.
3855         (CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG)
3856         (CATEGORY_MASK_UTF_8_SIG): New macros.
3857         (CATEGORY_MASK_ANY): Delete CATEGORY_MASK_UTF_8, add
3858         CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG, and
3859         CATEGORY_MASK_UTF_8_SIG.
3860         (CATEGORY_MASK_UTF_8): New macro.
3861         (UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros.
3862         (detect_coding_utf_8): Check BOM.
3863         (decode_coding_utf_8, encode_coding_utf_8): Handle BOM.
3864         (decode_coding_utf_16): Adjust for the change of enum utf_bom_type.
3865         (encode_coding_utf_16): Likewise.
3866         (setup_coding_system): Likewise.  Set CODING_UTF_8_BOM (coding).
3867         (detect_coding, detect_coding_system): Handle utf-8-auto.
3868         (Fdefine_coding_system_internal): Handle `bom' property for utf-8.
3869         (syms_of_coding): Fix setting up of Vcoding_category_table.
3871 2008-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
3873         * process.c (Faccept_process_output): If `millisec' is non-nil,
3874         `seconds' default to 0.
3875         (wait_reading_process_output): Also return non-nil if we read output
3876         from a non-running process.
3878 2008-05-29  Jason Rumney  <jasonr@gnu.org>
3880         * w32font.c (w32font_open_internal): Prefer truetype fonts unless
3881         `raster' specified.
3882         (add_font_entity_to_list): Allow non-opentype truetype fonts back
3883         in the uniscribe backend, but disallow any font that has no
3884         unicode subrange support.
3886 2008-05-29  Juanma Barranquero  <lekktu@gmail.com>
3888         * xfaces.c (Fx_list_fonts, Finternal_copy_lisp_face):
3889         Fix typos in docstrings.
3891 2008-05-29  Kenichi Handa  <handa@m17n.org>
3893         * xfaces.c (Fx_list_fonts): Make it return a list of font names.
3894         (Fx_family_fonts): Set frame correctly.
3896 2008-05-28  Jason Rumney  <jasonr@gnu.org>
3898         * w32term.c (x_draw_glyph_string): Use clipmask if specified.
3900 2008-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
3902         * fileio.c (Fwrite_region): Delay the defaulting to beg&z to after
3903         calling build_annotations.
3905 2008-05-28  Juanma Barranquero  <lekktu@gmail.com>
3907         * coding.c (Fdecode_coding_region, Fencode_coding_region)
3908         (Fencode_coding_string):
3909         (syms_of_coding) <coding-system-for-read, coding-system-for-write>:
3910         <latin-extra-code-table>: Fix typos in docstrings.
3911         (syms_of_coding) <coding-system-alist>: Doc fix.
3912         (syms_of_coding) <translation-table-for-input>: Reflow docstring.
3914 2008-05-28  Kenichi Handa  <handa@m17n.org>
3916         * fontset.c (Ffont_info): Don't call font_close_object.
3918         * font.c (font_parse_family_registry): Use Ffont_put to validate
3919         foundry and family.
3920         (font_delete_unmatched): Don't check spacing.
3921         (font_list_entities): Add spacing to the spec to list fonts.
3923         * ftfont.c (ftfont_spec_pattern): Don't set FC_SPACING to pattern.
3924         (ftfont_list): Check spacing here.  Don't include FC_CHARSET in objset.
3926         * coding.c (encode_coding_raw_text): Fix previous change.
3927         (encode_coding_object): When the dst_object is a buffer and is
3928         different from src_object, move gap to PT.
3930 2008-05-27  Chong Yidong  <cyd@stupidchicken.com>
3932         * xterm.c (x_draw_glyph_string): If a clipmask is specified, use it.
3934 2008-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
3936         * coding.c (encode_coding_raw_text): Set coding->produced_char for
3937         all branches.  Compute it differently.
3939         * xdisp.c [!HAVE_WINDOW_SYSTEM]: Include font.h for --without-x.
3941 2008-05-27  Juanma Barranquero  <lekktu@gmail.com>
3943         * w32font.c (compute_metrics): Rewrite an "else { if () ... else ... }"
3944         into "else if () ... else ...".
3946 2008-05-27  Jason Rumney  <jasonr@gnu.org>
3948         * w32font.c (w32font_open_internal): Determine if glyph indices
3949         are likely to work here.
3951 2008-05-27  Chong Yidong  <cyd@stupidchicken.com>
3953         * xdisp.c (draw_glyphs): If mouse-highlighting is on, attempt to
3954         draw overlap glyphs with appropriate highlighting.
3956 2008-05-27  Kenichi Handa  <handa@m17n.org>
3958         * xfont.c (xfont_open): Fix calculation of font->average_width.
3960 2008-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
3962         * casefiddle.c (casify_object): Try to guess better whether the
3963         argument is a byte or a char.
3965 2008-05-26  Andreas Schwab  <schwab@suse.de>
3967         * xselect.c (x_reply_selection_request): Properly handle format == 32.
3968         Always send multiples of format size.
3970         * xterm.c (x_set_frame_alpha): Fix type mismatch.
3972 2008-05-26  Jason Rumney  <jasonr@gnu.org>
3974         * w32font.c (w32font_text_extents): Zero whole metrics struct first.
3975         (compute_metrics): Don't set failure if we just cleared the cache.
3976         (w32_weight_table): Remove unused variable.
3977         (w32_enumfont_pattern_entity): Use FONT_SPACING_CHARCELL for
3978         backwards compatibility.
3980 2008-05-25  Kenichi Handa  <handa@m17n.org>
3982         * w32term.c (x_draw_glyph_string):
3983         * xterm.c (x_draw_glyph_string): Fix calculation of underline position.
3985         * xfaces.c: Delete unused function prototypes.
3986         (xstrlwr, font_frame): Delete them.
3987         (clear_face_cache): Delete unused variable.
3989         * xftfont.c (xftfont_open): Delete unused variable.
3990         If underline_thickness is not 1, adjust underline_position.
3992         * ftxfont.c (ftxfont_open): Delete unused variable.
3994         * fontset.c (face_for_char): Optimize for the case of no charset
3995         property.
3997         * font.c (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE)
3998         (check_gstring, check_otf_features, otf_list, otf_tag_symbol)
3999         (otf_open, font_otf_capability, generate_otf_features)
4000         (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
4001         Comment out by surrounding "#if 0" and "#endif" for the moment.
4002         (Ffont_drive_otf, Ffont_otf_alternates): Likewise.
4003         (syms_of_font): Codes for accessing above commented out.
4005 2008-05-24  Eli Zaretskii  <eliz@gnu.org>
4007         * w32proc.c: Include dispextern.h.
4009         * w32.c: Include dispextern.h.
4011 2008-05-23  Juanma Barranquero  <lekktu@gmail.com>
4013         * charset.c (Fencode_char, Fsplit_char): Doc fixes.
4014         (Fget_unused_iso_final_char, Fdecode_char, Fiso_charset):
4015         Fix typos in docstrings.
4017 2008-05-23  Jason Rumney  <jasonr@gnu.org>
4019         * xsmfns.c: Remove includes that are already included by config.h.
4021 2008-05-23  Kenichi Handa  <handa@m17n.org>
4023         * charset.c (Qemacs, charset_emacs): New variables.
4024         (char_charset): Fix for non-Unicode characters.
4025         (syms_of_charset): Define charset_emacs.
4027         * w32term.c (x_draw_glyph_string): Be sure to update
4028         s->underline_thickness and s->underline_position.  Be sure to draw
4029         underline within the current line area.
4031         * xterm.c (x_draw_glyph_string): Be sure to update
4032         s->underline_thickness and s->underline_position.  Be sure to draw
4033         underline within the current line area.
4035         * fontset.c: Delete unused variables and add casting for char *
4036         throughout the file.
4037         (fontset_font): Try the fallback fonts of the current fontset
4038         before consulting the default fontset.
4040         * ftfont.c (ftfont_spec_pattern): Free charset if necessary.
4042         * xfont.c (xfont_list_pattern): Free names returned from XListFonts.
4044 2008-05-22  Jason Rumney  <jasonr@gnu.org>
4046         * font.c: Don't include strings.h.
4048         * dispextern.h, xfaces.c (xstrcasecmp): Rename from xstricmp.
4050         * dosfns.c, fileio.c, font.c, fontset.c, image.c, macfns.c:
4051         * macterm.c, process.c, w32.c, w32fns.c, w32proc.c, xfaces.c:
4052         * xfns.c, xfont.c: All callers of stricmp and strcasecmp changed
4053         to call xstrcasecmp.
4055         * xfont.c (xfont_list_pattern, compare_font_names): Use xstrcasecmp.
4057         * fontset.c (fs_query_fontset): Use xstrcasecmp.
4059         * font.c (font_style_to_value, font_score): Use xstrcasecmp.
4061         * dosfns.c (msdos_stdcolor_idx): Use xstrcasecmp.
4063 2008-05-22  Kenichi Handa  <handa@m17n.org>
4065         * puresize.h (BASE_PURESIZE): Increase to 1220000.
4067         * font.c (font_prop_validate_style): Adjust for the format
4068         change of font_style_table.
4070         * w32font.c (w32font_open_internal): Call Ffont_xlfd_name with
4071         two args.
4073         * xfaces.c (x_update_menu_appearance): Call Ffont_xlfd_name with
4074         two args.
4076 2008-05-22  Stefan Monnier  <monnier@iro.umontreal.ca>
4078         * minibuf.c (keys_of_minibuf): Delete.
4079         * lisp.h (keys_of_minibuf): Delete.
4080         * emacs.c (main): Don't call keys_of_minibuf.
4082 2008-05-22  Kenichi Handa  <handa@m17n.org>
4084         * ftfont.c (ftfont_resolve_generic_family): Rename from
4085         ftfont_list_generic_family.  Return a single family for each
4086         generic family.
4087         (ftfont_spec_pattern): Add FC_FAMILY to pattern.
4088         (ftfont_list): Adjust for the change of ftfont_resolve_generic_family.
4089         Call font_add_log.
4090         (ftfont_match): Call font_add_log.
4092         * font.h (Ffont_xlfd_name): EXFUN adjusted.
4093         (FONT_DEBUG): Define it.
4094         (font_add_log): Extern it.
4095         (font_assert): Rename from xassert.
4097         * xfont.c (xfont_get_pcm): Change xassert to font_assert.
4098         (xfont_list_family): Call font_add_log.
4099         (xfont_match): Likewise.
4100         (memq_no_quit): Delete.
4102         * fontset.c (fontset_from_font, Ffontset_info): Add the 2nd arg in
4103         call of Ffont_xlfd_name.
4105         * xfaces.c (struct table_entry, slant_table, weight_table)
4106         (swidth_table): Move to font.c.
4108         * font.c: Checking of FONT_DEBUG is moved to font.h.  All calls of
4109         xassert are changed to font_assert.  Delete many unused variables.
4110         (Vfont_weight_table, Vfont_slant_table, Vfont_width_table):
4111         New variables.
4112         (struct table_entry): Move from xfaces.c and modified.
4113         (weight_table, slant_table, width_table): Move from xfaces.c and
4114         contents adjusted for the change of struct table_entry.
4115         (font_style_to_value, font_style_symbolic): Adjust for the
4116         format change of font_style_table.
4117         (font_parse_family_registry): Don't overwrite existing foundry and
4118         family of font_spec.
4119         (font_score): Fix calculation of diff for sizes.
4120         (font_sort_entites): Call font_add_log.
4121         (font_delete_unmatched): Return a newly created list.
4122         (font_list_entities): Fix previous change.  Call font_add_log.
4123         (font_matching_entity, font_open_entity, font_close_entity):
4124         Call font_add_log.
4125         (Ffont_xlfd_name): New arg FOLD-WILDCARDS.
4126         (Finternal_set_font_style_table): Delete.
4127         (BUILD_STYLE_TABLE): New macro.
4128         (build_style_table): New function.
4129         (Vfont_log, font_log_env_checked): New variables.
4130         (font_add_log): New function.
4131         (syms_of_font): Delete defsubr Sinternal_set_font_style_table.
4132         Declare Lisp variables "font-weight-table", "font-slant-table",
4133         "font-width-table", and "font-log".  Initialize font_style_table.
4135 2008-05-21  Dan Nicolaescu  <dann@ics.uci.edu>
4137         * xterm.c (x_set_frame_alpha): Move declarations before statements.
4139 2008-05-21  Seiji Zenitani  <zenitani@mac.com>
4140             Ryo Yoshitake  <ryo@shiftmode.net>
4142         * frame.c (Qalpha): Add a new frame parameter `alpha'.
4143         (Vframe_alpha_lower_limit): New variable.
4144         (x_set_alpha): New function.
4146         * frame.h (Qalpha, Vframe_parameter_lower_limit): Export them.
4148         * xfns.c (x-create-frame, Qalpha):
4149         Initialize the frame parameter `alpha'.
4150         * xterm.c (OPAQUE, OPACITY): New.
4151         (x_set_frame_alpha): New function.
4152         (frame_highlight, frame_unhighlight): Call x_set_frame_alpha.
4154         * macfns.c (mac_frame_parm_handlers): A null handler for x_set_alpha.
4155         * w32fns.c (w32_frame_parm_handlers): Likewise.
4157 2008-05-20  Jason Rumney  <jasonr@gnu.org>
4159         * w32font.c (add_font_entity_to_list): Don't add non-opentype
4160         truetype fonts to opentype list.
4162 2008-05-20  Juanma Barranquero  <lekktu@gmail.com>
4164         * fontset.c (Ffontset_info): Doc fix.
4165         (syms_of_fontset) <font-encoding-charset-alist, use-default-ascent>:
4166         <ignore-relative-composition>: Fix typos in docstrings.
4168         * font.c (syms-of-font) <font-encoding-alist>:
4169         (Ffontp, Ffont_make_gstring): Fix typos in docstrings.
4170         (Flist_fonts, Ffont_family_list, Ffont_fill_gstring, Fquery_font)
4171         (Ffont_otf_alternates): Doc fixes.
4173 2008-05-20  Kenichi Handa  <handa@m17n.org>
4175         * Makefile.in (FONTSRC): Delete it.  Change all $(FONTSRC) to
4176         font.h through out the file.
4177         (FONT_DRIVERS): Rename from FONTOBJ.
4178         (obj): Change $(FONTOBJ) to $(FONT_DRIVERS).  Add font.o.
4179         (SOME_MACHINE_OBJECTS): Change $(FONTOBJ) to $(FONT_DRIVERS).
4181         * emacs.c (main): Call syms_of_font unconditionally.
4183         * font.h (find_font_encoding): Extern it.
4185         * font.c (Vfont_encoding_alist, find_font_encoding): Move from
4186         fontset.c.
4187         (font_pixel_size)[! HAVE_WINDOW_SYSTEM]: Return 1.
4188         (font_open_entity): Update FRAME_X_DISPLAY_INFO (f)->n_fonts,
4189         FRAME_SMALLEST_CHAR_WIDTH (f), and FRAME_SMALLEST_FONT_HEIGHT (f)
4190         only when HAVE_WINDOW_SYSTEM is defined.
4191         (font_close_object): Update FRAME_X_DISPLAY_INFO (f)->n_fonts only
4192         when HAVE_WINDOW_SYSTEM is defined.
4194         * fontset.c (Vfont_encoding_alist, find_font_encoding): Move to font.c.
4195         (syms_of_fontset): Move declaration of font-encoding-alist to font.c.
4197         * xfaces.c: Include font.h unconditionally.
4198         (merge_face_ref, merge_face_vectors)
4199         (Finternal_set_lisp_face_attribute): Cancel the previous change.
4201 2008-05-20  Stefan Monnier  <monnier@iro.umontreal.ca>
4203         * xdisp.c (select_frame_for_redisplay): Adjust for last change to
4204         indirect_variable.
4205         * eval.c (lisp_indirect_variable): New fun.
4206         (Fuser_variable_p): Use it.
4208 2008-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
4210         * lisp.h (indirect_variable):
4211         * data.c (indirect_variable, let_shadows_buffer_binding_p):
4212         Use Lisp_Symbol pointers rather than Lisp_Object.
4213         Adjust callers.
4214         * buffer.c (buffer_slot_type_mismatch): Use wrong-type-argument.
4215         To this end, change calling-convention.
4217         * minibuf.c (Finternal_complete_buffer): Only strip out hidden buffers
4218         if some non-hidden buffers are selected by string&pred.
4220 2008-05-19  Chong Yidong  <cyd@stupidchicken.com>
4222         * process.c (wait_reading_process_output): Always check status
4223         when in batch mode.
4225 2008-05-19  Kenichi Handa  <handa@m17n.org>
4227         * font.c (font_list_entities): Fix handling of cache.
4228         (font_matching_entity): Likewise.
4230         * ftfont.c (cs_iso8859_1): Delete.
4231         (ft_face_cache): New variable.
4232         (struct ftfont_info): New member fc_charset_idx.
4233         (ftfont_build_basic_charsets): Delete.
4234         (fc_charset_table): New variable.
4235         (ftfont_pattern_entity): New arg fc_charset_idx.  Store (FILENAME
4236         . FC_CHARSET_IDX) as :font-entity property in the font entity.
4237         Callers changed.
4238         (ftfont_lookup_cache, ftfont_get_charset): New functions.
4239         (ftfont_spec_pattern): New argument fc_charset_idx.
4240         Check registry more rigidly.  Change callers.
4241         (ftfont_open, ftfont_close, ftfont_has_char): Adjust for the
4242         change of :font-entity property of the font.
4244         * xftfont.c (xftfont_open): Adjust for the change of :font-entity
4245         property of the font.
4247 2008-05-18  Juanma Barranquero  <lekktu@gmail.com>
4249         * coding.c (Fcoding_system_p): Rename argument to match docstring.
4250         (Funencodable_char_position, Fcheck_coding_systems_region)
4251         (Fdecode_coding_string, Fencode_coding_string): Fix typos in docstrings.
4252         (Fdetect_coding_region, Fdetect_coding_string, Fencode_coding_region)
4253         (Ffind_operation_coding_system, Fset_coding_system_priority)
4254         (Fcoding_system_eol_type): Doc fixes.
4256 2008-05-17  Glenn Morris  <rgm@gnu.org>
4258         * sysdep.c (child_setup_tty): Handle systems with NLDLY, without FFDLY.
4260 2008-05-16  Eli Zaretskii  <eliz@gnu.org>
4262         * dired.c (Ffile_attributes): Shut up GCC warnings about st_uid
4263         and st_gid.
4265         * frame.c (Fdelete_frame): Don't call font_update_drivers if
4266         HAVE_WINDOW_SYSTEM is not defined.
4268         * xfaces.c (merge_face_ref, merge_face_vectors)
4269         (Finternal_set_lisp_face_attribute): Use FONT_*_INDEX only when
4270         HAVE_WINDOW_SYSTEM is defined.
4271         (Fface_font): Fix non-HAVE_WINDOW_SYSTEM case.
4273 2008-05-16  Stefan Monnier  <monnier@iro.umontreal.ca>
4275         * keyboard.c (parse_menu_item): Do not cache key shortcut any more.
4277 2008-05-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
4279         * macterm.c (x_draw_relief_rect): Remove unused variable `dpy'.
4281 2008-05-15  Kenichi Handa  <handa@m17n.org>
4283         * font.c (font_find_for_lface): Reflect LFACE_FONT in the font
4284         preference.
4286 2008-05-15  Glenn Morris  <rgm@gnu.org>
4288         * emacs.c (USAGE1, standard_args): Remove -disable-font-backend.
4290 2008-05-15  Chong Yidong  <cyd@stupidchicken.com>
4292         * fns.c (init_fns): Don't initialize weak_hash_tables here.
4293         (init_weak_hash_tables): New fun.  Initialize weak_hash_tables.
4295         * alloc.c (init_alloc_once): Call init_weak_hash_tables.
4297 2008-05-15  Kenichi Handa  <handa@m17n.org>
4299         * ftfont.c (ftfont_list): Downcase family name to check generic
4300         families.
4302         * xfaces.c (Finternal_set_lisp_face_attribute): Be sure to make a
4303         font-spec for QCfont value.
4305         * fontset.c (Fnew_fontset): Call font_unparse_xlfd with 256-byte
4306         buffer.  Check the return value of it.
4308 2008-05-14  Jason Rumney  <jasonr@gnu.org>
4310         * w32term.c (w32_get_glyph_overhangs): Remove.
4311         (w32_redisplay_interface): Use x_get_glyph_overhangs instead.
4313 2008-05-14  Kenichi Handa  <handa@m17n.org>
4315         * font.c (font_prop_validate): Make nil a valid value.
4316         (font_clear_cache): Check if the cached vector of entities is nil
4317         or not.
4319 2008-05-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
4321         * emacs.c (main_thread): Conditionalize on
4322         FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
4323         (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
4325         * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
4326         (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
4327         FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
4329 2008-05-14  Kenichi Handa  <handa@m17n.org>
4331         * coding.c (detect_coding_iso_2022): Ignore a coding category that
4332         has no corresponding coding system.
4334 2008-05-14  Jason Rumney  <jasonr@gnu.org>
4336         * font.h (struct font) [WINDOWSNT]: Remove codepage member.
4338         * w32font.h (w32font_open_internal): Update declaration.
4340         * w32font.c (w32font_open_internal): Change last argument from
4341         w32font_info struct to font object.  Fill in font object from
4342         font_entity.  Get Outline metrics if possible.  Use them to
4343         calculate underline position and thickness.  Use xlfd name as name
4344         property.  Don't set codepage.
4345         (w32font_open): Pass font_object to w32font_open_internal.  Don't
4346         update dpyinfo->smallest_font_height and dpyinfo->smallest_char_width.
4347         (w32font_draw): Use s->font.
4348         (clear_cached_metrics): Don't clear non-existent blocks.
4350         * w32term.c (w32_compute_glyph_string_overhangs): Don't compute if
4351         font was not found.
4352         (x_draw_glyph_string): Use underline position and thickness from font.
4354         * w32uniscribe.c (uniscribe_open): Pass font_object to
4355         w32font_open_internal.
4357 2008-05-14  Kenichi Handa  <handa@m17n.org>
4359         These changes are to delete all legacy font-handling codes, and
4360         make Emacs use only font-backends.
4362         * Makefile.in: Delete USE_FONT_BACKEND conditionals.
4363         (frame.o, image.o, print.o): Depend on $(FONTSRC).
4365         * makefile.w32-in (WIN32OBJ): Add w32reg.$(O), remove w32bdf.$(O).
4367         * charset.h (Vcharset_non_preferred_head)
4368         (Vcurrent_iso639_language): Extern them.
4370         * charset.c (Vcharset_non_preferred_head): New variable.
4371         (Vcurrent_iso639_language): New variable.
4372         (syms_of_charset): Declare it as a Lisp variable.
4373         (char_charset): Don't check non preferred charsets.  As a last
4374         resort, return charset_unicode.
4375         (Fset_charset_priority): Update Vcharset_non_preferred_head.
4377         * composite.c: Throughout the file, delete all USE_FONT_BACKEND
4378         conditionals.  Don't check enable_font_backend.  Delete all codes
4379         used only when USE_FONT_BACKEND is not defined.
4381         * dispextern.h (struct glyph_string): Change type of `font' to
4382         `struct font *'.
4383         (struct glyph_string): New member underline_position and
4384         underline_thickness.
4385         (enum lface_attribute_index): Remove LFACE_AVGWIDTH_INDEX.
4386         (struct face): Change type of `font' to `struct font *'.  Remove
4387         members `font_name', `font_info_id'.
4388         (per_char_metric, encode_char): Delete externs.
4389         (calc_pixel_width_or_height): Adjust the prototype.
4391         * emacs.c (enable_font_backend): Delete extern.
4392         (main): Don't set enable_font_backend.  Don't check the command
4393         line argument "-disable-font-backend".
4395         * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them.
4396         (enum font_property_index): New members FONT_DPI_INDEX,
4397         FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX,
4398         FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX,
4399         FONT_OBJECT_MAX.  Delete FONT_FRAME_INDEX.
4400         (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC)
4401         (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC)
4402         (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE)
4403         (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
4404         (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
4405         (struct font_spec, struct font_entity): New structs.
4406         (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
4407         (struct font): Many members from old "struct font_info" moved to
4408         here.  Members font and entity deleted.
4409         (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
4410         the new font-related objects.
4411         (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
4412         (CHECK_FONT_GET_OBJECT): Likewise.
4413         (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
4414         (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
4415         (struct font_driver): New members case_sensitive anc check.  Type
4416         of the member list and open changed.
4417         (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
4418         (font_symbolic_width, font_find_object, font_get_spec)
4419         (font_set_lface_from_name): Delete extern.
4420         (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New EXFUNs.
4422         * font.c: Include <strings.h>.
4423         (enable_font_backend): Delete it.
4424         (Qfont_spec, Qfont_entity, Qfont_object): New variables.
4425         (CHECK_VALIDATE_FONT_SPEC): Delete it.
4426         (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h.
4427         (null_string): Delete it.
4428         (null_vector): Make it static.
4429         (font_family_alist): Delete it.
4430         (Qnormal): Extern it.
4431         (QCextra, QClanguage): Delete it.
4432         (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables.
4433         (font_make_spec, font_make_entity, font_make_object)
4434         (font_intern_prop): Renamed from intern_downcase.  Don't downcase
4435         the string.  Callers changed.
4436         (font_pixel_size): Adjusted for the format change of font-related
4437         objects.
4438         (prop_name_to_numeric, prop_numeric_to_name): Delete them.
4439         (font_style_to_value, font_style_symbolic): New function.
4440         (build_font_family_alist): Delete it.
4441         (font_registry_charsets): Use Fassoc_string instead of
4442         assq_no_quit.
4443         (font_prop_validate_symbol): Don't return null_string.
4444         (font_prop_validate_style): Adjusted for the change of
4445         style-related values in a font vector.
4446         (font_property_table): Delete entries for QClanguage and
4447         QCantialias, add entries for QCavgwidth.
4448         (get_font_prop_index): Delete the 2nd argument FROM.
4449         (font_prop_validate): Arguments changed.
4450         (font_put_extra): Adjusted for the change of font-related objects.
4451         (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd)
4452         (font_parse_fcname, font_unparse_fcname)
4453         (font_prepare_composition): Likewise.
4454         (font_parse_family_registry): Renamed from font_merge_old_spec.
4455         (otf_open): Delete the 1st arg entity.
4456         (font_otf_capability): Adjusted for the above change.
4457         (font_score): New arg alternate_families.  Adjusted for the change
4458         of font-related objects.
4459         (font_sort_entites): New arg best_only.
4460         (font_symbolic_weight, font_symbolic_slant, font_symbolic_width):
4461         Delete them.
4462         (font_match_p): Check alternate families.
4463         (font_find_object): Delete it.
4464         (font_check_object): New function.
4465         (font_clear_cache): Adjusted for the change of font-related objects.
4466         (font_delete_unmatched): New arg.
4467         (font_list_entities): Call font_driver->list with a spec that
4468         doesn't specify style-related properties.
4469         (font_matching_entity): Arguments changed.  Caller changed.
4470         (font_open_entity): Adjusted for the change of font-related objects.
4471         (font_close_object, font_has_char, font_encode_char)
4472         (font_get_name, font_get_spec): Likewise.
4473         (font_spec_from_name, font_clear_prop, font_update_lface):
4474         New functions.
4475         (font_find_for_lface, font_open_for_lface, font_load_for_lface)
4476         (font_prepare_for_face, font_done_for_face, font_open_by_name)
4477         (font_at): Adjusted for the change of font-related objects.
4478         (font_range): New function.
4479         (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts)
4480         (Ffont_xlfd_name): Adjusted for the change of font-related objects.
4481         (Fcopy_font_spec, Fmerge_font_spec): New function.
4482         (Ffont_family_list): Renamed from list-families.
4483         (Finternal_set_font_style_table): Arguments changed.
4484         (Ffont_fill_gstring, Ffont_shape_text, Fopen_font)
4485         (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjusted for the
4486         change of font-related objects.
4487         (syms_of_font): Delete "ifdef USE_FONT_BACKEND".  DEFSYM new symbols.
4489         * fontset.h (struct font_info): Delete it.  Most members go to
4490         struct font.
4491         (FONT_ENCODING_NOT_DECIDED): Moved to font.h.
4492         (enum FONT_SPEC_INDEX): Delete it.
4493         (font_info, list_fonts_func, load_font_func, query_font_func)
4494         (set_frame_fontset_func, find_ccl_program_func)
4495         (get_font_repertory_func, new_fontset_from_font_name): Delete
4496         externs.
4497         (fontset_from_font_name): Extern it.
4498         (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID)
4499         (FONT_INFO_FROM_FACE): Deleted.
4500         (face_for_font): Adjust prototype.
4502         * fontset.c: Throughout the file, delete all USE_FONT_BACKEND
4503         conditionals.  Don't check enable_font_backend.  Delete all codes
4504         used only when USE_FONT_BACKEND is not defined.
4505         (get_font_info_func, list_font_func, load_font_func)
4506         (query_font_func, set_frame_fontset_func, find_ccl_program_func)
4507         (get_font_repertory_func): Delete them.
4508         (FONTSET_SPEC, FONT_DEF_NEW, FONT_DEF_SPEC, FONT_DEF_ENCODING)
4509         (FONT_DEF_REPERTORY, RFONT_DEF_FACE, RFONT_DEF_SET_FACE)
4510         (RFONT_DEF_FONT_DEF, RFONT_DEF_SPEC, RFONT_DEF_REPERTORY)
4511         (RFONT_DEF_OBJECT, RFONT_DEF_SET_OBJECT, RFONT_DEF_SCORE)
4512         (RFONT_DEF_SET_SCORE, RFONT_DEF_NEW): New macros.
4513         (fontset_compare_rfontdef): New function.
4514         (reorder_font_vector): Remove the argument CHARSET-ID.  Sort
4515         rfont-defs by qsort.  Adjusted for the change of font-group vector.
4516         (load_font_get_repertory): Deleted.
4517         (fontset_find_font): Use new macros to ref/set elements of
4518         font-def and rfont-def.
4519         (fontset_font): Fix the timing of remembering that no font for C.
4520         (free_face_fontset): Do nothing if the face has no fontset.
4521         (face_suitable_for_char_p): Use new macros to ref/set elements of
4522         rfont-def.
4523         (face_for_char): Likewise.  Call face_for_char with font_object.
4524         (fs_load_font): Delete.  Delete #pragma surrounding it.
4525         (fs_query_fontset): Use strcasecmp instead of strcmp.
4526         (generate_ascii_font_name): Adjusted for the format change of
4527         font-spec.
4528         (Fset_fontset_font): Likewise.  Use new macros to set elements of
4529         font-def.
4530         (Fnew_fontset): Use font_unparse_xlfd to generate
4531         FONTSET_ASCII (fontset).
4532         (new_fontset_from_font_name): Deleted.
4533         (fontset_from_font): Renamed from new_fontset_from_font.  Check if
4534         a fontset is already created for the font.  FIx updating of
4535         Vfontset_alias_alist.
4536         (fontset_ascii_font): Deleted.
4537         (Ffont_info): Adjusted for the format change of font-spec.
4538         (Finternal_char_font): Likewise.
4539         (Ffontset_info): Likewise.
4540         (syms_of_fontset): Don't check load_font_func.
4542         * fns.c (internal_equal): Handle PREV_FONT.
4544         * frame.h: Delete USE_FONT_BACKEND conditional.
4546         * frame.c: Throughout the file, delete all USE_FONT_BACKEND
4547         conditionals.  Don't check enable_font_backend.  Delete all codes
4548         used only when USE_FONT_BACKEND is not defined.
4549         (x_set_font): Call x_new_font, not x_new_fontset2.
4550         (x_set_font_backend): Use FRAME_FONT macro to check if a font is
4551         already set for the frame.
4553         * ftfont.c (ftfont_pattern_entity): Argument FRAME removed.  Make
4554         a font-entity by font_make_entity.  Use font_intern_prop instead
4555         of intern_downcase.  Use FONT_SET_STYLE to set a style-related
4556         font property.  If a font is scalable, set avgwidth property to 0.
4557         Set font-entity property by font_put_extra.
4558         (ftfont_list_generic_family): Argument SPEC and REGISTRY removed.
4559         (ffont_driver): Adjusted for the change of struct font_driver.
4560         (ftfont_spec_pattern): New function.
4561         (ftfont_list): Return a list, not vector.
4562         (ftfont_match): Use ftfont_spec_pattern to get a pattern.
4563         (ftfont_list_family): Don't downcase names.
4564         (ftfont_free_entity): Deleted.
4565         (ftfont_open): Return a font-object.  Adjusted for the change of
4566         struct font.  Get underline_thickness and underline_position from
4567         font property.  Don't update dpyinfo->smallest_font_height and
4568         dpyinfo->smallest_char_width.
4569         (ftfont_close): Don't free `struct font'.
4570         (ftfont_has_char): Adjusted for the format change of font-entity.
4571         (ftfont_encode_char, ftfont_text_extents): Likewise.
4573         * ftxfont.c (ftxfont_list): Return a list, not vector.
4574         (ftxfont_open): Return a font-object.  Adjusted for the change of
4575         struct font.  Get underline_thickness and underline_position from
4576         font property.  Don't update dpyinfo->smallest_font_height and
4577         dpyinfo->smallest_char_width.
4578         (ftxfont_close): Don't decrease FRAME_X_DISPLAY_INFO (f)->n_fonts.
4579         (ftxfont_draw): Adjusted for the change of struct font.
4581         * image.c (image_ascent): Don't include "charset.h".  Include
4582         "character.h" and "font.h".
4584         * lisp.h (enum pvec_type): New member PREV_FONT.
4585         (Fassoc_string): EXFUN it.
4587         * print.c: Include font.h.
4588         (print_object): Handle font-related objects.
4590         * xdisp.c: Throughout the file, delete all USE_FONT_BACKEND
4591         conditionals.  Don't check enable_font_backend.  Delete all codes
4592         used only when USE_FONT_BACKEND is not defined.
4593         (handle_auto_composed_prop): Do nothing if it->f is not on a
4594         window system.  Check how many following characters can be
4595         displayed by the same font.
4596         (calc_pixel_width_or_height): Type of the 4th arg is changed to
4597         'struct font *'.
4598         (get_char_face_and_encoding): Assign the whole encoding task to
4599         the `encode-char' method of a font driver.
4600         (fill_composite_glyph_string): Adjusted for the change of `struct
4601         face' and `struct glyph_string'.
4602         (fill_glyph_string): Likewise.
4603         (get_per_char_metric): Arguments changed.
4604         (x_get_glyph_overhangs): Adjusted for the change of `struct face'
4605         and `struct glyph_string'.
4606         (produce_stretch_glyph, calc_line_height_property)
4607         (x_produce_glyphs): Likewise.
4609         * xfaces.c: Throughout the file, delete all USE_FONT_BACKEND
4610         conditionals.  Don't check enable_font_backend.  Delete all codes
4611         used only when USE_FONT_BACKEND is not defined.  Use
4612         FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
4613         (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth)
4614         (Qp): Extern them.
4615         (clear_font_table, load_face_font, xlfd_lookup_field_contents):
4616         Deleted.
4617         (struct font_name): Deleted.
4618         (xlfd_numeric_value, xlfd_symbolic_value): Deleted.
4619         (compare_fonts_by_sort_order): New function.
4620         (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight)
4621         (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth):
4622         Deleted.
4623         (Fx_family_fonts): Use font_list_entities, and sort fonts by
4624         compare_fonts_by_sort_order.
4625         (Fx_font_family_list): Call Ffont_family_list.
4626         (face_numeric_value, face_numeric_weight, face_numeric_slant)
4627         (face_numeric_swidth, face_symbolic_value, face_symbolic_weight)
4628         (face_symbolic_slant, face_symbolic_swidth)
4629         (split_font_name_into_vector, build_font_name_from_vector)
4630         (xlfd_fixed_p, xlfd_point_size, pixel_point_size)
4631         (font_rescale_ratio, split_font_name, build_font_name)
4632         (free_font_names, sort_fonts, x_face_list_fonts)
4633         (face_font_available_p, sorted_font_list, cmp_font_names)
4634         (font_list_1, concat_font_list, font_list, remove_duplicates):
4635         Deleted.
4636         (Fx_list_fonts): Use Ffont_list.
4637         (LFACE_AVGWIDTH): Deleted.
4638         (check_lface_attrs): Don't check LFACE_AVGWIDTH.  Check LFACE_FONT
4639         by FONTP.
4640         (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
4641         (set_lface_from_font_name): Delete it.
4642         (set_lface_from_font): Renamed from
4643         set_lface_from_font_and_fontset.  Caller changed.  Don't set
4644         LFACE_AVGWIDTH.  Use FONT_XXX_FOR_FACE to get a symbol suitable
4645         for face.
4646         (merge_face_vectors): Copy font-spec if necessary.
4647         Clear properties of the font-spec if necessary.
4648         (merge_face_ref): Clear properties of the font-spec if necessary.
4649         (Finternal_set_lisp_face_attribute): Likewise.
4650         (set_font_frame_param): Use font_load_for_lface to load a
4651         font-object, and call Fmodify_frame_parameters with it.
4652         (x_update_menu_appearance): Don't check LFACE_AVGWIDTH.  Get XLFD
4653         font name by Ffont_xlfd_name.
4654         (Finternal_lisp_face_attribute_values): Don't check QCweight,
4655         QCslant, and QCwidth.
4656         (Fface_font): Get a font name from font->props[FONT_NAME_INDEX].
4657         (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH.
4658         Compare fonts by EQ.
4659         (lookup_non_ascii_face): Deleted.
4660         (face_for_font): The 2nd argument changed.
4661         (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH.
4662         Check atomic font properties by case insensitive.
4663         (realize_non_ascii_face): Set face->overstrike correctly.
4664         (realize_x_face): Likewise.  Check if LFACE_FONT is a font_object.
4665         (dump_realized_face): Get font name from
4666         font->props[FONT_NAME_INDEX].  Don't print font_info_id.
4668         * xfns.c: Throughout the file, delete all USE_FONT_BACKEND
4669         conditionals.  Don't check enable_font_backend.  Delete all codes
4670         used only when USE_FONT_BACKEND is not defined.
4671         (xic_create_xfontset): Original code deleted and renamed from
4672         xic_create_xfontset2.  Use FRAME_FONT, not FRAME_FONT_OBJECT.
4673         (x_make_gc): Don't set GCFont in GCs.
4674         (Fx_create_frame) [USE_LUCID]: Set xlwmenu_default_font to a font
4675         opened by "fixed".
4676         (syms_of_xfns): Don't set get_font_info_func, load_font_func,
4677         find_ccl_program_func, query_font_func, set_frame_fontset_func,
4678         get_font_repertory_func.
4680         * xfont.c: Include <stdlib.h> and "ccl.h".
4681         (struct xfont_info): New structure.
4682         (xfont_query_font): Deleted.
4683         (xfont_find_ccl_program): Renamed from x_find_ccl_program and
4684         moved from xterm.c.
4685         (xfont_driver): Adjusted for the change of struct font_driver.
4686         (compare_font_names): New function.
4687         (xfont_list_pattern): Sort font names case insensitively.  Make
4688         font_entity by calling font_make_entity.  Avoid auto-scaled fonts.
4689         (xfont_list): Return a list, not vector.
4690         (xfont_match): If the font doesn't have QCname property, generate
4691         a name from the other font properties.
4692         (xfont_open): Return a font-object.  Adjusted for the change of
4693         struct font.  Get underline_thickness and underline_position from
4694         font property.  Don't update dpyinfo->smallest_font_height and
4695         dpyinfo->smallest_char_width.
4696         (xfont_close): Don't free struct font.
4697         (xfont_prepare_face): Adjusted for the change of struct font.
4698         (xfont_done_face): Deleted.
4699         (xfont_has_char): Adjusted for the change of struct font.
4700         (xfont_encode_char, xfont_draw): Likewise.
4701         (xfont_check): New function.
4703         * xftfont.c (xftfont_list): Adjusted for the change of `list'
4704         callback function.
4705         (xftfont_match): Adjusted for the format change of font-entity.
4706         (xftfont_open): Adjusted for the format change of font-entity and
4707         font-object.  Adjusted for the change of struct font.  Return a
4708         font-object.  Don't update dpyinfo->smallest_font_height and
4709         dpyinfo->smallest_char_width.
4710         (xftfont_close): Block input while calling XftFontClose.
4711         (xftfont_prepare_face): Don't block input while calling
4712         xftfont_get_colors.  Adjusted for the change of struct font.
4713         (xftfont_shape): Return value of error case fixed.
4715         * xrdb.c (x_load_resources): Don't setup a fontset resource.
4717         * xterm.h: Throughout the file, delete all USE_FONT_BACKEND
4718         conditionals.
4719         (FONT_WIDTH): Return (f)->max_width.
4720         (struct x_display_info): Delete member `font'.
4721         (x_list_fonts, x_get_font_info, x_load_font, x_query_font)
4722         (x_find_ccl_program, x_get_font_repertory): Delete externs.
4723         (struct x_output): Change type of `font' to `struct font *'.
4725         * xterm.c: Throughout the file, delete all USE_FONT_BACKEND
4726         conditionals.  Don't check enable_font_backend.  Delete all codes
4727         used only when USE_FONT_BACKEND is not defined.  Don't include ccl.h.
4728         (x_per_char_metric, x_encode_char): Deleted.
4729         (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont.
4730         (x_compute_glyph_string_overhangs): Adjusted for the change of
4731         `struct face'.
4732         (x_draw_glyph_string_foreground)
4733         (x_draw_composite_glyph_string_foreground): Likewise.
4734         (x_draw_glyph_string): Likewise.  Use font->underline_position and
4735         font->underline_thickness.
4736         (x_new_font): Renamed from x_new_fontset2.
4737         (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
4738         (x_check_font): Call `check' method of a font driver.
4739         (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
4740         (x_query_font, x_get_font_repertory): Deleted.
4741         (x_find_ccl_program): Renamed and moved to xfont.c.
4742         (x_redisplay_interface): Adjusted for the change of `struct
4743         redisplay_interface'.
4745         * w32fns.c: Throughout the file, delete all USE_FONT_BACKEND
4746         conditionals.  Don't check enable_font_backend.  Delete all codes
4747         used only when USE_FONT_BACKEND is not defined.  Surround non-used
4748         code by "#ifdef OLD_FONT" and "endif".
4749         (Fw32_select_font): Use FONT_COMPAT to get old font structure.
4751         * w32font.h (struct w32font_info): New member.
4752         (FONT_COMPAT): New macro.
4753         (w32font_open_internal): Prototype adjusted.
4755         * w32gui.h (XGCValues): Surround `XFontStruct *font' by "if
4756         OLD_FONT" and "endif".
4758         * w32font.c: Throughout the file, delete all USE_FONT_BACKEND
4759         conditionals.  Don't check enable_font_backend.  Delete all codes
4760         used only when USE_FONT_BACKEND is not defined.
4761         (w32font_open): Return a font-object.  Make a font-object by
4762         font_make_object.  Adjusted for the change of struct w32font_info.
4763         (w32font_close): Don't free struct font.  Adjusted for the change
4764         of struct w32font_info.
4765         (w32font_encode_char, w32font_text_extents, w32font_draw):
4766         Adjusted for the change of struct w32font_info.
4767         (w32font_draw): Likewise.
4768         (w32font_list_internal): Return a list, not vector.
4769         (w32font_open_internal): Change the 4th arg to font-object.
4770         Adjusted for the change of struct w32font_info and font-object format.
4771         (add_font_name_to_list): Don't downcase names.
4772         (w32_enumfont_pattern_entity): Make a font-entity by
4773         font_make_entity.  Adjusted for the format change of font-entity.
4774         Use FONT_SET_STYLE to set a style-related font property.  If a
4775         font is scalable, set avgwidth property to 0.  Set font-entity
4776         property by font_put_extra.
4777         (font_matches_spec): Adjusted for the format change of font-entity.
4778         (w32_weight_table, w32_decode_weight): New variables.
4779         (w32_encode_weight): New function.
4780         (fill_in_logfont): Adjusted for the format change of font-spec.
4781         (w32font_full_name): Use FONT_WEIGHT_SYMBOLIC to get a symbol
4782         weight value.
4783         (w32font_driver): Adjusted for the change of struct font_driver.
4785         * w32term.h: Throughout the file, delete all USE_FONT_BACKEND
4786         conditionals.  Don't check enable_font_backend.  Surround non-used
4787         code by "#ifdef OLD_FONT" and "endif".
4788         (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
4789         (FONT_AVG_WIDTH): Adjusted for the change of struct font.
4791         * w32term.c: Throughout the file, delete all USE_FONT_BACKEND
4792         conditionals.  Don't check enable_font_backend.  Delete all codes
4793         used only when USE_FONT_BACKEND is not defined.  Surround non-used
4794         code by "#ifdef OLD_FONT" and "endif".
4796         * w32uniscribe.c: Delete USE_FONT_BACKEND conditional.
4797         (uniscribe_open): Return value changed to font-object.
4798         Adjusted for the format change of font-object.
4799         (uniscribe_otf_capability): Adjusted for the change of struct font.
4800         (add_opentype_font_name_to_list): Don't downcase names.
4801         (uniscribe_font_driver): Adjusted for the change of struct
4802         font_driver.
4804 2008-05-13  Chong Yidong  <cyd@stupidchicken.com>
4806         * dispnew.c (update_frame_1): Check if tty output is still valid
4807         before flushing it.
4809 2008-05-13  Jan Djärv  <jan.h.d@swipnet.se>
4811         * xterm.c (handle_one_xevent): Don't pass buttons higher than 3
4812         to Gtk+ menus.
4814 2008-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
4816         * dired.c (file_name_completion): Tweak the code so as to always do it
4817         in a single pass.  Tighten the scope of some variables.
4819         * dired.c (Qdefault_directory): New var.
4820         (file_name_completion): Use it instead of Fexpand_file_name.
4821         (syms_of_dired): Initialize it.
4823 2008-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
4825         * fileio.c (double_dollars): Remove dead code.
4827 2008-05-10  Eli Zaretskii  <eliz@gnu.org>
4829         * dired.c (Ffile_attributes, Fdirectory_files_and_attributes):
4830         Mention w32-get-true-file-attributes in doc string.
4832         * w32proc.c (syms_of_ntproc) <w32-get-true-file-attributes>: Doc fix.
4834 2008-05-09  Glenn Morris  <rgm@gnu.org>
4836         * fileio.c (Fread_file_name): Remove reference to insdef, deleted
4837         2008-04-23.
4839 2008-05-09  Eli Zaretskii  <eliz@gnu.org>
4841         Support for reporting owner and group of each file on MS-Windows:
4842         * dired.c (stat_uname, stat_gname): New functions, with special
4843         implementation for w32.
4844         (Ffile_attributes): Use them instead of getpwuid and getgrgid.
4846         * w32.c: Rename the_passwd_* to dflt_passwd_*.
4847         (dflt_group_name): New static variable.
4848         (dflt_group): Rename from the_group.
4849         (init_user_info): Init dflt_group fields.  Get user's group name
4850         from LookupAccountSid.
4851         (g_b_init_get_file_security, g_b_init_get_security_descriptor_owner)
4852         (g_b_init_get_security_descriptor_group, g_b_init_is_valid_sid):
4853         New initialization states.
4854         (globals_of_w32): Initialize them to zero.  Initialize the default
4855         group name to "None".
4856         (GetFileSecurity_Name): New global var, the name of the function
4857         to call for GetFileSecurity.
4858         (GetFileSecurity_Proc, GetSecurityDescriptorOwner_Proc)
4859         (GetSecurityDescriptorGroup_Proc, IsValidSid_Proc): New typedefs.
4860         (get_file_security, get_security_descriptor_owner)
4861         (get_security_descriptor_group, is_valid_sid)
4862         (get_file_security_desc, get_rid, get_name_and_id)
4863         (get_file_owner_and_group): New functions.
4864         (stat): Use get_file_security_desc and get_file_owner_and_group to
4865         report the owner and primary group of each file.  Don't ignore the
4866         high 32 bits of file's size, now that st_size is 64-bit wide.
4867         Fix test when to get true file attributes.
4868         (init_user_info): Use get_rid instead of equivalent inline code.
4869         (fstat): Don't ignore the high 32 bits of file's size.
4871 2008-05-09  Chong Yidong  <cyd@stupidchicken.com>
4873         * image.c (png_load): Use correct bit-depth for setting background
4874         color.
4876 2008-05-08  Eli Zaretskii  <eliz@gnu.org>
4878         * Makefile.in (lisp, shortlisp): Rename epa-file-hook.elc to
4879         epa-hook.elc.
4881 2008-05-08  Juanma Barranquero  <lekktu@gmail.com>
4883         * font.c (Ffont_match_p): Don't use `iff' in docstring.
4885 2008-05-07  Dan Nicolaescu  <dann@ics.uci.edu>
4887         * macfns.c (Fx_create_frame): Make a copy of frame parameters
4888         because the original parameters are in pure storage now.
4889         (mac_window): Remove unused params.  Update callers.
4891 2008-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
4893         * lread.c (substitute_object_recurse): Use lower-level primitives.
4894         Don't signal errors when traversing sub-char-tables.
4895         Don't loop over all the possible characters when traversing char-tables.
4897         * print.c (print_preprocess): Add sub-char-tables to the print-table,
4898         just like we do in print.c.
4900 2008-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
4902         * minibuf.c (Ftry_completion): Remove code left over from when we used
4903         scmp instead of Fcompare_strings.
4905 2008-05-04  Juanma Barranquero  <lekktu@gmail.com>
4907         * w32fns.c (Fw32_battery_status): Fix computation of %t (h:min) format.
4909 2008-05-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
4911         * image.c [USE_MAC_IMAGE_IO] (image_load_image_io):
4912         Create bitmap context in native byte order.
4914         * macterm.c (XDrawLine)
4915         (XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]: Create bitmap
4916         context in native byte order.
4918 2008-05-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
4920         * config.in: Regenerate.
4922         * image.c (PIX_MASK_DRAW, PIX_MASK_RETAIN) [USE_MAC_IMAGE_IO]:
4923         New definitions for Image I/O support.
4924         (XGetImage, XPutPixel, XGetPixel, XDestroyImage)
4925         (mac_create_cg_image_from_image, x_create_x_image_and_pixmap)
4926         [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
4927         (mac_data_provider_release_data, image_load_image_io)
4928         [USE_MAC_IMAGE_IO]: New functions.
4929         (CGImageCreateWithPNGDataProviderProcType) [MAC_OSX]: Remove typedef.
4930         (MyCGImageCreateWithPNGDataProvider) [MAC_OSX]: Remove variable.
4931         (init_image_func_pointer) [MAC_OSX]: Remove function.
4932         (image_load_quartz2d) [MAC_OSX]: Check availability of
4933         CGImageCreateWithPNGDataProvider at compile time.
4934         Use lowercase `false' for boolean constant.
4935         (png_load, jpeg_load, tiff_load, gif_load) [USE_MAC_IMAGE_IO]:
4936         Use image_load_image_io.
4937         (png_load) [!USE_MAC_IMAGE_IO && MAC_OSX]:
4938         Don't check MyCGImageCreateWithPNGDataProvider.
4939         (init_image) [MAC_OSX && TARGET_API_MAC_CARBON]:
4940         Don't call init_image_func_pointer.
4942         * macgui.h (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
4944         * macterm.c (mac_cg_color_space_rgb) [USE_CG_DRAWING]:
4945         Make variable non-static.
4946         (XDrawLine, XCreatePixmap, XCreatePixmapFromBitmapData, XFreePixmap)
4947         [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
4949         * macterm.h (ARGB_TO_ULONG, ALPHA_FROM_ULONG): New macros.
4950         (RED_FROM_ULONG): Mask off higher bits.
4951         (mac_cg_color_space_rgb) [USE_MAC_IMAGE_IO]: New extern.
4953         * s/darwin.h [HAVE_CARBON && HAVE_AVAILABILITYMACROS_H]:
4954         Include AvailabilityMacros.h.
4955         (USE_MAC_IMAGE_IO, LIBS_IMAGE) [HAVE_CARBON]: New defines.
4956         (LIBS_CARBON) [HAVE_CARBON]: Use LIBS_IMAGE.
4958 2008-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
4960         * chartab.c (Fset_char_table_range): If range is t, really set all
4961         chars to that value.
4963 2008-05-03  Eli Zaretskii  <eliz@gnu.org>
4965         * dired.c (Ffile_attributes): Don't allow the device number become
4966         negative.
4968 2008-05-02  Daiki Ueno  <ueno@unixuser.org>
4970         * Makefile.in (lisp, shortlisp): Add epa-file-hook.elc.
4972 2008-05-02  Juri Linkov  <juri@jurta.org>
4974         * minibuf.c (Fread_from_minibuffer, Fread_string, Fread_command)
4975         (Fread_variable, Fread_buffer, Fcompleting_read): Document the
4976         DEFAULT argument as a list of default values in docstrings.
4978 2008-05-01  Chong Yidong  <cyd@stupidchicken.com>
4980         * puresize.h (BASE_PURESIZE): Increase to 1210000.
4982 2008-05-01  Martin Rudalics  <rudalics@gmx.at>
4984         * dispnew.c (change_frame_size_1): Preserve small windows when
4985         shrinking frames by calling set_window_height|width with third
4986         arg 2.
4988         * window.h (struct window): Replace field too_small_ok by field
4989         resize_proportionally.
4991         * window.c (make_window): Initialize resize_proportionally.
4992         (enlarge_window): Temporarily set resize_proportionally to make
4993         sure that shrink_windows does scale the window proportionally.
4994         (shrink_windows): When window has resize_proportionally set try
4995         to shrink it proportionally by stealing from other windows.
4996         (struct saved_window, Fset_window_configuration)
4997         (compare_window_configurations): Handle resize_proportionally.
4998         (WINDOW_TOTAL_SIZE): New macro.
4999         (window_min_size, shrink_windows, size_window): Use it.
5000         (check_min_window_sizes): Remove.  Invalid values of
5001         window-min-height|width are handled by window_min_size_2 now.
5002         (size_window, Fsplit_window, enlarge_window)
5003         (adjust_window_trailing_edge, grow_mini_window): Don't call
5004         check_min_window_sizes.
5005         (window_min_size_2, window_min_size_1, window_min_size):
5006         New argument safe_p for retrieving "safe" minimum sizes.
5007         (Fdisplay_buffer, Fsplit_window, enlarge_window)
5008         (adjust_window_trailing_edge, grow_mini_window):
5009         Adjust arguments of window_min_size... functions.
5010         (shrink_windows): Argument min_size removed.  New argument
5011         safe_p allows shrinking windows to their safe minimum sizes.
5012         Calculate minimum size and decide whether a window shall be
5013         deleted for each window individually.
5014         (size_window): When nodelete_p equals 2, tell shrink_windows to
5015         delete windows only if their new minimum size is no more safe.
5016         (shrink_window_lowest_first): Call window_min_size_1 to make
5017         sure to preserve modeline of bottom-most window when resizing
5018         the minibuffer.
5019         (Fset_window_configuration, Fcurrent_window_configuration)
5020         (compare_window_configurations): Do not handle
5021         window-min-height|width any more.
5022         (syms_of_window): Clarify window-min-height|width doc-strings.
5024 2008-04-30  Stefan Monnier  <monnier@iro.umontreal.ca>
5026         * dired.c (file_name_completion): Fix up the encoding/decoding issue
5027         some more.  Copy some of the code from Ftry_completions.
5028         Remove special case code that dates back to revision 1.1 when the
5029         slash was only added when necessary and that can't trigger nowadays.
5031 2008-04-27  Kenichi Handa  <handa@m17n.org>
5033         * font.c (font_prop_validate): Signal `error' instead of `font'.
5035 2008-04-29  Jason Rumney  <jasonr@gnu.org>
5037         * w32fns.c (Fw32_battery_status): New defun.
5038         (syms_of_w32fns): Defsubr it.
5040 2008-04-28  Andreas Schwab  <schwab@suse.de>
5042         * dired.c (file_name_completion): Fix another mixing of encoded
5043         and decoded names.
5045 2008-04-28  Juanma Barranquero  <lekktu@gmail.com>
5047         * w32fns.c (Fw32_define_rgb_color): Fix typo in docstring.
5049 2008-04-27  Juanma Barranquero  <lekktu@gmail.com>
5051         * fringe.c (Fdefine_fringe_bitmap): Doc fix.
5053 2008-04-27  Andreas Schwab  <schwab@suse.de>
5055         * dired.c (file_name_completion): Fix inappropriate mixing of
5056         encoded and decoded names.
5058         * xterm.c (XTread_socket): Fix use of uninitialized variable.
5060         * puresize.h (BASE_PURESIZE): Increase to 1200000.
5062 2008-04-26  Eli Zaretskii  <eliz@gnu.org>
5064         * dired.c (Ffile_attributes) [WINDOWSNT]: Undo change from
5065         2008-03-31, it's not needed anymore with `struct stat' definition
5066         on nt/inc/sys/stat.h.  Undo changes from 2007-01-12 and 2007-01-13
5067         for the same reasons.
5069 2008-04-25  Dennis Gilmore  <ausil@fedoraproject.org>  (tiny change)
5071         * m/sparc.h: Additional redefinitions for GNU/Linux.
5073 2008-04-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
5075         * macterm.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: New variable.
5076         (syms_of_macterm) [USE_MAC_TSM]: Defvar it.
5077         (Qmouse_drag_overlay) [MAC_OSX]: New variable.
5078         (syms_of_macterm) [MAC_OSX]: Intern and staticpro it.
5079         (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
5080         (mac_ax_selected_text_range) [MAC_OSX]: New functions.
5081         (mac_ax_number_of_characters) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
5082         Likewise.
5084         * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern.
5085         (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range)
5086         (mac_ax_number_of_characters): Add externs.
5087         (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
5088         [USE_MAC_TSM]: Likewise.
5089         (mac_handle_text_input_event) [MAC_OSX]:
5090         Handle kEventTextInputOffsetToPos for no active input area case.
5091         Handle kEventTextInputPosToOffset and kEventTextInputGetSelectedText.
5092         (mac_handle_document_access_event)
5093         [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: New function.
5094         (install_application_handler) [MAC_OSX]: Register handlers for
5095         kEventTextInputPosToOffset and kEventTextInputGetSelectedText.
5096         (install_application_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
5097         Register mac_handle_document_access_event.
5099         * xdisp.c (x_y_to_hpos_vpos, fast_find_position) [HAVE_CARBON]:
5100         Make functions non-static.
5102 2008-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
5104         * fileio.c (Vread_file_name_function, Vread_file_name_predicate)
5105         (read_file_name_completion_ignore_case, insert_default_directory)
5106         (Qdefault_directory): Move to minibuffer.el.
5107         (Fread_file_name): Call the new `read-file-name' instead.
5109 2008-04-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
5111         * mac.c (create_apple_event) [TARGET_API_MAC_CARBON]:
5112         Make function non-static.
5113         (create_apple_event_from_event_ref) [TARGET_API_MAC_CARBON]:
5114         Remove function.
5115         (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]:
5116         Move to mactoolbox.c.
5117         (mac_event_parameters_to_lisp) [TARGET_API_MAC_CARBON]: New function.
5119         * macgui.h (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
5120         (mac_rect_make): New macro.
5122         * macterm.c (mac_draw_image_string_atsui) [MAC_OSX]: Use CGFloat
5123         instead of float.
5124         (mac_draw_image_string_cg) [USE_CG_TEXT_DRAWING]: Likewise.
5125         (init_cg_color, mac_draw_line, mac_draw_cg_image, XSetForeground)
5126         (XSetBackground) [USE_CG_DRAWING]: Likewise.
5127         (mac_draw_image_string_atsui) [MAC_OSX]: Use mac_rect_make instead of
5128         CGRectMake.
5129         (mac_draw_image_string_cg) [USE_CG_TEXT_DRAWING]: Likewise.
5130         (mac_erase_rectangle, mac_draw_cg_image, mac_fill_rectangle)
5131         (mac_set_clip_rectangles) [USE_CG_DRAWING]: Likewise.
5132         (XCreatePixmap, XCreatePixmapFromBitmapData): Use Window
5133         instead of WindowRef in argument type.
5134         (XCreatePixmap) [!MAC_OS8]: Don't call SetPortWindowPort.
5135         (mac_invert_rectangle): Use CGContextSetBlendMode if available.
5136         (mac_set_clip_rectangles, mac_reset_clip_rectangles): Take argument F
5137         instead of DISPLAY.  All uses changed.
5138         (mac_handle_size_change): Don't call SET_FRAME_GARBAGED.
5139         (x_calc_absolute_position): Simplify so as not to use
5140         FRAME_PIXEL_WIDTH/FRAME_PIXEL_HEIGHT.
5142         * macterm.h (XCreatePixmap, XCreatePixmapFromBitmapData): Use Window
5143         instead of WindowRef in argument type.
5144         (create_apple_event_from_event_ref, create_apple_event_from_drag_ref)
5145         [TARGET_API_MAC_CARBON]: Remove externs.
5146         (create_apple_event, mac_event_parameters_to_lisp)
5147         [TARGET_API_MAC_CARBON]: Add externs.
5149         * mactoolbox.c (Vmac_ts_script_language_on_focus)
5150         (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs.
5151         (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part
5152         is clicked.
5153         (x_activate_menubar): Remove extern for saved_menu_event_location.
5154         (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]:
5155         Move from mac.c.
5157 2008-04-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
5159         * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)
5160         [HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
5162 2008-04-23  Jason Rumney  <jasonr@gnu.org>
5164         * w32.c (stat): When Vw32_get_true_file_attributes is Qlocal, get
5165         attributes only for local files.
5167         * w32proc.c (syms_of_ntproc): Change Vw32_get_true_file attributes
5168         default to Qlocal.
5170 2008-04-22  Juri Linkov  <juri@jurta.org>
5172         * buffer.c (Fswitch_to_buffer): Change interactive spec to call
5173         read-buffer-to-switch instead of using the letter "B".
5175 2008-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
5177         * fileio.c (Qdefault_directory): New variable.
5178         (Fread_file_name): Use it to pass `dir' to the completion functions.
5180 2008-04-20  Chong Yidong  <cyd@stupidchicken.com>
5182         * xdisp.c (pos_visible_p): Check if iterator stops on a display string.
5184 2008-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
5186         * keyboard.c (Vpre_help_message): Remove.
5187         (show_help_echo): Remove default C code.
5189         * dired.c (directory_files_internal, file_name_completion):
5190         Only call ENCODE_FILE if the string is indeed decoded.
5192 2008-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
5194         * Makefile.in (TOOLKIT_DEFINES): Remove.
5195         (LIBW): Use a bit less #if, remove left over OPEN_LOOK stuff.
5197 2008-04-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
5199         * Makefile.in (MAC_OBJ): Add mactoolbox.o.
5200         (mactoolbox.o): New target.
5202         * mac.c [MAC_OSX] (select_and_poll_event, sys_select):
5203         Use mac_run_loop_run_once instead of CFRunLoopRunInMode.
5205         * macfns.c (x_set_background_color, mac_window, x_create_tip_frame):
5206         Use mac_set_frame_window_background instead of XSetWindowBackground.
5207         (x_set_tool_bar_lines) [USE_MAC_TOOLBAR]:
5208         Use mac_is_window_toolbar_visible instead of IsWindowToolbarVisible.
5209         (x_set_name_internal) [TARGET_API_MAC_CARBON]: Use mac_set_window_title
5210         instead of SetWindowTitleWithCFString.
5211         (mac_update_proxy_icon) [TARGET_API_MAC_CARBON]: Remove BLOCK_INPUT.
5212         Move function to mactoolbox.c.
5213         (mac_update_title_bar) [TARGET_API_MAC_CARBON]:
5214         Use mac_set_window_modified instead of SetWindowModified.
5215         Add BLOCK_INPUT around mac_set_window_modified/mac_update_proxy_icon.
5216         (mac_window, x_create_tip_frame): Use mac_create_frame_window.
5217         (Fx_focus_frame): Use mac_front_non_floating_window instead of
5218         FrontNonFloatingWindow.  Use mac_activate_window instead of
5219         ActivateWindow.  Use mac_active_non_floating_window instead of
5220         ActiveNonFloatingWindow.
5221         (show_hourglass, hide_hourglass) [TARGET_API_MAC_CARBON]:
5222         Use mac_show_hourglass and mac_hide_hourglass.
5223         (compute_tip_xy) [TARGET_API_MAC_CARBON]: Use mac_get_global_mouse
5224         instead of GetGlobalMouse.
5225         (Fx_show_tip): Use mac_move_window/mac_size_window/mac_show_window
5226         instead of MoveWindow/SizeWindow/ShowWindow, respectively.
5227         Use mac_bring_window_to_front instead of BringToFront.
5228         (Qfile_name_history) [TARGET_API_MAC_CARBON]: Move extern to
5229         mactoolbox.c.
5230         (Fx_file_dialog) [TARGET_API_MAC_CARBON]: Move function body to
5231         mac_file_dialog in mactoolbox.c.  Use mac_file_dialog.
5232         (mac_nav_event_callback) [TARGET_API_MAC_CARBON]: Move function to
5233         mactoolbox.c.
5235         * macgui.h [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
5236         (XtPointer): Move typedef from macmenu.c.
5237         (enum button_type): Move enum from macmenu.c.
5238         (widget_value): Move typedef from macmenu.c.
5239         (M_APPLE, I_ABOUT, EXTRA_STACK_ALLOC, ARGV_STRING_LIST_ID)
5240         (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
5241         (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH, DIALOG_MAX_INNER_WIDTH)
5242         (DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
5243         (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
5244         (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
5245         (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
5246         (DIALOG_ICON_TOP_MARGIN): Move defines from macmenu.c.
5247         (Selection): Move typedef from macselect.c.
5248         (RAM_TOO_LARGE_ALERT_ID, ABOUT_ALERT_ID) [MAC_OS8]: Move defines from
5249         macterm.c.
5250         (mac_set_window_title, mac_set_window_modified, mac_is_window_visible)
5251         (mac_is_window_collapsed, mac_bring_window_to_front)
5252         (mac_send_window_behind, mac_hide_window, mac_show_window)
5253         (mac_collapse_window, mac_front_non_floating_window)
5254         (mac_active_non_floating_window, mac_activate_window)
5255         (mac_move_window_structure, mac_move_window, mac_size_window)
5256         (mac_get_global_mouse, mac_is_window_toolbar_visible): New defines.
5258         * macmenu.c [!TARGET_API_MAC_CARBON]: Move includes to mactoolbox.c.
5259         (enum mac_menu_kind): Move enum to mactoolbox.c.
5260         (min_menu_id): Move variable to mactoolbox.c.
5261         (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]: Likewise.
5262         (DIALOG_WINDOW_RESOURCE): Move define to mactoolbox.c.
5263         (DIALOG_BUTTON_COMMAND_ID_OFFSET, DIALOG_BUTTON_COMMAND_ID_P)
5264         (DIALOG_BUTTON_COMMAND_ID_VALUE, DIALOG_BUTTON_MAKE_COMMAND_ID)
5265         [TARGET_API_MAC_CARBON]: Likewise.
5266         (XtPointer): Move typedef to macgui.h.
5267         (enum button_type): Move enum to macgui.h.
5268         (widget_value): Move typedef to macgui.h.
5269         (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
5270         (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH, DIALOG_MAX_INNER_WIDTH)
5271         (DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
5272         (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
5273         (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
5274         (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
5275         (DIALOG_ICON_TOP_MARGIN): Move defines to macgui.h.
5276         (popup_activated_flag): Make variable non-static.
5277         (x_activate_menubar, install_menu_quit_handler, pop_down_menu)
5278         (add_menu_item, fill_menu, dispose_menus):
5279         Move functions to mactoolbox.c.
5280         (restore_show_help_function, menu_target_item_handler)
5281         (install_menu_target_item_handler, mac_handle_dialog_event)
5282         (install_dialog_event_handler, pop_down_dialog, create_and_show_dialog)
5283         [TARGET_API_MAC_CARBON]: Likewise.
5284         (menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: Likewise.
5285         (mac_dialog) [!TARGET_API_MAC_CARBON]: Likewise.
5286         (find_and_call_menu_selection, name_is_separator): Make function
5287         non-static.
5288         (Vshow_help_function, timer_check) [TARGET_API_MAC_CARBON]: Move extern
5289         to mactoolbox.c.
5290         (set_frame_menubar): Don't call install_menu_quit_handler.
5291         (menu_item_selection): New variable.
5292         (mac_menu_show): Use create_and_show_popup_menu.
5293         (create_and_show_dialog) [TARGET_API_MAC_CARBON]: Don't return
5294         selection but set variable menu_item_selection.  All uses changed.
5295         (mac_fill_menubar): Rename from fill_menubar.  All uses changed.
5296         Call install_menu_quit_handler.  Move to mactoolbox.c.
5298         * macselect.c [!TARGET_API_MAC_CARBON]: Don't include Scrap.h.
5299         (Selection): Move typedef to macgui.h.
5300         (Vselection_converter_alist, Qmac_scrap_name, Qmac_ostype)
5301         (Vmac_apple_event_map, Qmac_apple_event_class, Qmac_apple_event_id):
5302         Make variables non-static.
5303         (Vmac_dnd_known_types) [TARGET_API_MAC_CARBON]: Likewise.
5304         (mac_handle_apple_event, cleanup_all_suspended_apple_events):
5305         Make functions non-static.
5306         (Vmac_service_selection) [MAC_OSX]: Likewise.
5307         (mac_get_selection_from_symbol, get_flavor_type_from_symbol)
5308         (mac_valid_selection_target_p, mac_clear_selection)
5309         (mac_get_selection_ownership_info, mac_valid_selection_value_p)
5310         (mac_put_selection_value, mac_selection_has_target_p)
5311         (mac_get_selection_value, mac_get_selection_target_list)
5312         (init_apple_event_handler, install_drag_handler, remove_drag_handler):
5313         Move functions to mactoolbox.c.
5314         (mac_do_track_drag, mac_do_receive_drag) [TARGET_API_MAC_CARBON]:
5315         Likewise.
5316         (copy_scrap_flavor_data, mac_handle_service_event)
5317         (install_service_handler) [MAC_OSX]: Likewise.
5318         (syms_of_macselect) <Vmac_dnd_known_types>:
5319         Use mac_dnd_default_known_types.
5321         * macterm.h (FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y):
5322         Move to mactoolbox.c.
5323         (HOURGLASS_WIDTH, HOURGLASS_HEIGHT): Change to 15.
5324         (Fx_selection_owner_p): Add EXFUN.
5325         (install_window_handler, remove_window_handler, XSetWindowBackground):
5326         Remove externs.
5327         (do_apple_menu) [!TARGET_API_MAC_CARBON]: Likewise.
5328         (mac_prepare_for_quickdraw) [USE_CG_DRAWING]: Likewise.
5329         (x_raise_frame, x_lower_frame, mac_alert_sound_play)
5330         (install_application_handler, mac_get_frame_bounds, mac_get_frame_mouse)
5331         (mac_convert_frame_point_to_global, mac_set_frame_window_background)
5332         (mac_update_begin mac_update_end, mac_frame_up_to_date, x_flush)
5333         (mac_create_frame_window, mac_dispose_frame_window, mac_begin_clip)
5334         (mac_end_clip, mac_create_scroll_bar, mac_dispose_scroll_bar)
5335         (mac_set_scroll_bar_bounds, mac_redraw_scroll_bar, mac_fill_menubar)
5336         (create_and_show_popup_menu, mac_get_selection_from_symbol)
5337         (mac_valid_selection_target_p, mac_clear_selection)
5338         (mac_get_selection_ownership_info, mac_valid_selection_value_p)
5339         (mac_put_selection_value, mac_selection_has_target_p)
5340         (mac_get_selection_value, mac_get_selection_target_list): Add externs.
5341         (mac_update_proxy_icon, mac_show_hourglass, mac_hide_hourglass)
5342         (mac_reposition_hourglass, mac_file_dialog, create_and_show_dialog)
5343         (mac_dnd_default_known_types) [TARGET_API_MAC_CARBON]: Likewise.
5344         (mac_run_loop_run_once) [MAC_OSX]: Likewise.
5345         (mac_dialog) [!TARGET_API_MAC_CARBON]: Likewise.
5346         (mac_begin_cg_clip, mac_end_cg_clip) [USE_CG_DRAWING]: Likewise.
5347         (x_set_toolkit_scroll_bar_thumb) [!USE_TOOLKIT_SCROLL_BARS]: Likewise.
5348         (x_scroll_bar_set_handle) [!USE_TOOLKIT_SCROLL_BARS]: Likewise.
5350         * mactoolbox.c: New file.
5352 2008-04-18  Jason Rumney  <jasonr@gnu.org>
5354         * dired.c (Ffile_attributes) [WINDOWSNT]: Cast uid and gid to unsigned.
5356 2008-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
5358         * character.c (Fmultibyte_char_to_unibyte):
5359         Return latin1 chars unchanged.
5361         * fileio.c (Fexpand_file_name): Refine last fix so `nm' is only
5362         relocated if it points to `name'.
5364 2008-04-17  Kenichi Handa  <handa@m17n.org>
5366         * data.c (Faset): Allow setting a multibyte character in an
5367         ASCII-only unibyte string.
5369         * lisp.h (STRING_SET_MULTIBYTE): New macro.
5371 2008-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
5373         * Makefile.in: Don't use HAVE_GTK and don't -DUSE_GTK since it's now
5374         done in config.h.
5376 2008-04-16  Juanma Barranquero  <lekktu@gmail.com>
5378         * character.c (Fchar_bytes, Fchar_width, Fstring_width)
5379         (Fchar_direction): Add usage in the docstring.
5381 2008-04-15  Chong Yidong  <cyd@stupidchicken.com>
5383         * keyboard.c (read_key_sequence): Remove always-true checks.
5385 2008-04-14  Jason Rumney  <jasonr@gnu.org>
5387         * w32font.c (w32font_open_internal): Set max_bounds.descent in
5388         compatibility struct, for better underline positioning.
5390 2008-04-13  David Hansen  <david.hansen@gmx.net>
5392         * dbusbind.c (dbus-get-unique-name): Remove extra copying of name
5393         string.
5395 2008-04-12  Dan Nicolaescu  <dann@ics.uci.edu>
5397         * m/hp800.h (XUINT, XSET): Remove.
5399 2008-04-12  Juanma Barranquero  <lekktu@gmail.com>
5401         * fileio.c (Fexpand_file_name): Add declaration for `p' missing in
5402         previous change.
5404 2008-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
5406         * fileio.c (Fexpand_file_name): Tighten the scope of `p' and `o' vars.
5407         Relocate `nm' after calling DECODE_FILE, in case the GC was run.
5409 2008-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
5411         * keymap.h (map_keymap_canonical): Declare.
5412         * xmenu.c (single_keymap_panes): Use it.
5414 2008-04-11  Glenn Morris  <rgm@gnu.org>
5416         * eval.c (Fdefvaralias): If the alias is bound and the target is not,
5417         set the target's value to that of the alias.
5419 2008-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
5421         * term.c (set_tty_color_mode): Left over typo.
5423 2008-04-10  Michael Albinus  <michael.albinus@gmx.de>
5425         * fileio.c (Fmake_symbolic_link): Surround code by #ifdef S_IFLNK
5426         only after check for file name handler functions.  Signal, when
5427         native functionality is not supported.
5428         (syms_of_fileio): Declare it unconditionally.
5430 2008-04-10  Jason Rumney  <jasonr@gnu.org>
5432         * w32menu.c (is_simple_dialog, simple_dialog_show): New functions.
5433         (Fx_popup_dialog): Handle simple yes/no questions as dialogs.
5435         * w32.c (logon_network_drive): Also logon to remote drives that
5436         are mapped to drive letters.
5438 2008-04-10  Glenn Morris  <rgm@gnu.org>
5440         * xdisp.c (truncate-partial-width-windows): Doc fix.
5442 2008-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
5444         * fileio.c (read_file_name_cleanup, Fread_file_name_internal):
5445         Move functions to minibuffer.el.
5446         (syms_of_fileio): Don't declare them.
5448 2008-04-09  Stefan Monnier  <monnier@iro.umontreal.ca>
5450         * minibuf.c (Vcompletion_auto_help): Move to minibuffer.el.
5451         (syms_of_minibuf): Remove its initialization.
5453         * minibuf.c (temp_echo_area_glyphs): Remove unused function.
5455 2008-04-09  Juanma Barranquero  <lekktu@gmail.com>
5457         * editfns.c (Ffield_string_no_properties): Fix typo in docstring.
5459 2008-04-09  Jason Rumney  <jasonr@gnu.org>
5461         * makefile.w32-in (distclean): Delete makefile too.
5462         (maintainer-clean): New target.
5464         * xdisp.c (redisplay_internal) [!WINDOWSNT]: Conditionalize last change.
5466         * w32term.c (w32_compute_glyph_string_overhangs): Compute overhangs
5467         for new font backend and composite cases.
5469 2008-04-09  Jan Djärv  <jan.h.d@swipnet.se>
5471         * atimer.c (alarm_signal_handler): Call run_timers if not SYNC_INPUT.
5472         Most of the code moved to run_timers.
5473         (do_pending_atimers): Call run_timers.
5474         (run_timers): New function.
5476         * sysdep.c (emacs_write): If SYNC_INPUT and pending_atimers,
5477         run atimers.
5479         * process.c (wait_reading_process_output): The same as above.
5481 2008-04-09  Stefan Monnier  <monnier@iro.umontreal.ca>
5483         * minibuf.c (last_exact_completion): Remove variable.
5484         (Fdelete_minibuffer_contents, do_completion, Fminibuffer_complete)
5485         (complete_and_exit_1, complete_and_exit_2)
5486         (Fminibuffer_complete_and_exit, Fminibuffer_complete_word)
5487         (Fdisplay_completion_list, display_completion_list_1)
5488         (Fminibuffer_completion_help, Fself_insert_and_exit)
5489         (Fexit_minibuffer, Fminibuffer_message): Move functions to
5490         minibuffer.el.
5491         (syms_of_minibuf): Remove corresponding initializations.
5493         * keyboard.c (Qdeactivate_mark): New var.
5494         (command_loop_1): Use it to call `deactivate-mark'.
5495         (syms_of_keyboard): Initialize it.
5497         * xdisp.c (redisplay_internal): Reset tty's color_mode when switching
5498         to another frame.
5499         * frame.c (do_switch_frame): Refine the top_frame/async_visible code.
5500         Don't call set_tty_color_mode.
5501         (store_frame_param): Reset previous_frame rather than call
5502         set_tty_color_mode.
5503         * term.c (set_tty_color_mode): Rewrite.
5504         * dispextern.h (set_tty_color_mode): New type.
5505         * termchar.h (struct tty_display_info): Add `previous_color_mode'.
5507 2008-04-08  Stefan Monnier  <monnier@iro.umontreal.ca>
5509         * keymap.c (access_keymap): Remove the value 2 for t_ok which was used
5510         for generic chars, which do not exist any more in emacs-unicode.
5512 2008-04-08  Michael Albinus  <michael.albinus@gmx.de>
5514         * coding.c (detect_coding_emacs_mule)
5515         (Ffind_operation_coding_system): Fix typo.
5517 2008-04-08  Jason Rumney  <jasonr@gnu.org>
5519         * w32uniscribe.c (SNAME): Extract only symbol name.
5521         * w32font.h (struct w32_metric_cache): New struct.
5522         (w32font_info): Use it.
5523         (W32METRIC_NO_ATTEMPT, W32METRIC_SUCCESS, W32METRIC_FAIL)
5524         (CACHE_BLOCKSIZE): New constants.
5526         * w32font.c (Qja, Qko, Qzh): New symbols.
5527         (syms_of_w32font): Initialise them.
5528         (font_matches_spec): Use them to filter by language.
5529         (recompute_cached_metrics): Remove function.
5530         (compute_metrics, clear_cached_metrics): New functions.
5531         (w32font_encode_char): Use them to manage metric cache.
5532         (w32font_text_extents): Cache metrics for all glyphs on demand.
5533         Delay converting glyph indices to WORD until needed.
5534         (w32font_open_internal): Initialize metric cache to empty.
5535         (registry_to_w32_charset): Charset should always be a symbol.
5536         (fill_in_logfont, list_all_matching_fonts): Family should
5537         always be a symbol.
5539 2008-04-06  Jason Rumney  <jasonr@gnu.org>
5541         * w32uniscribe.c (uniscribe_shape): Increase items buffer size.
5542         Give up if glyph indices not supported.  Use uniscribe obtained
5543         ABC widths for individual metrics.  Map glyph clusters back to
5544         characters using fClusterStart flag.  Return number of glyphs
5545         produced, not chars processed.
5546         (uniscribe_shape): Map char at FROM to current glyph.
5548 2008-04-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
5550         * macmenu.c (fill_menu) [TARGET_API_MAC_CARBON]:
5551         Use SetMenuItemHierarchicalMenu.
5553 2008-04-05  Jason Rumney  <jasonr@gnu.org>
5555         * image.c (pbm_load): Allow color values up to 65535.
5556         Throw an error if max_color_idx is outside the supported range.
5557         Report an error when image size is invalid.
5558         Read two bytes at a time when raw images have max_color_idx above 255.
5560 2008-04-05  Eli Zaretskii  <eliz@gnu.org>
5562         * w32.c (readdir): If FindFirstFile/FindNextFile return in
5563         cFileName a file name that includes `?' characters, use the 8+3
5564         alias in cAlternateFileName instead.
5566 2008-04-05  Kenichi Handa  <handa@ni.aist.go.jp>
5568         * ccl.c (ccl_driver): If ccl->quit_silently is nonzero, don't
5569         append "CCL: Quitted" when the CCL program is quitted.
5570         (setup_ccl_program): Initialize ccl->quit_silently to zero.
5572         * ccl.h (struct ccl_program): New member quit_silently.
5574 2008-04-05  Chong Yidong  <cyd@stupidchicken.com>
5576         * search.c (compile_pattern_1): Treat non-nil and non-string of
5577         search-spaces-regexp as nil.
5579         * minibuf.c (Fassoc_string): Tweak docstring.
5581 2008-04-05  Eli Zaretskii  <eliz@gnu.org>
5583         * dired.c (Ffile_attributes): Support inode numbers wider than 32
5584         bits.  Remove ugly WINDOWSNT-specific kludge introduced on
5585         2008-03-14 to force inode be positive.
5587         * w32.c (sys_chown, stat, fstat): Use S_* constants instead of
5588         _S_* ones, since we now use our own sys/stat.h.
5589         (stat, fstat): Don't mangle the inode number.
5590         (init_user_info): Don't restrict UID and GID to 0-60000 range.
5592 2008-04-04  Stefan Monnier  <monnier@iro.umontreal.ca>
5594         * frame.h (struct frame): Give one more bit to `visible' since we use
5595         values larger than 1 to indicate obscured frames on ttys.
5597         * keymap.c (Qkeymap_canonicalize): New var.
5598         (Fmap_keymap_internal): New fun.
5599         (describe_map): Use keymap-canonicalize.
5601         * undo.c (last_boundary_buffer, last_boundary_position): New vars.
5602         (Fundo_boundary): Set them.
5603         (syms_of_undo): Initialize them.
5604         (record_point): Use them instead of last_point_position*.
5605         (last_undo_buffer): Change type.
5607 2008-04-04  Jason Rumney  <jasonr@gnu.org>
5609         * w32font.c (w32font_text_extents): Use font's ascent and descent.
5610         (recompute_cached_metrics): Don't set ascent and descent per char.
5612         * w32uniscribe.c (uniscribe_check_otf): Fix last change.
5613         (uniscribe_check_otf): Add GC protection before consing.
5614         Rearrange loop for counting features.
5616 2008-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
5618         * insdel.c (insert_from_buffer_1): Don't compare bytes in destination
5619         buffer with byte-size of source buffer.
5621 2008-04-03  Chong Yidong  <cyd@stupidchicken.com>
5623         * callint.c (Fcall_interactively): Handle temporary region even
5624         when shift-select-mode is off.
5626 2008-04-03  Jason Rumney  <jasonr@gnu.org>
5628         * w32uniscribe.c (uniscribe_check_otf): Sanity check otf_spec.
5630 2008-04-03  Kenichi Handa  <handa@m17n.org>
5632         * coding.c (CATEGORY_MASK_ANY): Add CATEGORY_MASK_UTF_16_AUTO.
5633         (CATEGORY_MASK_UTF_16): Likewise.
5634         (detect_coding_utf_16): Add heuristics to reject utf-16 for a
5635         binary file.
5636         (detect_coding): Add null-byte detection for a binary file.
5637         (detect_coding_system): Likewise.
5639 2008-04-03  Jason Rumney  <jasonr@gnu.org>
5641         * w32uniscribe.c: New file.
5643         * font.h (uniscribe_font_driver) [WINDOWSNT]: Declare for w32fns.c.
5645         * w32font.h (uniscribe_check_otf): Declare for w32font.c.
5647         * w32font.c (Qbalinese, Qbuginese, Qbuhid, Qcuneiform, Qcypriot)
5648         (Qdeseret, Qglagolitic, Qgothic, Qhanunoo, Qkharoshthi)
5649         (Qlimbu, Qlinear_b, Qold_italic, Qold_persian, Qosmanya)
5650         (Qphags_pa, Qphoenician, Qshavian, Qsyloti_nagri)
5651         (Qtagalog, Qtagbanwa, Qtai_le, Qtifinagh, Qugaritic)
5652         (Qphonetic): New symbols.
5653         (syms_of_w32font): Initialize them.
5654         (font_supported_scripts): Use them.
5655         (w32font_list_family): List all charsets.
5656         (w32font_text_extents, recompute_cached_metrics): Fix metric
5657         calculations.
5658         (w32_enumfont_pattern_entity): Make full_type a DWORD.
5659         Give opentype fonts their own format.
5660         (font_matches_spec): New arguments backend and logfont.
5661         Handle :otf spec for uniscribe backend.
5662         (add_font_entity_to_list): Match truetype fonts in uniscribe backend.
5663         (fill_in_logfont): Use DEFAULT_CHARSET when charset not supplied.
5665         * w32fns.c (Fx_create_frame): Conditionally register uniscribe
5666         font backend.
5667         (globals_of_w32fns): Initialize uniscribe font backend.
5669         * makefile.w32-in (CONFIG_H): New variable.  Use it to clean up
5670         dependencies.
5671         (w32uniscribe.$(O)): New file to build.
5672         (FONT_OBJ): Include w32uniscribe.$(O).
5673         (LIBS): Add uniscribe libraries.
5675         * ftfont.c (ftfont_get_open_type_spec): Check spec->script, not val.
5677 2008-04-02  Chong Yidong  <cyd@stupidchicken.com>
5679         * callint.c (Vshift_select_mode): New var.
5680         (Finteractive): Document new ^ spec.
5681         (Fcall_interactively): Call handle-shift-selection if the ^ spec
5682         is present.
5684         * keyboard.c (Vthis_command_keys_shift_translated): New var.
5685         (command_loop_1): Avoid running the direct display versions of
5686         forward-char and backward-char if shift-selection may occur.
5687         (read_key_sequence): Set Vthis_command_keys_shift_translated if
5688         shift-translation takes place.
5690         * buffer.c (Vtransient_mark_mode): Move docstring to simple.el to
5691         avoid clobbering by define-minor-mode.
5693         * cmds.c (Fforward_char, Fbackward_char, Fforward_line)
5694         (Fbeginning_of_line, Fend_of_line): Add ^ interactive spec.
5696         * syntax.c (Fforward_word): Add ^ interactive spec.
5698         * window.c (Fscroll_up, Fscroll_down, Fscroll_left)
5699         (Fscroll_right): Add ^ interactive spec.
5701 2008-04-01  Stefan Monnier  <monnier@iro.umontreal.ca>
5703         * xdisp.c (try_window_id): Don't forget to reset delta_bytes.
5705         * casefiddle.c (casify_object): Fix up int/EMACS_INT mixup.
5707         * charset.c (Funibyte_charset, Fset_unibyte_charset): Remove.
5709 2008-03-31  Juri Linkov  <juri@jurta.org>
5711         * window.c (Fdisplay_buffer): Reinitialize `tem' to nil.
5713 2008-03-30  Jan Djärv  <jan.h.d@swipnet.se>
5715         * gtkutil.c (xg_set_geometry): Fix indentation.
5716         (xg_resize_outer_widget): Remove.
5717         (x_wm_size_hint_off): Fix indentation.
5718         (xg_frame_set_char_size): Call flush_and_sync after
5719         gtk_window_resize.
5720         (x_wm_set_size_hint): Pass NULL as geometry window to
5721         gtk_window_set_geometry_hints due to Gtk+ bug nr 68668.
5722         Add menu bar and tool bar height to base height.
5723         (xg_update_frame_menubar, free_frame_menubar)
5724         (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
5725         (update_frame_tool_bar, free_frame_tool_bar):
5726         Change xg_resize_outer_widget to xg_frame_set_char_size.
5728 2008-03-30  Michael Albinus  <michael.albinus@gmx.de>
5730         * dbusbind.c (QCdbus_timeout): New D-Bus internal symbol.
5731         (Fdbus_call_method): New parameter TIMEOUT.
5732         (dbus-send-signal): Optimize UNGCPRO call.
5734 2008-03-29  Juri Linkov  <juri@jurta.org>
5736         * window.c (Fdisplay_buffer): Move call to
5737         Vsplit_window_preferred_function out of conditions that check
5738         if window is eligible for vertical splitting.
5739         When Vsplit_window_preferred_function is non-nil, call it and use
5740         its non-nil return value as window.  Otherwise, continue doing
5741         vertical splitting using Fsplit_window with arg horflag=nil.
5742         (syms_of_window) <Vsplit_window_preferred_function>: Change the
5743         default value from `split-window' to nil.
5745 2008-03-29  Juri Linkov  <juri@jurta.org>
5747         * callint.c (Fcall_interactively): Revert 2008-03-16 change
5748         for interactive code letters 'b' and 'B'.
5750 2008-03-29  Eli Zaretskii  <eliz@gnu.org>
5752         * fileio.c (Fexpand_file_name): Convert the value of $HOME to a
5753         multibyte string.
5755 2008-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
5757         * keyboard.c (pending_funcalls): New var.
5758         (timer_check): Run it.
5759         (syms_of_keyboard): Initialize it.
5760         * terminal.c (Qrun_hook_with_args, Qdelete_terminal_functions)
5761         (Vdelete_terminal_functions): New vars.
5762         (syms_of_terminal): Initialize them.
5763         (Fdelete_terminal): Run delete-terminal-functions.
5764         * xdisp.c (safe_eval): Rewrite.
5765         (safe_call2): New fun.
5766         * frame.c (Qdelete_frame_functions): New var.
5767         (syms_of_frame): Initialize it.
5768         (Fdelete_frame): Use it and use safe_call2 and pending_funcalls.
5769         * lisp.h (safe_call2, pending_funcalls): Declare.
5771 2008-03-28  Andreas Schwab  <schwab@suse.de>
5773         * indent.c (Fmove_to_column): Move declaration before statements.
5775 2008-03-27  Stefan Monnier  <monnier@iro.umontreal.ca>
5777         * frame.h (enum fullscreen_type): Give it a name.  Move it before use.
5778         (struct frame): Use bit fields for boolean vars.
5780         * process.c (server_accept_connection): Simplify naming.
5781         (emacs_get_tty_pgrp): Use SDATA.
5783         * coding.c (decode_coding_object): Fix last change.
5785 2008-03-27  Jason Rumney  <jasonr@gnu.org>
5787         * w32fns.c (start_hourglass): Suppress hourglass on tty frames.
5789 2008-03-27  Kenichi Handa  <handa@ni.aist.go.jp>
5791         * charset.c (Fdefine_charset_internal): Change the way of
5792         registering charsets in Vcharset_order_list.
5793         (syms_of_charset): Make the charset `eight-bit' supplementary.
5795 2008-03-26  Alexandre Oliva  <aoliva@redhat.com>  (tiny change)
5797         * regex.c (EXTEND_BUFFER): Change order of pointer addition
5798         operations, to avoid having the difference between pointers
5799         overflow.
5801 2008-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
5803         * indent.c (check_display_width): New fun.
5804         (scan_for_column): Use it.
5806         * data.c (syms_of_data): Mark most-positive-fixnum and
5807         most-negative-fixnum as constants.
5809         * xdisp.c (redisplay_internal): Reset selected_frame earlier.
5811         * indent.c (scan_for_column): Extract from current_column_1.
5812         Merge with the same code from Fmove_to_column.
5813         (current_column_1, Fmove_to_column): Use it.
5815 2008-03-25  Stefan Monnier  <monnier@iro.umontreal.ca>
5817         * keymap.c (map_keymap_internal): New fun.
5818         (map_keymap): Use it.
5819         (Fmap_keymap_internal): New fun.
5820         (Fmap_keymap): Remove left-out test from before make_save_value.
5822         * keymap.c (Fmap_keymap): Use `map-keymap-sorted.
5824         * frame.c (Fmodify_frame_parameters, x_set_frame_parameters):
5825         Use XCAR/XCDR.
5827         * process.h (struct Lisp_Process): Remove filter_multibyte.
5828         * process.c (QCfilter_multibyte): Remove.
5829         (setup_process_coding_systems): Don't use filter_multibyte.
5830         (Fstart_process, Fmake_network_process): Don't set filter_multibyte.
5831         (read_process_output): Don't adjust multibyteness to filter_multibyte.
5832         (Fset_process_filter_multibyte): Change the coding-system to
5833         approximate the previous behavior.
5834         (Fprocess_filter_multibyte_p): Get the multibyteness straight from the
5835         coding-system.
5837         * coding.c (decode_coding_object): When not decoding into a buffer,
5838         obey the coding system's preference of (uni|multi)byte.
5840 2008-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
5842         * casefiddle.c (casify_object): Avoid pathological N^2 worst case if
5843         every char is changed and has a different byte-length.
5844         (Fupcase_word, Fdowncase_word, Fcapitalize_word, operate_on_word):
5845         Fix int -> EMACS_INT.
5847 2008-03-23  David Hansen  <david.hansen@gmx.net>
5849         * dbusbind.c (xd_read_message): Remove extra copying of message
5850         strings.  Check for NULL `interface' or `member'.
5852 2008-03-22  Eli Zaretskii  <eliz@gnu.org>
5854         * w32.c (readdir): If FindFirstFile/FindNextFile return in
5855         cFileName a file name that includes `?' characters, use the 8+3
5856         alias in cAlternateFileName instead.
5858 2008-03-21  Stefan Monnier  <monnier@iro.umontreal.ca>
5860         * buffer.c (enlarge_buffer_text): Fix int -> EMACS_INT.
5862 2008-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
5864         * intervals.c (temp_set_point, temp_set_point_both): Use EMACS_INT.
5865         (set_point, set_point_both): Use EMACS_INT.  Remove `buffer' arg,
5866         work on current_buffer only instead (that was already the case
5867         for some of the code anyway).
5868         * buffer.h (set_point, set_point_both): Remove buffer arg, use long int.
5869         (temp_set_point, temp_set_point_both): Use EMACS_INT.
5870         (SET_PT, SET_PT_BOTH): Adjust.
5871         * intervals.h (set_point, temp_set_point, set_point_both)
5872         (temp_set_point_both): Remove redundant declarations.
5874 2008-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
5876         * fileio.c (Finsert_file_contents):
5877         * lread.c (Feval_buffer): Use BUF_TEMP_SET_PT.
5878         * buffer.h (BUF_SET_PT): Remove.  set_point_both doesn't work right
5879         when buffer != current_buffer anyway.
5881 2008-03-20  Andreas Schwab  <schwab@suse.de>
5883         * callint.c (Fcall_interactively) [case 'B']: Use other-buffer
5884         as default.
5886 2008-03-19  Jason Rumney  <jasonr@gnu.org>
5888         * w32fns.c (hourglass_timer, hourglass_hwnd): New variables.
5889         (syms_of_w32fns): Initialize them.
5890         (HOURGLASS_ID): New constant.
5891         (x_window_to_frame): Don't check hourglass_window.
5892         (w32_wnd_proc) <WM_TIMER>: Handle hourglass_timer.
5893         (w32_wnd_proc) <WM_EXITMENULOOP>: Set pending hourglass cursor.
5894         (w32_wnd_proc) <WM_SETCURSOR>: Set the hourglass or current cursor.
5895         (w32_wnd_proc) <WM_EMACS_SETCURSOR>: Set frame's current_cursor.
5896         Only change the cursor if hourglass is not active.
5897         (Fx_create_frame): Initialize frame's current_cursor.
5898         (hourglass_atimer): Remove.
5899         (hourglass_started): New function.
5900         (start_hourglass, cancel_hourglass, hide_hourglass): Adapt to w32.
5901         (show_hourglass): Adapt to w32, changing argument to frame.
5903         * w32term.h (struct w32_output): Remove hourglass_window.
5904         Add current_cursor.
5906         * eval.c (call_debugger, Fsignal):
5907         * keyboard.c (recursive_edit_1, cmd_error, Ftop_level)
5908         (command_loop_1, Fread_key_sequence, Fread_key_sequence_vector)
5909         (Fexecute_extended_command, cancel_hourglass_unwind):
5910         * minibuf.c (read_minibuf):
5911         * fns.c (Fy_or_n_p): Enable hourglass when HAVE_WINDOW_SYSTEM.
5913 2008-03-19  Stefan Monnier  <monnier@iro.umontreal.ca>
5915         * window.c (run_funs): New fun.
5916         (run_window_configuration_change_hook): Use it to run the buffer-local
5917         and the global part of the hook.
5919         * xdisp.c (format_mode_line_unwind_data): Add window argument.
5920         (unwind_format_mode_line): Restore selected window.
5921         (x_consider_frame_title, Fformat_mode_line): Set selected window.
5923 2008-03-17  Stefan Monnier  <monnier@iro.umontreal.ca>
5925         * editfns.c (Fchar_equal): Check they are valid characters.
5927         * buffer.h (Fbuffer_list): Declare (for use in callint.c).
5929 2008-03-17  Andreas Schwab  <schwab@suse.de>
5931         * regex.c (re_match_2_internal): Properly match raw 8-bit bytes
5932         against a charset.
5934         * lisp.h (Fbuffer_list): Declare.
5936 2008-03-17  Jan Djärv  <jan.h.d@swipnet.se>
5938         * gtkutil.c (free_frame_tool_bar): Only call gtk_container_remove if
5939         handlebox_widget is != 0.
5941 2008-03-16  Juri Linkov  <juri@jurta.org>
5943         * callint.c (Fcall_interactively): For interactive code letters
5944         'b' and 'B' put the buffer list into the list of default "future"
5945         values of the minibuffer.
5947 2008-03-16  Andreas Schwab  <schwab@suse.de>
5949         * keyboard.c (read_key_sequence): Fix downcasing of letters with
5950         modifiers.
5952         * regex.c (re_match_2_internal): Correct matching of a charset
5953         against latin-1 characters.
5955 2008-03-16  Kenichi Handa  <handa@m17n.org>
5957         * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY)
5958         (STRING_CHAR_ADVANCE_NO_UNIFY): New macros.
5959         (coding_alloc_by_making_gap): Fix the way to preserve data in the gap.
5960         (alloc_destination): Fix the 2nd arg to coding_alloc_by_making_gap.
5961         (encode_coding_utf_8): Use CHAR_STRING_ADVANCE_NO_UNIFY instead of
5962         CHAR_STRING_ADVANCE.
5963         (produce_chars): Fix for the case that the source and the
5964         destination are the same buffer.  Use CHAR_STRING_ADVANCE_NO_UNIFY
5965         instead of CHAR_STRING_ADVANCE.
5966         (consume_chars): Use STRING_CHAR_ADVANCE_NO_UNIFY instead of
5967         STRING_CHAR_ADVANCE.
5969 2008-03-15  Andreas Schwab  <schwab@suse.de>
5971         * regex.c (re_match_2_internal): Correct matching of eight bit
5972         characters in unibyte strings.
5974 2008-03-15  Martin Rudalics  <rudalics@gmx.at>
5976         * buffer.c (overlays_in, Foverlays_in): Include empty overlays
5977         at end of range when it coincides with the end of the buffer.
5979 2008-03-14  Eli Zaretskii  <eliz@gnu.org>
5981         * dired.c (Ffile_attributes) [WINDOWSNT]: Force inode be positive.
5983         * w32fns.c (globals_of_w32fns, Fx_create_frame): Fix last change.
5985 2008-03-14  Jason Rumney  <jasonr@gnu.org>
5987         * editfns.c (initial_tz): New variable.
5988         (syms_of_editfns): Initialize it.
5989         (Fset_time_zone_rule): Set it when first called.
5990         Use it when TZSTRING is nil.
5992         * w32fns.c (MONITOR_DEFAULT_TO_NEAREST, struct MONITOR_INFO)
5993         (MonitorFromPoint_Proc, GetMonitorInfo_Proc): New definitions.
5994         (monitor_from_point_fn, get_monitor_info_fn): New globals.
5995         (globals_of_w32fns): Initialize them.
5996         (compute_tip_xy): Use them to position tooltips.
5998 2008-03-14  Glenn Morris  <rgm@gnu.org>
6000         * emacs.c (main): Revert previous change.
6001         (standard_args): Revert -internal-script back to -scriptload,
6002         and remove the long-option form.
6004 2008-03-13  Glenn Morris  <rgm@gnu.org>
6006         * emacs.c (main, standard_args): Rename -scriptload to -internal-script.
6007         Remove option -enable-font-backend.
6009 2008-03-12  Stefan Monnier  <monnier@iro.umontreal.ca>
6011         * buffer.c (Fswitch_to_buffer): Fall back on pop-to-buffer.
6013 2008-03-11  Jan Djärv  <jan.h.d@swipnet.se>
6015         * xterm.c (x_connection_closed): For GTK: If this is the last
6016         terminal just exit without closing the display.
6018 2008-03-11  Jason Rumney  <jasonr@gnu.org>
6020         * w32font.c (w32font_full_name): Use floor to round.
6022 2008-03-10  dhruva  <dhruvakm@gmail.com>  (tiny change)
6024         * sound.c (alsa_configure): Declare vol at beginning of block.
6026         * fontset.c (Ffontset_info): Remove extra semicolon.
6028 2008-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
6030         * fileio.c (Fsubstitute_in_file_name): Fix up computation of maximum
6031         size of resulting string.
6033 2008-03-10  Jason Rumney  <jasonr@gnu.org>
6035         * dispnew.c (adjust_glyph_matrix): Initialize window_height.
6037 2008-03-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
6039         * xdisp.c (handle_single_display_spec): Undo 2007-10-16 changes.
6040         Don't pretend as if characters with display property haven't been
6041         consumed for string-replacing-string case.
6043 2008-03-08  Kim F. Storm  <storm@cua.dk>
6045         * xdisp.c (GET_NEXT_DISPLAY_ELEMENT): New macro.
6046         (get_next_display_element, next_element_from_string)
6047         (next_element_from_ellipsis, next_element_from_buffer): Use it.
6049 2008-03-08  Andreas Schwab  <schwab@suse.de>
6051         * process.h (struct Lisp_Process): Declare bit fields as unsigned.
6053 2008-03-06  Jason Rumney  <jasonr@gnu.org>
6055         * w32font.c (w32_registry): Take font_type argument.  Use ANSI
6056         when charset not specified.  Only translate ANSI to unicode when
6057         font_type is truetype.
6058         (w32font_coverage_ok): New function.
6059         (add_font_entity_to_list): Use it to filter unsuitable fonts.
6061 2008-03-05  Kenichi Handa  <handa@ni.aist.go.jp>
6063         * lread.c (Fread_char): Resolve modifiers.
6064         (Fread_char_exclusive): Likewise.
6066         * character.c (char_resolve_modifier_mask): New function.
6067         (char_string): Use char_resolve_modifier_mask.
6068         (Fchar_resolve_modifiers): New function.
6069         (syms_of_character): Declare Fchar_resolve_modifiers as Lisp
6070         function.
6072 2008-03-04  Jason Rumney  <jasonr@gnu.org>
6074         * makefile.w32-in: Always include w32font.c in the build.
6075         * w32font.c: Wrap in USE_FONT_BACKEND conditional.
6077 2008-03-04  Andreas Schwab  <schwab@suse.de>
6079         * Makefile.in (clean): Remove emacs-*.*.* instead of emacs-*.
6080         (versionclean): Likewise.
6082 2008-03-04  Juanma Barranquero  <lekktu@gmail.com>
6084         * .cvsignore: Add oo.
6086 2008-03-03  Andreas Schwab  <schwab@suse.de>
6088         * coding.c (decode_coding_object): Inhibit gap shrinking while
6089         decoding in place.
6091 2008-03-03  Dan Nicolaescu  <dann@ics.uci.edu>
6093         * w32term.c: Remove unused include "gnu.h".
6094         * makefile.w32-in (w32term.o): Don't depend on gnu.h.
6096         * gnu.h: Rename to ...
6097         * emacs-icon.h: ... this.
6098         * xterm.c: Use emacs-icon.h instead of gnu.h.
6099         * Makefile (xterm.o): Depend on emacs-icon.h, not gnu.h.
6101 2008-03-03  Juanma Barranquero  <lekktu@gmail.com>
6103         * w32font.c: Include math.h.
6105 2008-03-03  Jason Rumney  <jasonr@gnu.org>
6107         * w32font.c (recompute_cached_metrics): Change font arg to w32font_info.
6108         Compute options separately.
6109         (w32font_open_internal): Set glyph_idx before caching metrics.
6111         * w32font.h (NTM_PS_OPENTYPE, NTM_TT_OPENTYPE, NTM_TYPE1):
6112         Define if system headers don't.
6113         (struct w32font_info): Enlarge ascii_metrics.  Add glyph_idx.
6114         (w32font_encode_char): Don't declare here.
6116         * w32font.c (Quniscribe, QCformat): New symbols.
6117         (syms_of_w32font): Define them.
6118         (w32font_has_char): Indicate uncertainty.
6119         (w32font_encode_char): Encode as glyph point.  Make static.
6120         (recompute_cached_metrics): New function.
6121         (w32font_open_internal): Use it.  Set font to use glyph points
6122         initially.  Set format based on type of font.
6123         (w32font_text_extents, w32font_draw): Optionally use glyph points.
6124         (w32_enumfont_pattern_entity): Accept backend arg.  Set type based
6125         on it.  Set format based on information available here.
6126         (add_font_entity_to_list): Identify backend based on opentype_only.
6128 2008-03-02  Andreas Schwab  <schwab@suse.de>
6130         * ftfont.c (ftfont_pattern_entity): Fix aliasing violations.
6132         * coding.c (decode_coding_big5, produce_chars):
6133         Fix typos in last change.
6135 2008-03-02  Kentaro Ohkouchi  <nanasess@fsm.ne.jp>
6137         * gnu.h: New icon.
6139 2008-03-02  Kenichi Handa  <handa@m17n.org>
6141         * coding.c (decode_coding_utf_8): When eol-type of CODING is
6142         `dos', don't decode '\r' if that is the last in the source.
6143         (decode_coding_utf_16, decode_coding_emacs_mule)
6144         (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
6145         (decode_coding_raw_text, decode_coding_charset): Likewise.
6146         (produce_chars): Don't decode EOL here.  Use EMACS_INT.
6148 2008-03-01  Jason Rumney  <jasonr@gnu.org>
6150         * w32font.c (w32font_full_name): Report point size for scalable fonts.
6152 2008-03-01  Kim F. Storm  <storm@cua.dk>
6154         * dispextern.h (CHAR_GLYPH_SPACE_P): Check for default face.
6156 2008-03-01  Jason Rumney  <jasonr@gnu.org>
6158         * w32font.c (w32font_full_name): New function.
6159         (w32font_open_internal): Use it.
6161 2008-03-01  Kim F. Storm  <storm@cua.dk>
6163         * dispnew.c (line_draw_cost): Fix invalid glyph check.
6165 2008-03-01  Jason Rumney  <jasonr@gnu.org>
6167         * font.c (font_unparse_fcname): Increase len when style is a symbol.
6169 2008-03-01  Jan Djärv  <jan.h.d@swipnet.se>
6171         * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call
6172         xg_frame_resized when the event is for the edit widget.
6174         * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets.
6176         * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or
6177         set_char_size.
6178         (xg_frame_resized): Renamed from xg_resize_widgets.  Remove all
6179         operations on widgets here.  Just set frame size if needed.
6180         (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions.
6181         (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing.
6182         (x_wm_set_size_hint): Set size hints on the edit widget only, not
6183         the whole frame.
6184         (xg_create_tool_bar): Move attachment of the tool bar to
6185         xg_pack_tool_bar.  Do not attach the tool bar if there are no items.
6186         (free_frame_tool_bar): Remove call to SET_FRAME_GARBAGED.
6188 2008-03-01  Jason Rumney  <jasonr@gnu.org>
6190         * w32fns.c (w32_msg_pump): Disable debug code.
6192 2008-03-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
6194         * m/intel386.h [MAC_OSX || DARWIN]: Define NO_ARG_ARRAY if _LP64.
6196 2008-02-29  Chong Yidong  <cyd@stupidchicken.com>
6198         * xdisp.c (next_overlay_string): Don't set
6199         overlay_strings_at_end_processed_p if we're currently reading from
6200         a display string.
6202 2008-02-29  Stefan Monnier  <monnier@iro.umontreal.ca>
6204         * xdisp.c (get_overlay_strings_1): Fix typo.
6206 2008-02-29  Chong Yidong  <cyd@stupidchicken.com>
6208         * xdisp.c (get_overlay_strings_1): Add missing argument type.
6210 2008-02-28  Kenichi Handa  <handa@ni.aist.go.jp>
6212         * ftfont.c (ftfont_match): Explicitly set pixelsize in pattern.
6214         * xdisp.c (display_mode_element): Cancel the previous change.
6215         (decode_mode_spec): Likewise.
6216         (handle_auto_composed_prop): Don't make composition if it->string
6217         is a string.
6219 2008-02-27  Kim F. Storm  <storm@cua.dk>
6221         * lisp.h (GLYPH): Change type from int to struct with separate char
6222         and face_id members.
6223         (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
6224         (GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
6225         (FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
6226         (GLYPH_CHAR, GLYPH_FACE): ... these.  Change users.
6227         (FAST_MAKE_GLYPH, MAKE_GLYPH): Remove.  Rewrite users to use ...
6228         (SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
6229         (GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
6230         (GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
6231         handle new Lisp glyph code encoding, either an integer or a cons.
6233         * disptab.h (GLYPH_SIMPLE_P): Rewrite.
6234         (GLYPH_ALIAS): Delete.
6235         (GLYPH_ALIAS_P, GLYPH_FOLLOW_ALIASES): Rewrite.
6236         (GLYPH_LENGTH, GLYPH_STRING): Use GLYPH_CHAR.
6237         (GLYPH_FROM_CHAR): Replace macro by ...
6238         (SET_GLYPH_FROM_CHAR): ... this macro.  Change users.
6240         * dispextern.h (CHAR_GLYPH_SPACE_P): Simplify.
6241         (GLYPH_FROM_CHAR_GLYPH): Replace macro by ...
6242         (SET_GLYPH_FROM_CHAR_GLYPH): ... this macro.  Change users.
6243         (GLYPH_INVALID_P): New macro.
6244         (spec_glyph_lookup_face): Update prototype.
6246         * dispnew.c (line_draw_cost): Adapt to new glyph type.
6247         (build_frame_matrix_from_leaf_window): Adapt to new glyph type and
6248         new glyph code encoding.
6249         (spec_glyph_lookup_face): No return value; update passed glyph instead.
6250         (init_display): Use SET_CHAR_GLYPH to initialize space_glyph.
6252         * xdisp.c (get_next_display_element, next_element_from_display_vector):
6253         Adapt to new glyph type and new glyph code encoding.
6255         * term.c (encode_terminal_code, produce_special_glyphs): Likewise.
6257         * indent.c (current_column, current_column_1, Fmove_to_column)
6258         (compute_motion): Adapt to new glyph code encoding.
6260         * msdos.c (IT_write_glyphs): Adapt to new glyph type.
6262 2008-02-27  Chong Yidong  <cyd@stupidchicken.com>
6264         * process.c (wait_reading_process_output): Check for window
6265         changes caused by timers.
6266         Suggested by Johan Bockgård.
6268 2008-02-27  Glenn Morris  <rgm@gnu.org>
6270         * emacs.c (USAGE1): Add `--disable-font-backend'.
6272 2008-02-27  Stefan Monnier  <monnier@iro.umontreal.ca>
6274         * fileio.c (Finsert_file_contents): Don't reset undo_list if no change
6275         is made to the buffer.
6277 2008-02-26  Stefan Monnier  <monnier@iro.umontreal.ca>
6279         * dispextern.h (face_at_buffer_position, face_for_overlay_string)
6280         (face_at_string_position):
6281         * xfaces.c (face_at_buffer_position, face_for_overlay_string)
6282         (face_at_string_position):
6283         * xdisp.c (display_string, next_overlay_change):
6284         * buffer.h (overlays_at):
6285         * buffer.c (overlays_at): Use EMACS_INT for buffer positions.
6286         Update callers.
6288 2008-02-26  Chong Yidong  <cyd@stupidchicken.com>
6290         * editfns.c (Fformat): Doc fix.
6292 2008-02-26  Juanma Barranquero  <lekktu@gmail.com>
6294         * font.c (Ffont_spec, Ffont_at): Fix typos in docstrings.
6295         (Ffont_put, Flist_families, Ffont_fill_gstring, Ffont_drive_otf)
6296         (Ffont_otf_alternates, Fquery_font): Doc fixes.
6298 2008-02-25  Stefan Monnier  <monnier@iro.umontreal.ca>
6300         * buffer.c (Fbuffer_swap_text): New function.
6301         (syms_of_buffer): Defsubr it.
6303 2008-02-25  Chong Yidong  <cyd@stupidchicken.com>
6305         * keyboard.c (command_loop_1): Revert 2006-10-09 change.
6307 2008-02-25  Jason Rumney  <jasonr@gnu.org>
6309         * w32font.c (w32font_draw): Draw one character at a time when padding.
6311 2008-02-25  Stefan Monnier  <monnier@iro.umontreal.ca>
6313         * window.c (Fdelete_window, Fadjust_window_trailing_edge):
6314         Handle a nil arg.  Use run_window_configuration_change_hook.
6315         (delete_window, adjust_window_trailing_edge): Don't handle nil any more.
6316         (Fenlarge_window, Fshrink_window, Fset_window_configuration):
6317         Use run_window_configuration_change_hook.
6319 2008-02-25  Kenichi Handa  <handa@ni.aist.go.jp>
6321         * xdisp.c (x_produce_glyphs): For a visible glyph, assure at least
6322         1-pixel width.
6324 2008-02-25  Kenichi Handa  <handa@ni.aist.go.jp>
6326         * xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p.
6327         (append_glyph): Set glyph->pixel_width and glyph->padding_p to 1
6328         if the glyph in the font is zero pixel with.
6330         * dispextern.h (struct glyph_string): New member padding_p.
6332         * w32font.c (w32font_draw): Pay attention to s->padding_p.
6334         * ftxfont.c (ftxfont_draw): Pay attention to s->padding_p.
6336         * xfont.c (xfont_draw): Pay attention to s->padding_p.
6338         * xftfont.c (xftfont_draw): Pay attention to s->padding_p.
6340         * font.c: If the font driver doesn't have `shape' function, return Qnil.
6342 2008-02-25  Jason Rumney  <jasonr@gnu.org>
6344         * w32fns.c (enum_font_cb2): Don't use raster fonts for Unicode.
6346 2008-02-24  Stefan Monnier  <monnier@iro.umontreal.ca>
6348         Allow fine-grained image-cache flushing.
6349         * dispextern.h (struct image): Add `dependencies' field.
6350         (clear_image_caches): Change arg to Lisp_Object.
6351         * image.c (make_image): Initialize `dependencies' field.
6352         (clear_image_cache): Change arg to allow fine-grained flushing.
6353         Perform the flush even if image-cache-eviction-delay is nil.
6354         (clear_image_caches): Change arg to Lisp_Object.
6355         (Fclear_image_cache): Expand meaning of the argument.
6356         (mark_image): Mark `dependencies' field.
6357         * xfaces.c (clear_face_cache): Adapt arg to call to clear_image_caches.
6358         (lface_hash): Use XHASH rather than XFASTINT.
6359         (face_at_buffer_position): Fix int -> EMACS_INT position.
6360         * xdisp.c (next_overlay_change): Fix int -> EMACS_INT position.
6361         (select_frame_for_redisplay): Remove code duplication.
6362         (redisplay_internal): Adapt arg to call to clear_image_caches.
6364 2008-02-24  Dan Nicolaescu  <dann@ics.uci.edu>
6366         * s/vms4-0.h:
6367         * s/vms4-2.h:
6368         * s/vms4-4.h:
6369         * s/vms5-5.h: Remove, unused.
6371         * s/irix5-2.h:
6372         * s/irix6-0.h:
6373         * s/riscos5.h:
6374         * s/mach-bsd4-3.h:
6375         * m/mips4.h: Remove files for obsolete systems.
6377         * Makefile.in:
6378         * filelock.c:
6379         * unexmips.c:
6380         * m/hp9000s300.h:
6381         * m/iris4d.h:
6382         * s/aix3-1.h:
6383         * s/hpux.h:
6384         * s/msdos.h:
6385         * s/usg5-0.h:
6386         * s/usg5-2-2.h:
6387         * s/usg5-2.h:
6388         * s/usg5-3.h: Remove references to obsolete variables.
6390         * s/irix5-0.h: Remove, move all the contents ...
6391         * s/irix6-5.h: ... here.  Simplify.
6392         * config.in: Regenerate.
6394 2008-02-24  Jason Rumney  <jasonr@gnu.org>
6396         * w32term.c (x_draw_glyph_string_background): Clear the background
6397         manually when cleartype is in use.
6398         (x_draw_glyph_string_foreground): Draw text transparently when
6399         cleartype is in use.
6401         * w32font.c (w32font_text_extents): Avoid getting HDC and selecting
6402         a font into it unless we have to.
6404 2008-02-19  Stefan Monnier  <monnier@iro.umontreal.ca>
6406         * intervals.h (INT_LISPLIKE): Remove.  It may misfire.
6407         (NULL_INTERVAL_P, SET_INTERVAL_PARENT): Don't use it.
6409 2008-02-18  Jason Rumney  <jasonr@gnu.org>
6411         * w32fns.c (Fw32_shell_execute): Encode parameters.
6413 2008-02-09  Eli Zaretskii  <eliz@gnu.org>
6415         * fileio.c (syms_of_fileio) <insert-default-directory>: Doc fix.
6417 2008-02-05  Juanma Barranquero  <lekktu@gmail.com>
6419         * unexhp9k800.c (read_header): Replace `legal' with `valid'.
6421 2008-02-24  Ulrich Neumerkel  <ulrich@complang.tuwien.ac.at>  (tiny change)
6423         * xterm.c (x_set_offset): Don't change the gravity if
6424         CHANGE_GRAVITY is -1.
6426 2008-02-23  Chong Yidong  <cyd@stupidchicken.com>
6428         * fileio.c (auto_save_error_occurred): New var.
6429         (auto_save_error): Set it.
6430         (Fdo_auto_save): Don't overwrite the error message if an auto-save
6431         error occurred.
6433 2008-02-23  Eli Zaretskii  <eliz@gnu.org>
6435         * w32.c (globals_of_w32): Add initializations for
6436         g_b_init_get_sid_sub_authority and
6437         g_b_init_get_sid_sub_authority_count.
6439 2008-02-22  Stefan Monnier  <monnier@iro.umontreal.ca>
6441         * font.c (font_match_xlfd, font_check_xlfd_parse): New funs.
6442         (font_parse_xlfd): Use them for sanity check.
6443         (Finternal_set_font_style_table): Make sure the table is bijective.
6445         Consolidate the image_cache to the terminal struct.
6446         * termhooks.h (P_): Remove redundant def.
6447         (struct terminal): New field `image_cache'.
6448         * frame.h (FRAME_IMAGE_CACHE): New macro.  Use it everywhere in place
6449         of FRAME_X_IMAGE_CACHE.
6450         * xterm.h (struct x_display_info): Remove image_cache field.
6451         (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
6452         * w32term.h (struct w32_display_info): Remove image_cache field.
6453         (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
6454         * macterm.h (struct mac_display_info): Remove image_cache field.
6455         (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
6456         * xterm.c (x_term_init):
6457         * w32term.c (w32_term_init):
6458         * macterm.c (mac_term_init): Set the image_cache in the terminal.
6459         * dispextern.h (clear_image_cache, forall_images_in_image_cache):
6460         Remove declarations.
6461         (clear_image_caches, mark_image_cache): New declarations.
6462         * xfaces.c (clear_face_cache):
6463         * xdisp.c (redisplay_internal): Use clear_image_caches.
6464         * image.c (clear_image_cache): Don't check that a frame is on
6465         a window-system before checking if it shares the same cache.
6466         (clear_image_caches): New function.
6467         (Fclear_image_cache): Use it.
6468         (mark_image): Move from allo.c.
6469         (mark_image_cache): Move from alloc.c and forall_images_in_image_cache.
6470         * alloc.c (mark_image, mark_image_cache): Move to image.c.
6471         (mark_object): Don't call mark_image_cache for frames.
6472         (mark_terminals): Call mark_image_cache.
6474         * lisp.h (Fdelete_terminal): Declare.
6476         * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
6477         (CHECK_CHARSET_GET_ATTR): Don't use the inexistent return value of
6478         wrong_type_argument.
6480 2008-02-22  Kenichi Handa  <handa@ni.aist.go.jp>
6482         * Makefile.in (lisp): Remove devanagari.el, kannada.el,
6483         malayalam.el, and tamil.el.  Add sinhala.el.
6485 2008-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>
6487         * xterm.c (x_connection_closed): Consolidate identical tests.
6488         (x_delete_terminal): Don't crash if called via x_connection_closed.
6490 2008-02-21  Kenichi Handa  <handa@ni.aist.go.jp>
6492         * xdisp.c (decode_mode_spec): New arg string.
6493         (display_mode_element): Adjust for the above change.
6495 2008-02-19  Stefan Monnier  <monnier@iro.umontreal.ca>
6497         * callint.c (Fcall_interactively): Use AREF.
6499 2008-02-18  Stefan Monnier  <monnier@iro.umontreal.ca>
6501         * font.c (font_unparse_xlfd): Don't ignore integer pixel size specs.
6503 2008-02-18  Jan Djärv  <jan.h.d@swipnet.se>
6505         * xfns.c (Fx_show_tip): Set string to " " if empty.
6507 2008-02-17  Dan Nicolaescu  <dann@ics.uci.edu>
6509         * callint.c (syms_of_callint): Initialize Vmark_even_if_inactive
6510         with Qt.
6512 2008-02-17  Kenichi Handa  <handa@m17n.org>
6514         * ftfont.c (ftfont_shape): Return Lispy number.
6516         * xfaces.c (prepare_face_for_display): Use display_info->font->fid
6517         for GCs.
6518         (Finternal_set_font_selection_order): Call font_update_sort_order
6519         only when enable_font_backend is set.
6520         (realize_x_face): Set face->font_info to that of default face only
6521         when enable_font_backend is set.
6523         * xdisp.c (handle_composition_prop): Set it->c to the fist
6524         character of the composed region.
6525         (fill_composite_glyph_string): Set base_face->font_info to
6526         s->font_info.  Get a face for ascii from base_face->ascii_face.
6527         (BUILD_COMPOSITE_GLYPH_STRING): Call fill_composite_glyph_string
6528         with a face already decided.
6529         (x_produce_glyphs): Be sure to set it->ascent and it->descent to
6530         non-negative.
6531         (x_produce_glyphs): If the composition method is ..._WITH_GLYPH_STRING,
6532         call font_prepare_composition unconditionally.
6534         * xfns.c (x_make_gc): Use the default font id of the frame for GCs.
6536         * xterm.h (struct x_display_info): New member font.
6538         * xterm.c (x_set_cursor_gc): Use display_info->font->fid for GCs.
6539         (x_set_mouse_face_gc, x_new_font): Likewise.
6540         (x_term_init): Setup display_info->font.
6541         (x_delete_terminal): Free display_info->font.
6543         * xfont.c (xfont_draw): Use BLOCK_INPUT and UNBLOCK_INPUT.
6545         * ftxfont.c (ftxfont_default_fid): Delete it.
6546         (ftxfont_open): Set xfont->fid to 0.
6547         (ftxfont_end_for_frame): Clear data specific to the frame and the
6548         font-driver.
6550         * xftfont.c (xftfont_default_fid): Delete it.
6551         (xftfont_open): Set xfont->fid to 0.
6553         * fontset.c (FONTSET_OBJLIST): New macro.
6554         (fontset_find_font): Update font-object list of the fontset.
6555         (free_realized_fontset): New function.
6556         (free_face_fontset): Call free_realized_fontset.
6557         (Ffont_info): Call font_close_object only when enable_font_backend
6558         is set.
6560         * font.c [HAVE_X_WINDOWS]: Include xterm.h.
6561         [HAVE_NTGUI]: Include w32term.h.
6562         [MAC_OS]: Include macterm.ch.
6563         (font_otf_ValueRecord): Use make_number.
6564         (font_finish_cache): Fix handling of reference count.
6565         (font_clear_cache): Update num_fonts.
6566         (font_open_entity): Update smallest_char_width and
6567         smallest_font_height of the frame.
6568         (font_close_object): Update num_fonts.
6569         (Fclear_font_cache): Fix finding the target cache data.
6571 2008-02-16  Glenn Morris  <rgm@gnu.org>
6573         * fontset.c (Finternal_char_font): Fix compilation warning.
6575 2008-02-16  Eli Zaretskii  <eliz@gnu.org>
6577         * w32.c (init_user_info): Use TOKEN_USER and TOKEN_PRIMARY_GROUP
6578         instead of char arrays.  Enlarge the size of array passed to
6579         get_token_information.
6581         * font.c (Ffont_fill_gstring, Fget_font_glyphs): Fix compilation
6582         warnings.
6584 2008-02-15  Dan Nicolaescu  <dann@ics.uci.edu>
6586         * .gdbinit: Don't set `args', it breaks gdb --args.
6588 2008-02-14  Stefan Monnier  <monnier@iro.umontreal.ca>
6590         * fileio.c (Finsert_file_contents): Adjust offsets when replacing
6591         within a narrowed buffer.
6593 2008-02-14  Kenichi Handa  <handa@ni.aist.go.jp>
6595         * coding.c (decode_coding_object, encode_coding_object):
6596         Preserve Vdeactivate_mark.  Delete unnecessary call of Fcurrent_buffer.
6598 2008-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
6600         * coding.c (coding_set_destination): Use BEG_BYTE rather than
6601         hardcoding 1.
6602         (detect_coding_system):
6603         * lisp.h (detect_coding_system, chars_in_text, multibyte_chars_in_text)
6604         (string_char_to_byte, string_byte_to_char, insert_from_gap):
6605         * insdel.c (insert_from_gap):
6606         * fns.c (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
6607         (string_char_to_byte, string_byte_to_char, string_make_multibyte)
6608         (string_to_multibyte):
6609         * character.c (chars_in_text, multibyte_chars_in_text):
6610         * fileio.c (Finsert_file_contents): Use EMACS_INT for buffer positions.
6612         * character.h (FETCH_STRING_CHAR_ADVANCE)
6613         (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
6614         (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SDATA and SREF.
6615         (DEC_POS, BUF_DEC_POS): Use BEG_BYTE rather than hardcoding 1.
6617         * casefiddle.c (casify_region): Only call after-change and composition
6618         functions on the part of the region that was changed.
6620         * keyboard.c (read_avail_input):
6621         * frame.c (Fdelete_frame): Call Fdelete_terminal.
6623 2008-02-11  Stefan Monnier  <monnier@iro.umontreal.ca>
6625         * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6626         (Fbuffer_local_value, Fbuffer_local_variables): Don't forget undo_list.
6628 2008-02-11  Juanma Barranquero  <lekktu@gmail.com>
6630         * w32menu.c (push_submenu_start, push_submenu_end)
6631         (push_left_right_boundary, push_menu_pane, push_menu_item):
6632         * keyboard.c (read_key_sequence): Don't pass args with side effects
6633         to AREF, it fails when compiling with -DENABLE_CHECKING.
6635 2008-02-11  Kenichi Handa  <handa@ni.aist.go.jp>
6637         * Makefile.in (${lispsource}international/charprop.el):
6638         Delete this target.
6640         * search.c (boyer_moore): Fix incorrect synching of the trunk and
6641         emacs-unicode-2.
6643 2008-02-11  Stefan Monnier  <monnier@iro.umontreal.ca>
6645         * terminal.c (Fdelete_terminal): Clean up the `force' path.
6647 2008-02-10  Stefan Monnier  <monnier@iro.umontreal.ca>
6649         * frame.c (Qnoelisp): New symbol.
6650         (syms_of_frame): Initialize it.
6651         (Fdelete_frame): Use it to distinguish a mere `force' passed from some
6652         harmless Elisp code, from a strong `force' from x_connection_closed.
6653         * frame.h (Qnoelisp): Declare.
6654         * xterm.c (x_connection_closed): Pass `noelisp'.
6656         * lisp.h (struct Lisp_Misc_Any, struct Lisp_Marker)
6657         (struct Lisp_Overlay, struct Lisp_Kboard_Objfwd)
6658         (struct Lisp_Save_Value, struct Lisp_Free): Use enum Lisp_Misc_Type
6659         rather than `int' for the type of `type'.
6661 2008-02-10  Dan Nicolaescu  <dann@ics.uci.edu>
6663         * s/gnu-linux.h: Remove support for non-ELF and linux-1.x.
6665         * Makefile.in (GNUC): Remove support for gcc-1.x.
6667 2008-02-10  Richard Stallman  <rms@gnu.org>
6669         * lisp.h (ASET): Use AREF, not ASLOT.
6671 2008-02-10  Stefan Monnier  <monnier@iro.umontreal.ca>
6673         * lisp.h (ASET): Check bounds.
6675 2008-02-10  Glenn Morris  <rgm@gnu.org>
6677         * buffer.c (mode-name): Doc fix.
6679 2008-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
6681         * Makefile.in:
6682         * emacs.c:
6683         * gmalloc.c:
6684         * keyboard.c:
6685         * lisp.h:
6686         * m/ibm370aix.h:
6687         * process.c:
6688         * regex.c:
6689         * s/hpux.h:
6690         * sysdep.c:
6691         * sysselect.h:
6692         * systty.h:
6693         * unexec.c:
6694         * w32term.c:
6695         * xsmfns.c:
6696         * xterm.c: Remove code that deals with obsolete variables.
6698         * s/msdos.h (DONT_NEED_ENVIRON): Don't define.
6700         * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
6701         nothing else needs it anymore.
6703 2008-02-09  Eli Zaretskii  <eliz@gnu.org>
6705         * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table
6706         instead of unibyte_char_to_multibyte.
6708 2008-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
6710         * s/gnu-linux.h: Remove commented out code.
6712         * unexec.c: Remove references to obsolete variable COFF_ENCAPSULATE.
6714         * Makefile.in: Update what RMS says about using autoconf.
6715         (C_COMPILER, COFF_ENCAPSULATE, MAKE_PARALLEL): Remove obsolete variable.
6716         (C_SWITCH_MACHINE_1, C_SWITCH_SYSTEM_1, C_SWITCH_SITE_1)
6717         (C_SWITCH_X_SITE_1, C_SWITCH_X_MACHINE_1)
6718         (C_SWITCH_X_SYSTEM_1): Move invariant code outside conditional.
6720 2008-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
6722         * keymap.c (Fkey_description): Move side effect outside of macro call.
6724         * xfaces.c (Finternal_make_lisp_face):
6725         * keyboard.c (add_command_key, parse_menu_item): Use ASET.
6727         * fontset.c (free_face_fontset): Use FONTSET_FROM_ID.
6728         (syms_of_fontset): Use ASET.
6730         * fns.c (concat): Move side effect outside of macro call.
6731         (hash_clear): Use ASET.
6733 2008-02-08  Richard Stallman  <rms@gnu.org>
6735         * frame.c (Fdelete_frame): If FORCE, don't call hooks.
6736         If FORCE, and frame has a surrogate minibuffer for another frame,
6737         delete the other frame first.
6739 2008-02-07  Timo Savola  <timo.savola@iki.fi>
6741         * xterm.c (x_detect_focus_change): Handle embed client message.
6742         (handle_one_xevent): Ditto.
6743         (handle_one_xevent): If embedded and we get a button press/release,
6744         request focus.
6745         (xembed_set_info, xembed_send_message): New functions.
6746         (x_make_frame_visible): Call xembed_set_info if embedded.
6747         (x_make_frame_invisible): Call xembed_set_info if embedded.
6748         (x_term_init): Initialize Xatom_XEMBED.
6749         (x_make_frame_visible): Check for FRAME_X_EMBEDDED_P also.
6750         (x_iconify_frame): Ditto.
6752         * xterm.h (struct x_display_info): Add AtomXatom_XEMBED.
6753         (enum xembed_info, enum xembed_message, enum xembed_focus)
6754         (enum xembed_modifier, enum xembed_accelerator): New.
6755         (xembed_set_info, xembed_send_message): Declare.
6756         (FRAME_X_EMBEDDED_P): New.
6758         * gtkutil.c (xg_create_frame_widgets): If frame is embedded, call
6759         gtk_plug_new.
6761         * xfns.c (Fx_create_frame): Do not override the explicitly set parent
6762         window ID of a frame.
6763         (x_window): Reparent frame if embedded.
6764         (Fx_create_frame): Don't set border width if embedded.
6766         * emacs.c (USAGE3): Add --parent-id.
6767         (standard_args): Ditto.
6769 2008-02-07  Jan Djärv  <jan.h.d@swipnet.se>
6771         * coding.c (DECODE_EMACS_MULE_COMPOSITION_CHAR): Use "do...while (0)".
6773 2008-02-07  Jim Meyering  <meyering@redhat.com>
6775         Use "do...while (0)", not "if (1)...else" in macro definitions.
6776         The latter provokes a warning from gcc about the empty else, when
6777         followed by ";".  Also, without that trailing semicolon, it would
6778         silently swallow up any following statement.
6779         * syntax.h (SETUP_SYNTAX_TABLE)
6780         (SETUP_SYNTAX_TABLE_FOR_OBJECT): Likewise.
6781         * buffer.h (DECODE_POSITION): Likewise.
6782         * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
6783         (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
6784         (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Likewise.
6785         (FETCH_CHAR_ADVANCE): Likewise.
6786         (FETCH_CHAR_ADVANCE_NO_CHECK): Likewise.
6788 2008-02-07  Jim Meyering  <meyering@redhat.com>
6790         * lread.c [lint]: Don't include <sys/inode.h>.
6792 2008-02-07  Stefan Monnier  <monnier@iro.umontreal.ca>
6794         * xselect.c (x_handle_dnd_message):
6795         * xmenu.c (digest_single_submenu, xmenu_show):
6796         * xdisp.c (with_echo_area_buffer_unwind_data)
6797         (format_mode_line_unwind_data, unwind_format_mode_line)
6798         (display_menu_bar):
6799         * eval.c (Ffetch_bytecode):
6800         * doc.c (store_function_docstring):
6801         * ccl.c (resolve_symbol_ccl_program, ccl_get_compiled_code)
6802         (Fccl_execute, Fccl_execute_on_string, Fregister_code_conversion_map):
6803         * buffer.c (add_overlay_mod_hooklist): Use ASET.
6805 2008-02-07  Kenichi Handa  <handa@m17n.org>
6807         * ftxfont.c (ftxfont_open): Don't set
6808         dpyinfo->smallest_font_height and dpyinfo->smallest_char_width to 0.
6810         * ftfont.c (ftfont_open): Fix previous change.
6812 2008-02-06  Jason Rumney  <jasonr@gnu.org>
6814         * w32font.c (w32font_text_extents): Fill in lbearing metric.
6815         Use cached metrics for ASCII characters.
6816         (w32font_open_internal): Don't set font's owning_frame.
6817         Cache metrics for ASCII characters.
6819         * w32font.h (struct w32font_info): Add ascii_metrics.
6820         Remove owning_frame.
6822 2008-02-06  Kenichi Handa  <handa@ni.aist.go.jp>
6824         * xdisp.c (x_produce_glyphs): Don't set it->ascent and it->descent
6825         to negative value.
6827         * ftxfont.c (ftxfont_draw): Use s->font_info, not face->font_info.
6829         * ftfont.c (ftfont_open): Fix calculation of font->font.average_width.
6831         * charset.c (syms_of_charset): Set QCtest and Qeq.
6833 2008-02-06  Stefan Monnier  <monnier@iro.umontreal.ca>
6835         * process.c (Fstart_process):
6836         * callproc.c (Fcall_process): Handle the case where
6837         Funhandled_file_name_directory returns nil.
6839         * font.h (enum lgstring_indices, enum lglyph_indices): New enums.
6840         (LGSTRING_SLOT, LGSTRING_SET_SLOT): New macros.
6841         * font.c (check_gstring): Use them and AREF to access the vector before
6842         we know it's really a gstring.
6843         (Ffont_shape_text): Fix typo.
6844         (Ffont_shape_text, Ffont_otf_alternates): Fix up int/Lisp_Oject mixups.
6846         * composite.h (Fcompose_region_internal, Fcompose_string_internal):
6847         Declare.
6849         * chartab.c (make_sub_char_table): Remove noop-yet-incorrect statement.
6851 2008-02-05  Jason Rumney  <jasonr@gnu.org>
6853         * w32font.c (w32font_open_internal): Fill min_width with tmAveCharWidth.
6854         Set smallest_font_height and smallest_char_width in display info.
6856 2008-02-05  Kenichi Handa  <handa@ni.aist.go.jp>
6858         * coding.c (decode_eol): Pay attention to coding->dst_multibyte.
6860 2008-02-05  Miles Bader  <miles@gnu.org>
6862         * xfaces.c (get_lface_attributes, merge_named_face)
6863         (lookup_named_face, lookup_derived_face, realize_named_face):
6864         Revert 2008-02-01 change by cyd@stupidchicken.com.
6866 2008-02-04  Kenichi Handa  <handa@ni.aist.go.jp>
6868         * fontset.c (Ffontset_info): Handle the case of inhibitting the
6869         fallback fonts.
6870         (Ffontset_info) [USE_FONT_BACKEND]: Fix getting of opened font names.
6872 2008-02-04  Jason Rumney  <jasonr@gnu.org>
6874         * w32font.c (w32font_open_internal): Use font_unparse_fcname to
6875         set full_name.
6876         (w32font_open_internal): Use xmalloc, xrealloc, xfree.
6878 2008-02-03  Jason Rumney  <jasonr@gnu.org>
6880         * makefile.w32-in (OBJ1): Include font.o here.
6881         (FONTOBJ) [USE_FONTBACKEND]: Instead of here.
6883 2008-02-02  Jason Rumney  <jasonr@gnu.org>
6885         * makefile.w32-in (temacs): Bump EMHEAP to 21.
6887 2008-02-01  Jason Rumney  <jasonr@gnu.org>
6889         * s/cygwin.h: Define VIRT_ADDR_VARIES.
6891         * puresize.h [VIRT_ADDR_VARIES]: Don't include CYGWIN in condition.
6893 2008-02-01  Andreas Schwab  <schwab@suse.de>
6895         * Makefile.in (shortlisp, lisp): Update for rename of
6896         ../lisp/language/myanmar.el.
6898 2008-02-01  Chong Yidong  <cyd@stupidchicken.com>
6900         * xfaces.c (get_lface_attributes): Delete function.
6901         (merge_named_face, lookup_named_face, lookup_derived_face)
6902         (realize_named_face): Call lface_from_face_name directly, and use
6903         the fact that merge_face_vectors does not alter its FROM argument.
6905 2008-02-01  Jason Rumney  <jasonr@gnu.org>
6907         * w32term.c (w32_read_socket) <WM_CHAR>: Decode non-Unicode
6908         input in the default locale.  Handle non-Unicode multibyte input.
6910 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6912         * fontset.c (reorder_font_vector): Exclude nil elements from the
6913         font group.  Don't try multiple fonts.
6914         (fontset_font): Adjust for the above change.
6915         (Finternal_char_font): Return nil if the found font doesn't
6916         contain the character ch.
6918         * Makefile.in (lisp, shortlisp): Add cham.el.
6920 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6922         * font.h (FONTP): Make it return 1 also for a font-object.
6924         * .gdbinit (xfontset): New function.
6926         * font.c (font_find_for_lface): Check if the character C is
6927         supported or not only for the first font.
6929         * fontset.c (reorder_font_vector): Fix typo.
6930         (fontset_find_font): Don't add a font-spec specifying a script.
6931         Use 0 (not Qt) for the indication of empty font-group.  Change the
6932         format of RFONT-DEF.  Return Qt if no font in the font-group
6933         support the character.
6934         (fontset_font): Adjust for the above change.  If no font was
6935         found the character, remember that.
6936         (face_for_char): Adjust for the change of RFONT-DEF.
6937         (Fset_fontset_font): Allow nil for FONT-SPEC to explicitly specify
6938         no font for the target.
6939         (Finternal_char_font): Adjust for the change of RFONT-DEF.
6941 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6943         * font.c (font_load_for_face): Handle the case that the font in
6944         face->lface is a string.
6946 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6948         * xfaces.c (set_lface_from_font_and_fontset): Set the fontname in lface.
6950 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6952         * xfaces.c (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]:
6953         Fix previous change.  If the frame is not on a window system,
6954         signal an error.
6956 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6958         * coding.c (decode_coding_object, encode_coding_object): Adjust
6959         marker positions after conversion.
6961         * lisp.h (struct Lisp_Marker): New member need_adjustment.
6963 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6965         * font.c (font_find_for_lface): Fix the handling of the return
6966         value of font_has_char.
6967         (Ffont_shape_text): Fix previous change.
6969         * fontset.c (FONTSET_REF_AND_RANGE): Delete it.
6970         (fontset_ref_and_range): Delete it.
6971         (fontset_find_font): Call char_table_ref_and_range instead of
6972         FONTSET_REF_AND_RANGE.
6973         (make_fontset): Don't setup font groups of Latin here.
6974         (Fset_fontset_font): Don't overwrite the setting of FONTSET_ASCII.
6975         (new_fontset_from_font): Make the specified font the default for
6976         all Latin characters.
6978 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6980         * xfaces.c (Finternal_set_lisp_face_attribute): Check if the frame
6981         is on a window system before accessing the fontset of the frame.
6983 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6985         * Makefile.in (lisp, shortlisp): Add kherm.el and myanmar.el.
6987         * ftfont.c (ftfont_driver): Set ftfont_shape in ftfont_driver only
6988         when both HAVE_M17N_FLT and HAVE_LIBOTF are defined.
6990         * font.c (Ffont_shape_text): If the font driver doesn't have a
6991         shaper function, make zero-width glyphs to have at least one-pixel
6992         width.  Fix setting of `to' field of glyphs.
6994 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
6996         * ftfont.c (ftfont_drive_otf): Fix setting of FROM and TO slots of
6997         glyphs.
6999         * font.h (struct font_driver): Improve docstring of member `shape'.
7001 2008-02-01  Kenichi Handa  <handa@m17n.org>
7003         * composite.c (syms_of_composite): Fix docstring of
7004         auto-composition-function.
7006         * font.h (LGLYPH_SIZE): New macro.
7008         * font.c (Ffont_fill_gstring): Stop filling when a character not
7009         supported by the font is found.
7010         (Ffont_shape_text): When a shape callback function returns nil,
7011         try at most two more times with larger gstring.
7012         (Ffont_at): Fix getting of w.  Call font_at with correct 5th argument.
7014         * xdisp.c (handle_auto_composed_prop): Change the argument to
7015         auto-composition-function.
7017         * ftfont.c (ftfont_encode_char): Use the macro FONT_INVALID_CODE.
7018         (ftfont_shape_by_flt): If an element of lgstring is nil, make a
7019         Lispy glyph and store it in the lgstring.
7021         * xfont.c (xfont_encode_char): Use the macro FONT_INVALID_CODE.
7023         * xftfont.c (xftfont_encode_char): Use the macro FONT_INVALID_CODE.
7025 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7027         * font.c (Ffont_shape_text): Avoid unnecessary composition.
7029         * fontset.c (Vfont_encoding_charset_alist): New variable.
7030         (syms_of_fontset): DEFVAR it.
7031         (reorder_font_vector, fontset_find_font): Optimize for the case of
7032         no need of reordering.
7033         (face_for_char): Map the charset property by
7034         Vfont_encoding_charset_alist.
7036 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7038         * w32font.c (logfonts_match): Don't check adstyle here.
7039         (font_matches_spec): Check here against physical font instead.
7040         (add_font_entity_to_list): Avoid some substitutions.
7042         * font.c (font_parse_fcname): Default weight and slant to normal.
7043         (font_score): Prefer normal fonts if weight or slant unspecified.
7044         (font_score) [WINDOWSNT]: Scale weight difference down to closer
7045         match freetype scores.
7047 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7049         * w32font.c (w32font_text_extents): Don't use the frame stored in the
7050         font, as it may have been deleted.
7051         (w32_enumfont_pattern_entity): Map generic family to adstyle using
7052         most common hyphenless variation.
7053         (logfonts_match): Check generic family.
7054         (font_matches_spec): Don't check generic family here.
7055         (fill_in_logfont): Set generic family based on adstyle.
7057         * w32font.h (w32font_get_cache): Update declaration.
7059 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7061         * ftfont.c (ftfont_get_cache): Adjust the argument type.
7063         * frame.c (x_set_font_backend): Don't call Fclear_font_cache.
7064         If none of the new drivers are available, call font_update_drivers
7065         with the old drivers.
7067         * w32font.c (w32font_get_cache): Adjust the argument type.
7069         * xfont.c (xfont_get_cache): Adjust the argument type.
7071         * font.h (struct font_driver): Change argument type of get_cache.
7073         * xftfont.c (xftfont_start_for_frame): Delete prototype.
7075         * font.c (Ffont_get): Fix arguments to Fassoc.
7076         (font_prepare_cache, font_finish_cache, font_get_cache): New functions.
7077         (font_clear_cache): New function.
7078         (font_list_entities, font_matching_entity): Use font_get_cache.
7079         (font_update_drivers): Call font_clear_cache when finishing a driver.
7081         * fontset.c (fontset_find_font): Fix previous change.
7083 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7085         * xterm.c (x_check_font) [USE_FONT_BACKEND]: Don't access
7086         dpyinfo->font_table.
7087         (x_delete_display) [USE_FONT_BACKEND]: Likewise.
7088         (x_delete_terminal) [USE_FONT_BACKEND]: Likewise.
7090         * font.c (font_at): Handle the case that the arg C is negative.
7091         Handle the unibyte case.
7092         (Ffont_at): Call font_at with the arg C -1.
7094         * xdisp.c (handle_auto_composed_prop): Don't get a character at
7095         the position here, and call font_at with the arg C -1.
7096         Don't check the range of the existing composition at the point.
7098 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7100         * fontset.c (fontset_add): New args charset_id and family.
7101         Change caller.
7102         (load_font_get_repertory, fontset_find_font): Assume that
7103         font_spec is always a font-spec object.
7104         (Fset_fontset_font): Always store a font-spec object in a fontset.
7106         * xdisp.c (handle_auto_composed_prop): Use Fget_text_property
7107         instead of get_property_and_range.
7109 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7111         * xftfont.c (struct xftfont_info): Delete the member ft_face.
7112         (xftfont_open): Don't keep locking face.
7113         (xftfont_close): Don't unlock face.
7114         (xftfont_anchor_point, xftfont_shape): Lock and unlock face.
7116         * fontset.c (fontset_find_font): Don't prefer a font of
7117         supplementary charset.
7119 2008-02-01  Kenichi Handa  <handa@m17n.org>
7121         * ftfont.c (struct OpenTypeSpec): Rename members script_tag to
7122         script, langsys_tag to langsys, new member script.
7123         (OTF_TAG_STR): Terminate by '\0'.
7124         (ftfont_get_open_type_spec): If :otf prop is is spec, Limit the
7125         listing to the script specified in that property.  Fix arg to
7126         OTF_check_features.
7128 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7130         * w32font.h: New file.
7132         * w32font.c: Include it.
7133         (struct w32font_info): Add owning_frame field.  Move to w32font.h.
7134         (w32font_open): Set owning_frame.
7135         (w32font_text_extents): Use owning_frame.
7136         (struct font_callback_data): Add opentype_only field.
7137         (add_font_entity_to_list): Use it to filter fonts.
7138         Don't check against full name.
7139         (w32font_list_internal): New function.
7140         (w32font_list): Use it.
7141         (w32font_match_internal): New function.
7142         (w32font_match): Use it.
7143         (w32font_open_internal): New function.
7144         (w32font_open): Use it.
7145         (w32font_get_cache, w32font_close, w32font_has_char)
7146         (w32font_encode_char, w32font_text_extents, w32font_draw):
7147         Make non-static.
7149         * makefile.w32-in (w32font.o): Depend on w32font.h.
7151 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7153         * charset.c (Fdefine_charset_internal): Record a supplementary
7154         charset at the tail of Vcharset_order_list.
7156         * font.c (Ffont_shape_text): Fix the return value.
7158         * ftfont.c (OTF_SYM_TAG, OTF_TAG_STR): Fix argument names.
7160         * xdisp.c (handle_auto_composed_prop): Fix previous change.
7162 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7164         * ftfont.c (struct OpenTypeSpec): New struct.
7165         (OTF_SYM_TAG, OTF_TAG_STR): New macros.
7166         (ftfont_get_open_type_spec): New function.
7167         (ftfont_list) [HAVE_LIBOTF]: Check otf-spec property.
7169         * lread.c (read1): Redo the previous change with checking Vpurify_flag.
7171 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7173         * w32font.c (add_font_entity_to_list): Compare only the beginning
7174         of full name.
7176 2008-02-01  Kenichi Handa  <handa@m17n.org>
7178         * xdisp.c (handle_auto_composed_prop): Simplify the code.
7179         Never return HANDLED_RECOMPUTE_PROPS.
7181 2008-02-01  Kenichi Handa  <handa@m17n.org>
7183         * font.c (font_gstring_produce): Delete it.
7185         * composite.h (COMPOSITION_METHOD):
7186         Handle COMPOSITION_WITH_GLYPH_STRING.
7188 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7190         * xfont.c (Qx): Delete.
7191         (syms_of_xfont): Don't initialize Qx.
7193         * composite.h (enum composition_method):
7194         Define COMPOSITION_WITH_GLYPH_STRING unconditionally.
7196 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7198         * xfaces.c [HAVE_WINDOW_SYSTEM]: Include "font.h" unconditionally.
7199         (choose_face_font): Accept new form of font-spec.
7201         * frame.h (font_driver_list): Declare it unconditionally.
7202         (struct frame): Define members font_driver_list and font_data_list
7203         unconditionally.
7205         * fontset.c: Include "font.h" unconditionally.
7206         (generate_ascii_font_name): Use font_parse_xlfd and font_unparse_xlfd.
7207         (Fset_fontset_font): Accept a font-spec object.
7209         * font.c (font_unparse_xlfd): If pixel_size is zero, make the
7210         PIXEL_SIZE part a wild card.
7212         * dispextern.h (struct glyph_string): Define members clip and
7213         num_clips unconditionally.
7214         (struct face): Define members font_info and extra unconditionally.
7216         * ftfont.c (ftfont_open): Set members maybe_otf and otf of
7217         ftfont_info only when HAVE_LIBOTF is defined.
7219 2008-02-01  Andreas Schwab  <schwab@suse.de>
7221         * xdisp.c (back_to_previous_visible_line_start): Fix type of beg
7222         and end.
7224 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7226         * w32font.c (w32font_driver): Add new fields.
7228 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7230         * Makefile.in (ALL_CFLAGS): Add @M17N_FLT_CFLAGS@.
7231         (FONTSRC, FONTOBJ) [HAVE_WINDOW_SYSTEM]: Set them unconditionally.
7232         (LIBES): Add @M17N_FLT_CFLAGS@.
7234         * composite.c (compose_text): Don't treat the new style
7235         composition specially.
7237         * emacs.c (main): Call syms_of_font unconditionally.
7239         * font.h (FONT_ENTITY_NOT_LOADABLE)
7240         (FONT_ENTITY_SET_NOT_LOADABLE): New macros.
7241         (LGSTRING_XXXX, LGLYPH_XXX): Adjust for the change of lispy gstring.
7242         (struct font_driver): New member shape.
7243         (font_registry_charsets): Extern it.
7244         (font_find_for_lface, font_prepare_composition): Adjust prototype.
7245         (font_otf_capability, font_drive_otf): Delete their externs.
7247         * font.c [HAVE_M17N_FLT]: Include <m17n-flt.h>.
7248         (font_charset_alist, font_registry_charsets): Move from xfont.c
7249         and rename.
7250         (font_prop_validate_otf): New function.
7251         (font_property_table): Register it for QCotf.
7252         (DEVICE_DELTA, adjust_anchor, REPLACEMENT_CHARACTER)
7253         (font_drive_otf): Delete.
7254         (font_prepare_composition): New arg F.  Adjust for the change of
7255         lispy gstring.
7256         (font_find_for_lface): New arg C.
7257         (font_load_for_face): Adjust for the change of font_find_for_lface.
7258         (Ffont_make_gstring, Ffont_fill_gstring): Adjust for the change of
7259         lispy gstring.
7260         (Ffont_shape_text): New function.
7261         (Fopen_font): If the font size is not given, use 12-pixel.
7262         (Ffont_at): New arg STRING.
7263         (syms_of_font): Initalize font_charset_alist.
7264         Declare Ffont_shape_text as a Lisp function.  Call syms_of_XXfont
7265         conditionally.
7267         * fontset.c (fontset_find_font) [USE_FONT_BACKEND]: Try multiple
7268         fonts of the same font-spec.  Change the format of RFONT-DEF.
7269         (face_for_char, make_fontset_for_ascii_face, Finternal_char_font):
7270         Adjust for the change of RFONT-DEF.
7271         (Fset_fontset_font) [USE_FONT_BACKEND]: Handle new format of font-spec.
7273         * ftfont.h: New file.
7275         * ftfont.c: Don't include Freetype headers.  Include "ftfont.h".
7276         (struct ftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
7277         (ftfont_open) [HAVE_LIBOTF]: Initialize the above members.
7278         (ftfont_driver) [HAVE_LIBOTF, HAVE_M17N_FLT]: Don't set
7279         font_otf_capability and font_drive_otf, set ftfont_shape.
7280         (ftfont_list): Adjust for the change of :otf property value.
7281         (struct MFLTFontFT) [HAVE_LIBOTF, HAVE_M17N_FLT]: New struct.
7282         (ftfont_get_glyph_id, ftfont_get_metrics, ftfont_check_otf)
7283         (adjust_anchor, ftfont_drive_otf, ftfont_shape_by_flt)
7284         (ftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
7285         (DEVICE_DELTA) [HAVE_LIBOTF, HAVE_M17N_FLT]: New macro.
7286         (otf_gstring, gstring, m17n_flt_initialized): New variables.
7288         * w32term.c (x_draw_composite_glyph_string_foreground):
7289         Adjust for the change of lispy gstring.
7291         * xdisp.c (handle_composition_prop): Adjust for the change of
7292         lispy gstring.  Call a function for auto-composition with the
7293         third arg it->window.
7294         (fill_composite_glyph_string): Adjust for the change of lispy string.
7295         (x_produce_glyphs): Adjust for the change of font_prepare_compositionl.
7297         * xfaces.c (set_font_frame_param): Adjust for the change of
7298         font_find_for_lface.
7300         * xfont.c (x_font_charset_alist): Move to font.c and rename.
7301         (xfont_registry_charsets): Likewise.  Change caller.
7302         (syms_of_xfont): Don't handle x_font_charset_alist.
7304         * xftfont.c: Include "ftfont.h".
7305         (struct xftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
7306         (xftfont_open) [HAVE_LIBOTF]: Initialize the above members.
7307         (xftfont_close) [HAVE_LIBOTF]: Close otf.
7308         (xftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
7309         (syms_of_xftfont) [HAVE_LIBOTF, HAVE_M17N_FLT]:
7310         Set xftfont_driver.shape to xftfont_shape.
7312         * xterm.c (x_draw_composite_glyph_string_foreground): Adjust for
7313         the change of lispy gstring.
7315 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7317         * ftxfont.c (ftxfont_end_for_frame): Fix array indexing error.
7319 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7321         * w32font.c (w32font_draw): Fill background manually.
7323 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7325         * font.c (Qfontp): Remove unused symbol.
7326         (QCantialias): New symbol.
7327         (syms_of_font): Define it.
7328         (font_property_table): Set a validator for QCantialias.
7330         * w32font.c (CLEARTYPE_QUALITY, CLEARTYPE_NATURAL_QUALITY):
7331         Define if not already.
7332         (QCfamily): Share with xfaces.c.
7333         (Qstandard, Qsubpixel, Qnatural): New symbols.
7334         (syms_of_w32font): Define them.  Don't define QCfamily here.
7335         (w32_antialias_type, lispy_antialias_type): New functions.
7336         (w32_enumfont_pattern_entity): New arg requested_font.
7337         Set antialias parameter if non-default was requested.
7338         (fill_in_logfont): Fill in lfQuality if :antialias specified.
7340 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7342         * lread.c (read1): Undo the previous change.
7344 2008-02-01  CHENG Gao  <chenggao@gmail.com>  (tiny change)
7346         * frame.c (Fdelete_frame): Call font_update_drivers only when
7347         USE_FONT_BACKEND is defined.
7349 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7351         * font.h (struct font_bitmap): New member bits_per_pixel.
7352         (struct font_driver): New members start_for_frame and end_for_frame.
7353         (struct font_data_list): New struct.
7354         (font_put_frame_data, font_get_frame_data): Extern them.
7356         * frame.h (struct frame): New member font_data_list.
7358         * font.c (font_update_drivers): Call driver->start_for_frame and
7359         driver->end_for_frame at proper timings.
7360         (font_put_frame_data, font_get_frame_data): New functions.
7361         (Ffont_spec): Add usage in the docstring.
7363         * frame.c (make_frame): Initialize f->font_data_list to NULL.
7364         (Fdelete_frame): Call font_update_drivers.
7366         * xftfont.c (struct xftface_info): Delete the member xft_draw.
7367         (xftfont_prepare_face, xftfont_done_face): Adjust for the above change.
7368         (xftfont_get_xft_draw): New function.
7369         (xftfont_draw): Get XftDraw by xftfont_get_xft_draw.
7370         (xftfont_end_for_frame): New function.
7371         (syms_of_xftfont): Set xftfont_driver.end_for_frame.
7373         * ftxfont.c (ftxfont_get_gcs): Rename from ftxfont_create_gcs.
7374         Change argument.  Cache GCs in the per-frame data.
7375         (struct ftxfont_frame_data): New struct.
7376         (ftxfont_draw_bitmap): New arg gc_fore and flush.
7377         (ftxfont_prepare_face, ftxfont_done_face): Delete them.
7378         (ftxfont_draw): Get GCs by ftxfont_get_gcs.  Reflect s->clip in GCs.
7379         (ftxfont_end_for_frame): New function.
7380         (syms_of_ftxfont): Set ftxfont_driver.end_for_frame.
7382         * ftfont.c (ftfont_get_bitmap): Set bitmap->bits_per_pixel.
7384 2008-02-01  Kenichi Handa  <handa@m17n.org>
7386         * xselect.c (Vselection_coding_system)
7387         (Vnext_selection_coding_system): Delete them.
7388         (syms_of_xselect): Don't declare selection-coding-system and
7389         next-selection-coding-system.  They are declared in select.el.
7391 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7393         * w32term.h (WM_UNICHAR, UNICODE_NOCHAR): Define if not already.
7395         * w32fns.c: Include imm.h.
7396         (get_composition_string_fn, get_ime_context_fn): New optional
7397         system functions.
7398         (globals_of_w32fns): Load them from imm32.dll.
7399         (ignore_ime_char): New flag.
7400         (w32_wnd_proc): Handle WM_UNICHAR, WM_IME_CHAR and
7401         WM_IME_ENDCOMPOSITION messages.
7403         * w32term.c (w32_read_socket) [WM_UNICHAR]: Handle as
7404         MULTIBYTE_CHAR_KEYSTROKE_EVENT.
7406 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7408         * lread.c (READCHAR): Call readchar with the 2nd arg NULL.
7409         (READCHAR_REPORT_MULTIBYTE): New macro.
7410         (readchar): New 2nd arg MULTIBYTE.
7411         (read1): Use READCHAR_REPORT_MULTIBYTE for the first read.
7412         Make symbol's name multibyte according to the multibyteness of the
7413         source.
7415 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7417         * xfaces.c (face_for_overlay_string): Call lookup_face with
7418         correct arguments (fix of synching with the trunk).
7420 2008-02-01  Kenichi Handa  <handa@m17n.org>
7422         * font.c (font_prop_validate_symbol, font_prop_validate_style)
7423         (font_prop_validate_non_neg, font_prop_validate_spacing):
7424         Delete argument prop_index.
7425         (font_property_table): Change arguments to validater.  Change Callers.
7426         (font_lispy_object): Delete.
7427         (font_at): Use font_find_object instead fo font_lispy_object.
7429 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
7431         * fileio.c (Fexpand_file_name): Adjust multibyteness of directory
7432         and file names.
7434 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7436         * w32font.c (add_font_name_to_list): Avoid vertical fonts.
7437         (font_matches_spec): Remove debug output.
7438         (add_font_entity_to_list): Avoid using substituted fonts.
7440 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7442         * doc.c (Fsnarf_documentation):
7443         * Makefile.in (temacs${EXEEXT}, mostlyclean): Undo last change.
7445 2008-02-01  Miles Bader  <miles@gnu.org>
7447         * dispextern.h (struct glyph_row): Only define "clip" field if
7448         HAVE_WINDOW_SYSTEM is defined.
7450 2008-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
7452         Fix up multi-tty merge.
7454         * xterm.c (handle_one_xevent): Remove duplicate code and fix up nesting
7455         and indentation.
7457         * xfaces.c (free_realized_face, clear_face_gcs):
7458         Include font_done_for_face in the input_blocked section, just in case.
7460         * xdisp.c (decode_mode_spec): Use terminal-local coding systems.
7461         (get_char_face_and_encoding): Undo last change and remove the *other*
7462         duplicate definition (i.e. keep the one that's better scoped and that
7463         includes code for the font-backend).
7465         * terminal.c (create_terminal): Default keyboard_coding to
7466         `no-conversion' and terminal_coding to `undecided'.
7468         * lread.c (read1): Use XSETPVECTYPE to set a pseudovector's tag.
7470         * fontset.c (free_realized_fontsets): Check that the table entry does
7471         contain a fontset before trying to compare it to `base'.
7473         * emacs.c (main): Move syms_of_data, syms_of_fileio, syms_of_alloc,
7474         syms_of_charset, and syms_of_coding earlier because init_window_once
7475         now needs Vcoding_system_hash_table to be setup.
7477         * coding.h (default_buffer_file_coding): Remove.
7479         * coding.c (default_buffer_file_coding): Remove.
7480         (Fterminal_coding_system, Fkeyboard_coding_system): Use ->id rather
7481         than ->symbol, and use the terminal-local coding system.
7482         (syms_of_coding): Don't setup the coding-systems that are not
7483         terminal-local.
7484         (Fdefine_coding_system_internal): Use XCAR/XCDR.
7486         * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
7487         Use XSETPVECTYPE now that XSETCHAR_TABLE doesn't set the tag anymore.
7489         * alloc.c (Fmake_char_table, make_sub_char_table): Remove.  They're now
7490         in chartab.c and were re-added here by mistake.
7491         (Fpurecopy): Use XSETPVECTYPE after copying a COMPILED pseudovector.
7493         * doc.c (Fsnarf_documentation):
7494         * Makefile.in (temacs${EXEEXT}, mostlyclean): Move buildobj.lst from
7495         src to etc.
7497         * ChangeLog.10: Add mistakenly removed entry.
7499 2008-02-01  Dan Nicolaescu  <dann@ics.uci.edu>
7501         * Makefile.in (fringe.o, minibuf.o): Fix dependencies.
7503 2008-02-01  Miles Bader  <miles@gnu.org>
7505         * xdisp.c (get_char_face_and_encoding): Remove extraneous definition.
7506         Add extra args to FACE_FOR_CHAR.
7508 2008-02-01  Kenichi Handa  <handa@m17n.org>
7510         * keymap.c (where_is_internal_1): If key is a cons, store the copy
7511         in sequence.
7513         * chartab.c (map_sub_char_table, map_char_table): If the range
7514         contains just one character, call the function with that character
7515         even if the depth is not 3.
7517 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7519         * w32font.c (w32font_text_extents): Calculate metrics for the
7520         whole string.
7522 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7524         * w32xfns.c (get_next_msg): Consolidate WM_PAINT messages.
7526 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7528         * w32term.c (x_set_glyph_string_clipping): Use
7529         get_glyph_string_clip_rects.
7530         (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
7531         Adjust for the change of struct glyph_string.
7533         * w32font.c (w32font_draw): Do clipping here.
7535 2008-02-01  Kenichi Handa  <handa@m17n.org>
7537         * xftfont.c (xftfont_draw): Adjust for the change of struct
7538         glyph_string.
7540         * xterm.c (x_set_glyph_string_clipping): Use
7541         get_glyph_string_clip_rects.
7542         (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
7543         Adjust for the change of struct glyph_string.
7545         * xdisp.c (get_glyph_string_clip_rects): Reflect s->row->clip to
7546         the resulting clip(s}.
7547         (expose_overlaps): Add arg r.  Change callers.  Set it to
7548         row->clip temporarily.
7549         (expose_window): Redraw rows overlapping the exposed area.
7551         * dispextern.h (struct glyph_row): New member clip.
7552         (struct glyph_string): Delete members clip_x, clip_y, clip_width,
7553         clip_height, new member clip, and num_clips.
7555 2008-02-01  Kenichi Handa  <handa@m17n.org>
7557         * data.c (Fchar_or_string_p): Fix docstring.
7559 2008-02-01  Kenichi Handa  <handa@m17n.org>
7561         * xftfont.c (xftfont_draw): If s->font_info != s->face->font_info,
7562         create a temporary XftDraw object.
7564 2008-02-01  Kenichi Handa  <handa@m17n.org>
7566         * font.c (Ffontp): Fix docstring.
7568         * coding.c (detect_coding_iso_2022): Don't treat SI/SO codes as a
7569         strong evidence of ISO-2022.
7571 2008-02-01  Kenichi Handa  <handa@m17n.org>
7573         * abbrev.c (abbrev_check_chars): Use CHAR_TABLE_REF, not
7574         SYNTAX_ENTRY_FOLLOW_PARENT.
7576 2008-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
7578         * fns.c (weak_hash_tables): Rename from Vweak_hash_tables and change
7579         its type.
7580         (make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
7581         Update to the new type of weak_hash_tables and next_weak.
7583         * lisp.h (struct Lisp_Hash_Table): Change next_weak from Lisp_Object to
7584         a plain C pointer to Lisp_Hash_Table.
7586         * lisp.h (XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
7587         (GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
7588         (GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
7589         (GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
7590         (GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
7591         (GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
7592         (GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
7593         (GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
7594         (GC_EQ): Remove since they've been identical to their non-GC_
7595         alter-egos ever since the markbit was eradicated.
7597         * alloc.c:
7598         * buffer.c:
7599         * buffer.h:
7600         * data.c:
7601         * fileio.c:
7602         * filelock.c:
7603         * fns.c:
7604         * frame.h:
7605         * lisp.h:
7606         * macterm.c:
7607         * print.c:
7608         * process.c:
7609         * w32fns.c:
7610         * w32menu.c:
7611         * w32term.c:
7612         * xfns.c:
7613         * xmenu.c:
7614         * xterm.c: Replace uses of GC_* macros with the non-GC_ versions.
7616 2008-02-01  Kenichi Handa  <handa@m17n.org>
7618         * chartab.c (map_sub_char_table): Make it work for the top-level
7619         char-table.  Fix handling of parent char-table.
7620         (map_char_table): Adjust for the above change.
7622 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7624         * w32font.c (Qgdi): Rename from Qw32.
7626 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7628         * w32bdf.c (get_quoted_string): Make function static.
7630 2008-02-01  Kenichi Handa  <handa@m17n.org>
7632         * xftfont.c (xftfont_open): If one of font's ASCII glyph has
7633         bigger ascent and descent than those of the font, use them as
7634         font's ascent and descent.
7636 2008-02-01  Kenichi Handa  <handa@m17n.org>
7638         * Makefile.in (${lispsource}international/charprop.el): Move this
7639         target within "#ifdef HAVE_UNIDATA" and "#endif".
7641 2008-02-01  Kenichi Handa  <handa@m17n.org>
7643         * Makefile.in (lisp): Add ${lispsource}language/tai-viet.el.
7644         (shortlisp): Add ../lisp/language/tai-viet.el.
7646 2008-02-01  Ulrich Mueller  <ulm@gentoo.org>
7648         * Makefile.in (${lispsource}international/charprop.el): Depend on
7649         temacs${EXEEXT}.
7651 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7653         * w32font.c (w32font_close): Delete the GDI font object.
7655         * w32menu.c: Include character.h.
7657         * w32proc.c: Likewise.
7659         * w32select.c: Likewise.
7661         * makefile.w32-in (w32proc.o): Depend on character.h.
7663 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7665         * w32fns.c (syms_of_w32fns): Use DEFSYM macro.
7667         * w32menu.c (syms_of_w32menu): Likewise.
7669         * w32proc.c (syms_of_ntproc): Likewise.
7671         * w32select.c (syms_of_w32select): Likewise.
7673         * w32term.c (syms_of_w32term): Likewise.
7675 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7677         * w32font.c (w32font_draw): Delete brush after using it.
7679 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7681         * w32font.c (w32font_open): Don't set font_idx.
7682         (w32font_text_extents): Try GetTextExtentPoint32W before defaulting
7683         to font settings.
7684         (w32font_draw): Fill background explicitly.
7686 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7688         * w32term.c (w32_initialize): Don't call w32font_initialize.
7690         * w32font.c (w32font_info): Remove subranges.
7691         (QCsubranges, Qmodern, Qswiss, Qroman): Remove.
7692         (QCfamily, Qmonospace, Qsans_serif, Qmono, Qsans, Qsans__serif)
7693         (Qraster, Qoutline, Qlatin, Qgreek, Qcoptic, Qcyrillic, Qarmenian)
7694         (Qhebrew, Qarabic, Qsyriac, Qnko, Qthaana, Qdevanagari, Qbengali)
7695         (Qgurmukhi, Qgujarati, Qoriya, Qtamil, Qtelugu, Qkannada)
7696         (Qmalayalam, Qsinhala, Qthai, Qlao, Qtibetan, Qmyanmar, Qgeorgian)
7697         (Qhangul, Qethiopic, Qcherokee, Qcanadian_aboriginal, Qogham)
7698         (Qrunic, Qkhmer, Qmongolian, Qsymbol, Qbraille, Qhan)
7699         (Qideographic_description, Qcjk_misc, Qkana, Qbopomofo, Qkanbun)
7700         (Qyi, Qbyzantine_musical_symbol, Qmusical_symbol, Qmathematical):
7701         New symbols.
7702         (font_callback_data): New struct.
7703         (w32font_list, w32font_match): Use it.
7704         (w32font_open): Don't populate subranges.
7705         (w32font_has_char): Use script Lisp symbols, not subrange bitmask.
7706         (w32font_encode_char): Always return unicode code-point as-is.
7707         (w32font_text_extents): Supply a transformation matrix to
7708         GetGlyphOutline.  Never look up by glyph index.  Avoid looping
7709         twice.  Use unicode version of GetTexExtentPoint32 instead of
7710         glyph index version.
7711         (set_fonts_frame): Remove.
7712         (w32_enumfont_pattern_entity): Add frame parameter, use it to
7713         set frame parameter.  Use backward compatible fake foundries.
7714         Save generic family in extra slot under QCfamily.  Make width slot
7715         constant.  Save QCspacing value.  Save list of scripts instead of
7716         binary subranges.
7717         (w32_generic_family, logfonts_match, font_matches_spec): New functions.
7718         (add_font_entity_to_list): Use font_callback_data struct.  Filter
7719         unwanted fonts.
7720         (add_one_font_entity_to_list): Use font_callback_data struct.
7721         (w32_registry): Default to iso10646_1.
7722         (fill_in_logfont): Use dpi from extra slot.  Don't bother with
7723         string font registries.  Don't fill in font name if it is a generic
7724         family name, fill family instead.  Use spacing, family and script
7725         extra info to fill pitch, family and charset fields.
7726         (list_all_matching_fonts): Use font_callback_data struct.
7727         (unicode_range_for_char): Remove.
7728         (font_supported_scripts): New function.
7729         (w32font_initialize): Remove.
7730         (syms_of_w32font): Update which symbols are defined.
7732 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7734         * font.c (font_pixel_size): Reverse assq_no_quit args.
7736         * w32term.h (FONT_WIDTH): Report max width, not average.
7737         (FONT_MAX_WIDTH): Remove.
7738         (FONT_AVG_WIDTH): New macro.
7740         * xfaces.c (Fx_list_fonts) [WINDOWSNT]: Remove Windows only
7741         redefinition of FONT_WIDTH.
7743         * w32term.c (x_font_min_bounds): Use FONT_AVG_WIDTH.
7744         (w32_cache_char_metrics): Use FONT_WIDTH.
7746         * w32fns.c (w32_load_system_font, w32_list_fonts): Use FONT_AVG_WIDTH.
7748 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7750         * w32font.c (w32font_open): Make lfHeight negative.
7752         * w32fns.c (x_default_font_parameter): Use new style font name.
7753         (Fx_create_frame, x_create_tip_frame): Initialize resx and resy.
7755 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7757         * w32font.c (QCsubranges): New symbol.
7758         (w32font_open, w32font_has_char): Get subranges from subproperty
7759         of extra.
7760         (w32_enumfont_pattern_entity): Set subranges as subproperty of extra.
7761         (syms_of_w32font): Define :subranges symbol.
7763         * font.c (font_put_extra): Expose externally.
7765         * font.h (font_put_extra): Move declaration from font.c.
7767         * font.c (Ffont_get): Use font driver to determine otf capability.
7768         (adjust_anchor): Check if driver defines anchor_point before using.
7770         * w32font.c (w32font_open): Handle size, height and pixel_size better.
7771         (w32font_draw): Use options.
7772         (w32_enumfont_pattern_entity): Set size to 0 for scalable fonts.
7773         Fix detection of truetype fonts.
7774         (registry_to_w32_charset): Handle charsets other than iso8859-1
7775         expressed as lisp symbols.
7776         (w32_registry): Express charset as lisp symbol.
7777         (fill_in_logfont): Reverse pixel and point height logic.
7778         Don't set width here.  Set quality to default.
7780         * w32fns.c (w32_load_system_font): Fix detecting FIXED_PITCH fonts.
7781         (x_to_w32_font): Fill in lfPitchAndFamily correctly.
7783         * xterm.c (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
7784         Remove redundant loop and allocation.
7786         * makefile.w32-in (font.o, w32font.o): New objects.
7787         (fontset.o, xdisp.o, xfaces.o, w32fns.o, w32term.o): Depend on font.h.
7788         (FONTOBJ): New group of objects conditioned on USE_FONT_BACKEND.
7790         * xdisp.c (fill_composite_glyph_string): Make the first arg to
7791         STORE_XCHARB a valid l-value.
7793         * w32term.c (w32_native_per_char_metric): Swap width and rbearing
7794         calculations for non-Truetype fonts.
7795         (x_draw_glyph_string): Sync with xterm.c.
7796         (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
7797         Remove redundant code.
7798         (w32_initialize) [USE_FONT_BACKEND]: Call w32font_initialize.
7800         * w32term.h (w32_output_data) [USE_FONT_BACKEND]: Add fontp member.
7801         (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro from xterm.h.
7803         * w32fns.c [USE_FONT_BACKEND]: Port font backend changes from xfns.c.
7804         (x_to_w32_charset, w32_to_x_charset): Expose externally.
7806         * w32font.c: New file for w32 font backend.
7808 2008-02-01  Kenichi Handa  <handa@m17n.org>
7810         * term.c: Don't include "buffer.h" twice.
7812 2008-02-01  Kenichi Handa  <handa@m17n.org>
7814         * character.c (Funibyte_string): New function.
7815         (syms_of_character): Defsubr it.
7817 2008-02-01  Jason Rumney  <jasonr@gnu.org>
7819         * w32term.c [USE_FONT_BACKEND]:
7820         (x_get_font_repertory, note_mouse_movement, x_set_mouse_face_gc)
7821         (x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly)
7822         (x_draw_glyph_string, x_draw_glyph_string_foreground)
7823         (x_draw_composite_glyph_string_foreground, x_new_fontset2)
7824         (x_free_frame_resources): Sync with xterm.c.
7826 2008-02-01  Andreas Schwab  <schwab@suse.de>
7828         * lread.c (read1): Use CHAR_TABLE_STANDARD_SLOTS to validate
7829         char-table size.
7831 2008-02-01  Kenichi Handa  <handa@m17n.org>
7833         * font.c (check_otf_features): Define it regardless of HAVE_LIBOTF.
7835 2008-02-01  Kenichi Handa  <handa@m17n.org>
7837         * ftfont.c (ftfont_driver): Delete font_otf_gsub and
7838         font_otf_gpos, add font_drive_otf.
7840         * fontset.c (fontset_find_font): Pay attention to font size
7841         specified for a font.
7842         (reorder_font_vector): Check contents of font_def.
7844         * font.c (struct otf_list): Delete it.
7845         (otf_list): Make it a lisp variable.
7846         (otf_open): Use lispy otf_list.
7847         (generate_otf_features): Rename from parse_gsub_gpos_spec.
7848         (check_otf_features): New function.
7849         (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
7850         New functions.
7851         (font_drive_otf): New function merging font_otf_gsub and
7852         font_otf_gpos.
7853         (font_open_for_lface): New arg spec.  Change argument order.
7854         (font_load_for_face): Adjust for the change of font_open_for_lface.
7855         (Ffont_drive_otf): New function merging Ffont_otf_gsub and
7856         Ffont_otf_gpos.
7857         (syms_of_font): Staticpro otf_list.  Delete defsubr of
7858         Sfont_otf_gsub and Sfont_otf_gpos.  Defsubr Sfont_drive_otf.
7860         * xfaces.c (set_font_frame_param): Adjust for the change of
7861         font_open_for_lface.
7863         * font.h (font_open_for_lface): Adjust prototype.
7864         (struct font_driver): Delete members otf_gsub and otf_gpos, add
7865         member otf_drive.
7866         (font_otf_gsub, font_otf_gpos): Delete externs.
7867         (font_drive_otf): Extern it.
7869 2008-02-01  Kenichi Handa  <handa@m17n.org>
7871         * font.c (font_at): If the window W is not on a window system,
7872         return Qnil.
7874         * coding.c (produce_chars, encode_coding): Don't call
7875         insert_from_gap if no characters to produce.
7877 2008-02-01  Kenichi Handa  <handa@m17n.org>
7879         * fontset.c (free_realized_fontsets): Avoid unnecessary call of
7880         Fclear_face_cache.
7882         * xfaces.c (face_for_font): Check also face->font==font->font.font.
7884 2008-02-01  Miles Bader  <miles@gnu.org>
7886         * emacs.c (main): Change default value of `enable_font_backend' to 1.
7887         Parse "--disable-font-backend" option.
7888         (standard_args): Add "--disable-font-backend" option.
7890 2008-02-01  Kenichi Handa  <handa@m17n.org>
7892         * fontset.c (fontset_find_font): New function.
7893         (fontset_font): Use fontset_find_font.
7894         (make_fontset_for_ascii_face): Don't set face ID in rfont_def.
7895         Register the specified font for all Latin characters.
7896         (new_fontset_from_font): Register the specified font for all Latin
7897         characters.
7898         (dump_fontset): For a realized fontset, include the base fontset
7899         name in the returned vector.
7901 2008-02-01  Kenichi Handa  <handa@m17n.org>
7903         * character.h (CHAR_STRING): Cast C to unsigned on calling
7904         char_string.
7906         * character.c (char_string): Type of arg C changed to unsigned.
7907         Signal an error if C is an invalid character code.
7909         * editfns.c (general_insert_function, Fchar_to_string):
7910         Use CHARACTERP, not INTEGERP.
7912 2008-02-01  Kenichi Handa  <handa@m17n.org>
7914         * character.h (MIN_MULTIBYTE_LEADING_CODE)
7915         (MAX_MULTIBYTE_LEADING_CODE): New macros.
7917         * regex.c (analyse_first): Fix for multibyte characters in "case
7918         charset:" and "case categoryspec:".
7920 2008-02-01  Andreas Schwab  <schwab@suse.de>
7922         * Makefile.in (LIBES): Move standard libraries to the end.
7924 2008-02-01  Kenichi Handa  <handa@m17n.org>
7926         * alloc.c (Fgarbage_collect): If nextb->text->inhibit_shrinking is
7927         nonzero, don't shrink the buffer nextb.
7929         * buffer.h (struct buffer_text): New member inhibit_shrinking.
7931         * coding.c (coding_alloc_by_making_gap): New arg offset.
7932         (alloc_destination): Call coding_alloc_by_making_gap with the arg
7933         offset.
7934         (decode_coding_iso_2022): Update coding->safe_charsets.
7935         (decode_coding_gap): Temporarily set
7936         current_buffer->text->inhibit_shrinking to 1.
7938 2008-02-01  Kenichi Handa  <handa@m17n.org>
7940         * xterm.c (x_draw_composite_glyph_string_foreground): Fix
7941         indexing into elements of s->cmp and s->char2b.
7943 2008-02-01  Juanma Barranquero  <lekktu@gmail.com>
7945         * regex.c (RE_STRING_CHAR_AND_LENGTH) [! emacs]: Add missing arg `len'.
7947 2008-02-01  Kenichi Handa  <handa@m17n.org>
7949         * regex.c (GET_CHAR_BEFORE_2, GET_CHAR_AFTER): Check the variable
7950         target_multibyte instead of multibyte.
7951         (re_match_2_internal): Call bcmp_translate with target_multibyte.
7952         (bcmp_translate): Change the argument name from multibyte to
7953         target_multibyte.
7955 2008-02-01  Kenichi Handa  <handa@m17n.org>
7957         These changes are to compile a regexp into a pattern that can be
7958         used both for multibyte and unibyte targets.
7960         * Makefile.in (search.o): Depend on charset.h.
7962         * character.c (multibyte_char_to_unibyte_safe): New function.
7964         * search.c: Include "charset.h".
7965         (compile_pattern_1): Delete argument multibyte.  Don't set
7966         cp->buf.target_multibyte here.  Set cp->buf.charset_unibyte.
7967         (compile_pattern): Don't compare cp->buf.target_multibyte.
7968         Compare cp->buf.charset_unibyte.
7969         (compile_pattern): Set cp->buf.target_multibyte.
7971         * lisp.h (multibyte_char_to_unibyte_safe): Extern it.
7973         * regex.h (struct re_pattern_buffer): New member charset_unibyte.
7975         * regex.c (RE_STRING_CHAR, RE_STRING_CHAR_AND_LENGTH): New arg
7976         multibyte.  Change callers.
7977         (RE_CHAR_TO_MULTIBYTE, RE_CHAR_TO_UNIBYTE): New macros.
7978         (MAKE_CHAR_MULTIBYTE, MAKE_CHAR_UNIBYTE): Delete.  Change callers
7979         to use RE_CHAR_TO_MULTIBYTE and RE_CHAR_TO_UNIBYTE, respectively.
7980         (SETUP_ASCII_RANGE, SETUP_UNIBYTE_RANGE): New macros.
7981         (SETUP_MULTIBYTE_RANGE): Generate a more compact range_table.
7982         (regex_compile): Make the compiled pattern usable both for
7983         multibyte and unibyte targets.
7984         (analyse_first): Make the fastmap usable both for multibyte and
7985         unibyte targets.
7986         (TRANSLATE_VIA_MULTIBYTE): Delete.
7987         (re_match_2_internal): Pay attention to the case that the
7988         multibyteness of bufp and target may be different.
7990 2008-02-01  Kenichi Handa  <handa@m17n.org>
7992         * xdisp.c (x_produce_glyphs): When a font is not found, make the
7993         empty box occupy at least one column width.
7995 2008-02-01  Miles Bader  <miles@gnu.org>
7997         * Makefile.in: Remove redundant HAVE_XFT clause.
7999 2008-02-01  Kenichi Handa  <handa@m17n.org>
8001         * xrdb.c (x_load_resources): Setup the default fontSet X resource.
8003 2008-02-01  Kenichi Handa  <handa@m17n.org>
8005         * fontset.c (Finternal_char_font): Fix for the case of POSITION
8006         being nil.
8008 2008-02-01  Kenichi Handa  <handa@m17n.org>
8010         * xftfont.c (xftfont_open): Call FcConfigSubstitute.
8012 2008-02-01  Kenichi Handa  <handa@m17n.org>
8014         * xftfont.c (xftfont_open): Don't enable antialias explicitly.
8016 2008-02-01  Kenichi Handa  <handa@m17n.org>
8018         * search.c (simple_search): Fix previous change.
8020 2008-02-01  Kenichi Handa  <handa@m17n.org>
8022         * xftfont.c (ftfont_font_format): Extern declaration.
8024         * frame.c (x_set_font): Fix the second arg to fs_query_fontset.
8026         * xfont.c (xfont_driver): Initialize ftfont_driver.type by 0.
8027         (xfont_list): Don't directly use Lisp_Object as an operand of &&.
8029         * ftfont.c (ftfont_driver): Initialize ftfont_driver.type by 0.
8030         (ftfont_font_format): Fix previous change.
8032         * font.h (Ffont_xlfd_name): EXFUN it.
8034         * font.c (font_parse_xlfd): Fix the array size of `f'.
8035         (register_font_driver): Use EQ to compare driver->type.
8037         * xfns.c (xic_create_xfontset2) [USE_FONT_BACKEND]: New function.
8038         (create_frame_xic) [USE_FONT_BACKEND]: Call xic_create_xfontset2.
8039         (xic_set_xfontset) [USE_FONT_BACKEND]: Likewise.
8041 2008-02-01  Kenichi Handa  <handa@m17n.org>
8043         * ftfont.c (ftfont_pattern_entity, ftfont_list_generic_family)
8044         (ftfont_list, ftfont_font_format): Check if FC_FONTFORMAT is defined.
8046 2008-02-01  Kenichi Handa  <handa@m17n.org>
8048         * xfont.c (xfont_open): Set font->format.
8050         * xftfont.c (xftfont_open): Set font->format.
8052         * ftfont.c (ftfont_pattern_entity): Add fontformat in a pattern.
8053         (ftfont_list): Include FC_FONTFORMAT in FcObject.
8054         (ftfont_open): Set font->format.
8055         (ftfont_font_format): New function.
8057         * font.h (struct font): New member format.
8059         * font.c (Qopentype): New variable.
8060         (syms_of_font): Defsym it.
8061         (Fquery_font): Change the format of the last element of the return
8062         value.
8064 2008-02-01  Kenichi Handa  <handa@m17n.org>
8066         * xfns.c (xic_create_xfontset): Try the default fontset name as a
8067         last resort.
8069 2008-02-01  Kenichi Handa  <handa@m17n.org>
8071         * coding.c (detect_coding_charset): Fix detection of multi-byte
8072         charset.
8074 2008-02-01  Bob Halley  <halley@play-bow.org>  (tiny change)
8076         * ccl.c (ccl_driver): If DST is NULL, set ccl->produced to 0.
8078 2008-02-01  Kenichi Handa  <handa@m17n.org>
8080         * xdisp.c (get_next_display_element): Set it->face_id for the
8081         first component of a composition.
8082         (x_produce_glyphs): Check if the font is changed or not for composition.
8084 2008-02-01  Kenichi Handa  <handa@m17n.org>
8086         * fontset.c (Qlatin): New variable.
8087         (syms_of_fontset): Define it as a lisp symbol.
8088         (Fset_fontset_font): If TARGET is `latin', use FONT_SPEC for ASCII.
8090 2008-02-01  Kenichi Handa  <handa@m17n.org>
8092         * font.c (font_unparse_fcname): Pay attention to the case that
8093         some of font property is a null string.
8095 2008-02-01  Kenichi Handa  <handa@m17n.org>
8097         * term.c: Include "composite.h".
8098         (encode_terminal_code): Output all components of composition.
8099         Check the size of encode_terminal_src.
8100         (produce_glyphs): For composition, call produce_composite_glyph.
8101         (append_composite_glyph, produce_composite_glyph): New functions.
8103         * xdisp.c (x_produce_glyphs): In handling composition, if a font
8104         is not found, get font_info from the current ascii face.
8106 2008-02-01  Kenichi Handa  <handa@m17n.org>
8108         * fileio.c (Finsert_file_contents): On replacing, temporarily bind
8109         buffer-file-name to Qnil before calling insert_from_buffer.
8111         * font.c (font_unparse_fcname): Pay attention to the case that
8112         foundry is a null string.
8114 2008-02-01  Kenichi Handa  <handa@m17n.org>
8116         * ftfont.c (ftfont_list): Allow registry "unicode-sip".
8118         * font.c (Qunicode_sip): New variable.
8119         (syms_of_font): Declare it as a Lisp symbol.
8121         * font.h (Qunicode_sip): Extern it.
8123 2008-02-01  Kenichi Handa  <handa@m17n.org>
8125         * composite.c (get_composition_id): Pay attention to TAB component.
8127         * xterm.c (x_draw_composite_glyph_string_foreground): Don't draw
8128         TAB.  Adjust for the change of s->char2b which always points to
8129         the first element of allocated memory.
8131         * xftfont.c (xftfont_text_extents): Fix calculation of descent value.
8133         * xdisp.c (handle_composition_prop): Set it->c to the first
8134         non-TAB component.
8135         (fill_composite_glyph_string): Change argument.
8136         (BUILD_COMPOSITE_GLYPH_STRING): Adjust for the above change.
8137         (x_produce_glyphs): Fix handling of left/right padding.
8139 2008-02-01  Kenichi Handa  <handa@m17n.org>
8141         * coding.c (detect_coding_system): Fix for handling off
8142         inhibit_iso_escape_detection.  Fix for the case that no coding
8143         system is defined for a specific coding category.
8145 2008-02-01  Kenichi Handa  <handa@m17n.org>
8147         * font.c (font_matching_entity): Delete unused local var.
8149         * xftfont.c (xftfont_open): Call XftDefaultSubstitute before
8150         opening a font.
8152         * fileio.c (Finsert_file_contents): On recovering a file, assume
8153         Unix-like eol.
8154         (choose_write_coding_system): On auto-saving a file, force
8155         Unix-like eol.
8157         * coding.c (setup_coding_system): Fix setting of
8158         coding->common_flags based on eol_type.
8159         (coding_inherit_eol_type): If PARENT is not nil, be sure to
8160         inherit from it.
8162 2008-02-01  Kenichi Handa  <handa@m17n.org>
8164         * alloc.c (NSTATICS): Increas to 0x600.
8166 2008-02-01  Kenichi Handa  <handa@m17n.org>
8168         * ftfont.c (ftfont_driver): Set ftfont_driver.match to ftfont_match.
8169         (ftfont_list): Don't check :name property.
8170         (ftfont_match): New function.
8171         (ftfont_pattern_entity): If the pattern doesn't contain
8172         FC_SPACING, don't assume FC_MONO.
8174         * font.h (struct font_driver): New member `match'.
8175         (font_update_drivers): Adjust prototype.
8177         * font.c (font_parse_fcname, font_parse_name): Don't change :name
8178         property of FONT.
8179         (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
8180         them unconditionally.
8181         (font_matching_entity): New function.
8182         (font_open_by_name): Try font_matching_entity if exact match is
8183         not found.
8184         (font_update_drivers): Delete the arg FONT.  Return a list of
8185         actually used backends.  Don't free faces, font caches here.
8186         Don't store data in frame parameters.  Don't call x_set_font.
8187         (Ffont_spec): Store :name property as is.
8188         (Ffont_get): Check HAVE_LIBOTF before calling font_otf_capability.
8189         (Ffont_otf_gsub): Call font->driver->otf_gsub instead of font_otf_gsub.
8190         (Ffont_otf_gpos): Call font->driver->otf_gpos instead of font_otf_gpos.
8191         (Ffont_otf_alternates): Check if the driver has otf_gsub function.
8192         Call font->driver->otf_gsub instead of font_otf_gsub.
8194         * frame.c (x_set_font_backend): Do more works that were done in
8195         font_update_drivers before.
8197         * xfont.c (xfont_match): New function.
8198         (xfont_driver): Set xfont_driver.match to xfont_match.
8199         (xfont_draw): Set font in GC if necessary.
8201         * ftxfont.c (ftxfont_match): New function.
8202         (syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.
8204         * xftfont.c (xftfont_match): New function.
8205         (syms_of_xftfont): Set xftfont_driver.match to xftfont_match.
8207 2008-02-01  Kenichi Handa  <handa@m17n.org>
8209         * font.h (struct font): New member scalable.
8210         (struct font_driver): New arg ALTERANTE_SUBST to otf_gsub.
8211         (font_otf_gsub): Adjust prototype.
8213         * font.c (font_otf_capability): Fix handling of the default langsys.
8214         (parse_gsub_gpos_spec): Change type to void.  New arg nbytes.
8215         Check the contents of SPEC.
8216         (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE): New macros.
8217         (check_gstring): New function.
8218         (REPLACEMENT_CHARACTER): New macro.
8219         (font_otf_gsub): New arg alternate_subst.  Be sure to set all
8220         glyph codes of GSTRING.
8221         (font_otf_gpos): Be sure to set all glyph codes of GSTRING.
8222         (font_prepare_composition): Set cmp->glyph_len.
8223         (font_open_entity): Set font->scalable.
8224         (Ffont_get): Handle :otf property.
8225         (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
8226         functions.
8227         (Fquery_font): Use font->font.full_name.
8228         (syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
8229         Sfont_otf_alternates.
8231         * ftfont.c (ftfont_open): Set font->font.full_name and
8232         font->font.name properly.  Fix calculation of font->font.height
8233         and font->min_width.
8235         * ftxfont.c (ftxfont_create_gcs): New function.
8236         (ftxfont_draw_bitmap): Fix arg to ftfont_driver.get_bitmap.
8237         (ftxfont_draw_backgrond): Fix filling region.
8238         (ftxfont_default_fid): New function.
8239         (ftxfont_open): Set xfont->fid to the return value of
8240         ftxfont_default_fid.
8241         (ftxfont_prepare_face): Use ftxfont_create_gcs to create GCs.
8242         (ftxfont_done_face): Free only GCs that are created by
8243         ftxfont_create_gcs.
8244         (ftxfont_draw): If face->gc != s->gc, create proper GCs.
8246         * xterm.c (x_set_glyph_string_clipping_exactly) [USE_FONT_BACKEND]:
8247         Clip to src->width, etc (not src->clip_XXX).
8249         * xfns.c (x_create_tip_frame) [USE_FONT_BACKEND]: Handle
8250         FontBackend frame parameter.
8252 2008-02-01  Kenichi Handa  <handa@m17n.org>
8254         * font.h (struct font_driver_list): New member `on'.
8255         (Fclear_font_cache): EXFUN it.
8256         (font_update_drivers): Extern it.
8258         * font.c (font_unparse_fcname): Fix typo (swidth->width).
8259         (font_list_entities): Check driver_list->on.
8260         (register_font_driver): Initalize `on' member to 0.
8261         (font_update_drivers): New function.
8262         (Fclear_font_cache): Check driver_list->on.
8264         * frame.h (Qfont_backend): Extern it.
8265         (x_set_font_backend): Extern it.
8267         * frame.c (Qfont_backend): New variable.
8268         (frame_parms): New element for font-backend.
8269         (x_set_font_backend): New function.
8271         * xfns.c (Fx_create_frame) [USE_FONT_BACKEND]: Handle
8272         FontBackend frame parameter.
8273         (x_frame_parm_handlers) [USE_FONT_BACKEND]: New element
8274         x_set_font_backend.
8276         * xfont.c (xfont_list): Don't try listing by :name property if the
8277         name is not for XLFD.
8279 2008-02-01  Kenichi Handa  <handa@m17n.org>
8281         * font.h (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
8282         (LGLYPH_SET_TO): New macros.
8283         (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
8284         element of G is vector or not.
8285         (font_at): Extern it.
8287         * font.c: Include window.h.
8288         (font_lispy_object): New function.
8289         (font_prepare_composition): Check LGLYPH_FORM (g) to detect the
8290         end of valid glyph.
8291         (font_close_object): Fix getting (struct font *).
8292         (font_at): New function.
8293         (Ffont_get): If FONT is a font-object, get entity from it.
8294         (Ffont_make_gstring): Initialize elements of glyphs with nil.
8295         (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX.  Fix
8296         range check.
8297         (Ffont_at): New function.
8298         (syms_of_font): Defsubr Sfont_at.
8300         * xdisp.c (it_props): Move the entry for Qauto_composed to just
8301         before the entry for Qcomposition.
8302         (handle_auto_composed_prop): Call auto-composition-function with 4 args.
8303         (handle_composition_prop) [USE_FONT_BACKEND]: Set it->face_id from
8304         the font in gstring.
8305         (fill_composite_glyph_string) [USE_FONT_BACKEND]: Check
8306         LGLYPH_FORM (g) to detect the end of valid glyph.
8307         (x_produce_glyphs) [USE_FONT_BACKEND]: Don't update it->face_id if
8308         we are composing with gstring.
8310         * xterm.c (x_draw_composite_glyph_string_foreground) [USE_FONT_BACKEND]:
8311         Check if adjustment is vector or not.
8313         * Makefile.in (font.o): Make it depends on window.h.
8315 2008-02-01  Kenichi Handa  <handa@m17n.org>
8317         * xterm.c (x_draw_composite_glyph_string_foreground): Check if
8318         adjustment is vector or not.
8320 2008-02-01  Miles Bader  <miles@gnu.org>
8322         * character.h (CHECK_CHARACTER): Redefine in terms of CHECK_TYPE.
8324 2008-02-01  Kenichi Handa  <handa@m17n.org>
8326         * font.h (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
8327         (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format.
8328         (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
8330         * font.c (font_merge_old_spec): Treat '*' in foundry as a wild card.
8331         (DEVICE_DELTA): Fix typo.
8332         (font_otf_gpos, font_prepare_compositio): Adjust for the change of
8333         LGLYPH format.
8335         * xterm.c (x_draw_composite_glyph_string_foreground): Adjust for
8336         the change of LGLYPH format.
8338 2008-02-01  Kenichi Handa  <handa@m17n.org>
8340         * ftfont.c (ftfont_list): Fix typo.
8341         (ftfont_build_basic_charsets): Don't include letters with diacritics.
8343 2008-02-01  Jan Djärv  <jan.h.d@swipnet.se>
8345         * xfaces.c (realize_non_ascii_face): Set face->extra to NULL.
8347         * xftfont.c (xftfont_done_face): Call XftDrawDestroy only if
8348         xftface_info is non-NULL.
8350 2008-02-01  Jan Djärv  <jan.h.d@swipnet.se>
8352         * ftfont.c (ftfont_list): Move misplaced #endif.
8354 2008-02-01  Kenichi Handa  <handa@m17n.org>
8356         * ftfont.c (ftfont_list): Pay attention to the case that
8357         FC_CAPABILITY is not defined.
8359 2008-02-01  Kenichi Handa  <handa@m17n.org>
8361         * xftfont.c (xftfont_open): Set charset related members to -1.
8363         * ftfont.c (ftfont_list): Handle QCotf property.  Fix handling of
8364         QCname.
8365         (ftfont_open): Set charset related members to -1.
8367         * fontset.c (Votf_script_alist): New variable.
8368         (syms_of_fontset): Initialize it.
8369         (fontset_font): Delete unused variable.
8371         * fontset.h (Votf_script_alist): Extern it.
8373         * font.c (font_find_for_lface): Optimize code.
8375         * font.h (font_close_object, font_merge_old_spec): Extern them.
8377 2008-02-01  Kenichi Handa  <handa@m17n.org>
8379         * font.c (QCscalable, Qc, Qm, Qp, Qd): New variables.
8380         (syms_of_font): Initialize them.
8381         (font_pixel_size): Allow float value in dpi.
8382         (font_prop_validate_type): Delete.
8383         (font_prop_validate_symbol, font_prop_validate_style): Change argument.
8384         Change caller.
8385         (font_prop_validate_non_neg): Rename from font_prop_validate_size.
8386         (font_prop_validate_extra): Delete.
8387         (font_prop_validate_spacing): New function.
8388         (font_property_table): Add elements for all known properties.
8389         (get_font_prop_index): Rename from check_font_prop_name.  New
8390         argument FROM.  Change caller.
8391         (font_prop_validate): Validate all known properties.
8392         (font_put_extra): Delete argument force.  Change caller.
8393         (font_expand_wildcards): Make it static.  Fix the way of shrinking
8394         the possible range.
8395         (font_parse_xlfd): Delete argument merge.  Fix handling of RESX,
8396         RESY, SPACING, and AVGWIDTH.  Don't validate property values here.
8397         Change caller.
8398         (font_unparse_xlfd): Handle dpi, spacing, and scalable properties.
8399         (font_parse_fcname): Delete argument merge.  Fix parsing of point
8400         size.  Don't validate properties values here.  Change caller.
8401         (font_unparse_fcname): Handle dpi, spacing, and scalable properties.
8402         (font_open_by_name): Delete unused variable.
8403         (Ffont_spec): Likewise.  Validate property values.
8404         (Ffont_match_p): New function.
8406         * font.h (QCscalable): Extern it.
8407         (font_parse_xlfd, font_parse_fcname): Adjust prototype.
8409         * ftfont.c (ftfont_list): Handle properties dpi, spacing, and scalable.
8411         * xfont.c (xfont_query_font): Adjust for the change of font_parse_xlfd.
8412         (xfont_list_pattern): New function.
8413         (xfont_list): Use xfont_list_pattern.
8415 2008-02-01  Kenichi Handa  <handa@m17n.org>
8417         * font.h (Flist_fonts): EXFUN it.
8419 2008-02-01  Jason Rumney  <jasonr@gnu.org>
8421         * w32term.c (w32_initialize): Add back smoothing_type and
8422         smoothing_enabled definitions.
8424 2008-02-01  Kenichi Handa  <handa@m17n.org>
8426         * xterm.c (x_draw_glyph_string) [USE_FONT_BACKEND]: Check
8427         s->face->font on determining underline position.
8429 2008-02-01  Kenichi Handa  <handa@m17n.org>
8431         * font.c (font_parse_xlfd): Fix generating of CHARSET_REGISTRY field.
8432         (font_has_char): Accept font-object too.
8433         (font_find_for_lface): Try at first with a size specified in face.
8435 2008-02-01  Kenichi Handa  <handa@m17n.org>
8437         * frame.c (x_set_font) [USE_FONT_BACKEND]: Fix argument to
8438         font_open_by_name.
8440 2008-02-01  Kenichi Handa  <handa@m17n.org>
8442         * font.h (QCspacing, QCdpi): Extern them.
8443         (enum font_spacing): New enum.
8444         (FONT_PIXEL_SIZE_QUANTUM): New macro.
8446         * font.c (POINT_TO_PIXEL): Don't divide POINT by 10.
8447         (QCspacing, QCdpi): New variables.
8448         (syms_of_font): Initialize them.
8449         (font_pixel_size): New function.
8450         (font_put_extra): New function.
8451         (font_parse_xlfd): Fix handling of font size.  Add QCdpi property
8452         in FONT_EXTRA.
8453         (font_parse_fcname): Handle enumerated values (e.g. bold).
8454         Fix handling font size.  Add QCname property that contains only
8455         unknown properties.
8456         (font_score): Change argument.  Change caller.  Pay attention to
8457         FONT_PIXEL_SIZE_QUANTUM.
8458         (font_sort_entites, font_list_entities, font_find_for_lface)
8459         (font_open_for_lface, font_open_by_name): Fix handling of font size.
8460         (Ffont_spec): Add QCname property that contains only unknown properties.
8462         * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq.  Don't
8463         include weight in listing pattern, instead check weight of each
8464         listed font.  Don't include scalable in pattern.  Pay attention to
8465         FONT_PIXEL_SIZE_QUANTUM.
8467 2008-02-01  Kenichi Handa  <handa@m17n.org>
8469         * font.c (font_parse_fcname): Fix parsing of point-size.
8470         (font_unparse_fcname): Produce symbolic names for style properties.
8471         (font_list_entities): Handle float size correctly.
8472         (font_open_by_name): Prefer `normal' property values if the name
8473         doesn't specify them.
8475         * fontset.c (Finternal_char_font): Use font_get_name, not
8476         Ffont_xlfd_name.
8478         * ftfont.c (ftfont_pattern_entity): Use the numeric value 100 for
8479         FC_WEIGHT_REGULAR.  Exclude FC_SIZE and FC_PIXEL_SIZE from listing
8480         pattern.  Don't force scalable.
8482         * xftfont.c (xftfont_open): For generating a name, start from
8483         96-byte buffer.
8485 2008-02-01  Jan Djärv  <jan.h.d@swipnet.se>
8487         * frame.h (x_new_fontset2): Fix prototype.
8489 2008-02-01  Kenichi Handa  <handa@m17n.org>
8491         * font.h (struct font_driver): Delete member parse_name.
8492         (font_match_p, font_get_spec, font_parse_fcname)
8493         (font_unparse_fcname): Extern them.
8494         (font_get_name): Adjust prototype.
8496         * font.c (XLFD_SMALLNUM_MASK): Delete this macro.
8497         (XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
8498         (font_expand_wildcards): Fix handling ENCODING field.  Avoid
8499         unnecessary checks for weight, slant, and swidth.
8500         (font_parse_fcname): New function.
8501         (font_unparse_fcname): New function.
8502         (font_parse_name): New function.
8503         (font_match_p): New function.
8504         (font_get_name): Change return value to Lisp string.
8505         (font_get_spec): New function.
8506         (Qunspecified, Qignore_defface): Don't extern them.
8507         (font_find_for_lface): Assume that LFACE is fully specified.
8508         (font_load_for_face): If lface[LFACE_FONT_INDEX] is an font
8509         object, use it for FACE.
8510         (font_open_by_name): Call Ffont_spec with QCname prop.  Don't call
8511         driver->parse_name.
8512         (Ffont_spec): Call font_parse_name, not font_parse_xlfd.
8514         * fontset.h (new_fontset_from_font) [USE_FONT_BACKEND]: Adjust
8515         prototype.
8517         * fontset.c (new_fontset_from_font) [USE_FONT_BACKEND]: Delete
8518         argument F.  Don't call Fnew_fontset.  Instead, directly call
8519         make_fontset.
8521         * frame.h (x_new_fontset2) [USE_FONT_BACKEND]: Adjust prototype.
8523         * frame.c (x_set_font) [USE_FONT_BACKEND]: Adjust for the change
8524         of x_new_fontset2.
8526         * ftfont.c (Qmonospace, Qsans_serif, Qserif, Qmono, Qsans)
8527         (Qsans__serif): New variables.
8528         (ftfont_generic_family_list): New variable.
8529         (syms_of_ftfont): Initialize the above variables.
8530         (ftfont_pattern_entity): Delete argument NAME.
8531         (ftfont_list_generic_family): New function.
8532         (ftfont_parse_name): Delete this function.
8533         (ftfont_list): Try generic family only when FcFontList found no font.
8534         (ftfont_list_family): Fix args to FcObjectSetBuild.
8536         * xfaces.c (check_lface_attrs) [USE_FONT_BACKEND]: Accept font
8537         object in attrs[LFACE_FONT_INDEX].
8538         (set_lface_from_font_name): Cancel all changes for font-backend.
8539         (set_lface_from_font_and_fontset) [USE_FONT_BACKEND]: New
8540         function.
8541         (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: Accept a
8542         font object in QCfont attribute.
8543         (set_font_frame_param) [USE_FONT_BACKEND]: Likewise.
8544         (realize_default_face) [USE_FONT_BACKEND]: Call
8545         set_lface_from_font_and_fontset.
8547         * xfns.c (x_default_font_parameter) [USE_FONT_BACKEND]: Try also
8548         "fixed", and signal error here if no suitable font was found.
8550         * xfont.c (xfont_parse_name): Delete this function.
8552         * xftfont.c (xftfont_open): Change coding style of error
8553         handling.  Generate fontconfig's fontname pattern.
8555         * xterm.h (struct x_output) [USE_FONT_BACKEND]: New member fontp.
8556         (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro.
8558         * xterm.c (x_new_fontset2) [USE_FONT_BACKEND]: Change arguments.
8559         Both args FONTSET and FONT_OBJECT must be existing ones.
8561 2008-02-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
8563         * macterm.c (mac_set_unicode_keystroke_event): Don't use MAKE_CHAR.
8565 2008-02-01  Kenichi Handa  <handa@m17n.org>
8567         * xfont.c (xfont_open, xfont_encode_char): Fix typo.
8569         * font.h (struct font): Fix typo.
8571         * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
8572         XLFD_XXX_INDEX.
8573         (enum xlfd_field_mask): New enum.
8574         (intern_font_field): Changed argument.  Change caller.  If digits
8575         are followed by non-digits, return a symbol.
8576         (font_expand_wildcards): New function.
8577         (font_parse_xlfd): Fix wildcard handling.
8578         (Ffont_spec): If :name is specified, reflect the info in the other
8579         properties.
8581         * ftfont.c (ftfont_pattern_entity): Fix typo.
8582         (ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
8583         locale.
8585 2008-02-01  Kenichi Handa  <handa@m17n.org>
8587         * font.h (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
8589         * font.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Move from ftfont.c.
8590         (font_unparse_xlfd): Fix argument type declaration.  Append "*" if
8591         registry doesn't specify encoding part.
8592         (font_find_for_lface): Pay attention to LFACE_FONT_INDEX.
8593         (font_open_by_name): At first try parsing the name.
8594         (syms_of_font): Declare Qiso8859_1, Qiso10646_1, and Qunicode_bmp
8595         as Lisp symbols.
8597         * fontset.c (reorder_font_vector): Pay attention to the case that
8598         the 3rd element of font_def is nil.
8599         (fontset_font): For the default fontset, append one more fontset
8600         elements for a script-based font specification.  Don't add script
8601         attribute on finding a font.
8602         (new_fontset_from_font): Unconditionally set FONTSET_ASCII to the
8603         font name.
8604         (fontset_ascii_font): If a font can't be opened, return nil.
8606         * ftfont.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Move to font.c.
8607         (ftfont_pattern_entity): New function.
8608         (ftfont_get_cache): Assume that freetype_font_cache is already
8609         initialized.
8610         (ftfont_list): Handle the case that a file is specified in font
8611         name.  Use ftfont_pattern_entity to generate entities.
8612         (ftfont_has_char): Check if the pattern contains FC_CHARSET.
8613         (syms_of_ftfont): Initialize freetype_font_cache.
8615         * xftfont.c (xftfont_open): Make the font name fontconfig's
8616         style.  Add BLOCK_INPUT and UNBLOCK_INPUT.
8617         (xftfont_close): Free font->font.name if not NULL.
8619         * xfont.c (xfont_list): If script is specified for a font, return
8620         null_vector.
8621         (xfont_list_family): Declare argument type.
8623         * xfaces.c (set_lface_from_font_name): If a font doesn't have a
8624         name, set LFACE_FONT (lface) to nil.
8626         * xterm.c (x_new_fontset2): If an ASCII font couldn't be loaded,
8627         return Qnil.
8629 2008-02-01  Kenichi Handa  <handa@m17n.org>
8631         * emacs.c (main): Check -enable-font-backend arg after the check of -nl.
8632         (standard_args): Add "-enable-font-backend".
8634 2008-02-01  Kenichi Handa  <handa@m17n.org>
8636         * xftfont.c (xftfont_default_fid): Set fid_known to 1.
8637         (struct xftdraw_list, xftdraw_list): Delete them.
8638         (register_xftdraw, check_xftdraw): Delete them.
8639         (xftfont_prepare_face): Don't call register_xftdraw.
8640         (xftfont_done_face): Don't call check_xftdraw.
8641         (xftfont_draw): Get background color only when with_background is
8642         nonzero.
8644         * xfont.c (xfont_encode_char): Fix calculation of char2b.
8646 2008-02-01  Kenichi Handa  <handa@m17n.org>
8648         These changes are for the new font handling codes.
8650         * Makefile.in (ALL_CFLAGS): Add @FREETYPE_CFLAGS@,
8651         @FONTCONFIG_CFLAGS@, and @LIBOTF_CFLAGS@.
8652         (LIB_X11_LIB): If HAVE_XFT is defined, set to @XFT_LIBS@.
8653         (FONTSRC, FONTOBJ): New variables.
8654         (obj): Add $(FONTOBJ).
8655         (SOME_MACHINE_OBJECTS): Lib_X11_Lib.
8656         (LIBES): Add @FREETYPE_LIBS@, @FONTCONFIG_LIBS@, and
8657         @LIBOTF_LIBS@.
8658         (font.o, ftfont.o, xfont.o, xftfont.o, ftxfont.o): New targets.
8659         (fontset.o, xdisp.o, xfaces.o, xfns.o, xterm.o): Depend on $(FONTSRC).
8661         * font.h, font.c, xfont.c, ftfont.c, xftfont.c, ftxfont.c: New files.
8663         * character.h (Vscript_representative_chars): Extern it.
8665         * character.c (Vscript_representative_chars): New variable.
8666         (syms_of_character): Declare it as a Lisp variable.
8668         * composite.c (get_composition_id) [USE_FONT_BACKEND]: If
8669         enable_font_backend is nonzero, accept the composition method
8670         COMPOSITION_WITH_GLYPH_STRING.
8672         * composite.h (enum composition_method) [USE_FONT_BACKEND]: New
8673         enumeration COMPOSITION_WITH_GLYPH_STRING.
8675         * dispextern.h (struct glyph_string) [USE_FONT_BACKEND]: New
8676         members clip_x, clip_y, clip_width, and clip_height.
8677         (struct face) [USE_FONT_BACKEND]: New members font_info and extra.
8679         * emacs.c (main) [USE_FONT_BACKEND]: Handle arg
8680         --enable-font-backend.  Call syms_of_font.
8682         * fns.c (assoc_no_quit): New function.
8684         * fontset.h (FONT_INFO_FROM_FACE): New macro.
8685         (face_for_font, new_fontset_from_font)
8686         (fontset_ascii_font) [USE_FONT_BACKEND]: Extern them.
8688         * fontset.c [USE_FONT_BACKEND]: Include "font.h".
8689         (fontset_font, fontset_ascii, face_for_char)
8690         (make_fontset_for_ascii_face, Ffont_info)
8691         (Finternal_char_font) [USE_FONT_BACKEND]: If enable_font_backend
8692         is nonzero, use font-backend mechanism.
8693         (find_font_encoding): Make it non-static.
8694         (new_fontset_from_font, fontset_ascii_font) [USE_FONT_BACKEND]:
8695         New functions.
8697         * frame.h (struct frame): New members resx and resy.
8698         (struct frame) [USE_FONT_BACKEND]: New member font_driver_list.
8699         (x_new_fontset2) [USE_FONT_BACKEND]: Extern it.
8701         * frame.c [USE_FONT_BACKEND]: Include "font.h".
8702         (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend mechanism.
8704         * lisp.h (assoc_no_quit): Extern it.
8706         * xdisp.c: If USE_FONT_BACKEND is defined, include "font.h".
8707         Through out the file, use FONT_INFO_FROM_FACE instead of
8708         FONT_INFO_FROM_ID, use get_per_char_metric instead of
8709         rif->per_char_metric.
8710         (handle_composition_prop) [USE_FONT_BACKEND]: If the composition
8711         method is COMPOSITION_WITH_GLYPH_STRING, just set it->c to ' '.
8712         (get_glyph_face_and_encoding, fill_composite_glyph_string)
8713         (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
8714         (x_produce_glyphs) [USE_FONT_BACKEND]: If enable_font_backend is
8715         nonzero, use font-backend mechanism.
8716         (get_per_char_metric): New function.
8718         * xfaces.c [USE_FONT_BACKEND]: Include "font.h".
8719         (set_lface_from_font_name)
8720         (set_font_frame_param, free_realized_face)
8721         (prepare_face_for_display, clear_face_gcs)
8722         (Finternal_set_font_selection_order, realize_x_face)
8723         [USE_FONT_BACKEND]: If enable_font_backend is nonzero, use
8724         font-backend mechanism.
8725         (clear_face_cache) [USE_FONT_BACKEND]: Don't call clear_font_table.
8726         (load_face_font) [USE_FONT_BACKEND]: Abort.
8727         (face_symbolic_value, face_symbolic_weight, face_symbolic_slant)
8728         (face_symbolic_swidth, face_for_font) [USE_FONT_BACKEND]: New functions.
8730         * xfns.c [USE_FONT_BACKEND]: Include "font.h".
8731         (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
8732         (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
8733         nonzero, register all available font drivers.  Call
8734         x_default_font_parameter for deciding a font.
8735         (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
8737         * xterm.c [USE_FONT_BACKEND]: Include "font.h".
8738         (x_set_mouse_face_gc, x_set_glyph_string_clipping)
8739         (x_set_glyph_string_clipping_exactly)
8740         (x_compute_glyph_string_overhangs)
8741         (x_draw_glyph_string_foreground)
8742         (x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
8743         (x_free_frame_resources) [USE_FONT_BACKEND]: If
8744         enable_font_backend is nonzero, use font-backend mechanism.
8745         (x_new_fontset2) [USE_FONT_BACKEND]: New function.
8747 2008-02-01  Kenichi Handa  <handa@m17n.org>
8749         * coding.c (coding_inherit_eol_type): If PARENT is nil, inherit from
8750         system_eol_type.
8751         (syms_of_coding): Initialize system_eol_type.
8753         * process.c (Fset_process_coding_system): Inherit system's eol
8754         format if necessary.
8756 2008-02-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
8758         * macgui.h (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
8760 2008-02-01  Kenichi Handa  <handa@m17n.org>
8762         * coding.c (decode_eol): Pay attention to buffer relocation in
8763         del_range_2.
8764         (decode_coding): Call decode_eol before restoring undo_list.
8766 2008-02-01  Kenichi Handa  <handa@m17n.org>
8768         * charset.c (Fdefine_charset_internal): Fix setting of
8769         emacs_mule_bytes.
8771 2008-02-01  Kenichi Handa  <handa@m17n.org>
8773         * keyboard.c (read_char): Check if C is a character or not before
8774         looking up Vkeyboard_translate_table.
8776 2008-02-01  Kenichi Handa  <handa@m17n.org>
8778         * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
8779         condition to terminate the loop.
8781 2008-02-01  Kenichi Handa  <handa@m17n.org>
8783         * coding.c (produce_composition): Compare charbuf[i] instead of
8784         args[i] against 0.
8785         (Fterminal_coding_system): Use EQ to compare Lisp objects.
8787 2008-02-01  Kenichi Handa  <handa@m17n.org>
8789         * coding.c (DECODE_COMPOSITION_START): If the source is short, set
8790         coding->result to CODING_RESULT_INSUFFICIENT_SRC.
8791         (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
8792         detect_coding.
8793         (emacs_mule_char): Handle old style (Emacs 20) component character
8794         of a composition.
8795         (DECODE_EMACS_MULE_COMPOSITION_RULE_20)
8796         (DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Fix parsing a
8797         composition rule.
8798         (decode_coding_emacs_mule): Handle invalid bytes correctly.
8800 2008-02-01  Kenichi Handa  <handa@m17n.org>
8802         * coding.c (encode_coding_ccl): Allocate destination dynamically
8803         when necessary.
8805 2008-02-01  Kenichi Handa  <handa@m17n.org>
8807         * ccl.c (Fccl_execute_on_string): Fix the condition of terminating
8808         the loop.  When quitted, show a proper error message.
8810 2008-02-01  Kenichi Handa  <handa@m17n.org>
8812         * xterm.c (x_set_glyph_string_clipping_exactly): Set
8813         src->clip_head and src->clip_tail temporarily instead of src->hl.
8815         * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
8816         character sequence.
8817         (Fccl_execute_on_string): Use ASET, not XSET.
8819 2008-02-01  Kenichi Handa  <handa@m17n.org>
8821         * search.c (search_buffer): Fix handling of "\\" in a trivial regexp.
8823 2008-02-01  Kenichi Handa  <handa@m17n.org>
8825         * coding.c (decode_coding): Fix the condition of terminating the
8826         decoding loop.
8828 2008-02-01  Kenichi Handa  <handa@m17n.org>
8830         * data.c (Faset): On setting a character bigger than 255 in a
8831         unibyte string, signal an error instead of make the string multibyte.
8833 2008-02-01  Kenichi Handa  <handa@m17n.org>
8835         * charset.c (map_charset_chars): Fix for ascii-compatible charset
8836         made by a mapping table.
8838 2008-02-01  Kenichi Handa  <handa@m17n.org>
8840         * xdisp.c (fill_composite_glyph_string): Check s->face is NULL or
8841         not.
8842         (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
8843         (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
8845         * xterm.c (x_draw_composite_glyph_string_foreground): Check
8846         s->face is NULL or not.
8848 2008-02-01  Kenichi Handa  <handa@m17n.org>
8850         * xterm.c (x_set_glyph_string_clipping_exactly): New function.
8851         (x_draw_glyph_string): Fix drawing of right_overhang and
8852         left_overhang around/on cursor.
8854         * xdisp.c (draw_glyphs): Fix inclusion of right_overwriting glyphs.
8856 2008-02-01  Kenichi Handa  <handa@m17n.org>
8858         * xdisp.c (x_produce_glyphs): Handle composition with TAB.
8860 2008-02-01  Kenichi Handa  <handa@m17n.org>
8862         * coding.c (Fdefine_coding_system_internal)
8863         (Fdefine_coding_system_alias): Avoid a duplicated element in
8864         Vcoding_system_alist.
8866 2008-02-01  Kenichi Handa  <handa@m17n.org>
8868         * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
8870         * coding.c (Qcoding_system_define_form): New variable.
8871         (syms_of_coding): Intern and staticpro it.
8872         (Fcoding_system_p): Check Qcoding_system_define_form.
8873         (Fcheck_coding_system): Try to autoload the definition of CODING-SYSTEM.
8875         * coding.h (CODING_SYSTEM_P): If ID is not available, call
8876         Fcoding_system_p.
8877         (CHECK_CODING_SYSTEM): If ID is not available, call
8878         Fcheck_coding_system.
8879         (CHECK_CODING_SYSTEM_GET_SPEC, CHECK_CODING_SYSTEM_GET_ID):
8880         Try also Fcheck_coding_system.
8882 2008-02-01  Kenichi Handa  <handa@m17n.org>
8884         * coding.c (code_conversion_restore): GCPRO arg.
8886 2008-02-01  Kenichi Handa  <handa@m17n.org>
8888         * character.c (lisp_string_width): Check multibyteness of STRING.
8890 2008-02-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
8892         * macterm.c (mac_encode_char): Call ccl_driver with the last arg
8893         Qnil.  Use JIS_TO_SJIS instead of ENCODE_SJIS.
8894         (decode_mac_font_name): Use decode_coding_c_string instead of
8895         decode_coding.
8896         (x_load_font): Initialize fontp->fontset to -1.  Set
8897         fontp->encoding_type.
8899 2008-02-01  Kenichi Handa  <handa@m17n.org>
8901         * search.c (search_buffer): Give up BM search on case-fold-search
8902         if one of a target character has a case-equivalence of different
8903         byte length even if that target charcter is an ASCII.
8904         (simple_search): Fix calculation of byte length of matched text.
8905         (boyer_moore): Fix handling of case-equivalent multibyte characters.
8907 2008-02-01  Kenichi Handa  <handa@m17n.org>
8909         * coding.c (decode_coding): Fix handling of invalid bytes.
8911 2008-02-01  Kenichi Handa  <handa@m17n.org>
8913         * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
8914         Unicode characters.
8916 2008-02-01  Kenichi Handa  <handa@m17n.org>
8918         * coding.c (encode_coding_object): If a pre-write-conversion
8919         function makes a new buffer, kill it.
8921 2008-02-01  Kenichi Handa  <handa@m17n.org>
8923         * coding.c (QCascii_compatible_p): New variable.
8924         (syms_of_coding): Initialize it.
8925         (ONE_MORE_BYTE, ONE_MORE_BYTE_NO_CHECK): Decrement `src' before
8926         calling string_char.
8927         (record_conversion_result): Add `default:' case.
8928         (coding_charset_list): Delete unused variable `coding_type'.
8929         (Fdefine_coding_system_internal): Add `ascii-compatible-p'
8930         property in the plist of the coding system.
8931         (Fcoding_system_put): Check QCascii_compatible_p.
8933 2008-02-01  Miles Bader  <miles@gnu.org>
8935         * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
8936         removed calculation of frame `f', as it's now used.
8938 2008-02-01  Kenichi Handa  <handa@m17n.org>
8940         * Makefile.in (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
8941         (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
8942         (UNIDATA): New variable.
8943         (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
8944         (bootstrap-emacs${EXEEXT}): Depends on charprop.el.  Run
8945         $(RUN_TEMACS) unconditionally.
8947 2008-02-01  Kenichi Handa  <handa@m17n.org>
8949         * Makefile.in (temacs${EXEEXT}): Build charprop.el if necessary.
8950         (admindir): New variable.
8951         ($(lispsource)international/charprop.el): New target.
8953 2008-02-01  Miles Bader  <miles@gnu.org>
8955         * character.c (chars-in-region): Remove obsolete function.
8956         (syms_of_character): Remove its initialization.
8958 2008-02-01  Benjamin Riefenstahl  <b.riefenstahl@turtle-trading.net>
8960         * w32select.c (validate_coding_system)
8961         (setup_windows_coding_system): New functions.
8962         (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
8963         setup_windows_coding_system.
8964         (setup_config, Fw32_get_clipboard_data): Use
8965         validate_coding_system.
8966         (Fx_selection_exists): Move call to setup_config to a place
8967         where signals are allowed.
8969         * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
8970         (Fcheck_coding_system): Add declarations.
8972 2008-02-01  Kenichi Handa  <handa@m17n.org>
8974         * charset.c (load_charset_map_from_vector): Fix for the first iteration.
8976 2008-02-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
8978         * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
8979         string as the second argument for x_new_fontset.
8981 2008-02-01  Kenichi Handa  <handa@m17n.org>
8983         * coding.c (decode_coding_object): Use safe_call1 instead of call1.
8984         (encode_coding_object): Use safe_call instead of call2.
8986 2008-02-01  Kenichi Handa  <handa@m17n.org>
8988         * fontset.c (Fset_fontset_font): Check family element of a given vector.
8990         * Makefile.in (lisp): Include charprop.el.
8992 2008-02-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
8994         * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
8995         Not sure if it's unnecessary.
8997 2008-02-01  Steven Tamm  <steventamm@mac.com>
8999         * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
9000         some possibly unnecessary fontset checking code that crashed
9001         when creating a new frame.
9003 2008-02-01  Kenichi Handa  <handa@m17n.org>
9005         * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
9006         lookup_face.
9008         * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
9010         * fringe.c (draw_fringe_bitmap_1): Fix argument to lookup_named_face.
9012 2008-02-01  Kenichi Handa  <handa@m17n.org>
9014         * coding.c: Cancel the change done in HEAD on 2008-02-01.
9015         (coding_charset_list): New function.
9017         * coding.h (coding_charset_list): Extern it.
9019 2008-02-01  Kenichi Handa  <handa@m17n.org>
9021         * fontset.c (Fset_fontset_font): Call find_font_encoding with
9022         concatenation of family and registry.
9024 2008-02-01  Kenichi Handa  <handa@m17n.org>
9026         * character.h (BYTE8_STRING): Fix typo.
9028         * editfns.c (Ftranslate_region_internal): Don't convert unibyte
9029         string to multibyte (sync to HEAD).
9031         * casefiddle.c (casify_region): Handle changes in byte-length
9032         using replace_range_2 (sync to HEAD).
9034 2008-02-01  Andreas Schwab  <schwab@suse.de>
9036         * chartab.c (map_char_table): GCPRO table and arg.
9038 2008-02-01  Kenichi Handa  <handa@m17n.org>
9040         * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
9041         already at limit.
9043 2008-02-01  Kenichi Handa  <handa@m17n.org>
9045         * fontset.c (fs_load_font): Use fast_string_match_ignore_case
9046         instead of fast_c_string_match_ignore_case.
9047         (find_font_encoding): Change argument to Lisp_Object.  Use
9048         fast_string_match_ignore_case instead of
9049         fast_c_string_match_ignore_case.  Change caller.
9051 2008-02-01  Kenichi Handa  <handa@m17n.org>
9053         * xdisp.c (get_next_display_element): In unibyte case, decide to
9054         display in octal form by checking a character by
9055         UNIBYTE_CHAR_HAS_MULTIBYTE_P.
9057         * charset.c (Fset_unibyte_charset): Setup unibyte_has_multibyte_table.
9059         * character.c (unibyte_has_multibyte_table): New variable.
9061         * character.h (unibyte_has_multibyte_table): Extern it.
9062         (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
9064 2008-02-01  Kenichi Handa  <handa@m17n.org>
9066         * coding.c (encode_coding_iso_2022): Fix handling of charset
9067         annotation.
9069 2008-02-01  Kenichi Handa  <handa@m17n.org>
9071         * coding.c (setup_coding_system): If coding_system is nil, use
9072         Qundecided.
9073         (Fterminal_coding_system): Return nil if terminal coding system is
9074         `undecided'.
9075         (syms_of_coding): Define coding-system `undecided' here.  Setup
9076         terminal_coding as `undecided'.
9078 2008-02-01  Kenichi Handa  <handa@m17n.org>
9080         * xdisp.c (message_dolog, set_message_1): Call
9081         unibyte_char_to_multibyte with arg type int.
9083         * lread.c (read1): Fix reading of a char-table.
9085         * print.c (print_object): Include sub char-table in circularities
9086         detection.
9088 2008-02-01  Kenichi Handa  <handa@m17n.org>
9090         * keymap.c (where_is_internal_2): Fix for the case that KEY is a cons.
9091         Append the found sequences in car of ARGS instead of prepending.
9093 2008-02-01  Kenichi Handa  <handa@m17n.org>
9095         * fileio.c (report_file_error): Make a unibyte string from
9096         strerror (errorno).
9097         (Fsubstitute_in_file_name): Fix the arg to
9098         unibyte_char_to_multibyte.  It is evaluated twice.
9100 2008-02-01  Kenichi Handa  <handa@m17n.org>
9102         * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
9104 2008-02-01  Kenichi Handa  <handa@m17n.org>
9106         * coding.c (detect_coding_utf_16): Don't set detect_info->found if
9107         BOM is not found.
9108         (detect_coding, detect_coding_system): Optimization for ISO-2022
9109         when no 8-bit data is found.
9111 2008-02-01  Jason Rumney  <jasonr@gnu.org>
9113         * w32fns.c (x_to_w32_font): Update to use new coding struct.
9115 2008-02-01  Kenichi Handa  <handa@m17n.org>
9117         * charset.c (Fdeclare_equiv_charset, Fiso_charset): Fix handing of
9118         CHARS.
9120 2008-02-01  Steven Tamm  <steventamm@mac.com>
9122         * macterm.c (mac_encode_char): Add charset argument and update
9123         to use encoding_type.
9124         (x_new_font, x_new_fontset): Merge in changes from xterm.c;
9125         switch to pure fontset.
9126         (decode_mac_font_name): Temporarily remove decoding.
9127         (x_font_name_to_mac_font_name): Temporarily remove encoding.
9128         (x_load_font): Temporarily remove encoding.
9130 2008-02-01  Kenichi Handa  <handa@m17n.org>
9132         * xfaces.c (Fface_font): If frame is not on a window system,
9133         ignore CHARACTER arg.  If HAVE_WINDOW_SYSTEM is not defined, don't
9134         refer to face->font.
9135         (split_font_name_into_vector, build_font_name_from_vector)
9136         (lookup_non_ascii_face, realize_non_ascii_face): Define them only
9137         when HAVE_WINDOW_SYSTEM is defined.
9139 2008-02-01  Kenichi Handa  <handa@m17n.org>
9141         * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
9142         (x_produce_glyphs): Fix setting of members of cmp in case
9143         cmp->glyph_len is zero.
9145         * fontset.c (Fset_fontset_font): Fix docstring.
9146         (Ffontset_info): Make it backward compatible.  New arg ALL.
9148 2008-02-01  Kim F. Storm  <storm@cua.dk>
9150         * process.c (read_process_output): Grow decoding_buf when needed;
9151         this could cause a crash in allocate_string and compact_small_strings.
9153 2008-02-01  Kenichi Handa  <handa@m17n.org>
9155         * fileio.c (WRITE_BUF_SIZE): Delete this macro.
9157 2008-02-01  Kenichi Handa  <handa@m17n.org>
9159         * coding.c (setup_coding_system): Set coding->common_flags
9160         correctly for raw-text.
9161         (consume_chars): On encoding unibyte text by raw-text, don't check
9162         multibyte form.
9163         (encode_coding): On encoding by raw-text, never use translation tables.
9165         * fileio.c (e_write): Short cut for the case of no encoding.
9167 2008-02-01  Kenichi Handa  <handa@m17n.org>
9169         * coding.c (detect_coding, detect_coding_system): Delete unused
9170         variables.
9172 2008-02-01  Kenichi Handa  <handa@m17n.org>
9174         * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
9175         (consume_chars): Fix handling of 8-bit bytes in unibyte source.
9177 2008-02-01  Kenichi Handa  <handa@m17n.org>
9179         * coding.c (Ffind_coding_systems_region_internal): Include
9180         raw-text and no-conversion in the result.
9182 2008-02-01  Kenichi Handa  <handa@m17n.org>
9184         * fontset.c (find_font_encoding): Return `ascii' for unknown encoding.
9185         (load_font_get_repertory): Delete unnecessary check of ENCODING of
9186         FONT_DEF.
9187         (font_def_arg, add_arg, from_arg, to_arg): New args.
9188         (set_fontset_font): Change argument.
9189         (Fset_fontset_font): Fix for the case that TARGET is a script
9190         name and charset name.
9191         (new_fontset_from_font_name): Fix argument to Fnew_fontset.
9193 2008-02-01  Kenichi Handa  <handa@m17n.org>
9195         * fontset.c (fontset_font): Rename from fontset_face.  Change return
9196         value.
9197         (face_suitable_for_char_p, face_for_char): Adjust for the change
9198         of fontset_font.
9199         (make_fontset_for_ascii_face): Fix setting of the fontset element
9200         for ASCII.
9201         (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
9202         to get a font name.
9203         (Ffontset_info): Adjust for the change of fontset_font.
9205         * coding.c (emacs_mule_char): Check invalid code more rigidly.
9207         * character.h (LEADING_CODE_LATIN_1_MIN)
9208         (LEADING_CODE_LATIN_1_MAX): Delete these macros.
9210 2008-02-01  Kenichi Handa  <handa@m17n.org>
9212         * editfns.c (check_translation): New function.
9213         (Ftranslate_region_internal): Handle M:N mapping.
9215 2008-02-01  Kenichi Handa  <handa@m17n.org>
9217         * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
9219 2008-02-01  Kenichi Handa  <handa@m17n.org>
9221         * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
9222         goto invalid_code.
9223         (decode_coding_iso_2022): Fix handling of invalid designation.
9225         * fileio.c (Finsert_file_contents): Be sure to call unbind_to
9226         after calling code_conversion_save.
9228 2008-02-01  Kenichi Handa  <handa@m17n.org>
9230         * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
9232         * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
9234         * fontset.c: Include "intervals.h".
9235         (fontset_face): Fix comparing of Lisp_Objects.
9236         (free_face_fontset, new_fontset_from_font_name): Fix
9237         Lisp_Object/int mixup.
9239         * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
9241         * coding.c: Add many prototypes for static functions.
9242         (get_translation_table): Allow max_lookup to be NULL.
9243         (decode_coding, Ffind_coding_systems_region_internal)
9244         (Funencodable_char_position, Fcheck_coding_systems_region): Call
9245         get_translation_table with max_lookup NULL.
9247 2008-02-01  Kenichi Handa  <handa@m17n.org>
9249         * coding.c (get_translation_table): Declare it as Lisp_Object.
9250         (LOOKUP_TRANSLATION_TABLE): New macro.
9251         (produce_chars, consume_chars): Use LOOKUP_TRANSLATION_TABLE
9252         instead of CHAR_TABLE_REF.
9254 2008-02-01  Kenichi Handa  <handa@m17n.org>
9256         * coding.c (MAX_ANNOTATION_LENGTH): Adjust for the change of
9257         annotation data format.
9258         (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
9259         Change arguments FROM and TO to single argument NCHARS.  Change caller.
9260         (decode_coding_utf_8, decode_coding_utf_16, decode_coding_emacs_mule)
9261         (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
9262         (decode_coding_ccl, decode_coding_charset): Pay attention to
9263         coding->charbuf_used.
9264         (get_translation): New function.
9265         (produce_chars): New arguments translation_table and last_block.
9266         Translate characters here.  Return number of carryover chars.
9267         Change caller.
9268         (produce_composition): New argument pos.  Change caller.
9269         Adjust for the change of annotation data format.
9270         (produce_charset, produce_annotation): Likewise.
9271         (decode_coding, encode_coding): Don't call translate_chars.
9272         (consume_chars): New arg translation_table.  Change caller.
9273         (translate_chars): Delete.
9274         (syms_of_coding): Make translation-table's number of extra slots 2.
9276 2008-02-01  Kenichi Handa  <handa@m17n.org>
9278         * search.c (simple_search): Fix setting this_pos_byte in backward
9279         search.
9281         * coding.c (detect_coding_emacs_mule): Fix counting of encoded
9282         byte sequence.
9283         (detect_coding_ccl): Fix setting of the variable valids.
9285 2008-02-01  Kenichi Handa  <handa@m17n.org>
9287         * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
9289         * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
9291         * editfns.c (Ftranslate_region_internal): Rename from
9292         Ftranslate_region.  Accept a char-table in TABLE.
9293         (syms_of_editfns): Defsubr Stranslate_region_internal.
9295         * xfaces.c (set_lface_from_font_name): If a font is specified for
9296         a frame, generate a fontset from the font.
9297         (build_scalable_font_name): If the scalable font is requested for
9298         a specific size, don't change that size.
9299         (try_font_list): Try a scalable font also in the case that a
9300         pattern string is specified.
9302 2008-02-01  Kenichi Handa  <handa@m17n.org>
9304         * xfaces.c (Fface_font): New optional arg CHARACTER.
9306 2008-02-01  Kenichi Handa  <handa@m17n.org>
9308         * charset.h (CHARSET_OFFSET): New macro.
9310 2008-02-01  Kenichi Handa  <handa@m17n.org>
9312         * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
9314         * fontset.c (fontset_face): Handle the case that repertory is a
9315         char-table.
9316         (find_font_encoding): Return nil for unknown encoding.
9317         (Fset_fontset_font): Ignore a font of unknown encoding.
9319 2008-02-01  Kenichi Handa  <handa@m17n.org>
9321         * keymap.c (describe_vector): Handle default value of a char table.
9323         * fontset.c (fontset_face): Handle fallback fonts correctly.
9324         (Ffontset_info): Return infomation about fallback fonts.
9326 2008-02-01  Kenichi Handa  <handa@m17n.org>
9328         * fontset.c (FONTSET_DEFAULT): New macro.
9329         (FONTSET_ADD, fontset_add): Handle the case that range is nil.
9330         (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
9331         the case that it is nil.
9332         (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
9333         (syms_of_fontset): Set char-table-extra-slots property of fontset to 9.
9335         * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
9336         subset or superset.
9338 2008-02-01  Kenichi Handa  <handa@m17n.org>
9340         * emacs.c (main): Call init_charset after syms_of_XXX.
9342         * charset.c (Vcharset_map_directory): Delete.
9343         (Vcharset_map_path): New variable.
9344         (load_charset_map_from_file): Use Vcharset_map_path instead.
9345         (init_charset): Initialize Vcharset_map_path.
9346         (syms_of_charset): Delete declaration of "charset-map-directory",
9347         add declaration of "charset-map-path".
9349 2008-02-01  Kenichi Handa  <handa@m17n.org>
9351         * fns.c (string_char_to_byte, string_byte_to_char): Optimize for
9352         ASCII only string.
9354         * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
9356         * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
9357         (detect_coding, detect_coding_system): Treat '\0' as normal ASCII byte.
9359 2008-02-01  Kenichi Handa  <handa@m17n.org>
9361         * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
9363         * coding.c (QCmnemonic, QCdefalut_char)
9364         (QCdecode_translation_table, QCencode_translation_table)
9365         (QCpost_read_conversion, QCpre_write_conversion): New variables.
9366         (get_translation_table): Return a list of translation tables if
9367         necessary.
9368         (decode_coding): Call get_translation_table with ENCODEP 0.
9369         (char_encodable_p): If translation_table is non-nil, always call
9370         translate_char.
9371         (Fdefine_coding_system_internal): Accept list of translation
9372         tables as :encode-translation-table and :decode-translation-table.
9373         (Fcoding_system_put): New function.
9374         (syms_of_coding): Declare new symbols.  Defsubr
9375         Scoding_system_put.
9376         (decode_coding_sjis, encode_coding_sjis): Handle 4th charset,
9377         typically JISX0212.
9379         * charset.c (map_charset_chars): Fix arg to map_charset_chars in
9380         when the charset is superset type.
9382         * character.c (translate_char): Accept list of translation tables.
9384 2008-02-01  Kenichi Handa  <handa@m17n.org>
9386         * coding.h (enum coding_attr_index): New member coding_attr_trans_tbl.
9387         (CODING_ATTR_TRANS_TBL): New macro.
9389         * coding.c (get_translation_table): New function.
9390         (translate_chars): Fix the bug of skipping annotation data.
9391         (decode_coding, encode_coding): Utilize get_translation_table.
9392         (char_encodable_p, Funencodable_char_position): Translate char if
9393         necessary.
9394         (Ffind_coding_systems_region_internal)
9395         (Fcheck_coding_systems_region): Setup translation table for encode
9396         in a coding system attribute vector in advance.
9397         (Fdefine_coding_system_internal): Allow a symbol as translation
9398         table.  For shift-jis type coding system, allow 4th charset.
9400 2008-02-01  Kenichi Handa  <handa@m17n.org>
9402         * coding.c (decode_coding_sjis): Check the first byte rigidly.
9404         * xdisp.c (get_next_display_element): Pass -1 as POS to
9405         FACE_FOR_CHAR if displaying a C-string.
9407 2008-02-01  Kenichi Handa  <handa@m17n.org>
9409         * composite.c (get_composition_id): Handle xoff and yoff in a
9410         composition rule.
9412         * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
9413         (struct composition): New member lbearing and rbearing.
9415         * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
9416         (x_get_glyph_overhangs): Handle a composition glyph.
9417         (x_produce_glyphs): Setup lbearing and rbreaing for a composition glyph.
9419         * xterm.c (x_compute_glyph_string_overhangs): Handle also a
9420         composition glyph.
9422 2008-02-01  Kenichi Handa  <handa@m17n.org>
9424         * print.c: Include charset.h.
9425         (Vprint_charset_text_property): New variable.
9426         (Qdefault): Extern it.
9427         (PRINT_STRING_NON_CHARSET_FOUND)
9428         (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
9429         (print_check_string_result): New variable.
9430         (print_check_string_charset_prop): New function.
9431         (print_prune_charset_plist): New variable.
9432         (print_prune_string_charset): New function.
9433         (print_object): Call print_prune_string_charset if
9434         Vprint_charset_text_property is not t.
9435         (print_interval): Print nothing if interval->plist is nil.
9436         (syms_of_print): Declare Vprint_charset_text_property as a lisp
9437         variable.  Init and staticpro print_prune_charset_plist.
9439 2008-02-01  Kenichi Handa  <handa@m17n.org>
9441         * fontset.c (new_fontset_from_font_name): Use the specified font
9442         for all characters in the new fontset.
9444         * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
9445         OBJECT args.
9447         * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
9448         OBJECT args for composition too.
9450         * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
9451         OBJECT args.
9453 2008-02-01  Kenichi Handa  <handa@m17n.org>
9455         * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
9457         * fontset.c (reorder_font_vector): Adjust for the change of
9458         FONT_DEF format.
9459         (fontset_face): New arg id.  Change caller.
9460         (face_for_char): New args pos and object.
9461         (make_fontset_for_ascii_face): Adjust for the change of FONT_DEF format.
9462         (fs_query_fontset): Check NAME by Fassoc too.
9463         (Fset_fontset_font): Allow non-XLFD font name.
9464         (Ffontset_info): Adjust for the change of FONT_DEF format.
9466         * fontset.h (face_for_char): Adjust prototype.
9468         * xdisp.c (face_before_or_after_it_pos, get_next_display_element)
9469         (append_space, extend_face_to_end_of_line)
9470         (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
9471         (x_produce_glyphs): Call FACE_FOR_CHAR with POS and OBJECT args.
9473         * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
9474         POS and OBJECT args.
9476         * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
9477         POS and OBJECT args.
9479 2008-02-01  Jason Rumney  <jasonr@gnu.org>
9481         * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
9482         of GlobalAlloc'ed memory.
9484 2008-02-01  Kenichi Handa  <handa@m17n.org>
9486         * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
9488         * charset.h (charset_table_used): Delete extern.
9490         * charset.c (charset_table_used): Make it static.
9491         (map_charset_chars): Fix args to c_function with.
9493         * chartab.c (map_sub_char_table_for_charset): Fix args to
9494         c_function with.
9496         * coding.h (enum coding_result_code): Delete
9497         CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
9499         * coding.c (Qinsufficient_source, Qinconsistent_eol)
9500         (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New variables.
9501         (Vlast_code_conversion_error): New variables.
9502         (syms_of_coding): DEFSYM or DEFVAR_LISP them.
9503         (ONE_MORE_BYTE): Record error if any instead of signaling an
9504         error.  If non-ASCII multibyte char is found, return the negative
9505         value of the code.  All callers changed to check it.
9506         (ONE_MORE_BYTE_NO_CHECK): Likewise.
9507         (record_conversion_result): New function.  Change all codes setting
9508         coding->result to call this function.
9509         (detect_coding_utf_8, decode_coding_utf_8)
9510         (detect_coding_emacs_mule, detect_coding_sji, detect_coding_big5):
9511         Don't use the local variable incomplete.
9512         (emacs_mule_char): Change the second arg to `const'.
9513         (decode_coding): Fix of flushing out unprocessed data.
9514         (make_conversion_work_buffer): Fix making of a work buffer.
9515         (decode_coding_object): Return coding->dst_object.
9517         * fontset.c (set_fontset_font): Fix args.
9519         * lisp.h (CHARACTERBITS): Define as 22.
9521         * process.c (send_process): Be sure to set coding->src_multibyte.
9523         * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
9525 2008-02-01  Kenichi Handa  <handa@m17n.org>
9527         * xdisp.c (handle_auto_composed_prop): Give limit to
9528         Fnext_single_char_property_change.
9530 2008-02-01  Kenichi Handa  <handa@m17n.org>
9532         * composite.c (syms_of_composite): Don't make the composition hash
9533         table weak.
9535         * fontset.c (Fset_fontset_font): Fix docstring.
9537         * lisp.h (detect_coding_system): Adjust prototype.
9539         * fileio.c (kill_workbuf_unwind): Delete this function.
9540         (Finsert_file_contents): Adjust the call of detect_coding_system.
9541         Get conversion_buffer by code_conversion_save.  Use the macro
9542         CODING_MAY_REQUIRE_DECODING.  After decoding, update
9543         coding_system.
9545         * coding.h (make_conversion_work_buffer): Delete extern.
9546         (code_conversion_save): Extern it.
9548         * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
9549         (CODING_GET_INFO): Delete argument eol_type.  Change callers.
9550         (decode_coding_utf_8): Don't do eol converion.
9551         (detect_coding_utf_16): Check coding->src_chars, not
9552         coding->src_bytes.  Add heuristics for those that have no signature.
9553         (decode_coding_emacs_mule, decode_coding_iso_2022)
9554         (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
9555         Don't do eol converion.
9556         (adjust_coding_eol_type): Return a new coding system.
9557         (detect_coding): Don't detect eol.  Fix for utf-16 detection.
9558         (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
9559         each change.
9560         (decode_coding): Pay attention to undo_list.  Do eol conversion for
9561         all types of coding-systems (if necessary).
9562         (Vcode_conversion_work_buf_list): Delete it.
9563         (Vcode_conversion_reused_workbuf): Rename from
9564         Vcode_conversion_reused_work_buf.
9565         (Vcode_conversion_workbuf_name): New variable.
9566         (reused_workbuf_in_use): New variable.
9567         (make_conversion_work_buffer): Delete the arg DEPTH.
9568         (code_conversion_restore): Change argument to cons.
9569         (code_conversion_save): Delete the argument BUFFER.  Change callers.
9570         (detect_coding_system): New argument src_chars.  Change callers.
9571         Fix for utf-16 detection.
9572         (init_coding_once): Don't use ISO_carriage_return.
9573         (syms_of_coding): Initialize Vcode_conversion_workbuf_name and
9574         reused_workbuf_in_use.
9576 2008-02-01  Kenichi Handa  <handa@m17n.org>
9578         * keymap.c (store_in_keymap): Pay attention to the case that idx
9579         is a cons specifying a character range.
9581 2008-02-01  Kenichi Handa  <handa@m17n.org>
9583         * xdisp.c (handle_auto_composed_prop): Fix the case of returning
9584         HANDLED_RECOMPUTE_PROPS.
9586         * coding.c (Fdefine_coding_system_internal): Fix checking of
9587         ascii compatibility.
9589 2008-02-01  Kenichi Handa  <handa@m17n.org>
9591         * charset.c (find_charsets_in_text): Delete unused locale variable.
9592         (Fset_charset_priority): Update Vemacs_mule_charset_list too.
9594         * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
9595         Resync charset_list to Vemacs_mule_charset_list.
9597         * keymap.c (store_in_keymap): Pay attention to the case that idx
9598         is a cons specifying a character range.
9600 2008-02-01  Kenichi Handa  <handa@m17n.org>
9602         * composite.c (update_compositions): Bind inhibit-read-only, etc
9603         to t before calling remove-list-of-text-properties.
9605         * print.c (print_object): Always print ASCII chars as is.
9607 2008-02-01  Kenichi Handa  <handa@m17n.org>
9609         * keymap.c (Fdefine_key): Fix handling of Lucid style event type list.
9611         * fns.c (Fmapconcat, Fmapcar, Fmapc): Signal an error if SEQUENCE
9612         is a char table.
9614 2008-02-01  Kenichi Handa  <handa@m17n.org>
9616         * syntax.c (skip_chars): Be sure to alloca char_ranges when necessary.
9618 2008-02-01  Kenichi Handa  <handa@m17n.org>
9620         * xfaces.c (set_lface_from_font_name): Fix for the case that
9621         FONTNAME is not fontset name.
9623 2008-02-01  Kenichi Handa  <handa@m17n.org>
9625         * fns.c (base64_encode_1): Fix previous change.
9627 2008-02-01  Kenichi Handa  <handa@m17n.org>
9629         * fontset.c (set_fontset_font): New function.
9630         (Fset_fontset_font): If a font is specified for a charset, use
9631         map_charset_chars to store the font spec in a fontset.
9633 2008-02-01  Kenichi Handa  <handa@m17n.org>
9635         * fontset.c (fontset_face): Create a fallback fontset on demand.
9636         (make_fontset): Don't create a fallback fontset here.
9637         (free_face_fontset): Free a fallback fontset (if any) too.
9638         (n_auto_fontsets): Delete this variable.
9639         (auto_fontset_alist): New variable.
9640         (new_fontset_from_font_name): Check auto_fontset_alist.
9641         (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
9642         (Ffontset_list_all) [FONTSET_DEBUG]: New function.
9643         (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
9644         Defsubr Sfontset_list_all.
9646 2008-02-01  Kenichi Handa  <handa@m17n.org>
9648         * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
9650 2008-02-01  Kenichi Handa  <handa@m17n.org>
9652         * fontset.c (Fnew_fontset): Check NAME more rigidly.
9654 2008-02-01  Kenichi Handa  <handa@m17n.org>
9656         * editfns.c (Fgoto_char): Fix docstring.
9658 2008-02-01  Kenichi Handa  <handa@m17n.org>
9660         * insdel.c (insert_from_gap): Adjust intervals correctly.
9662 2008-02-01  Jason Rumney  <jasonr@gnu.org>
9664         * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
9665         (pfnGetFontUnicodeRanges): New dynamically loaded function.
9666         (w32_initialize): Try to load it.
9667         (x_get_font_repertory): Use it if available.
9668         (w32_encode_char): Add shortcut for unicode output.
9670         * w32fns.c (w32_load_system_font): Default charset to -1.
9671         (x_to_w32_charset): Match all fonts for unicode.
9672         (w32_to_x_charset): New parameter matching.  Don't return partial
9673         or wildcard charsets.
9674         (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
9675         (w32_codepage_for_font): Return CP_UNICODE for unicode.
9676         (w32_to_x_font): Match charset to real charset.
9677         (enum_font_cb2): Always list unicode versions.
9679         * makefile.w32-in (temacs): Increase EMHEAP.
9681 2008-02-01  Jason Rumney  <jasonr@gnu.org>
9683         * w32term.c (w32_encode_char): New charset parameter.
9684         font_info.encoding becomes encoding_type.
9685         (x_get_font_repertory): New function.  Warning: stub only!
9686         (x_new_font): Return quickly if font already set.
9687         (x_new_fontset): fontsetname parameter is Lisp_Object.
9688         Use new fs_query_fontset.  Try new_fontset_from_font_name.
9689         Use fontset_name for return value.
9691         * w32term.h: Declare x_get_font_repertory.
9693         * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
9694         place of find_charset_in_text.  Use encode_coding_object in place
9695         of encode_coding.
9696         (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
9697         decode_coding.
9699         * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
9700         of x_new_fontset.
9701         (w32_load_system_font): Initialize charset as unicode.
9702         font_info.encoding becomes encoding_type.
9703         (w32_to_x_font): Use decode_coding_c_string in place of decode_coding.
9704         (x_to_w32_font): Use encode_coding_object in place of encode_coding.
9705         (syms_of_w32fns): Set get_font_repertory_func.
9707         * w32console.c: Include character.h.  Use terminal_encode_buffer
9708         from term.c.
9709         (write_glyphs): Use new version of encode_terminal_code.  Use
9710         encode_coding_object in place of encode_coding.
9712         * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
9713         encoding becomes encoding_type.
9715         * term.c (terminal_encode_buffer): Make externally visible.
9717         * makefile.w32-in: Add character.h dependancies.
9718         (character.o, chartab.o): New targets.
9720 2008-02-01  Kenichi Handa  <handa@m17n.org>
9722         * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
9723         CODING_ID_EOL_TYPE.
9725 2008-02-01  Andreas Schwab  <schwab@suse.de>
9727         * coding.c (produce_chars): Revert last change.
9729 2008-02-01  Kenichi Handa  <handa@m17n.org>
9731         * charset.h (charset_unicode): Extern it.
9733         * charset.c (string_xstring_p): Check by (C >= 0x100).
9734         (find_charsets_in_text): Change format of the arc CHARSETS.  New
9735         arg MULTIBYTE.
9736         (Ffind_charset_region, Ffind_charset_string): Adjust for the
9737         change of find_charsets_in_text.
9738         (Fsplit_char): Fix doc.  Never return unknown.
9740         * chartab.c (char_table_translate): Use CHARACTERP, not INTEGERP.
9742         * coding.c (Fdefine_coding_system_alias): Update
9743         Vcoding_system_list.
9745         * fontset.c (load_font_get_repertory): Pay attention to the case
9746         that ENCODING of a font is specified by a char-table.
9748         * xterm.c (x_get_font_repertory): Handle the case that the
9749         encoding of font is other than Unicode.
9751 2008-02-01  Kenichi Handa  <handa@m17n.org>
9753         * term.c (encode_terminal_code): Don't handle glyph-table.  Check
9754         if a character is encodable by the terminal coding system.  If
9755         not, produces proper number of `?'s.  Update
9756         terminal_encode_buffer and terminal_encode_buf_size if necessary.
9757         (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
9759 2008-02-01  Kenichi Handa  <handa@m17n.org>
9761         * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
9762         variables.
9763         (encode_terminal_code): Change argument.  Encode multiple
9764         characters at once.  Store the result of encoding in
9765         terminal_encode_buffer.
9766         (write_glyphs, insert_glyphs): Adjust for the change of
9767         encode_terminal_code.
9768         (term_init): Initialize terminal_encode_buffer and
9769         terminal_encode_buf_size.
9771         * coding.c (consume_chars): If coding->src_object is nil, don't
9772         check annotation.
9774 2008-02-01  Kenichi Handa  <handa@m17n.org>
9776         * character.c (char_string): Use ASCII_CHAR_P instead of
9777         SINGLE_BYTE_CHAR_P.
9779 2008-02-01  Kenichi Handa  <handa@m17n.org>
9781         * xdisp.c (handle_auto_composed_prop): Check if the last
9782         characters of auto-composed region is newly composed with the
9783         following characters.
9784         (handle_composition_prop): Fix checking of point being inside
9785         composition.
9787 2008-02-01  Kenichi Handa  <handa@m17n.org>
9789         * fns.c (concat): Don't change multibyteness of the result by
9790         concatenating an 8-bit character.
9792         * data.c (Faset): Check newelt by CHECK_CHARACTER.  Don't change
9793         multibyteness of the result when newelt is an 8-bit character.
9795 2008-02-01  Dave Love  <fx@gnu.org>
9797         * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
9798         EMACS_INT.
9800         * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
9802         * xfaces.c (face_numeric_value): Declare dim size_t.
9803         (Finternal_lisp_face_equal_p): Remove unused f.
9805         * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
9806         (MATRIX_ROW): Remove unused vars.
9807         (draw_glyphs, x_insert_glyphs, fast_find_position)
9808         (fast_find_position, fast_find_string_pos): Use EMACS_INT for
9809         byte/char counts.
9811         * regex.c (regex_compile): Remove unused var.
9813         * minibuf.c (Fminibuffer_complete_word): Remove unused var.
9815         * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
9816         (Faccessible_keymaps, where_is_internal): Remove unused vars.
9818         * keyboard.c (cancel_hourglass_unwind): Return Qnil.
9820         * frame.c (frame_name_fnn_p): Make len EMACS_INT.
9822         * fileio.c (Fwrite_region): Remove unused var.
9824         * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
9825         (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
9827         * composite.c (Fremove_list_of_text_properties): Declare.
9829         * coding.c (inhibit_pre_post_conversion): Remove (unused).
9830         (alloc_destination, produce_chars): Use EMACS_INT for byte/char counts.
9831         (coding_inherit_eol_type): Remove unused attrs.
9832         (detect_coding): Cast arg of detect_eol.
9834         * charset.c (syms_of_charset): Remove unused var p.
9835         (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
9836         byte/char counts.
9838         * casetab.c (set_case_table): Remove unused var.
9840         * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
9841         unused vars.
9843 2008-02-01  Dave Love  <fx@gnu.org>
9845         * xterm.c (x_bitmap_mask): Declare.
9847 2008-02-01  Dave Love  <fx@gnu.org>
9849         * xterm.c (x_term_init): Fix type error.
9851         * lisp.h: Add Funibyte_char_to_multibyte.
9853         * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
9854         (Fset_coding_system_priority): Doc fix.
9856         * ccl.c (ccl_driver): Fix arg of CHARACTERP.
9858         * indent.c (check_composition): Make start and end EMACS_INT.
9860         * character.c (lisp_string_width): Make ignore and end EMACS_INT.
9862         * xdisp.c (handle_composition_prop, check_point_in_composition):
9863         Make buffer positions EMACS_INT.
9865         * composite.c (find_composition, run_composition_function)
9866         (update_compositions, Ffind_composition_internal): Make buffer
9867         positions EMACS_INT.
9869         * composite.h (find_composition, update_compositions): Make
9870         position args EMACS_INT.
9872         * keyboard.c (adjust_point_for_property): Make beg and end EMACS_INT.
9874         * intervals.c (get_property_and_range):
9875         * intervals.h (get_property_and_range): Make start and end EMACS_INT.
9877         * unexalpha.c: Don't include varargs.h.
9879 2008-02-01  Dave Love  <fx@gnu.org>
9881         * coding.h (ENCODE_UTF_8): New.
9883         * Makefile.in (gtkutil.o): Depend on coding.h.
9885         * coding.c (Fset_coding_system_priority): Doc fix.
9887 2008-02-01  Kenichi Handa  <handa@m17n.org>
9889         * fileio.c (Finsert_file_contents): Call setup_coding_system in
9890         the case of auto saving.
9892 2008-02-01  Andreas Schwab  <schwab@suse.de>
9894         * chartab.c (map_char_table, map_char_table_for_charset): Protect
9895         `range' from GC.
9897 2008-02-01  Kenichi Handa  <handa@m17n.org>
9899         * coding.c (decode_coding_sjis): Check bytes more rigidly.
9901 2008-02-01  Kenichi Handa  <handa@m17n.org>
9903         * fileio.c (choose_write_coding_system): Return a decided coding system.
9904         (Fwrite_region): Set Vlast_coding_system_used to the return value
9905         of choose_write_coding_system.
9907 2008-02-01  Kenichi Handa  <handa@m17n.org>
9909         * charset.c (Fset_charset_priority): Pay attention to duplicated
9910         arguments.
9912         * coding.c (QCcategory): New variable.
9913         (syms_of_coding): Defsym it.  Set all elements of
9914         Vcoding_category_table and their symbol values.
9915         (Fset_coding_system_priority): Doc fix.  Update symbol qvalues of
9916         coding-category-XXX, and coding-category-list.
9917         (Fdefine_coding_system_internal): Add category in the plist.
9919 2008-02-01  Kenichi Handa  <handa@m17n.org>
9921         * callproc.c (Fcall_process): Handle carryover correctly.
9923         * coding.c (decode_coding_iso_2022): Fix handling of invalid bytes.
9924         (raw_text_coding_system): Check NILP (coding_system).
9925         (coding_inherit_eol_type): Check NILP (coding_system) and
9926         NILP (parent).
9927         (consume_chars): Fix for the case of raw-text.
9929         * process.c (read_process_output): Handle carryover correctly.
9931 2008-02-01  Dave Love  <fx@gnu.org>
9933         * regex.c (re_search_2): Fix last change.
9935 2008-02-01  Kenichi Handa  <handa@m17n.org>
9937         * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
9938         target_multibyte.  Even in a unibyte case, return a converted
9939         multibyte char.
9940         (GET_CHAR_AFTER): New macro.
9941         (PATFETCH): Translate via multibyte char.
9942         (HANDLE_UNIBYTE_RANGE): Delete this macro.
9943         (SETUP_MULTIBYTE_RANGE): New macro.
9944         (regex_compile): Setup compiled code so that its multibyteness
9945         matches that of a target.  Fix the handling of "[X-YZ]" using
9946         SETUP_MULTIBYTE_RANGE.
9947         (analyse_first) <charset>: For filling fastmap for all multibyte
9948         characters, don't check by BASE_LEADING_CODE_P.
9949         (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp).  It is
9950         the same as RE_MULTIBYTE_P (bufp) now.
9951         (mutually_exclusive_p): Check by (! multibyte || IS_REAL_ASCII (c)).
9952         (TARGET_CHAR_AND_LENGTH): Delete this macro.
9953         (TRANSLATE_VIA_MULTIBYTE): New macro.
9954         (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
9955         It is the same as RE_MULTIBYTE_P (bufp) now.
9956         <exactn>: Translate via multibyte.
9957         <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH.  Don't
9958         translate it.
9959         <charset, charset_not>: Fetch a character by
9960         RE_STRING_CHAR_AND_LENGTH.  Translate via multibyte.
9961         <duplicate>: Call bcmp_translate with the last arg `multibyte'.
9962         <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
9963         notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
9964         by GET_CHAR_AFTER.
9965         (bcmp_translate): Likewise.
9967         * search.c (compile_pattern): Check the member target_multibyte,
9968         not the member multibyte of buf.
9970         * lread.c (read1): While reading a string, set force_singlebyte
9971         and force_multibyte correctly.
9973         * charset.c (Fset_unibyte_charset, init_charset_once): Fix setting
9974         up of unibyte_to_multibyte_table.
9976 2008-02-01  Kenichi Handa  <handa@m17n.org>
9978         * coding.c (setup_coding_system): If coding has
9979         post-read-conversion or pre-write-conversion, set
9980         CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
9981         respectively.
9982         (decode_coding_gap): Run post-read-conversion if any.
9984         * fileio.c (Finsert_file_contents): Even if we read into a
9985         unibyte buffer, check if we must decode the result or not.
9987 2008-02-01  Kenichi Handa  <handa@m17n.org>
9989         * coding.c (make_conversion_work_buffer): Change the work buffer
9990         name to the same one as that of Emacs 21.
9992 2008-02-01  Kenichi Handa  <handa@m17n.org>
9994         * coding.h (make_conversion_work_buffer): Adjust prototype.
9995         (code_conversion_restore): Don't extern it.
9997         * coding.c (detected_mask): Delete unused variable.
9998         (decode_coding_iso_2022): Pay attention to the byte sequence of
9999         CTEXT extended segment, and retain those bytes as is.
10000         (decode_coding_ccl): Delete unused variable `valids'.
10001         (setup_coding_system): Delete unused variable `category'.
10002         (consume_chars): Delete unused variable `category'.  Make it work
10003         for non-multibyte case.
10004         (make_conversion_work_buffer): Change argument.
10005         (saved_coding): Delete unused variable.
10006         (code_conversion_restore): Don't check saved_coding->destination.
10007         (code_conversion_save): New function.
10008         (decode_coding_gap, encode_coding_gap): Call code_conversion_save
10009         instead of record_unwind_protect.
10010         (decode_coding_object, encode_coding_object): Likewise.  Recover PT.
10011         (detect_coding_system): Delete unused variable `mask'.
10012         (Fdefine_coding_system_internal): Delete unused variable id.
10014         * fileio.c (kill_workbuf_unwind): New function.
10015         (Finsert_file_contents): On replacing, call
10016         make_conversion_work_buffer with correct args, and call
10017         record_unwind_protect with the first arg kill_workbuf_unwind.
10019         * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
10021 2008-02-01  Kenichi Handa  <handa@m17n.org>
10023         * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not FONTSET_NAME.
10024         (fontset_add): Fix for the case that TO is less than TO1.
10025         (Ffontset_info): Don't use fallback fontset on checking the
10026         default fontset.
10027         (dump_fontset): New function for debugging.
10029         * coding.c (Fdefine_coding_system_internal): Fix for the case that
10030         coding_type is Qcharset.
10032 2008-02-01  Kenichi Handa  <handa@m17n.org>
10034         * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
10035         (map_char_table): Don't inherit the value from the parent on
10036         initializing VAL.  Adjust for the above change.
10038 2008-02-01  Kenichi Handa  <handa@m17n.org>
10040         * coding.c (Qsignature, Qendian): Delete these variables.
10041         (syms_of_coding): Don't initialize them.
10042         (CATEGORY_MASK_UTF_16_AUTO): New macro.
10043         (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
10044         detect_info->found.
10045         (decode_coding_utf_16): Don't detect BOM here.
10046         (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
10047         is NOT utf_16_without_bom.
10048         (setup_coding_system): For a coding system of type utf-16, check
10049         if the attribute :endian is Qbig or not (not nil or not), and set
10050         CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
10051         (detect_coding): If coding type is utf-16 and BOM detection is
10052         required, detect it.
10053         (Fdefine_coding_system_internal): For a coding system of type
10054         utf-16, check if the attribute :endian is Qbig or not (not nil or not).
10056 2008-02-01  Kenichi Handa  <handa@m17n.org>
10058         * coding.c (coding_set_source): Fix for the case that the current
10059         buffer is different from coding->src_object.
10060         (decode_coding_object): Don't use the conversion work buffer if
10061         DST_OBJECT is a buffer.
10063 2008-02-01  Dave Love  <fx@gnu.org>
10065         * lread.c (read_emacs_mule_char) [len==2]: Index
10066         emacs_mule_charset correctly.
10068 2008-02-01  Dave Love  <fx@gnu.org>
10070         * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
10071         (detect_coding_big5, decode_coding_big5, encode_coding_big5)
10072         (Fdecode_big5_char, Fencode_big5_char): Delete.  (Big5 no longer
10073         treated specially.)
10074         (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
10075         (detected_mask): Remove Big5 bits.
10077 2008-02-01  Kenichi Handa  <handa@m17n.org>
10079         The following changes are to make the font rescaling facility
10080         compatible with Emacs 21.
10082         * xfaces.c (Vface_font_rescale_alist): Rename from
10083         Vface_resizing_fonts.
10084         (struct font_name): Rename member resizing_ratio to rescale_ratio.
10085         (font_rescale_ratio): Rename from font_resizing_ratio.
10086         (split_font_name): Set font->rescale_ratio.
10087         (better_font_p): Pay attention to font->rescale_ratio.
10088         (build_scalable_font_name): Likewise.  Change RESX, and RESY
10089         fields.
10090         (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp variable.
10092 2008-02-01  Kenichi Handa  <handa@m17n.org>
10094         * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
10095         (Qutf_16_le): Remove these variables.
10096         (syms_of_coding): Don't DEFSYM them.
10097         (decode_coding_utf_16): Fix handling of BOM.
10098         (encode_coding_utf_16): Fix handling of BOM.
10100 2008-02-01  Kenichi Handa  <handa@m17n.org>
10102         * fileio.c (Finsert_file_contents): On replacing, before decoding
10103         the file into the work buffer, set point of the work buffer to the end.
10105 2008-02-01  Dave Love  <fx@gnu.org>
10107         * coding.c (Fcheck_coding_systems_region): Fix type errors.
10109 2008-02-01  Dave Love  <fx@gnu.org>
10111         * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
10112         and fix C types.
10114 2008-02-01  Kenichi Handa  <handa@m17n.org>
10116         * xdisp.c (SKIP_GLYPHS): New macro.
10117         (set_cursor_from_row): Pay attention to string display properties.
10119         * category.c (copy_category_entry): Fix for the case that RANGE
10120         is an integer.
10122         * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
10124         * w32term.c (w32_encode_char): Call ccl_driver with the last arg Qnil.
10126 2008-02-01  Kenichi Handa  <handa@m17n.org>
10128         * charset.c (Fcharset_id_internal): New function.
10129         (syms_of_charset): Defsubr it.
10131         * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
10132         with the last arg charset_list acquired from coding.
10133         (Fdefine_coding_system_internal): For ccl-based coding system, fix
10134         the attribute coding_attr_ccl_valids.
10136         * coding.h (enum define_coding_ccl_arg_index): Set the first
10137         member coding_arg_ccl_decoder to coding_arg_max.
10139         * ccl.h (ccl_driver): Adjust prototype.
10141         * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
10142         (ccl_driver): New arg CHARSET_LIST.  Use the above macros instead
10143         of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
10144         (Fccl_execute, Fccl_execute_on_string): Call ccl_driver with the
10145         last arg Qnil.
10147 2008-02-01  Kenichi Handa  <handa@m17n.org>
10149         * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
10150         call encode_char.
10152         * charset.c (encode_char): Fix handling of methods SUBSET and SUPERSET.
10154 2008-02-01  Dave Love  <fx@gnu.org>
10156         * composite.c (syms_of_composite): Make composition_hash_table weak.
10158 2008-02-01  Kenichi Handa  <handa@m17n.org>
10160         * dispextern.h (check_face_attributes, generate_ascii_font_name)
10161         (font_name_registry): Don't extern them.
10162         (split_font_name_into_vector, build_font_name_from_vector): Extern them.
10164         * fontset.h (Qfontset): Don't extern it.
10165         (new_fontset_from_font_name): Extern it.
10167         * fontset.c: Give 8 extra slots to fontset objects.
10168         (Qfontset_info): New variable.
10169         (syms_of_fontset): Defsym it.
10170         (FONTSET_FALLBACK): New macro.
10171         (fontset_face): Try also the default fontset.
10172         (make_fontset): Realize a fallback fontset from the default fontset.
10173         (generate_ascii_font_name): Move from xfaces.c.  Rewritten by
10174         using split_font_name_into_vector and build_font_name_from_vector.
10175         (Fset_fontset_font): Access the elements of font_spec by enum
10176         FONT_SPEC_INDEX.  If font_spec is a string, extract the registry
10177         name by using split_font_name_into_vector.
10178         (Fnew_fontset): If no ASCII font is specified in FONTLIST,
10179         generate a proper font name from the fontset name.  Update
10180         Vfontset_alias_alist.
10181         (n_auto_fontsets): New variable.
10182         (new_fontset_from_font_name): New function.
10183         (Ffont_info): Store the information about fonts generated from the
10184         default fontset in the first extra slot of the returned char-table.
10186         * xfaces.c (generate_ascii_font_name): Move to fontset.c.
10187         (font_name_registry): Delete function.
10188         (split_font_name_into_vector): New function.
10189         (build_font_name_from_vector): New function.
10190         (font_list): The argument REGISTRY is now a list of registry names.
10191         (choose_face_font): If we are choosing an ASCII font, and ATTRS
10192         specifies an explicit font name, return the name as is.  Make a
10193         list of registy names.
10195         * xfns.c (x_set_font, x_create_tip_frame): Adjust for the change
10196         of x_new_fontset.
10197         (Fx_create_frame): Don't call x_new_fontset here.  Just use
10198         x_list_fonts to check the existence of fonts.
10200         * xterm.h (x_new_fontset): Adjust prototype.
10202         * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
10203         string.  Use new_fontset_from_font_name to create a fontset from a
10204         font name.
10206 2008-02-01  Kenichi Handa  <handa@m17n.org>
10208         * syntax.c (Vfind_word_boundary_function_table): New name for
10209         Vnext_word_boundary_function_table.
10210         (find-word-boundary-function-table): New name for
10211         next-word-boundary-function-table.
10213 2008-02-01  Dave Love  <fx@gnu.org>
10215         * Makefile.in: Fix some dependencies.
10217         * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
10218         set it to nil before returning.
10220         * composite.c (update_compositions): Fix type error.
10222         * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
10224 2008-02-01  Kenichi Handa  <handa@m17n.org>
10226         * xterm.c (x_new_font): Optimize for the case that the font is
10227         already set for the frame.
10229 2008-02-01  Kenichi Handa  <handa@m17n.org>
10231         * chartab.c (char_table_ascii): Check if the char table contents
10232         is sub-char-table or not.
10233         (char_table_set, char_table_set_range): Fix argument to
10234         char_table_ascii.
10236         * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
10237         (detect_coding_utf_8, detect_coding_utf_16)
10238         (detect_coding_emacs_mule, detect_coding_iso_2022)
10239         (detect_coding_sjis, detect_coding_big5)
10240         (detect_coding_ccl, detect_coding_charset): Change argument MASK
10241         to DETECT_INFO.  Update DETECT_INFO and return 1 if the byte
10242         sequence is valid in this coding system.  Change callers.
10243         (MAX_ANNOTATION_LENGTH): New macro.
10244         (ADD_ANNOTATION_DATA): New macro.
10245         (ADD_COMPOSITION_DATA): Change argument.  Change callers.  Call
10246         ADD_ANNOTATION_DATA.  Change the format of annotation data.
10247         (ADD_CHARSET_DATA): New macro.
10248         (emacs_mule_char): New argument ID.  Change callers.
10249         (decode_coding_emacs_mule, decode_coding_iso_2022)
10250         (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
10251         Produce charset annotation data in coding->charbuf.
10252         (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
10253         to charset annotation data in coding->charbuf.
10254         (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
10255         coding->common_flags if the coding system is iso-2022 based and
10256         uses designation.
10257         (produce_composition): Adjust for the new annotation data format.
10258         (produce_charset): New function.
10259         (produce_annotation): Handle charset annotation.
10260         (handle_composition_annotation, handle_charset_annotation): New
10261         functions.
10262         (consume_chars): Handle charset annotation.  Utilize the above two
10263         functions.
10264         (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
10265         buffer, get the deleted text as a string and set
10266         coding->src_object to that string.
10267         (detect_coding, detect_coding_system): Use the new struct
10268         coding_detection_info.
10270         * coding.h (struct coding_detection_info): New structure.
10271         (struct coding_system): Adjust prototype of the member `detector'.
10272         (CODING_ANNOTATE_CHARSET_MASK): New macro.
10274 2008-02-01  Kenichi Handa  <handa@m17n.org>
10276         * insdel.c (insert_from_gap): Fix argument to offset_intervals.
10278 2008-02-01  Dave Love  <fx@gnu.org>
10280         * keymap.c (apropos_predicate, apropos_accumulate): Declare static.
10281         (Fapropos_internal): Don't gcpro apropos_accumulate.  Set result
10282         to new local and nullify apropos_accumulate before returning.
10283         (syms_of_keymap): Staticpro and initialize apropos_accumulate.
10285 2008-02-01  Kenichi Handa  <handa@m17n.org>
10287         * charset.c (Fdefine_charset_internal): Setup charset.fast_map
10288         correctly.
10290 2008-02-01  Dave Love  <fx@gnu.org>
10292         * fns.c (Flanginfo): Call synchronize_system_time_locale.
10294 2008-02-01  Kenichi Handa  <handa@m17n.org>
10296         The following changes are to make character composition happen
10297         automatically on displaying.
10299         * Makefile.in (lisp, shortlisp): Add composite.elc.
10301         * composite.h (Qauto_composed, Vauto_composition_function)
10302         (Qauto_composition_function): Extern them.
10304         * composite.c (Vcomposition_function_table)
10305         (Qcomposition_function_table): Delete variables.
10306         (Qauto_composed, Vauto_composition_function)
10307         (Qauto_composition_function): New variables.
10308         (run_composition_function): Don't call
10309         compose-chars-after-function.
10310         (update_compositions): Clear `auto-composed' text property.
10311         (compose_chars_in_text): Delete this function.
10312         (syms_of_composite): Staticpro Qauto_composed and
10313         Qauto_composition_function.  Declare Vauto_composition_function as
10314         a Lisp variable.
10316         * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
10318         * xdisp.c (it_props): Add an entry for Qauto_composed.
10319         (handle_auto_composed_prop): New function.
10321         * xselect.c (selection_data_to_lisp_data): Don't call
10322         compose_chars_in_text.
10324 2008-02-01  Dave Love  <fx@gnu.org>
10326         * keyboard.c (read_char): Modify checking around use of
10327         Vkeyboard_translate_table.
10329         * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
10330         and fix C types.
10332 2008-02-01  Kenichi Handa  <handa@m17n.org>
10334         * coding.c (decode_coding_utf_8, decode_coding_emacs_mule)
10335         (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
10336         (decode_coding_charset, produce_chars): When eol_type is Qdos, handle
10337         the case that the last byte is '\r' correctly.
10338         (decode_coding): Flush out the unprocessed data correctly.
10339         (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of coding->mode.
10341 2008-02-01  Dave Love  <fx@gnu.org>
10343         * xterm.c (XTread_socket): Fix changes for defined keysyms.
10344         Add XK_ISO... case.
10345         (xaw_scroll_callback): Revert last change.
10347 2008-02-01  Kenichi Handa  <handa@m17n.org>
10349         * charset.c (Fset_charset_priority): Update Viso_2022_charset_list.
10351 2008-02-01  Kenichi Handa  <handa@m17n.org>
10353         * xfaces.c (Vface_resizing_fonts): New variable.
10354         (struct font_name): New member `resizing_ratio'.
10355         (font_resizing_ratio): New function.
10356         (split_font_name): Set font->resizing_ratio.
10357         (better_font_p): Pay attention to font->resizing_ratio.
10358         (build_scalable_font_name): Likewise.  Don't change POINT_SIZE,
10359         RESX, and RESY fields.
10360         (try_alternative_families): Try scalable fonts if
10361         Vscalable_fonts_allowed is not Qt.
10362         (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
10364 2008-02-01  Dave Love  <fx@gnu.org>
10366         * xterm.c (xaw_scroll_callback): Cast correctly.
10368 2008-02-01  Dave Love  <fx@gnu.org>
10370         * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
10371         (lispy_kana_keys): Comment out.
10372         (make_lispy_event) [XK_kana_A]: Comment out.
10374         * xterm.c (xaw_scroll_callback): Cast call_data.
10375         (XTread_socket): Deal with ASCII keysyms.
10376         (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
10378 2008-02-01  Dave Love  <fx@gnu.org>
10380         * xterm.c (Vx_keysym_table): New.
10381         (syms_of_xterm): Initialize it.
10382         (XTread_socket): Use it.
10383         From head: Eliminate incorrect optimization that tried to avoid
10384         decoding the output of X*LookupString.
10385         (x_get_font_repertory): Delete charset declaration.
10387 2008-02-01  Kenichi Handa  <handa@m17n.org>
10389         * coding.c (detect_coding_charset): If only ASCII bytes are found,
10390         return 0.
10391         (Fdefine_coding_system_internal): Setup
10392         CODING_ATTR_ASCII_COMPAT (attrs) correctly.
10394 2008-02-01  Dave Love  <fx@gnu.org>
10396         * coding.c (Fcheck_coding_system): Doc fix.
10398         * editfns.c (Finsert_byte): Return a proper value.
10400 2008-02-01  Kenichi Handa  <handa@m17n.org>
10402         * coding.c (decode_coding): Fix args to translate_chars.  Pay
10403         attention to Vstandard_translation_table_for_decode.
10404         (encode_coding): Fix args to translate_chars.  Pay attention to
10405         Vstandard_translation_table_for_encode.
10407         * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
10408         SINGLE_BYTE_CHAR_P.
10410         * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
10411         not by SINGLE_BYTE_CHAR_P.
10413         * fns.c (concat): Check CH by ASCII_CHAR_P, not by
10414         SINGLE_BYTE_CHAR_P.
10416         * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
10417         SINGLE_BYTE_CHAR_P.
10419         * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
10420         by SINGLE_BYTE_CHAR_P.
10422         * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
10423         SINGLE_BYTE_CHAR_P.
10425 2008-02-01  Dave Love  <fx@gnu.org>
10427         * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
10429 2008-02-01  Dave Love  <fx@gnu.org>
10431         * fns.c (Flanginfo): Fix typo.
10433         * unexelf.c (unexec): Make last change conditional on Irix 6.5.
10435 2008-02-01  Kenichi Handa  <handa@m17n.org>
10437         * coding.c (detect_coding_utf_8, detect_coding_utf_16)
10438         (detect_coding_emacs_mule, detect_coding_iso_2022)
10439         (detect_coding_sjis, detect_coding_big5, detect_coding_ccl): Check
10440         incomplete byte sequence.  Don't update *mask when correctly detected.
10441         (decode_coding_sjis): Fix decoding of katakana-jisx0201.
10442         (detect_eol): Delete the argument CODING, and add the argument CATEGORY.
10443         (detect_coding, detect_coding_system): Adjust for the changes above.
10445 2008-02-01  Kenichi Handa  <handa@m17n.org>
10447         * character.c (char_string): Rename from
10448         char_string_with_unification.  Pay attention to CHAR_MODIFIER_MASK.
10449         (string_char): Rename from string_char.
10451         * character.h (CHAR_STRING, CHAR_STRING_ADVANCE): Call char_string
10452         if C is greater than MAX_3_BYTE_CHAR.
10453         (STRING_CHAR, STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE): Call
10454         string_char instead of string_char_with_unification.
10456 2008-02-01  Dave Love  <fx@gnu.org>
10458         * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
10460 2008-02-01  Kenichi Handa  <handa@m17n.org>
10462         * keymap.c (push_key_description): Pay attention to force_multibyte.
10464         * regex.c (re_search_2): Fix for the case of unibyte buffer.
10466 2008-02-01  Dave Love  <fx@gnu.org>
10468         * charset.c (define_charset_internal): Rename `supprementary'.
10470         * Makefile.in (lisp, shortlisp): Remove latin-N.
10472 2008-02-01  Dave Love  <fx@gnu.org>
10474         * xfns.c (x_window, x_window): Use use_xim.
10476         * xterm.c (use_xim): Initialize.
10477         (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
10478         (x_term_init): Maybe set use_xim.
10480         * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
10482 2008-02-01  Kenichi Handa  <handa@m17n.org>
10484         * search.c (search_buffer): Fix case-fold-search of multibyte
10485         characters.
10486         (boyer_moore): Rename the last argument to char_high_bits.
10488 2008-02-01  Kenichi Handa  <handa@m17n.org>
10490         * xdisp.c (display_string): Fix for the case of zero width glyph.
10492         * xfns.c (x_set_font): Change the error message of the case that
10493         x_new_fontset returns Qt.
10495         * xfaces.c (set_lface_from_font_name): Reject the default fontset.
10496         (Finternal_set_lisp_face_attribute): Use signal_error for the
10497         error of invalid fontset.
10499         * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
10500         fontset, return Qt.
10502 2008-02-01  Dave Love  <fx@gnu.org>
10504         * unexelf.c (unexec): Make .got handling not SGI-specific.
10506         * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
10508         * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
10510         * keyboard.c (read_key_sequence): Fix type error.
10512         * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
10513         type error.
10515         * fontset.c (fontset_add): Return Lisp_Object.
10517 2008-02-01  Dave Love  <fx@gnu.org>
10519         * charset.h (charset_ordered_list_tick): Declare extern.
10521 2008-02-01  Kenichi Handa  <handa@m17n.org>
10523         The following changes (and some of 2008-02-01 changes of mine) are
10524         for handling syntax, category, and case conversion for unibyte
10525         characters by converting them to multibyte on the fly.  With these
10526         changes, we don't have to setup syntax and case tables for unibyte
10527         characters in each language environment.
10529         * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
10530         multibyte if necessary.
10532         * bytecode.c (Fbyte_code): Likewise.
10534         * character.h (LEADING_CODE_LATIN_1_MIN)
10535         (LEADING_CODE_LATIN_1_MAX): New macros.
10536         (unibyte_to_multibyte_table): Extern it.
10537         (unibyte_char_to_multibyte): New macro.
10538         (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
10539         (CHAR_LEADING_CODE): New macro.
10540         (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
10542         * character.c (unibyte_to_multibyte_table): New variable.
10543         (unibyte_char_to_multibyte): Move to character.h and define as macro.
10544         (multibyte_char_to_unibyte): If C is an eight-bit character,
10545         convert it to the corresponding byte value.
10547         * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
10548         not 1, signals an error.  Update the elements of
10549         unibyte_to_multibyte_table.
10550         (init_charset_once): Initialize unibyte_to_multibyte_table.
10551         (syms_of_charset): Define the charset `iso-8859-1'.
10553         * cmds.c (internal_self_insert): In a multibyte buffer, insert C
10554         as is without converting it to unibyte.  In a unibyte buffer,
10555         convert C to multibyte before checking the syntax.
10557         * lisp.h (unibyte_char_to_multibyte): Delete extern.
10559         * minibuf.c (Fminibuffer_complete_word): Use the macro
10560         FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
10562         * regex.h (struct re_pattern_buffer): New member target_multibyte.
10564         * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
10565         (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte.  If
10566         that is zero, convert an eight-bit char to multibyte.
10567         (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
10568         non-emacs case.
10569         (PATFETCH): Convert an eight-bit char to multibyte.
10570         (HANDLE_UNIBYTE_RANGE): New macro.
10571         (regex_compile): Setup the compiled pattern for multibyte chars
10572         even if the given regex string is unibyte.  Use PATFETCH_RAW
10573         instead of PATFETCH in many places.  To handle `charset'
10574         specification of unibyte, call HANDLE_UNIBYTE_RANGE.  Use bitmap
10575         only for ASCII chars.
10576         (analyse_first) <exactn>: Simplify because the compiled pattern
10577         is multibyte.
10578         <charset_not>: Setup fastmap from bitmap only for ASCII chars.
10579         <charset>: Use CHAR_LEADING_CODE to get leading codes.
10580         <categoryspec>: If multibyte, setup fastmap only for ASCII chars here.
10581         (re_compile_fastmap) [emacs]: Call analyse_first with the arg
10582         multibyte always 1.
10583         (re_search_2): In emacs, set the locale variable multibyte to 1,
10584         otherwise to 0.  New local variable target_multibyte.  Check it
10585         to decide the multibyteness of STR1 and STR2.  If
10586         target_multibyte is zero, convert unibyte chars to multibyte
10587         before translating and checking fastmap.
10588         (TARGET_CHAR_AND_LENGTH): New macro.
10589         (re_match_2_internal): In emacs, set the locale variable multibyte
10590         to 1, otherwise to 0.  New local variable target_multibyte.  Check
10591         it to decide the multibyteness of STR1 and STR2.  Use
10592         TARGET_CHAR_AND_LENGTH to fetch a character from D.
10593         <charset, charset_not>: If multibyte is nonzero, check fastmap
10594         only for ASCII chars.  Call bcmp_translate with
10595         target_multibyte, not with multibyte.
10596         <begline>: Declare the local variable C as `unsigned'.
10597         (bcmp_translate): Change the last arg name to target_multibyte.
10599         * search.c (compile_pattern_1): Don't adjust the multibyteness of
10600         the regexp pattern and the matching target.  Set cp->buf.multibyte
10601         to the multibyteness of the regexp pattern.  Set
10602         cp->but.target_multibyte to the multibyteness of the matching target.
10603         (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
10604         FETCH_STRING_CHAR_ADVANCE.
10605         (Freplace_match): Convert unibyte chars to multibyte.
10607         * syntax.c (char_quoted, back_comment, scan_words)
10608         (Fforward_comment, scan_lists, Fbackward_prefix_chars)
10609         (scan_sexps_forward): Use FETCH_CHAR_AS_MULTIBYTE to convert
10610         unibyte chars to multibyte.
10611         (skip_chars): Delete the arg syntaxp, and move the code for
10612         handling syntaxes to skip_syntaxes.  Change callers.
10613         Fix the case that the multibyteness of STRING and the current
10614         buffer doesn't match.
10615         (skip_syntaxes): New function.
10616         (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
10617         SINGLE_BYTE_CHAR_P.
10619 2008-02-01  Kenichi Handa  <handa@m17n.org>
10621         * xfaces.c (QCfontset): New variable.
10622         (LFACE_FONTSET): New macro.
10623         (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
10624         (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
10625         (Finternal_set_lisp_face_attribute)
10626         (Finternal_get_lisp_face_attribute): Handle QCfontset.
10627         (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
10628         check also LFACE_FONTSET_INDEX.
10629         (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
10630         attrs[LFACE_FONT_INDEX].
10631         (syms_of_xfaces): Intern and staticpro QCfontset.
10633         * dispextern.h (enum lface_attribute_index): New member
10634         LFACE_FONTSET_INDEX.
10636         * fns.c (base64_encode_1): Handle eight-bit chars correctly.
10638 2008-02-01  Kenichi Handa  <handa@m17n.org>
10640         * coding.c (coding_set_destination): Fix coding->destination for
10641         the case converting a region.
10642         (encode_coding_utf_8): Encode eight-bit chars as single byte.
10643         (encode_coding_object): Fix coding->dst_pos and
10644         coding->dst_pos_byte for the case converting a region.
10646         * insdel.c (insert_from_gap): Make it work even if PT != GTP.
10648         * character.h (BYTE8_STRING): New macro.
10650         * fns.c (base64_decode_1): Insert eight-bit chars correctly.
10652 2008-02-01  Kenichi Handa  <handa@m17n.org>
10654         * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
10655         characters by octal form.
10657         * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
10659         * buffer.h (_fetch_multibyte_char_len): Delete extern.
10660         (FETCH_MULTIBYTE_CHAR, BUF_FETCH_MULTIBYTE_CHAR): Don't use
10661         _fetch_multibyte_char_len.
10662         (FETCH_CHAR_AS_MULTIBYTE): New macro.
10664         * casetab.c (set_canon, set_identity, shuffle): Simplify.
10666         * casefiddle.c (casify_object): Simplify.  Handle the case that
10667         the case conversion change the byte length.
10668         (casify_region): Likewise.
10670         * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New macros.
10672         * character.c (_fetch_multibyte_char_len): Delete this variable.
10673         (syms_of_character): Setup Vprintable_chars.
10675         * editfns.c (Fchar_equal): Fix for the unibyte case.
10676         (Finsert_byte): New function.
10677         (syms_of_editfns): Defsubr it.
10679         * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
10680         of direct code 0x3ffff.
10682         * search.c (Freplace_match): Fix for the unibyte case.
10684 2008-02-01  Kenichi Handa  <handa@m17n.org>
10686         * lread.c (safe_to_load_p): Fix the logic.
10688         * syntax.c (scan_words): Don't treat characters belonging to
10689         different scripts as constituting a word.
10691         * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
10693         * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not script.
10695         * emacs.c (main): In the case of --unibyte, instead of aborting on
10696         finding non-empty buffer, make it unibyte.
10698 2008-02-01  Kenichi Handa  <handa@m17n.org>
10700         * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
10701         to create a fontset.
10703 2008-02-01  Dave Love  <fx@gnu.org>
10705         * character.c (Funibyte_char_to_multibyte): Doc fix.
10707         * xfns.c [HAVE_STDLIB_H]: Fix last change.
10709 2008-02-01  Kenichi Handa  <handa@m17n.org>
10711         * fontset.c (fontset_add): Make the type `int'.
10712         (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
10714         * character.c (unibyte_char_to_multibyte)
10715         (multibyte_char_to_unibyte, Funibyte_char_to_multibyte): Refer to
10716         charset_unibyte, not charset_primary.
10718         * charset.h (charset_unibyte): Extern it instead of charset_primary.
10720         * charset.c (charset_unibyte): Rename from charset_primary.
10721         (Funibyte_charset): Rename from Fprimary_charset.
10722         (Fset_unibyte_charset): Rename from Fset_primary_charset.
10723         (syms_of_charset): Adjust for the above changes.
10725         * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
10726         SINGLE_BYTE_CHAR_P.  Fix the logic of handling non-ASCII char when
10727         it->multibyte_p is zero.
10729         * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
10730         Delete extern.
10732 2008-02-01  Kenichi Handa  <handa@m17n.org>
10734         * coding.c (Fdefine_coding_system_internal): Fix category setting
10735         for a coding system of type iso-2022.
10737 2008-02-01  Kenichi Handa  <handa@m17n.org>
10739         * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET -1.
10741 2008-02-01  Kenichi Handa  <handa@m17n.org>
10743         * syntax.c (Vnext_word_boundary_function_table): New variable.
10744         (next-word-boundary-function-table): Declare it as a Lisp variable
10745         in syms_of_syntax.
10746         (scan_words): Call functions in Vnext_word_boundary_function_table
10747         if any.
10749         * xterm.c (x_load_font): Initialize fontp->fontset to -1.
10751         * fontset.c (fs_load_font): If fontp->charset is not negative,
10752         return fontp without setting its members.
10754 2008-02-01  Dave Love  <fx@gnu.org>
10756         * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
10758         * m/sparc.h (HAVE_ALLOCA): Delete.
10760         * s/irix6-5.h: Don't include strings.h.
10761         (bcopy, bzero, bcmp): Don't undef.
10763         * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
10765         * s/usg5-4.h (NO_SIOCTL_H): Don't define.
10766         (TIOCSIGSEND): Don't test IRIX6.
10767         (bcopy, bzero, bcmp): Define conditionally.
10769 2008-02-01  Kenichi Handa  <handa@m17n.org>
10771         * buffer.c (Qas, Qmake, Qto): New variables.
10772         (Fset_buffer_multibyte): New optional arg METHOD.  Change caller.
10773         (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
10775         * callproc.c (Fcall_process): Don't call insert_1_both directly if
10776         we are inserting a process output into a multibyte buffer.
10778         * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
10779         multibyte_char_to_unibyte.
10781         * character.c (Funibyte_char_to_multibyte): If C can't be decoded
10782         by the primary charset, make it eight-bit char.
10783         (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
10785         * charset.c (charset_eight_bit, Qeight_bit_control): New variables.
10786         (charset_8_bit__control, charset_8_bit_graphic)
10787         (Qeight_bit_control, Qeight_bit_graphic): Delete these variables.
10788         (define_charset_internal): New function.
10789         (syms_of_charset): Call define_charset_internal for pre-defined
10790         charsets.
10792         * charset.h (charset_8_bit): Extern it.
10794         * coding.c (make_conversion_work_buffer): Adjust for the change
10795         of Fset_buffer_multibyte.
10796         (encode_coding_raw_text): Increment p0 in the loop.
10798         * lisp.h (Fset_buffer_multibyte): Adjust prototype.
10800         * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjust
10801         for the change of Fset_buffer_multibyte.
10803         * fns.c (Fstring_to_multibyte): New function.
10804         (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
10806 2008-02-01  Dave Love  <fx@gnu.org>
10808         * xfns.c (x_put_x_image): Declare args.
10810         * xfaces.c (font_name_registry, choose_face_font): Delete unused vars.
10811         (try_font_list): Declare an arg.
10813         * xdisp.c (message2_nolog, set_message): Declare an arg.
10815         * terminfo.c (tparam): Declare an arg.  Use P_ to declare tparm.
10817         * syntax.c (scan_sexps_forward): Declare an arg.
10819         * scroll.c (calculate_scrolling, calculate_direct_scrolling):
10820         Declare an arg.
10822         * lisp.h (Fnew_fontset): Declare.
10824         * keymap.c (push_key_description): Call CHARACTERP correctly.
10826         * fontset.c (fontset_add): Declare args.  Call make_number correctly.
10827         (face_for_char): Delete unused vars.
10828         (Fset_fontset_font): Doc fix.  Delete unused vars.
10830         * doc.c (Fsubstitute_command_keys): Delete unused vars.
10832         * composite.c (update_compositions): Declare arg.
10834         * cm.c (calccost, cmgoto): Declare args.
10836         * charset.c: Remove `emacs' conditional.  Doc fixes.
10837         (map_char_table_for_charset): Declare.
10839         * character.c (syms_of_character) <translation-table-vector>: Doc fix.
10841         * ccl.c: Remove `emacs' conditional.
10843 2008-02-01  Kenichi Handa  <handa@m17n.org>
10845         The following changes are to allow specifying multiple font
10846         patterns for a character range (specified by script or charset).
10848         * Makefile.in (abbrev.o): Depend on syntax.h.
10849         (xfaces.o): Depend on charset.h.
10851         * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
10852         SINGLE_BYTE_CHAR_P.
10854         * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
10856         * character.h (Vchar_script_table): Extern it.
10858         * character.c (Vscript_alist): Delete.
10859         (Vchar_script_table, Qchar_script_table): New variable.
10860         (syms_of_character): Declare Vchar_script_table as a lisp variable
10861         and initialize it.
10863         * chartab.c (Fmake_char_table): Doc fix.  If PURPOSE doesn't
10864         have property char-table-extra-slots, make no extra slot.
10866         * dispextern.h (struct face): Delete member `charset'.
10867         (FACE_SUITABLE_FOR_CHAR_P, FACE_FOR): Use ASCII_CHAR_P, not
10868         SINGLE_BYTE_CHAR_P.
10869         (choose_face_font, lookup_non_ascii_face, font_name_registry):
10870         Add prototypes.
10871         (lookup_face, lookup_named_face, lookup_derived_face): Fix prototype.
10872         (generate_ascii_font_name): Rename from generate_ascii_font.
10874         * fontset.h (get_font_repertory_func): New prototype.
10875         (make_fontset_for_ascii_face, fs_load_font): Fix prototypes.
10876         (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
10878         * fontset.c (Qprepend, Qappend): New variables.
10879         (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): Delete.
10880         (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
10881         (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
10882         (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
10883         (fontset_ref_and_range, fontset_add, reorder_font_vector)
10884         (load_font_get_repertory): New functions.
10885         (fontset_set): Delete.
10886         (fontset_face): New arg FACE.  Return face ID, not face.
10887         Complete re-write to handle new fontset structure.  Change caller.
10888         (free_face_fontset): Use ASET istead of AREF (X) = Y.
10889         (face_for_char): Don't call lookup_face.
10890         (make_fontset_for_ascii_face): New arg FACE.
10891         (fs_load_font): New arg CHARSET_ID.  Don't check
10892         Vfont_encoding_alist here.
10893         (find_font_encoding): New function.
10894         (list_fontsets): Use STRINGP, not ! NILP.
10895         (accumulate_script_ranges): New function.
10896         (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
10897         re-written to handle new fontset structure.
10898         (Ffontset_font): Return a copy of element.
10899         (syms_of_fontset): Define symbols Qprepend and Qappend.  Fix
10900         docstring of font-encoding-alist.
10902         * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
10903         (Fset_fotset_font): Fix arguments to 5.
10905         * msdos.c (XMenuActivate): Adjust for the change of lookup_derived_face.
10907         * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
10908         Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
10909         (highlight_trailing_whitespace): Adjust for the change of
10910         lookup_named_face.
10912         * xfaces.c: Include charset.h.
10913         (load_face_font): Delete argument C.  Change caller.
10914         (generate_ascii_font_name): Rename from generate_ascii_font.
10915         (font_name_registry): New function.
10916         (cache_face): Store ascii faces before non-ascii faces in buckets.
10917         (lookup_face): Delete arguments C and BASE_FACE.  Change caller.
10918         Lookup only ascii faces.
10919         (lookup_non_ascii_face): New function.
10920         (lookup_named_face): Delete argument C.  Change caller.
10921         (lookup_derived_face): Delete argument C.  Change caller.
10922         (try_font_list): New arg PATTERN.  Change caller.  If PATTERN is
10923         a string, just call font_list with it.
10924         (choose_face_font): Delete arguments FACE and C.  New arg
10925         FONT_SPEC.  Change caller.
10926         (realize_face, realize_x_face): Delete arguments C and BASE_FACE.
10927         Change caller.
10928         (realize_non_ascii_face): New function.
10929         (realize_x_face): Call load_face_font here.
10930         (realize_tty_face): Delete argument C.  Change caller.
10931         (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
10932         get a face ID.
10933         (dump_realized_face): Don't print charset of FACE.
10935         * xfns.c (x_set_font): Always call x_new_fontset and
10936         store_frame_parameter.
10937         (Fx_create_frame): Call x_new_fontset, not x_new_font.
10938         (syms_of_xfns): Set get_font_repertory_func to x_get_font_repertory.
10940         * xterm.h (x_get_font_repertory): Extern it.
10942         * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
10943         SINGLE_BYTE_CHAR_P.  Fix the logic of handling non-ASCII char when
10944         it->multibyte_p is zero.
10945         (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
10946         (x_new_fontset): If FONTSETNAME doesn't match any existing
10947         fontsets, create a new one.
10948         (x_get_font_repertory): New function.
10950 2008-02-01  Kenichi Handa  <handa@m17n.org>
10952         * coding.c (Ffind_coding_systems_region_internal): Detect an
10953         ASCII only string correctly.
10955         * lread.c (Fload): Don't load with Qload_force_doc_strings t if
10956         version is 0.
10958 2008-02-01  Kenichi Handa  <handa@m17n.org>
10960         * lread.c: Include "coding.h".
10961         (Qget_emacs_mule_file_char, Qload_force_doc_strings)
10962         (load_each_byte, unread_char): New variables.
10963         (readchar_backlog): Delete.
10964         (readchar): Return a character unless load_each_byte is nonzero.
10965         Handle the case that readcharfun is Qget_emacs_mule_file_char or a
10966         cons.  If unread_char is not -1, simply return it.
10967         (unreadchar): Handle the case that readcharfun is
10968         Qget_emacs_mule_file_char or a cons.  Set unread_char if necessary.
10969         (read_multibyte): Delete.
10970         (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
10971         (read_emacs_mule_char): New functions.
10972         (Fload): Even if the file doesn't have the extension ".elc", if
10973         safe_to_load_p returns a positive version number, assume that the
10974         file contains bytecompiled code.  If the version is less than 22,
10975         load the file while decoding multibyte sequences by emacs-mule.
10976         (readevalloop): Don't use readchar_backlog.
10977         (Fread): Likewise.  Pay attention to the case that STREAM is a cons.
10978         (Fread_from_string): Pay attention to the case that STREAM is a cons.
10979         (read_escape): Delete the arg BYTEREP.
10980         (read1): Set load_each_byte to 1 temporarily while handling
10981         #@NUMBER.  Don't call read_multibyte.
10982         (read_vector): Call Fread with a cons.  If readcharfun is
10983         Qget_emacs_mule_file_char, decode the read string by emacs-mule.
10984         (read_list): If doc_reference is 2, make the cdr part string as unibyte.
10985         (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
10986         and Qload_force_doc_strings.
10988 2008-02-01  Kenichi Handa  <handa@m17n.org>
10990         * xdisp.c (face_before_or_after_it_pos): Call
10991         FETCH_MULTIBYTE_CHAR with byte postion, not char position.
10993 2008-02-01  Kenichi Handa  <handa@m17n.org>
10995         * character.h (TRAILING_CODE_P): New macro.
10996         (MAYBE_UNIFY_CHAR): Adjust for the change of Funify_charset.
10997         (string_char_with_unification): Fix prototype.
10998         (Vscript_alist): Extern it.
11000         * character.c (Vscript_alist): New variable.
11001         (string_char_with_unification, str_as_unibyte)
11002         (string_escape_byte8): Add `const' to local variables.
11003         (syms_of_character): Declare script-alist as a Lisp variable.
11005         * charset.h (Vcharset_ordered_list): Extern it.
11006         (charset_ordered_list_tick): Extern it.
11007         (EMACS_MULE_LEADING_CODE_PRIVATE_11)
11008         (EMACS_MULE_LEADING_CODE_PRIVATE_12)
11009         (EMACS_MULE_LEADING_CODE_PRIVATE_21)
11010         (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros.
11011         (Funify_charset): Adjust for the change of Funify_charset.
11013         * charset.c (charset_ordered_list_tick): New variable.
11014         (Fdefine_charset_internal): Increment charset_ordered_list_tick.
11015         (Funify_charset): New optional arg DEUNIFY.  If it is non-nil,
11016         deunify intead of unify a charset.
11017         (string_xstring_p): Add `const' to local variables.
11018         (find_charsets_in_text): Add `const' to arguments and local variables.
11019         (encode_char): Adjust for the change of Funify_charset.  Fix
11020         detecting of invalid code.
11021         (Fset_charset_priority): Increment charset_ordered_list_tick.
11022         (Fmap_charset_chars): Fix handling of default value for FROM_CODE
11023         and TO_CODE.
11025         * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
11026         (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Delete macros.
11027         Changed callers to use EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
11028         (decode_coding_ccl, consume_chars)
11029         (Ffind_coding_systems_region_internal)
11030         (Fcheck_coding_systems_region): Add `const' to local variables.
11032         * print.c (print_object): Use octal form for printing the
11033         contents of a bool vector.
11035 2008-02-01  Dave Love  <fx@gnu.org>
11037         * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
11038         <version == 20>: Refuse to load.
11040 2008-02-01  Dave Love  <fx@gnu.org>
11042         * fns.c: Move coding.h.
11043         (Qcodeset, Qdays, Qmonths): New.
11044         (concat): Use CHARACTERP instead of INTEGERP.
11045         (Flocale_codeset): Delete.
11046         (Flanginfo): New function.
11047         (syms_of_fns): Change accordingly.
11049         * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
11051 2008-02-01  Dave Love  <fx@gnu.org>
11053         * casetab.c (init_casetab_once, init_casetab_once): Fix
11054         CHAR_TABLE_SET call.
11056         * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
11058         * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
11060         * charset.c (Fmap_charset_chars): Check args.  Convert Lisp types.
11061         (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
11062         (Fset_charset_priority, syms_of_charset): Convert Lisp types.
11064         * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
11066         * coding.c (ENCODE_DESIGNATION, decode_eol)
11067         (make_conversion_work_buffer, code_conversion_restore)
11068         (Fdefine_coding_system_internal): Convert Lisp types.
11069         (code_conversion_restore): Use EQ, not ==.
11070         (Fencode_coding_string): Fix code_convert_string call.
11072         * coding.h (code_convert_region): Fix prototype.
11074         * dispextern.h (redraw_frame, redraw_garbaged_frames): Remove.
11076         * fontset.c (fontset_ref, fontset_set, fs_load_font)
11077         (Ffontset_info): Convert Lisp types.
11079         * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
11081         * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
11083         * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
11085         * chartab.c: Include "...h", not <...h> in some cases.
11087         * callproc.c (Fcall_process): Remove unused variables.
11089 2008-02-01  Dave Love  <fx@gnu.org>
11091         * coding.c (Fset_coding_system_priority): Allow null arg list.
11093 2008-02-01  Dave Love  <fx@gnu.org>
11095         * minibuf.c (Fminibuffer_complete_word): Remove unused var.
11096         (Fself_insert_and_exit): Use CHARACTERP.
11098         * callproc.c (Fcall_process): Remove unused vars.
11100         * xterm.c (XTread_socket): Add extra dead keysyms.
11102         * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
11104         * dispextern.h: Remove prototypes for redraw_frame,
11105         redraw_garbaged_frames.
11107         * cmds.c (Fself_insert_command): Use CHARACTERP.
11109         * chartab.c (make_sub_char_table): Remove unused var.
11110         (Fset_char_table_default, Fmap_char_table): Doc fix.
11112         * keymap.c (access_keymap): Remove generic char code.
11113         (push_key_description): Use CHARACTERP.
11115 2008-02-01  Dave Love  <fx@gnu.org>
11117         * charset.c: Doc fixes.
11118         (Funify_charset): Extra checking.
11120 2008-02-01  Dave Love  <fx@gnu.org>
11122         * lread.c: Remove some unused variables.
11123         (safe_to_load_p): If safe, return the magic number version byte.
11124         (Fload): Maybe use load-with-code-conversion.
11126 2008-02-01  Kenichi Handa  <handa@m17n.org>
11128         * category.c (Fmodify_category_entry): Don't modify the contents
11129         of category_set for characters out of the range.  Avoid
11130         unnecessary modification.
11132         * character.h (MAYBE_UNIFY_CHAR): Adjust for the change of
11133         Vchar_unify_table.  The default value of the table is now nil.
11135         * character.c (syms_of_character): Setup Vchar_width_table for
11136         eight-bit-control and raw-byte chars.
11138         * charset.h (enum define_charset_arg_index): Delete
11139         charset_arg_parents and add charset_arg_subset and
11140         charset_arg_superset.
11141         (enum charset_attr_index): Delete charset_parents and add
11142         charset_subset and charset_superset.
11143         (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
11144         CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
11145         (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Delete.
11146         (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
11147         (CHARSET_SUPERSET): New macros.
11148         (charset_work): Extern it.
11149         (ENCODE_CHAR): Use charset_work.
11150         (CHAR_CHARSET_P): Adjust for the change of encoder format.
11151         (map_charset_chars): Extern it.
11153         * charset.c (load_charset_map): Set the default value of encoder
11154         and deunifier char-tables to nil.
11155         (map_charset_chars): Change argument.  Change callers.  Use
11156         map_char_table_for_charset instead of map_char_table.
11157         (Fmap_charset_chars): New optional args from_code and to_code.
11158         (Fdefine_charset_internal): Adjust for the change of
11159         `define-charset' (:parents -> :subset or :superset).
11160         (charset_work): New variable.
11161         (encode_char, syms_of_charset): Adjust for the change of
11162         Fdefine_charset_internal.
11163         (Ffind_charset_string): Setup the vector `charsets' correctly.
11165         * chartab.c (sub_char_table_ref_and_range): New arg default.  Fix
11166         the previous change.
11167         (char_table_ref_and_range): Adjust for the above change.
11168         (map_sub_char_table_for_charset): New function.
11169         (map_char_table_for_charset): New function.
11171         * keymap.c (describe_vector): Handle a char-table directly here.
11172         (describe_char_table): Delete.
11174         * lisp.h (map_charset_chars): Delete.
11176 2008-02-01  Dave Love  <fx@gnu.org>
11178         * fns.c (count_combining): Comment out (unused).
11179         (Flocale_codeset): New.
11180         (syms_of_fns): Defsubr it.
11182         * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
11183         (size_t): Remove.
11185 2008-02-01  Dave Love  <fx@gnu.org>
11187         * Makefile.in (chartab.o): Depend on charset.h.
11189 2008-02-01  Kenichi Handa  <handa@m17n.org>
11191         * character.c (syms_of_character): Set the default value of
11192         Vprintable_chars to Qnil.
11194 2008-02-01  Dave Love  <fx@gnu.org>
11196         * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
11198 2008-02-01  Kenichi Handa  <handa@m17n.org>
11200         * charset.c (load_charset_map): Handle the case that from < to
11201         correctly.
11203         * coding.c (encode_coding_emacs_mule, encode_coding_iso_2022)
11204         (encode_coding_sjis, encode_coding_big5, encode_coding_charset):
11205         Pay attention to raw-8-bit chars.
11207 2008-02-01  Kenichi Handa  <handa@m17n.org>
11209         * Makefile.in (lisp, shortlisp): Change chinese.elc to chinese.el.
11210         It is not bytecompiled now.
11212         * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
11213         (charset_jisx0208): New variables.
11214         (Fdefine_charset_internal): Setup them if appropriate.
11215         (init_charset_once): Initialize them to -1.
11217         * charset.h (charset_jisx0201_roman, charset_jisx0208_1978)
11218         (charset_jisx0208): Extern them.
11220         * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro.
11221         (CODING_ISO_FLAG_USE_OLDJIS): New macro.
11222         (CODING_ISO_FLAG_FULL_SUPPORT): Change macro definition.
11223         (setup_iso_safe_charsets): Fix arguments to Fassq.
11224         (DECODE_DESIGNATION, ENCODE_ISO_CHARACTER_DIMENSION1)
11225         (ENCODE_ISO_CHARACTER_DIMENSION2): Pay attention to
11226         CODING_ISO_FLAG_USE_ROMAN and CODING_ISO_FLAG_USE_OLDJIS.
11227         (encode_coding_iso_2022): Change the 1st arg to
11228         ENCODE_ISO_CHARACTER to a variable.
11230 2008-02-01  Kenichi Handa  <handa@m17n.org>
11232         * charset.h (enum define_charset_arg_index): New enums
11233         charset_arg_min_code and charset_arg_max_code.
11234         (struct charset): New member char_index_offset.
11236         * charset.c (CODE_POINT_TO_INDEX, INDEX_TO_CODE_POINT):
11237         Take charset->char_index_offset into account.
11238         (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
11239         args[charset_arg_max_code].  Setup charset.char_index_offset.
11240         (syms_of_charset): Fix args to Fdefine_charset_internal.
11242 2008-02-01  Dave Love  <fx@gnu.org>
11244         * coding.c (decode_coding_utf_8): Reject overlong sequences.
11246 2008-02-01  Dave Love  <fx@gnu.org>
11248         * coding.c: Doc fixes.
11249         (Fcoding_system_aliases): Fix return value.
11250         (Qmac): Remove (duplicated) definition.
11252 2008-02-01  Dave Love  <fx@gnu.org>
11254         * charset.c (Fcharset_priority_list, Fset_charset_priority): New
11255         functions.
11257         * character.c (Fstring): Doc fix.
11259         * charset.c (Fdefine_charset_alias): Update Vcharset_list.
11261         * fontset.c (Ffontset_info): Doc fix.  Return charset names, not
11262         ids.
11263         (font-encoding-alist): Doc fix.
11265 2008-02-01  Dave Love  <fx@gnu.org>
11267         * term.c (costs_set): Declare static, non-initialized for pcc.
11268         (encode_terminal_code): Remove unused var.
11270         * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
11271         for K&R.
11273         * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
11275         * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
11276         (suffixes): Move out of make_subsidiaries for K&R.
11278         * charset.c (map_charset_chars): Fix c_function declaration for K&R.
11280         * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
11282 2008-02-01  Dave Love  <fx@gnu.org>
11284         * data.c (Fchar_or_string_p): Doc fix.  Use CHARACTERP.
11286         * category.c (Fmodify_category_entry): Doc fix.  Remove unused vars.
11288 2008-02-01  Yong Lu  <lyongu@asia-infonet.com>
11290         * charset.c (Fdefine_charset_internal): Fix argument to bzero.
11292         * coding.c (decode_coding_charset): Workaround for the bug of GCC 2.96.
11294 2008-02-01  Kenichi Handa  <handa@m17n.org>
11296         * Makefile.in (lisp, shortlisp): Change cyrillic.elc to cyrillic.el,
11297         vietnamese.elc to vietnamese.el.  They are not bytecompiled now.
11299 2008-02-01  Kenichi Handa  <handa@m17n.org>
11301         * coding.c (decode_coding_charset): Adjust for the change of
11302         Fdefine_coding_system_internal.
11303         (Fdefine_coding_system_internal): For a coding system of
11304         `charset' type, store a list of charset IDs in
11305         `charset_attr_charset_valids' element of coding attributes.
11307 2008-02-01  Kenichi Handa  <handa@m17n.org>
11309         * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
11310         (emacs_mule_char): New arg src.  Delete arg `composition'.  Change
11311         caller.  Handle 2-byte and 3-byte charsets correctly.
11312         (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from
11313         DECODE_EMACS_MULE_COMPOSITION_RULE.  Change caller.
11314         (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
11315         (DECODE_EMACS_MULE_21_COMPOSITION): Call
11316         DECODE_EMACS_MULE_COMPOSITION_RULE_21.  Produce correct annotation
11317         sequence.
11318         (decode_coding_emacs_mule): Handle composition correctly.  Rewind
11319         `src' and `consumed_chars' correctly before calling emacs_mule_char.
11320         (DECODE_COMPOSITION_START): Correctly handle the case of altchar
11321         and alt&rule composition.
11322         (decode_coding_iso_2022): Handle composition correctly.
11323         (init_coding_once): Setup emacs_mule_bytes for private charsets.
11325         * charset.c (Fdefine_charset_internal): Fix bug for the case of
11326         re-defining a charset.  If the charset has :emacs-mule-id, setup
11327         emacs_mule_bytes.
11328         (Fmake_char): If CODE1 is nil, use the minimum code of the charset.
11330 2008-02-01  Kenichi Handa  <handa@m17n.org>
11332         * coding.c (encode_coding_iso_2022, encode_coding_sjis)
11333         (encode_coding_big5, encode_coding_charset): If coding requires safe
11334         encoding, produce a character specified by
11335         CODING_INHIBIT_CHARACTER_SUBSTITUTION.
11337 2008-02-01  Dave Love  <fx@gnu.org>
11339         * xterm.c (XSetIMValues): Declare.
11341         * process.c: Conditionally include sys/wait.h, pty.h.
11343         * print.c (print_object): Fix print format for 64-bit systems.
11345         * keyboard.c (modify_event_symbol): Fix print format for 64-bit systems.
11347         * buffer.c (emacs_strerror): Declare.
11349         * fontset.c (Fclear_face_cache): Declare.
11350         (accumulate_font_info): Comment-out (unused).
11351         (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
11352         variables.
11354         * character.h (string_escape_byte8): Declare.
11356         * charset.c (load_charset_map, load_charset_map_from_file): Remove
11357         unused vars.
11358         (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
11359         (Fmap_charset_chars): Doc fix.
11361         * coding.c (Vchar_coding_system_table, Qchar_coding_system): Remove.
11362         (Fset_coding_system_priority, Fset_coding_system_priority)
11363         (Fdefine_coding_system_internal): Doc fix.
11365 2008-02-01  Dave Love  <fx@gnu.org>
11367         * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
11369 2008-02-01  Kenichi Handa  <handa@m17n.org>
11371         * character.c (string_escape_byte8): Make multibyte string with
11372         correct size.
11374         * charset.c (Fmake_char): Delete unnecessary code.
11376 2008-02-01  Kenichi Handa  <handa@m17n.org>
11378         * xfns.c (x_encode_text): Allocate coding.destination here, and
11379         call encode_coding_object with dst_object Qnil.
11381         * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
11382         multibyte form correctly.
11384         * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
11385         against Vfont_encoding_alist.
11387         * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF).  Fix the
11388         handling of charset list.
11389         (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
11390         (decode_coding_object): Move point to coding->dst_pos before
11391         calling post-read-conversion function.
11392         (encode_coding_object): Give correct arguments to
11393         pre-write-conversion.  Ignore the return value of
11394         pre-write-conversion function.  Pay attention to the case that
11395         pre-write-conversion changes the current buffer.  If dst_object is
11396         Qt, even if coding->src_bytes is zero, allocate at least one byte
11397         to coding->destination.
11399         * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
11401         * charset.c (Fmake_char): Make it more backward compatible.
11402         (Fmap_charset_chars): Fix docstring.
11404 2008-02-01  Dave Love  <fx@gnu.org>
11406         * coding.c: Doc fixes.
11407         (Fdefine_coding_system_alias): Use names, not symbols, in
11408         coding-system-alist.
11410 2008-02-01  Kenichi Handa  <handa@m17n.org>
11412         * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
11413         of calling free_realized_face.
11415 2008-02-01  Yong Lu  <lyongu@asia-infonet.com>
11417         * charset.c (read_hex): Don't treat SPC as a comment starter.
11418         (decode_char): If CODE_POINT_TO_INDEX returns -1, always return -1.
11419         (Fdecode_char): Fix typo.
11421 2008-02-01  Kenichi Handa  <handa@m17n.org>
11423         * charset.h (struct charset): New member `code_space_mask'.
11425         * coding.c (coding_set_source): Delete the local variable beg_byte.
11426         (encode_coding_charset, Fdefine_coding_system_internal):
11427         Delete the local variable charset.
11428         (Fdefine_coding_system_internal): Setup
11429         attrs[coding_attr_charset_valids] correctly.
11431         * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
11432         member to check if CODE is valid or not.
11433         (Fdefine_charset_internal): Initialize `code_space_mask' member.
11434         (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
11435         is within the range of charset->min_code and carset->max_code.
11437 2008-02-01  Dave Love  <fx@gnu.org>
11439         * syntax.h (syntax_temp) [!__GNUC__]: Declare.
11441         * dispextern.h (generate_ascii_font): Fix return type.
11443         * xfaces.c (generate_ascii_font): Fix arg declaration.
11445         * coding.c (coding_inherit_eol_type)
11446         (Fset_terminal_coding_system_internal)
11447         (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
11449 2008-02-01  Kenichi Handa  <handa@m17n.org>
11451         * coding.c (decode_coding_charset, encode_coding_charset): Handle
11452         multiple charsets correctly.
11454 2008-02-01  Kenichi Handa  <handa@m17n.org>
11456         * search.c (boyer_moore): Fix handling of multibyte character
11457         translation.
11459         * xdisp.c (display_mode_element): When the variable `elt' is
11460         changed, update `this' and `lisp_string'.
11462 2008-02-01  Kenichi Handa  <handa@m17n.org>
11464         * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
11466         * callproc.c (Fcall_process): Be sure to give the current buffer
11467         to decode_coding_c_string.  Update PT and PT_BYTE after the insertion.
11469         * charset.c (struct charset_map_entries): New struct.
11470         (load_charset_map): Rename from parse_charset_map.  New args
11471         entries and n_entries.  Change caller.
11472         (load_charset_map_from_file): Rename from load_charset_map.
11473         Change caller.  New arg control_flag.  Call load_charset_map at
11474         the tail.
11475         (load_charset_map_from_vector): New function.
11476         (Fdefine_charset_internal): Setup charset.compact_codes_p.
11477         (encode_char): If the charset is compact, change a character index
11478         to a code point.
11480         * coding.c (coding_alloc_by_making_gap): Check the case that the
11481         source and destination are the same correctly.
11482         (decode_coding_raw_text): Set coding->consumed_char and
11483         coding->consumed to 0.
11484         (produce_chars): If coding->chars_at_source is nonzero, update
11485         coding->consumed_char and coding->consumed before calling
11486         alloc_destination.
11487         (Fdefine_coding_system_alias): Register ALIAS in
11488         Vcoding_system_alist.
11489         (syms_of_coding): Define `no-conversion' coding system at the tail.
11491         * fileio.c (Finsert_file_contents): Set coding_system instead of
11492         val.  If the current buffer is multibyte, always call
11493         decode_coding_gap.
11495         * xfaces.c (try_font_list): Give higher priority to fontset's
11496         family than face's family.
11498 2008-02-01  Kenichi Handa  <handa@m17n.org>
11500         * callproc.c (Fcall_process): Be sure to give the current buffer
11501         to decode_coding_c_string.
11503         * xfaces.c (try_font_list): Give a family specified in a fontset
11504         higher priority than a family specified in a face.
11506 2008-02-01  Kenichi Handa  <handa@m17n.org>
11508         * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
11509         Fix arguments to insert_from_buffer.
11511         * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
11513 2008-02-01  Kenichi Handa  <handa@m17n.org>
11515         * coding.c (produce_chars): Set the variable `multibytep' correctly.
11516         (decode_coding_gap): Set coding->dst_multibyte correctly.
11518 2008-02-01  Kenichi Handa  <handa@m17n.org>
11520         * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
11521         (decode_coding_utf_16): Fix converting high and low bytes to code-point.
11522         (encode_coding_utf_16): Substitute coding->default_char for
11523         non-Unicode characters.
11524         (decode_coding): Don't call record_insert here.
11525         (setup_coding_system): Initialize `surrogate' of
11526         coding->spec.utf_16 to 0.
11527         (EMIT_ONE_BYTE): Fix for multibyte case.
11529         * insdel.c (insert_from_gap): Call record_insert.
11531 2008-02-01  Kenichi Handa  <handa@m17n.org>
11533         * casefiddle.c (casify_region): Fix multibyte case.
11535         * character.c (c_string_width): Add return type `int'.
11536         (char_string_with_unification): Delete arg ADVANCED.
11538         * character.h (CHAR_VALID_P): Don't call CHARACTERP.
11539         (CHAR_STRING): Adjust for the change of char_string_with_unification.
11540         (CHAR_STRING_ADVANCE): Make it do-while statement.
11542         * chartab.c (sub_char_table_set_range): Optimize for the case
11543         DEPTH == 3.  Add workaround code for a GCC optimization bug.
11545         * charset.c (parse_charset_map): Remove an unused variable.
11547         * coding.c: Delete unused variables.
11549         * fileio.c (Finsert_file_contents): Set coding_system to Qnil
11550         earlier.  If inserted is zero and the coding system doesn't
11551         require flushing, don't call decode_coding_gap.
11553         * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
11555 2008-02-01  Kenichi Handa  <handa@m17n.org>
11557         The following changes are for using Unicode as an internal
11558         character model, and use UTF-8 format for buffer/string
11559         representation.
11561         * .gdbinit (xchartable): Adjust for the change of char table structure.
11562         (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
11564         * Makefile.in (obj): Add character.o and chartab.o.
11565         (lisp, shortlisp): Remove utf-8.elc.
11566         (*.o): For many files, change dependency on charset.h to
11567         character.h, and add dependency on character.h.
11568         (character.o, chartab.o): New targets.
11570         * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c:
11571         * doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c:
11572         * w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
11573         of "charset.h".
11575         * dired.c, filelock.c: Include "character.h".
11577         * alloc.c: Include "character.h" instead of "charset.h".
11578         (Fmake_char_table, make_sub_char_table): Move to chartab.c.
11579         (syms_of_alloc): Remove defsubr for Smake_char_table.
11581         * buffer.c: Include "character.h" instead of "charset.h", don't
11582         include "coding.h".
11583         (Fset_buffer_multibyte): Adjust for UTF-8.
11585         * buffer.h: EXFUN Fbuffer_live_p.
11587         * callproc.c: Include "character.h" instead of "charset.h".
11588         (Fcall_process): Big change for the new code-conversion APIs.
11590         * casetab.c: Include "character.h" instead of "charset.h".
11591         (set_canon, set_identity, shuffle): Adjust for the new
11592         map_char_table spec.
11593         (init_casetab_once): Call CHAR_TABLE_SET instead of directly
11594         accessing the char table structure.
11596         * chartab.c: New file that implements char table.
11598         * category.c: Include "character.h".
11599         (copy_category_entry): New function.
11600         (copy_category_table): Call map_char_table and copy_category_entry.
11601         (Fmake_category_table): Initialize all top-level slots.
11602         (char_category_set): New function.
11603         (modify_lower_category_set): Delete.
11604         (Fmodify_category_entry): Call char_table_ref_and_range.
11606         * category.h (CATEGORY_SET): Just call char_category_set.
11608         * ccl.c: Include "character.h".
11609         (Qccl, Qcclp): New variables.
11610         (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
11611         it's less than 256.
11612         (CCL_WRITE_MULTIBYTE_CHAR): Delete.
11613         (CCL_WRITE_STRING, CCL_READ_CHAR): Adjust for the change of SRC
11614         and DST type.
11615         (ccl_driver): Change types of argument, adjust code accordingly.
11616         (Fccl_execute, Fccl_execute_on_string): Adjust for the change of
11617         ccl_driver.
11618         (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
11620         * ccl.h (struct ccl_program): Delete members eol_type and multibyte.
11621         New members src_multibyte, dst_multibyte, consumed, and produced.
11622         (struct ccl_spec): Delete members decoder and encoder.  New member ccl.
11623         (CODING_SPEC_CCL_PROGRAM): New macro.
11624         (ccl_driver): Update prototype.
11625         (Qccl, Qcclp, Fccl_program_p): Extern them.
11626         (CHECK_CCL_PROGRAM): New macro.
11628         * character.c, character.h, chartab.c: New files.
11630         * charset.c: Mostly re-written.  Move character and multibyte sequence
11631         handling codes to character.c.
11633         * charset.h: Mostly re-written.  Move character and multibyte sequence
11634         handling codes to character.h.
11636         * coding.c, coding.h: Mostly re-written.
11638         * composite.c: Include "character.h" instead of "charset.h".
11639         (CHAR_WIDTH): Move to character.h.
11640         (HASH_KEY, HASH_VALUE): Delete.
11642         * composite.h (enum composition_method): Change order of enumeration
11643         symbols.
11645         * data.c: Include "character.h" instead of "charset.h".
11646         (Faref): Call CHAR_TABLE_REF for a char table.
11647         (Faset): Call CHAR_TABLE_SET for a char table.
11649         * dispextern.h (free_realized_face, check_face_attribytes)
11650         (generate_ascii_font): Extern them.
11651         (free_realized_multibyte_face): Delete extern.
11653         * disptab.h (DISP_CHAR_VECTOR): Adjust for the change of char
11654         table structure.
11656         * editfns.c: Include "character.h" instead of "charset.h".
11657         (Fchar_to_string): Always call CHAR_STRING.
11659         * emacs.c (main): Call init_charset_once, init_charset,
11660         syms_of_chartab, and syms_of_character.
11662         * fileio.c: Include "character.h" instead of "charset.h".
11663         (Finsert_file_contents): Big change for the new code-conversion API.
11664         (choose_write_coding_system, Fwrite_region): Likewise.
11665         (build_annotations_2): Delete.
11666         (e_write): Big change for the new code-conversion API.
11668         * fns.c: Include "character.h" instead of "charset.h".
11669         (copy_sub_char_table): Move to chartab.c.
11670         (Fcopy_sequence): Call copy_char_table for a char table.
11671         (concat): Delete codes calling count_multibyte.
11672         (string_char_to_byte, string_byte_to_char): Adjust for the new
11673         multibyte form.
11674         (internal_equal): Adjust for the change of char table structure.
11675         (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent)
11676         (Fchar_table_extra_slot, Fset_char_table_extra_slot)
11677         (Fchar_table_range, Fset_char_table_range, Fset_char_table_default)
11678         (char_table_translate, optimize_sub_char_table)
11679         (Foptimize_char_table, map_char_table, Fmap_char_table): Move to
11680         chartab.c.
11681         (char_table_ref_and_index): Delete.
11682         (HASH_KEY, HASH_VALUE): Move to lisp.h.
11683         (Fmd5): Call preferred_coding_system instead of accessing
11684         Vcoding_category_list.  Adjust for the new code-conversion API.
11685         (syms_of_fns): Move defsubr for char table related functions to
11686         chartab.c.
11688         * fontset.c: Mostly re-written.
11690         * fontset.h (struct font_info): Change type of the member encoding_type.
11691         (enum FONT_SPEC_INDEX): New enum.
11692         (fontset_font_pattern, fs_load_font): Update prototype.
11693         (FS_LOAD_FONT): Adjust for the change of fs_load_font.
11695         * indent.c: Include "character.h" instead of "charset.h".
11696         (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of WIDTH_BY_CHAR_HEAD.
11698         * insdel.c: Include "character.h" instead of "charset.h".
11699         (copy_text): Don't refer to Vnonascii_translation_table.
11700         (insert_from_gap): New function.
11702         * keyboard.c: Include "character.h" instead of "charset.h".
11703         (command_loop_1): Never call direct_output_forward_char before
11704         a non-ASCII character.
11705         (read_char): If Vkeyboard_translate_table is a char table, always
11706         translate a character.
11708         * keymap.c: Include "character.h".
11709         (store_in_keymap): Handle the case that IDX is a cons.
11710         (Fdefine_key): Handle the case that KEY is a cons and the car part
11711         is also a cons (range).
11712         (push_key_description): Adjust for the new character code.
11713         (describe_vector): Call describe_char_table for a char table.
11714         (describe_char_table): New function.
11716         * keymap.h (describe_char_table): Extern it.
11718         * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
11719         (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
11720         (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS)
11721         (SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
11722         Delete.
11723         (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjust for the new char table
11724         structure.
11725         (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
11726         (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2)
11727         (CHARTAB_SIZE_BITS_3): New macros.
11728         (chartab_size): Extern it.
11729         (struct Lisp_Char_Table): Re-design.
11730         (struct Lisp_Sub_Char_Table): New structure.
11731         (HASH_KEY, HASH_VALUE): Move from fns.c.
11732         (CHARACTERBITS): Define as 22.
11733         (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjust for the above change.
11734         (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
11735         (GC_SUB_CHAR_TABLE_P): New macro.
11736         (Fencode_coding_string, Fdecode_coding_string): Update EXFUN.
11737         (code_convert_string_norecord): Deleted extern.
11738         (init_character_once, syms_of_character, init_charset)
11739         (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
11741         * lread.c: Include "character.h".
11742         (read_multibyte): New arg NBYTES.
11743         (read_escape): Change the meaning of returned *BYTEREP.
11744         (to_multibyte): Delete.
11745         (read1): Adjust the handling of char table and string.
11747         * print.c: Include "character.h" instead of "charset.h".
11748         (print_string): Convert 8-bit raw bytes to octal form by
11749         string_escape_byte8.
11750         (print_object): Adjust for the new multibyte form.  Print 8-bit
11751         raw bytes always in octal form.  Handle sub char table correctly.
11753         * process.c: Include "character.h" instead of "charset.h".
11754         (read_process_output, send_process): Adjust for the new
11755         code-conversion API.
11757         * puresize.h (BASE_PURESIZE): Increase.
11759         * regex.c: Include "character.h" instead of "charset.h".
11760         (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
11761         (regex_compile): Accept a range whose starting and ending
11762         character have different leading bytes.
11763         (analyse_first): Adjust for the above change.
11765         * search.c: Include "character.h" instead of "charset.h".
11766         (search_buffer, boyer_moore): Adjust for the new multibyte form.
11767         (Freplace_match): Adjust for the change of multibyte_char_to_unibyte.
11769         * syntax.c: Include "character.h" instead of "charset.h".
11770         (syntax_parent_lookup): Delete.
11771         (Fmodify_syntax_entry): Accept a cons as CHAR.
11772         (skip_chars): Adjust for the new multibyte form.
11773         (init_syntax_once): Call char_table_set_range instead of directly
11774         accessing the structure of a char table.
11776         * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
11777         (SYNTAX_ENTRY_FOLLOW_PARENT): Delete macro.
11778         (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
11779         (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
11781         * term.c: Include "buffer.h" and "character.h".
11782         (encode_terminal_code, write_glyphs): Adjust for the new
11783         code-conversion API.
11784         (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
11786         * w32term.c (x_new_font): Adjust for the change of FS_LOAD_FONT.
11788         * xdisp.c: Include "character.h".
11789         (get_next_display_element): Adjust for the new multibyte form.
11790         (disp_char_vector): Adjust for the new char table structure.
11791         (decode_mode_spec_coding): Adjust for the new structure of
11792         coding system.
11793         (decode_mode_spec): Adjust for the new code-conversion API.
11795         * xfaces.c: Include "character.h" instead of "charset.h".
11796         (load_face_font): Adjust for the change of choose_face_font and
11797         FS_LOAD_FONT.
11798         (generate_ascii_font): New function.
11799         (set_lface_from_font_name): Adjust for the change of FS_LOAD_FONT.
11800         (set_font_frame_param): Adjust for the change of choose_face_font.
11801         (free_realized_face): Make it public.
11802         (free_realized_faces_for_fontset): Rename from
11803         free_realized_multibyte_face.  Free also faces realized for ASCII.
11804         (choose_face_font): Change arguments.  Adjust for the change of
11805         fontset_font_pattern and FS_LOAD_FONT.
11807         * xfns.c: Include "character.h".
11808         (x_encode_text): Adjust for the new code-conversion API.
11810         * xselect.c: Don't include "charset.h".
11811         (selection_data_to_lisp_data): Adjust for the new code conversion API.
11813         * xterm.c: Include "character.h".
11814         (x_encode_char): New argument CHARSET.  Change caller.
11815         (x_get_char_face_and_encoding, x_get_glyph_face_and_encoding):
11816         Call ENCODE_CHAR instead of SPLIT_CHAR.
11817         (x_produce_glyphs): Don't check Vnonascii_translation_table Call
11818         CHAR_WIDTH instead of CHARSET_WIDTH.
11819         (XTread_socket): Adjust for the new code-conversion API.
11820         (x_new_font): Adjust for the change of FS_LOAD_FONT.
11821         (x_load_font): Adjust for the change of struct font.
11823 2008-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
11825         * xfaces.c (face_at_buffer_position): Remove unused vars.
11827 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
11829         * ccl.c (CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR):
11830         Fix overflow checking.
11832 2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
11834         * ccl.c (CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR, ccl_driver):
11835         Cancel previous change.
11837 2008-01-31  Kenichi Handa  <handa@ni.aist.go.jp>
11839         * ccl.c (CCL_WRITE_CHAR): Increment extra_bytes only when
11840         ccl->eight_bit_control.  Fix check for buffer overflow.
11841         (CCL_WRITE_MULTIBYTE_CHAR): Fix check for buffer overflow.
11842         (ccl_driver): Initialize extra_bytes to 0.
11844 2008-01-31  Kenichi Handa  <handa@ni.aist.go.jp>
11846         * keyboard.c (make_ctrl_char): If C is a multibyte character, just
11847         return it ORed with ctrl_modifier.
11849 2008-01-29  Miles Bader  <miles@gnu.org>
11851         * macterm.c (XTset_vertical_scroll_bar): Fix merge mistake.
11853 2008-01-28  Jason Rumney  <jasonr@gnu.org>
11855         * w32.c (stat): Don't double check for networked drive.
11857 2008-01-28  Stefan Monnier  <monnier@iro.umontreal.ca>
11859         * window.c (run_window_configuration_change_hook): New function.
11860         Code extracted from set_window_buffer.  Set the selected frame.
11861         (set_window_buffer): Use it.
11862         * window.h (run_window_configuration_change_hook): Declare.
11863         * dispnew.c (change_frame_size_1): Use it instead of set-window-buffer.
11865         * keyboard.c (read_char): Yet another int/Lisp_Object mixup (YAILOM).
11867 2008-01-27  Dan Nicolaescu  <dann@ics.uci.edu>
11869         * Makefile.in: Remove references to unused macros.
11871 2008-01-26  Eli Zaretskii  <eliz@gnu.org>
11873         * w32.c (g_b_init_get_sid_sub_authority)
11874         (g_b_init_get_sid_sub_authority_count): New static variables.
11875         (GetSidSubAuthority_Proc, GetSidSubAuthorityCount_Proc): New typedefs.
11876         (get_sid_sub_authority, get_sid_sub_authority_count): New functions.
11877         (init_user_info): Use them to retrieve uid and gid.
11878         Use 500/513, the Windows defaults, as Administrator's uid/gid.
11879         (fstat): Use pw_uid and pw_gid from the_passwd structure for
11880         st_uid and st_gid of the file.
11882 2008-01-26  Jason Rumney  <jasonr@gnu.org>
11884         * w32.c (logon_network_drive): New function.
11885         (stat): Use it.
11887 2008-01-26  Chong Yidong  <cyd@stupidchicken.com>
11889         * xdisp.c (pos_visible_p): Handle the case where charpos falls on
11890         invisible text covered with an ellipsis.
11892 2008-01-25  Richard Stallman  <rms@gnu.org>
11894         * xdisp.c (redisplay_window): Run Qwindow_text_change_functions and
11895         jump back to beginning.  Move some other initializations after that.
11896         (Qwindow_text_change_functions, Vwindow_text_change_functions):
11897         New variables.
11898         (syms_of_xdisp): Init them.
11900         * keyboard.c (read_char): Restore echo_message_buffer after redisplay.
11902         * buffer.c (reset_buffer_local_variables):
11903         Implement `permanent-local-hook'.
11904         (Qpermanent_local_hook): New variable.
11905         (syms_of_buffer): Init and staticpro it.
11907 2008-01-25  Michael Albinus  <michael.albinus@gmx.de>
11909         * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux.
11911 2008-01-25  Thien-Thi Nguyen  <ttn@gnuvola.org>
11913         * fns.c (Fclrhash): Return TABLE.
11915 2008-01-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
11917         * macterm.c (x_scroll_bar_create): Initialize bar->redraw_needed_p.
11918         (XTset_vertical_scroll_bar): Redraw scroll bar if bar->redraw_needed_p
11919         is set even without positional changes.
11920         (x_scroll_bar_clear): Set bar->redraw_needed_p.
11922         * macterm.h (struct scroll_bar): New member `redraw_needed_p'.
11924 2008-01-23  Jason Rumney  <jasonr@gnu.org>
11926         * xterm.c (handle_one_xevent): Revert to counting chars not bytes.
11928         * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside
11929         the unicode range available in MULE by locale-coding-system.
11930         Improve dbcs lead byte detection.  Set event timestamp and modifiers
11931         earlier.
11933 2008-01-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
11935         * mac.c (mac_emacs_pid) [MAC_OSX]: New variable.
11936         [MAC_OSX] (init_mac_osx_environment): Initialize it.
11937         [MAC_OSX] (mac_try_close_socket) [SELECT_USE_CFSOCKET]: Return 0
11938         when used on child processes.
11940 2008-01-21  Michael Albinus  <michael.albinus@gmx.de>
11942         * dbusbind.c (Fdbus_method_return_internal): Rename from
11943         Fdbus_method_return.
11944         (Fdbus_unregister_object): Move to dbus.el.
11945         (Fdbus_call_method, Fdbus_method_return_internal)
11946         (Fdbus_send_signal): Improve debug messages.
11948 2008-01-20  Martin Rudalics  <rudalics@gmx.at>
11950         * undo.c (undo_inhibit_record_point): New variable.
11951         (syms_of_undo): Initialize it.
11952         (record_point): Don't record point when undo_inhibit_record_point
11953         is set.
11955 2008-01-19  Stefan Monnier  <monnier@iro.umontreal.ca>
11957         * process.c (list_processes_1): Don't use SCHARS on a nil buffer name.
11959         * xdisp.c (Qauto_hscroll_mode): New var.
11960         (syms_of_xdisp): Initialize it.
11961         (hscroll_window_tree): Use it to lookup `auto-hscroll-mode' in each
11962         window's buffer.
11963         (hscroll_windows): Don't check automatic_hscrolling_p here.
11965         * window.c (set_window_buffer): Don't unnecessarily reset hscroll and
11966         vscroll if we're setting window-buffer to the value it already has.
11968 2008-01-18  Dan Nicolaescu  <dann@ics.uci.edu>
11970         * m/intel386.h: Remove references to XENIX.
11972 2008-01-17  Andreas Schwab  <schwab@suse.de>
11974         * m/amdx86-64.h (START_FILES, LIB_STANDARD): Use HAVE_LIB64_DIR
11975         instead of HAVE_X86_64_LIB64_DIR.
11976         * m/ibms390x.h (START_FILES, LIB_STANDARD): Likewise.
11978 2008-01-17  Glenn Morris  <rgm@gnu.org>
11980         * m/ibms390x.h (START_FILES, LIB_STANDARD): Adjust value according
11981         to HAVE_X86_64_LIB64_DIR.
11983 2008-01-16  Dan Nicolaescu  <dann@ics.uci.edu>
11985         * s/irix3-3.h:
11986         * s/irix4-0.h:
11987         * s/386-ix.h:
11988         * s/domain.h:
11989         * s/hpux9-x11r4.h:
11990         * s/hpux9shxr4.h: Remove files for systems no longer supported.
11992         * sysdep.c: Remove code containing references to symbols defined
11993         by unsupported systems.
11995 2008-01-16  Glenn Morris  <rgm@gnu.org>
11997         * coding.c (select-safe-coding-system-function): Doc fix.
11999 2008-01-15  Glenn Morris  <rgm@gnu.org>
12001         * config.in: Revert 2008-01-13 change: this is a generated file.
12003 2008-01-13  Tom Tromey  <tromey@redhat.com>
12005         * lisp.h: Fix typo.
12007 2008-01-13  Dan Nicolaescu  <dann@ics.uci.edu>
12009         * m/sequent-ptx.h:
12010         * m/sequent.h:
12011         * s/ptx.h:
12012         * s/ptx4-2.h:
12013         * s/ptx4.h: Remove files for systems no longer supported.
12015         * callproc.c (Fcall_process): Fix previous change.
12017 2008-01-13  Dan Nicolaescu  <dann@ics.uci.edu>
12019         * unexsunos4.c: Remove file, system not supported anymore.
12021         * m/mips.h:
12022         * m/intel386.h:
12023         * callproc.c:
12024         * config.in:
12025         * ecrt0.c:
12026         * emacs.c:
12027         * fileio.c:
12028         * frame.c:
12029         * getpagesize.h:
12030         * keyboard.c:
12031         * lread.c:
12032         * process.c:
12033         * puresize.h:
12034         * sysdep.c:
12035         * systty.h:
12036         * syswait.h:
12037         * unexec.c:
12038         * xdisp.c:
12039         * alloc.c: Remove code containing references to symbols defined by
12040         unsupported systems.
12042 2008-01-11  Kenichi Handa  <handa@ni.aist.go.jp>
12044         * coding.c (detect_coding_mask): Fix previous change.
12046 2008-01-09  Kenichi Handa  <handa@ni.aist.go.jp>
12048         * coding.c (detect_coding_iso2022): New arg
12049         latin_extra_code_state.  Allow Latin extra codes only
12050         when *latin_extra_code_state is nonzero.
12051         (detect_coding_mask): If there is a NULL byte, detect the encoding
12052         as UTF-16 or binary.  If Latin extra codes exist, detect the
12053         encoding as ISO-2022 only when there's no other proper encoding is
12054         found.
12056 2008-01-08  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12058         * frame.c (Fmake_terminal_frame): Use #ifdef MAC_OS8 instead of
12059         #ifdef MAC_OS.
12061 2008-01-08  Richard Stallman  <rms@gnu.org>
12063         * fileio.c (Ffile_name_directory, Fexpand_file_name): Doc fixes.
12065 2008-01-06  Nick Roberts  <nickrob@snap.net.nz>
12067         * keyboard.c (parse_menu_item): Don't enclose key bindings on
12068         menu bar in parentheses.
12070 2008-01-06  Dan Nicolaescu  <dann@ics.uci.edu>
12072         * m/7300.h:
12073         * m/acorn.h:
12074         * m/alliant-2800.h:
12075         * m/alliant.h:
12076         * m/alliant1.h:
12077         * m/alliant4.h:
12078         * m/altos.h:
12079         * m/amdahl.h:
12080         * m/apollo.h:
12081         * m/att3b.h:
12082         * m/aviion-intel.h:
12083         * m/aviion.h:
12084         * m/celerity.h:
12085         * m/clipper.h:
12086         * m/cnvrgnt.h:
12087         * m/convex.h:
12088         * m/cydra5.h:
12089         * m/delta88k.h:
12090         * m/dpx2.h:
12091         * m/dual.h:
12092         * m/elxsi.h:
12093         * m/f301.h:
12094         * m/gould-np1.h:
12095         * m/gould.h:
12096         * m/i860.h:
12097         * m/ibmps2-aix.h:
12098         * m/ibmrt-aix.h:
12099         * m/ibmrt.h:
12100         * m/irist.h:
12101         * m/is386.h:
12102         * m/isi-ov.h:
12103         * m/mega68.h:
12104         * m/mg1.h:
12105         * m/news-r6.h:
12106         * m/news-risc.h:
12107         * m/news.h:
12108         * m/nh3000.h:
12109         * m/nh4000.h:
12110         * m/ns16000.h:
12111         * m/ns32000.h:
12112         * m/nu.h:
12113         * m/orion.h:
12114         * m/orion105.h:
12115         * m/paragon.h:
12116         * m/pfa50.h:
12117         * m/plexus.h:
12118         * m/pyramid.h:
12119         * m/pyrmips.h:
12120         * m/sh3el.h:
12121         * m/sps7.h:
12122         * m/sr2k.h:
12123         * m/stride.h:
12124         * m/sun1.h:
12125         * m/sun2.h:
12126         * m/sun3-68881.h:
12127         * m/sun3-fpa.h:
12128         * m/sun3-soft.h:
12129         * m/sun3.h:
12130         * m/sun386.h:
12131         * m/symmetry.h:
12132         * m/tad68k.h:
12133         * m/tahoe.h:
12134         * m/targon31.h:
12135         * m/tek4300.h:
12136         * m/tekxd88.h:
12137         * m/tower32.h:
12138         * m/tower32v3.h:
12139         * m/ustation.h:
12140         * m/wicat.h:
12141         * m/xps100.h:
12142         * s/cxux.h:
12143         * s/cxux7.h:
12144         * s/dgux.h:
12145         * s/dgux4.h:
12146         * s/dgux5-4-3.h:
12147         * s/dgux5-4r2.h:
12148         * s/esix.h:
12149         * s/esix5r4.h:
12150         * s/hiuxmpp.h:
12151         * s/hiuxwe2.h:
12152         * s/iris3-5.h:
12153         * s/iris3-6.h:
12154         * s/isc2-2.h:
12155         * s/isc3-0.h:
12156         * s/isc4-0.h:
12157         * s/isc4-1.h:
12158         * s/newsos5.h:
12159         * s/newsos6.h:
12160         * s/osf1.h:
12161         * s/osf5-0.h:
12162         * s/riscix1-1.h:
12163         * s/riscix12.h:
12164         * s/sco4.h:
12165         * s/sco5.h:
12166         * s/sunos4-0.h:
12167         * s/sunos4-1.h:
12168         * s/sunos413.h:
12169         * s/sunos4shr.h:
12170         * s/umax.h:
12171         * s/unipl5-2.h:
12172         * s/xenix.h:
12173         * cxux-crt0.s:
12174         * unexapollo.c:
12175         * unexconvex.c:
12176         * unexenix.c:
12177         * unexsni.c: Remove files for systems no longer supported.
12179         * m/intel386.h: Remove references to unsupported systems.
12181         * w32.c (get_emacs_configuration): Remove reference to i860.
12183         * sysdep.c: Remove dead code.
12185 2008-01-05  Dan Nicolaescu  <dann@ics.uci.edu>
12187         * s/rtu.h:
12188         * m/masscomp.h: Remove files.  Platform is obsolete.
12190 2008-01-04  Michael Albinus  <michael.albinus@gmx.de>
12192         * dbusbind.c (Fdbus_method_return): New function.
12193         (xd_read_message): Add the serial number to the event.
12194         (Fdbus_register_method): Activate the function.
12196 2008-01-03  Stefan Monnier  <monnier@iro.umontreal.ca>
12198         * keyboard.c (read_key_sequence): Fix typo.
12200 2008-01-03  Michael Albinus  <michael.albinus@gmx.de>
12202         * dbusbind.c (all): Replace XCAR by CAR_SAFE and XCDR by CDR_SAFE.
12203         (xd_signature, xd_append_arg): Handle element type detection for
12204         empty arrays.
12205         (Fdbus_call_method, Fdbus_send_signal): Undo type casting for
12206         SDATA () calls; this must be solved more general.
12207         (Fdbus_register_signal): Use SBYTES instead of strlen.
12209 2008-01-03  Magnus Henoch  <magnus@zemdatav>
12211         * dbusbind.c (xd_append_arg): Use unsigned char instead of
12212         unsigned int for byte values (necessary for big-endian platform).
12213         (Fdbus_call_method): Handle the case of no returned arguments.
12215 2007-12-31  Tom Tromey  <tromey@redhat.com>  (tiny change)
12217         * dbusbind.c (xd_read_message): Use non-static input_event struct.
12219 2007-12-31  Magnus Henoch  <mange@freemail.hu>
12221         * dbusbind.c (xd_signature): Signature of variant is just "v".
12223 2007-12-30  Michael Albinus  <michael.albinus@gmx.de>
12225         * dbusbind.c: Fix several errors and compiler warnings.
12226         Reported by Tom Tromey <tromey@redhat.com>.
12227         (XD_ERROR, XD_DEBUG_MESSAGE)
12228         (XD_DEBUG_VALID_LISP_OBJECT_P): Wrap code with "do ... while (0)".
12229         (xd_append_arg): Part for basic D-Bus types rewritten.
12230         (xd_retrieve_arg): Split implementation of DBUS_TYPE_BYTE and
12231         DBUS_TYPE_(U)INT16.  Don't call XD_DEBUG_MESSAGE with "%f" if not
12232         appropriate.
12233         (xd_read_message): Return Qnil.  Don't signal an error; it is not
12234         useful during event reading.
12235         (Fdbus_register_signal): Signal an error if the check for
12236         FUNCTIONP fails.
12237         (Fdbus_register_method): New function.  The implementation is not
12238         complete, the call of the function signals an error therefore.
12239         (Fdbus_unregister_object): New function, renamed from
12240         Fdbus_unregister_signal.  The initial check signals an error, if
12241         the object is not well formed.
12243 2007-12-30  Richard Stallman  <rms@gnu.org>
12245         * textprop.c (get_char_property_and_overlay):
12246         Signal error if POSITION is out of range in a buffer.
12248 2007-12-29  Martin Rudalics  <rudalics@gmx.at>
12250         * w32fns.c (Fx_create_frame): Make copy of frame parameters
12251         because the original parameters are in pure storage now.
12253 2007-12-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12255         * xdisp.c (phys_cursor_in_rect_p): Check if cursor is in fringe area.
12257 2007-12-22  Eli Zaretskii  <eliz@gnu.org>
12259         * callint.c (syms_of_callint) <command-history>: Add reference to
12260         history-length in the doc string.
12262 2007-12-17  Jason Rumney  <jasonr@gnu.org>
12264         * w32fns.c (w32_wnd_proc) <WM_KEYDOWN>: Cast char to unsigned
12265         before passing as wParam.
12267 2007-12-22  Michael Albinus  <michael.albinus@gmx.de>
12269         * dbusbind.c (xd_retrieve_arg): Handle DBUS_TYPE_BYTE,
12270         DBUS_TYPE_INT16, DBUS_TYPE_UINT16, DBUS_TYPE_INT64,
12271         DBUS_TYPE_UINT64, DBUS_TYPE_DOUBLE and DBUS_TYPE_SIGNATURE.
12272         Return float when DBUS_TYPE_INT32 or DBUS_TYPE_UINT32 do not fit
12273         as number.
12274         (Fdbus_call_method): Fix docstring.
12276 2007-12-21  Michael Albinus  <michael.albinus@gmx.de>
12278         * dbusbind.c (XD_BASIC_DBUS_TYPE, XD_DBUS_TYPE_P, XD_NEXT_VALUE):
12279         New macros.
12280         (XD_SYMBOL_TO_DBUS_TYPE): Rename from XD_LISP_SYMBOL_TO_DBUS_TYPE.
12281         (XD_OBJECT_TO_DBUS_TYPE): Rename from XD_LISP_OBJECT_TO_DBUS_TYPE.
12282         Simplify.
12283         (xd_signature): New function.
12284         (xd_append_arg): Compute also signatures.  Major rewrite.
12285         (xd_retrieve_arg): Make debug messages friendly.
12286         (Fdbus_call_method, Fdbus_send_signal): Extend docstring.
12287         Check for signatures of arguments.
12289 2007-12-19  Michael Albinus  <michael.albinus@gmx.de>
12291         * dbusbind.c (QCdbus_type_byte, QCdbus_type_boolean)
12292         (QCdbus_type_int16, QCdbus_type_uint16, QCdbus_type_int32)
12293         (QCdbus_type_uint32, QCdbus_type_int64, QCdbus_type_uint64)
12294         (QCdbus_type_double, QCdbus_type_string, QCdbus_type_object_path)
12295         (QCdbus_type_signature, QCdbus_type_array, QCdbus_type_variant)
12296         (QCdbus_type_struct, QCdbus_type_dict_entry): New D-Bus type symbols.
12297         (XD_LISP_SYMBOL_TO_DBUS_TYPE): New macro.
12298         (XD_LISP_OBJECT_TO_DBUS_TYPE): Add compound types.
12299         (xd_retrieve_value): Remove.  Functionality included in ...
12300         (xd_append_arg): New function.
12301         (Fdbus_call_method, Fdbus_send_signal): Apply it.
12303 2007-12-16  Michael Albinus  <michael.albinus@gmx.de>
12305         * dbusbind.c (top): Include <stdio.h>.
12306         (Fdbus_call_method, Fdbus_send_signal): Apply type cast in
12307         dbus_message_new_method_call and dbus_message_new_signal.
12308         (Fdbus_register_signal): Rename unique_name to uname.
12309         Check handler for FUNCTIONP instead of CHECK_SYMBOL.  Handle case of
12310         non-existing unique name.  Fix typos in matching rule.  Return an
12311         object which is useful in Fdbus_unregister_signal.
12312         (Fdbus_unregister_signal): Reimplementation, in order to remove
12313         only the corresponding entry.
12314         (Vdbus_registered_functions_table): Change the order of entries.
12315         Apply these changes in xd_read_message and Fdbus_register_signal.
12317 2007-12-16  Andreas Schwab  <schwab@suse.de>
12319         * fileio.c (Finsert_file_contents): Fix overflow check to not
12320         depend on undefined integer overflow.
12322 2007-12-14  Jason Rumney  <jasonr@gnu.org>
12324         * w32term.c (w32_read_socket): Use MULTIBYTE_CHAR_KEYSTROKE_EVENT
12325         for characters above 127.
12327 2007-12-13  Jason Rumney  <jasonr@gnu.org>
12329         * w32fns.c (w32_wnd_proc, Fw32_reconstruct_hot_key): Range check
12330         before dereferencing array.
12331         (lookup_vk_code): Remove zero comparison.
12333 2007-12-14  Michael Albinus  <michael.albinus@gmx.de>
12335         * dbusbind.c (xd_retrieve_value, xd_retrieve_arg)
12336         (Fdbus_call_method, Fdbus_send_signal, xd_read_message):
12337         Use `unsigned int' instead of `uint'.
12338         (xd_read_message, Fdbus_register_signal): Split expressions into
12339         multiple lines before operators "&&" and "||", according to the
12340         GNU Coding Standards.
12342 2007-12-14  Eli Zaretskii  <eliz@gnu.org>
12344         * dispextern.h (WINDOWS_NT): Fix incorrect spelling of WINDOWSNT.
12346 2007-12-12  Juri Linkov  <juri@jurta.org>
12348         * buffer.c (Frename_buffer): In interactive spec replace
12349         `read-buffer' with `read-string' that uses `buffer-name-history'
12350         as history, and the current buffer's name as default.
12352 2007-12-10  Stefan Monnier  <monnier@iro.umontreal.ca>
12354         * keyboard.c (Fcommand_execute): Call Qcall_interactively instead of
12355         manipulating the backtrace manually.
12356         (make_lispy_event): Merge the ASCII and MULTIBYTE cases.
12357         (struct backtrace, backtrace_list): Remove.
12358         (command_loop_1): Remove dead var `no_direct'.
12360         * buffer.c (reset_buffer_local_variables): If permanent_too is 0, also
12361         preserve non-built-in buffer-local variables.
12362         (Fkill_all_local_variables): Don't re-create&re-set permanent
12363         buffer-local variables.
12365 2007-12-09  Juri Linkov  <juri@jurta.org>
12367         * buffer.c (Frename_buffer): Change interactive spec from "s" to
12368         Lisp code that uses `read-buffer' with current buffer as default.
12370 2007-12-08  Michael Albinus  <michael.albinus@gmx.de>
12372         * dbusbind.c (xd_read_message): Generate an event for every
12373         registered handler.  There might be several handlers registered
12374         for the same signal.
12375         (Fdbus_register_signal): Don't overwrite a registration for the
12376         same signal.  Add a new registration if handlers are different.
12377         (Vdbus_registered_functions_table): Rework doc string.
12379 2007-12-07  Michael Albinus  <michael.albinus@gmx.de>
12381         * dbusbind.c (Fdbus_get_unique_name, xd_read_message)
12382         (Fdbus_register_signal): Use DBUS_MAXIMUM_NAME_LENGTH and
12383         DBUS_MAXIMUM_MATCH_RULE_LENGTH for string lengths.
12384         (Fdbus_call_method, Fdbus_send_signal, Fdbus_register_signal):
12385         Unify argument lists.
12386         (xd_read_message, Fdbus_register_signal): Reorder and extend event
12387         arguments and hash table keys.  Use unique name for service.
12388         (Fdbus_unregister_signal): Remove checks.
12389         (Vdbus_registered_functions_table): Fix doc string.
12391 2007-12-05  Magnus Henoch  <mange@freemail.hu>
12393         * process.c (make_process): Initialize pty_flag to 0.
12395 2007-12-05  Jason Rumney  <jasonr@gnu.org>
12397         * image.c (xbm_load) [WINDOWSNT]: Shuffle the bits of directly
12398         specified XBMs.
12400 2007-12-05  Richard Stallman  <rms@gnu.org>
12402         * xdisp.c (syms_of_xdisp) <scroll-conservatively>: Doc fix.
12404 2007-12-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12406         * mac.c (cfsockets_for_select) [MAC_OSX && SELECT_USE_CFSOCKET]:
12407         New variable.
12408         (mac_try_close_socket) [MAC_OSX]: New function.
12409         [MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]:
12410         Update cfsockets_for_select.  Replace invalid CFRunLoop source.
12412         * sysdep.c (emacs_close) [MAC_OSX && HAVE_CARBON]:
12413         Use mac_try_close_socket.
12415 2007-12-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12417         * unexmacosx.c (unrelocate): New argument BASE.  Use it instead of
12418         reloc_base.
12419         (copy_dysymtab): Compute relocation base here.
12420         (rebase_reloc_address) [__ppc64__]: New function.
12421         (copy_dysymtab) [__ppc64__]: Use it if relocation base needs to be
12422         changed.
12424 2007-12-05  Jason Rumney  <jasonr@gnu.org>
12426         * w32proc.c (sys_spawnve): Quote args with wildcards.
12428 2007-12-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12430         * unexmacosx.c (copy_data_segment): Also copy __gcc_except_tab and
12431         __objc_* sections.
12432         (unrelocate) [_LP64]: Set relocation base to address of data segment.
12434 2007-12-05  Michael Albinus  <michael.albinus@gmx.de>
12436         * dbusbind.c (xd_read_message): Return value is a Lisp_Object.
12437         Move check for Vdbus_registered_functions_table to
12438         xd_read_queued_messages.
12439         (xd_read_queued_messages): Protect xd_read_message calls by
12440         internal_condition_case_1.
12442 2007-12-04  Michael Albinus  <michael.albinus@gmx.de>
12444         * dbusbind.c (QCdbus_system_bus, QCdbus_session_bus): Rename from
12445         Qdbus_system_bus and Qdbus_session_bus, respectively.
12446         (Vdbus_intern_symbols): Remove.
12447         (Vdbus_registered_functions_table): New hash table.
12448         (XD_SYMBOL_INTERN_SYMBOL): Remove.
12449         (xd_read_message, Fdbus_register_signal, Fdbus_unregister_signal):
12450         Rewrite in order to manage registered functions by hash table
12451         Vdbus_registered_functions_table.
12453 2007-12-03  Jan Djärv  <jan.h.d@swipnet.se>
12455         * xterm.c: Update URL to Window Manager Specification in comment.
12457 2007-12-02  Michael Albinus  <michael.albinus@gmx.de>
12459         * config.in (HAVE_DBUS): Add.
12461         * Makefile.in (HAVE_DBUS): Add D-Bus definitions if defined.
12462         (ALL_CFLAGS): Add ${DBUS_CFLAGS}.
12463         (obj): Add $(DBUS_OBJ).
12464         (LIBES): Add $(DBUS_LIBS).
12465         (dbusbind.o): New target.
12467         * dbusbind.c: New file.
12469         * emacs.c (main): Call syms_of_dbusbind when HAVE_DBUS is defined.
12471         * keyboard.c: All D-Bus related code is wrapped by "#ifdef HAVE_DBUS".
12472         (Qdbus_event): New Lisp symbol.
12473         (kbd_buffer_get_event, make_lispy_event): Handle DBUS_EVENT.
12474         (gobble_input): Call xd_read_queued_messages, reading D-Bus messages.
12475         (keys_of_keyboard ): Define dbus-event.
12477         * termhooks.h (event_kind): Add DBUS_EVENT when HAVE_DBUS is defined.
12479 2007-12-01  Richard Stallman  <rms@gnu.org>
12481         * search.c (syms_of_search) <inhibit-changing-match-data>: Doc fix.
12483 2007-11-30  Jason Rumney  <jasonr@gnu.org>
12485         * w32console.c (w32con_ins_del_lines, scroll_line): Clip to window.
12486         (w32con_reset_terminal_modes): Clear screen buffer.
12487         (w32_face_attributes): Don't use color indexes that are out of range.
12488         Only reverse the default colors.
12490         * xfaces.c (map_tty_color, tty_color_name): Remove special case for
12491         WINDOWSNT.
12493         * w32console.c, w32term.h (vga_stdcolor_name): Remove.
12495 2007-11-29  Jason Rumney  <jasonr@gnu.org>
12497         * w32console.c: Leave HAVE_WINDOW_SYSTEM defined.
12498         (w32_face_attributes): Use Vtty_defined_color_alist to determine
12499         if the terminal colors are initialized.
12500         (unspecified_fg, unspecified_bg): Remove unused declarations.
12502 2007-11-29  Andreas Schwab  <schwab@suse.de>
12504         * keyboard.c (apply_modifiers): Fix typo.
12506 2007-11-29  Richard Stallman  <rms@gnu.org>
12508         * keymap.c (Fcurrent_local_map): Doc fix.
12510 2007-11-28  Petr Salinger  <Petr.Salinger@seznam.cz>  (tiny change)
12512         * s/gnu-kfreebsd.h: New file.
12514 2007-11-28  Stefan Monnier  <monnier@iro.umontreal.ca>
12516         * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
12517         Don't cast redundantly.
12519         * keyboard.c (KEY_TO_CHAR): New macro.
12520         (parse_modifiers, apply_modifiers): Accept integer arguments.
12521         (read_key_sequence): Use them to unify the "shift->unshift" mapping
12522         for chars and symbol keys.
12523         After doing such remapping, apply function-key-map again.
12525 2007-11-27  Dan Nicolaescu  <dann@ics.uci.edu>
12527         * Makefile.in (SOME_MACHINE_LISP): Remove VMS files, they are not
12528         compiled anymore.
12530 2007-11-26  Andreas Schwab  <schwab@suse.de>
12532         * process.c (list_processes_1): Fix indentation level of the
12533         command column.
12535 2007-11-23  Andreas Schwab  <schwab@suse.de>
12537         * editfns.c (Fformat): Handle %c specially since it requires the
12538         argument to be of type int.
12540 2007-11-23  Markus Triska  <markus.triska@gmx.at>
12542         * emacs.c (main): Call init_editfns before init_process, since
12543         init_process sets Vprocess_connection_type depending on OS release.
12545 2007-11-22  Stefan Monnier  <monnier@iro.umontreal.ca>
12547         * data.c (do_symval_forwarding): Use same code as in find_symbol_value.
12548         (find_symbol_value): Use do_symval_forwarding.
12550         * data.c (set_internal): Set the value in the `cons-cell' (for
12551         Buffer_Local_values) not only for frame-local variables.
12553 2007-11-22  Andreas Schwab  <schwab@suse.de>
12555         * data.c (Fnumber_to_string): Add cast when passing EMACS_INT
12556         values to sprintf.
12557         * keymap.c (Fsingle_key_description): Likewise.
12558         * print.c (print_object): Likewise.
12560 2007-11-22  Jan Djärv  <jan.h.d@swipnet.se>
12562         * gtkutil.c (update_frame_tool_bar): Don't call x-gtk-map-stock if
12563         file for image is nil.
12565 2007-11-22  Dan Nicolaescu  <dann@ics.uci.edu>
12567         * term.c: Include stdarg.h.
12568         (fatal): Implement using varargs.
12569         * lisp.h (fatal): Add argument types.  (Restore 2005-09-30 change).
12571 2007-11-21  Stefan Monnier  <monnier@iro.umontreal.ca>
12573         * lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
12574         * data.c (store_symval_forwarding): Get type from buffer_objfwd.
12575         Update call to buffer_slot_type_mismatch.
12576         * buffer.h (buffer_local_types, PER_BUFFER_TYPE): Remove.
12577         (buffer_slot_type_mismatch): Update.
12578         * buffer.c (buffer_local_types): Remove.
12579         (buffer_slot_type_mismatch): Get the symbol and type as arguments.
12580         (defvar_per_buffer): Set the type in the buffer_objfwd.
12582 2007-11-21  Jason Rumney  <jasonr@gnu.org>
12584         * w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font):
12585         CreateFileMapping returns NULL on failure.
12587 2007-11-21  Stefan Monnier  <monnier@iro.umontreal.ca>
12589         * search.c (Fset_match_data): Remove the `evaporate' feature.
12590         (unwind_set_match_data): Don't use the `evaporate' feature.
12592 2007-11-21  Jason Rumney  <jasonr@gnu.org>
12594         * dispnew.c (init_display) [WINDOWSNT]: Hardcode terminal_type.
12596         * w32console.c (w32con_write_glyphs): Remove unused variables.
12598 2007-11-20  Dan Nicolaescu  <dann@ics.uci.edu>
12600         * macterm.c (mac_term_init): Call add_keyboard_wait_descriptor.
12602         * s/darwin.h (MULTI_KBOARD): Remove.
12604         * macfns.c (x_create_tip_frame, Fx_create_frame)
12605         (x_create_tip_frame): Don't deal with MULTI_KBOARD.
12607 2007-11-19  Stefan Monnier  <monnier@iro.umontreal.ca>
12609         * buffer.c (Fbuffer_local_value): Remove redundant test.
12610         (swap_out_buffer_local_variables): Swap out binding in `buffer' rather
12611         than in `current-buffer' to match the comment.
12612         Do the swap using swap_in_global_binding.
12614         * data.c (store_symval_forwarding, set_internal):
12615         * eval.c (specbind): Remove dead code.
12617         * coding.c (detect_coding, Fupdate_coding_systems_internal):
12618         * fns.c (Fmd5): Use find_symbol_value rather than SYMBOL_VALUE
12619         Since we do not want to see internal Lisp_*fwd objects here.
12621 2007-11-18  Jan Djärv  <jan.h.d@swipnet.se>
12623         * sysdep.c (init_system_name): Use getaddrinfo if available.
12625         * xterm.c (x_scroll_bar_set_handle, x_scroll_bar_handle_click)
12626         (x_scroll_bar_note_movement): start, end, with, height in struct
12627         scroll_bar are integers and not Lisp_Object, so remove XINT for them.
12629 2007-11-17  Dan Nicolaescu  <dann@ics.uci.edu>
12631         * puresize.h (BASE_PURESIZE): Increase to 1190000.
12633 2007-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
12635         * buffer.h (struct buffer): Move `undo_list' back to before `name'.
12636         This undoes Richard's change of 14-Oct-2002.
12638         * alloc.c (allocate_other_vector):
12639         * lisp.h (allocate_other_vector): Remove.
12641         * window.c (struct save_window_data): Move non-lisp data to the end
12642         and make it `int' rather than Lisp_Object.
12643         (Fcurrent_window_configuration): Use ALLOCATE_PSEUDOVECTOR.
12644         Done wrap/unwrap integer values.
12645         (Fset_window_configuration, compare_window_configurations):
12646         Update use of fields to their new types.
12648         * xterm.h (struct scroll_bar): Only use Lisp_Object for lisp data.
12649         Turn integer fields into `int'.  Merge x_window_low and x_window_high.
12650         (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK, SCROLL_BAR_X_WINDOW)
12651         (SET_SCROLL_BAR_X_WINDOW): Remove.
12652         (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
12653         Access the new x_window field directly.
12654         * xterm.c (x_scroll_bar_create): Use a pseudovector.
12655         Don't wrap/unwrap integers into Lisp_Objects.
12656         (XTset_vertical_scroll_bar, x_scroll_bar_handle_click)
12657         (x_scroll_bar_report_motion):
12658         Don't wrap/unwrap integers into Lisp_Objects.
12659         (x_term_init): Use SDATA.
12660         (x_window_to_scroll_bar, x_create_toolkit_scroll_bar)
12661         (x_scroll_bar_set_handle, x_scroll_bar_remove)
12662         (XTset_vertical_scroll_bar, x_scroll_bar_expose)
12663         (x_scroll_bar_report_motion, x_scroll_bar_clear):
12664         * xfns.c (x_set_background_color):
12665         * gtkutil.c (xg_create_scroll_bar, xg_set_toolkit_scroll_bar_thumb):
12666         Access the new x_window field directly.
12668         * alloc.c (ALLOCATE_PSEUDOVECTOR): Move to lisp.h.
12669         (allocate_pseudovector): Make non-static.
12671         * lisp.h (enum pvec_type): New tag PVEC_OTHER.
12672         (allocate_pseudovector): Declare.
12673         (ALLOCATE_PSEUDOVECTOR): Move from alloc.c.
12675 2007-11-15  Andreas Schwab  <schwab@suse.de>
12677         * editfns.c (Fformat): Correctly format EMACS_INT values.
12678         Also take precision into account when formatting an integer.
12680         * keyboard.c (Fevent_symbol_parse_modifiers): Fix declaration.
12682 2007-11-15  Stefan Monnier  <monnier@iro.umontreal.ca>
12684         * keyboard.c (Fevent_symbol_parse_modifiers): New function.
12685         (syms_of_keyboard): Defsubr it.
12687         * data.c (swap_in_global_binding): Fix longstanding bug where
12688         store_symval_forwarding was not called with the right second argument,
12689         thus causing objfwd-ing from being dropped.
12691 2007-11-14  Juanma Barranquero  <lekktu@gmail.com>
12693         * macfns.c (Fx_create_frame, Fx_display_pixel_width)
12694         (Fx_display_pixel_height, Fx_display_planes)
12695         (Fx_display_color_cells, Fx_server_max_request_size)
12696         (Fx_server_vendor, Fx_server_version, Fx_display_backing_store)
12697         (Fx_display_visual_class, Fx_display_save_under):
12698         * w32fns.c (Fx_create_frame, Fx_display_pixel_width)
12699         (Fx_display_pixel_height, Fx_display_planes)
12700         (Fx_display_color_cells, Fx_server_max_request_size)
12701         (Fx_server_vendor, Fx_server_version, Fx_display_screens)
12702         (Fx_display_mm_height, Fx_display_mm_width)
12703         (Fx_display_backing_store, Fx_display_visual_class)
12704         (Fw32_select_font, Fx_display_save_under):
12705         * xfns.c (Fx_create_frame, Fx_display_pixel_width)
12706         (Fx_display_pixel_height, Fx_display_planes)
12707         (Fx_display_color_cells, Fx_server_max_request_size)
12708         (Fx_server_vendor, Fx_server_version, Fx_display_backing_store)
12709         (Fx_display_save_under): Fix typos in docstrings.
12711 2007-11-14  Juanma Barranquero  <lekktu@gmail.com>
12713         * w32fns.c (Fw32_registered_hot_keys): Don't return the nil values
12714         corresponding to deleted entries; they are an implementation detail.
12715         (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits):
12716         Remove variables.
12717         (w32_pass_extra_mouse_buttons_to_system, w32_strict_fontnames)
12718         (w32_pass_multimedia_buttons_to_system, w32_strict_painting)
12719         (Vw32_charset_info_alist, w32_to_x_color, w32_init_class)
12720         (w32_createscrollbar, w32_createwindow, my_post_msg, w32_get_modifiers)
12721         (w32_grabbed_keys, cancel_all_deferred_msgs): Make static.
12722         (Fw32_define_rgb_color, Fw32_load_color_file)
12723         (syms_of_w32fns) <w32-pass-multimedia-buttons-to-system>:
12724         Fix typos in docstrings.
12725         (Fx_server_version): Reflow docstring.
12726         (Fw32_shell_execute): Doc fixes.
12728 2007-11-13  Juanma Barranquero  <lekktu@gmail.com>
12730         * w32fns.c (Fw32_register_hot_key): Don't try to register hot key
12731         if w32_parse_hot_key returned nil.
12733 2007-11-10  Stefan Monnier  <monnier@iro.umontreal.ca>
12735         * xdisp.c (load_overlay_strings): Fix copy&paste typo.
12737 2007-11-09  Jason Rumney  <jasonr@gnu.org>
12739         * s/ms-w32.c (USE_TOOLKIT_SCROLL_BARS): Define.
12741         * w32term.c (w32_scroll_bar_handle_click): Use SCROLL_BAR_CLICK_EVENT.
12743         * keyboard.c (discard_mouse_events, make_lispy_event) [WINDOWSNT]:
12744         Remove W32_SCROLL_BAR_CLICK_EVENT.
12746         * termhooks.h (enum event_kind) [WINDOWSNT]: Likewise.
12747         Add MULTIMEDIA_KEY_EVENT.
12749         * keyboard.c (lispy_function_keys) [WINDOWSNT]: Add more keys.
12750         (lispy_multimedia_keys) [WINDOWSNT]: New array.
12751         (make_lispy_event) [WINDOWSNT]: Use it to translate
12752         MULTIMEDIA_KEY_EVENT.
12754         * w32term.h (WM_APPCOMMAND): Define if not already.
12755         (GET_APPCOMMAND_LPARAM): Likewise.
12757         * w32term.c (w32_read_socket): Generate MULTIMEDIA_KEY_EVENT from
12758         WM_APPCOMMAND.
12760         * w32fns.c (w32_pass_multimedia_buttons_to_system): New user option.
12761         (syms_of_w32fns): Export and initialize it.
12762         (w32_wnd_proc): Pass WM_APPCOMMAND on to w32_read_socket.
12764 2007-11-09  Chong Yidong  <cyd@stupidchicken.com>
12766         * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE
12767         twice.
12769         * xdisp.c (handle_face_prop): Fix last change.
12771 2007-11-09  Richard Stallman  <rms@gnu.org>
12773         * xdisp.c (handle_face_prop): Test for strings that came from overlays,
12774         not just for after-strings and before-strings.
12775         Call face_for_overlay_string and pass the overlay to it.
12776         (handle_display_prop): Determine whether property came from an overlay.
12777         Pass OVERLAY arg to handle_single_display_spec.
12778         (handle_single_display_spec): New arg OVERLAY sets it->from_overlay.
12779         (load_overlay_strings): Fill in it->string_overlays.
12780         (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays.
12782         * xfaces.c (face_for_overlay_string): Function renamed from
12783         face_at_buffer_position_no_overlays, and add arg OVERLAY.
12785         * dispextern.h (struct it): New elt string_overlays.
12786         New elt from_overlay, also in stack.
12787         Rearrange a few elements.
12788         (face_for_overlay_string): Decl renamed from
12789         face_at_buffer_position_no_overlays, and add argument.
12791 2007-11-09  Richard Stallman  <rms@gnu.org>
12793         * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays
12794         to get the base face for an overlay string.
12796         * dispextern.h (face_at_buffer_position_no_overlays): Add decl.
12798         * xfaces.c (face_at_buffer_position_no_overlays): New function.
12800         * xdisp.c (handle_stop): Move some code out of loop.
12802 2007-11-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12804         * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes):
12805         Fix conversion from Lisp object to ATSUFontID.
12807 2007-11-09  Jason Rumney  <jasonr@gnu.org>
12809         * xdisp.c (Fformat_mode_line): Do nothing when noninteractive.
12811 2007-11-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
12813         * unexmacosx.c (unexec_regions_recorder, unexec_regions_merge):
12814         Don't assume regions are aligned to page boundary.
12815         (print_load_command_name): Add LC_UUID if defined.
12817 2007-11-09  Richard Stallman  <rms@gnu.org>
12819         * emacs.c (syms_of_emacs) <installation-directory>: Reflow docstring.
12821 2007-11-07  Jason Rumney  <jasonr@gnu.org>
12823         * s/windows95.h: Remove.
12825 2007-11-06  Jan Djärv  <jan.h.d@swipnet.se>
12827         * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and
12828         abort with a message on unhandled store_type values.
12830 2007-11-01  Jan Djärv  <jan.h.d@swipnet.se>
12832         * xterm.c, xfns.c, xselect.c, xterm.h, s/msdos.h, s/sco4.h, s/sco5.h:
12833         Remove HAVE_X11R5 and HAVE_X11R4.
12835 2007-11-01  Dan Nicolaescu  <dann@ics.uci.edu>
12837         * Makefile.in: Remove references to sunfns.c and sunfns.o.
12839 2007-11-01  Johan Bockgård  <bojohan@gnu.org>
12841         * macterm.c, w32term.c, xterm.c (x_draw_stretch_glyph_string):
12842         Don't set s->stippled_p here, since it has already been set by
12843         x_set_glyph_string_gc from x_draw_glyph_string.
12845 2007-11-01  Dan Nicolaescu  <dann@ics.uci.edu>
12847         * sunfns.c: Remove file.
12849         * m/sun386.h:
12850         * m/sun2.h:
12851         * m/sparc.h: Remove Sun windows code.
12853 2007-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
12855         * keyboard.c (syms_of_keyboard): Initialize the initial_kboard.
12856         (init_keyboard): Set current_kboard's window-system to nil.
12857         (tty_read_avail_input): Typo.
12858         * frame.c (make_initial_frame): Don't initialize the initial_kboard.
12860 2007-10-31  Dan Nicolaescu  <dann@ics.uci.edu>
12862         * s/usg5-4.h:
12863         * s/usg5-3.h:
12864         * s/ptx.h:
12865         * m/is386.h:
12866         * m/ibmps2-aix.h:
12867         * Makefile.in: Remove all mentions of X10.
12869         * dispnew.c (syms_of_display): Don't mention version 10.
12871 2007-10-28  Juanma Barranquero  <lekktu@gmail.com>
12873         * makefile.w32-in (OBJ1): Remove abbrev.$(O).
12874         ($(BLD)/abbrev.$(O)): Remove.
12876 2007-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>
12878         Rewrite abbrev.c in Elisp.
12879         * image.c (Qcount): Don't declare as extern.
12880         (syms_of_image): Initialize and staticpro `Qcount'.
12881         * puresize.h (BASE_PURESIZE): Increase for the new abbrev.el functions.
12882         * emacs.c (main): Don't call syms_of_abbrev.
12883         * Makefile.in (obj): Remove abbrev.o.
12884         (abbrev.o): Remove.
12885         * abbrev.c: Remove.
12887 2007-10-26  Martin Rudalics  <rudalics@gmx.at>
12889         * window.c (window_min_size_2): Don't count header-line.
12891 2007-10-26  Dan Nicolaescu  <dann@ics.uci.edu>
12893         * frame.h (struct frame): Move all bit fields after the first bit
12894         field to take advantage of the available space.  Group all the
12895         chars together to reduce wasted space due to padding.
12897 2007-10-26  Juanma Barranquero  <lekktu@gmail.com>
12899         * minibuf.c (Fread_minibuffer, Feval_minibuffer): Reflow docstrings.
12901         * alloc.c (spare_memory, stack_copy, stack_copy_size, ignore_warnings)
12902         (Vdead, dont_register_blocks, staticvec, staticidx, interval_block)
12903         (n_interval_blocks, init_strings, check_string_bytes, check_sblock)
12904         (init_float, free_float, n_cons_blocks, init_cons, all_vectors)
12905         (n_vectors, symbol_block, symbol_block_index, symbol_free_list)
12906         (n_symbol_blocks, init_symbol, marker_block, marker_free_list)
12907         (n_marker_blocks, init_marker, valid_pointer_p, make_pure_float)
12908         (last_marked, mark_object_loop_halt): Make static.
12910         * frame.c (syms_of_frame) <delete-frame-functions>:
12911         Fix typo in docstring.
12913 2007-10-25  Juanma Barranquero  <lekktu@gmail.com>
12915         * w32.c (init_environment): Fix tiny memory leak.
12916         (w32_get_resource): Remove unused variable `ok'.
12918 2007-10-25  Stefan Monnier  <monnier@iro.umontreal.ca>
12920         Make `window-system' into a keyboard-local variable (rather than
12921         frame-local as done originally by multi-tty).
12923         * keyboard.h (struct kboard): Add Vwindow_system.
12924         * keyboard.c (init_kboard): Set a default for Vwindow_system.
12925         (mark_kboards): Mark Vwindow_system.
12927         * dispnew.c (syms_of_display) <window-system>: Declare terminal-local.
12928         (init_display): Don't set the obsolete `window-system' frame-param.
12930         * xterm.c (x_term_init):
12931         * w32term.c (w32_create_terminal):
12932         * term.c (init_tty): Set Vwindow_system.
12933         * macterm.c (mac_create_terminal): Set a keyboard (missing piece of the
12934         multi-tty merge maybe?), copied from w32term.c.  Set Vwindow_system.
12936         * xfns.c (Fx_create_frame, x_create_tip_frame):
12937         * w32fns.c (Fx_create_frame, x_create_tip_frame):
12938         * macfns.c (Fx_create_frame):
12939         Don't set the obsolete `window-system' frame-param.
12941         * frame.h (Qwindow_system): Remove.
12942         * frame.c (Qwindow_system): Remove.  In `syms_of_frame' as well.
12943         (Fmake_terminal_frame): Don't set obsolete `window-system' frame-param.
12945 2007-10-24  Richard Stallman  <rms@gnu.org>
12947         * frame.c (x_figure_window_size): For fullscreen case,
12948         set USPosition | PPosition without clobbering rest of window_prompting.
12950         * keyboard.c (Fcurrent_idle_time): Doc fix.
12952         * print.c (Fwith_output_to_temp_buffer): Doc fix.
12954 2007-10-23  Stefan Monnier  <monnier@iro.umontreal.ca>
12956         * process.c (unwind_request_sigio): Only define if __ultrix__.
12958         * callproc.c (child_setup): Remove spurious *.
12960         * lisp.h (Fget_text_property): Declare.
12961         (have_menus_p): Declare it here rather than in sys-dep header files.
12962         * macterm.h (have_menus_p):
12963         * msdos.h (have_menus_p):
12964         * xterm.h (have_menus_p): Remove.
12966         * data.c (Fmake_variable_buffer_local, Fmake_local_variable)
12967         (Fmake_variable_frame_local): Just check the variable's const-ness
12968         rather than checking nil or t.
12970 2007-10-22  Jason Rumney  <jasonr@gnu.org>
12972         * w32fns.c: Include math.h.
12973         (w32_abort): Declaration moved to nt/config.nt.
12975         * s/ms-w32.h (HAVE_STDLIB_H): Define.
12976         (abort): Redefinition moved to nt/config.nt.
12978         * m/windowsnt.h: Remove.
12980 2007-10-22  Juanma Barranquero  <lekktu@gmail.com>
12982         * emacs.c (Fdump_emacs): Fix typo in message.
12983         (syms_of_emacs) <kill-emacs-hook>: Fix typo in docstring.
12984         <installation-directory>: Reflow docstring.
12986 2007-10-22  Juri Linkov  <juri@jurta.org>
12988         * minibuf.c: Allow minibuffer default to be a list of default values.
12989         With empty input use the first element of this list as returned default.
12990         (string_to_object)
12991         (read_minibuf_noninteractive): If defalt is cons, set val to its car.
12992         (read_minibuf): If defalt is cons, set histstring to its car.
12993         (Fread_string): If default_value is cons, set val to its car.
12994         (Fread_buffer): If def is cons, use its car.
12995         (Fcompleting_read): If defalt is cons, set val to its car.
12997 2007-10-21  Michael Albinus  <michael.albinus@gmx.de>
12999         * fileio.c (Fcopy_file): Call file name handler with preserve_uid_gid.
13001 2007-10-20  Juanma Barranquero  <lekktu@gmail.com>
13003         * doc.c (Fdocumentation): Check for advice in all cases.
13005 2007-10-19  Chong Yidong  <cyd@stupidchicken.com>
13007         * Makefile.in [HAVE_LIBRESOLV]: Add -lresolv to linker flags.
13009 2007-10-19  Richard Stallman  <rms@gnu.org>
13011         * doc.c (Fdocumentation): Check for and handle an advised function.
13013 2007-10-19  Juanma Barranquero  <lekktu@gmail.com>
13015         * process.c (Fset_process_filter): Doc fix.
13017 2007-10-18  Stefan Monnier  <monnier@iro.umontreal.ca>
13019         * keyboard.c (read_key_sequence): Undo a change introduced by multi-tty
13020         which caused key-translation-map to applied repeatedly (thus breaking
13021         double-mode).
13023 2007-10-17  Stefan Monnier  <monnier@iro.umontreal.ca>
13025         * xselect.c (x_own_selection, x_handle_selection_clear)
13026         (x_clear_frame_selections):
13027         * w32menu.c (list_of_panes, list_of_items):
13028         * w32fns.c (w32_color_map_lookup, Fx_create_frame, Fx_display_list):
13029         * textprop.c (validate_plist, interval_has_all_properties)
13030         (interval_has_some_properties, interval_has_some_properties_list)
13031         (add_properties, text_property_list):
13032         * process.c (Fget_buffer_process, list_processes_1, status_notify):
13033         * minibuf.c (Fassoc_string):
13034         * macselect.c (x_own_selection, x_clear_frame_selections)
13035         (Fx_disown_selection_internal):
13036         * keymap.c (Fcommand_remapping, where_is_internal, describe_map_tree):
13037         Use CONSP rather than !NILP and XC[AD]R rather than Fc[ad]r.
13039 2007-10-17  Chong Yidong  <cyd@stupidchicken.com>
13041         * process.c: Link to libs for calling res_init() if available.
13042         (Fmake_network_process): Call res_init() before getaddrinfo or
13043         gethostbyname, if possible.
13045 2007-10-17  Stefan Monnier  <monnier@iro.umontreal.ca>
13047         * lread.c (read1): Set pvectype for char_tables.
13049         * lisp.h (XMISCANY, XMARKER, XINTFWD, XBOOLFWD, XOBJFWD, XOVERLAY)
13050         (XBUFFER_OBJFWD, XBUFFER_LOCAL_VALUE, XKBOARD_OBJFWD, XSAVE_VALUE):
13051         Add type checks.
13052         (SOME_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP): Remove.
13054         * alloc.c (free_misc): Use XMISCTYPE.
13055         (live_misc_p, gc_sweep): Use Lisp_Misc_Any.
13057 2007-10-17  Glenn Morris  <rgm@gnu.org>
13059         * minibuf.c (Qcompletion_ignore_case): New Lisp_Object.
13060         (syms_of_minibuf): Add Qcompletion_ignore_case.
13061         * dired.c (Qcompletion_ignore_case): Change to external.
13062         (syms_of_dired) [VMS]: Remove Qcompletion_ignore_case.
13063         * fileio.c (Qcompletion_ignore_case): New external Lisp_Object.
13064         (Fread_file_name): Use it rather than intern'ing.
13066         * coding.c (Qcompletion_ignore_case): New external Lisp_Object.
13067         (Fread_coding_system): Ignore case of user input.
13069 2007-10-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
13071         * xdisp.c (handle_display_prop): Ignore display specs after
13072         replacing one when string text is being replaced.
13073         (handle_single_display_spec): Pretend as if characters with display
13074         property haven't been consumed only when buffer text is being replaced.
13076 2007-10-16  Stefan Monnier  <monnier@iro.umontreal.ca>
13078         * xfns.c (Fx_create_frame, Fx_display_list):
13079         * window.c (window_fixed_size_p, enlarge_window)
13080         (shrink_window_lowest_first):
13081         * macterm.c (init_font_name_table):
13082         * macfns.c (Fx_create_frame, Fx_display_list):
13083         * lread.c (close_load_descs):
13084         * keyboard.c (read_char_x_menu_prompt):
13085         * fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
13086         * coding.c (code_convert_region_unwind): Test the type of an object
13087         rather than just !NILP before extracting data from it.
13089         * alloc.c (Fpurecopy): Set the pvec tag on pseudo vectors.
13091         * lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
13092         (XMISCANY): New macro.
13093         (XMISCTYPE): Use it.
13094         (struct Lisp_Misc_Any): New type.
13095         (union Lisp_Misc): Use it.
13096         (struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
13097         * data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
13098         (find_symbol_value, set_internal, default_value, Fset_default)
13099         (Fmake_variable_buffer_local, Fmake_local_variable)
13100         (Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
13101         (Flocal_variable_if_set_p, Fvariable_binding_locus):
13102         The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
13103         * alloc.c (allocate_buffer): Set the size and tag.
13104         (allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
13105         Use XMISCANY.
13106         (die): Follow the GNU convention for error messages.
13107         * print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
13108         * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
13109         tag any more.
13110         (set_buffer_internal_1):
13111         * frame.c (store_frame_param):
13112         * eval.c (specbind):
13113         * xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
13115         * doc.c (Fsnarf_documentation): Simplify.
13117 2007-10-14  Juanma Barranquero  <lekktu@gmail.com>
13119         * w32term.c (w32_font_is_double_byte, my_create_scrollbar): Make static.
13120         (syms_of_w32term) <w32-enable-unicode-output>: Fix typo in docstring.
13122 2007-10-14  Stefan Monnier  <monnier@iro.umontreal.ca>
13124         * buffer.c (Fmake_indirect_buffer): Set the buffer's tag.
13126 2007-10-14  Juanma Barranquero  <lekktu@gmail.com>
13128         * eval.c (do_autoload): Don't save autoloads.
13130         * data.c (Ffset): Save autoload of the function being set.
13132 2007-10-07  John Paul Wallington  <jpw@pobox.com>
13134         * xfns.c (x_create_tip_frame): Set the `display-type' frame
13135         parameter before setting up faces.
13137 2007-10-13  Eli Zaretskii  <eliz@gnu.org>
13139         * ccl.c (Fregister_code_conversion_map):
13140         * keyboard.c (append_tool_bar_item): Reformat last change.
13142         * lisp.h (eabs): Rename from `abs'.  All callers changed.
13144 2007-10-05  Dmitry Antipov  <dmantipov@yandex.ru>
13146         * buffer.c (add_overlay_mod_hooklist):
13147         * ccl.c (Fregister_ccl_program, Fregister_code_conversion_map):
13148         * fontset.c (make_fontset):
13149         * keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item)
13150         (append_tool_bar_item):
13151         * macmenu.c (grow_menu_items):
13152         * w32menu.c (grow_menu_items):
13153         * xmenu.c (grow_menu_items): Use larger_vector.
13155 2007-10-13  Eli Zaretskii  <eliz@gnu.org>
13157         * msdos.c (dos_rawgetc): Undo last change (there's no ``leaving
13158         selected frame'' on MSDOS).
13160 2007-10-12  Martin Rudalics  <rudalics@gmx.at>
13162         * frame.c (Qexplicit_name): New variable.
13163         (x_report_frame_params): Report it in parameter alist.
13164         (syms_of_frame): Intern and staticpro it.
13166 2007-10-10  Patrick Mahan  <mahan@mahan.org>  (tiny change)
13168         * macfns.c (x_create_tip_frame): Set terminal for frame.
13170 2007-10-10  Stefan Monnier  <monnier@iro.umontreal.ca>
13172         * frame.c (Qenvironment): Remove.
13173         (syms_of_frame) <Qenvironment>: Don't initialize.
13174         (Fdelete_frame): Don't treat the `environment' param specially.
13175         * frame.h (Qenvironment): Don't declare.
13176         * callproc.c (set_initial_environment): Don't set unused frame param.
13178         * frame.c (Fframe_with_environment): Remove.
13179         (syms_of_frame) <Sframe_with_environment>: Don't declare.
13181         * lisp.h (Fframe_with_environment): Don't declare.
13183 2007-10-10  Juanma Barranquero  <lekktu@gmail.com>
13185         * indent.c (indent_tabs_mode, last_known_column)
13186         (last_known_column_modified): Make static.
13187         (syms_of_indent) <indent-tabs-mode>: Remove redundant info in docstring.
13189 2007-10-10  Katsumi Yamaoka  <yamaoka@jpl.org>
13191         * puresize.h (BASE_PURESIZE): Increase to 1170000.
13193 2007-10-09  Jason Rumney  <jasonr@gnu.org>
13195         * w32term.c (x_set_window_size): Disable code that attempts to tell
13196         Lisp code about a size change before it actually happens.
13198 2007-10-09  Richard Stallman  <rms@gnu.org>
13200         * xdisp.c (handle_invisible_prop): After setting up an ellipsis,
13201         return HANDLED_RETURN.
13203 2007-10-08  Martin Rudalics  <rudalics@gmx.at>
13205         * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
13206         when there's an unread command event.
13208         * frame.c (focus_follows_mouse): Move here from frame.el to allow
13209         window autoselection act appropriately when leaving selected frame.
13210         (syms_of_frame): Initialize focus_follows_mouse.
13211         * frame.h (focus_follows_mouse): Extern it.
13212         * macterm.c (XTread_socket): When focus_follows_mouse is nil
13213         make SELECT_WINDOW_EVENT only if we don't leave the selected frame.
13214         * msdos.c (dos_rawgetc): Likewise.
13215         * w32term.c (w32_read_socket): Likewise.
13216         * xterm.c (handle_one_xevent): Likewise.
13217         * xdisp.c (syms_of_xdisp): In doc-string of
13218         mouse-autoselect-window mention focus-follows-mouse.
13220 2007-10-08  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
13222         * macterm.c (mac_load_query_font): Fix missing return value.
13223         [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
13224         Add BLOCK_INPUT.
13226 2007-10-08  Richard Stallman  <rms@gnu.org>
13228         * xdisp.c (get_window_cursor_type): Implement documented behavior
13229         for cursor-in-non-selected-windows = t.
13231 2007-10-08  Jason Rumney  <jasonr@gnu.org>
13233         * w32.c (w32_get_resource): Always close registry keys.
13235 2007-10-08  Jason Rumney  <jasonr@gnu.org>
13237         * makefile.w32-in (LIBS): Add COMCTL32.
13239         * w32fns.c (globals_of_w32fns): Init common controls.
13241 2007-10-08  Richard Stallman  <rms@gnu.org>
13243         * image.c (our_memory_buffer): Rename from omfib_buffer.
13245 2007-10-08  Richard Stallman  <rms@gnu.org>
13247         * buffer.c (Foverlays_at): Doc fix.
13249 2007-10-08  Stefan Monnier  <monnier@iro.umontreal.ca>
13251         * fns.c (Fplist_put): Preserve uneven tail data.
13253 2007-10-08  Peter O'Gorman  <bug-gnu-emacs@mlists.thewrittenword.com>  (tiny change)
13255         * termhooks.h (enum event_kind): Remove trailing comma.
13257         * frame.h (enum): Remove trailing comma.
13259 2007-10-08  Dhruva Krishnamurthy  <dhruvakm@gmail.com>  (tiny change)
13261         * w32proc.c (delete_child): Don't terminate threads of zombies.
13263 2007-10-08  Martin Rudalics  <rudalics@gmx.at>
13265         * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
13267         * keyboard.c (syms_of_keyboard): Set up new Lisp variable
13268         last-repeatable-command.
13269         (init_kboard): Initialize Vlast_repeatable_command.
13270         (command_loop_1): Set it to real_this_command unless that was
13271         bound to an input event.
13272         (mark_kboards): Mark it.
13274 2007-10-08  Richard Stallman  <rms@gnu.org>
13276         * eval.c (condition-case): Doc fix.
13278 2007-10-08  Masatake YAMATO  <jet@gyve.org>
13280         * xfaces.c (tty_supports_face_attributes_p): Fix code
13281         for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
13282         was copied and not edited.
13284 2007-10-09  Stefan Monnier  <monnier@iro.umontreal.ca>
13286         Add new `input-decode-map' keymap and use it for terminal
13287         escape sequences.
13288         * keyboard.h (struct kboard): Add Vinput_decode_map.
13289         Remove Vlocal_key_translation_map.
13290         * keyboard.c (read_key_sequence): Add support for input-decode-map.
13291         (init_kboard): Init input-decode-map.
13292         Replace local-key-translation-map back with key-translation-map.
13293         (syms_of_keyboard): Declare input-decode-map.
13294         Remove local-key-translation-map.  Update docstrings.
13295         (mark_kboards): Mark Vinput_decode_map.
13296         Don't mark Vlocal_key_translation_map.
13297         * keymap.c (Fdescribe_buffer_bindings): Describe input-decode-map.
13298         Replace local-key-translation-map back with key-translation-map.
13299         * term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN):
13300         Bind in input-decode-map rather than function-key-map.
13302         * lisp.h (XSETPSEUDOVECTOR): Don't set the tag anymore.
13303         This was made redundant by the previous introduction of XSETPVECTYPE.
13305 2007-10-09  Richard Stallman  <rms@gnu.org>
13307         * image.c (free_bitmap_record): Rename from Free_Bitmap_Record.
13309 2007-09-29  Richard Stallman  <rms@gnu.org>
13311         * eval.c (internal_condition_case_2, internal_condition_case_1)
13312         (internal_condition_case): Reenable abort if x_catching_errors ()
13313         to see if that really happens and why.
13315 2007-10-06  Andreas Schwab  <schwab@suse.de>
13317         * fileio.c (Fwrite_region): Ignore EINVAL error from fsync.
13319 2007-10-04  Juanma Barranquero  <lekktu@gmail.com>
13321         * image.c (syms_of_image) <image-types>: Fix typo in docstring.
13323 2007-10-03  Stefan Monnier  <monnier@iro.umontreal.ca>
13325         * frame.h (struct frame): Don't try to GC-mark menu_bar_items_used.
13327 2007-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
13329         * window.h (struct window):
13330         * window.c (struct save_window_data, struct saved_window):
13331         * termhooks.h (struct terminal):
13332         * process.h (struct Lisp_Process):
13333         * frame.h (struct frame):
13334         * buffer.h (struct buffer):
13335         * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
13336         (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
13337         The size field of (pseudo)vectors is now unsigned.
13338         (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
13340         * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.
13341         Turn `count' into an integer.
13343         * fns.c (make_hash_table, hash_put, hash_remove, hash_clear)
13344         (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count):
13345         * print.c (print_object) <HASH_TABLE_P>: `count' is an int.
13346         * alloc.c (allocate_hash_table): Use ALLOCATE_PSEUDOVECTOR.
13347         (mark_object) <HASH_TABLE_P>: Use mark_vectorlike.
13349         * alloc.c (allocate_pseudovector): New fun.
13350         (ALLOCATE_PSEUDOVECTOR): New macro.
13351         (allocate_window, allocate_terminal, allocate_frame)
13352         (allocate_process): Use it.
13353         (mark_vectorlike): New function.
13354         (mark_object) <FRAMEP, WINDOWP, BOOL_VECTOR_P, VECTORP>: Use it.
13355         (mark_terminals): Use it.
13356         (Fmake_bool_vector, Fmake_char_table, make_sub_char_table)
13357         (Fmake_byte_code): Use XSETPVECTYPE.
13359         * frame.c (Fframe_parameters): Minor simplification.
13361         * insdel.c (adjust_markers_for_insert): Generalize assertion checks.
13363         * marker.c (Fmarker_buffer): Make test for odd case into a failure.
13365         * buffer.c (Fget_buffer_create, init_buffer_once):
13366         * lread.c (defsubr):
13367         * window.c (Fcurrent_window_configuration): Use XSETPVECTYPE.
13369         * lisp.h (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Don't let them be
13370         defined differently in the m/*.h files.
13371         (XCHAR_TABLE, XBOOL_VECTOR): Add assertion checking.
13372         (XSETPVECTYPE): New macro.
13373         (XSETPSEUDOVECTOR): Use it.
13375         * buffer.c (syms_of_buffer) <local-abbrev-table>: Move from abbrev.c.
13376         (DEFVAR_PER_BUFFER, defvar_per_buffer): Move from lisp.h and lread.c.
13378         * lisp.h (defvar_per_buffer, DEFVAR_PER_BUFFER):
13379         * lread.c (defvar_per_buffer):
13380         * abbrev.c (syms_of_abbrev) <local-abbrev-tabl>: Move to buffer.c.
13382         * window.c (candidate_window_p): Only consider as visible frames that
13383         are on the same terminal.
13385         * m/ibms390x.h (MARKBIT): Remove unused macro.
13387 2007-10-01  Juanma Barranquero  <lekktu@gmail.com>
13389         * lread.c (Fload): Fix typo in docstring.
13391 2007-10-01  Michaël Cadilhac  <michael@cadilhac.name>
13393         * floatfns.c (Fexpt): Manually check for overflows, so that a power
13394         of a non-zero value can't yield zero.
13396 2007-09-29  Stefan Monnier  <monnier@iro.umontreal.ca>
13398         * term.c (term_clear_mouse_face, term_mouse_highlight)
13399         (tty_write_glyphs_with_face): Only define is HAVE_GPM.
13401         * print.c (safe_debug_print): Use XHASH.
13403         * lisp.h (DECL_ALIGN, USE_LSB_TAG): Move logic to before definition of
13404         Lisp elements such as tags.
13405         (XHASH): New macro.
13406         (EQ): Use it.
13407         (SREF, SSET, STRING_COPYIN): Use SDATA.
13408         (VOID_TO_LISP, CVOID_TO_LISP, LISP_TO_VOID, LISP_TO_CVOID): Remove.
13410         * alloc.c (mark_terminal): Remove left-over declaration.
13411         (enum mem_type): Replace all vector subtypes -> MEM_TYPE_VECTORLIKE.
13412         (allocate_vectorlike): Remove type argument.  Adjust callers.
13413         (live_vector_p, mark_maybe_pointer, valid_lisp_object_p):
13414         Only handle the one remaining MEM_TYPE_VECTORLIKE.
13416         * alloc.c (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): New macros
13417         to avoid unnecessary BLOCK_INPUTs when SYNC_INPUT is used.
13418         (xmalloc, xrealloc, xfree, lisp_malloc, lisp_free, lisp_align_malloc)
13419         (lisp_align_free, make_interval, allocate_string, allocate_string_data)
13420         (make_float, Fcons, allocate_vectorlike, Fmake_symbol, allocate_misc):
13421         Use them.
13423         * xfaces.c (load_face_font, free_realized_face, clear_face_gcs):
13424         Don't let signal handlers run when a GC is freed but not yet NULL'ed.
13425         (x_free_gc): Remove BLOCK_INPUT since it's now redundant.
13427 2007-09-28  Dan Nicolaescu  <dann@ics.uci.edu>
13429         * Makefile.in (lisp, shortlisp): Delete server.elc, it is not
13430         loaded by default.
13432 2007-09-28  Stefan Monnier  <monnier@iro.umontreal.ca>
13434         * term.c (Fgpm_mouse_start): Don't signal an error if already activated
13435         on this tty.
13436         (Fgpm_mouse_stop): Only deactivate if it was activated on this tty.
13438         * term.c (mouse_face_window): Rename from Qmouse_face_window.
13439         Update all users.
13440         (handle_one_term_event): Use Gpm_DrawPointer.
13441         (Fgpm_mouse_start): Rename from Fterm_open_connection.
13442         Signal errors instead of returning nil.  Always return nil.
13443         (Fgpm_mouse_stop): Rename from Fterm_close_connection.
13444         Make it a noop if gpm-mouse was not activated.
13445         (syms_of_term): Update names.
13447 2007-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
13449         * sysdep.c (narrow_foreground_group, widen_foreground_group): Static.
13450         (init_sys_modes): Check that gpm_tty is the current tty.
13452         * alloc.c (allocate_terminal): Set the vector size to only count the
13453         lisp fields.  Initialize those to nil.
13454         (mark_object): Don't treat terminals specially.
13455         (mark_terminal): Remove.
13456         (mark_terminals): Use mark_object instead.
13458         * termhooks.h (struct terminal): Move all Lisp_Object fields traced by
13459         the GC to the beginning.
13461         * indent.h:
13462         * indent.c: Use EMACS_INT for ints coming from Elisp data.
13464         * indent.c (Fmove_to_column): Use EMACS_INT for buffer positions.
13466 2007-09-25  Jason Rumney  <jasonr@gnu.org>
13468         * frame.c (make_terminal_frame): Remove special case for WINDOWSNT.
13470         * w32console.c (create_w32cons_output): Remove.
13472         * term.c (init_tty): Call init_sys_modes on WINDOWSNT also.
13474         * sysdep.c (init_sys_modes): Use set_terminal_modes_hook.
13475         (reset_sys_modes): Use reset_terminal_modes_hook.
13477 2007-09-24  Stefan Monnier  <monnier@iro.umontreal.ca>
13479         * eval.c (do_autoload): Don't output any message.
13481 2007-09-24  Juri Linkov  <juri@jurta.org>
13483         * emacs.c (standard_args): Change priority of "--no-splash"
13484         from 40 to 3.  Add "--no-desktop" with the same priority.
13486 2007-09-23  Dmitry Antipov  <dmantipov@yandex.ru>
13488         * alloc.c (gc_sweep): Check cons cell mark bits word by word
13489         and optimize the case where they are all 1.
13491 2007-09-23  Johannes Weiner  <hannes@saeurebad.de>
13493         * lisp.h (abs): Define if not defined.
13494         * keyboard.c, sound.c, w32term.c, xfaces.c, xterm.c:
13495         Don't define `abs', since it's defined in lisp.h.
13497 2007-09-22  Eli Zaretskii  <eliz@gnu.org>
13499         * term.c (DEV_TTY): New macro.  Provide a definition for MS-Windows.
13500         (FRAME_TERMCAP_P) [WINDOWSNT]: Don't define to zero.
13501         (Fcontrolling_tty_p, Fresume_tty, dissociate_if_controlling_tty)
13502         (init_tty): Use DEV_TTY instead of "/dev/tty".
13503         [WINDOWSNT]: No need to protect from NAME arg being null.
13505 2007-09-21  Dan Nicolaescu  <dann@ics.uci.edu>
13507         * term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning
13508         up the tty state.
13510 2007-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
13512         * termhooks.h (term_gpm): Delete.  Use gpm_tty's NULLness instead.
13513         (gpm_tty): Change its type.
13514         * term.c (term_gpm): Delete.  Use gpm_tty's NULLness instead.
13515         (gpm_tty): Change its type and initialize it.
13516         (Fterm_open_connection): Check the frame is indeed a tty.
13517         Use the new gpm_tty.
13518         (Fterm_close_connection): Use the new gpm_tty.
13519         * keyboard.c (tty_read_avail_input): Use the new gpm_tty.
13520         * sysdep.c (init_sys_modes): term_gpm -> gpm_tty.
13522 2007-09-21  Juanma Barranquero  <lekktu@gmail.com>
13524         * w32term.c (x_draw_glyph_string): Use strike_through_color, not
13525         underline_color, to draw strike-through.
13527 2007-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
13529         * lisp.h (allocate_terminal): Declare.
13531         * window.c (candidate_window_p): Consider frames that are being placed
13532         by the user as somewhere between visible and iconified.
13533         (window_loop): Prefer windows on the current frame.
13534         (Fselect_window): Move the use of select-frame to the beginning so we
13535         can just delegate all the work (it'll call us back anyway).
13537         * frame.c (Qdisplay_environment_variable):
13538         * frame.h (Qdisplay_environment_variable): Delete.
13540         * .gdbinit (xbacktrace): Print the arg's address rather than the value
13541         of the first arg, since that value may be a union.
13543         * callproc.c (child_setup, getenv_internal): Use the frame's `display'
13544         parameter rather than Qdisplay_environment_variable.  If all else
13545         fails, look for DISPLAY in initial-environment.
13547 2007-09-21  Glenn Morris  <rgm@gnu.org>
13549         * Makefile.in (emacstool): Remove target.
13550         (lisp, shortlisp): Remove termdev.elc.
13552 2007-09-21  Markus Triska  <markus.triska@gmx.at>
13554         * xterm.c (x_delete_display): Compile session management conditionally.
13556 2007-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
13558         * callproc.c (getenv_internal_1): New function.
13559         (getenv_internal): Use it.
13560         (Fgetenv_internal): Use it.  Accept an env-list as optional arg.
13562         * terminal.c (get_terminal): Don't accept ints to represent terminals.
13563         (Fterminal_name, Fterminal_parameters, Fterminal_parameter)
13564         (Fset_terminal_parameter): Work with dead terminals as well.
13565         (Fmodify_terminal_parameters): Remove.
13567         * terminal.c (get_terminal): Handle terminals.
13568         Make sure the terminal returned is live.
13569         (create_terminal): Use allocate_terminal.
13570         (mark_terminals): Move to alloc.c.
13571         (delete_terminal): Use terminal->name as liveness status.
13572         NULL out fields after freeing their contents.
13573         Don't deallocate the object.
13574         (Fframe_terminal): Use FRAME_TERMINAL.  Return the terminal object
13575         rather than an int.
13576         (Fterminal_live_p): Accept non-integer arguments.
13577         (Fterminal_list): Return terminal objects rather than an ints.
13579         * alloc.c (enum mem_type): New member for `terminal' objects.
13580         (allocate_terminal): New function.
13581         (mark_maybe_pointer, valid_lisp_object_p, mark_object):
13582         Handle terminals.
13583         (mark_terminal): New fun.
13584         (mark_terminals): Move from terminal.c.
13586         * term.c (get_tty_terminal): Don't treat output_initial specially.
13587         (Fsuspend_tty, Fresume_tty): Use terminal objects rather than ints.
13588         (delete_tty): Use terminal->name as liveness status.
13590         * termhooks.h (struct terminal): Make it into a pseudovector.
13591         Remove `deleted' replaced by checking `name's nullness.
13593         * print.c (print_object): Handle terminals.
13595         * lisp.h (enum pvec_type): New `terminal' pseudovector.
13596         (XTERMINAL, XSETTERMINAL, TERMINALP, GC_TERMINALP): New macros.
13598         * frame.c (make_terminal_frame):
13599         * keyboard.c (tty_read_avail_input):
13600         * w32term.c (x_delete_terminal):
13601         * xfns.c (Fx_create_frame, x_create_tip_frame):
13602         * xterm.c (x_delete_terminal): Use terminal->name as liveness status.
13604 2007-09-20  Glenn Morris  <rgm@gnu.org>
13606         * process.c (Fmake_network_process): Doc fix.
13608 2007-09-19  Jason Rumney  <jasonr@gnu.org>
13610         * dispextern.h (w32_init_fringe, mac_init_fringe): Declare rif argument.
13612 2007-09-19  Michaël Cadilhac  <michael@cadilhac.name>
13614         * coding.c (detect_eol_type, detect_eol_type_in_2_octet_form):
13615         Fix a C warning regarding variable constness.
13617         * xterm.c (handle_one_xevent): Fix a C warning.
13619 2007-09-18  Jason Rumney  <jasonr@gnu.org>
13621         * w32fns.c (Fx_focus_frame): Rename from Fw32_focus_frame.
13623 2007-09-17  Jan Djärv  <jan.h.d@swipnet.se>
13625         * gtkutil.c (gdpy_def): New variable.
13626         (xg_initialize): Initialize gdpy_def.
13627         (xg_display_close): If no other display exists, set gdpy_def to a
13628         new connection.
13630 2007-09-16  Jan Djärv  <jan.h.d@swipnet.se>
13632         * gtkutil.c (xg_get_image_for_pixmap): Always create a GdkPixbuf
13633         when we have no file name for the icon.
13634         (xg_tool_bar_expose_callback): Remove.
13635         (xg_create_tool_bar): Don't connect expose signal to
13636         xg_tool_bar_expose_callback.
13637         (xg_get_file_with_chooser): Move GCPRO1 after declarations.
13639 2007-09-16  Andreas Schwab  <schwab@suse.de>
13641         * alloc.c (reset_malloc_hooks): Set the hooks to the previous
13642         values instead of zapping them.
13644 2007-09-14  Glenn Morris  <rgm@gnu.org>
13646         * fringe.c (init_fringe_bitmap) <swap_nibble>: Move to file scope.
13647         * gtkutil.c (xg_separator_p) <separator_names>: Move to file scope.
13648         * image.c (our_memory_fill_input_buffer) <buffer>: Move to file
13649         scope and rename to omfib_buffer for clarity.
13650         (gif_load) <interlace_start, interlace_increment>: Move to file scope.
13652 2007-09-14  Kenichi Handa  <handa@m17n.org>
13654         * xterm.c (handle_one_xevent): Skip decoding if nbytes is zero.
13656 2007-09-13  Jason Rumney  <jasonr@gnu.org>
13658         * fringe.c (w32_init_fringe, mac_init_fringe): Add rif argument.
13660         * w32term.c (w32_term_init): Pass rif to w32_init_fringe.
13662         * macterm.c (mac_initialize): Don't call mac_init_fringe here.
13663         (mac_term_init): Call here instead, passing rif.
13665 2007-09-13  Glenn Morris  <rgm@gnu.org>
13667         * s/hpux.h: No longer define `static' as nothing.
13669 2007-09-13  Johan Bockgård  <bojohan@gnu.org>
13671         * callint.c (Fcall_interactively): Remove unused var `fun'.
13673 2007-09-12  Romain Francoise  <romain@orebokech.com>
13675         * window.c (prefer_window_split_horizontally, display_buffer):
13676         Revert 2007-09-08 change.
13678 2007-09-12  Glenn Morris  <rgm@gnu.org>
13680         * alloca.c: Remove file.
13681         * Makefile.in (alloca): Do not undef.
13682         (allocaobj, alloca.o): Remove.
13683         (otherobj): Remove allocaobj.
13684         * keyboard.c (command_loop_1): Remove #ifdef C_ALLOCA block.
13685         * regex.c (C_ALLOCA): Remove all references and code that was only
13686         used when this was defined.
13687         * search.c (boyer_moore): Remove #ifdef C_ALLOCA block.
13688         * xmenu.c (xmenu_show): Remove #ifdef C_ALLOCA block.
13689         * m/ibms390x.h, m/sh3el.h (C_ALLOCA): Remove references to this.
13691         * Makefile.in (SOURCES, unlock, relock): Delete.
13693         * gtkutil.c (cnt): Rename to menu_grab_callback_cnt for clarity.
13694         (menu_grab_callback): All uses changed.
13696         * xselect.c (cnt): Rename to x_reply_selection_request_cnt for clarity.
13697         (x_reply_selection_request): All uses changed.
13699 2007-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>
13701         * lread.c (load_warn_old_style_backquotes): Change message to look
13702         better when it appears in the middle of byte-compiler messages.
13704 2007-09-10  Dan Nicolaescu  <dann@ics.uci.edu>
13706         * s/darwin.h (MULTI_KBOARD): Only define for Carbon.
13708         * xterm.c (x_create_terminal): Add comment.
13710         * term.c (clear_tty_hooks, set_tty_hooks): Add comments.
13712 2007-09-10  Richard Stallman  <rms@gnu.org>
13714         * xterm.c (x_term_init): Give error if can't open DISPLAY_NAME.
13716 2007-09-10  Michaël Cadilhac  <michael@cadilhac.name>
13718         * lisp.h (struct Lisp_Subr): Rename `prompt' field to `intspec'.
13719         (DEFUN): Document `intspec', use it instead of `prompt'.
13721         * eval.c (Fcommandp): Change `->prompt' to `->intspec'.
13723         * data.c (Finteractive_form): If the interactive specification starts
13724         with a `(', use it as a Lisp form.
13726         * fileio.c (Fset_file_modes): Add an interactive spec that reads a file
13727         name and file modes.
13729         * callint.c (Fcall_interactively): Comment fixes.
13731 2007-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
13733         * callint.c (Fcall_interactively): Use Finteractive_form also for subrs
13734         and compiled functions.
13736 2007-09-08  Fredrik Axelsson  <f.axelsson@gmail.com>
13738         * window.c (prefer_window_split_horizontally): New variable.
13739         (display_buffer): Consider splitting window horizontally depending
13740         on prefer_window_split_horizontally.
13742 2007-09-08  Eli Zaretskii  <eliz@gnu.org>
13744         * sysdep.c [WINDOWSNT]: Don't include sysselect.h.
13746 2007-09-07  Stefan Monnier  <monnier@iro.umontreal.ca>
13748         * s/cygwin.h (GC_MARK_STACK): Enable conservative stack marking.
13750         * frame.c (x_set_frame_parameters): Check number is positive before
13751         using XFASTINT.
13753         * window.c (freeze_window_start): Don't presume selected_window holds
13754         a window object.
13755         (Fdisplay_buffer): Remove `register' since `buffer' needs to be gcpro'd.
13757 2007-09-07  Angelo Graziosi  <Angelo.Graziosi@roma1.infn.it>  (tiny change)
13759         * term.c (dissociate_if_controlling_tty): Call setsid on CYGWIN.
13761 2007-09-07  Stefan Monnier  <monnier@iro.umontreal.ca>
13763         * window.c (Vsplit_window_preferred_function): New var.
13764         (Fdisplay_buffer): Use it.
13765         (syms_of_window): Export, and initialize it.
13767 2007-09-06  Pixel  <pixel@mandriva.com>  (tiny change)
13769         * image.c (gif_load): Fix bug: Handle nonexistent colormap.
13771 2007-09-06  Glenn Morris  <rgm@gnu.org>
13773         * gtkutil.c (menu_grab_callback) <cnt>:
13774         * xselect.c (x_reply_selection_request) <cnt>: Move static
13775         variable to file scope.
13777 2007-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
13779         * xdisp.c (redisplay_internal): Make sure Elisp code always sees
13780         consistent values of selected_frame and selected_window.
13782 2007-09-04  Jason Rumney  <jasonr@gnu.org>
13784         * w32console.c (initialize_w32_display): Zero unused hooks.
13786 2007-09-04  Dan Nicolaescu  <dann@ics.uci.edu>
13788         * term.c (Vsuspend_tty_functions, Vresume_tty_functions)
13789         (syms_of_term, Fsuspend_tty, Fresume_tty): Undo previous change.
13791 2007-09-04  Jason Rumney  <jasonr@gnu.org>
13793         * term.c (init_tty) [WINDOWSNT]: Add hooks that are not accessible
13794         in w32console.c.  Set up input.  Remove XXX comments that have been
13795         confirmed as correct.
13797         * s/ms-w32.h (MULTI_KBOARD): Define.
13799         * w32console.c (one_and_only_w32cons): Remove.
13800         (initialize_w32_display): Take terminal argument.
13802         * term.c (init_tty) [WINDOWSNT]: Pass terminal to
13803         initialize_w32_display.
13804         (init_tty) [MULTI_KBOARD]: Include this code on WINDOWSNT too.
13806         * termhooks.h (enum event_kind) <HORIZ_WHEEL_EVENT>: New event.
13808         * keyboard.c (discard_mouse_events): Discard it.
13809         (make_lispy_event): Translate it to a lisp event.
13810         (lispy_wheel_names): Add wheel-left and right events.
13811         (syms_of_keyboard): Enlarge wheel_syms.
13813         * w32fns.c (w32_wnd_proc) <WM_DROPFILES>: Merge with WM_MOUSEWHEEL.
13814         <WM_MOUSEHWHEEL>: Pass new system message to lisp.
13816         * w32term.h (WM_MOUSEHWHEEL): Define if system headers don't.
13818         * w32term.c (construct_mouse_wheel): Make HORIZ_WHEEL_EVENT
13819         from WM_MOUSEHWHEEL.
13820         (w32_read_socket) <WM_MOUSEHWHEEL>: Treat as WM_MOUSEWHEEL.
13822         * w32fns.c (x_create_tip_frame) [MULTI_KBOARD]: Get keyboard from
13823         terminal.
13825         * w32term.c (w32_create_terminal) [MULTI_KBOARD]: Create a new
13826         keyboard for the terminal.
13828 2007-09-04  Dan Nicolaescu  <dann@ics.uci.edu>
13830         * term.c (Vsuspend_tty_hook): Rename from Vsuspend_tty_functions.
13831         (Vresume_tty_hook): Rename from Vresume_tty_functions.
13832         (syms_of_term): Rename suspend-tty-functions to suspend-tty-hook
13833         and resume-tty-function to resume-tty-hook.
13834         (Fsuspend_tty, Fresume_tty): Use new names.
13836 2007-09-02  Jan Djärv  <jan.h.d@swipnet.se>
13838         * gtkutil.c (update_frame_tool_bar): Handle stock name as a named icon
13839         if it starts with "n:".
13841 2007-08-31  Jan Djärv  <jan.h.d@swipnet.se>
13843         * gtkutil.c (update_frame_tool_bar): Initialize wbutton to NULL.
13845 2007-08-31  Stefan Monnier  <monnier@iro.umontreal.ca>
13847         * frame.h:
13848         * frame.c (Qterm_environment_variable): Remove.
13849         (syms_of_frame): Don't init and staticpro it.
13851         * callproc.c (getenv_internal): Remove special case for $TERM.
13853         * callproc.c (Vinitial_environment): New variable.
13854         (set_initial_environment): Initialize it.
13855         (syms_of_callproc): Declare it.
13856         (child_setup): Don't mess with TERM via Qterm_environment_variable; the
13857         TERM under which a process runs is never related to the TERM in which
13858         Emacs is running.
13860 2007-08-29  Dan Nicolaescu  <dann@ics.uci.edu>
13862         * config.in (HAVE_WINDOW_SYSTEM): Don't undef MULTI_KBOARD here...
13863         * s/darwin.h: ... do it here.
13865 2007-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
13867         * lisp.h (set_initial_environment): Rename from set_global_environment.
13869         * Makefile.in (${etc}DOC): Re-add a ${EXEEXT} which seems to have been
13870         removed by mistake on the multi-tty branch.
13872         * frame.c (make_terminal_frame): Yet Another Int/Lisp_Object Mixup.
13873         (Fmodify_frame_parameters): Return a value.
13875         * image.c (png_load): Comment-out var only used in commented-out code.
13877         * term.c (mark_ttys): Don't bother checking top_frame (incorrectly)
13878         before passing it to mark_object.
13880         * xfaces.c (internal_resolve_face_name): Return a value.
13881         (internal_resolve_face_name, resolve_face_name_error): Comment out.
13883         * xfns.c (check_x_display_info): Yet Another Int/Lisp_Object Mixup.
13884         (x_icon): Comment-out var only used in commented-out code.
13886 2007-08-29  Romain Francoise  <romain@orebokech.com>
13888         * keyboard.c (Fset_input_mode): Don't call `Fset_quit_char' if
13889         QUIT hasn't been provided.
13891 2007-08-29  Dan Nicolaescu  <dann@ics.uci.edu>
13893         * callproc.c (child_setup, getenv_internal): Use the
13894         display-environment-variable and term-environment-variable frame params.
13895         (set_initial_environment): Initialise Vprocess_environment.
13897         * config.in: Disable multi-keyboard support on a mac.
13899         * frame.c (Qterm_environment_variable)
13900         (Qdisplay_environment_variable): New variables.
13901         (syms_of_frame): Intern and staticpro them.
13902         (Fmake_terminal_frame): Disable output method test.
13904         * frame.h: Declare them here.
13906         * macfns.c (x_set_mouse_color): Get rif from the frame.
13907         (x_set_tool_bar_lines): Don't use updating_frame.
13908         (mac_window): Add 2 new parameters for consistency with other systems.
13909         (Fx_create_frame): Fix doc string.  Rename the parameter.  Set the
13910         frame parameters following what is done in X11 and w32.  Don't use
13911         FRAME_MAC_DISPLAY_INFO.
13912         (Fx_open_connection, start_hourglass): Remove window-system check.
13913         (x_create_tip_frame): Get the keyboard from the terminal.
13915         * macmenu.c: Reorder includes.
13916         (Fx_popup_menu): Use terminal specific mouse_position_hook.
13918         * macterm.c (XTset_terminal_modes, XTreset_terminal_modes): Add a
13919         terminal parameter.
13920         (x_clear_frame): Add a frame parameter.
13921         (note_mouse_movement): Get rif from the frame.
13922         (mac_term_init): Initialize the terminal.
13923         (mac_initialize): Make static and move terminal initialization ...
13924         (mac_create_terminal): ... to this new function.
13926         * macterm.h (struct mac_display_info): Add terminal.
13927         (mac_initialize): Delete declaration.
13929         * puresize.h (BASE_PURESIZE): Increase base value to 1164000.
13931         * sysdep.c: Comment out text after #endif.
13933         * term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD
13934         is defined.  Better initialize ttys in windows.  Use terminal
13935         specific mouse_position_hook.
13937         * termhooks.h (union display_info): Add mac_display_info.
13939         * w32fns.c (Fx_create_frame): Use kboard from the terminal.
13940         Set the default minibuffer frame, window_system and the rest of the
13941         frame parameters following what is done in X11.
13943         * w32term.c (w32_initialize): Make static.
13945         * xselect.c (x_handle_selection_clear): Only access
13946         terminal->kboard when MULTI_KBOARD is defined.
13948         * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here.
13949         (SYSTEM_PURESIZE_EXTRA): Only define on Carbon.
13951 2007-08-29  Jason Rumney  <jasonr@gnu.org>
13953         * frame.c (Fdelete_frame): Only get kboard when MULTI_KBOARD defined.
13954         (make_terminal_frame) [WINDOWSNT]: Initialize terminal.
13956         * fringe.c (w32_init_fringe w32_reset_fringes) [HAVE_NTGUI]:
13957         (mac_init_fringe) [MAC_OS]: Get rif from selected_frame.
13959         * keyboard.c (restore_kboard_configuration): Only define when
13960         MULTI_KBOARD defined.
13962         * makefile.w32-in: Update dependancies from Makefile.in.
13963         (OBJ1): Add terminal.$(O)
13965         * term.c (dissociate_if_controlling_tty) [WINDOWSNT]:
13966         Don't define function body.
13967         (init_tty) [WINDOWSNT]: Use selected_frame for initializing.
13969         * termhooks.h (display_info) [WINDOWSNT]: Add w32.
13971         * w32.c (request_sigio, unrequest_sigio): Remove.
13973         * w32console.c (w32con_move_cursor, w32con_clear_to_end)
13974         (w32con_clear_frame, w32con_clear_end_of_line)
13975         (w32con_ins_del_lines, w32con_insert_glyphs, w32con_write_glyphs)
13976         (w32con_delete_glyphs, w32con_set_terminal_window)
13977         (scroll_line, w32_sys_ring_bell): Add frame arg.
13978         (w32con_set_terminal_modes, w32con_reset_terminal_modes):
13979         Add terminal arg.
13980         (PICK_FRAME): Remove.
13981         (w32con_write_glyphs): Use frame specific terminal coding.
13982         (one_and_only_w32cons): New global variable.
13983         (initialize_w32_display): Use it for storing hooks.
13984         (create_w32cons_output): New function.
13986         * w32inevt.c, w32inevt.h (w32_console_read_socket): Make first
13987         arg a frame.
13989         * w32fns.c (x_create_tip_frame): Set terminal and ref count.
13990         Set window_system.
13991         (x_set_tool_bar_lines): Don't use updating_frame.
13992         (Fx_create_frame): Set terminal and ref count.
13993         (Fx_open_connection): Remove window-system check.
13995         * w32menu.c (Fx_popup_menu): Use terminal specific mouse_position_hook.
13997         * w32term.c (w32_term_init): Call add_keyboard_wait_descriptor.
13998         (w32_set_terminal_modes, w32_reset_terminal_modes): Add terminal arg.
13999         (x_clear_frame, x_delete_glyphs, w32_ring_bell, x_ins_del_lines):
14000         Add frame arg.
14001         (x_delete_terminal, w32_create_terminal): New functions.
14002         (w32_term_init): Create a terminal.
14003         (w32_initialize): Move terminal specific initialization to
14004         w32_create_terminal.
14006         * w32term.h (x_output): Remove foreground_pixel and background_pixel.
14007         (w32_clear_rect, w32_clear_area): Use background from frame.
14008         (w32_display_info): Add terminal.
14009         (w32_sys_ring_bell, x_delete_display): Declare here.
14011         * xdisp.c (display_menu_bar) [HAVE_NTGUI]: Check frame type.
14013         * s/ms-w32.h (SYSTEM_PURESIZE_EXTRA): Bump to 50k.
14015 2007-08-29  Kalle Olavi Niemitalo  <kon@iki.fi>  (tiny change)
14017         * keyboard.c (interrupt_signal, handle_interrupt, Fset_quit_char):
14018         Fix get_named_tty calls for the controlling tty.
14020 2007-08-29  ARISAWA Akihiro  <ari@mbf.ocn.ne.jp>  (tiny change)
14022         * term.c (dissociate_if_controlling_tty)[USG]: Fix parse error.
14024 2007-08-29  Yoshiaki Kasahara  <kasahara@nc.kyushu-u.ac.jp>  (tiny change)
14026         * term.c (tty_insert_glyphs): Add missing first parameter.
14028 2007-08-29  Károly Lőrentey  <karoly@lorentey.hu>
14030         * buffer.c (Fbuffer_list, Fbury_buffer):
14031         Take frame->buried_buffer_list into account.
14033         * cm.c (current_tty): New variable, for cmputc().
14034         (cmputc): Use it.
14035         (cmcheckmagic): Add tty parameter, look up terminal streams there.
14036         (calccost): Add tty parameter.  Use emacs_tputs() instead of tputs().
14037         (cmgoto): Add tty parameter.  Pass it on to calccost().
14038         Use emacs_tputs() instead of tputs().
14040         * cm.h (emacs_tputs): New macro to set current_tty, and then call
14041         tputs().
14042         (current_tty): New variable, for cmputc().
14043         (cmcheckmagic, cmputc, cmgoto): Add prototypes.
14045         * eval.c (unwind_to_catch): Don't call x_fully_uncatch_errors.
14046         (internal_condition_case, internal_condition_case_1)
14047         (internal_condition_case_2): Don't abort when x_catching_errors.
14049         * fns.c (Fyes_or_no_p): Don't try to open an X dialog on tty terminals.
14050         (Fy_or_n_p): Likewise.  Use temporarily_switch_to_single_kboard to
14051         prevent crashes caused by bogus longjmps in read_char.
14053         * keymap.h (Fset_keymap_parent): Add EXFUN.
14055         * macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL)
14056         * w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL):
14057         Remove redundant definition.
14059         * macfns.c (x_set_mouse_color, x_make_gc):
14060         Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14062         * w32term.c (x_free_frame_resources):
14063         Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14064         (w32_initialize): Use the accessor macros for terminal characteristics.
14066         * macterm.c (mac_initialize): Use Fset_input_interrupt_mode.
14067         Use the accessor macros for terminal characteristics.
14068         * msdos.c (internal_terminal_init): Use the accessor macros for
14069         terminal characteristics.
14070         (ScreenVisualBell, internal_terminal_init):
14071         Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14073         * termopts.h (no_redraw_on_reenter): Declare.
14075         * alloc.c (emacs_blocked_malloc): Disable mallopt call.
14076         (mark_terminals, mark_ttys): Declare.
14077         (Fgarbage_collect): Call them.
14078         (mark_object): Mark buried_buffer_list.
14080         * prefix-args.c: Include stdlib.h for exit.
14082         * syssignal.h: Add comment.
14084         * indent.c: Include stdio.h.
14086         * window.h (Vinitial_window_system): Declare.
14087         (Vwindow_system): Delete declaration.
14089         * fontset.c (Finternal_char_font): Use FRAME_RIF.
14091         * image.c (lookup_image): Don't initialize `c' until the xasserts
14092         have been run.
14094         * gtkutil.c (xg_create_frame_widgets): Use FRAME_BACKGROUND_PIXEL and
14095         FRAME_FOREGROUND_PIXEL.
14097         * print.c (print_preprocess): Don't lose print_depth levels while
14098         iterating.
14100         * widget.c (update_from_various_frame_slots):
14101         Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14103         * window.c (set_window_buffer): Don't call clear_mouse_face on tty
14104         frames.
14105         (window_internal_height): Remove bogus make_number call.
14106         (init_window_once): Call make_terminal_frame with two zero parameters.
14108         * fileio.c (Fread_file_name): Update comment.
14110         * callint.c (Fcall_interactively):
14111         Use temporarily_switch_to_single_kboard instead of single_kboard_state.
14112         Make sure it is correctly unwound.
14114         * xsmfns.c (x_session_close): New function.
14116         * coding.h (terminal_coding, safe_terminal_coding, keyboard_coding):
14117         Delete declarations.
14119         * xterm.h: Remove declaration for x_fully_uncatch_errors.
14120         (x_output): Remove background_pixel and foreground_pixel fields.
14121         (x_display_info): Add new field TERMINAL.  Remove KBOARD field.
14122         (x_delete_device, x_session_close): Declare.
14124         * lread.c: Include setjmp.h.  Update declaration of `read_char'.
14125         (read_filtered_event): Call `read_char' with a local
14126         `wrong_kboard_jmpbuf'.
14128         * minibuf.c (read_minibuf): Call temporarily_switch_to_single_kboard.
14129         Don't call single_kboard_state.  Use FRAME_RIF.
14131         * process.c (Fmake_network_process): Don't unrequest_sigio on modern
14132         systems.
14134         * lisp.h (set_process_environment): Rename to `set_global_environment'.
14135         (Fframe_with_environment, Fset_input_meta_mode)
14136         (Fset_quit_char): EXFUN.
14137         (x_create_device, tty_output, terminal, tty_display_info): Declare.
14138         (init_sys_modes, reset_sys_modes): Update prototypes.
14139         (init_all_sys_modes, reset_all_sys_modes): New prototypes.
14141         * keyboard.h (struct kboard): Add new fields Vlocal_function_key_map,
14142         Vlocal_key_translation_map, and Vkeyboard_translate_table.
14143         (Vfunction_key_map, Vkeyboard_translate_table, single_kboard_state):
14144         Delete declarations.
14145         (Vfunction_key_map, Vkey_translation_map, push_kboard, pop_kboard)
14146         (temporarily_switch_to_single_kboard, tty_read_avail_input):
14147         New declarations.
14149         * emacs.c (main): Don't call init_sys_modes(), the new term_init()
14150         already does that during init_display().  Call syms_of_keymap
14151         before syms_of_keyboard.  Call `syms_of_terminal'.
14152         Call set_initial_environment, not set_process_environment.
14153         (shut_down_emacs): Call reset_all_sys_modes() instead of
14154         reset_sys_modes().
14156         * xfaces.c (x_free_gc): Protect xassert with GLYPH_DEBUG.
14157         (internal_resolve_face_name, resolve_face_name_error): New functions.
14158         (resolve_face_name): Protect against loops and errors thrown by Fget.
14159         (realize_default_face): Don't use FRAME_FONT unless frame is an X frame.
14160         (Ftty_supports_face_attributes_p): Update tty_capable_p call.
14162         * scroll.c: Replace CURTTY() with local variables throughout the
14163         file (where applicable).
14164         (calculate_scrolling, calculate_direct_scrolling)
14165         (scrolling_1, scroll_cost): Use the accessor macros for terminal
14166         characteristics.
14168         * keymap.c (Vfunction_key_map): Remove.
14169         (Fdescribe_buffer_bindings): Update references to Vfunction_key_map.
14170         (syms_of_keymap): Remove DEFVAR for Vfunction_key_map.
14171         (Vkey_translation_map): Remove.
14172         (syms_of_keymap): Remove DEFVAR for key-translation-map.
14173         (Fdescribe_buffer_bindings)
14174         (read_key_sequence, init_kboard, syms_of_keyboard, mark_kboards):
14175         Update for terminal-local key-translation-map.
14177         * Makefile.in (callproc.o): Update dependencies.
14178         (lisp, shortlisp): Add termdev.elc.
14179         (obj): Add terminal.o.
14180         (terminal.o): Add dependencies.
14181         [HAVE_CARBON]: Make terminal.o depend on macgui.h.
14182         (data.o, fns.o): Add termhooks.h dependency.
14183         (SOME_MACHINE_LISP): Add dnd.elc.
14184         (minibuf.o): Fix typo.
14185         Update dependencies.
14187         * data.c (do_symval_forwarding, store_symval_forwarding)
14188         (find_symbol_value): Use the selected frame's keyboard, not
14189         current_kboard.
14191         * .gdbinit (init_sys_modes): Use Vinitial_window_system instead of
14192         Vwindow_system.
14194         * xmenu.c (Fx_menu_bar_open) [USE_X_TOOLKIT, USE_GTK]: Rename from
14195         Fmenu_bar_open.
14196         (syms_of_xmenu): Update defsubr.
14197         (mouse_position_for_popup, Fx_popup_menu)
14198         (Fx_popup_dialog, x_activate_menubar, update_frame_menubar)
14199         (set_frame_menubar, free_frame_menubar)
14200         (create_and_show_popup_menu, xmenu_show, )
14201         (create_and_show_dialog, xdialog_show, xmenu_show): Abort if not
14202         an X frame.
14204         * xselect.c (x_own_selection): Abort if not an X frame.
14205         (some_frame_on_display): Check if it is an X frame.
14206         (x_handle_selection_clear): Deal with MULTI_KBOARD.
14208         * coding.c: Include frame.h and termhooks.h.
14209         (terminal_coding, keyboard_coding): Delete.
14210         (Fset_terminal_coding_system_internal)
14211         (Fset_keyboard_coding_system_internal)
14212         (Fkeyboard_coding_system)
14213         (Fterminal_coding_system): Add a terminal parameter.
14214         Get terminal_coding from the terminal.
14215         (init_coding_once): Don't call setup_coding_system here.
14217         * dispextern.h (set_scroll_region, turn_off_insert)
14218         (turn_off_highlight, background_highlight, clear_end_of_line_raw)
14219         (tty_clear_end_of_line, tty_setup_colors)
14220         (delete_tty, updating_frame)
14221         (produce_special_glyphs, produce_glyphs, write_glyphs)
14222         (insert_glyphs): Remove.
14223         (raw_cursor_to, clear_to_end, tty_turn_off_insert)
14224         (tty_turn_off_highlight, get_tty_size): Add declaration.
14225         (tabs_safe_p, init_baud_rate, get_tty_terminal): Update prototypes.
14227         * frame.h (enum output_method): Add output_initial.
14228         (struct x_output): Delete.
14229         (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL):
14230         Access foreground_pixel and background_pixel directly from the frame.
14231         (tty_display): Delete.
14232         (struct frame): Add buried_buffer_list, foreground_pixel,
14233         background_pixel and terminal.  Delete kboard.
14234         (union output_data): Add tty.
14235         (FRAME_KBOARD): Get the kboard from the terminal.
14236         (FRAME_INITIAL_P): New macro.
14237         (Qtty, Qtty_type, Qterminal, Qterminal_live_p, Qenvironment)
14238         (Qterm_environment_variable, Qdisplay_environment_variable)
14239         (make_terminal_frame, Qburied_buffer_list, Qwindow_system):
14240         New declarations.
14242         * termchar.h (tty_output, tty_display_info): New structures.
14243         (tty_list): Declare.
14244         (FRAME_TTY, CURTTY): New macros.
14245         (must_write_spaces, min_padding_speed, fast_clear_end_of_line)
14246         (line_ins_del_ok, char_ins_del_ok, scroll_region_ok)
14247         (scroll_region_cost, memory_below_frame, fast_clear_end_of_line)
14248         (dont_calculate_costs, no_redraw_on_reenter): Remove declarations.
14250         * callproc.c: Include frame.h and termhooks.h, for terminal
14251         parameters.
14252         (add_env): New function.
14253         (child_setup): Use it.
14254         (child_setup, getenv_internal): Handle the new Vprocess_environment.
14255         (getenv_internal): Fix get_terminal_param call.
14256         (Fgetenv_internal, egetenv): Update doc.
14257         (syms_of_callproc): Initialize Vprocess_environment to nil.
14258         Register and initialize them.  Remove obsolete defvars.  Update doc
14259         strings.
14260         (child_setup): Handle Vlocal_environment_variables.
14261         (getenv_internal): Add terminal parameter.
14262         Handle Vlocal_environment_variables.
14263         (Fgetenv_internal): Add terminal parameter.
14264         (child_setup, getenv_internal, Fgetenv_internal): Store the local
14265         environment in a frame (not terminal) parameter.  Update doc strings.
14266         (set_initial_environment): Rename from set_global_environment.
14267         Store Emacs environment in initial frame parameter.
14269         * xdisp.c (redisplay_internal): Update references to
14270         `previous_terminal_frame'.
14271         (display_mode_line, Fformat_mode_line): Replace calls to
14272         `push_frame_kboard' with `push_kboard'.
14273         (get_glyph_string_clip_rects): Add extra parentheses and
14274         braces to prevent compiler warnings.
14275         (calc_pixel_width_or_height): Add xassert to check that the
14276         frame is alive.  Don't call `lookup_image' on a termcap frame.
14277         (message2_nolog, message3_nolog, redisplay_internal)
14278         (set_vertical_scroll_bar, redisplay_window, check_x_display_info)
14279         (x_set_scroll_bar_foreground, x_set_scroll_bar_background)
14280         (Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
14281         (Fx_display_pixel_width, Fx_display_pixel_height)
14282         (Fx_display_planes, Fx_display_color_cells)
14283         (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
14284         (Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
14285         (Fx_display_backing_store, Fx_display_visual_class)
14286         (Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
14287         Use FRAME_TERMINAL_P, FRAME_WINDOW_P, FRAME_TTY and FRAME_RIF.
14289         * xfns.c (x_set_foreground_color x_set_background_color)
14290         (x_set_mouse_color, x_set_cursor_color, x_make_gc):
14291         Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14292         (Fx_create_frame, x_create_tip_frame, build_string, x_window)
14293         (Fx_create_frame, x_create_tip_frame): Don't create frames on a
14294         terminal that is being deleted.
14295         (Fx_create_frame): Use `store_frame_param' to set `window-system'
14296         frame parameter, and make sure it overrides any user-supplied setting.
14297         (Fx_close_connection, Fx_synchronize): Unify argument names with
14298         the rest of the DEFUNs.
14300         * dispnew.c (Fsend_string_to_terminal): Update call to
14301         `get_tty_terminal'.
14302         (Fredraw_frame, Fsend_string_to_terminal)
14303         (Fsend_string_to_terminal, init_display): Use FRAME_RIF,
14304         FRAME_TERMCAP_P and FRAME_TTY.
14305         (window_change_signal): Don't believe width/height values that are
14306         impossibly small.
14307         (Vinitial_window_system): Rename from Vwindow_system.
14308         (termscript, Wcm, rif): Delete.
14310         * termhooks.h (struct terminal): New struct containing the
14311         previously global text display hooks and new members NAME,
14312         DELETED and PARAM_ALIST.
14313         (FRAME_TERMINAL, TERMINAL_TERMINAL_CODING)
14314         (TERMINAL_KEYBOARD_CODING, TERMINAL_ACTIVE_P, FRAME_WINDOW_P)
14315         (FRAME_RIF): New macros.
14316         (get_terminal_param, get_device): New declarations.
14317         (termscript): Delete declaration.
14319         * xterm.c (x_initialize): Use Fset_input_interrupt_mode.
14320         (XTflash, x_free_frame_resources, x_scroll_bar_create)
14321         (x_scroll_bar_set_handle): Use FRAME_BACKGROUND_PIXEL and
14322         FRAME_FOREGROUND_PIXEL.
14323         (x_fully_uncatch_errors): Disable definition.
14324         (x_scroll_bar_expose): Fix reference to foreground pixel.
14325         (XTread_socket): Disable loop on all X displays.
14326         (x_delete_terminal): Don't set terminal->deleted and let
14327         delete_terminal delete the frames on the terminal.
14328         (x_delete_display): Doc update to reflect changes in
14329         delete_terminal.
14330         (x_display_info) <terminal>: Move member earlier in the struct.
14331         (deleting_tty): Remove old variable.
14332         (Fsuspend_tty): Call clear_tty_hooks.
14333         (Fresume_tty, init_tty): Call set_tty_hooks.
14334         (Ftty_display_color_p, Ftty_display_color_cells): Don't throw
14335         errors on X frames.
14336         (x_catch_errors_unwind): Abort if x_error_message is NULL.
14337         (handle_one_xevent): Initialize `f' to NULL.
14338         (x_delete_terminal, x_create_terminal): New functions.
14339         (XTset_terminal_modes, XTreset_terminal_modes)
14340         (XTread_socket, x_connection_closed, x_term_init)
14341         (x_term_init, x_delete_display): Add terminal parameter.
14342         (x_term_init) [!HAVE_GTK_MULTIDISPLAY]: Refuse to create secondary
14343         X connections.
14345         * frame.c: Include termchar.h.
14346         (Qterminal, Qterminal_live_p, Qburied_buffer_list, Qtty, Qtty_type)
14347         (Qwindow_system, Qenvironment, Qterm_environment_variable)
14348         (Qdisplay_environment_variable): New vars.
14349         (Fframep): Deal with output_initial.
14350         (Fframe-live-p): Doc fix.
14351         (Fwindow-system): New function.
14352         (x_set_screen_gamma, store_frame_param): Fix compilation errors.
14353         (make_terminal_frame): Don't create frames on a terminal that is
14354         being deleted.  Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
14355         (store_frame_param): Check for found_for_frame before calling XFRAME.
14356         (Fmake_terminal_frame): Handle NULL tty names correctly.
14357         (syms_of_frame): Enhance doc string of `default-frame-alist'.
14358         (Fdelete_frame): Remove unused variable `count'.  Don't allow other
14359         frames to refer to a deleted frame in their 'environment parameter.
14360         (Fframe_with_environment): New function.
14361         (syms_of_frame): Defsubr it.  Initialize and staticpro Qenvironment.
14362         (get_future_frame_param): New function.
14363         (Fmake_terminal_frame): Use it.
14364         (x_set_frame_parameters, x_set_screen_gamma): Use FRAME_RIF.
14366         * sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
14367         * sysdep.c (reset_sys_modes): Update for renames.
14369         * keyboard.c (tty_read_avail_input): New function.
14370         (Fset_input_interrupt_mode, Fset_output_flow_control): New functions.
14371         (syms_of_keyboard): Defsubr them.
14372         (Fset_input_meta_mode, Fset_quit_char): New functions.
14373         (Fset_input_mode): Split to above functions.
14374         (read_char_minibuf_menu_prompt): Add wrong_kboard_jmpbuf
14375         parameter.  Use it in call to `read_char'.
14376         (read_char): Declare.  Update call to `read_char_minibuf_menu_prompt'.
14377         Set wrong_kboard_jmpbuf correctly in recursive calls.
14378         Use current_kboard to access Vkeyboard_translate_table.
14379         Enhance comment before extra longjmp to wrong_kboard_jmpbuf.
14380         Add wrong_kboard_jmpbuf parameter to allow for recursive calls.
14381         Update longjmp invocations.  Remember the original current_kboard,
14382         and longjmp to `wrong_kboard_jmpbuf' when a filter, timer or sentinel
14383         changes it.  Comment out unnecessary calls to
14384         `record_single_kboard_state' and `any_kboard_state'.
14385         Update recursive calls.
14386         (wrong_kboard_jmpbuf): Remove global variable.
14387         (read_key_sequence): Remove unused variable wrong_kboard_jmpbuf.
14388         Handle deleted interrupted_kboards correctly; that is a legal
14389         case.  Add `wrong_kboard_jmpbuf' local variable.  Update setjmp
14390         and read_char calls.  Abort if interrupted_kboard died in read_char.
14391         (any_kboard_state, single_kboard_state)
14392         (push_frame_kboard): Remove function.
14393         (pop_kboard): Switch out of single_kboard mode if the kboard has
14394         been deleted.  Remove unused variable.  Help debugging by not
14395         changing current_kboard unnecessarily.  Set current_kboard to the
14396         kboard of the selected frame when the stored kboard object has
14397         been deleted before pop_kboard.
14398         (temporarily_switch_to_single_kboard): Change first parameter to a
14399         frame pointer.  Throw an error when caller wants to change kboards
14400         while in single_kboard mode.  Don't push_kboard if we weren't in
14401         single kboard state.  Don't pop_kboard if we popped into any
14402         kboard state.
14403         (restore_kboard_configuration): Abort if pop_kboard changed the
14404         kboard in single_kboard mode.  Call pop_kboard only after setting
14405         up single_kboard mode.
14406         (Frecursive_edit): Switch to single_kboard mode only in nested
14407         command loops.
14408         (cmd_error, command_loop, command_loop_1, timer_check):
14409         Comment out unnecessary call to `any_kboard_state' and
14410         `record_single_kboard_state'.
14411         (delete_kboard): Exit single_kboard mode if we have just deleted
14412         that kboard.  Use FRAME_KBOARD.
14413         (interrupt_signal): Use `Fkill_emacs' to exit Emacs, not
14414         `fatal_error_signal'.
14415         (record_single_kboard_state): Don't push_kboard if we weren't in
14416         single kboard state.  Don't pop_kboard if we popped into any
14417         kboard state.
14418         (push_frame_kboard): Rename to push_kboard.
14419         (kbd_buffer_get_event): Use FRAME_TERMINAL.
14420         (read_avail_input): Read input from all terminals.
14421         (mark_kboards): Also mark Vkeyboard_translate_table.
14422         (kbd_buffer_store_event_hold): Simplify condition.
14423         (read_key_sequence): Reinitialize fkey and keytran at each replay.
14424         (Vkeyboard_translate_table): Move to struct kboard.
14425         (init_kboard): Initialize Vkeyboard_translate_table.
14426         (syms_of_keyboard): Use DEFVAR_KBOARD to define
14427         Vkeyboard_translate_table.  Update doc strings.  Update docs of
14428         local-function-key-map and function-key-map.
14430         * terminal.c: New file.
14432         * term.c: Include errno.h.
14433         (Vring_bell_function, device_list, initial_device)
14434         (next_device_id, ring_bell, update_begin, update_end)
14435         (set_terminal_window, cursor_to, raw_cursor_to)
14436         (clear_to_end, clear_frame, clear_end_of_line)
14437         (write_glyphs, insert_glyphs, delete_glyphs, ins_del_lines)
14438         (Fdisplay_name, create_device, delete_device): Move to terminal.c.
14439         (syms_of_term): Move their initialization to terminal.c.
14440         (get_tty_terminal, Fdisplay_tty_type, Ftty_display_color_p)
14441         (Ftty_display_color_cells)
14442         (Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
14443         (clear_tty_hooks, set_tty_hooks)
14444         (init_tty, maybe_fatal): New functions.
14445         (Ftty_type): Return nil if terminal is not on a tty instead of
14446         throwing an error.  Doc update.
14447         (syms_of_term) <Vsuspend_tty_functions, Vresume_tty_functions>:
14448         Doc update.  Initialize new subrs and variables.
14449         (delete_tty): Use terminal->deleted.
14450         (tty_set_terminal_modes): Rename from set_terminal_modes.
14451         (tty_reset_terminal_modes): Rename from reset_terminal_modes.
14452         (set_scroll_region): Rename to `tty_set_scroll_region'.
14453         (turn_on_insert): Rename to `tty_turn_on_insert'.
14454         (turn_off_insert): Rename to `tty_turn_off_insert'.
14455         (turn_off_highlight): Rename to `tty_turn_off_highlight'.
14456         (turn_on_highlight): Rename to `tty_turn_on_highlight'.
14457         (toggle_highligh): Rename to `tty_toggle_highlight'.
14458         (background_highlight): Rename to `tty_background_highlight'.
14459         (highlight_if_desired): Rename to `tty_highlight_if_desired'.
14460         (tty_ring_bell, tty_update_end, tty_set_terminal_window)
14461         (tty_set_scroll_region, tty_background_highlight)
14462         (tty_cursor_to, tty_raw_cursor_to, tty_clear_to_end)
14463         (tty_clear_frame, tty_clear_end_of_line, tty_write_glyphs)
14464         (tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines)
14465         (term_get_fkeys, tty_setup_colors, dissociate_if_controlling_tty):
14466         Add static modifier.
14467         (tty_reset_terminal_modes, tty_set_terminal_window)
14468         (tty_set_scroll_region, tty_background_highlight)
14469         (tty_highlight_if_desired, tty_cursor_to)
14470         (tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame)
14471         (tty_clear_end_of_line, tty_write_glyphs, tty_insert_glyphs)
14472         (tty_delete_glyphs, tty_ins_del_lines, turn_on_face): Update for
14473         renames.
14475 2007-08-28  Jan Djärv  <jan.h.d@swipnet.se>
14477         * keyboard.c: Qrtl is new.
14478         (parse_tool_bar_item): Handle :rtl keyword.
14479         (syms_of_keyboard): Intern :rtl keyword.
14481         * dispextern.h (enum tool_bar_item_idx): Add TOOL_BAR_ITEM_RTL_IMAGE.
14483         * gtkutil.c (xg_tool_bar_expose_callback): Just do SET_FRAME_GARBAGED
14484         so no Lisp code is executed.
14485         (file_for_image, find_rtl_image): New functions.
14486         (xg_get_image_for_pixmap): Use file_for_image.
14487         (update_frame_tool_bar): If direction is RTL, use RTL image if
14488         defined.  Use Gtk stock images if defined.
14490 2007-08-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14492         * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle
14493         for nonexistent or zero-width glyph in composition glyph.
14495 2007-08-25  Stefan Monnier  <monnier@iro.umontreal.ca>
14497         * m/amdx86-64.h: Redirect to intel386.h if compiling for i386.
14499         * xdisp.c (Finvisible_p): New function.
14500         (syms_of_xdisp): defsubr it.
14502 2007-08-24  Juanma Barranquero  <lekktu@gmail.com>
14504         * image.c (syms_of_image) <image-library-alist, cross-disabled-images>:
14505         Doc fixes.
14507 2007-08-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14509         * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes.
14511 2007-08-24  Martin Rudalics  <rudalics@gmx.at>
14513         * fileio.c (Finsert_file_contents): Consult CHARS_MODIFF to tell
14514         whether decoding has modified buffer contents.
14516 2007-08-24  Jason Rumney  <jasonr@gnu.org>
14518         * image.c [HAVE_NTGUI]: Define dynamic loaded functions for SVG.
14519         (Qgdk_pixbuf, Qglib) [HAVE_NTGUI]: New symbols.
14520         (syms_of_image) [HAVE_NTGUI]: Intern and staticpro them.
14521         (init_svg_functions) [HAVE_NTGUI]: New function.
14522         (fn_g_type_init, fn_g_object_unref, fn_g_error_free): New #defines.
14523         (svg_load_image): Use them.
14524         (svg_load_image) [HAVE_NTGUI]: Implement background.
14526 2007-08-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14528         * Makefile.in (RSVG_LIBS, RSVG_CFLAGS): New variables.
14529         (ALL_CFLAGS): Use ${RSVG_CFLAGS} instead of @RSVG_CFLAGS@.
14530         (LIBX): Remove @RSVG_LIBS@.
14531         (LIBES): Add $(RSVG_LIBS).
14533         * image.c (svg_load_image): Blend with specified background if exists.
14534         Use IMAGE_BACKGROUND.  Add Mac OS Support.
14536         * mac.c (wakeup_from_rne_enabled_p) [MAC_OSX]: Remove variable.
14537         (ENABLE_WAKEUP_FROM_RNE, DISABLE_WAKEUP_FROM_RNE) [MAC_OSX]:
14538         Remove macros.
14539         [MAC_OSX] (socket_callback): Do nothing.
14540         [MAC_OSX] (select_and_poll_event): Use CFRunLoopRunInMode instead of
14541         ReceiveNextEvent.
14542         [MAC_OSX] (sys_select): Likewise.  Don't set context as argument to
14543         socket_callback.
14544         (mac_wakeup_from_rne) [MAC_OSX]: Do nothing.
14546 2007-08-22  Glenn Morris  <rgm@gnu.org>
14548         * image.c (x_find_image_file): Search in etc/images/ rather than etc/.
14550 2007-08-22  Paul Pogonyshev  <pogonyshev@gmx.net>
14552         * Makefile.in (ALL_CFLAGS, LIBX): Add RSVG_LIBS.
14554         * image.c: Add support for SVG images.  Some additional comments
14555         by Joakim Verona <joakim@verona.se>.  When HAVE_RSVG is defined:
14556         (svg_image_p): New function to test for SVG image.
14557         (svg_load): New function to load SVG image.
14558         (svg_load_image): New function, helper for svg_load.
14559         (Qsvg): New Lisp_object.
14560         (svg_keyword_index): New enum.
14561         (svg_format): New static `image_keyword' struct.
14562         (svg_type): New static `image_type' struct.
14563         (librsvg/rsvg.h): Include it.
14565 2007-08-23  Stefan Monnier  <monnier@iro.umontreal.ca>
14567         * lread.c (load_warn_old_style_backquotes): Fix up array size typo.
14569 2007-08-22  Stefan Monnier  <monnier@iro.umontreal.ca>
14571         * lread.c (Qold_style_backquotes): New var.
14572         (syms_of_lread): Init and staticpro it.
14573         (load_warn_old_style_backquotes): New fun.
14574         (Fload): Use them to warn about old style backquotes.
14575         (end_of_file_error, Fload): Remove unused vars.
14577         * lisp.h (Fclear_face_cache, Fx_send_client_event): Declare.
14579         * lread.c (Vold_style_backquotes): New var.
14580         (syms_of_lread): Init and export it to Elisp.
14581         (read1): Set it when we find an old-style (back)quote.
14583 2007-08-22  Jason Rumney  <jasonr@gnu.org>
14585         * w32reg.c (SYSTEM_DEFAULT_RESOURCES): Add missing NULL terminator.
14587 2007-08-22  Katsumi Yamaoka  <yamaoka@jpl.org>
14589         * puresize.h (BASE_PURESIZE): Increase to 1140000.
14591 2007-08-19  Richard Stallman  <rms@gnu.org>
14593         * eval.c (Ffunction, Fquote): Signal error if not 1 argument.
14595 2007-08-19  Andreas Schwab  <schwab@suse.de>
14597         * alloc.c (pure): Round PURESIZE up.
14599 2007-08-17  Jan Djärv  <jan.h.d@swipnet.se>
14601         * xterm.c (handle_one_xevent): Remove check that mouse click is in
14602         active frame.
14604 2007-08-16  Richard Stallman  <rms@gnu.org>
14606         * eval.c (Fcommandp): Add parens to clarify.
14608         * minibuf.c (Fall_completions): Use enum for type of table.
14610         * emacs.c (USAGE2): Improve text.
14612 2007-08-15  Philippe Waroquiers  <philippe.waroquiers@eurocontrol.int>
14614         * term.c (tty_default_color_capabilities): Declare static
14615         variables in file scope, to avoid HPUX compiler problem.
14617 2007-08-13  Jan Djärv  <jan.h.d@swipnet.se>
14619         * gtkutil.c (update_frame_tool_bar): Use -1 as index
14620         to gtk_toolbar_insert.
14622 2007-08-13  Stefan Monnier  <monnier@iro.umontreal.ca>
14624         * fileio.c (Finsert_file_contents): Yet Another Int/Lisp_Object Mixup.
14626         * insdel.c (reset_var_on_error): New fun.
14627         (signal_before_change, signal_after_change):
14628         Use it to reset (after|before)-change-functions to nil in case of error.
14629         Bind inhibit-modification-hooks to t.
14630         Don't bind (after|before)-change-functions to nil while they run.
14632 2007-08-11  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14634         * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when
14635         filling pixmap with stippled background.
14637 2007-08-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14639         * macterm.c [TARGET_API_MAC_CARBON] (mac_handle_window_event):
14640         Don't use invisible frame as parent window for repositioning.
14642 2007-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
14644         * print.c (new_backquote_output): Rename from old_backquote_output.
14645         (print): Inverse its logic (according to its name) so as to match the
14646         behavior of new_backquote_flag in lread.c.
14648 2007-08-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14650         * gmalloc.c (posix_memalign): New function.
14652         * macterm.c (frame_highlight, frame_unhighlight): Don't call
14653         ActivateControl/DeactivateControl here.
14654         [USE_MAC_TOOLBAR] (free_frame_tool_bar): Suppress animation when
14655         frame-notice-user-settings is non-nil.
14656         [USE_MAC_FONT_PANEL] (mac_handle_font_event): Also record parameter
14657         for kEventParamFMFontStyle.
14658         [TARGET_API_MAC_CARBON] (mac_handle_keyboard_event): Don't check
14659         mac_pass_command_to_system and mac_pass_control_to_system here.
14660         (XTread_socket): Call ActivateControl/DeactivateControl here.
14661         (XTread_socket) [TARGET_API_MAC_CARBON]:
14662         Check mac_pass_command_to_system and mac_pass_control_to_system here.
14663         (mac_handle_window_event) [USE_MAC_TOOLBAR]: Add further workaround
14664         for window repositioning.
14666 2007-08-08  Glenn Morris  <rgm@gnu.org>
14668         * Replace `iff' in doc-strings and comments.
14670 2007-08-07  Chong Yidong  <cyd@stupidchicken.com>
14672         * xdisp.c (move_it_by_lines): Remove incorrect optimization.
14674 2007-08-07  Martin Rudalics  <rudalics@gmx.at>
14676         * fileio.c (Finsert_file_contents): Run format-decode and
14677         after_insert_file_functions on entire buffer when REPLACE is
14678         non-nil and inhibit modification_hooks and point_motion_hooks.
14679         For consistency, run after_insert_file_functions iff something
14680         got inserted.  Move signal_after_change and update_compositions
14681         after code running after_insert_file_functions.  Make sure that
14682         undo_list doesn't record intermediate steps of the decoding process.
14684 2007-08-07  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14686         * emacs.c (main)
14687         [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14688         Call malloc_enable_thread on interactive startup.
14690         * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable.
14691         (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS)
14692         [USE_PTHREAD]: Conditionalize with it.
14693         (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
14694         (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]:
14695         New functions.
14697 2007-08-06  Chong Yidong  <cyd@stupidchicken.com>
14699         * xdisp.c (redisplay_window): When restoring original buffer
14700         position, make sure it is still valid.
14702         * image.c (png_load): Ignore png-supplied background color.
14704 2007-08-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14706         * mac.c [TARGET_API_MAC_CARBON] (cfdate_to_lisp): Obtain microsec value.
14707         Use kCFAbsoluteTimeIntervalSince1970.
14709         * macmenu.c (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]:
14710         New variable.
14711         [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Set it if dialog
14712         event loop should be quit.
14713         [TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]:
14714         Quit dialog event loop if quit_dialog_event_loop is set.
14716         * macselect.c [!TARGET_API_MAC_CARBON]: Include Scrap.h.
14717         (Selection): New typedef.  Use instead of ScrapRef.
14718         (mac_get_selection_from_symbol): Rename from get_scrap_from_symbol.
14719         (mac_valid_selection_target_p): Rename from valid_scrap_target_type_p.
14720         (mac_clear_selection): Rename from clear_scrap.
14721         (get_flavor_type_from_symbol): New argument SEL and subsume function of
14722         scrap_has_target_type.  All uses changed.
14723         (mac_get_selection_ownership_info, mac_valid_selection_value_p)
14724         (mac_selection_has_target_p): New functions.
14725         (mac_put_selection_value): Rename from put_scrap_string.
14726         (mac_get_selection_value): Rename from get_scrap_string.
14727         (mac_get_selection_target_list): Rename from get_scrap_target_type_list.
14728         (put_scrap_private_timestamp, scrap_has_target_type)
14729         (get_scrap_private_timestamp): Remove functions.
14730         (SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP): Remove define.
14731         (x_own_selection, x_get_local_selection):
14732         Use mac_valid_selection_value_p.
14733         (x_own_selection): Don't use put_scrap_private_timestamp.
14734         Record OWNERSHIP-INFO into Vselection_alist instead.
14735         (x_get_local_selection): Don't check type if request is local.
14736         (Fx_selection_owner_p): Don't use get_scrap_private_timestamp.
14737         Detect ownership change with OWNERSHIP-INFO in Vselection_alist instead.
14739 2007-08-04  Jan Djärv  <jan.h.d@swipnet.se>
14741         * gtkutil.c (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s,
14742         add comment explaining why.
14744 2007-08-03  Richard Stallman  <rms@gnu.org>
14746         * fileio.c (Fvisited_file_modtime): Use make_time.
14748 2007-08-01  Ryo Yoshitake  <ryo@shiftmode.net>  (tiny change)
14750         * mac.c (init_mac_osx_environment): Adjust load-path on self-contained
14751         build.
14753 2007-07-31  Stefan Monnier  <monnier@iro.umontreal.ca>
14755         * gtkutil.c (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT.
14757 2007-07-30  Katsumi Yamaoka  <yamaoka@jpl.org>
14759         * puresize.h (BASE_PURESIZE): Increase to 1130000.
14761 2007-07-30  Richard Stallman  <rms@gnu.org>
14763         * lread.c (readevalloop, read1): Treat NBSP as whitespace.
14765 2007-07-29  Jan Djärv  <jan.h.d@swipnet.se>
14767         * gmalloc.c (__malloc_initialize): Remove pthread_once.  Not needed.
14769 2007-07-28  Nick Roberts  <nickrob@snap.net.nz>
14771         * xdisp.c (decode_mode_spec): Use '@' instead of 'R' to test for
14772         remote default-directory.
14774         * buffer.c (mode-line-format): Update doc string.
14776 2007-07-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
14778         * w32term.c (w32_draw_fringe_bitmap): Extend fringe background to
14779         scroll bar gap.
14780         (x_scroll_bar_create): Set bar->fringe_extended_p.
14781         (w32_set_vertical_scroll_bar): Put leftmost/rightmost scroll bars
14782         on frame edge.  Check fringe background extension.  Don't clear
14783         extended fringe background area.
14785         * w32term.h (struct scroll_bar): New member fringe_extended_p.
14786         (w32_fill_area): Enclose multiple statements with do ... while (0).
14788         * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
14789         Extend fringe background to scroll bar gap.
14790         (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]:
14791         Set bar->fringe_extended_p.
14792         (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
14793         Put leftmost/rightmost scroll bars on frame edge.  Check fringe
14794         background extension.  Don't clear extended fringe background area.
14796         * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
14797         New member fringe_extended_p.
14799 2007-07-25  Glenn Morris  <rgm@gnu.org>
14801         * Relicense all FSF files to GPLv3 or later.
14803         * COPYING: Switch to GPLv3.
14805 2007-07-25  Stefan Monnier  <monnier@iro.umontreal.ca>
14807         * eval.c (Fcommandp): Pay attention to the `interactive-form' property.
14809         * data.c (Finteractive_form): Check for the presence of an
14810         `interactive-form' symbol property more thoroughly.
14812         * data.c (Finteractive_form): Use an `interactive-form' property if
14813         present, analogous to the function-documentation property.
14815 2007-07-24  Jason Rumney  <jasonr@gnu.org>
14817         * w32fns.c (x_real_positions): Get real position from OS instead of
14818         calculating it.
14820 2007-07-23  Jason Rumney  <jasonr@gnu.org>
14822         * filelock.c (current_lock_owner): Allow for @ sign in username.
14824 2007-07-22  Nick Roberts  <nickrob@snap.net.nz>
14826         * xdisp.c (decode_mode_spec): Add case 'R' for to test for
14827         remote default-directory.
14829         * buffer.c (mode-line-format): Describe above case in doc string.
14831 2007-07-20  Eli Zaretskii  <eliz@gnu.org>
14833         * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32):
14834         Define if not defined.
14836 2007-07-18  Jason Rumney  <jasonr@gnu.org>
14838         * w32proc.c (w32_executable_type): Handle 64 bit executables.
14840 2007-07-18  Richard Stallman  <rms@gnu.org>
14842         * data.c (Fsetq_default): Doc fix.
14844         * eval.c (Fsetq): Doc fix.
14846 2007-07-18  Juanma Barranquero  <lekktu@gmail.com>
14848         * coding.c (Ffind_operation_coding_system):
14849         * eval.c (For, Fand): Doc fixes.
14850         Reported by Johan Bockgård.
14852 2007-07-18  Jan Djärv  <jan.h.d@swipnet.se>
14854         * xfns.c (Fx_focus_frame): Call x_ewmh_activate_frame.
14856         * xterm.h: Declare x_ewmh_activate_frame.
14858         * xterm.c (x_ewmh_activate_frame): New function.
14859         (XTframe_raise_lower): Move code to x_ewmh_activate_frame.
14861 2007-07-17  Martin Rudalics  <rudalics@gmx.at>
14863         * window.c (Fdisplay_buffer): If largest or LRU window is the
14864         only window, split it even if it is not eligible for splitting.
14865         This restores the original behavior broken by the 2007-07-15
14866         change.
14868 2007-07-17  Glenn Morris  <rgm@gnu.org>
14870         * abbrev.c (abbrev_check_chars): New function.
14871         (Fdefine_global_abbrev, Fdefine_mode_abbrev):
14872         Call abbrev_check_chars to check abbrev characters are word
14873         constituents.  Doc fix.
14875 2007-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
14877         * process.c (Fstart_process, Fmake_network_process)
14878         (read_process_output): Fix up last changes.
14880 2007-07-16  Eli Zaretskii  <eliz@gnu.org>
14882         * makefile.w32-in (clean): Don't delete *~.
14884 2007-07-16  Andreas Schwab  <schwab@suse.de>
14886         * window.c (Fdisplay_buffer): Use NILP.
14887         (Fset_window_scroll_bars): Likewise.
14889 2007-07-15  Martin Rudalics  <rudalics@gmx.at>
14891         * window.c (window_min_size_2): New function.
14892         (window_min_size_1, size_window, Fdisplay_buffer)
14893         (Fsplit_window, adjust_window_trailing_edge): Use it to avoid
14894         windows without mode- or header-lines when window-min-height is
14895         too small.
14896         (size_window): Reset nodelete_p after testing it, following an
14897         earlier note by Kim F. Storm.
14898         (display_buffer): Do not set split_height_threshold to twice the
14899         value of window_min_height to avoid changing the value of a
14900         customizable variable.  Rather explicitly check whether the
14901         height of the window that shall be splitted is at least as large
14902         as split_height_threshold.
14903         (Fwindow_full_width_p): New defun.
14904         (syms_of_window): Defsubr it.
14906         * window.h: Add EXFUN for Fwindow_full_width_p.
14908 2007-07-14  Jason Rumney  <jasonr@gnu.org>
14910         * process.c [WINDOWSNT]: Don't undefine AF_INET6.
14912 2007-07-14  Richard Stallman  <rms@gnu.org>
14914         * eval.c (maybe_call_debugger): New function.
14915         (find_handler_clause): Use maybe_call_debugger.
14916         Call it when the handler says `debug'.
14917         Eliminate DEBUGGER_VALUE_PTR.
14918         (Fsignal): Eliminate debugger_value.
14919         (Qdebug): New variable.
14920         (syms_of_eval): Initialize it.
14922 2007-07-14  Juanma Barranquero  <lekktu@gmail.com>
14924         * eval.c (Fprogn):
14925         * keyboard.c (Ftrack_mouse):
14926         * print.c (Fwith_output_to_temp_buffer):
14927         * window.c (Fsave_window_excursion): Doc fix.
14929 2007-07-13  Stefan Monnier  <monnier@iro.umontreal.ca>
14931         * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
14933 2007-07-12  Stefan Monnier  <monnier@iro.umontreal.ca>
14935         * process.h (struct Lisp_Process): Turn slots infd, outfd,
14936         kill_without_query, pty_flag, tick, update_tick, decoding_carryover,
14937         inherit_coding_system_flag, filter_multibyte, adaptive_read_buffering,
14938         read_output_delay, and read_output_skip from Lisp_Objects to ints.
14939         Remove unused encoding_carryover.
14940         * process.c: Adjust all functions accordingly.
14942 2007-07-12  Richard Stallman  <rms@gnu.org>
14944         * term.c: Include unistd.h only if HAVE_UNISTD_H.
14946 2007-07-11  Jason Rumney  <jasonr@gnu.org>
14948         * makefile.w32-in (LIBS): Include OLE32.
14950         * w32fns.c (w32_msg_pump) <WM_EMACS_CREATEWINDOW>: Initialize COM.
14951         (w32_msg_pump) <WM_DESTROY>: Uninitialize COM.
14953 2007-07-11  Stefan Monnier  <monnier@iro.umontreal.ca>
14955         * lisp.h (struct Lisp_Hash_Table): Turn next_weak into a bare pointer.
14956         * fns.c (weak_hash_tables): Rename from Vweak_hash_tables and turned
14957         from a Lisp_Object into a bare pointer.
14958         (make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
14959         Adjust the code correspondingly.
14961         * alloc.c (emacs_blocked_free): Remove unused var `bytes_used_now'.
14963         * term.c: Include unistd.h for ttyname, used in handle_one_term_event.
14964         (term_show_mouse_face): Remove unused var `j'.
14965         (handle_one_term_event): Remove unused vars `i' and `j'.
14966         Don't cast return value of ttyname since it's not necessary.
14968 2007-07-10  Stefan Monnier  <monnier@iro.umontreal.ca>
14970         * alloc.c (mark_maybe_pointer): Enforce mult-of-8 alignment when using
14971         USE_LSB_TAG.  Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
14973         * fns.c (map_char_table): Use an array of int for `indices' rather than
14974         an array of Lisp_Objects (which are only ever integers anyway).
14975         (Fmap_char_table): Update caller.
14976         * lisp.h: Update prototype.
14977         * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap):
14978         * fontset.c (Ffontset_info):
14979         * casetab.c (set_case_table): Update callers.
14981         * editfns.c (Ftranspose_regions): Use EMACS_INT for positions.
14983         * keymap.c (struct accessible_keymaps_data)
14984         (struct where_is_internal_data): New structures.
14985         (accessible_keymaps_1, where_is_internal_1): Use them to change
14986         interface to adhere to the one used by map_keymap.
14987         (Faccessible_keymaps, where_is_internal): Use map_keymap.
14988         (accessible_keymaps_char_table, where_is_internal_2): Remove.
14990         * keymap.h (map_keymap_function_t): More informative prototype.
14992 2007-07-10  Guanpeng Xu  <herberteuler@hotmail.com>
14994         * search.c (Vinhibit_changing_match_data, search_regs_1): New vars.
14995         (looking_at_1): Don't change search_regs and last_thing_searched
14996         if `inhibit-changing-match-data' is non-nil.
14997         (string_match_1, search_buffer, set_search_regs): Likewise.
14998         (syms_of_search): Add Lisp level definition for
14999         `inhibit-changing-match-data' and set it to nil.
15000         (boyer_moore): If `inhibit-changing-match-data' is non-nil, compute
15001         start and end of the match, instead of using values in search_regs.
15003 2007-07-01  Stefan Monnier  <monnier@iro.umontreal.ca>
15005         * minibuf.c (Fcompleting_read): New value `confirm-only'
15006         for `require-match'.
15008 2007-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
15010         * fileio.c (Fdo_auto_save): Revert last patch installed unwillingly as
15011         part of the 2007-06-27 change to syms_of_fileio.
15013 2007-06-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15015         * macterm.c [USE_MAC_TSM] (mac_handle_text_input_event):
15016         Check WINDOWP before using XWINDOW.  Consolidate return statements.
15018 2007-06-27  Richard Stallman  <rms@gnu.org>
15020         * fileio.c (syms_of_fileio) <after-insert-file-functions>: Doc fix.
15022 2007-06-27  Juanma Barranquero  <lekktu@gmail.com>
15024         * buffer.c (syms_of_buffer) <selective-display>: Fix typo in docstring.
15026 2007-06-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15028         * gmalloc.c [HAVE_GTK_AND_PTHREAD]: Check this after including config.h.
15029         (_aligned_blocks_mutex) [USE_PTHREAD]: New variable.
15030         (LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS): New macros.
15031         (_free_internal, memalign): Use them.
15032         (_malloc_mutex, _aligned_blocks_mutex) [USE_PTHREAD]:
15033         Initialize to PTHREAD_MUTEX_INITIALIZER.
15034         (malloc_initialize_1) [USE_PTHREAD]: Don't use recursive mutex.
15035         (morecore_nolock): Rename from morecore.  All uses changed.
15036         Use only nolock versions of internal allocation functions.
15037         (_malloc_internal_nolock, _realloc_internal_nolock)
15038         (_free_internal_nolock): New functions created from
15039         _malloc_internal, _realloc_internal, and _free_internal.
15040         (_malloc_internal, _realloc_internal, _free_internal): Use them.
15041         Copy hook value to automatic variable before its use.
15042         (memalign): Copy hook value to automatic variable before its use.
15044 2007-06-26  Kenichi Handa  <handa@m17n.org>
15046         * coding.c (Ffind_operation_coding_system): Docstring improved.
15047         (syms_of_coding): Docstring of `file-coding-system-alist' improved.
15049 2007-06-25  David Kastrup  <dak@gnu.org>
15051         * keymap.c (Fcurrent_active_maps): Add `position' argument.
15052         (Fwhere_is_internal): Adjust call to `current-active-maps' to
15053         cater for additional parameter.
15055         * keymap.h: Adjust number of parameters to `current-active-maps'.
15057         * doc.c (Fsubstitute_command_keys): Adjust call of
15058         `current-active-maps'.
15060 2007-06-25  David Kastrup  <dak@gnu.org>
15062         * callint.c (Fcall_interactively): Make the parsing of interactive
15063         specs somewhat more readable.
15065 2007-06-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15067         * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background
15068         to scroll bar gap also when bitmap fills fringe.  Draw only foreground
15069         if extended background has already been filled.
15071 2007-06-22  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15073         * macgui.h (USE_CG_DRAWING): Don't require USE_ATSUI.
15074         (USE_MAC_TOOLBAR): Require USE_CG_DRAWING.
15076         * macmenu.c (mac_dialog_modal_filter, Fx_popup_dialog) [MAC_OSX]:
15077         Put special treatment for Fmessage_box, Fyes_or_no_p, and Fy_or_n_p
15078         in #if 0 as it is not compatible with y-or-n-p-with-timeout.
15079         (timer_check) [TARGET_API_MAC_CARBON]: Add extern.
15080         [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Use QuitEventLoop
15081         instead of QuitAppModalLoopForWindow.  Consolidate QuitEventLoop calls.
15082         (pop_down_dialog) [TARGET_API_MAC_CARBON]: New function.
15083         [TARGET_API_MAC_CARBON] (create_and_show_dialog): Use it for unwind.
15084         Run timers during dialog popup.
15085         (Fmenu_or_popup_active_p) [TARGET_API_MAC_CARBON]: Use popup_activated.
15087 2007-06-21  Jason Rumney  <jasonr@gnu.org>
15089         * image.c (convert_mono_to_color_image): Swap fore and background.
15091 2007-06-20  Jason Rumney  <jasonr@gnu.org>
15093         * w32bdf.c (w32_BDF_to_x_font): Unmap memory when finished.
15094         (w32_free_bdf_font): Unmap memory not handle.
15096 2007-06-20  Sam Steingold  <sds@gnu.org>
15098         * gmalloc.c (__morecore): Fix the declaration to comply with the
15099         definition.
15101 2007-06-20  Juanma Barranquero  <lekktu@gmail.com>
15103         * w32term.c (w32_delete_display): Remove leftover declaration.
15104         (w32_define_cursor, w32_initialize): Make static.
15106         * w32.c (_wsa_errlist): Fix typo in error message.
15107         (init_environment): Ignore any environment variable from the
15108         registry having a null value.
15110 2007-06-20  Glenn Morris  <rgm@gnu.org>
15112         * Makefile.in (LIBGIF): Default to -lgif.
15114 2007-06-17  Jason Rumney  <jasonr@gnu.org>
15116         * w32menu.c (add_menu_item): Don't use multibyte string functions on
15117         unicode strings.
15119 2007-06-16  Juanma Barranquero  <lekktu@gmail.com>
15121         * xdisp.c (syms_of_xdisp) <auto-resize-tool-bars>:
15122         Fix typo in docstring.
15124 2007-06-16  Eli Zaretskii  <eliz@gnu.org>
15126         * w32menu.c (add_menu_item): Escape `&' characters in menu items
15127         and their keybindings.
15129 2007-06-15  Chong Yidong  <cyd@stupidchicken.com>
15131         * composite.c (update_compositions): Fix last fix.
15133 2007-06-14  Jason Rumney  <jasonr@gnu.org>
15135         * w32.c (get_process_times_fn): New function pointer.
15136         (globals_of_w32): Intialize it if present in kernel32.dll.
15137         (w32_get_internal_run_time): New function.
15139         * editfns.c (Fget_internal_run_time) [WINDOWSNT]: Use it.
15141 2007-06-14  Kenichi Handa  <handa@etlken.m17n.org>
15143         * composite.c (update_compositions): Check the validness of
15144         compositions.
15146 2007-06-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15148         * frame.h (struct frame) [MAC_OS]: New member external_tool_bar.
15149         (FRAME_EXTERNAL_TOOL_BAR) [MAC_OS]: Use it.
15151         * macfns.c (mac_window) [USE_MAC_TOOLBAR]: Set toolbar_win_gravity.
15152         (x_set_tool_bar_lines) [USE_MAC_TOOLBAR]: Set FRAME_EXTERNAL_TOOL_BAR.
15154         * macgui.h (USE_MAC_TOOLBAR): New define.
15156         * macmenu.c [TARGET_API_MAC_CARBON] (menu_target_item_handler):
15157         Return immediately unless popup is activated.
15159         * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe
15160         background to scroll bar gap.
15161         (x_scroll_bar_create) [MAC_OSX]: Set bar->fringe_extended_p.
15162         (XTset_vertical_scroll_bar) [MAC_OSX]: Put leftmost/rightmost
15163         scroll bars on frame edge.  Check fringe background extension.
15164         Don't clear extended fringe background area.
15165         (TOOLBAR_IDENTIFIER, TOOLBAR_ICON_ITEM_IDENTIFIER)
15166         (TOOLBAR_ITEM_COMMAND_ID_OFFSET, TOOLBAR_ITEM_COMMAND_ID_P)
15167         (TOOLBAR_ITEM_COMMAND_ID_VALUE, TOOLBAR_ITEM_MAKE_COMMAND_ID):
15168         [USE_MAC_TOOLBAR]: New macros.
15169         (mac_move_window_with_gravity, mac_get_window_origin_with_gravity)
15170         (mac_handle_toolbar_event, mac_image_spec_to_cg_image)
15171         (mac_create_frame_tool_bar, update_frame_tool_bar, free_frame_tool_bar)
15172         (mac_tool_bar_note_mouse_movement, mac_handle_toolbar_command_event)
15173         [USE_MAC_TOOLBAR]: New functions.
15174         (mac_handle_window_event) [USE_MAC_TOOLBAR]: Reposition window
15175         manually if previous repositioning has failed.
15176         (mac_handle_keyboard_event): Use precomputed event kind.
15177         (XTread_socket) [USE_MAC_TOOLBAR]: Handle click in structure region
15178         as tool bar item click.  Handle mouse movement over tool bar items.
15180         * macterm.h (struct mac_output) [USE_MAC_TOOLBAR]: New member
15181         toolbar_win_gravity.
15182         (struct scroll_bar) [MAC_OSX]: New member fringe_extended_p.
15183         (update_frame_tool_bar, free_frame_tool_bar) [USE_MAC_TOOLBAR]:
15184         Add externs.
15186         * xdisp.c (update_tool_bar, redisplay_tool_bar, redisplay_window)
15187         [USE_MAC_TOOLBAR]: Sync with GTK+ tool bar display.
15189 2007-06-14  Chong Yidong  <cyd@stupidchicken.com>
15191         * image.c (search_image_cache): Remove unused variable.
15193 2007-06-13  Chong Yidong  <cyd@stupidchicken.com>
15195         * xfns.c, xmenu.c: Link to xaw3d if available.
15197 2007-06-13  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15199         * dispextern.h (struct image) [HAVE_WINDOW_SYSTEM]: New members
15200         frame_foreground and frame_background.
15202         * image.c (lookup_image): Save frame foreground and background colors.
15203         (search_image_cache): Check if saved and current frame colors match.
15205 2007-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
15207         * regex.c (regex_compile): Remove the `regnum' counter.
15208         Use bufp->re_nsub instead.  Add support for \(?N:RE\).
15210 2007-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
15212         * term.c: Include intervals.h to declare Fget_text_property.
15214 2007-06-10  Jason Rumney  <jasonr@gnu.org>
15216         * w32fns.c (Fx_file_dialog): Take size from struct not pointer.
15218 2007-06-08  Juanma Barranquero  <lekktu@gmail.com>
15220         * callint.c (Fcall_interactively):
15221         * editfns.c (Fdelete_and_extract_region):
15222         * fileio.c (Fread_file_name):
15223         * fns.c (Fmapconcat):
15224         * keyboard.c (cmd_error_internal):
15225         * keymap.c (Fkey_description):
15226         * lread.c (openp):
15227         * minibuf.c (read_minibuf):
15228         * search.c (wordify):
15229         * sunfns.c (sel_read):
15230         * xdisp.c (Fformat_mode_line, syms_of_xdisp):
15231         * xfns.c (x_default_scroll_bar_color_parameter):
15232         * xmenu.c (menu_help_callback):
15233         * xselect.c (Fx_get_atom_name):
15234         * xterm.c (x_term_init): Use empty_unibyte_string.
15236 2007-06-08  Dmitry Antipov  <dmantipov@yandex.ru>  (tiny change)
15238         * alloc.c (init_strings): Initialize canonical empty strings.
15239         (make_uninit_string, make_uninit_multibyte_string): Return appropriate
15240         canonical empty string when the requested size is 0.
15242         * emacs.c (empty_unibyte_string): Rename from empty_string.
15243         (empty_multibyte_string): New canonical empty string.
15244         (syms_of_emacs): Don't initialize empty_string.
15246         * lisp.h (STRING_SET_UNIBYTE): Return the canonical empty unibyte
15247         string, if appropriate.
15248         (empty_unibyte_string, empty_multibyte_string): New externs.
15249         (empty_string): Remove extern.
15251         * lread.c (syms_of_lread): Use empty_unibyte_string.
15253 2007-06-07  Jason Rumney  <jasonr@gnu.org>
15255         * s/ms-w32.h: Don't define HAVE_TZNAME.
15257         * editfns.c (Fcurrent_time_zone): Remove hack for Japanese Windows.
15259 2007-06-07  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15261         * mac.c (xrm_get_preference_database): Remove BLOCK_INPUT.
15263         * macfns.c (mac_get_window_bounds): Move extern to macterm.h.
15264         (compute_tip_xy) [TARGET_API_MAC_CARBON]: Use GetGlobalMouse.
15266         * macmenu.c [TARGET_API_MAC_CARBON] (menu_target_item_handler):
15267         Don't call next handler.
15268         [TARGET_API_MAC_CARBON] (install_menu_target_item_handler):
15269         Remove argument.  Install handler to application.
15270         (set_frame_menubar): Don't change deep_p.
15271         (mac_menu_show): Use FRAME_OUTER_TO_INNER_DIFF_X and
15272         FRAME_OUTER_TO_INNER_DIFF_Y.
15273         (DIALOG_BUTTON_COMMAND_ID_OFFSET, DIALOG_BUTTON_COMMAND_ID_P)
15274         (DIALOG_BUTTON_COMMAND_ID_VALUE, DIALOG_BUTTON_MAKE_COMMAND_ID)
15275         [HAVE_DIALOGS]: New macros.
15276         [HAVE_DIALOGS] (mac_handle_dialog_event, create_and_show_dialog):
15277         Use them.
15278         (fill_menubar) [TARGET_API_MAC_CARBON]: Use CFString.
15280         * macselect.c [MAC_OSX] (install_service_handler): Rename from
15281         init_service_handler.  All callers changed.  Return OSStatus value.
15283         * macterm.c (mac_begin_cg_clip): New arg F.  Call SetPortWindowPort.
15284         All callers changed so as not to call SetPortWindowPort.
15285         (mac_begin_cg_clip) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
15286         (mac_draw_image_string_atsui) [USE_ATSUI]: New function created from
15287         mac_draw_string_common.
15288         (mac_draw_image_string_qd): Likewise.
15289         (mac_draw_string_common): Use them.  Add INLINE.
15290         (XTmouse_position, x_scroll_bar_report_motion) [TARGET_API_MAC_CARBON]:
15291         Use FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y, and
15292         GetGlobalMouse.
15293         (x_set_mouse_pixel_position) [MAC_OSX]: Use FRAME_OUTER_TO_INNER_DIFF_X
15294         and FRAME_OUTER_TO_INNER_DIFF_Y.
15295         [TARGET_API_MAC_CARBON] (mac_handle_mouse_event): Likewise.
15296         [USE_MAC_TSM] (mac_handle_text_input_event): Likewise.
15297         (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Move code for
15298         repositioning window to mac_handle_window_event.
15299         (x_make_frame_invisible) [TARGET_API_MAC_CARBON]: Move code for
15300         saving window location to mac_handle_window_event
15301         [USE_MAC_FONT_PANEL] (mac_show_hide_font_panel): Install handler here.
15302         (install_menu_target_item_handler): Remove argument in extern.
15303         [TARGET_API_MAC_CARBON] (mac_event_to_emacs_modifiers):
15304         Also accept command events.
15305         (do_keystroke): New function created from XTread_socket.
15306         (init_command_handler): Remove functions.
15307         [TARGET_API_MAC_CARBON] (mac_handle_window_event): Reposition window
15308         and save window location by kEventWindowShowing and kEventWindowHiding
15309         handlers here.  Don't call next handler for window state change and
15310         focus events.
15311         (mac_handle_application_event, mac_handle_keyboard_event)
15312         [TARGET_API_MAC_CARBON]: New functions.
15313         (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for
15314         kEventWindowShowing and kEventWindowHiding events.  Move installation
15315         of mouse, font, text input and menu target item handlers to
15316         install_application_handler.
15317         (install_application_handler) [TARGET_API_MAC_CARBON]: New function.
15318         (mac_handle_cg_display_reconfig) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
15319         New function.
15320         (init_dm_notification_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
15321         Register it.
15322         (XTread_socket) [TARGET_API_MAC_CARBON]:
15323         Consolidate SendEventToEventTarget calls.
15324         Use FRAME_OUTER_TO_INNER_DIFF_X and FRAME_OUTER_TO_INNER_DIFF_Y.
15325         Move application activation handler to mac_handle_application_event.
15326         Move keyboard handler to mac_handle_keyboard_event.
15327         (XTread_socket) [!TARGET_API_MAC_CARBON]: Use do_keystroke.
15328         (mac_initialize) [TARGET_API_MAC_CARBON]: Don't call
15329         init_command_handler.  Call install_application_handler.
15331         * macterm.h (mac_get_window_bounds): Move extern from macfns.c.
15332         (FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y): New macros.
15334 2007-06-07  Glenn Morris  <rgm@gnu.org>
15336         * emacs.c (main): Use `emacs-copyright' in --version output.
15338 2007-06-06  Chong Yidong  <cyd@stupidchicken.com>
15340         * image.c (xpm_load): Remove spurious call to xpm_init_color_cache.
15342 2007-06-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15344         * macfns.c (mac_window): Replace WindowPtr with WindowRef.
15346         * macgui.h: Replace WindowPtr with WindowRef.
15348         * macmenu.c: Replace MenuHandle and GetMenuHandle with MenuRef and
15349         GetMenuRef, respectively.  Replace WindowPtr with WindowRef.
15350         Replace ControlHandle with ControlRef.
15351         (install_menu_quit_handler): Rename arg MENU_HANDLE to ROOT_MENU.
15353         * macterm.c: Replace MenuHandle and GetMenuHandle with MenuRef and
15354         GetMenuRef, respectively.  Replace WindowPtr with WindowRef.
15355         Replace ControlHandle with ControlRef.
15356         (USE_CARBON_EVENTS): Remove.  Use TARGET_API_MAC_CARBON instead.
15357         [MAC_OS8] (do_get_menus): Rename variable `menu_handle' to `menu'.
15359         * macterm.h (struct scroll_bar): Rename member control_handle_low
15360         and control_handle_high to control_ref_low and control_ref_high.
15361         All uses changed.
15362         (SCROLL_BAR_CONTROL_REF, SET_SCROLL_BAR_CONTROL_REF): Rename from
15363         SCROLL_BAR_CONTROL_HANDLE and SET_SCROLL_BAR_CONTROL_HANDLE,
15364         respectively.  All uses changed.
15365         (XCreatePixmap, XCreatePixmapFromBitmapData, XSetWindowBackground)
15366         (install_window_handler, remove_window_handler): Replace WindowPtr
15367         with WindowRef in externs.
15369 2007-06-05  Juanma Barranquero  <lekktu@gmail.com>
15371         * xfaces.c (Finternal_lisp_face_p): Signal error for face alias loops.
15373 2007-06-03  Nick Roberts  <nickrob@snap.net.nz>
15375         * keyboard.c (discard_mouse_events): Add GPM_CLICK_EVENT case.
15377         * frame.c (Fmouse_position, Fmouse_pixel_position):
15378         Condition on HAVE_GPM too.
15380         * term.c (term_mouse_highlight): Remove unused variables.
15381         (Fterm_open_connection): Set gpm_zerobased to 1.
15382         (term_mouse_movement, term_mouse_click, handle_one_term_event):
15383         Use zero based co-ordinates.
15384         (handle_one_term_event): Report a drag as mouse movement too.
15386         * Makefile.in (MOUSE_SUPPORT): Define for HAVE_GPM.
15388 2007-06-03  Chong Yidong  <cyd@stupidchicken.com>
15390         * image.c (search_image_cache): New function.  Require background
15391         color match if background color is unspecified in the image spec.
15392         (uncache_image, lookup_image): Use it.
15394 2007-06-01  Juanma Barranquero  <lekktu@gmail.com>
15396         * window.c (Fshrink_window): Reflow docstring.
15398 2007-06-02  Chong Yidong  <cyd@stupidchicken.com>
15400         * Version 22.1 released.
15402 2007-06-01  Richard Stallman  <rms@gnu.org>
15404         * xfns.c (x_encode_text): Add GCPRO.
15406 2007-06-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15408         * xfns.c (x_set_name_internal): Save encoded name before
15409         x_encode_text in case string data is relocated.
15411 2007-05-31  Richard Stallman  <rms@gnu.org>
15413         * buffer.c (syms_of_buffer): Doc fix.
15415 2007-05-30  Nick Roberts  <nickrob@snap.net.nz>
15417         * sysdep.c (init_sys_modes): Add rather than replace with
15418         O_NONBLOCK.
15420         * frame.c [HAVE_GPM] (Fset_mouse_pixel_position): Add call to
15421         term_mouse_moveto.
15423         * termhooks.h (term_mouse_moveto): New extern.
15425         * term.c (mouse_face_window): Rename...
15426         (Qmouse_face_window): ...to this.
15427         (term_show_mouse_face, term_clear_mouse_face)
15428         (term_mouse_highlight): Use Qmouse_face_window.
15429         (term_mouse_moveto): New function.
15430         (term_mouse_position): Make it work.
15431         (syms_of_term): Uncomment assignment to mouse_position_hook.
15432         Staticpro Qmouse_face_window.
15434 2007-05-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15436         * xdisp.c (redisplay_internal): Bind inhibit-point-motion-hooks to t
15437         around current_column call.
15439 2007-05-26  Dan Nicolaescu  <dann@ics.uci.edu>
15441         * xfaces.c (syms_of_xfaces): Delete stray semicolon.
15442         * xdisp.c (next_element_from_buffer):
15443         * window.c (delete_window):
15444         * term.c (term_mouse_highlight):
15445         * msdos.c (getdefdir):
15446         * macterm.c (mac_create_bitmap_from_bitmap_data)
15447         (init_font_name_table):
15448         * fns.c (Fsxhash):
15449         * data.c (Fmake_local_variable):
15450         * ccl.c (ccl_driver): Likewise.
15452 2007-05-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15454         * macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event):
15455         Call mac_wakeup_from_rne on window size change.
15457 2007-05-25  Chong Yidong  <cyd@stupidchicken.com>
15459         * image.c (uncache_image): Fix typo.
15461 2007-05-23  Johannes Weiner  <hannes@saeurebad.de>  (tiny change)
15463         * keyboard.c (make_lispy_movement): Condition on HAVE_GPM too.
15465 2007-05-22  Richard Stallman  <rms@gnu.org>
15467         * xterm.c (x_connection_closed): Remove NO_RETURN.
15469 2007-05-22  Martin Rudalics  <rudalics@gmx.at>
15471         * syntax.c (scan_words): Fix arg to UPDATE_SYNTAX_TABLE_BACKWARD.
15473 2007-05-21  Chong Yidong  <cyd@stupidchicken.com>
15475         * image.c (uncache_image): New function.
15476         (Fimage_refresh): New function.
15478 2007-05-20  Jan Djärv  <jan.h.d@swipnet.se>
15480         * Makefile.in: Move GPM check outside HAVE_X_WINDOWS.
15482 2007-05-20  Nick Roberts  <nickrob@snap.net.nz>
15484         * config.in, keyboard.c, Makefile.in, sysdep.c, term.c,
15485         * termhooks.h: Use HAVE_GPM instead of HAVE_GPM_H.
15487 2007-05-20  Nick Roberts  <nickrob@snap.net.nz>
15489         * keyboard.c (make_lispy_event): Make case GPM_CLICK_EVENT
15490         conditional on [HAVE_GPM_H].
15492 2007-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
15494         * syntax.c (skip_chars): Update syntax-table only after we checked that
15495         the new location is valid.
15497 2007-05-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15499         * macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around
15500         mac_get_window_bounds.
15502 2007-05-20  Nick Roberts  <nickrob@snap.net.nz>
15504         * Makefile.in (LIBGPM): Allow it to be set from configure.
15505         If set then link Emacs with it.
15507         * config.in: Regenerate.
15509         * lisp.h (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15510         New externs.
15512         * termhooks.h [HAVE_GPM_H] (enum event_kind): Add GPM_CLICK_EVENT.
15513         Include gpm.h.
15514         (handle_one_term_event, term_gpm): New externs.
15516         * sysdep.c [HAVE_GPM_H] (init_sys_modes): Make gpm_fd nonblocking
15517         and allow it to be interrupted by SIGIO.
15519         * process.c (gpm_wait_mask, max_gpm_desc): New variables.
15520         (wait_reading_process_output): Wait on gpm_fd too.
15521         (add_gpm_wait_descriptor, delete_gpm_wait_descriptor)): New functions.
15522         (add_gpm_wait_descriptor_called_flag): New variable.
15523         (delete_keyboard_wait_descriptor): Check gpm_wait_mask.
15525         * keyboard.c [HAVE_GPM_H] (Qmouse_fixup_help_message)
15526         (make_lispy_movement, tracking_off, Ftrack_mouse, some_mouse_moved)
15527         (show_help_echo, readable_events, kbd_buffer_get_event, init_keyboard):
15528         Extend HAVE_MOUSE ifdefs to HAVE_GPM_H.
15529         (make_lispy_event): Add case GPM_CLICK_EVENT.
15530         (read_avail_input): Handle mouse input.
15532         * term.c (write_glyphs_with_face): New function.
15533         [HAVE_GPM_H]: Include buffer.h, sys/fcntl.h.
15534         (mouse_face_beg_row, mouse_face_beg_col, mouse_face_end_row)
15535         (mouse_face_end_col, mouse_face_past_end, mouse_face_window)
15536         (mouse_face_face_id, term_gpm, pos_x, pos_y)
15537         (last_mouse_x, last_mouse_y): New variables.
15538         (term_show_mouse_face, term_clear_mouse_face, fast_find_position)
15539         (term_mouse_highlight, term_mouse_movement, term_mouse_position)
15540         (term_mouse_click, handle_one_term_event, Fterm_open_connection)
15541         (Fterm_close_connection): New functions.
15542         (term_init): Initialise mouse_face_window.
15544 2007-05-19  Chong Yidong  <cyd@stupidchicken.com>
15546         * xdisp.c (redisplay_window): If first window line is a
15547         continuation line, recompute the new window start instead of
15548         recentering.
15550 2007-05-18  Glenn Morris  <rgm@gnu.org>
15552         * m/alpha.h (ORDINARY_LINK): No longer define on OpenBSD.
15553         Suggested by Alfred M. Szmidt <ams@gnu.org>.
15555 2007-05-17  Glenn Morris  <rgm@gnu.org>
15557         * m/macppc.h (ORDINARY_LINK): No longer define on OpenBSD.
15559 2007-05-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15561         * macterm.c [USE_CARBON_EVENTS] (mac_convert_event_ref): Also convert
15562         dead key repeat and up events.
15564 2007-05-14  Chong Yidong  <cyd@stupidchicken.com>
15566         * image.c (pbm_load): Check image size for monochrome pbm.
15568 2007-05-13  Chong Yidong  <cyd@stupidchicken.com>
15570         * xterm.c (XTread_socket): Revert last change.
15572 2007-05-12  Chong Yidong  <cyd@stupidchicken.com>
15574         * image.c (pbm_load): Correctly check image size for greyscale pbm.
15576         * xterm.c (XTread_socket): Yet Another Uncaught X Error Crash (YAUXEC).
15578 2007-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
15580         * editfns.c (Ftranspose_regions): Yet another int/Lisp_Object
15581         mixup (YAILOM).
15583 2007-05-07  Andreas Schwab  <schwab@suse.de>
15585         * keymap.c (Flookup_key): Fix typo in last change.
15587 2007-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
15589         * keymap.c (Fdefine_key, Flookup_key): Only do the 0x80->meta_modifier
15590         mapping for unibyte strings.
15592 2007-05-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15594         * macmenu.c (mac_dialog_show): Apply 2007-04-27 change for xmenu.c.
15595         (Fx_popup_dialog) [MAC_OSX]: Likewise.
15597 2007-04-29  Richard Stallman  <rms@gnu.org>
15599         * insdel.c (replace_range): For undo, record insertion first.
15601 2007-04-29  Andreas Schwab  <schwab@suse.de>
15603         * lisp.h (VECSIZE): Use OFFSETOF.
15605 2007-04-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
15607         * xdisp.c (try_window_reusing_current_matrix): Fix number of
15608         disabled lines.
15610 2007-04-28  Richard Stallman  <rms@gnu.org>
15612         * lread.c (read_escape): In a string, \s is always space.
15614 2007-04-27  Jan Djärv  <jan.h.d@swipnet.se>
15616         * xmenu.c (xdialog_show): Call Fredisplay before showing the dialog.
15618         * gtkutil.c (xg_update_menubar, create_menus): Create empty
15619         submenu for menu bar items.
15621 See ChangeLog.10 for earlier changes.
15623 ;; Local Variables:
15624 ;; coding: utf-8
15625 ;; add-log-time-zone-rule: t
15626 ;; bug-reference-url-format: "http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s"
15627 ;; End:
15629     Copyright (C) 2007, 2008  Free Software Foundation, Inc.
15631   This file is part of GNU Emacs.
15633   GNU Emacs is free software: you can redistribute it and/or modify
15634   it under the terms of the GNU General Public License as published by
15635   the Free Software Foundation, either version 3 of the License, or
15636   (at your option) any later version.
15638   GNU Emacs is distributed in the hope that it will be useful,
15639   but WITHOUT ANY WARRANTY; without even the implied warranty of
15640   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15641   GNU General Public License for more details.
15643   You should have received a copy of the GNU General Public License
15644   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
15646 ;; arch-tag: dfb6ad96-1550-4905-9e53-d2059ee84c40