* keyboard.c (Qratio): New symbol.
[emacs.git] / src / ChangeLog
blobf3c17e8ae874773a2caffb519afb415c79939210
1 1999-12-09  Dave Love  <fx@gnu.org>
3         * frame.h: (PIX_TYPE) [! HAVE_X_WINDOWS]: Define PIX_TYPE.
5 1999-12-08  Gerd Moellmann  <gerd@gnu.org>
7         * eval.c: Remove conditional compilation on `standalone'.
8         (call_debugger): When entering the debugger while redisplaying,
9         reset redisplaying_p, and go back to the top-level if the debugger
10         returns.
12 1999-12-07  Gerd Moellmann  <gerd@gnu.org>
14         * xfaces.c (x_set_menu_resources_from_menu_face): Make sure
15         basic faces are realized before trying to use face `menu'.
17         * window.c (delete_window): Block input for the time window
18         matrices are being changed.
20 1999-12-07  Dave Love  <fx@gnu.org>
22         * lread.c (Fintern_soft): Fix newlines in doc string.
24 1999-12-07  Alexandre Oliva  <oliva@dcc.unicamp.br>
26         * unexelf.c: Include <syms.h>, not <sym.h> on IRIX.  Removed
27         duplicate definition of ElfW.
28         (find_section): Copied from unexsgi.c.
29         (unexec): Use find_section.  Adjust whitespace.  Initialize
30         new_data2_offset based on old_data, not sbss (this fixes a bug on
31         IRIX6).  Change #ifdef __mips to __sgi, since it's IRIX-specific.
32         Adjust test for presence of .mdebug section to the new return
33         value of find_section.
34         
35 1999-12-07  Gerd Moellmann  <gerd@gnu.org>
37         * unexelf.c: Merge changes from 20.5.
38         (unexec): Handle .lit4 and .lit8 unconditionally.
40         * m/iris4d.h (UNEXEC) [USG5_4]: Use unexelf.o instead of
41         unexsgi.o again.
42         
43         * m/iris5d.h (UNEXEC): Likewise.
45 1999-12-06  Stefan Monnier  <monnier@cs.yale.edu>
47         * editfns.c (Fdelete_and_extract_region): New function.
48         (syms_of_editfns): Register it.
49         * insdel.c (del_range): Update del_range_1 call.
50         (del_range_1, del_range_2): Add a ret_string argument to
51         request that the deleted text be returned.
52         (del_range_byte, del_range_both): Update del_range_2 call.
53         * lisp.h (del_range_1, del_range_2): Change prototype
54         * casefiddle.c (casify_region): Update del_range_1 call.
55         * coding.c (code_convert_region): Update del_range_2 call.
56         * fileio.c (Finsert_file_contents): Update del_range_2 call.
58 1999-12-06  Gerd Moellmann  <gerd@gnu.org>
60         * xfaces.c (set_lface_from_font_name): Fix incomplete merge.
62 1999-12-04  Hrvoje Niksic  <hniksic@iskon.hr>
64         * lread.c (Fintern_soft): Accept a symbol argument.
65         
66 1999-12-06  Eli Zaretskii  <eliz@is.elta.co.il>
68         * s/msdos.h (SYSTEM_PURESIZE_EXTRA): Reduce to 40000.
70         * insdel.c (adjust_markers_for_delete): Fix last change.
72 1999-12-06  Eli Zaretskii  <eliz@is.elta.co.il>
74         Changes for automatic remapping of X colors on terminal frames:
76         * xfaces.c (XColor) [!HAVE_X_WINDOWS]: Provide a typedef for non-X
77         frames.
78         (Vface_tty_color_alist): Remove.
79         (tty_defined_color): New function.
80         (defined_color): Rewrite to support any type of frame.
81         (tty_color_name): New function.
82         (face_color_supported_p, Fface_color_gray_p,
83         Fface_color_supported_p): Support non-X frames.
84         (load_color): Enclose the color name in quotes, in the log
85         messages.  Remove DOS-specific version of load_color.
86         (realize_tty_face): Take the supported colors from
87         tty-color-alist.  Support translation of X colors to the closest
88         tty color, for both MSDOS and tty frames.
89         [MSDOS]: Don't invert face colors if they were taken from the
90         frame colors.
91         (Fface_register_tty_color, Fface_clear_tty_colors): Remove.
93         * frame.h (struct x_output) [!MSDOS, !WINDOWSNT, !HAVE_X_WINDOWS]:
94         Define a mostly empty surrogate.
95         (tty_display): Declare.
97         * frame.c (make_terminal_frame) [!macintosh]: Don't use
98         tty_display.
99         (Fframe_parameters): Don't invert colors of non-FRAME_WINDOW_P
100         frames when the frame's param_alist includes 'reverse.
101         (tty_display): Define.
102         (make_terminal_frame) [!MSDOS]: Assign &tty_display to the
103         output_data.x member.
104         (Fframe_parameters): Return foreground and background color names
105         on tty frames as well, in addition to MSDOS frames.
107         * msdos.h (DisplayWidth, DisplayHeight): Changes for Lisp_Object
108         selected_frame.
109         (struct x_output): Remove unused members; document who uses each
110         member.
111         (FRAME_PARAM_FACES, FRAME_N_PARAM_FACES, FRAME_DEFAULT_PARAM_FACE,
112         FRAME_MODE_LINE_PARAM_FACE, FRAME_COMPUTED_FACES,
113         FRAME_N_COMPUTED_FACES, FRAME_SIZE_COMPUTED_FACES,
114         FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color): Remove
115         unused macro definintions.
117         * msdos.c (IT_set_frame_parameters): Don't call
118         recompute_basic_faces, the next redisplay will, anyway.
119         (x_current_display): Remove unused variable.
120         Many functions: changes for Lisp_object selected_frame.
121         (IT_set_face): If the tty_reverse_p flag is set for the face,
122         reverse the foreground and background colors.
123         (Fmsdos_remember_default_colors): New function.
124         (syms_of_msdos): Defsubr it.
125         (IT_set_frame_parameters): Use initial_screen_colors[] when
126         creating a new frame.  If the frame parameters include 'reverse,
127         swap the foreground and background colors.
128         (internal_terminal_init): Initialize initial_screen_colors to -1.
129         (syms_of_msdos): Add DEFVAR_BOOL for x-stretch-cursor, to shut up
130         cus-start.el.
132         * Makefile.in (lisp, shortlisp): Add lisp/term/tty-colors.elc.
134         * xfns.c (x_defined_color): Rename from defined_color.  All
135         callers changed.
136         (Fxw_color_defined_p): Renamed from Fx_color_defined_p;
137         all callers changed.
138         (Fxw_color_values): Renamed from Fx_color_values; all callers
139         changed.
140         (Fxw_display_color_p): Renamed from Fx_display_color_p; all
141         callers changed.
142         (x_window_to_frame, x_any_window_to_frame,
143         x_non_menubar_window_to_frame, x_menubar_window_to_frame,
144         x_top_window_to_frame): Use !FRAME_X_P instead of
145         f->output_data.nothing.
146         * xterm.h (x_defined_color): Rename from defined_color.
148         * w32fns.c (x_window_to_frame): Use FRAME_W32_P instead of
149         f->output_data.nothing.
150         (Fxw_color_defined_p): Renamed from Fx_color_defined_p;
151         all callers changed.
152         (Fxw_color_values): Renamed from Fx_color_values; all callers
153         changed.
154         (Fxw_display_color_p): Renamed from Fx_display_color_p; all
155         callers changed.
157         * dispextern.h (tty_color_name): Add prototype.
159         * xmenu.c (menubar_id_to_frame): Use FRAME_WINDOW_P instead of
160         f->output_data.nothing.
161         * w32menu.c (menubar_id_to_frame): Likewise.
162         * w32term.h (w32_output): Declare.
164         * dosfns.c (Qmsdos_color_translate): Remove.
165         (msdos_stdcolor_name): Now returns a Lisp_Object.
166         * dosfns.h (Qmsdos_color_translate): Remove.
168         * s/msdos.h (INTERNAL_TERMINAL): Add entries for color support.
170 1999-12-06  Kenichi Handa  <handa@etl.go.jp>
172         * fileio.c (decide_coding_unwind): Renamed from
173         set_auto_coding_unwind.
174         (Finsert_file_contents): Make single unwind protect to call both
175         Vset_auto_coding_function and Ffind_operation_coding_system.
177         * insdel.c (adjust_markers_for_delete): Make it non-static.
179 1999-12-04  Stefan Monnier  <monnier@cs.yale.edu>
181         * regex.c (regex_compile): Recognize *?, +? and ?? as non-greedy
182         operators and handle them properly.
183         * regex.h (RE_ALL_GREEDY): New option.
184         (RE_UNMATCHED_RIGHT_PAREN_ORD): Moved to the end where alphabetic
185         sorting would put it.
186         (RE_SYNTAX_AWK, RE_SYNTAX_GREP, RE_SYNTAX_EGREP)
187         (_RE_SYNTAX_POSIX_COMMON): Use the new option to keep old behavior.
189 1999-12-04  Dave Love  <d.love@dl.ac.uk>
191         * m/arm.h: New file.
193 1999-12-03  Dave Love  <fx@gnu.org>
195         * editfns.c (Fmessage_or_box): Use use_dialog_box.
197 1999-12-02  Gerd Moellmann  <gerd@gnu.org>
199         * s/usg5-4.h (LIBS_SYSTEM): Add -lgen because that's needed
200         for building with Motif.
202         * m/iris4d.h (UNEXEC) [USG5_4]: Use unexsgi.o instead of
203         unexelf.o.
204         
205         * m/iris5d.h (UNEXEC): Use unexsgi.o instead of unexelf.o.
207 1999-12-01  Dave Love  <fx@gnu.org>
209         * emacs.c (main): Set LANG=C iff AX3_2 defined.
211 1999-11-28  Gerd Moellmann  <gerd@gnu.org>
213         * systime.h (EMACS_TIME_CMP, EMACS_TIME_EQ, EMACS_TIME_NE)
214         (EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT,EMACS_TIME_LE): New
215         macros.
217         * config.in (HAVE_SETITIMER, HAVE_UALARM): New.
219 1999-11-28  eliz  <eliz@dlpx1>
221         * emacs.c (synchronize_locale): Avoid compiler warnings about
222         pointer type mismatch.
224 1999-11-28  Gerd Moellmann  <gerd@gnu.org>
226         * window.c (Fwindow_end): Don't call temp_set_pt_both with
227         out of range position.
229         * xterm.c (XTread_socket) <ClientMessage, Xatom_Scrollbar>: 
230         Switch off busy-cursor by setting inhibit_busy_cursor to 2.
232 1999-11-28  Eli Zaretskii  <eliz@is.elta.co.il>
234         * charset.c (Fmake_char_internal): Print the charset ID when
235         signalling an error.
237         * emacs.c (synchronize_locale): Avoid compiler warnings about
238         pointer type mismatch.
240 1999-11-26  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
242         * editfns.c (Fdelete_field): Make it noninteractive.  Return nil.
244 1999-11-26  Gerd Moellmann  <gerd@gnu.org>
246         * puresize.h (BASE_PURESIZE): Increase to 550000.
248         * textprop.c (set_text_properties): New function.  Like
249         Fset_text_properties, but with additional parameter
250         SIGNAL_AFTER_CHANGE_P.  If that is nil, don't signal after
251         changes.
252         (Fset_text_properties): Use it.
254         * insdel.c (insert_1_both): Call set_text_properties with last
255         parameter nil so that no after changes will be signaled.
257         * lisp.h: Add prototype for set_text_properties.
259         * xfaces.c (set_lface_from_font_name): Fix previous change.
260         (recompute_basic_faces): Change assert to abort.
262 1999-11-25  Dave Love  <fx@gnu.org>
264         * fns.c (Fnthcdr, Fnreverse): Inline cdr.
265         (Fmember, Fdelq, Fdelete): Inline car.
266         (Fy_or_n_p): Doc fix.
268 1999-11-25  Gerd Moellmann  <gerd@gnu.org>
270         * xfaces.c (set_lface_from_font_name): New parameter may_fail_p.
271         Callers changed.  If specified font name is bogus, and may_fail_p
272         is not set, try to use a reasonable default.
274         * dispnew.c (direct_output_for_insert): Set glyph row's
275         displays_text_p flag.  Correct window's window_end_vpos if
276         necessary.
278 1999-11-25  Paul Eggert  <eggert@twinsun.com>
280         * emacs.c (fixup_locale): Don't bother to record initial locale.
281         (synchronize_locale): If the desired locale is nil,
282         treat it as if it were the empty string,
283         so that we set the locale from the environment.
285 1999-11-25  Kenichi Handa  <handa@etl.go.jp>
287         * fileio.c (Finsert_file_contents): Set buffer-file-coding-system
288         of the current buffer via Fset.
290 1999-11-24  Dave Love  <fx@gnu.org>
292         * xfns.c: Don't duplicate Qdisplay definition done elsewhere.
294         * xfaces.c: Don't duplicate Qmode_line definition done elsewhere.
296         * xfns.c: Don't duplicate Qdisplay definition done elsewhere.
298 1999-11-24  Gerd Moellmann  <gerd@gnu.org>
300         * lisp.h (enum pvec_type): Put PVEC_FLAG in #if 0.
302         * emacs.c (PVEC_FLAG): New variable.
304 1999-11-23  Gerd Moellmann  <gerd@gnu.org>
306         * unexaix.c (unexec): Use unsigned instead of uintptr_t because
307         that fails on IBM PowerPC, AIX 4.2.
308         
309 1999-11-22  Eli Zaretskii  <eliz@is.elta.co.il>
311         * buffer.c (syms_of_buffer): Add %z, %Z, %m and %& to the doc
312         string of mode-line-format.  Remove the obsolete %t.
314 1999-11-22  Gerd Moellmann  <gerd@gnu.org>
316         * dispnew.c (direct_output_for_insert): Increment glyph positions
317         for glyphs from buffer text only.
319         * emacs.c (gdb_valbits, gdb_gctypebits, gdb_emacs_intbits)
320         (gdb_data_seg_bits): New variables.
321         
322         * lisp.h (enum gdb_lisp_params): Put in #if 0, since it doesn't
323         work on systems not allowing enumerators > INT_MAX, and it
324         won't work if EMACS_INT is long long.
326 1999-11-22  Paul Eggert  <eggert@twinsun.com>
328         Port to SunOS 4.1.x again.  Help out with Alpha port.
329         Rename messages-locale to system-messages-locale,
330         and likewise for time-locale.
331         
332         * callproc.c (strerror): Remove decl.
333         * fileio.c (strerror): Likewise.
334         * process.c (strerror): Likewise.
335         * emacs.c (strerror): Likewise.
336         (Vsystem_messages_locale): Renamed from Vmessages_locale.
337         All uses changed.
338         (Vprevious_system_messages_locale): Likewise, from
339         Vprevious_messages_locale.
340         (Vsystem_time_locale): Likewise, from Vtime_locale.
341         (Vprevious_system_time_locale): Likewise, from Vprevious_time_locale.
342         (ABORT_RETURN_TYPE): New macro.
343         (abort): Return type is now ABORT_RETURN_TYPE.
344         (main): Always invoke init_signals, even if POSIX_SIGNALS is not
345         defined.
346         (syms_of_emacs): messages-locale -> system-messages-locale,
347         previous-messages-locale -> previous-system-messages-locale,
348         time-locale -> system-time-locale,
349         previous-time-locale -> previous-system-time-locale.
351         * gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined.
352         (const): Do not define; that's config.h's job.
353         (<limits.h>): Include if HAVE_LIMITS_H is defined.
354         (CHAR_BIT): Move test for definedness outside of limits.h condition.
355         (<stddef.h>): Include if STDC_HEADERS is defined.
356         (FREE_RETURN_TYPE): New macro.
357         (free): Return type is now FREE_RETURN_TYPE.
359         * lisp.h (synchronize_system_time_locale): Renamed from
360         synchronize_time_locale.  All uses changed.
361         (synchronize_system_messages_locale): Likewise, from
362         synchronize_messages_locale.
364         * m/alpha.h (malloc, realloc, calloc): Remove decls;
365         stdlib.h now does this.
367         * process.c (sys_siglist): Remove.
369         * s/sunos4-0.h (ABORT_RETURN_TYPE, FREE_RETURN_TYPE):
370         New macros.
372         * syntax.c (scan_sexps_forward): Use abort, not assert.
374         * sysdep.c (my_sys_siglist): New var.
375         (sys_siglist): New macro.  Remove old initialized vars of same name.
376         (init_signals): Initialize sys_siglist.
378         * xfns.c (abort): Remove decl; stdlib.h now does this.
380 1999-11-18  Dave Love  <fx@gnu.org>
382         * filelock.c: Add forward declaration for get_boot_time_1.
384         * dispnew.c (Finternal_show_cursor_p): Fix doc string.
386 1999-11-18  Gerd Moellmann  <gerd@gnu.org>
388         * buffer.h (struct buffer_text): Add comment about moving
389         buffer text if REL_ALLOC is defined.
391 1999-11-18  Kenichi Handa  <handa@etl.go.jp>
393         * lisp.h (KEY_DESCRIPTION_SIZE): New macro.
395         * keyboard.c (echo_char): Use KEY_DESCRIPTION_SIZE to check free
396         memory for push_key_description.
398         * keymap.c (Fsingle_key_description): Use KEY_DESCRIPTION_SIZE to
399         allocate memory for push_key_description.
400         (describe_buffer_bindings): Likewise.
402 1999-11-17  Gerd Moellmann  <gerd@gnu.org>
404         * xfns.c (Fx_show_busy_cursor): Doc-fix.
405         (Fx_hide_busy_cursor): Ditto.
407 1999-11-17  Marco Walther <walther@siemens-pyramid.com>
409         * unexsni.c (unexec): Handle .rel.dyn section.
411 1999-11-16  Dave Love  <fx@gnu.org>
413         * doc.c (Fdocumentation): Remove gcpro here too.
415 1999-11-16  Gerd Moellmann  <gerd@gnu.org>
417         * keyboard.c (command_loop_1): Remove no_redisplay.
419 1999-11-16  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
421         * print.c (PRINTPREPARE): Don't call setup_echo_area_for_printing
422         in noninteractive.
424 1999-11-14  Gerd Moellmann  <gerd@gnu.org>
426         * xdisp.c (ensure_echo_area_buffers): New.
427         (with_echo_area_buffer): Use it.
428         (setup_echo_area_for_printing): Ditto.
430         * buffer.c (indicate-empty-lines): Doc-fix.
432 1999-11-12  Gerd Moellmann  <gerd@gnu.org>
434         * term.c (term_init): If "op" isn't available, don't support color
435         because we can't switch back to the default foreground and
436         background.
438         * doc.c (Fdocumentation_property): Remove GCPRO because
439         Fsubstitute_command_keys gcpro's the string.
441 1999-11-12  Kenichi Handa  <handa@etl.go.jp>
443         * editfns.c (Ftranslate_region): Check the buffer multibyteness.
445 1999-11-11  Gerd Moellmann  <gerd@gnu.org>
447         * print.c, keymap.c, indent.c, insdel.c, keyboard.c, intervals.c,
448         lread.c, textprop.c, undo.c, emacs.c, lisp.h, intervals.h,
449         buffer.h, config.in, Makefile.in: Remove USE_TEXT_PROPERTIES.
451 1999-11-10  Gerd Moellmann  <gerd@gnu.org>
453         * xfns.c (QCuser_data): Removed.
454         (syms_of_xfns): Initialization of QCuser_data removed.
455         (parse_image_spec): Don't handle :user-data specially.  Allow
456         unknown keys.  Remove parameter ALLOW_OTHER_KEYS.
457         (xbm_image_p, xbm_load, xpm_image_p, pbm_image_p, png_image_p)
458         (tiff_image_p, jpeg_image_p, gif_image_p, gs_image_p): Call
459         parse_image_spec accordingly.
461 1999-11-09  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
463         * cmds.c (Fbeginning_of_line): Doc fix.
464         (Fend_of_line): Doc fix.
466         * editfns.c (Fline_beginning_position): If N is not 1,
467         pass t to Fconstrain_to_field for ESCAPE-FROM-EDGE.
469         * syntax.c (Fforward_word): Handle fields even if would have hit
470         an edge of the buffer.  Return nil if affected by fields.
472 1999-11-09  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
474         * editfns.c (preceding_pos): Function deleted.
475         (text_property_stickiness): Decrement POS directly.
476         Fix a confusion that used PT instead of POS.
478         * editfns.c (find_field): Properly handle the case
479         of a field boundary where `field' inherits from neither side.
481         * editfns.c (Ffield_beginning, Ffield_end): Doc fixes.
482         (Ferase_field, Ffield_string, Ffield_string_no_properties): Doc fixes.
484 1999-11-08  Gerd Moellmann  <gerd@gnu.org>
486         * bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
487         BEFORE_POTENTIAL_GC before DISCARD.
489 1999-11-07  Gerd Moellmann  <gerd@gnu.org>
491         * alloc.c (Fgarbage_collect): Call unmark_byte_stack.
493         * lisp.h: Add prototype for unmark_byte_stack.
495         * bytecode.c (mark_byte_stack): Use XMARKBIT and XMARK.
496         (unmark_byte_stack): Renamed from relocate_byte_pcs.  Use
497         XUNMARK.
499         * xdisp.c (resize_mini_window): Fix computation of needed
500         mini-window height.
502         * alloc.c, buffer.c, editfns.c, xdisp.c: Remove conditional
503         compilation on USE_TEXT_PROPERTIES.
505         * Fbyte_code: Use block statements in cases and declare v1 and v2
506         locally there.  Rearrange case statements so that thos most
507         frequently executed come first.  Avoid goto's in frequently
508         executed cases.
510 1999-11-05  Gerd Moellmann  <gerd@gnu.org>
512         * bytecode.c (Fbyte_code): Use BEFORE_POTENTIAL_GC and
513         AFTER_POTENTIAL_GC around internal_catch.
515         * alloc.c (Fgarbage_collect): Call mark_byte_stack and
516         relocate_byte_pcs.
517         (init_alloc_once, init_alloc): Set byte_stack_list to null.
519         * eval.c (struct catchtag): Add member byte_stack.
520         (internal_catch, Fcondition_case, internal_condition_case)
521         (internal_condition_case_1): Save value of byte_stack_list in
522         catchtag.
523         (unwind_to_catch): Restore byte_stack_list from catchtag.
525         * lisp.h: Add prototypes for new functions in bytecode.c.
526         Add extern declaration for byte_stack_list.
528         * bytecode.c (struct byte_stack): New.
529         (byte_stack_list, mark_byte_stack, relocate_byte_pcs): New
530         (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): New.
531         (FETCH, PUSH, POP, DISCARD, TOP, MAYBE_GC): Rewritten.
532         (HANDLE_RELOCATION): Removed.
533         (Fbyte_code): Use byte_stack structures.
535         * filelock.c (Ffile_locked_p): Make FILENAME a required argument.
537         * buffer.c (syms_of_buffer): Extend documentation of
538         mode-line-format.
540 1999-11-04  Gerd Moellmann  <gerd@gnu.org>
542         * editfns.c (Fdelete_field): Renamed from Ferase_field.
544         * minibuf.c (do_completion, Fminibuffer_complete_word): Use
545         Ferase_field instead of Fdelete_field.
547 1999-11-03  Gerd Moellmann  <gerd@gnu.org>
549         * dispnew.c (Finternal_show_cursor): Change it to set the
550         cursor on/off, not toggle its state.
551         (Finternal_show_cursor_p): New.
552         (syms_of_display): Defsubr Sinternal_show_cursor_p.
554 1999-11-03  Dave Love  <fx@gnu.org>
556         * charset.c (split_non_ascii_string): Define return value.
558 1999-11-03  Gerd Moellmann  <gerd@gnu.org>
560         * minibuf.c (string_to_object): New.
561         (read_minibuf_noninteractive): New.
562         (read_minibuf): Call read_minibuf_noninteractive if
563         noninteractive.  Use string_to_object.
565         * doc.c (Fdocumentation_property): Fix bug bypassing UNGCPRO.
567 1999-11-02  Dave Love  <fx@gnu.org>
569         * gnu-linux.h: Use SIGCHLD, not SIGCLD (not in glibc 2.1).
571         * process.c: Define _GNU_SOURCE before config.h to get strsignal
572         declared with glibc2.
574 1999-11-02  Gerd Moellmann  <gerd@gnu.org>
576         * lisp.h (QUIT): Give it statement form.
578 1999-11-02  Dave Love  <fx@gnu.org>
580         * eval.c (init_eval): Conditionalize declaration of gcpro_level.
582 1999-11-02  Gerd Moellmann  <gerd@gnu.org>
584         * xfns.c (QCuser_data): New.
585         (syms_of_xfns): Initialize QCuser_data.
586         (parse_image_spec): Ignore :user-data DATA properties.
588         * xdisp.c (display_line): Set charpos of first glyph in blank
589         lines not corresponding to any text to -1, even if no glyphs are
590         filled in in that line.
592 1999-11-01  Gerd Moellmann  <gerd@gnu.org>
594         * xfns.c (png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using 
595         png_get_sRGB in #ifdef.
597         * dispnew.c (Finternal_show_cursor): Renamed from Fshow_cursor.
598         (syms_of_display): Use the new name.
600         * textprop.c (verify_interval_modification): Signal text-read-only
601         instead of calling error.
603         * data.c (Qtext_read_only): New built-in error.
604         (syms_of_data): Initialize it.
606         * lisp.h: Add extern declaration for Qtext_read_only.
608         * syntax.c: Remove whitespace after open or in front of closing
609         parentheses.
611 1999-11-01  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
613         * Makefile.in (w16select.o, sound.o): Don't depend on lisp.h.
615 1999-10-31  Gerd Moellmann  <gerd@gnu.org>
617         * xdisp.c (resize_mini_window): Compute needed height differently.
619         * fns.c (Flength): Unroll loop over lists.
621         * xdisp.c (append_space): Return non-zero if space was appended.
622         (display_line): Set charpos of first glyph to -1 only if that
623         glyph is the space added by append_glyph.
625 1999-10-30  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
627         * print.c (strout): Consider `noninteractive' and use stdout
628         only when PRINTCHARFUN is t.
630         * lisp.h (struct gcpro) [DEBUG_GCPRO]: New field `level'.
631         (gcpro_level): Declare it extern.
632         [DEBUG_GCPRO] (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5):
633         Alternate definitions that set `level' and increment `gcpro_level'.
634         [DEBUG_GCPRO] (UNGCPRO): Alternate definition that checks gcpro_level.
636         * eval.c [DEBUG_GCPRO] (gcpro_level): New variable.
637         (init_eval) [DEBUG_GCPRO]: Initialize it.
638         (unwind_to_catch) [DEBUG_GCPRO]: Set gcpro_level
639         from remaining gcprolist.
641 1999-10-29  Kenichi Handa  <handa@etl.go.jp>
643         * coding.c (code_convert_region): Update `dst' correctly.
645 1999-10-28  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
647         * regex.c (POP_FAILURE_POINT): Use failure_id.integer
648         as arg to DEBUG_POP and DEBUG_PRINT.
650 1999-10-28  Gerd Moellmann  <gerd@gnu.org>
652         * fns.c (Fmemq, Fassq, Frassq, assq_no_quit, Fassoc)
653         (Frassoc): Rewritten.
655 1999-10-27  Noah Friedman  <friedman@splode.com>
657         * s/gnu-linux.h [HAVE_DEV_PTMX]: Redefine FIRST_PTY_LETTER to 'z'.
658         Define PTY_NAME_SPRINTF.
659         Redefine PTY_TTY_NAME_SPRINTF.
660         * config.in: Add undef for HAVE_DEV_PTMX.
662 1999-10-26  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
664         * regex.c (POP_FAILURE_POINT): Use failure_id.integer
665         as arg to DEBUG_POP and DEBUG_PRINT.
667 1999-10-27  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
669         * data.c (Qad_activate_internal): Renamed from Qad_activate.
670         (Ffset): Call Qad_activate_internal.
671         (syms_of_data): Initialize Qad_activate_internal.
673 1999-10-27  Gerd Moellmann  <gerd@gnu.org>
675         * xdisp.c (echo_area_display) [HAVE_X_WINDOWS]: Do nothing if
676         Vterminal_frame is selected and Vwindow_system is non-nil.
678 1999-10-26  Gerd Moellmann  <gerd@gnu.org>
680         * xdisp.c (echo_area_display): Put previous change in #if 0.
682         * emacs.c (standard_args): Add `file' as synonym for `visit',
683         `execute' as synonym for `eval'.
684         (main): Add new options to usage message.
686 1999-10-25  Gerd Moellmann  <gerd@gnu.org>
688         * data.c (Qhash_table): New.
689         (Ftype_of): Return it for hash tables.
690         (syms_of_data): Initialize Qhash_table.
692 1999-10-25  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
694         * regex.c (POP_FAILURE_POINT): Extract failure_id as an integer.
696 1999-10-24  Ken Raeburn  <raeburn@raeburn.org>
698         * alloc.c: Undef HIDE_LISP_IMPLEMENTATION before including
699         lisp.h.
701         * buffer.c (Fbuffer_list, Fget_file_buffer, get_truename_buffer,
702         Fbuffer_local_variables, Fother_buffer, record_buffer,
703         set_buffer_internal_1, Fbury_buffer, Fkill_all_local_variables,
704         swap_out_buffer_local_variables, overlays_at, overlays_in,
705         overlay_touches_p, overlay_strings, recenter_overlay_lists,
706         fix_overlays_in_range, fix_overlays_before, Foverlay_get,
707         Foverlay_put, report_overlay_modification, evaporate_overlays):
708         Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member
709         references.
710         * data.c (Fcar, Fcar_safe, Fcdr, Fcdr_safe, Fsetcar, Fsetcdr,
711         swap_in_symval_forwarding, set_internal, default_value,
712         Fset_default, Fmake_variable_buffer_local, Fmake_local_variable,
713         Fmake_variable_frame_local, Flocal_variable_p,
714         Flocal_variable_if_set_p, arithcompare, Fzerop, cons_to_long,
715         Fnumber_to_string, float_arith_driver, Fadd1, Fsub1): Likewise.
716         * dispnew.c (Fframe_or_buffer_changed_p): Likewise.
717         * emacs.c (main): Likewise.
718         * fontset.c (fs_load_font, fs_register_fontset,
719         CACHED_FONTSET_NAME, CACHED_FONTSET_REGEX, Fquery_fontset,
720         Fnew_fontset, Fset_fontset_font): Likewise.
721         * frame.c (do_switch_frame, next_frame, prev_frame,
722         other_visible_frames, Fdelete_frame, Fvisible_frame_list):
723         Likewise.
724         * keyboard.c (read_char, help_char_p, event_to_kboard,
725         kbd_buffer_get_event, timer_start_idle, timer_check,
726         make_lispy_event, apply_modifiers, reorder_modifiers,
727         Fevent_convert_list, lucid_event_type_list_p, menu_bar_items,
728         menu_bar_one_keymap, menu_item_eval_property_1, parse_menu_item,
729         tool_bar_items, read_char_x_menu_prompt, read_key_sequence,
730         Fcommand_execute, Fexecute_extended_command): Likewise.
731         * minibuf.c (read_minibuf, get_minibuffer, Ftry_completion,
732         Fall_completions): Likewise.
733         * window.c (Fset_window_margins): Likewise.
735         * callint.c (quotify_args): Don't explicitly use struct
736         Lisp_Cons, use Lisp_Object and XCAR/XCDR instead.
738         * s/netbsd.h (HAVE_GETLOADAVG): Define as 1.
739         (UNEXEC, START_FILES, LIB_STANDARD, LIB_GCC): Define ELF versions,
740         if __ELF__ is defined.
742 1999-10-24  Gerd Moellmann  <gerd@gnu.org>
744         * window.c (Fnext_window): Add a QUIT in the loop.
746 1999-10-23  Gerd Moellmann  <gerd@gnu.org>
748         * Makefile.in (bootstrap, bootstrap-emacs, bootstrap-temacs): 
749         New targets.
751 1999-10-22  Dave Love  <fx@gnu.org>
753         * emacs.c (main): Enable profiling conditional on __linux also.
755 1999-10-20  Gerd Moellmann  <gerd@gnu.org>
757         * xrdb.c (x_load_resources): Set default resources for resource
758         classes instead of for the specific Emacs.
760 1999-10-19  Gerd Moellmann  <gerd@gnu.org>
762         * s/freebsd.h (HAVE_GETLOADAVG): Define as 1 because config.h
763         defines it that way.
764         
765         * xdisp.c (echo_area_display) [HAVE_X_WINDOWS]: Do nothing
766         if selected_frame is equal to Vterminal_frame.
768 1999-10-19  Paul Eggert  <eggert@twinsun.com>
769         
770         Add support for large files, 64-bit Solaris, system locale codings.
771         
772         * Makefile.in (emacs): Set the LC_ALL environment variable to "C"
773         when dumping, so that the dumped Emacs doesn't have stray locale info.
774         (dired.o): Depend on systime.h.
775         (editfns.o): Depend on coding.h.
777         * alloc.c, buffer.c, callproc.c, ccl.c, charset.c, coding.c, data.c,
778         dispnew.c, editfns.c, emacs.c, filelock.c, floatfns.c, hftctl.c,
779         keyboard.c, process.c, sysdep.c, unexelf.c, unexhp9k800.c,
780         unexsunos4.c, vmsfns.c, vmsgmalloc.c, w32faces.c, w32menu.c, w32term.c,
781         w32xfns.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
782         Include <config.h> before any system include files.
784         * alloc.c, buffer.c, ccl.c, data.c, editfns.c, emacs.c, eval.c,
785         fileio.c, filelock.c, frame.c, insdel.c, keymap.c, lread.c,
786         m/alpha.h, print.c, search.c, sysdep.c, xdisp.c, xfaces.c, xfns.c,
787         xmenu.c, xterm.c:
788         Do not include <stdlib.h>, as <config.h> does this now.
790         * callproc.c (Fcall_process):
791         Synchronize messages locale before invoking strerror.
792         Decode resulting string with locale-coding-system.
794         * coding.c (Vlocale_coding_system): New var.
795         (syms_of_coding): Adjust to above change.
796         (emacs_strerror): New function.
798         * coding.h (emacs_strerror, Vlocale_coding_system): New decls.
799         
800         * config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING,
801         HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN,
802         HAVE_STRSIGNAL): New macros.
803         (BITS_PER_LONG): Default to 64 if _LP64 is defined.
804         <stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't.
806         * dired.c: Include "systime.h".
807         (Ffile_attributes): Do not cast s.st_size to int; this loses
808         information if int is 32 bits but st_size and EMACS_INT are larger.
809         Treat large device numbers like large inode numbers.
811         * dispnew.c (PENDING_OUTPUT_COUNT): Use __fpending if available.
813         * editfns.c: Include coding.h.
814         (emacs_strftime): Remove decl.
815         (emacs_strftimeu): New decl.
816         (emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
817         Use emacs_strftimeu instead of emacs_strftime.
818         (Fformat_time_string): Convert format string using
819         Vlocale_coding_system, and convert result back.  Synchronize time
820         locale before invoking lower level function.  Invoke
821         emacs_memftimeu, passing ut, instead of emacs_memftime.
822         
823         * emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
824         (Vmessages_locale, Vprevious_messages_locale, Vtime_locale,
825         Vprevious_time_locale): New variables.
826         (main): Invoke setlocale early, so that initial error messages are
827         localized properly.  But skip locale-setting if LC_ALL is "C".
828         Fix up locale when it's safe to do so.
829         (fixup_locale): Moved here from xterm.c.
830         (synchronize_locale, synchronize_time_locale,
831         synchronize_messages_locale): New functions.
832         (syms_of_emacs): Accommodate above changes.
834         * fileio.c (report_file_error): Convert strerror output according
835         to Vlocale_coding_system.
836         (Finsert_file_contents): Check for arithmetic overflow in
837         computations that depend on file size.  Report IO errors
838         with emacs_strerror, not strerror.
840         * fns.c (Fgethash): Declare dflt parameter.
842         * gmalloc.c: Do not define const to nothing if HAVE_CONFIG_H
843         is defined; that's config.h's job.
845         * lisp.h (EMACS_INT, BITS_PER_EMACS_INT, EMACS_UINT): If _LP64,
846         default these values to long, BITS_PER_LONG, and unsigned long.
847         (VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT.
848         (PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int.
849         (code_convert_string_norecord, fixup_locale,
850         synchronize_messages_locale, synchronize_time_locale,
851         emacs_open, emacs_close, emacs_read, emacs_write): New decls.
852         All Emacs callers of open, close, read, write changed to use
853         emacs_open, emacs_close, emacs_read, emacs_write.
855         * lread.c (file_offset, file_tell): New macros.  All uses of ftell
856         changed to file_tell.
857         (saved_doc_string_position, prev_saved_doc_string_position): Now
858         of type file_offset.
859         (init_lread): Do not fix locale here; fixup_locale now does this.
861         * m/amdahl.h, s/usg5-4.h:
862         (NSIG): Remove.
863         (NSIG_MINIMUM): New macro.
865         * m/cydra5.h, m/dpx2.h, m/mips.h, m/pfa50.h, m/sps7.h, m/stride.h,
866         m/ustation.h, s/gnu-linux.h, s/hpux.h, s/iris3-5.h, s/iris3-6.h,
867         s/umips.h, s/usg5-4.h:
868         (SIGIO): Do not undef.
869         (BROKEN_SIGIO): New macro.
871         * m/ustation.h:
872         (SIGTSTP): Do not undef.
873         (BROKEN_SIGTSTP): New macro.
875         * s/gnu-linux.h:
876         (SIGPOLL, SIGURG): Do not undef.
877         (BROKEN_SIGPOLL, BROKEN_SIGURG): New macros.
879         * s/ptx4.h:
880         (SIGINFO): Do not undef.
881         (BROKEN_SIGINFO): New macros.
882         
883         * m/delta.h, s/ptx.h, s/template.h: Doc fix.
885         * mktime.c, strftime.c: Update to glibc 2.1.2 version, with
886         some Emacs-related changes merged.
888         * print.c (float_to_string): Prepend "-" to representation of a
889         NaN if the NaN is negative.
891         * process.c (sys_siglist): Omit if HAVE_STRSIGNAL.
892         (wait_reading_process_input): Use emacs_strerror, not strerror.
893         
894         * process.c (status_message, sigchld_handler): Synchronize locale,
895         then use strsignal istead of sys_siglist.
896         * w32proc.c (sys_wait): Likewise.
897         
898         * s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h,
899         s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h,
900         s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h,
901         s/usg5-2.h, s/usg5-3.h, s/xenix.h:
902         (open, close, read, write, INTERRUPTIBLE_OPEN,
903         INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove.
905         * s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros.
907         * sysdep.c (sys_read, sys_write, read, write, sys_close, close,
908         sys_open, open): Remove.
909         (emacs_open, emacs_close, emacs_read, emacs_write): Always define;
910         the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
911         macros are no longer used.
912         (emacs_open): Renamed from sys_open.  Merge BSD4_1 version.
913         (emacs_close): Renamed from sys_close.
914         (emacs_read): Renamed from sys_read.
915         (emacs_write): Renamed from sys_write.
916         (sys_siglist): Do not declare if HAVE_STRSIGNAL.
917         (dup2): Do not print error on failure; the real dup2 doesn't.
918         (strsignal): New function, defined if !HAVE_STRSIGNAL.
920         * syssignal.h (SIGINFO): Undef if defined and if BROKEN_SIGINFO
921         is defined.
922         (SIGIO, SIGPOLL, SIGTSTP, SIGURG): Likewise.
923         (NSIG): If less than NSIG_MINIMUM, define to NSIG_MINIMUM.
924         (strsignal): Declare if !HAVE_STRSIGNAL.
926         * unexelf.c (ElfBitsW, ELFSIZE, ElfExpandBitsW): New macros.
927         (ElfW): Define in terms of ElfExpandBitsW.
929         * w32proc.c (sys_siglist): Remove decl.
931         * xdisp.c (decode_mode_spec): 3rd arg is int, not char, to comply
932         with ANSI C.
933         (display_string): Declare face_string_pos arg.
935         * xfns.c (Fx_show_tip): Declare timeout param.
937         * xterm.c: No need to include locale.h.
938         (x_alloc_lighter_color, x_setup_relief_color):
939         Pass arg as double, not float, for compatibility with ANSI C.
940         (fixup_locale): Move to emacs.c.
941         (x_term_init): Do not setlocale or fixup locale; the main program
942         does this now.
944 1999-10-18  Dave Love  <fx@gnu.org>
946         * doc.c (Fdocumentation_property): Gcpro `tem'.
948 1999-10-18  Kenichi Handa  <handa@etl.go.jp>
950         * lread.c (Fload): Calculate bytes of filename correctly.
951         (openp): Likewise.
953 1999-10-18  Keisuke Nishida  <kxn30@po.cwru.edu>
955         * print.c (print_preprocess): In case print-circle is nil,
956         add OBJ to Vprint_number_table only when OBJ is a symbol.
958 1999-10-18  Kenichi Handa  <handa@etl.go.jp>
960         * coding.c (code_convert_string): Add record_unwind_protect to
961         assure setting inhibit_pre_post_conversion back to zero.  Take
962         care of the multibyteness of the working buffer.
964         * coding.c (inhibit_pre_post_conversion): New variable.
965         (setup_coding_system): If inhibit_pre_post_conversion is nonzero,
966         ignore post-read-conversion and pre-write-conversion property of
967         the coding system.
968         (code_convert_region_unwind): New function.
969         (code_convert_region): Set inhibit_pre_post_conversion to 1 while
970         running pre-write-conversion and post-read-conversion.
971         (code_convert_string): Likewise.
973 1999-10-17  Miles Bader  <miles@gnu.org>
975         * editfns.c: Doc fix.
977 1999-10-17  Miles Bader  <miles@gnu.org>
979         * editfns.c (Fconstrain_to_field): Make sure we don't violate the
980         argument preconditions of find_before_next_newline in the case
981         where both ONLY_IN_LINE and ESCAPE_FROM_EDGE are set and OLD_POS
982         was indeed at the edge.
984 1999-10-17  Miles Bader  <miles@gnu.org>
986         * minibuf.c (Fminibuffer_complete_and_exit): Supply value for new
987         ESCAPE_FROM_EDGE parameter to Ffield_beginning.
989         * editfns.c (text_property_eq, text_property_stickiness): Don't
990         use initializers for auto variables of type Lisp_Object.
991         (find_field): Likewise.  Use braces around nested ifs.
992         (Fline_end_position): Store the raw eol in a variable, so that the
993         final expression doesn't look so ugly.
994         (Fconstrain_to_field): Doc fix.
995         (preceding_pos): Renamed from `preceeding_pos'.
996         (text_property_stickiness, find_field): Call preceding_pos,
997         not preceeding_pos.
999 1999-10-17  Miles Bader  <miles@gnu.org>
1001         * editfns.c (Ffield_string_no_properties): New function.
1002         (text_property_stickiness, preceeding_pos): New functions.
1003         (Ffield_string): Remove PROPS parameter.
1004         (find_field): Add MERGE_AT_BOUNDARY parameter.
1005         Rewrite to use stickiness of `field' property to resolve
1006         ambiguous cases.
1007         (Ffield_beginning, Ffield_end): Add ESCAPE_FROM_EDGE parameter.
1008         (Fconstrain_to_field): Likewise.
1009         (syms_of_editfns): Init Sfield_string_no_properties.
1010         (Ffield_string, Ferase_field, Ffield_end): 
1011         Supply new MERGE_AT_BOUNDARY argument to find_field.
1012         (Fline_beginning_position, Fline_end_position): Supply new
1013         ESCAPE_FROM_EDGE parameter to Fconstrain_to_field.
1014         Pass a value of Qt for the ONLY_IN_LINE argument to
1015         Fconstrain_to_field (only matters if N != 1).
1016         * syntax.c (Fforward_word): Supply new ESCAPE_FROM_EDGE parameter
1017         to Fconstrain_to_field.
1019         * minibuf.c (Fminibuffer_complete_word): Use
1020         Ffield_beginning to find the prompt end.
1022 1999-10-17  Miles Bader  <miles@gnu.org>
1024         * editfns.c (Fconstrain_to_field): Add get/set-current-point
1025         behavior when NEW_POS is nil.
1026         (find_field): Use XSETFASTINT instead of make_number.
1027         * minibuf.c (Fminibuffer_complete_and_exit): Test for an empty
1028         input string by seeing where the field begins, instead of
1029         looking at text-properties.
1031 1999-10-17  Miles Bader  <miles@gnu.org>
1033         * editfns.c (Qfield): New variable.
1034         (find_field, Ferase_field, Ffield_string,
1035         Ffield_beginning, Ffield_end, Fconstrain_to_field): New functions.
1036         (Fline_beginning_position, Fline_end_position): Constrain to any field.
1037         (make_buffer_string_both): Remove minibuffer-prompt hack.
1038         (syms_of_editfns): Initialize Qfield, and subr entries for
1039         field functions above.
1040         * minibuf.c (read_minibuf): Don't save minibuffer prompt length on
1041         minibuf_save_list.
1042         Don't initialize minibuffer prompt length.
1043         Wrap prompt text-properties around the entire prompt.
1044         Add 'prompt text-property to prompt.
1045         Get final value with Ffield_string instead of make_buffer_string.
1046         (read_minibuf_unwind): Don't restore minibuffer prompt length from
1047         minibuf_save_list.
1048         (do_completion): Get minibuffer input with Ffield_string
1049         instead of Fbuffer_string.
1050         Erase minibuffer input with Ferase_field instead of erase_buffer.
1051         (Fminibuffer_complete_and_exit): Likewise.
1052         Test whether buffer is empty by looking for the 'prompt text
1053         property at the end.
1054         Set prompt length by looking for the end of the prompt text property,
1055         and save prompt length for later use (since there is no longer a
1056         buffer variable to get it from).
1057         (Fminibuffer_prompt_width, Fminibuffer_prompt_end): Functions removed.
1058         (syms_of_minibuf): Remove initializations of
1059         Sminibuffer_prompt_width and Sminibuffer_prompt_end.
1060         * buffer.h (struct buffer): Remove prompt_end_charpos field.
1061         * buffer.c (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer): 
1062         Don't initialize prompt_end_charpos field.
1063         * syntax.c (Fforward_word): Likewise.
1064         Constrain to any field.
1066 1999-10-16  Gerd Moellmann  <gerd@gnu.org>
1068         * window.c (enum save_restore_action): New.
1069         (save_restore_orig_size): Change parameter list.  Add
1070         functionality to check for valid orig_top and orig_height members
1071         in a window tree.
1072         (grow_mini_window): Call save_restore_orig_size with new parameter
1073         list.
1074         (shrink_mini_window): Restore old window sizes only if old
1075         size information is valid in all windows in a window tree.
1076         
1077 1999-10-15  Gerd Moellmann  <gerd@gnu.org>
1079         * xmenu.c (set_frame_menubar): Don't call
1080         x_set_menu_resources_from_menu_face here.
1081         (update_frame_menubar): Call x_set_menu_resources_from_menu_face.
1083         * xfns.c (gif_load): Fix handling of interlaced GIFs.
1085 1999-10-14  Dave Love  <fx@gnu.org>
1087         * xdisp.c (handle_fontified_prop): GCPRO `pos'.
1089 1999-10-14  Gerd Moellmann  <gerd@gnu.org>
1091         * process.c (Fopen_network_stream): Don't loop if gethostbyname
1092         fails and h_errno is TRY_AGAIN.
1094 1999-10-13  Dave Love  <fx@gnu.org>
1096         * filelock.c (lock_file): Move gcpro of `fn'.
1098 1999-10-10  Gerd Moellmann  <gerd@gnu.org>
1100         * keyboard.c (auto-save-interval): Fix documentation.
1101         
1102 1999-10-09  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
1104         * print.c (print): When removing objects from Vprint_number_table,
1105         only scan the newly added objects.
1106         (print_preprocess): If OBJ is a gensym, and print-continuous-numbering,
1107         unconditionally force it to stay in the table.
1109 1999-10-09  Gerd Moellmann  <gerd@gnu.org>
1111         * xfns.c (prepare_image_for_display): Don't try to load image if
1112         loading it failed before.
1113         (lookup_image, prepare_image_for_display): Remember if loading the
1114         image failed.
1115         (xpm_load): Add missing UNBLOCK_INPUT.
1117         * dispextern.h (struct image): New member load_failed_p.
1119 1999-10-08  Stefan Monnier  <monnier@cs.yale.edu>
1121         * fileio.c (Fmake_temp_name): add a reference to `make-temp-file'
1122         in the docstring.
1124 1999-10-08  Gerd Moellmann  <gerd@gnu.org>
1126         * xterm.c (XTread_socket) <ClientMessage, WM_TAKE_FOCUS>:
1127         Don't call XSetInputFocus because that can generate additional
1128         FocusIn events.
1129         
1130 1999-10-07  Jeffrey C Honig <jch@bsdi.com>
1132         * bsdos4.h [HAVE_LIBNCURSES]: Define TERMINFO and LIBS_TERMCAP.
1134 1999-10-07  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
1136         * process.c (wait_reading_process_input): When trying to suck
1137         input from one process, for accept-process-output,
1138         exit that loop if we get EAGAIN or EWOULDBLOCK.
1140 1999-10-07  Gerd Moellmann  <gerd@gnu.org>
1142         * xfaces.c (Qbitmap_spec_p): Replaces Qpixmap_spec_p.
1143         (Fbitmap_spec_p): Replaces Fpixmap_spec_p.
1144         (load_pixmap): Use Fbitmap_spec_p and Qbitmap_spec_p instead of
1145         Fpixmap_spec_p and Qpixmap_spec_p.
1146         (load_face_colors, check_lface_attrs,
1147         merge_face_vector_with_property,
1148         Finternal_set_lisp_face_attribute): Use Fbitmap_spec_p.
1149         (syms_of_xfaces): Initialize Qbitmap_spec_p, defsubr
1150         Fbitmap_spec_p.
1152 1999-10-07  Gerd Moellmann  <gerd@gnu.org>
1154         * xdisp.c (display_menu_bar): Use MENU_FACE_ID instead of
1155         MODE_LINE_FACE_ID.
1157         * xfaces.c (toplevel) [USE_MOTIF]: Include some Motif headers.
1158         (struct x_resources) [USE_X_TOOLKIT]: New.
1159         (xm_apply_resources, xm_set_menu_resources_from_menu_face)
1160         [USE_MOTIF]: New.
1161         (xl_apply_resources, xl_set_menu_resources_from_menu_face)
1162         [USE_LUCID]: New.
1163         (x_set_menu_resources_from_menu_face) [USE_X_TOOLKIT]: New.
1164         (Qmenu): New.
1165         (syms_of_xfaces): Initialize Qmenu.
1166         (realize_basic_faces): Realize face `menu'.
1167         (resolve_face_name): New.
1168         (lface_from_face_name): Use it.
1169         (Finternal_set_lisp_face_attribute): Ditto.
1170         (Fpixmap_spec_p): Rewritten.  Extend doc string.
1172         * xmenu.c (set_frame_menubar, xmenu_show): Call
1173         x_set_menu_resources_from_menu_face.
1175         * dispextern.h (enum face_id): Add MENU_FACE_ID.
1176         (toplevel): Include X11/Intrinsic.h.
1178 1999-10-03  Ken'ichi Handa  <handa@gnu.org>
1180         * coding.c (DECODE_CHARACTER_ASCII): Decode ASCII invocated to GR
1181         correctly.
1183 1999-09-30  Kenichi Handa  <handa@etl.go.jp>
1185         * category.c (modify_lower_category_set): Set default value of
1186         TABLE correctly.
1188         * minibuf.c (Fminibuffer_complete_word): Calculate string byte
1189         size correctly.
1191 1999-09-29  Gerd Moellmann  <gerd@gnu.org>
1193         * editfns.c (Fpropertize): Renamed from Fproperties.
1195 1999-09-29  Gerd Moellmann  <gerd@gnu.org>
1197         * xdisp.c (resize_mini_window): Do nothing if frame is an X
1198         frame that hasn't been initialized yet.
1200 1999-09-28  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
1202         * keymap.c (Fsingle_key_description): Make tem big enough.
1203         (describe_buffer_bindings): Make buf big enough.
1205 1999-09-27  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
1207         * intervals.c (get_local_map): Use indirect_function,
1208         not Findirect_function.
1210 1999-09-27  Dave Love  <fx@gnu.org>
1212         * cm.h: Remove unneeded declaration of ospeed.
1214 1999-09-26  Gerd Moellmann  <gerd@gnu.org>
1216         * lisp.h (toplevel): Add prototype for
1217         next_single_char_property_change.
1219         * textprop.c (next_single_char_property_change): New.
1221         * xdisp.c (display_prop_end, invisible_text_between_p): Use
1222         next_single_char_property_change.
1224 1999-09-25  Gerd Moellmann  <gerd@gnu.org>
1226         * editfns.c (Fproperties): New.
1227         (syms_of_editfns): Defsubr it.
1229         * xfns.c (lookup_image): Set image's timestamp because it's
1230         used when we look it up.
1232 1999-09-23  Gerd Moellmann  <gerd@gnu.org>
1234         * window.c (enlarge_window): Add window parameter instead of using
1235         selected_window.
1236         (Fdisplay_buffer): Call it with window parameter instead of
1237         setting selected_window.
1238         (Fenlarge_window, Fshrink_window): Ditto.
1239         (shrink_mini_window): If there is no recorded height and position
1240         info, resize mini-window to height 1.
1242         * xfns.c (image_error): Use add_to_log.
1244         * xfaces.c (load_pixmap): Call add_to_log without frame parameter.
1245         (load_face_font_or_fontset, load_color,
1246         merge_face_vector_with_property): Ditto.
1248         * dispextern.h: Add prototype for add_to_log.
1250         * xfaces.c (add_to_log): Move to xdisp.c.
1252         * xdisp.c (add_to_log): Moved from xfaces.c.  Remove frame
1253         parameter.
1255 1999-09-23  Gerd Moellmann  <gerd@gnu.org>
1257         * xterm.c (XTread_socket) <MotionNotify>: Change #ifdef
1258         USE_X_TOOLKIT to #ifdef USE_TOOLKIT_SCROLL_BARS.
1260         * xdisp.c (resize_mini_window): Use grow_mini_window and
1261         shrink_mini_window.
1263         * window.c (window_min_size): Add parameter ignore_fixed_p.
1264         (change_window_height): Call window_min_size with new parameter.
1265         (shrink_window_lowest_first, save_restore_orig_size,
1266         grow_mini_window, shrink_mini_window): New.
1267         (make_window, replace_window): Initialize orig_top and
1268         orig_height.
1269         (enlarge_window): Renamed from change_window_height.  Make it
1270         static.
1271         (Fdisplay_buffer, Fenlage_window, Fshrink_window): Call
1272         enlarge_window instead of change_window_height.
1274         * window.h (struct window): New members orig_top, orig_height.
1275         (toplevel): Add prototypes for grow_mini_window and
1276         shrink_mini_window.  Remove prototype for change_window_height.
1278 1999-09-21  Eli Zaretskii  <eliz@gnu.org>
1280         * frame.c (frame_name_fnn_p): Fix previous change.
1282 1999-09-20  Gerd Moellmann  <gerd@gnu.org>
1284         * minibuf.c (toplevel): Move include of stdio.h to other includes.
1286         * dispnew.c (direct_output_for_insert): Cast arguments to
1287         safe_bcopy to char *.
1289         * lread.c (readchar): Remove unused variables.
1290         (read_filtered_event, read1, Fmapatoms): Ditto.
1291         (toplevel): Include intervals.h.
1293         * eval.c (Fsignal): Remove unused variables.
1294         (Fcommandp, do_autoload): Ditto.
1296         * lisp.h: Add prototype for safe_bcopy, fatal.
1298         * editfns.c (init_editfns): Remove unused variables.
1299         (Fgoto_char, Fchar_after, Fformat): Ditto.
1300         (message_text, message_length): Put in #ifndef HAVE_MENUS.
1302         * data.c (find_symbol_value): Remove unused variables.
1303         (Faref, Fstring_to_number): Ditto.
1304         (toplevel): Include stdio.h.
1305         (Fnumber_to_string): Cast XINT to long for %ld.
1307         * casefiddle.c (casify_object): Remove unused variables.
1308         (casify_region): Ditto.
1310         * filelock.c (get_boot_time): Put local variable used in 
1311         conditinally compiled section in #ifdef.
1312         (toplevel): Include stdio.h.
1314         * keymap.c (Flookup_key, Faccessible_keymaps, describe_vector,
1315         keys_of_keymap, syms_of_keymap): Remove unused variables.
1317 1999-09-20  Gerd Moellmann  <gerd@gnu.org>
1319         * xdisp.c (sync_frame_with_window_matrix_rows): Disable frame rows
1320         whose corresponding window rows have been disabled in
1321         try_window_id.
1323 1999-09-20  Gerd Moellmann  <gerd@gnu.org>
1325         * xdisp.c (compute_window_start_on_continuation_line): Handle case
1326         that window start is out of range.
1327         (handle_display_prop, handle_single_display_prop): Replace
1328         marginal area specifications like `left-margin' with `(margin
1329         left-margin)'.
1330         (Qmargin): New.
1331         (syms_of_xdisp): Initialize Qmargin.
1333 1999-09-19  Gerd Moellmann  <gerd@gnu.org>
1335         * syntax.c (update_syntax_table, find_defun_start, back_comment,
1336         describe_syntax, skip_chars): Remove unused variables.
1337         (back_comment, forw_comment): Add braces to if-statement with
1338         if-else as dependent statement.
1340         * process.c (list_processes_1): Remove unused variables.
1341         (Fopen_network_stream, create_process): Add parentheses to
1342         conditional expressions.
1343         (create_process): Put declaration of sigchld in #if 0.
1344         (Fopen_network_stream): Removed unused variables.
1345         (Fopen_network_stream, wait_reading_process_input,
1346         wait_reading_process_input, send_process, send_process): Ditto.
1347         (toplevel): Add prototypes for set_waiting_for_input and
1348         keyboard_bit_set.
1350         * abbrev.c (Fexpand_abbrev): Remove unused variables.
1352         * textprop.c (Fset_text_properties): Remove unused variables.
1353         (text_property_list, verify_interval_modification,
1354         interval_has_all_properties): Ditto.
1356         * callproc.c (toplevel) [HAVE_UNISTD_H]: Include unistd.h.
1357         (Fcall_process): Remove unused variable.
1359         * keyboard.c (Frecursive_edit): Remove unused variable.
1360         (command_loop_1, safe_run_hooks, kbd_buffer_get_event,
1361         timer_check, make_lispy_event, menu_bar_items,
1362         menu_bar_one_keymap, menu_bar_item, parse_menu_item,
1363         parse_tool_bar_item, read_char_x_menu_prompt, read_key_sequence,
1364         kbd_buffer_get_event, make_lispy_event, read_char_x_menu_prompt,
1365         read_key_sequence): Ditto.  Fread_key_sequence,
1366         Fread_key_sequence_vector, Fsuspend_emacs): Ditto.
1367         (read_key_sequence) [GOBBLE_FIRST_EVENT]: Put local variables only
1368         used when GOBBLE_FIRST_EVENT is defined in #ifdef
1369         (Fexecute_extended_command): Cast XINT to long for %ld.
1370         (toplevel) [HAVE_UNISTD_H]: Include unistd.h.
1371         (toplevel): Include sys/types.h.
1373         * lisp.h (RETURN_UNGCPRO): Use do-while (0) idiom.
1374         (toplevel): Add prototypes for stuff_char, and
1375         code_convert_string_norecord.
1377 1999-09-19  Gerd Moellmann  <gerd@gnu.org>
1379         * buffer.h: Add prototype for r_re_alloc.
1381         * insdel.c (copy_text): Removed unused variables.
1382         (count_combining_after, count_combining_after, insert_1_both,
1383         insert_from_string_1, insert_from_buffer_1, check_markers): Ditto.
1384         (adjust_after_replace, replace_range): Add parentheses to logical
1385         expressions.  Remove unused variables.
1386         (CHECK_BYTE_COMBINING_FOR_INSERT): Add parentheses to logical
1387         expression.
1389         * alloc.c (Fgarbage_collect): Remove unused variable.
1390         (compact_strings): Add parentheses around assignments in
1391         conditional context.
1392         (toplevel): Put declaration of unused function clear_marks
1393         in #if 0 like its definition.
1395         * lisp.h: Add prototype for shrink_regexp_cache,
1396         sweep_weak_hash_tables.
1398 1999-09-19  Dave Love  <fx@gnu.org>
1400         * process.c (Fopen_network_stream): Use strerror, not gai_strerror.
1402         * doc.c (read_bytecode_char): Declare arg.
1404         * lisp.h: Declare Fcurrent_message, Fmake_temp_name,
1405         read_bytecode_char, Fx_hide_busy_cursor, getloadavg.
1407 1999-09-18  Richard Stallman  <rms@gnu.org>
1409         * xdisp.c (echo_area_display): Turn off code that returned
1410         without doing anything when using a terminal frame.
1412 1999-09-17  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
1414         * unexelf.c (unexec): Don't get confused by a short section
1415         just before the bss section.
1417 1999-09-16  Gerd Moellmann  <gerd@gnu.org>
1419         * emacs.c (main): Remove unused variables.
1420         (sort_args, Fkill_emacs, Fkill_emacs): Ditto.
1422         * lisp.h: Add prototype for uninterrupt_malloc, memory_warnings,
1423         init_fileio_once, syms_of_sound, init_xfns, init_fns
1424         init_sound, check_message_stack.
1426         * emacs.c (toplevel) [HAVE_UNISTD_H]: Include unistd.h.
1428         * intervals.c (rotate_right, rotate_left): Add braces to avoid
1429         ambiguous else warning.
1430         (split_interval_left): Remove unused variables.
1431         (previous_interval, adjust_intervals_for_deletion,
1432         set_point_both, set_point_both, set_intervals_multibyte_1): Ditto.
1433         (icount, idepth, zero_length): Move into #if 0 section below
1434         original position where these are used.
1436         * buffer.h [REL_ALLOC]: Add prototypes for r_alloc and r_alloc_free.
1438         * buffer.c (Fkill_buffer): Remove unused variables.
1439         (Fkill_buffer, overlays_at, overlays_in, recenter_overlay_lists,
1440         fix_overlays_in_range, Fmove_overlay, Fprevious_overlay_change,
1441         init_buffer_once, (syms_of_buffer): Ditto.
1443         * xrdb.c (get_fallback): Remove unused variable.
1444         (x_load_resources): Ditto.  Put local variable used for Motif only
1445         in #ifdef USE_MOTIF.
1447 1999-09-16  Gerd Moellmann  <gerd@gnu.org>
1449         * minibuf.c (read_minibuf): Remove unused variables.
1450         (read_minibuf, Fread_buffer, scmp, Fcompleting_read): Ditto.
1451         (do_completion): Move assignment out of conditional context.
1452         (Fdisplay_completion_list): Add parentheses to conditional expression.
1454         * cm.c (toplevel) [HAVE_TERMCAP_H]: Include termcap.h.
1456         * lisp.h: Add prototype for no_switch_window.
1458         * window.c (Fset_window_buffer): Remove unused variables.
1459         (Fset_window_margins): Ditto.
1461         * xdisp.c (resize_mini_window): Temporarily set the selected
1462         window's or Vminibuf_scroll_window's height to "fixed" around
1463         the call the change_window_height.
1465         * window.c (window_fixed_size_p): Check window's height_fixed_p
1466         flag.
1468         * window.h (struct window): New member height_fixed_p.
1470         * dispnew.c (direct_output_forward_char): Don't use this method
1471         if showing a message or a message was just cleared because we
1472         might need to resize the mini-window.
1474 1999-09-16  Gerd Moellmann  <gerd@gnu.org>
1476         * frame.c (Fdelete_frame): Correct local variable pointing to
1477         selected frame after selecting new frame.
1479 1999-09-15  Richard Stallman  <rms@gnu.org>
1481         * puresize.h (BASE_PURESIZE): Increase to 525000.
1483         * filelock.c (Vtemporary_file_directory): New variable.
1484         (syms_of_filelock): Set up Lisp variable.
1486 1999-09-15  Gerd Moellmann  <gerd@gnu.org>
1488         * term.c (OUTPUT_IF, OUTPUT1_IF): Use do-while.
1489         (encode_terminal_code): Remove unused variables.
1490         (turn_off_face): Ditto.
1491         (toplevel): Include termcap.h if HAVE_TERMCAP_H.
1493         * dispnew.c (update_frame_line): If writing whole desired line,
1494         don't clear to end of line if already at the end.
1496 1999-09-15  Gerd Moellmann  <gerd@gnu.org>
1498         * xdisp.c (resize_mini_window): Don't report changed window
1499         height if it actually hasn't changed.
1501         * widget.c (set_frame_size, EmacsFrameSetCharSize):  Remove 
1502         unused variables.
1503         (mark_shell_size_user_specified): Put in #if 0 because not used.
1504         (create_frame_gcs): Put in #if 0 because currently unused.
1505         (first_frame_p): Ditto.
1507         * xmenu.c (single_menu_item, Fx_popup_menu, Fx_popup_menu,
1508         single_submenu, update_frame_menubar, set_frame_menubar,
1509         free_frame_menubar, xmenu_show, xdialog_show): Remove unused
1510         variables.
1512         * print.c (PRINTFULLP): Removed because it is no longer used and
1513         is misleading.
1514         (Ferror_message_string): Remove unused variables.
1515         (print_object): Cast argument of sprintf to long for `%ld'
1516         specifier.  Remove unused variable.
1518 1999-09-14  Gerd Moellmann  <gerd@gnu.org>
1520         * sound.c (Fplay_sound): Remove usused variables.
1521         (be2hs): Put in #if 0 because it's currently not used.
1523 1999-09-14  Ken Raeburn  <raeburn@gnu.org>
1525         * print.c (Ferror_message_string, print_error_message,
1526         print_object): Use XCAR, XCDR and XFLOAT_DATA instead of explicit
1527         member access.
1529 1999-09-14  Gerd Moellmann  <gerd@gnu.org>
1531         * frame.h (CHECK_FRAME, CHECK_LIVE_FRAME): Put code in do-while.
1533         * frame.c (Fnext_frame): Remove unused variable(s).
1534         (Fprevious_frame, Fmouse_pixel_position, frame_name_fnn_p): Ditto.
1535         (store_frame_param): Add parentheses to conditional expression.
1536         (Fmodify_frame_parameters): Remove unused variables.
1537         (Fmodify_frame_parameters, Fset_frame_size, Fset_frame_position):
1538         Ditto.
1540         * xfns.c (x_set_background_color): Remove unused variable(s).
1541         (x_set_border_pixel): Ditto.
1542         (x_set_menu_bar_lines): Put local variable used only for
1543         non-toolkit case in #ifdef/#endif.
1544         (x_figure_window_size): Remove unused variable(s).
1545         (x_figure_window_size, x_window, lookup_image, 
1546         xbm_read_bitmap_file_data, x_build_heuristic_mask, pbm_load,
1547         png_load, jpeg_load, gif_load, x_create_tip_frame,
1548         x_create_tip_frame, Fx_show_tip, x_set_border_pixel): Ditto.
1550         * xterm.c (x_scroll_bar_handle_click): Compile only if
1551         not USE_TOOLKIT_SCROLL_BARS.
1552         (x_scroll_bar_set_handle, x_scroll_bar_note_movement): Ditto.
1554         * dispextern.h: Add prototypes for gamma_correct and
1555         x_kill_gs_process.
1557         * xterm.c (x_produce_glyphs): Remove unused variable(s).
1558         (x_alloc_nearest_color_for_widget, note_tool_bar_highlight,
1559         x_set_toolkit_scroll_bar_thumb): Ditto.
1560         (x_scroll_bar_create): Move local variable to the
1561         conditionally compiled section of code where it is used.
1562         (x_scroll_bar_create): Remove unused variable(s).
1563         (x_scroll_bar_remove, XTread_socket): Ditto.
1564         (XTread_socket) <ConfigureNotify>: Move variables used for
1565         non-toolkit case into conditionally compiled section of code.
1567         * window.h (freeze_window_starts): Fix typo in prototype.
1569         * xdisp.c (display_echo_area_1, try_window_id): Remove unused
1570         variable(s).
1572         * lisp.h: Add prototype for debug_print.
1574         * dispextern.h (xassert) [GLYPH_DEBUG]: Change definition
1575         to use do-while.
1577         * fns.c (SXHASH_COMBINE): Add missing parentheses.
1578         (Fchar_table_range, Fset_char_table_default, mapcar1,
1579         Fyes_or_no_p, sweep_weak_hash_tables): Remove unused variable(s).
1581         * lisp.h: Add prototype for getloadavg.
1583 1999-09-14  Andreas Schwab  <schwab@gnu.org>
1585         * process.c (Fopen_network_stream): Avoid socket decriptor leak.
1587         * lisp.h: Declare close_file_unwind.
1589 1999-09-14  Richard Stallman  <rms@gnu.org>
1591         * filelock.c (get_boot_time): Make the temp name in the proper dir.
1593 1999-09-13  Gerd Moellmann  <gerd@gnu.org>
1595         * xdisp.c (redisplay_window): Make sure start_at_line_beg
1596         is always set correctly.
1598 1999-09-13  Dave Love  <fx@gnu.org>
1600         * xdisp.c (move_it_in_display_line_to): Make type consistent with
1601         declaration.
1603 1999-09-13  Gerd Moellmann  <gerd@delysid.gnu.org>
1605         * xdisp.c (QCfile): Move here from xfns.c.
1606         (syms_of_xdisp): Initialize it.
1607         (message2_nolog): Change for Lisp_Object selected_frame.
1608         (message3_nolog, message_with_string, message,
1609         setup_echo_area_for_printing, truncate_echo_area,
1610         prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto.
1612 1999-09-13  Dave Love  <fx@gnu.org>
1614         * xterm.c: Don't continue #define args for benefit of old cc.
1615         (xt_action_hook): Indent #error for benefit of K&R cc.
1617 1999-09-13  Gerd Moellmann  <gerd@delysid.gnu.org>
1619         * xterm.c (XTcursor_to): Change for Lisp_Object selected_frame.
1620         (x_clear_frame, XTring_bell, XTmouse_position, XTread_socket): Ditto.
1621         (XRINGBELL): Removed.
1623 1999-09-13  Dave Love  <fx@gnu.org>
1625         * xfns.c (x_put_x_image): Make type consistent with declaration.
1627         * fns.c (Fmake_hash_table): Fix string continuation.
1629 1999-09-13  Gerd Moellmann  <gerd@delysid.gnu.org>
1631         * xfns.c (QCfile): Moved to xdisp.c.
1632         (syms_of_xfns): Don't initialize QCfile.
1633         (check_x_frame): Change for Lisp_Object selected_frame.
1634         (check_x_display_info, x_get_resource_string): Ditto.
1636 1999-09-13  Gerd Moellmann  <gerd@gnu.org>
1638         * minibuf.c (choose_minibuf_frame): Don't try to set the
1639         mini-buffer window's buffer, if the buffer is invalid.
1641         * xfns.c (QCfile): Moved to xdisp.c.
1642         (syms_of_xfns): Don't initialize QCfile.
1644         * xdisp.c (QCfile): Move here from xfns.c.
1645         (syms_of_xdisp): Initialize it.
1647         * lisp.h (selected_frame): Add external declaration.
1649         * xselect.c (x_own_selection): Change for Lisp_Object selected_frame.
1650         (Fx_store_cut_buffer_internal): Ditto.
1651         (Fx_rotate_cut_buffers_internal): Ditto.
1653         * xfaces.c (frame_or_selected_frame): Change for Lisp_Object
1654         selected_frame.
1655         (Finternal_set_lisp_face_attribute): Ditto.
1656         (Finternal_get_lisp_face_attribute): Ditto.
1657         (Finternal_lisp_face_empty_p): Ditto.
1658         (Fdump_face): Ditto.
1660         * term.c (OUTPUT): Change for Lisp_Object selected_frame.
1661         (OUTPUT_IF, ring_bell, set_terminal_modes, reset_terminal_modes,
1662         set_terminal_window, set_scroll_region, reassert_line_highlight,
1663         change_line_highlight, cursor_to, raw_cursor_to, clear_to_end,
1664         clear_end_of_line, clear_end_of_line_raw, clear_end_of_line_raw,
1665         encode_terminal_code, write_glyphs, term_init): Ditto.
1667         * sysdep.c (reset_sys_modes): Change for Lisp_Object selected_frame.
1668         (kbd_input_ast, read_input_waiting): Ditto.
1670         * minibuf.c (choose_minibuf_frame): Change for Lisp_Object
1671         selected_frame.
1672         (read_minibuf): Ditto.
1674         * keyboard.c (command_loop_1): Change for Lisp_Object
1675         selected_frame.
1676         (cmd_error_internal, command_loop_1, read_char,
1677         kbd_buffer_get_event, read_avail_input,
1678         read_char_minibuf_menu_prompt, read_key_sequence, Fsuspend_emacs,
1679         interrupt_signal, quit_throw_to_read_char): Ditto.
1681         * fontset.c (Ffont_info): Change for Lisp_Object selected_frame.
1682         (Ffontset_info): DItto.
1684         * emacs.c (handle_USR1_signal): Change for Lisp_Object selected_frame.
1686         * dispnew.c (selected_frame): Make it a Lisp_Object.
1687         (adjust_frame_glyphs_initially): Change for Lisp_Object selected_frame.
1688         (direct_output_for_insert, direct_output_forward_char,
1689         init_display): Ditto.
1691         * data.c (swap_in_symval_forwarding): Change for Lisp_Object
1692         selected_frame.
1693         (set_internal): Ditto.
1695         * buffer.c (Fother_buffer): Change for Lisp_Object selected_frame.
1696         (record_buffer): Ditto.
1698         * frame.c (Fmake_terminal_frame): Use SELECTED_FRAME.
1699         (do_switch_frame): Change for Lisp_Object selected_frame.
1700         (Fselected_frame): Ditto.
1701         (Fframe_first_window): Use SELECTED_FRAME.
1702         (Fframe_root_window): Change for Lisp_Object selected_frame.
1703         (Fframe_selected_window, Fset_frame_selected_window, Fnext_frame,
1704         Fprevious_frame, other_visible_frames, Fdelete_frame,
1705         Fmouse_position, Fmouse_pixel_position, Fmake_frame_visible,
1706         Fmake_frame_invisible, Ficonify_frame, Fraise_frame, Flower_frame,
1707         Fframe_parameters, Fmodify_frame_parameters, Fframe_char_height,
1708         Fframe_char_width, Fframe_pixel_height, Fframe_pixel_width,
1709         Fset_frame_height, Fset_frame_width): Ditto.
1711 1999-09-13  Gerd Moellmann  <gerd@gnu.org>
1713         * xdisp.c (message2_nolog): Change for Lisp_Object selected_frame.
1714         (message3_nolog, message_with_string, message,
1715         setup_echo_area_for_printing, truncate_echo_area,
1716         prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto.
1718         * xmenu.c (Fx_popup_menu): Change for Lisp_Object selected_frame.
1719         (Fx_popup_dialog): Ditto.
1721         * xfns.c (check_x_frame): Change for Lisp_Object selected_frame.
1722         (check_x_display_info, x_get_resource_string): Ditto.
1724         * xterm.c (XTcursor_to): Change for Lisp_Object selected_frame.
1725         (x_clear_frame, XTring_bell, XTmouse_position, XTread_socket): Ditto.
1726         (XRINGBELL): Removed.
1728         * window.c (Fminibuffer_window): Change for Lisp_Object
1729         selected_frame.
1730         (Fwindow_at, Fprevious_window, window_loop, select_window_1,
1731         display_buffer_1, Fdisplay_buffer, temp_output_buffer_show,
1732         Fcurrent_window_configuration, init_window_once): Ditto.
1734         * frame.h (SELECTED_FRAME): New.
1736 1999-09-12  Ken Raeburn  <raeburn@gnu.org>
1738         * category.c (word_boundary_p): Use XCAR and XCDR.
1739         * ccl.c (ccl_driver, resolve_symbol_ccl_program,
1740         Fregister_code_conversion_map): Likewise.
1741         * coding.c (setup_coding_system, detect_coding_system,
1742         Ffind_operation_coding_system, Fset_coding_priority_internal):
1743         Likewise.
1744         * doc.c (get_doc_string, Fdocumentation,
1745         store_function_docstring): Likewise.
1746         * editfns.c (save_restriction_restore): Likewise.
1747         * eval.c (Fcond, Fmacroexpand, Fcondition_case, wants_debugger,
1748         skip_debugger, find_handler_clause, Fautoload, Fapply,
1749         run_hook_with_args, run_hook_list_with_args, Ffetch_bytecode):
1750         Likewise.
1751         * fileio.c (Ffind_file_name_handler, Finsert_file_contents,
1752         Fwrite_region, do_auto_save_unwind, Fdo_auto_save,
1753         Fread_file_name): Likewise.
1754         * filelock.c (unlock_all_files): Likewise.
1755         * insdel.c (Fcombine_after_change_execute): Likewise.
1756         * intervals.c (adjust_intervals_for_insertion): Likewise.
1757         * keymap.c (get_keymap_1, Fkeymap_parent, Fset_keymap_parent,
1758         Fset_keymap_parent, fix_submap_inheritance, access_keymap,
1759         store_in_keymap, Fcopy_keymap, define_as_prefix,
1760         current_minor_maps, Faccessible_keymaps,
1761         accessible_keymaps_char_table, Fkey_description,
1762         Fwhere_is_internal, where_is_internal_2, where_is_internal_1,
1763         describe_buffer_bindings, describe_map_tree, shadow_lookup,
1764         describe_map): Likewise.
1765         * lread.c (Fload, load_unwind, close_load_descs, read_vector,
1766         read_list, init_lread): Likewise.
1767         * search.c (Fmatch_data): Likewise.
1768         * sunfns.c (Fsun_menu_internal): Likewise.
1769         * syntax.c (describe_syntax): Likewise.
1770         * undo.c (record_insert, record_delete, Fundo_boundary,
1771         truncate_undo_list): Likewise.
1772         * vmsproc.c (child_sig): Likewise.
1774         * editfns.c (Fformat): Use XFLOAT_DATA.
1776 1999-09-12  Gerd Moellmann  <gerd@gnu.org>
1778         * keyboard.c (command_loop_1): Resize mini-window to the
1779         exact size of a message displayed, if any.
1781         * xdisp.c (resize_mini_window): Add parameter exact_p.  Resize
1782         to exact size if exact_p is non-zero.
1783         (display_echo_area_1): Call resize_mini_window with
1784         new parameter.
1785         (redisplay_internal): Ditto.
1786         (resize_echo_area_axactly): New.
1788         * minibuf.c (read_minibuf_unwind): Call resize_mini_window with
1789         new parameter.
1791         * dispextern.h: Change prototype of resize_mini_window.
1792         Add prototype for resize_echo_area_axactly.
1794         * xfaces.c (Fx_family_fonts): Replaces Fx_font_list.
1795         (syms_of_xfaces): Defsubr accordingly.
1797         * xdisp.c (hscroll_window_tree): Choose cursor row from
1798         desired or current matrix.
1799         (redisplay_internal): Hscroll before updating.
1801 1999-09-12  Gerd Moellmann  <gerd@gnu.org>
1803         * syntax.c (Fforward_word): Use prompt_end_charpos instead
1804         of minibuffer_prompt_length.
1806         * minibuf.c (read_minibuf): Use prompt_end_charpos instead
1807         of minibuffer_prompt_length.
1808         (read_minibuf_unwind): Ditto.
1809         (Fminibuffer_complete_and_exit): Ditto.
1810         (Fminibuffer_complete_word): Ditto.
1811         (Fminibuffer_prompt_end): Ditto.
1813         * editfns.c (Fbuffer_string): Use prompt_end_charpos instead
1814         of minibuffer_prompt_length.
1815         (Fline_beginning_position): Ditto.
1817         * buffer.c (Fget_buffer_create): Use prompt_end_charpos instead
1818         of minibuffer_prompt_length.
1819         (Fmake_indirect_buffer): Ditto.
1820         (Fkill_buffer): Ditto.
1821         (Ferase_buffer): Ditto.
1823         * buffer.h (prompt_end_charpos): Replaces
1824         minibuffer_prompt_length.
1826         * minibuf.c (read_minibuf): Return mini-buffer contents 
1827         without the prompt.
1829         * editfns.c (make_buffer_string_both): Take out the code
1830         to handle mini-buffer prompts.
1831         (Fbuffer_string): Handle the prompt here, instead.
1833         * xfaces.c (lface_from_face_name): Resolve face aliases.
1834         (Qmode_line): Replaces Qmodeline.
1835         (realize_basic_faces): Use Qmode_line.
1836         (syms_of_xfaces): Initialize Qmode_line.
1838 1999-09-12  Gerd Moellmann  <gerd@gnu.org>
1840         * minibuf.c (read_minibuf): Set minibuf_prompt_width to the
1841         current column after inserting prompt.
1842         (Fminibuffer_prompt_width): Return minibuf_prompt_width.
1844         * xfaces.c (Qframe_update_face_colors): New.
1845         (syms_of_xfaces): Initialize call.
1846         (update_face_from_frame_parameter): Call that function when
1847         the frame's background changes.
1849 1999-09-12  Richard Stallman  <rms@gnu.org>
1851         * insdel.c (del_range_1): Don't treat minibuffer prompt specially.
1853 1999-09-12  Ken Raeburn  <raeburn@gnu.org>
1855         * alloc.c (Fcons, pure_cons, Fpurecopy, Fgarbage_collect,
1856         mark_object, mark_buffer): Use XCAR and XCDR.
1857         * bytecode.c (Fbyte_code): Likewise.
1858         * callint.c (Fcall_interactively, Fprefix_numeric_value):
1859         Likewise.
1860         * callproc.c (Fcall_process, Fcall_process_region, child_setup,
1861         getenv_internal): Likewise.
1862         * dired.c (file_name_completion): Likewise.
1863         * fns.c (Fsafe_length, concat, Fcopy_alist, Fmember, Fmemq, Fassq,
1864         assq_no_quit, Fassoc, Frassq, Frassoc, Fdelq, Fdelete, Freverse,
1865         Fplist_get, Fplist_put, internal_equal, mapcar1): Likewise.
1866         * indent.c (Fcompute_motion): Likewise.
1867         * process.c (decode_status, Fprocess_status, Fprocess_exit_status,
1868         list_processes_1, Fstart_process, Fopen_network_stream,
1869         wait_reading_process_input, read_process_output_call,
1870         kill_buffer_processes, sigchld_handler, exec_sentinel_unwind,
1871         status_notify, wait_reading_process_input): Likewise.
1872         * textprop.c (PLIST_ELT_P, property_value, set_properties,
1873         extend_property_ranges): Likewise.
1874         * w32faces.c (Fpixmap_spec_p, merge_face_list): Likewise.
1875         * w32fns.c (x_window_to_frame, x_set_frame_parameters,
1876         x_report_frame_params, x_set_cursor_type, x_icon_type,
1877         x_figure_window_size, Fx_create_frame, w32_load_system_font,
1878         w32_load_font, enum_font_cb2, w32_list_bdf_fonts, w32_list_fonts,
1879         w32_list_synthesized_fonts, w32_find_ccl_program, Fx_list_fonts,
1880         Fw32_find_bdf_fonts, w32_find_bdf_fonts_in_dir,
1881         x_display_info_for_name, Fx_display_list): Likewise.
1882         * w32menu.c (menubar_id_to_frame, single_keymap_panes,
1883         Fx_popup_menu, Fx_popup_dialog): Likewise.
1884         * w32proc.c (Fw32_set_keyboard_layout): Likewise.
1885         * w32term.c (x_window_to_scroll_bar, w32_read_socket,
1886         w32_term_init, x_delete_display): Likewise.
1887         * xfns.c (x_window_to_frame, x_any_window_to_frame,
1888         x_non_menubar_window_to_frame, x_menubar_window_to_frame,
1889         x_top_window_to_frame, x_set_frame_parameters,
1890         x_report_frame_params, x_set_cursor_type, x_icon_type,
1891         x_figure_window_size, Fx_create_frame, x_display_info_for_name,
1892         Fx_display_list, x_create_tip_frame): Likewise.
1893         * xmenu.c (menubar_id_to_frame, single_keymap_panes,
1894         Fx_popup_menu, Fx_popup_dialog): Likewise.
1895         * xselect.c (x_own_selection, x_get_local_selection,
1896         x_handle_selection_request, x_handle_selection_clear,
1897         x_clear_frame_selections, wait_for_property_change_unwind,
1898         wait_for_property_change, x_handle_property_notify,
1899         copy_multiple_data, x_get_foreign_selection,
1900         lisp_data_to_selection_data, clean_local_selection_data,
1901         x_handle_selection_notify, Fx_get_selection_internal,
1902         x_disown_buffer_selections): Likewise.
1903         * xterm.c (x_window_to_scroll_bar, XTread_socket, x_list_fonts,
1904         x_load_font, x_find_ccl_program, x_term_init, x_delete_display):
1905         Likewise.
1907         * alloc.c (make_float, make_pure_float, Fpurecopy): Use
1908         XFLOAT_DATA.
1909         * bytecode.c (Fbyte_code): Likewise.
1910         * floatfns.c (extract_float, Fexpt, Fabs, rounding_driver,
1911         fmod_float): Likewise.
1913 1999-09-11  Richard Stallman  <rms@gnu.org>
1915         * xdisp.c (run_window_scroll_functions): If hook functions switch
1916         buffers, switch back after.
1918 1999-09-11  Ken Raeburn  <raeburn@gnu.org>
1920         * charset.h (GET_TRANSLATION_TABLE): Use XCDR.
1921         * frame.h (FOR_EACH_FRAME): Use XCAR and XCDR.
1922         (PIXEL_X_FROM_CANON_X, PIXEL_Y_FROM_CANON_Y): Use XFLOAT_DATA.
1923         * keyboard.h (EVENT_HEAD, EVENT_START, EVENT_END, POSN_WINDOW,
1924         POSN_BUFFER_POSN, POSN_WINDOW_POSN, POSN_TIMESTAMP): Use XCAR and
1925         XCDR.
1926         * syntax.h (SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH): Use XCAR and
1927         XCDR.
1929 1999-09-10  Richard Stallman  <rms@gnu.org>
1931         * xterm.c (XTread_socket): In XSetInputFocus, use RevertToParent,
1932         not RevertToPointerRoot.
1933         (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
1934         Fix the code to clear around the scroll bar.
1936 1999-09-10  Keisuke Nishida  <kxn30@po.cwru.edu>
1938         * print.c: Support print-circle and related features.
1939         (Vprint_gensym_alist): Removed.
1940         (Vprint_circle, Vprint_continuous_numbering, print_number_index
1941         Vprint_number_table): New variables.
1942         (PRINT_NUMBER_OBJECT, PRINT_NUMBER_STATUS): New macros.
1943         (PRINTPREPARE, PRINTFINISH): Don't set Vprint_gensym_alist.
1944         (print, print_preprocess, print_preprocess_string, print_object):
1945         New/modified functions with print-circle feature.  Use
1946         Vprint_number_table instead of Vprint_gensym_alist for print-gensym.
1947         (syms_of_print): Defined new Lisp variables `print-circle',
1948         `print-continuous-numbering', `print-number-table'.
1950 1999-09-10  Gerd Moellmann  <gerd@gnu.org>
1952         * xfns.c (x_build_heuristic_mask): Accept a list `(R G B)'
1953         as background color specification instead of an integer.
1954         (image-cache-eviction-delay): Replaces image-eviction-seconds.
1955         (Vimage_cache_eviction_delay): Replaces Vimage_eviction_seconds.
1956         (clear_image_cache, syms_of_xfns): Use it.
1957         (Qpostscript): Replaces Qghostscript.
1958         (gs_type): Use it.
1959         (gs_image_p): Ditto.
1960         (syms_of_xfns): Initialize Qpostscript.
1962 1999-09-10  Richard Stallman  <rms@gnu.org>
1964         * buffer.c (Ferase_buffer): Don't erase the minibuffer prompt.
1966 1999-09-09  Richard Stallman  <rms@gnu.org>
1968         * editfns.c (Fline_beginning_position): Handle minibuffer prompt here.
1970         * cmds.c (Fbeginning_of_line): Don't handle minibuffer prompt here.
1972 1999-09-09  Gerd Moellmann  <gerd@gnu.org>
1974         * fns.c (Fmakehash): Accept just one optional argument TEST.
1976         * xfns.c (QCindex): New.
1977         (syms_of_xfns): Initialize QCindex.
1978         (gif_load): Use it instead of `:image'.
1980 1999-09-09  Richard Stallman  <rms@gnu.org>
1982         * fileio.c (Fwrite_region): Finish renaming CONFIRM to MUSTBENEW.
1983         (Fwrite_region) [DOS_NT]: Handle `excl' here too.
1985 1999-09-08  Gerd Moellmann  <gerd@gnu.org>
1987         * xdisp.c (Qwhen): Replaces QCwhen.
1988         (syms_of_xdisp): Initialized it instead of QCwhen.
1989         (handle_single_display_prop): Use it instead of QCwhen.
1991 1999-09-08  Ken'ichi Handa  <handa@gnu.org>
1993         * charset.c (translate_char): Reset MSBs of arguments of
1994         MAKE_CHAR.
1995         (CHAR_COMPONENTS_VALID_P): Fix for ASCII.
1997 1999-09-08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
1999         * editfns.c (Fbufsize): Accept an extra BUFFER parameter.
2001         * fns.c (Fbase64_decode_region): Don't place point outside of the
2002         current accessible portion.
2004 1999-09-07  Richard Stallman  <rms@gnu.org>
2006         * keymap.c (fix_submap_inheritance): Do nothing if the proper
2007         parent is an ancestor of SUBMAP; otherwise, add it as the
2008         ultimate ancestor.
2010 1999-09-07  Gerd Moellmann  <gerd@gnu.org>
2012         * xdisp.c (handle_single_display_prop): Change conditional
2013         display property to `:when FORM . VALUE'.
2015 1999-09-07  Richard Stallman  <rms@gnu.org>
2017         * fileio.c (Fwrite_region): Doc fix.
2019 1999-09-07  Stefan Monnier  <monnier@cs.yale.edu>
2021         * fileio.c (Qexcl): New variable.
2022         (report_file_error): Handle EEXIST specially.
2023         (Fwrite_region): Special handling for CONFIRM = `excl'.
2024         (syms_of_fileio): Initialize Qexcl.
2026 1999-09-07  Gerd Moellmann  <gerd@gnu.org>
2028         * xfns.c (x_set_foreground_color): Call
2029         update_face_from_frame_parameter.
2030         (x_set_background_color): Ditto.
2031         (x_set_mouse_color): Ditto.
2032         (x_set_cursor_color): Ditto.
2033         (x_set_border_color): Ditto.
2034         (x_set_scroll_bar_foreground): Ditto.
2035         (x_set_scroll_bar_background): Ditto.
2037         * xfaces.c (recompute_basic_faces): Clear face cache.
2038         (Finternal_set_lisp_face_attribute): Modify frame parameters
2039         if attributes of certain faces are changed.
2040         (update_face_from_frame_parameter): New.
2042         * xfaces.c (realize_basic_faces): Realize new basic faces.
2044         * dispextern.h (SCROLL_BAR_FACE_ID, BORDER_FACE_ID,
2045         CURSOR_FACE_ID, MOUSE_FACE_ID): New.
2047         * xfaces.c (Qscroll_bar, Qcursor, Qborder, Qmouse): New.
2048         (syms_of_xfaces): Intialize new symbols.
2050         * fns.c (Fmakehash): Take one argument, test, make all the
2051         rest keyword arguments.
2053         * window.c (Fset_window_margins): Make window the first argument.
2054         (set_window_buffer): Call Fset_window_margins with window as first
2055         argument.
2057 1999-09-07  Gerd Moellmann  <gerd@gnu.org>
2059         * xfaces.c (Qfringe): Replaces Qmargin.
2061 1999-09-07  Kenichi Handa  <handa@etl.go.jp>
2063         * charset.h: Lots of comments fixed.
2064         (PARSE_MULTIBYTE_SEQ): Make it work also for ASCII string.
2065         (STRING_CHAR_AND_CHAR_LENGTH): This macro removed.
2067         * charset.c : Lots of comments fixed.
2068         (SPLIT_MULTIBYTE_SEQ): Make it work also for ASCII string.
2069         (CHAR_COMPONENTS_VALID_P): Name changed from
2070         CHAR_COMPONENT_VALID_P.  Caller changed.
2072 1999-09-06  Richard Stallman  <rms@gnu.org>
2074         * insdel.c (syms_of_insdel): Define Lisp variable
2075         inhibit-modification-hooks.
2077 1999-09-06  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
2079         * s/aix4-2.h (ALIGN_DATA_RELOC): Undefined to support new
2080         unexaix.c.
2082         * s/aix3-1.h (ALIGN_DATA_RELOC): Defined to support new unexaix.c.
2084 1999-09-06  Dave Love  <fx@gnu.org>
2086         * unexaix.c: New version incorporating Michael Sperber's changes
2087         from XEmacs.  Should solve problems on AIX 4.3.
2089         * lread.c (Vbyte_boolean_vars): New variable.
2090         (defvar_bool, syms_of_lread): Use it.
2092 1999-09-05  Richard Stallman  <rms@gnu.org>
2094         * minibuf.c (read_minibuf): Put all three properties on the
2095         same range, the whole prompt.
2097 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
2099         * sound.c (Qplay_sound_functions): Replaces Qplay_sound_hook.
2100         (Fplay_sound, syms_of_sound): Use it.
2101         (parse_sound): Allow float volume values in the range [0, 1].
2102         (Fplay_sound): Ditto.
2104         * window.c (Fset_window_vscroll): Make window the first argument,
2105         amount to scroll the second.  Take non-negative vscroll as
2106         argument.
2107         (Fwindow_vscroll): Return non-negative vscroll.
2109         * xfns.c (Fx_show_tip): Improve documentation.
2111 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
2113         * buffer.c, buffer.h, dispextern.h, dispnew.c, keyboard.c,
2114         window.c, xdisp.c, xfaces.c, xterm.c, keyboard.h: Change
2115         `top-line' and `top_line' to `header-line' and `header_line'.
2116         Likewise for similar spellings.
2118 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
2120         * xdisp.c (row_containing_pos): New.
2121         (try_window_id): Use it.
2123         * alloc.c, dispextern.h, dispnew.c, frame.c, frame.h, keyboard.c,
2124         lisp.h, termhooks.h, window.c xdisp.c, xfaces.c, xfns.c, xterm.c:
2125         Change spelling of `toolbar' to `tool_bar' or `tool-bar'.
2126         Likewise for upper-case etc.
2128 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
2130         * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
2131         Fix reference to renamed variable.
2133 1999-09-04  Gerd Moellmann  <gerd@gnu.org>
2135         * window.c (Qwindow_size_fixed): Replaces Qfixed_window_size.
2136         (window_fixed_size_p): Use Qwindow_size_fixed instead of 
2137         Qfixed_window_size.
2138         (syms_of_window): Ditto.
2140         * fns.c (Fmakehash): Exchange optional test and size arguments.
2142 1999-09-03  Gerd Moellmann  <gerd@gnu.org>
2144         * xterm.c (XTset_vertical_scroll_bar): Block input when clearing
2145         under newly created scroll bar.
2146         (expose_window): If window is not yet fully initialized, do
2147         nothing.  This can happen when toolkit scroll bars are used and a
2148         window is split.  Reconfiguring the scroll bars will generate an
2149         expose for a newly created window.
2151         * frame.h (struct frame): New member `gamma'.
2153         * xfns.c: Include math.h.  Add extern declaration for atof in case
2154         we don't see one.
2155         (Qscreen_gamma): New.
2156         (struct x_frame_parm_table): Add prototypes, add
2157         x_set_screen_gamma.
2158         (gamma_correct): New function.
2159         (defined_color): Call it.
2160         (x_set_screen_gamma): New.
2161         (x_set_title): Add parameter old_value.
2162         (RES_TYPE_FLOAT): New.
2163         (x_get_arg): Handle RES_TYPE_FLOAT.
2164         (Fx_create_frame): Call x_default_parameter for `screen-gamma'.
2165         (lookup_pixel_color): Change call to x_alloc_nearest_color to
2166         new prototype.
2167         (lookup_rgb_color): Ditto.
2168         (syms_of_xfns): Initialize Qscreen_gamma.
2170         * xterm.c (x_alloc_nearest_color_for_widget) [USE_X_TOOLKIT]:
2171         New.  Allocate color for lwlib widgets.
2172         (x_alloc_nearest_color): Change parameter list include the
2173         frame on which to allocate colors.  Gamma-correct colors.
2174         (x_alloc_lighter_color): Call x_alloc_lighter_color with new
2175         parameter list.
2177         * xterm.h: Change protorype of x_alloc_nearest_color.
2179 1999-09-03  Richard Stallman  <rms@gnu.org>
2181         * callproc.c: Delete the system-independent include of stdlib.h
2182         (leaving only the one in the WINDOWSNT conditional).
2184 1999-09-03  Andrew Choi  <choi@cs.hku.hk>
2186         * callproc.c (call-process) [macintosh]: Call mac_run_command in
2187         sysdep.c.  The Mac code is modeled after the DOS code.
2188         
2189         * dispextern.h [macintosh]: Include macterm.h to define substitute X
2190         Window types and macros.
2192         * frame.h: Do nothing if included a second time.
2193         (enum output_method): Add mac_output frame type.
2194         (union output_data): Add new alternative `mac'.
2195         (FRAME_MAC_P): New macro.
2196         
2197         * frame.c (Fframep) [macintosh]: Handle mac frame type.
2198         (syms_of_frame_1): Initialize Qmac.
2199         (make_terminal_frame) [macintosh]: Initialize output_data.mac fields.
2200         (Fmake_terminal_frame) [macintosh]: Add an alternate error check.
2201         (Fmodify_frame_parameters) [macintosh]: Call
2202         mac_set_frame_parameter in macterm.c.
2203         
2204         * keyboard.c [macintosh]: Set KBD_BUFFER_SIZE to a smaller value
2205         (512) because Mac compilers limit local data of a function to 32K.
2206         
2207         * make-docfiles.c: Correctly handle input files with Mac-style
2208         eol's.
2209         
2210         * sysdep.c: Define numerous routines to emulate Unix system calls.
2211         
2212         * xfaces.c: on MacOS, define the set of colors listed in rgb.txt
2213         file of an X Window environment.
2214         
2215         * xfaces.c: on MacOS, define the Lisp functions x-display-color-p,
2216         x-display-grayscale, x-color-defined-p, and x-color-values.
2217         
2218         * sysdep.c [macintosh] (stat, fstat, mkdir, rmdir, utime, access)
2219         (open, creat, unlink, read, write, rename, fopen, pause, alarm)
2220         (signal, sleep, gmtime, localtime, ctime, time, index, mktemp)
2221         (getpwuid, getpwnam, dup, dup2, isatty, getgid, getegid, getuid)
2222         (geteuid, getpid, getenv, uname, opendir, closedir, readdir, getwd.):
2223         New functions, replacing POSIX features.
2224         
2225         * sysdep.c [macintosh] (Mac2UnixPathname, Unix2MacPathname, CheckAlarm)
2226         (InitMyPasswd, GetTempDirName, mystrchr, mystrtok, mystrcpy):
2227         (InitEmacsPasswdDir, run_mac_command): New subroutines.
2229         * sysdep.c [macintosh] (targetTicks, alarm_signal_func, myPasswdName)
2230         (myPasswd, emacsPasswdDir, emacsPasswd, myPasswdInited, mask)
2231         (myPasswdDir, TempDirName, sys_siglist): New variables.
2233         * sysdep.c [macintosh] (execvp, wait, croak, fork, kill, sigsetmask)
2234         (sigblock, request_sigio, unrequest_sigio, setpgrp, pipe, symlink)
2235         (link, lstat, readlink, umask, chmod, sbrk, fsync, ioctl):
2236         Define empty stubs so Emacs will link.
2238 1999-09-03  Gerd Moellmann  <gerd@gnu.org>
2240         * xdisp.c: Use XCAR and XCDR instead of XCONS.
2242         * window.h: New member frozen_window_start_p.
2244         * window.c (foreach_window, foreach_window_1): New.
2245         (freeze_window_start, freeze_window_starts): New.
2246         (make_window): Initialize frozen_window_start_p.
2247         (replace_window): Ditto.
2248         (Fset_window_point): Remove references to deleted variables.
2249         (Fset_window_start): Ditto.
2251         * xdisp.c (Vresize_mini_config, resize_mini_frame,
2252         resize_mini_initial_height): Removed.
2253         (syms_of_xdisp): Remove references to these variables.
2254         (resize_mini_window): Don't save window configuration, freeze
2255         window starts instead.  Enlarge window until displaying an empty
2256         buffer, then shrink it.  Make the function externally visible.
2257         (redisplay_window): Treat frozen window start like forced start,
2258         but accept point outside of the window.
2260         * dispextern.h: Add function prototype for resize_mini_window.
2262         * minibuf.c (read_minibuf_unwind): Resize mini-window when
2263         reaching minibuf_level 0.
2265         * lisp.h: Remove extern declarations for variables deleted from
2266         xdisp.c.
2268         * dispnew.c (adjust_frame_glyphs): Remove reference to
2269         Vresize_mini_config.
2271 1999-09-03  Gerd Moellmann  <gerd@gnu.org>
2273         * xfns.c (x_set_scroll_bar_width): Change conditional compilation
2274         to USE_TOOLKIT_SCROLL_BARS.
2276         * xterm.c (x_scroll_bar_create): Don't clear under scroll bar
2277         here.
2278         (XTset_vertical_scroll_bar): Clarify position computations.  Clear
2279         under newly created scroll bar.  Put toolkit scroll bars in the
2280         middle of the area reserved for the scroll bar.
2282 1999-09-03  Kenichi Handa  <handa@etl.go.jp>
2284         The following changes are for the new handling of mulitbyte
2285         sequence.  Now, except for a composite character, no multibyte
2286         character in string/buffer has trailing garbage bytes.  For
2287         instance, the length of string "\201\300\300" is now 2, the first
2288         character is Latin-1 A-grave, the second is raw \300.
2290         * charset.h (MAKE_NON_ASCII_CHAR): Handle the case that C1 or C2
2291         are negative.
2292         (MAKE_CHAR): Don't set MSBs of C1 and C2 to 0.
2293         (VALID_MULTIBYTE_CHAR_P): This macro deleted.
2294         (PARSE_COMPOSITE_SEQ): New macro.
2295         (PARSE_CHARACTER_SEQ): New macro.
2296         (PARSE_MULTIBYTE_SEQ): New macro. 
2297         (CHAR_PRINTABLE_P): New macro.
2298         (STRING_CHAR): Adjusted for the change of string_to_non_ascii_char.
2299         (STRING_CHAR_AND_LENGTH): Likewise.
2300         (STRING_CHAR_AND_CHAR_LENGTH): Define it as STRING_CHAR_AND_LENGTH.
2301         (INC_POS): Use the macro PARSE_MULTIBYTE_SEQ.
2302         (DEC_POS, BUF_INC_POS, BUF_DEC_POS): Likewise,
2304         * charset.c (SPLIT_COMPOSITE_SEQ): New macro.
2305         (SPLIT_CHARACTER_SEQ): New macro.
2306         (SPLIT_MULTIBYTE_SEQ): New macro.
2307         (CHAR_COMPONENT_VALID_P): New macro.
2308         (non_ascii_char_to_string): Generate a multibyte sequence as far
2309         as possible.
2310         (string_to_non_ascii_char): The 4th arg exclude_tail_garbage is
2311         deleted.  Caller changed.  Use the macro SPLIT_MULTIBYTE_SEQ.
2312         (split_non_ascii_string): Likewise.
2313         (multibyte_form_length): Use the macro PARSE_MULTIBYTE_SEQ.
2314         (char_printable_p): New function.
2315         (translate_char): Check character by NATNUMP instead of INTEGERP.
2316         (unibyte_char_to_multibyte): Call char_valid_p instead of
2317         VALID_MULTIBYTE_CHAR_P.
2318         (Fmake_char_internal): Check the arguments more rigidly.
2319         (Fcharset_after): Use the macro SPLIT_MULTIBYTE_SEQ.
2320         (char_valid_p): Check the validity by CHAR_COMPONENT_VALID_P.
2321         (Fmultibyte_char_to_unibyte): Check the validity of character by
2322         CHAR_VALID_P.
2323         (chars_in_text): Call multibyte_chars_in_text.
2324         (multibyte_chars_in_text): Use the macro PARSE_MULTIBYTE_SEQ.
2325         (Fcompose_string): Use the macro STRING_CHAR_AND_LENGTH instead of
2326         STRING_CHAR_AND_CHAR_LENGTH (which is obsolete now).
2328         * data.c (Faset): Adjust the way to check byte-combining
2329         possibility for the new handling of multibyte sequence.
2331         * editfns.c (Fsubst_char_in_region): Likewise.
2333         * fns.c (count_combining): Use the macro PARSE_MULTIBYTE_SEQ.
2334         (string_char_to_byte): Likewise.
2335         (string_byte_to_char): Likewise.
2337         * indent.c (MULTIBYTE_BYTES_WIDTH): Delete the 2nd arg C.  Use the
2338         macro STRING_CHAR_AND_LENGTH.  Caller changed.
2340         * insdel.c (count_combining_composition): New function.
2341         (count_combining_before): Adjust the way to check byte-combining
2342         possibility for the new handling of multibyte sequence.  Call
2343         count_combining_composition for a composite character.
2344         (count_combining_after): Likewise.
2346         * print.c (print_string): Use the macro STRING_CHAR_AND_LENGTH.
2347         (print): Likewise.
2349         * dispextern.h (struct it): Change the size of the member
2350         `ctl_chars'.
2352         * xdisp.c (get_next_display_element): Display incomplete multibyte
2353         sequence (e.g. \222\300) by octal form.
2355 1999-09-02  Gerd Moellmann  <gerd@gnu.org>
2357         * xterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Change from 2 to 0.
2359         * fns.c (Fhash_table_weakness): Replaces Fhash_table_weak.
2360         (cmpfn_eql, sxhash): Use XFLOAT_DATA.
2362 1999-09-02  Gerd Moellmann  <gerd@gnu.org>
2364         * buffer.c (set_buffer_internal): Never set
2365         windows_or_buffers_changed.
2367         * xdisp.c (try_window_id): Reset first_unchanged_at_end_row
2368         if we have displayed to the bottom of the window.
2370         * syntax.c (Fforward_word): Stop at a mini-buffer prompt end
2371         in both directions.  Extend documentation.
2373 1999-09-01  Gerd Moellmann  <gerd@gnu.org>
2375         * minibuf.c (read_minibuf): Flush display after setting cursor to
2376         column 0.
2378 1999-08-31  Gerd Moellmann  <gerd@gnu.org>
2380         * s/freebsd.h (__FreeBSD_version): Don't define it if it is
2381         already defined.  This avoids a warning from buffer.c.
2383 1999-08-30  Gerd Moellmann  <gerd@gnu.org>
2385         * xterm.h (FRAME_X_FLAGS_AREA_COLS): Define it as the total width
2386         of both margins.
2387         (FRAME_X_FLAGS_AREA_WIDTH): Likewise.
2388         (FRAME_X_LEFT_FLAGS_AREA_WIDTH): New.
2389         (FRAME_X_RIGHT_FLAGS_AREA_WIDTH): New.
2391         * frame.h (FRAME_WINDOW_WIDTH_ARG): Add in FRAME_FLAGS_AREA_COLS
2392         once instead of twice.
2393         (FRAME_LEFT_FLAGS_AREA_WIDTH): New.
2395         * xterm.c: Remove unused bitmaps.
2396         (continued_bits, continuation_bits, overlay_bits): Change images.
2397         (x_draw_vertical_border): Use FRAME_X_RIGHT_FLAGS_AREA_WIDTH
2398         instead of FRAME_X_FLAGS_AREA_WIDTH.
2399         (x_after_update_window_line): Ditto.
2400         (x_draw_bitmap): Likewise.
2401         (x_draw_row_bitmaps): Likewise.
2402         (x_draw_glyph_string_box): Likewise.
2403         (x_draw_glyphs): Likewise.
2404         (x_scroll_run): Likewise.
2405         (expose_window_tree): Likewise.
2406         (note_mode_line_highlight): Likewise.
2407         (XTset_vertical_scroll_bar): Likewise.
2408         (x_clip_to_row): Likewise.
2409         (x_set_window_size): Likewise.
2411         * xfns.c (x_figure_window_size): Use FRAME_FLAGS_AREA_COLS instead
2412         of 2 * that value.
2414         * xdisp.c (window_box_width): Use FRAME_FLAGS_AREA_COLS instead of
2415         2 * that value.
2416         (window_box_left): Use FRAME_LEFT_FLAGS_AREA_WIDTH instead of
2417         FRAME_FLAGS_AREA_WIDTH.
2419         * window.c (coordinates_in_window): Use
2420         FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
2421         (window_internal_width): Subtract FRAME_FLAGS_AREA_WIDTH once
2422         instead of twice.
2424         * widget.c (set_frame_size): Set flags_area_extra to 
2425         FRAME_FLAGS_AREA_WIDTH instead of 2 * that width.
2426         (EmacsFrameSetCharSize): Ditto.
2428         * dispnew.c (mode_line_string): Add FRAME_LEFT_FLAGS_AREA_WIDTH
2429         instead of FRAME_FLAGS_AREA_WIDTH.
2431         * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH): Subtract
2432         FRAME_FLAGS_AREA_COLS once.
2433         (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X): Add
2434         FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
2436 1999-08-30  Gerd Moellmann  <gerd@gnu.org>
2438         * freebsd.h (C_SWITCH_SYSTEM): Added to let configure find headers
2439         in /usr/X11R6/include which are checked for with AC_CHECK_HEADER.
2441 1999-08-30  Gerd Moellmann  <gerd@gnu.org>
2443         * fns.c (QCweakness): Replaces QCweak.
2444         (Fmake_hash_table): Ditto.
2445         (Fmakehash): Ditto.
2446         (syms_of_fns): Ditto.
2448 1999-08-29  Richard Stallman  <rms@gnu.org>
2450         * search.c (compile_pattern_1): Enable RE_CHAR_CLASSES for regexp.
2452         * sysdep.c (read_input_waiting): Pass read_socket_hook just 4 args.
2454         * syntax.h (SYNTAX_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_NESTED):
2455         Add support for nested comments.
2457         * syntax.c (Fforward_comment, scan_lists, scan_sexps_forward):
2458         Consolidate the forward comment code into the new `forw_comment'.
2459         (forw_comment): New subroutine.  Added support for nested comments.
2460         (lisp_parse_state, back_comment, Fmodify_syntax_entry)
2461         (Fparse_partial_sexp): Add support for nested comments.
2463 1999-08-28  Ken Raeburn  <raeburn@gnu.org>
2465         * lisp.h (struct Lisp_Cons, XCAR, XCDR, struct Lisp_Float): Change
2466         names of structure elements if HIDE_LISP_IMPLEMENTATION is
2467         defined, to help detect code that uses knowledge of the Lisp
2468         internals that it shouldn't have.
2469         (XFLOAT_DATA): New macro.
2471 1999-08-25  Gerd Moellmann  <gerd@gnu.org>
2473         * syntax.c (Fforward_word): If in a mini-buffer and moving
2474         backwards, stop in front of the prompt to prevent accidentially
2475         moving into the read-only prompt.
2477         * window.c (Frecenter): Clear frame if called with nil or no arg.
2479         * xdisp.c (resize_mini_window): Don't resize if
2480         Vmax_mini_window_height is nil.  Otherwise, use a default if
2481         Vmax_mini_window_height is not ot a number.
2482         (syms_of_xdisp): Extend documentation of Vmax_mini_window_height.
2484 1999-08-25  Alexandre Oliva  <oliva@dcc.unicamp.br>
2486         * unexelf.c: Merge IRIX debugging info patch from unexsgi.c
2487         * m/iris4d.h: Use unexelf for IRIX 5.*.
2488         * m/iris5d.h: Use unexelf for IRIX 6.*.
2489         * unexsgi.c: Deleted.
2491         * unexelf.c: Auto-detect .sbss section.
2492         (round_up): Make it static.
2493         (unexec): Declare alignment as Elf Word.  Skip ``Program
2494         segment above .bss'' test on MIPS without .sbss.
2495         Copy sections .got and .sdata1 sections.  Adjust offsets in
2496         sections .sdata, .lit4, .lit8, .got and .sdata1.
2498 1999-08-25  Gerd Moellmann  <gerd@gnu.org>
2500         * xdisp.c (try_window_id): Remove typo.
2502 1999-08-24  Gerd Moellmann  <gerd@gnu.org>
2504         * xdisp.c (try_window_id): Recognize case that PT == ZV and in
2505         unchanged text at the bottom when computing the cursor position.
2506         (message3_nolog): Raise frame only if minibuffer_auto_raise is
2507         set.
2509         * lisp.h (PVEC_TYPE_MASK): Add the bit for hash tables.
2511 1999-08-24  Gerd Moellmann  <gerd@gnu.org>
2513         * xfaces.c (Qmargin): Replacement for Qbitmap_area.
2514         (realize_basic_faces): Replace Qmargin for Qbitmap_area.
2515         (syms_of_xfaces): Ditto.
2517         * window.c (Fset_window_point): Reset Vresize_mini_config.
2518         (Fset_window_start): Ditto.
2519         (set_window_buffer): Ditto.
2521         * dispnew.c (adjust_frame_glyphs): Reset Vresize_mini_config.
2523         * xdisp.c (redisplay_window): Don't ever test just_this_one_p
2524         before calling try_window.
2525         (echo_area_display): If height has changed, update other windows.
2526         (resize_mini_frame, resize_mini_initial_height): New.
2527         (resize_mini_window): Save/restore window configuration
2528         differently.
2530         * lisp.h (Vresize_mini_config, resize_mini_frame, 
2531         resize_mini_initial_height): Add extern declarations.
2533         * xterm.c (expose_window_tree): Fix typo CANON_Y_UNIT to
2534         CANON_X_UNIT.
2536         * xfns.c [HAVE_JPEG]: Work around a warning about HAVE_STDLIB_H
2537         being redefined in jconfig.h.
2539 1999-08-23  Ken'ichi Handa  <handa@gnu.org>
2541         * coding.h: Include "ccl.h" instead of "../src/ccl.h".
2543 1999-08-22  Gerd Moellmann  <gerd@gnu.org>
2545         * alloc.c (mark_glyph_matrix): Mark strings only.
2547         * xdisp.c (redisplay_internal): Clear garbaged frames after
2548         resizing mini-window.
2550 1999-08-22  Gerd Moellmann  <gerd@gnu.org>
2552         * xdisp.c (unwind_with_echo_area_buffer): Use
2553         set_buffer_internal_1 instead of set_buffer_internal.
2554         (with_echo_area_buffer): Ditto.
2556         * buffer.c (set_buffer_internal): Set windows_or_buffers_changed
2557         only if buffer is displayed somewhere.
2559         * buffer.h (BUF_COMPUTE_UNCHANGED): New.
2561         * insdel.c (gap_left): Use BUF_COMPUTE_UNCHANGED.
2562         (gap_right): Ditto.
2563         (modify_region): Ditto.
2565         * buffer.c (modify_overlay): Use BUF_COMPUTE_UNCHANGED.
2567         * xdisp.c (Vresize_mini_config): New.
2568         (resize_mini_window): Use it to save restore original window
2569         configuration
2570         (syms_of_xdisp): Initialize it.
2572         * buffer.h (struct buffer): Add prevent_redisplay_optimizations_p.
2574         * dispextern.h (struct glyph_matrix): Add buffer, begv, and zv.
2576         * xdisp.c (reconsider_clip_changes): New.
2577         (redisplay_internal, redisplay_window): Call it.
2578         (mark_window_display_accurate, redisplay_internal): Set current
2579         matrix' buffer, begv, zv.
2581         * window.c (Fset_window_hscroll): Set
2582         prevent_redisplay_optimizations_p instead of clip_changed.
2583         (Fset_window_hscroll): Ditto.
2584         (temp_output_buffer_show): Ditto.
2585         (Fset_window_vscroll): Ditto.
2587         * buffer.c (reset_buffer): Set clip_changed to 0 and
2588         prevent_redisplay_optimizations_p to 1.
2589         (Fget_buffer_create): Set prevent_redisplay_optimizations_p to 1.
2591         * buffer.h (BUF_UNCHANGED_MODIFIED, UNCHANGED_MODIFIED,
2592         BUF_OVERLAY_UNCHANGED_MODIFIED, OVERLAY_UNCHANGED_MODIFIED,
2593         BUF_BEG_UNCHANGED, BEG_UNCHANGED, BUF_END_UNCHANGED,
2594         END_UNCHANGED): New.
2595         (struct buffer_text):  Add beg_unchanged, end_unchanged,
2596         unchanged_modified, overlay_unchanged_modified.
2598         * window.h (beg_unchanged, end_unchanged, unchanged_modified,
2599         overlay_unchanged_modified): Removed.
2600         (with_echo_area_unwind_data): Don't save beg/end_unchanged.
2601         (unwind_with_echo_area_buffer): Don't restore them.
2602         (debug_beg_unchanged, debug_end_unchanged) [GLYPH_DEBUG]: Removed.
2603         (text_outside_line_unchanged_p, redisplay_internal,
2604         try_scrolling): Use/set buffer-specific beg/end_unchanged.
2605         (redisplay_window): Let try_window_id be called if more than one
2606         window is displayed.  Use/set buffer-specific beg/end_unchanged.
2607         (get_last_unchanged_at_beg_row, get_first_unchanged_at_end_row,
2608         try_window_id):
2609         Use buffer-specific beg/end_unchanged.
2611         * window.h (beg_unchanged, end_unchanged, unchanged_modified,
2612         overlay_unchanged_modified): Remove extern declarations.
2614         * keyboard.c (command_loop_1):  Set beg/end_unchanged per
2615         buffer.
2617         * insdel.c (gap_left): Compute beg/end_unchanged per buffer.
2618         (gap_right): Ditto.
2619         (adjust_after_replace): Likewise.
2620         (replace_range, del_range_2, modify_region): Likewise.
2622         * dispnew.c (direct_output_for_insert):  Set beg_unchanged
2623         and unchanged_modified per buffer.
2625         * coding.c (code_convert_region): Compute beg/end_unchanged per
2626         buffer.
2628         * buffer.c (modify_overlay): Compute beg/end_unchanged
2629         per buffer.
2630         (Fget_buffer_create): Initialize new members of the buffer 
2631         structure.
2633 1999-08-22  Gerd Moellmann  <gerd@gnu.org>
2635         * lisp.h: Add prototype for copy_hash_table and Fcopy_hash_table.
2637         * fns.c (Qkey, Qvalue): Renamed from Qkey_weak, and Qvalue_weak.
2638         (Qkey_value_weak):  Removed.
2639         (make_hash_table): Use nil, `key', `value', t for weakness.
2640         (Fmake_hash_table): Ditto.
2641         (copy_hash_table): New.
2642         (Fcopy_hash_table): New.
2644 1999-08-22  Gerd Moellmann  <gerd@gnu.org>
2646         * xfns.c: Call change_frame_size and do_pending_window_change with
2647         new parameter.  
2649 1999-08-21  Gerd Moellmann  <gerd@gnu.org>
2651         * xdisp.c (resize_mini_window): Do it for truncate-lines t as
2652         well.
2653         (redisplay_internal): Resize mini-window only if text might 
2654         have changed.
2655         (display_echo_area): Reset displayed echo_area_buffer to nil
2656         at the end if we're displaying a nil message.
2658 1999-08-21  Gerd Moellmann  <gerd@gnu.org>
2659         
2660         * fns.c (hash_lookup): Test with EQ before calling key comparion
2661         function.
2662         (hash_remove): Ditto.
2663         (cmpfn_eq): Removed.
2664         (cmpfn_eql): Don't test with EQ.
2665         (cmpfn_equal): Ditto.
2666         (make_hash_table): Set comparison function for `eq' to null.
2668         * buffer.c, cmds.c, editfns.c, indent.c, insdel.c, buffer.h:
2669         Remove conditional compilation on NO_PROMPT_IN_BUFFER.
2671         * dispextern.h (NO_PROMPT_IN_BUFFER): Removed.
2673         * window.c, widget.c, process.c, keyboard.c, frame.c, xdisp.c,
2674         xterm.c: Call change_frame_size and do_pending_window_change with
2675         new parameter.
2677         * dispnew.c (do_pending_window_change): Add parameter `safe'.
2678         (change_frame_size): Ditto.
2679         (change_frame_size_1): Ditto.  Deley size changes if redisplaying
2680         and not called from a safe place.
2681         (window_change_signal): Call change_frame_size with new parameter.
2683         * dispextern.h: Change prototypes for do_pending_window_change
2684         and change_frame_size.
2686         * xfaces.c (face_at_buffer_position): Don't xassert that
2687         window's buffers equals current_buffer; this is not the 
2688         case during echo area display.
2690 1999-08-21  Gerd Moellmann  <gerd@gnu.org>
2692         * xdisp.c, minibuf.c: Remove conditional compilation on
2693         NO_PROMPT_IN_BUFFER.
2695         * minibuf.c (Fminibuffer_prompt_end): New.
2696         (syms_of_minibuf): Defsubr it.  Remove
2697         minibuffer-prompt-in-buffer.
2698         (Fminibuffer_prompt_width): Return 0 if not in mini-buffer.
2699         Extend documentation.
2701         * xdisp.c (get_next_display_element): Display \r as ^M.
2703         * xterm.c (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]: Clear
2704         under scroll bar widget.
2706 1999-08-21  Gerd Moellmann  <gerd@gnu.org>
2708         * xdisp.c (minibuffer_scroll_overlap): Removed because not used
2709         anywhere.
2710         (unwind_redisplay): Return nil.
2711         (clear_garbaged_frames): New.
2712         (redisplay_internal): Use it.
2713         (echo_area_display): Ditto.
2714         (resize_mini_window): Mew.
2715         (display_echo_area_1): Use it to resize echo area window.
2716         (redisplay_internal): Use it to resize active mini-window.
2718         * dispextern.h, lisp.h: Add function prototypes.
2720         * dispnew.c (set_window_cursor_after_update): Do the 
2721         cursor_in_echo_area case only for a mini-window showing
2722         a message.  Don't let cursor end up after the end of a row.
2724         * xdisp.c (echo_area_glyphs, echo_area_message,
2725         echo_area_glyphs_length, previous_echo_glyphs,
2726         previous_echo_area_message, previous_echo_area_glyphs_length):
2727         Removed.
2728         (Vmessage_stack, echo_area_buffer, echo_buffer,
2729         display_last_displayed_message_p, Vwith_echo_area_save_vector): New.
2730         (message2_nolog): Use set_message and clear_message.
2731         (message3): Rename parameter len to nbytes to make clear what
2732         it is.
2733         (message3_nolog): Ditto.  Use set_message and clear_message.
2734         (update_echo_area): Rewritten.
2735         (with_echo_area_buffer): New.
2736         (with_echo_area_buffer_unwind_data, unwind_with_area_buffer): New.
2737         (setup_echo_area_for_printing): New.
2738         (display_echo_area, display_echo_area_1): New.
2740         (current_message, current_message_1): New.
2741         (push_message, restore_message, pop_message, 
2742         check_message_stack): New.
2743         (truncate_echo_area): Rewritten.
2744         (truncate_message_1): New.
2745         (set_message, set_message_1, clear_message): New.
2746         (echo_area_display): Rewritten.
2747         (redisplay_internal): Check for needed echo area update
2748         differently.
2749         (redisplay_preserve_echo_area): Rewritten.
2750         (redisplay_window): Check for mini-window displaying echo area 
2751         message differently.
2752         (syms_of_xdisp): Initialize Vmessage_stack and echo area buffers.
2753         Remove initialzation of removed variables.
2754         (init_xdisp): Remove references to removed variables.
2756         * dispnew.c (adjust_frame_message_buffer): Removed references
2757         to echo_area_glyphs and previous_echo_glyphs.
2758         (direct_output_for_insert): Check for mini-window displaying
2759         echo area message differently.
2760         (update_frame): Likewise.
2761         (set_window_cursor_after_update): Likewise.  In echo area,
2762         don't try to set cursor on rows that aren't enabled.
2764         * print.c: Remove conditional compilation on `standalone'.
2765         (glyph_len, str_to_glyph_cpy, str_to_glyph_ncpy,
2766         glyph_to_str_cpy):  Remove that section because GLYPHs are no 
2767         longer used in that way.
2768         (PRINTDECLARE): Add multibyte.
2769         (PRINTPREPARE, PRINTFINISH): Handle printcharfun t differently.
2770         (printbufidx): Removed.
2771         (printchar, strout): Rewritten.
2773         * keyboard.c (ok_to_echo_at_next_pause): Make it a pointer to
2774         a struct kboard.
2775         (echo_kboard): New.
2776         (echo_now): Set echo_kboard to the current kboard.
2777         (cancel_echoing): Set echo_kboard to null.
2778         (cmd_error_internal): Use clear_message, remove references
2779         to echo_area_glyphs and echo_area_message.
2780         (command_loop_1): Check for echo area messages differently.
2781         (read_char): Likewise.
2782         (record_menu_key): Use clear_message.
2783         (Fexecute_extended_command):  Check for echo area messages
2784         differently.  Use push_message, restore_message, pop_message.
2786         * alloc.c (Fgarbage_collect): Use push_message, restore_message,
2787         pop_message.
2789         * emacs.c (shut_down_emacs): Call check_message_stack.
2791         * lisp.h: Add function prototypes and extern declarations for
2792         new functions and variables.
2794         * fileio.c (Fdo_auto_save): Use push_message, restore_message,
2795         pop_message.
2797         * minibuf.c (read_minibuf): Use clear_message instead of 
2798         setting echo_area_glyphs.
2799         (Fminibuffer_completion_help): Ditto.
2801         * editfns.c (Fcurrent_message): Rewritten.
2803         * frame.c, window.h: Remove references to echo_area_glyphs
2804         and previous_echo_glyphs.
2806 1999-08-21  Dave Love  <fx@gnu.org>
2808         * aix3-2-5.h (C_DEBUG_SWITCH): Use -g -O.
2809         * aix4-1.h: Likewise.
2811         * irix6-5.h (C_DEBUG_SWITCH): Set for debug and optimize.
2813 1999-08-20  Gerd Moellmann  <gerd@gnu.org>
2815         * xfns.c: Remove tiff34 prefix from include.
2817 1999-08-20  Dave Love  <fx@gnu.org>
2819         * cm.c: Revert previous change.
2821 1999-08-19  Gerd Moellmann  <gerd@gnu.org>
2823         * xterm.c (XTset_vertical_scroll_bar): Fix previous change.  Clear
2824         under scroll bar with width FRAME_SCROLL_BAR_COLS.
2826 1999-08-18  Dave Love  <fx@gnu.org>
2828         * callproc.c, filelock.c, insdel.c, sysdep.c, xmenu.c: Use
2829         stdlib.h.
2831         * doprnt.c: Use stdlib.h, unistd.h.
2833         * config.in: Add HAVE_TERMCAP_H.
2835         * cm.c: Use termcap.h.
2837 1999-08-18  Gerd Moellmann  <gerd@gnu.org>
2839         * xfns.c (x_window) [USE_X_TOOLKIT]: Remove test for
2840         FRAME_X_WINDOW (f) being null at the of the function.  If widgets
2841         cannot be created we will already have crashed earlier.  Call
2842         lw_set_main_areas with a null menu-bar widget, so that we have
2843         a reasonable default.
2844         (Fx_create_frame): Rearranged so that Lisp errors during frame
2845         initialization cause less damage.  Initialize menu bar widget
2846         here.
2848 1999-08-18  Gerd Moellmann  <gerd@gnu.org>
2849         
2850         * dispnew.c (update_frame_line): Fix previous change.  If writing
2851         whole line clear to end of frame.
2853 1999-08-17  Gerd Moellmann  <gerd@gnu.org>
2855         * window.c (Fcoordinates_in_window_p): Return `left-bitmap-area'
2856         and `right-bitmap-area' if position is in the bitmap areas.  This
2857         avoids an error when clicking on the bitmap areas.  Instead, they
2858         are currently treated like clicks inside the window.
2859         (coordinates_in_window): Return 5 and 6 for bitmap areas.
2860         (Qleft_bitmap_area, Qright_bitmap_area): New.
2861         (syms_of_window): Initialize new symbols.
2863         * dispnew.c (update_frame_line): If writing whole line,
2864         don't write trailing spaces unless we must.
2866         * xdisp.c (unwind_redisplay): New.  Resets flag redisplaying_p.
2867         (redisplay_internal): Register unwind_redisplay with
2868         register_unwind_protect.
2869         (try_window_reusing_current_matrix): If new start > old start,
2870         give up if start pos of first reusable row is not equal to new
2871         start.
2873         * eval.c (Fsignal): Don't reset redisplaying_p here.
2875         * xterm.c (expose_area): If row extends face to end of line,
2876         write the whole line.
2878 1999-08-16  Gerd Moellmann  <gerd@gnu.org>
2880         * dispextern.h (struct it): Remove member
2881         show_trailing_whitespace_p.
2883         * dispnew.c (direct_output_for_insert): Use
2884         Vshow_trailing_whitespace instead of former iterator member
2885         show_trailing_whitespace_p.
2886         (direct_output_forward_char): Don't do it if hightlighting
2887         trailing whitespace.
2889         * xdisp.c (Qshow_trailing_whitespace): Removed.
2890         (Vshow_trailing_whitespace): Added.
2891         (init_iterator): Remove initialization code for
2892         show_trailing_whitespace_p.
2893         (redisplay_internal): Don't try cursor movement in this_line
2894         if showing trailing whitespace.
2895         (redisplay_window): Likewise for cursor movement in current
2896         matrix and try_window_id.
2897         (try_window_reusing_current_matrix): Likewise.
2898         (trailing_whitespace_p): Return 0 if trailing whitespace is
2899         in front of point.
2900         (display_line): Use Vshow_trailing_whitespace instead of
2901         former iterator member show_trailing_whitespace_p.
2902         (syms_of_xdisp): Add DEFVAR_LISP for show-trailing-whitespace.
2904 1999-08-16  Gerd Moellmann  <gerd@gnu.org>
2906         * window.c (Fpos_visible_in_window_p): Rewritten.
2908         * xfaces.c (add_to_log): Renamed from display_message.
2909         Don't display messages in echo area.
2911         * xterm.c (x_draw_glyph_string_box): Use the background width
2912         of the glyph string for the width of the box.
2914 1999-08-16  Stefan Monnier  <monnier@cs.yale.edu>
2916         * syntax.c (Fforward_comment): Set comstyle for Scomment_fence.
2918 1999-08-16  Geoff Voelker  <voelker@cs.washington.edu>
2920         * xfns.c, w32fns.c (x_set_frame_parameters): Set foreground and
2921         background first, and then set other parameters that might
2922         depend upon their new values.
2924 1999-08-15  Gerd Moellmann  <gerd@gnu.org>
2926         * xfaces.c (Vfont_list_limit): New.
2927         (syms_of_xfaces): Make it a user-variable.
2928         (DEFAULT_FONT_LIST_LIMIT): New.
2929         (sorted_font_list): If Vfont_list_limit is an integer > 0, list
2930         maximally that number of fonts, otherwise use
2931         DEFAULT_FONT_LIST_LIMIT.
2932         (Fx_font_family_list): Bind `font-list-limit' to higher values 
2933         until we have all fonts.
2934         (Fxfont_list): Additionally return the full names of fonts and
2935         their registry and encoding.
2937         * xterm.c (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: 
2938         Simplify clearing "under" scroll bar.
2940         * window.c (Qfixed_window_size): New.
2941         (syms_of_window): Initialiaze it.
2942         (check_all_windows): Add return type void.
2943         (window_fixed_size_p): New.  Return non-zero if window
2944         is fixed-size.
2945         (window_min_size_1): New.
2946         (window_min_size): Handle fixed-size windows.
2947         (size_window): New. Rewritten combination of set_window_height and
2948         set_window_width that handles fixed-size windows.
2949         (set_window_height): Call it.
2950         (set_window_width): Call it.
2951         (Fsplit_window): Give an error on attempt to split a fixed-size
2952         window.
2953         (change_window_height): Partly rewritten to handle fixed-size
2954         windows.
2956 1999-08-13  Wolfgang Rupprecht  <wolfgang@wsrcc.com>
2958         * process.c (Fopen_network_stream): Fix previous change.
2960 1999-08-13  Karl Heuer  <kwzh@gnu.org>
2962         * xdisp.c (line_number_display_limit_width): New var.
2963         (decode_mode_spec): Use it instead of hardcoded value.
2964         (syms_of_xdisp): Defvar it.
2966 1999-08-13  Richard M. Stallman  <rms@gnu.org>
2968         * eval.c (run_hook_list_with_args): Gcpro `globals'.
2969         (run_hook_with_args): Likewise.
2971         * window.h (struct window): New field too_small_ok.
2973         * window.c (set_window_height, set_window_width): 
2974         If window starts out "too small", set its too_small_ok flag.
2975         If window's too_small_ok flag is set, don't delete it
2976         unless it is so small it would cause a crash.
2978 1999-08-13  Gerd Moellmann  <gerd@gnu.org>
2980         * window.c (MINSIZE): Removed.
2981         (window_min_size): New.
2982         (set_window_height): Use window_min_size.
2983         (change_window_height): Ditto.
2985 1999-08-12  Gerd Moellmann  <gerd@gnu.org>
2987         * indent.c (vmotion): Don't add in mini-buffer prompt width
2988         if prompts are inserted into mini-buffer.
2990 1999-08-12  Wolfgang Rupprecht  <wolfgang@wsrcc.com>
2992         * config.in: Add HAVE_GETADDRINFO.
2993         * process.c (Fopen_network_stream): Use getaddrinfo.
2995 1999-08-11  Gerd Moellmann  <gerd@gnu.org>
2997         * xdisp.c (get_overlay_arrow_glyph_row): Set the charpos of
2998         glyphs to -1.
3000         * xdisp.c (face_before_or_after_it_pos): If position after
3001         or before iterator's current position in the buffer is out
3002         of bounds, return the iterator's original face id.
3004         * dispnew.c (mirror_make_current): If desired row isn't enabled,
3005         just swap glyphs pointers between current and desired row.
3006         (build_frame_matrix_from_leaf_window) [GLYPH_DEBUG]: Copy
3007         desired matrix method string to current matrix.
3009 1999-08-11  Kenichi Handa  <handa@etl.go.jp>
3011         * lisp.h (CHAR_MODIFIER_MASK): New macro.
3013         * lread.c (read_escape): For Control modifier, pay attention to
3014         multibyte character.
3015         (read1): Likewise.  Singal error or a multibyte character which
3016         has a modifer bit.  Check validity of Shift modifer.
3018         * charset.c (non_ascii_char_to_string): Handle modifier bits as
3019         the same as Lisp reader.
3021 1999-08-10  Richard M. Stallman  <rms@gnu.org>
3023         * charset.h (BCOPY_SHORT): Fix typo `unsigined'.
3025 1999-08-10  Alexandre Oliva  <oliva@dcc.unicamp.br>
3027         * unexelf.c [__linux__ && __alpha__] (HAS_SBSS_SECTION): Define.
3029 1999-08-10  Eli Zaretskii  <eliz@gnu.org>
3031         * msdos.c (IT_set_face): Abort if the default face is not realized
3032         and cached.
3033         (IT_write_glyphs): Reset the screen face to the default face
3034         before writing glyphs.
3036         * xfaces.c (realize_default_face) [MSDOS]: Don't take default
3037         colors from the frame here.
3038         (realize_tty_face) [MSDOS]: Do it here.  Update the face
3039         attributes with the actual name of the color taken from the
3040         frame.
3042         * dosfns.c (msdos_stdcolor_name): Remove const from return value.
3043         * dosfns.h (msdos_stdcolor_name): Ditto for the prototype.
3045         * frame.c (Fframe_parameters): Swap foreground and background
3046         colors returned in frame parameters if the frame has reverse in
3047         its parameter alist.
3048         (Fmake_terminal_frame): Make a unique copy of face_alist for
3049         each frame.
3051 1999-08-07  Richard Stallman  <rms@gnu.org>
3053         * buffer.c (Fprevious_overlay_change): Just return
3054         the answer obtained from overlays_at.
3056         * xfns.c (xpm_load) [!XpmAllocCloseColors]:
3057         Use XpmCloseness and attrs.closeness instead.
3059 1999-08-06  Richard Stallman  <rms@gnu.org>
3061         * lread.c (Feval_buffer): New arg DO_ALLOW_PRINT.
3063 1999-08-06  Geoff Voelker  <voelker@cs.washington.edu>
3065         * dired.c (directory_files_internal, Fdirectory_files_and_attributes, 
3066         Ffile_attributes_lessp): New functions.
3067         (Fdirectory_files): Use directory_files_internal.
3068         (syms_of_dired): Initialize Fdirectory_files_and_attributes,
3069         Ffile_attributes_lessp.
3071         * w32.c (stat): Check for directory ending in separator when
3072         doing readdir fast path.
3074         * w32fns.c (x_set_icon_type): Support setting frame icons.
3075         * w32term.c (x_bitmap_icon): New function.
3076         (x_make_frame_visible, x_iconify_frame): Invoke x_bitmap_icon.
3077         
3078 1999-08-06  Gerd Moellmann  <gerd@gnu.org>
3080         * xdisp.c (set_iterator_to_next): After delivering a character
3081         from a display vector, restore face and charset to what they were
3082         before the display vector was processed.
3084 1999-08-06  Gerd Moellmann  <gerd@gnu.org>
3086         * xdisp.c (reseat_at_next_visible_line_start): New parameter
3087         on_newline_p.
3088         (set_iterator_to_next):  After delivering last char
3089         from display vector, reseat on next visible line start if 
3090         dpvec_char_len < 0.
3091         (next_element_from_buffer): Set dpvec_char_len to -1 for
3092         selective display.
3094 1999-08-06  Gerd Moellmann  <gerd@gnu.org>
3096         * xdisp.c (compute_line_metrics): If first line's physical ascent
3097          is larger than its logical ascent, use the physical ascent, and
3098          make the row taller.  Set row's overlapping_p flag.
3100         * dispnew.c (redraw_overlapping_rows): Use flag overlapping_p.
3101         (direct_output_for_insert): Ditto.
3103         * dispextern.h (struct glyph_row): Add overlapping_p.
3105         * xterm.c (x_draw_phys_cursor_glyph): Redraw overlaps.
3107         * dispextern.h (MATRIX_ROW_OVERLAPS_PRED_P): New.
3108         (MATRIX_ROW_OVERLAPS_SUCC_P): New.
3110         * dispnew.c (direct_output_for_insert): Don't use this method if
3111         row is overlapped by others.
3112         (update_text_area): Write full line if current line is overlapped.
3113         (redraw_overlapped_rows): New.
3114         (update_window): Call it.
3115         (redraw_overlapping_rows): New.
3116         (update_window): Call it.
3117         (scrolling_window): Make sure overlapped_p flag in current rows is
3118         unchanged.
3119         (row_equal_p): Take rows overlapped_p flag into account.
3121         * dispextern.h (struct glyph_row): Add flag overlapped_p.
3123         * xterm.c (x_fix_overlapping_area): New.
3124         (x_redisplay_interface): Add x_fix_overlapping_area.
3126         * dispnew.c (adjust_glyphs): Block input while adjusting matrices.
3128 1999-08-06  Gerd Moellmann  <gerd@gnu.org>
3130         * xterm.c (x_draw_glyphs): Add parameter overlaps_p.
3131         (struct glyph_string): Add member for_overlaps_p.
3132         (x_get_glyph_string_clip_rect): If glyph string draws foreground
3133         of overlapping rows, clip to window bottom.
3134         (x_fill_glyph_string): Add parameter overlaps_p.
3135         (x_fill_composite_glyph_string): Ditto.
3136         (BUILD_GLYPH_STRINGS): Ditto.
3137         (BUILD_CHAR_GLYPH_STRINGS): Ditto.
3138         (x_draw_glyph_string): Don't draw anything but the foreground
3139         if glyph string draws row overlaps.
3141         * dispnew.c (direct_output_for_insert): Don't use this
3142         optimization for rows that overlap others.
3143         (update_window_line): Return non-zero if display has changed.
3144         (update_text_area): Ditto.
3145         (update_window): Record if display has been changed.
3147         * dispextern.h (MATRIX_ROW_OVERLAPPING_P): New.
3149         * dispextern.h (struct redisplay_interface): Add
3150         fix_overlapping_area.
3152         * xterm.c (x_append_glyph): Set glyph flag overlaps_vertically_p.
3154         * dispextern.h (struct glyph): Add overlaps_vertically_p.
3156         * xterm.c (x_produce_image_glyph): Compute iterator's physical
3157         ascent and descent.
3158         (x_produce_stretch_glyph): Ditto.
3159         (x_produce_glyphs): Ditto.
3161         * xdisp.c (init_iterator): Reset physical line height info
3162         after producing special glyphs.
3163         (display_toolbar_line): Set physical line height info.
3164         (compute_line_metrics): Ditto.
3165         (display_line): Ditto.
3166         (display_string): Ditto.
3168         * term.c (produce_glyphs): Set iterator's physical height
3169         information.
3171         * dispnew.c (blank_row): Compute glyph row's physical height.
3172         (row_equal_p): Take physical row heights into account.
3173         (direct_output_for_insert): Ditto.
3174         (update_text_area): Ditto.
3176         * dispextern.h (struct glyph_row): Add phys_ascent and
3177         phys_height.
3178         (struct it): Add phys_ascent, phys_descent, max_phys_ascent,
3179         max_phys_descent.
3181 1999-08-04  Stefan Monnier  <monnier@cs.yale.edu>
3183         * buffer.c (switch_to_buffer_1): New subroutine, taken out from
3184         Fswitch_to_buffer.
3185         (no_switch_buffer): New function.
3186         (Fswitch_to_buffer): Call them.  Don't get confused
3187         by "same-window" buffers in a dedicated frame.
3189         * window.c (display-buffer): Don't get confused
3190         by "same-window" buffers in a dedicated frame.
3192 1999-08-04  Andreas Schwab  <schwab@gnu.org>
3194         * insdel.c (insert_from_string_1): Check gap size against number
3195         of outgoing bytes, not incoming bytes.
3197 1999-08-03  Tom Breton  <tob@world.std.com>
3199         * lread.c (read1): Added circular reading code to #N=.
3200         (SUBSTITUTE): New macro.
3201         (seen_list): New variable.
3202         (substitute_object_in_subtree): New function.
3203         (substitute_object_recurse): New function.
3204         (substitute_in_interval): New function.
3206 1999-08-02  Eli Zaretskii  <eliz@gnu.org>
3208         * Makefile.in (frame.o, sysdep.o, xfaces.o): Depend on dosfns.h.
3210         * frame.c (make_terminal_frame): Don't call init_frame_faces if
3211         noninteractive, for termcap frames as well.
3213         * sysdep.c (init_sys_modes): Call init_frame_faces for termcap
3214         frames.
3216 1999-08-01  Richard Stallman  <rms@gnu.org>
3218         * fns.c (internal_equal): Correct overlay comparison.
3220 1999-07-31  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
3222         * xfns.c (x_set_internal_border_width): 
3223         Call do_pending_window_change.  Don't block input, don't call XFlush.
3224         (x_set_vertical_scroll_bars): Call do_pending_window_change.
3225         (x_set_scroll_bar_width, x_set_font): Likewise.
3227         * frame.c (Fset_frame_height): Call do_pending_window_change.
3228         (Fset_frame_width, Fset_frame_size): Likewise.
3230         * xterm.c (x_set_window_size): When calling change_frame_size,
3231         specify 1 for DELAY.
3233         * widget.c (EmacsFrameSetCharSize): Don't call
3234         do_pending_window_change here.
3236 1999-07-30  Dave Love  <fx@gnu.org>
3238         * config.in: Add HAVE_STDLIB_H.
3240 1999-07-30  Richard M. Stallman  <rms@gnu.org>
3242         * process.c (create_process): Detect failure of `pipe'.
3244 1999-07-30  Keisuke Nishida  <kei@psn.net>
3246         * alloc.c (allocate_vectorlike): Add missing increment.
3248         * data.c (Fdefalias): Call Ffset instead of duplicating code.
3250         * keymap.c (get_keymap_1, get_keyelt): Check the type of OBJECT
3251         before calling indirect_function.
3253 1999-07-30  Eli Zaretskii  <eliz@gnu.org>
3255         * dispextern.h (load_color, lookup_derived_face): Declare
3256         prototypes.
3258         * dispnew.c (init_display) [MSDOS]: Don't initialize frame faces,
3259         it will be done later.
3261         * frame.c (make_terminal_frame) [MSDOS]: Don't call
3262         init_frame_faces if non-interactive.
3263         (Fframe_parameters) [MSDOS]: Replace indexing into colornames[]
3264         array with a call to msdos_stdcolor_name.  The font name is now
3265         "ms-dos", consistent with realize_tty_face.
3267         * keyboard.c (cmd_error_internal): Don't kill Emacs if this is an
3268         MSDOS frame.
3270         * window.c (Fset_window_configuration) [MSDOS]: Don't call
3271         x_set_toolbar_lines.
3273         * xfaces.c (load_color): Remove static from definition and remove
3274         prototype.
3275         [MSDOS]: Add a DOS-specific version of load_color.
3276         (lookup_face): Replace FRAME_TERMCAP_P with !FRAME_WINDOW_P.
3277         (lookup_derived_face): New function.
3278         (realize_default_face): Support MSDOS frames.
3279         [MSDOS]: If fore/background colors are unspecified, inherit them
3280         from the frame.
3281         (realize_face): Support MSDOS frames.
3282         (realize_tty_face): Support MSDOS frames.
3283         [MSDOS]: If the face color is not in Vface_tty_color_alist, call
3284         load_color to try to find a suitable approximation.  If the face
3285         is inverse-video, swap the foreground and background colors.
3287         * dosfns.c (msdos_stdcolor_name, msdos_stdcolor_idx): New
3288         functions.
3290         * dosfns.h (msdos_stdcolor_name, msdos_stdcolor_idx): Declare.
3292         * msdos.h: Remove redundant declarations (most of them are now in
3293         dispextern.h).
3295         * msdos.c (IT_set_face): Rewritten for the new redisplay engine.
3296         Use default frame colors if the face doesn't specify them; invert
3297         the colors if highlight is ON.
3298         (IT_write_glyphs): Rewritten for the new redisplay engine.
3299         (IT_change_line_highlight): Add (unused) parameter Y, since that's
3300         how the hook is called by term.c.
3301         (IT_copy_glyphs): New function, copies an area of the display in
3302         video RAM.
3303         (IT_insert_glyphs): Rewritten to DTRT instead of aborting, since
3304         redisplay now calls it even if char_ins_del_ok is zero.
3305         (IT_set_frame_parameters): Prototype changed.  Calls the new
3306         load_color.  Puts the new fore/background colors into the default
3307         face on current frame.
3308         (IT_menu_display): Rewritten to handle the new struct glyph
3309         instead of a char array.
3310         (XMenuActivate): Call lookup_derived_face to create and use
3311         special faces for the pop-up and drop-down menus.
3313 1999-07-29  Gerd Moellmann  <gerd@gnu.org>
3315         * xterm.c (x_set_toolkit_scroll_bar_thumb): Don't call
3316         XawScrollbarSetThumb if thumb parameters haven't changed because
3317         that function apparently isn't optimized for this case.
3319 1999-07-29  Eli Zaretskii  <eliz@gnu.org>
3321         * msdos.c (getdefdir): Don't return failure indication when
3322         _fixpath sets errno to ENOSYS.
3324 1999-07-28  Gerd Moellmann  <gerd@gnu.org>
3326         * xdisp.c (string_char_and_length): New.  Use it everywhere
3327         instead of STRING_CHAR_AND_LENGTH in xdisp.c.
3329 1999-07-28  Kenichi Handa  <handa@etl.go.jp>
3331         * fns.c (count_combining): New function.
3332         (struct textprop_rec): New structure.
3333         (concat): Copy text properties correctly when byte combining
3334         occurs.
3336 1999-07-28  Gerd Moellmann  <gerd@gnu.org>
3338         * xterm.c (x_setup_relief_color): Don't try smart color allocation
3339         if display is mono.
3340         (x_draw_row_bitmaps): If face has stipple, don't switch
3341         to foreground color for clearing areas, and set the fill style.
3343         * xfaces.c (load_face_colors): Load background color if setting
3344         stipple, too.
3345         (prepare_face_for_display): Use FillOpaqueStippled instead of 
3346         FillStippled.
3348 1999-07-26  Ken'ichi Handa  <handa@gnu.org>
3350         * xterm.c (x_find_ccl_program): Add casting.
3352         * w32fns.c (w32_find_ccl_program): Add casting.
3354 1999-07-27  Gerd Moellmann  <gerd@gnu.org>
3356         * dispextern.h (struct glyph_row): Flag internal_border_p removed.
3358         * xfns.c (x_create_tip_frame): Don't set bitmapIcon resource
3359         because this will try to access a nonexisting widget.
3361 1999-07-26  Markus Rost  <rost@gnu.org>
3363         * fns.c (Fgethash): Fix order of variables (patch by gerd). 
3364         (Fputhash): Ditto.
3365         (Fremhash): Ditto.
3367 1999-07-26  Gerd Moellmann <gerd@gnu.org>
3368         
3369         * widget.c (EmacsFrameSetCharSize): Don't add XtNborderWidth
3370         value to frame width and height.
3372         * xterm.c (x_get_glyph_string_clip_rect): Take internal border
3373         into account for full-width windows.  Don't add scroll bar width
3374         to width of clip rect.
3375         (x_draw_glyph_string_box): Add 1 to right x of full width lines.
3376         (x_set_glyph_string_background_width): Add 1 to background width.
3377         (x_draw_glyphs): Take internal border into account for full-width
3378         lines.
3380 1999-07-26  Richard M. Stallman  <rms@gnu.org>
3382         * xfns.c (x_set_mouse_color): Always unload the old color.
3383         Don't allow nil as color value.
3384         (x_set_cursor_color, x_set_background_color, x_set_foreground_color): 
3385         Always unload the old color.
3387         * indent.c (Fmove_to_column): Extend end of line only if FORCE is t.
3389 1999-07-26  Karl Heuer  <kwzh@gnu.org>
3391         * fns.c (Fy_or_n_p): Doc fix.
3393 1999-07-26  Kenichi Handa  <handa@etl.go.jp>
3395         * ccl.h (setup_ccl_program): The type is changed to `int'.
3397         * ccl.c (ccl_driver) <CCL_Call>: Now CCL program ID to call may be
3398         stored in the following CCL code.  Adjusted for the change of
3399         Vccl_program_table.
3400         (resolve_symbol_ccl_program): Adjusted for the new style of
3401         embedded symbols (SYMBOL . PROP) in CCL compiled code.   Return Qt
3402         is resolving failed.
3403         (ccl_get_compiled_code): New function.
3404         (setup_ccl_program): Function type changed from `void' to `int'.
3405         Resolve symbols in CCL_PROG.
3406         (Fccl_program_p): New function.
3407         (Fccl_execute): Get compiled CCL code by just calling
3408         setup_ccl_program.
3409         (Fccl_execute_on_string): Likewise.
3410         (Fregister_ccl_program): Adjusted for the change of
3411         Vccl_program_table.
3413         * coding.c (setup_coding_system): Get compiled CCL code by just
3414         calling setup_ccl_program.
3416         * xterm.c (x_find_ccl_program): Get compiled CCL code by just
3417         calling setup_ccl_program.
3419         * w32fns.c (w32_find_ccl_program): Get compiled CCL code by just
3420         calling setup_ccl_program.
3422 1999-07-23  Gerd Moellmann  <gerd@gnu.org>
3424         * xfaces.c (frame_update_line_height): Just use the height of the
3425         frame's fontset or font, instead of taking face fonts into
3426         account.
3428         * xdisp.c (get_next_display_element): Display DEL as `^?'.
3430 1999-07-23  Richard M. Stallman  <rms@gnu.org>
3432         * window.c (Fsplit_window): For default size, round up for left window.
3434 1999-07-21  Joe Ramey  <ramey@ti.com>
3436         * filelock.c (lock_if_free): Return -1 if check_lock_owner
3437         has returned -1 (lockfile exists but is not a symlink?).
3439 1999-07-20  Gerd Moellmann  <gerd@gnu.org>
3441         * xterm.c (x_draw_bar_cursor): Use scratch_cursor_gc to
3442         because of a change in cursor_gc made in 20.4.
3444 1999-07-19  Gerd Moellmann  <gerd@gnu.org>
3446         * xterm.c (x_calc_absolute_position): Subtract menu bar height
3447         for YNegative, if using X toolkit.
3449         * xfns.c (x_real_positions): Don't subtract window borders 
3450         from positions returned.
3452 1999-07-17  Gerd Moellmann  <gerd@gnu.org>
3454         * xrdb.c (x_load_resources): Set double-click time defaults
3455         for Motif list boxes from double-click-time.
3457         * fns.c (Vhash_table_tests): Remvoed.
3458         (Qhash_table_test): New.
3459         (syms_of_fns): Initialize Qhash_table_test.
3460         (Fmake_hash_table): Look up user-defined tests in symbol prop
3461         `hash-table-test'.
3462         (Fdefine_hash_table_test): Store test and hash function as
3463         symbol prop `hash-table-test'.
3464         (make_hash_table): Add parameters user_test and user_hash.
3466         * window.c (set_window_buffer): Set window margins for tty
3467         frames, too.
3468         (Fset_window_margins): Ditto.
3470         * term.c (append_glyph): Use glyph area of iterator instead of
3471         always TEXT_AREA.
3473         * dispnew.c (update_frame_1): Add left margin width to cursor
3474         hpos.
3475         (direct_output_for_insert): Ditto.
3476         (direct_output_forward_char): Ditto.
3478         * dispnew.c (adjust_glyph_matrix): Set glyph matrix' top_line_p.
3480         * dispextern.h (struct glyph_matrix): Add top_line_p.
3482 1999-07-16  Gerd Moellmann  <gerd@gnu.org>
3484         * frame.h (FRAME_WINDOW_REDISPLAY_P): Removed.  Use FRAME_WINDOW_P
3485         instead.
3487         * fns.c (cmpfn_eq): Add hash code parameters.
3488         (cmpfn_eql): Ditto.
3489         (cmpfn_equal): Ditto, and compare hash codes before calling Fequal.
3490         (cmpfn_user_defined): Likewise.
3492 1999-07-15  Gerd Moellmann  <gerd@gnu.org>
3494         * lisp.h (DEFAULT_REHASH_THRESHOLD): Changed to 0.8.
3496         * fns.c (maybe_resize_hash_table): Correct computation of
3497         index vector size.
3498         (make_hash_table): Ditto.
3499         (Fmakehash): New.
3501         * xdisp.c (echo_area_display): Don't call redraw_garbaged_frames.
3503         * alloc.c (gc_sweep): Call sweep_weak_hash_tables.
3504         (survives_gc_p): Make it externally visible.
3505         (mark_object): Ditto.
3507         * fns.c (remove_hash_entry): Removed.
3508         (sweep_weak_hash_tables): New.
3510         * print.c (print): Print more information about hash tables.
3512         * xfns.c (image_spec_hash): Removed.
3513         (lookup_image): Use sxhash instead of image_spec_hash.
3514         (image_spec_equal_p): Removed.
3515         (lookup_image): Use Fequal instead of image_spec_equal_p.
3517 1999-07-14  Gerd Moellmann  <gerd@gnu.org>
3519         * lisp.h (P_): Moved to top of file.
3521         * fns.c (make_hash_table): Set new members.
3523         * alloc.c (mark_object): Mark hash table's user_hash_function.
3524         Mark index vector for weak hash tables.
3526         * lisp.h (struct Lisp_Hash_Table): Add user_cmp_function,
3527         user_hash_function, cmpfn, and hashfn.
3529         * fns.c (build_hash): Removed.
3530         (hash_test): Removed.
3531         (cmpfn_eq, cmpfn_eql, cmpfn_equal, cmpfn_user_defined): New.
3532         (hashfn_eq, hashfn_eql, hashfn_equal, hashfn_user_defined): New.
3534 1999-07-13  Gerd Moellmann  <gerd@gnu.org>
3536         * alloc.c (survives_gc_p): New.
3538         * print.c (print): Add hash table handling.
3540         * alloc.c (mark_object): Add code to mark hash tables.
3542         * lisp.h (GC_HASH_TABLE_P): New.
3544         * emacs.c (main): Call init_fns.
3546         * fns.c (init_fns): New.
3548         * fns.c: Add hash table implementation.
3550         * lisp.h (PVEC_HASH_TABLE): New.
3551         (struct Lisp_Hash_Table): New.
3552         (XHASH_TABLE): New.
3553         (XSET_HASH_TABLE): New.
3554         (HASH_TABLE_P): New.
3555         (CHECK_HASH_TABLE): New.
3556         (DEFAULT_HASH_SIZE): New.
3557         (DEFAULT_REHASH_THRESHOLD): New.
3558         (DEFAULT_REHASH_SIZE): New.
3560         * xterm.c (x_draw_glyphs): Add parameters real_start and real_end.
3561         (x_write_glyphs): Compute overwritten cursor using real start
3562         and end positions of display.
3563         (x_insert_glyphs): Ditto.
3565 1999-07-10  Gerd Moellmann  <gerd@gnu.org>
3567         * keyboard.c (read_char): Use message3_nolog to show help-echo.
3569         * dispnew.c (blank_row): Add y-position as parameter.  Compute
3570         visible height.
3572         * xdisp.c (next_element_from_string): Give padding spaces
3573         a position of -1.
3575         * dispnew.c (adjust_glyph_matrix): Some work to support 
3576         marginals areas on tty frames in a future version.
3577         (allocate_matrices_for_frame_redisplay): Ditto.
3579         * xdisp.c (display_line): At ZV, set glyph row's displays_text_p
3580         to zero if number of glyphs in the row is <= 1.
3582 1999-07-09  Gerd Moellmann  <gerd@gnu.org>
3584         * dispnew.c (buffer_posn_from_coords): Take left marginal area
3585         into account.
3587         * xdisp.c (handle_display_prop): Don't reset area if handing
3588         a property from a string that came from a `display' property.
3589         (handle_single_display_prop): Don't handle recursive `display'
3590         properties.
3591         (handle_single_display_prop): Handle some display property
3592         forms for terminal frames.
3593         (Qimage): Moved here from xfns.c.
3595         * dispextern.h (struct it): New field string_from_display_prop_p.
3597         * xterm.c (x_clip_to_row): Don't let clip_rect include top
3598         line.
3600 1999-07-08  Gerd Moellmann  <gerd@gnu.org>
3602         * xdisp.c (handle_single_display_prop): Handle `:when FORM'.
3604         * window.c (set_window_buffer): Set window's vscroll to zero.
3606         * xdisp.c (QCwhen): New.
3607         (display_prop_end): New.
3608         (handle_single_display_prop): Use it.
3609         (debug_method_add): Print buffer name if tracing.
3610         (try_window_reusing_current_matrix): Compute visible height
3611         of reused rows.  Fix cursor position calculation in case of
3612         top-line.
3614         * dispextern.h (struct redisplay_interface): Add parameter
3615         cursor_on_p to update_window_end_hook.
3617         * xterm.c (x_update_window_end): Add parameter cursor_on_p.
3619 1999-07-07  Gerd Moellmann  <gerd@gnu.org>
3621         * xdisp.c (redisplay_internal): Ensure that redisplayinp_p 
3622         doesn't become negative when decrementing it.
3624         * eval.c (Fsignal): Reset redisplaying_p to zero.
3626         * xdisp.c (try_window_reusing_current_matrix): Call hooks
3627         for window update.
3628         (try_window_id): Ditto.
3630         * xterm.c (x_clear_end_of_line): Handle top-line correctly.
3631         (x_scroll_run): Ditto.
3632         (any_help_event_p): New.
3633         (x_initialize): Set it to zero.
3634         (XTread_socket): Clear help echo only if any_help_event_p.
3636         * xdisp.c (init_iterator): Set top_line_p.
3637         (start_display): Use correct initial y if top-line is present.
3638         (make_cursor_line_fully_visible): Bug fixes for top-line.
3639         (try_scrolling): Ditto.
3640         (try_window_reusing_current_matrix): Ditto.
3642         * dispextern.h (struct it): Add top_line_p.
3644         * dispnew.c (shift_glyph_matrix): Move some computations out
3645         of the loop.
3647         * dispnew.c (margin_glyphs_to_reserve): Use NUMBERP and 
3648         XFLOATINT.
3650 1999-07-06  Gerd Moellmann  <gerd@gnu.org>
3652         * dispnew.c (update_frame_1): When setting cursor in echo area,
3653         skip only over padding spaces at the end.
3655         * xfaces.c (realize_tty_face): Set face's font_name field to
3656         "tty".
3658         * term.c (update_end): Turn cursor on only if selected window's
3659         cursor_off_p flag is not set.
3661 1999-07-05  Gerd Moellmann  <gerd@gnu.org>
3663         * term.c (TS_cursor_visible): Renamed from TS_visual_mode.
3664         (TS_cursor_normal): Renamed from TS_end_visual_mode.
3665         (TS_cursor_invisible):  New.
3666         (term_init): Initialize TS_cursor_invisible.
3667         (tty_hide_cursor): New.
3668         (tty_show_cursor): New.
3669         (update_end): Show tty cursor.
3670         (update_begin): Hide tty cursor to prevent cursor flickering
3671         during redisplays triggered by timers (stealth fontification).
3673         * keyboard.c (make_lispy_event) <TOOLBAR_EVENT>: Apply modifiers.
3675         * xterm.c (XTread_socket) [USE_MOTIF] <KeyPress>: Catch events
3676         in scroll bars.
3677         (x_handle_toolbar_click): Set modifier bits.
3679 1999-07-04  Gerd Moellmann  <gerd@gnu.org>
3681         * keyboard.c (kbd_store_ptr): Declare it as a volatile pointer
3682         instead of a pointer to a volatile input_event.
3683         (kbd_buffer_store_event): Remove volatile modifier from 
3684         declaration of local variable `sp'.
3685         (Fdiscard_input): Don't cast when assigning kbd_store_ptr
3686         to kbd_fetch_ptr.
3688 1999-07-03  Gerd Moellmann  <gerd@gnu.org>
3690         * xdisp.c (try_window_id): Set beg_unchanged and end_unchanged
3691         only if buffer is modified.  Return quickly if changes are
3692         above window start.
3694 1999-07-02  Gerd Moellmann  <gerd@gnu.org>
3696         * dispextern.h (HSCROLL_WINDOWS): Removed.
3698         * xdisp.c (mark_window_display_accurate): Don't set
3699         w->region_showing.
3700         (redisplay_internal): Don't call redraw_garbaged_frames.
3702 1999-07-01  Gerd Moellmann  <gerd@gnu.org>
3704         * xdisp.c (echo_area_display): Don't display truncation marks
3705         for messages because 20.4 doesn't do it either.
3706         (redisplay_window): Case same window start.  Instead of giving
3707         up when cursor is partially visible, make it fully visible.
3708         (mark_window_display_accurate): Some cleanup.  Record window's
3709         last cursor information.
3710         (debug_method_add): Improved.
3711         (redisplay_internal): Record last cursor info only if not
3712         consider_all_windows_p.
3714         * dispnew.c (update_window): Update top line after scrolling.
3715         (blank_row): Renamed from make_empty_enabled_row.
3716         (increment_glyph_row_buffer_positions): Increment positions
3717         in buffers, only.
3719         * window.c (Fcoordinates_in_window_p): Add top-line to doc
3720         string.
3722 1999-06-30  Gerd Moellmann  <gerd@gnu.org>
3724         * dispnew.c (update_window): Check that updated row is visible.
3726         * xterm.c (x_draw_row_bitmaps): Check for invisible rows at
3727         top of window differently.
3729         * xdisp.c (try_window_reusing_current_matrix): Don't do it
3730         if region is showing.
3732         * dispnew.c (adjust_glyph_matrix): Check w->vscroll when
3733         avoiding matrix reallocation.  Set window_vscroll in matrix.
3735         * dispextern.h (struct glyph_matrix): Add member window_vscroll.
3737         * lwlib-Xm.c: Add function prototypes.
3739         * xdisp.c (debug_method_add): New.
3740         (debug_redisplay_method): Removed.
3741         (try_window_reusing_current_matrix): Handle case where old
3742         window start is the same as new window start.
3744         * dispextern.h (struct glyph_matrix) [GLYPH_DEBUG]: Make `method'
3745         an array instead of a pointer.
3747         * lwlib-Xm.c (xm_update_label): Use val->name to look up
3748         a label string from resources.
3749         (xm_update_label): Add some comments.
3751         * xfns.c (Fx_show_tip): Undo previous change.
3753         * xterm.c (x_append_glyph): Clear glyph->u.val.
3755         * dispextern.h (struct glyph): Increase size of face_id bit-field
3756         for CHAR_GLYPH to 12.
3758 1999-06-29  Gerd Moellmann  <gerd@gnu.org>
3760         * xfaces.c (x_charset_registry): Make it externally visible.
3762 1999-06-28  Gerd Moellmann  <gerd@gnu.org>
3764         * dispnew.c (update_window): Use mode_line_p flag of rows 
3765         instead of WINDOW_WANTS_MODELINE_P.
3767         * xterm.c (clear_mouse_face): Make externally visible.
3769         * xfns.c (Fx_show_tip): Clear mouse face before showing tip.
3771         * xterm.c (expose_line): Handle exposure of top-lines.
3773         * xterm.c (XTframe_up_to_date): Don't call note_mouse_highlight
3774         if mouse_face_mouse_frame is null.
3776         * xdisp.c (redisplay_window): If window is echo_area_window,
3777         and update_mode_line is set, update menubar and toolbar.
3779         * dispnew.c (space_glyph): Set its charpos to -1.
3780         (update_frame_1): Ignore trailing padding spaces.
3782         * xdisp.c (next_element_from_c_string): Set position of padding
3783         glyphs to -1.
3785 1999-06-27  Gerd Moellmann  <gerd@gnu.org>
3787         * xfns.c (x_laplace_read_row): Use XQueryColors instead of
3788         XQueryColor.
3790         * xdisp.c (display_menu_bar): Remove unwarranted assertion.
3791         (set_cursor_from_row): Skip over glyphs having a null object at
3792         the start of rows.
3793         (insert_left_trunc_glyphs): Use charpos < 0 to indicate truncation
3794         glyphs.
3795         (handle_invisible_prop): Compute next change only when needed.
3796         (handle_face_prop): Don't correct DEFAULT_FACE_ID if in the mode
3797         line.
3799 1999-06-26  Gerd Moellmann  <gerd@gnu.org>
3801         * xrdb.c (x_load_resources): Don't set resource for double-click
3802         time.
3804         * xdisp.c (try_window_id): Return quickly if all changes are
3805         below the window's current matrix end.
3807         * dispextern.h (MATRIX_ROW_PARTIALLY_VISIBLE_P): Remove window
3808         parameter.
3810         * xdisp.c (try_window_reusing_current_matrix): Set no_scrolling_p
3811         in desired not in current matrix.
3812         (try_window_reusing_current_matrix): Rotate matrices starting
3813         at start_vpos instead of 0.
3815         * xterm.c (expose_window): Use window_text_bottom_y.
3816         (fast_find_position): Ditto.
3818         * xdisp.c (redisplay_window): Use window_text_bottom_y.
3819         (try_window_reusing_current_matrix): Ditto.
3820         (get_last_unchanged_at_beg_row): Ditto.
3821         (init_iterator): Ditto.
3823         * dispnew.c (allocate_matrices_for_window_redisplay): Allocate one
3824         more row.
3825         (check_matrix_invariants): Use window_text_bottom_y.
3826         (update_window): Ditto.
3827         (scrolling_window): Ditto.
3829         * xdisp.c (window_text_bottom_y): New.
3831 1999-06-25  Gerd Moellmann  <gerd@gnu.org>
3833         * xterm.c (XTread_socket): Set mouse_face_frame to zero after
3834         clearing mouse face.
3835         (XTread_socket) <EnterNotify> [LESSTIF_VERSION]: If
3836         event.xcrossing.focus is not set, and focus is in the menu bar,
3837         set focus frame as if event.xcrossing.focus were set.
3839 1999-06-24  Gerd Moellmann  <gerd@gnu.org>
3841         * keyboard.c (make_lispy_event): Handle mouse on top lines.
3842         * keyboard.c (make_lispy_movement): Ditto.
3844         * window.c (coordinates_in_window): Return 4 if on top line.
3845         (Fcoordinates_in_window_p): Return `top-line' if on top line.
3847         * xdisp.c (window_box_height): Subtract top line height.
3848         (window_box): Add top line height to top y position if top line
3849         exists.
3850         (init_iterator): If base_face_id is TOP_LINE_FACE_ID, set row to
3851         the top line row of the window.  Set initial y-position to
3852         window's top line height plus delta.
3853         (start_display): Choose start glyph row depending on whether
3854         window has a top line.
3855         (try_scrolling): Take top line height into account for aggressive
3856         scrolling.
3857         (compute_window_start_on_continuation_line): Take top line into
3858         account.
3859         (redisplay_window): Ditto.  If top line height has changed, 
3860         trigger a new redisplay.
3861         (try_window_reusing_current_matrix): Take top line into account.
3862         (find_last_row_displaying_text): Ditto.
3863         (get_last_unchanged_at_beg_row): DItto.
3864         (try_window_id): Ditto.
3865         (compute_line_metrics): Ditto.
3867         * dispnew.c (shift_glyph_matrix): Compute visible row height
3868         taking top line of window into account.
3869         (update_window): Update top line.  If scrolling_window detects
3870         that all rows are equal, only set cursor.
3871         (update_window_line): Call after_update_window_line_hook if
3872         mode_line_p flag of rows has changed.
3873         (scrolling_window): Add parameter top_line_p.  Return -1 if
3874         all rows are equal.
3875         (mode_line_string): Add parameter mode_line_p.  Handle strings
3876         in top lines.
3878         * dispextern.h (MATRIX_TOP_LINE_ROW): New.
3879         (MATRIX_FIRST_TEXT_ROW): New.
3880         (MATRIX_ROW_PARTIALLY_VISIBLE_P): Use row's visible_height.
3881         (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P): New.
3882         (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P): New.
3883         (MATRIX_TOP_LINE_HEIGHT): New.
3884         (CURRENT_MODE_LINE_HEIGHT): Use estimate_mode_line_height.
3885         (CURRENT_TOP_LINE_HEIGHT): New.
3886         (DESIRED_TOP_LINE_HEIGHT): New.
3887         (WINDOW_DISPLAY_TOP_LINE_HEIGHT): New.
3888         (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE): Replaces
3889         WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
3890         (WINDOW_DISPLAY_TEXT_HEIGHT): New.
3892         * xterm.c (x_after_update_window_line): Don't draw bitmaps for top
3893         lines.
3894         (x_draw_row_bitmaps): Take top line into account when clearing
3895         bitmap area.
3896         (x_estimate_mode_line_height): Replacement for
3897         x_frame_mode_line_height.
3898         (x_get_glyph_string_clip_rect): Take top line into account.
3899         (x_clear_end_of_line): Ditto.
3900         (note_mode_line_highlight): Add parameter mode_line_p.  Handle
3901         top lines.
3902         (note_mouse_highlight): Call note_mode_line_highlight for top lines.
3903         (x_erase_phys_cursor): Take top line into account.
3905         * xdisp.c (window_box_height): Subtract top line height if
3906         window wants a top line.
3907         (display_mode_lines): New.
3908         (redisplay_window): Call it.
3909         (display_mode_line): Add parameters face_id and format.
3911         * dispextern.h (CURRENT_TOP_LINE_HEIGHT): New.
3912         (MATRIX_TOP_LINE_HEIGHT): New.
3914         * xterm.c (x_frame_mode_line_height): Add parameter face_id.
3916         * term.c (estimate_mode_line_height): Renamed from
3917         frame_mode_line_height.  Add parameter face_id.
3918         (estimate_mode_line_height_hook): Renamed from
3919         frame_mode_line_height_hook.
3920         (produce_special_glyphs_hook): Removed.
3921         (produce_glyphs_hook): Removed.
3923 1999-06-23  Gerd Moellmann  <gerd@gnu.org>
3925         * dispextern.h (WINDOW_WANTS_TOP_LINE_P): New.
3926         (struct glyph_row): Add mode_line_p.
3928         * xfaces.c (realize_basic_faces): Realize face `top-line'.
3929         (Qtop_line): New.
3930         (syms_of_xfaces): Initialize Qtop_line.
3932         * dispextern.h (TOP_LINE_FACE_ID): New.
3934         * buffer.c (init_buffer_once): Set default for
3935         top_line_format to nil.
3936         (init_buffer_once): Init top_line_format.
3937         (default-top-line-format): New.
3938         (top-line-format): New buffer-local variable.
3940         * buffer.h: Add top_line_format.
3942         * xdisp.c (overlay_arrow_changed_p): Removed because not used.
3944 1999-06-17  Dave Love  <fx@gnu.org>
3946         * xfns.c: Move the PNG section before the JPEG one to avoid
3947         problems surrounding setjmp.h/png.h on GNU/Linux.
3948         
3949 1999-06-17  Gerd Moellmann  <gerd@gnu.org>
3951         * xfns.c (x_kill_gs_process): Don't free colors.
3953 1999-06-17  Dave Love  <fx@gnu.org>
3955         * s/gnu-linux.h: Zap spurious ~.
3957 1999-06-16  Gerd Moellmann  <gerd@gnu.org>
3959         * xfns.c (gif_load): Improve multi-image support.
3961 1999-06-15  Gerd Moellmann  <gerd@gnu.org>
3963         * xfns.c (gif_load): Support multi-image files.
3965         * Makefile.in (LIBGIF): Use libungif.
3967         * configure.in (HAVE_GIF): Use libungif instead of libgif
3968         because the former doesn't contain patented compression code.
3970         * xdisp.c (compute_window_start_on_continuation_line): Don't
3971         do it if line start is too far away from window start.
3973 1999-06-14  Gerd Moellmann  <gerd@gnu.org>
3975         * buffer.c (init_buffer_once): Set buffer_local_flags for
3976         scroll_*_aggressively.
3977         (syms_of_buffer): Add DEFVAR_PER_BUFFER for scroll-*-aggressively.
3978         (init_buffer_once): Set defaults for these variables.
3979         (syms_of_buffer): Add default-scroll-*-aggressively.
3981         * buffer.h (scroll_up_aggressively): New.
3982         (scroll_down_aggressively):  New.
3984         * Makefile.in (LIBPNG): Add -lz -lm in case we're linking with
3985         a static PNG library.
3987         * configure.in (HAVE_PNG): Add -lz -lm when checking for PNG lib
3988         in case it's a static library.
3990         * Makefile.in (ctagsfiles): Split so that files starting
3991         with an `x' are found before files starting with `w32'.
3992         (ctagsfiles1): New.
3993         (ctagsfiles2): New.
3994         (TAGS): Use ctagsfiles[12] instead of ctagsfiles.
3996         * xdisp.c (compute_window_start_on_continuation_line): New.
3997         (redisplay_window): Use it.
3998         (INFINITY): New.
3999         (reseat_to_string): Use it.
4000         (hscroll_window_tree): Ditto.
4001         (compute_window_start_on_continuation_line): Ditto.
4002         (redisplay_window): Don't force display with a new window start.
4004 1999-06-06  Gerd Moellmann  <gerd@gnu.org>
4006         * xfns.c (x_report_frame_params): Don't report `outer-window-id'
4007         if widget not present.
4009         * xdisp.c (prepare_menu_bars): Ignore tooltip frame.
4011 1999-06-04  Gerd Moellmann  <gerd@gnu.org>
4013         * xfaces.c (recompute_basic_faces)[GLYPH_DEBUG]: Check return
4014         value of realize_basic_faces.
4015         (load_face_font_or_fontset): Store full font name in face.
4016         (realize_default_face): Use full font name.
4018         * xlwmenu.c (make_shadow_gcs) ]emacs]: Use x_alloc_nearest_color.
4020         * xterm.c (x_produce_glyphs): Set member char_to_display.
4021         (x_append_glyph): Store char_to_display in glyphs.
4023         * dispextern.h (struct it): Add char_to_display.
4025         * xfns.c (x_set_font): Don't call face-set-after-frame-default
4026         if faces haven't been initialized.
4027         (Fx_create_frame): Call face-set-after-frame-default after
4028         faces have been initialized, and widget has been created.
4030         * puresize.h (BASE_PURESIZE): Increased.
4032 1999-06-01  Gerd Moellmann  <gerd@gnu.org>
4034         * xfaces.c (set_lface_from_font_name): Add parameter force_p.
4035         (Finternal_set_lisp_face_attribute): If frame is t when
4036         :font attribute is set, use the selected frame.
4037         (clear_face_cache): Add parameter clear_fonts_p.
4038         (Fclear_face_cache): Add optional parameter thorougly.
4040         * xfaces.c (face_numeric_value): Return -1 if symbol is not
4041         in table.
4042         (Fclear_face_cache): New.
4043         (choose_face_fontset_font): If fontset doesn't contain font
4044         pattern for the given charset, use CHARSET_ASCII.
4045         (Finternal_set_lisp_face_attribute): Fix handling of nil
4046         stipple attribute.
4047         (Finternal_set_lisp_face_attribute): Fix handling of changing
4048         font-related face attributes of the default face.
4049         (set_lface_from_font_name): Set only attributes that aren't
4050         specified.
4052 1999-05-31  Gerd Moellmann  <gerd@gnu.org>
4054         * xfaces.c (SCALABLE_FONTS): Define this to enable scalable
4055         font support.
4056         (Vscalable_fonts_allowed) [SCALABLE_FONTS]: New.
4057         (x_face_list_fonts): Add parameter scalable_fonts_p.  Handle
4058         scalable fonts depending on the setting of SCALABLE_FONTS.
4059         (first_font_matching): List more than one font to find the
4060         first non-scalable matching font.
4061         (sorted_font_list): Let x_face_list_fonts return scalable fonts
4062         depending on SCALABLE_FONTS.
4063         (better_font_p): New parameter compare_pt_p.  If zero, don't
4064         compare point sizes of fonts.
4065         (exact_face_match_p) [SCALABLE_FONTS]: New.
4066         (build_scalable_font_name) [SCALABLE_FONTS]: New.
4067         (may_use_scalable_font_p) [SCALABLE_FONTS]: New.
4068         (best_matching_font) [SCALABLE_FONTS]: Handle scalable fonts.
4069         (syms_of_xfaces):  Add scalable-fonts-allowed.
4071 1999-05-26  Gerd Moellmann  <gerd@gnu.org>
4073         * xfns.c (png_load): Let PNG lib handle gamma.  Construct
4074         mask only if image contains simple transparency information.
4075         Otherwise, combine image with frame background color.
4077         * configure.in (--with-png, HAVE_PNG): New.
4079         * config.in (HAVE_PNG): New.
4081         * Makefile.in: Add PNG library.
4083         * xfns.c: Add PNG support.
4085 1999-05-25  Gerd Moellmann  <gerd@gnu.org>
4087         * xdisp.c (init_xdisp): Initialize echo_area_message and
4088         previous_echo_area_message to nil.
4090         * keyboard.c (read_char): Rename local variable echo_area_message
4091         because it shadows the global one.
4093 1999-05-05  Gerd Moellmann  <gerd@gnu.org>
4095         * xterm.c (note_mode_line_highlight): Restructured.
4097         * window.c (coordinates_in_window): Handle windows that don't have
4098         a mode line because their buffer's mode-line-format is nil.
4099         Recognize the mode line under x positions that correspond to
4100         flags areas and left scroll bar.
4102 1999-05-02  Dave Love  <fx@gnu.org>
4104         * xterm.c (note_mouse_highlight): Separate help-echo processing
4105         from check on mouse-face so that it works generally.
4107 1999-04-21  Gerd Moellmann  <gerd@gnu.org>
4109         * sound.c (Fplay_sound): Run hook play-sound-hook.
4110         (Qplay_sound_hook): New.
4112 1999-04-20  Gerd Moellmann  <gerd@gnu.org>
4114         * xdisp.c (update_echo_area): Handle echo_area_message.
4116 1999-04-19  Gerd Moellmann  <gerd@gnu.org>
4118         * editfns.c (Fmessage): Use message3.
4120         * print.c (printchar): Set echo_area_message to nil.
4121         (strout): Ditto.
4123         * minibuf.c (read_minibuf): Reset echo message strings to nil.
4124         (Fminibuffer_completion_help): Ditto.
4126         * keyboard.c (cmd_error_internal): Set echo_areA_message.
4127         (command_loop_1): Test echo_areA_message.
4128         (read_char): Ditto.
4129         (record_menu_key): Set echo_area_message to nil.
4130         (Fexecute_extended_command): Test echo_area_message.
4131         (Fexecute_extended_command): Handle echo_area_message.
4133         * fileio.c (Fdo_auto_save): Handle the case that echo_area_message
4134         is set.
4136         * editfns.c (Fcurrent_message): If echo_area_message is set,
4137         return a substring of that string.
4139         * dispnew.c (direct_output_for_insert): Test echo_area_message
4140         in addition to echo_area_glyphs.
4141         (set_window_cursor_after_update): Ditto.
4142         (update_frame_1): Ditto.
4144         * alloc.c (Fgarbage_collect): Use message3_nolog to display
4145         old Lisp message string.
4147         * xdisp.c (echo_area_message): New.
4148         (previous_echo_area_message): New.
4149         (syms_of_xdisp): Initialize and staticpro new variables.
4150         (echo_area_display): Display echo_area_message if set.
4151         (message2_nolog): Set echo_area_message and
4152         previous_echo_area_message.
4153         (echo_area_display): Set previous_echo_area_message.
4154         (redisplay_internal): Display echo area if echo_area_message
4155         or previous_echo_area_message are set.
4156         (redisplay_preserve_echo_area): Test/set echo_area_message and
4157         previous_echo_area_message.
4158         (redisplay_window): Test echo_area_message.
4159         (message3_nolog): New.
4160         (message3): New.
4162         * editfns.c (Fformat): Add text properties to the result string
4163         from properties of the format string and properties of string
4164         arguments.
4166         * textprop.c (text_property_list): New.
4167         (add_text_properties_from_list): New.
4168         (extend_property_ranges): New.
4170 1999-03-29  Gerd Moellmann  <gerd@gnu.org>
4172         * xfaces.c (Qraised, Qsunken, QCshadow): Removed.
4173         (QCline_width, QCstyle, Qpressed_button, Qreleased_button): New.
4174         Use these symbols for the box face attribute instead of the
4175         removed ones.
4177 1999-03-12  Gerd Moellmann  <gerd@gnu.org>
4179         * xfaces.c (realize_tty_face): Don't set alt_char_p of face.
4180         Correct wrong test for slant.
4182 1999-03-10  Gerd Moellmann  <gerd@gnu.org>
4184         * xfaces.c: Use `unspecified' for unspecified face attributes,
4185         use t and nil for on/off.
4187 1999-03-06  Gerd Moellmann  <gerd@gnu.org>
4189         * buffer.c (syms_of_buffer): Extend doc string of
4190         mode-line-format.
4192         * xfaces.c (x_face_list_fonts): New parameter try_alternatives_p.
4193         (first_font_matching): New.
4194         (set_lface_from_font_name): Use it if font name is a pattern.
4195         (font_field_wildcard_p): Removed.
4197         * dispnew.c (shift_glyph_matrix): Add `window' parameter.
4198         Recompute visible height of rows.
4200         * xterm.c (note_mouse_highlight): Reorder code for help-echo.
4201         Don't accept non-strings for help-echo from overlays.
4203 1999-03-04  Dave Love  <fx@gnu.org>
4205         * xterm.c (note_mouse_highlight): Check overlays for help-text
4206         property.
4207         (XTread_socket): Fix compiler warning.
4208         
4209 1999-03-05  Gerd Moellmann  <gerd@gnu.org>
4211         * xterm.c (note_mouse_highlight): Don't restrict number of 
4212         overlay to 10.  Call overlays_at so that it doesn't try to
4213         extend the vector.
4215         * xdisp.c (compute_line_metrics): Compute glyph row's visible
4216         height.
4218         * dispnew.c (row_equal_p): Compare visible row height, only.
4219         (update_text_area): Draw whole line if visible heights of
4220         rows differ.
4221         (update_window_line): Call after_update_window_line_hook
4222         if visible row height has changed.
4224         * dispextern.h (MATRIX_ROW_VISIBLE_HEIGHT): Removed.
4225         (struct glyph_row): New member visible_height.
4227         * xfaces.c (font_field_wildcard_p): New.
4228         (set_lface_from_font_name): Remove parameter force_p.  Accept
4229         font names containing wildcards.
4231 1999-03-04  Gerd Moellmann  <gerd@gnu.org>
4233         * xterm.c (x_after_update_window_line): Clear internal border
4234         when windows_or_buffers_changed.
4236         * dispextern.h (WINDOW_WANTS_MODELINE_P): Return zero if window's
4237         buffer has a nil mode_line_format.
4239 1999-03-03  Gerd Moellmann  <gerd@gnu.org>
4241         * xterm.c (x_setup_relief_colors): Use either background color
4242         or specified color.
4244         * xfaces.c (realize_x_face): Set face->use_box_color_for_shadows_p.
4246         * dispextern.h (struct face): Add use_box_color_for_shadows_p.
4248         * xterm.c (x_draw_box_rect): New.
4249         (x_draw_glyph_string_box): Renamed from
4250         x_draw_glyph_string_relief.  Call x_draw_box_rect.
4252         * xfns.c (QCrelief): New.
4253         (syms_of_xfns): Initialize it.
4255         * dispextern.h (struct glyph): Rename left_shadow_p to
4256         left_box_line_p, right_shadow_p to right_box_line_p.
4257         (MAX_RELIEF_THICKNESS): Removed.
4258         (struct it): Rename members having `relief' in their names
4259         to contain `box' instead.
4261         * xfaces.c (realize_x_face): Handle new box attribute values.
4262         (QCrelief, Qbox): Removed.
4263         (QCshadow, QCcolor, Qraised, Qsunken): New.
4264         (syms_of_xfaces): Initialize new symbols.
4266 1999-03-02  Gerd Moellmann  <gerd@gnu.org>
4268         * dispextern.h (LFACE_RELIEF_INDEX): Removed.
4270         * xfaces.c (LFACE_RELIEF): Removed.
4271         (merge_face_vector_with_property): Remove handling of `:relief'.
4272         (Finternal_set_lisp_face_attribute): Ditto.
4273         (Finternal_set_lisp_face_attribute_from_resource): Ditto.
4274         (Finternal_get_lisp_face_attribute): Ditto.
4275         (realize_default_face): Ditto.
4276         (lface_hash): Don't compute hash from relief.
4278         * dispextern.h (struct face): Replace member `relief' by
4279         `box_line_width'.  Add member `box'.
4280         (face_box_type): New.
4282         * xterm.c (x_produce_glyphs): If face has overline, add overline
4283         thickness + 1 to ascent.
4285 1999-03-01  Gerd Moellmann  <gerd@gnu.org>
4287         * xterm.c (x_draw_glyph_string): Draw underline, overline,
4288         strike-through, and boxes.
4289         (x_draw_glyph_string_underline): Removed.
4291         * xfaces.c (QCoverline, QCstrike_through, QCbox): New.
4292         (Qoverline, Qstrike_through, Qbox): New.
4293         (syms_of_xfaces): Define these symbols.
4294         (check_lface_attrs): Add checks for overline, strike-through,
4295         and box.
4296         (Finternal_set_lisp_face_attribute): Set new attributes.
4297         (LFACE_OVERLINE, LFACE_STRIKE_THROUGH, LFACE_BOX): New.
4298         (load_color): Handle new attributes.
4299         (realize_x_face): Ditto.
4300         (merge_face_vector_with_property): Ditto.
4301         (free_face_colors): Ditto.
4302         (Finternal_set_lisp_face_attribute_from_resource): Ditto.
4303         (Finternal_get_lisp_face_attribute): Ditto.
4304         (Finternal_lisp_face_attribute_values): Ditto.
4306         * dispextern.h (lface_attribute_index): Add enumerators for
4307         overstrike, strike-through, and box.
4308         (struct face): Add members for overline, strike-through, and
4309         box.
4311 1999-02-17  Dave Love  <fx@gnu.org>
4313         * s/gnu-linux.h s/gnu.h s/irix5-0.h s/netbsd.h s/sco4.h s/sco5.h
4314         s/template.h (NARROWPROTO): Define on the basis of relevant X cf
4315         files.
4317 1999-02-16  Gerd Moellmann  <gerd@gnu.org>
4319         * keyboard.c (toolbar_items): Call access_keymap with third
4320         parameter 1, so that we don't get inherited toolbar item
4321         definitions.
4323         * xdisp.c (redisplay_internal): In optimization 1, don't decrement
4324         the window end vpos when in empty first line of window.
4326 1999-02-15  Gerd Moellmann  <gerd@gnu.org>
4328         * xfaces.c (set_font_frame_param): New.
4329         (Finternal_set_lisp_face_attribute): Call it.
4331 Sun Feb 14 10:54:02 1999  Masatake Yamato  <masata-y@is.aist-nara.ac.jp>
4333         * xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
4334         Accept specifications of color for underline.
4336 1999-02-13  Gerd Moellmann  <gerd@gnu.org>
4338         * xfaces.c (Finternal_set_lisp_face_attribute): If parameter
4339         `frame' is t, operate on face defaults for new frames.  If it
4340         is nil, operate on the selected frame.
4342 1999-02-12  Gerd Moellmann  <gerd@gnu.org>
4344         * dispnew.c (check_matrix_invariants): Put it in #if 0.
4345         (update_window): Put the call to check_matrix_invariants in #if 0.
4347 Sun Feb  7 09:58:49 1999  Masatake Yamato  <masata-y@is.aist-nara.ac.jp>
4349         * dispextern.h: Remove all else block of UNDERLINE_COLOR.
4350         Remove definition of UNDERLINE_COLOR.
4352 Mon Jan  4 04:43:41 1999  Masatake Yamato  <masata-y@is.aist-nara.ac.jp>
4354         * xfaces.c (free_face_colors): Free the color for underline.
4356         * xterm.c (x_draw_glyph_string_underline): Set the color for underline
4357         to the GC.
4359 Sun Jan  3 08:41:10 1999  Masatake Yamato  <masata-y@is.aist-nara.ac.jp>
4361         * dispextern.h  (UNDERLINE_COLOR): Defined.
4362         (struct face): Added two new members.
4363         underline_color, underline_defaulted_p.
4365         * xfaces.c (merge_face_vector_with_property): 
4366         (check_lface_attrs): Accept the string value for underline.
4367         (Finternal_set_lisp_face_attribute): Likewise. 
4369         * xfaces.c (load_color): Change the last argument type to enum
4370         lface_attribute_index from int. And addec code for underling coloring.
4371         (load_face_colors): Pass LFACE_*_INDEX to load_color.
4372         
4373 1999-02-12  Gerd Moellmann  <gerd@gnu.org>
4375         * xfns.c (Fx_image_header): Removed.
4377 1999-02-07  Gerd Moellmann  <gerd@gnu.org>
4379         * xterm.c: Don't include <bitmaps/gray>.
4380         (x_term_init): Use gray_bitmap_width and gray_bitmap_height.
4382         * xfns.c (Fx_image_header): Add missing `\n\'.
4383         (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits): New.
4385 1999-02-01  Gerd Moellmann  <gerd@gnu.org>
4387         * xterm.c (x_scroll_bar_create): Set background pixel from
4388         specified scroll bar color.
4389         (x_scroll_bar_set_handle): Use scroll bar foreground color.
4391         * xfns.c (x_set_scroll_bar_foreground): Remove all scroll bars.
4392         (x_set_scroll_bar_background): Ditto.
4394         * xterm.c (x_create_toolkit_scroll_bar): Set scroll bar colors.
4396         * xfns.c (x_default_scroll_bar_color_parameter): New.
4397         (Fx_create_frame): Call it.
4399 1999-01-31  Gerd Moellmann  <gerd@gnu.org>
4401         * xfns.c (Fx_create_frame): Initialize scroll bar pixel color
4402         values in x_output structure.  
4403         (Qscroll_bar_foreground, Qscroll_bar_background): New.
4404         (syms_of_xfns): Initialize these symbols.
4406         * xterm.h (struct x_output): Add scroll bar pixel colors.
4408         * xfns.c (x_frame_parms): Add entries for scroll bar colors.
4409         (x_set_scroll_bar_foreground): New.
4410         (x_set_scroll_bar_background): New.
4412         * xlwmenu.c (all_dashes_p): Removed.
4413         (size_menu_item): Call lw_separator_p.
4414         (display_menu_item): Ditto.
4415         (display_menu): Ditto.
4416         (draw_separator): New.
4417         (display_menu_item): Call it.
4418         (separator_height): New.
4419         (size_menu_item): Call it.
4421         * lwlib-Xm.c (all_dashes_p): Removed.
4422         (make_menu_in_widget): Use lw_separator_p.  Set Motif separator
4423         type.
4425         * lwlib.c (lw_separator_p): New.
4427         * lwlib.h (enum menu_separator): New.
4429 1999-01-12  Gerd Moellmann  <gerd@gnu.org>
4431         * xdisp.c (handle_single_display_prop): New.
4432         (handle_display_prop): Call it.
4433         (handle_raise_prop): Removed.
4434         (handle_height_prop): Removed.
4435         (handle_space_width_prop): Removed.
4436         (handle_face_prop): Remove handling of raised text.
4437         (handle_display_prop): Do it here.
4439         * dispextern.h (DISPLAY_PROP_IDX): Replaces GLYPH_PROP_IDX.
4440         (RAISE_PROP_IDX): Removed.
4441         (HEIGHT_PROP_IDX): Removed.
4442         (SPACE_WIDTH_PROP_IDX): Removed.
4444         * xdisp.c (Qdisplay): Replaces Qglyph.
4445         (handle_display_prop): Formerly handle_glyph_prop.
4447 1999-01-11  Gerd Moellmann  <gerd@gnu.org>
4449         * xdisp.c (reseat_to_string): Set position in display vector to -1.
4450         (handle_stop): Set position in display vector to -1.  Don't
4451         check overlay strings when set up to deliver characters from a
4452         display vector.
4453         (set_iterator_to_next): At the end of a run of characters from a
4454         display vector, check whether the display vector display replaces
4455         the display of a character.
4457 1999-01-05  Gerd Moellmann  <gerd@gnu.org>
4459         * xfaces.c (init_frame_faces): Don't realize faces if frame's
4460         X window hasn't been created yet.
4462 1998-12-06  Gerd Moellmann  <gerd@gnu.org>
4464         * sound.c: New.
4466 1998-12-04  Gerd Moellmann  <gerd@gnu.org>
4468         * config.in (HAVE_SOUND): New.
4470         * emacs.c (main): Call syms_of_sound and init_sound.
4472         * Makefile.in (obj): Add sound.o.
4474         * configure.in: Add checks for machine/soundcard.h and sys/soundcard.h.
4476         * config.in (HAVE_MACHINE_SOUNDCARD_H): New.
4477         (HAVE_SYS_SOUNDCARD_H): New.
4479 1998-12-03  Gerd Moellmann  <gerd@gnu.org>
4481         * buffer.h (struct buffer): indicate_empty_lines renamed from
4482         indicate_zv_lines.
4484         * buffer.c (indicate-empty-lines): Renamed from indicate_zv_lines.
4485         (default-indicate-zv-lines): Likewise.
4487         * dispextern.h (struct glyph_row): Rename indicate_zv_line_p
4488         to indicate_empty_line_p.
4490         * xdisp.c (reseat_at_next_visible_line_start): Reset method
4491         to next_element_from_buffer.
4493         * frame.c (make_frame): Set n_current_toolbar_items to 0.
4495         * xdisp.c (handle_face_prop): Allow symbols of the form `N+'
4496         and `N-'.
4498         * xfns.c (xbm_scan): New.
4499         (xbm_read_hexint): Removed.
4500         (xbm_read_bitmap_file_data): Use xbm_scan.
4502         * fileio.c (Finsert_file_contents): Prevent redisplay optimizations.
4504 1998-12-02  Gerd Moellmann  <gerd@gnu.org>
4506         * xfns.c (xbm_read_hexint): New.
4507         (xbm_read_bitmap_file_data): New.
4508         (xbm_load_image_from_file): Call xbm_read_bitmap_file_data
4509         instead of XReadBitmapFileData.
4511         * xdisp.c (handle_raise_prop): Compute voffset from current font.
4513         * xfaces.c (face_with_height): New.
4515         * xdisp.c (eval_handler): Renamed from eval_mode_handler.
4516         (eval_form): Renamed from eval_mode_element.
4517         (handle_face_prop): Use it.
4518         (Qheight): Replaces Qsmaller.
4519         (handle_height_prop): Replaces handle_smaller_prop.
4520         (handle_face_prop): If iterator's font_height is not an 
4521         integer, evaluate it to get the font height to use.
4523         * dispextern.h (HEIGHT_PROP_IDX): Replaces SMALLER_PROP_IDX.
4524         (struct it): Use `font_height' instead of `smaller'.
4526 1998-12-01  Gerd Moellmann  <gerd@gnu.org>
4528         * xdisp.c (reseat_1): New.
4529         (reseat): Call it.
4530         (move_it_vertically_backward): Ditto.
4531         (redisplay_window): Don't abort when cursor not found in recenter.
4533 1998-11-30  Gerd Moellmann  <gerd@gnu.org>
4535         * xdisp.c (reseat_at_next_visible_line_start): When not
4536         currently delivering display elements from the current buffer,
4537         restore buffer position first.
4538         (init_from_display_pos): Don't set IT's position from the
4539         position passed to this function.
4541 1998-11-28  Gerd Moellmann  <gerd@gnu.org>
4543         * config.in (PROTO): Removed.
4545         * xterm.h: Change PROTO to P_.
4547 1998-11-26  Gerd Moellmann  <gerd@gnu.org>
4549         * xterm.c (take_vertical_position_into_account): New.
4550         (x_produce_image_glyph): Call it.
4551         (x_produce_stretch_glyph): Ditto.
4552         (x_produce_glyphs): Ditto.
4553         (x_fill_glyph_string): Adjust base line for glyph's voffset.
4554         (x_fill_composite_glyph_string): Ditto.
4555         (x_fill_image_glyph_string): Ditto.
4556         (x_fill_stretch_glyph_string): Ditto.
4558         * xdisp.c (display_line): Always compute row height from
4559         max_ascent and max_descent.
4561         * dispextern.h (struct glyph): Add voffset.
4562         (struct it): Replace height by descent, max_height by max_descent.
4564         * xterm.c (x_append_glyph): Set voffset
4565         (x_append_stretch_glyph): Ditto.
4566         (x_produce_image_glyph): Ditto.
4567         (x_produce_glyphs): Take voffset into account.
4568         (x_produce_image_glyph): Ditto.
4569         (x_produce_stretch_glyph): Ditto.
4571         * dispextern.h (struct it): Add voffset.
4572         * xdisp.c (push_it): Save voffset.
4573         (pop_it): Restore it.
4575         * xdisp.c (it_props): Add entry for `raise'.
4576         (handle_raise_prop): New.
4578         * dispextern.h (RAISE_PROP_IDX): New.
4580         * xdisp.c (Qraise): New.
4581         (syms_of_xdisp): Define Qraised.
4583         * xterm.c (x_scroll_bar_move): Clear to the left and right
4584         of toolkit scroll bars differently.
4585         (x_scroll_bar_move): Removed.
4586         (XTset_vertical_scroll_bar): Move code from x_scroll_bar_move here.
4588         * dispextern.h: Make it compilable --with-x=no.
4589         * alloc.c: Ditto.
4590         * emacs.c: Ditto.
4591         * dispnew.c: Ditto.
4592         * keyboard.c: Ditto.
4593         * term.c: Ditto.
4594         * xdisp.c: Ditto.
4595         * xfaces.c: Ditto.
4596         * xfns.c: Ditto.
4597         * xmenu.c: Ditto.
4599 1998-11-25  Gerd Moellmann  <gerd@gnu.org>
4601         * xterm.c (XTread_socket): Cancel help-echo when leaving frame.
4603 1998-11-24  Gerd Moellmann  <gerd@gnu.org>
4605         * xterm.c (x_set_toolkit_scroll_bar_thumb): When dragging,
4606         update slider size, only.
4607         (xm_scroll_callback): Set dragging member of the scroll bar.
4608         (xt_action_hook): Reset last_scroll_bar_part.
4609         (XTredeem_scroll_bar): Reset bar->dragging to nil.
4611         * xlwmenu.c (abort_gracefully): New.
4612         (display_menu): Use it instead of abort.
4613         (size_menu): Ditto.
4615         * xfns.c (Fx_hide_busy_cursor): Don't try to hide busy cursor
4616         window on newly created frames that don't have one.
4618 1998-11-23  Gerd Moellmann  <gerd@gnu.org>
4620         * xdisp.c (restore_overlay_strings): Removed.
4621         (restore_dpvec): Removed.
4622         (init_from_display_pos): Inline both functions above.
4624         * xfns.c (IMAGE_NON_NEGATIVE_INTEGER_VALUE): New.
4625         (parse_image_spec): Handle it.
4626         (xbm_format): Use it.
4627         (xpm_format): Ditto.
4628         (pbm_format): Ditto.
4629         (jpeg_format): Ditto.
4630         (tiff_format): Ditto.
4631         (gif_format): Ditto.
4632         (gs_format): Ditto.
4634         * xdisp.c (set_window_cursor): Removed.
4635         (redisplay_internal): Case cursor motion in cursor line of
4636         selected window; use set_cursor_from_row.
4638 1998-11-22  Gerd Moellmann  <gerd@gnu.org>
4640         * widget.c (EmacsFrameSetCharSize): Take widget's border width
4641         into account.
4643 1998-11-21  Gerd Moellmann  <gerd@gnu.org>
4645         * xterm.c (expose_frame): Redraw menu bar window.
4647         * xdisp.c (display_menu_bar): Record hpos instead of x-position
4648         in menu item.
4650         * dispnew.c (change_frame_size_1): Use FRAME_TOP_MARGIN instead
4651         of FRAME_TOOLBAR_LINES.  Use `f' instead of `frame'.
4653         * widget.c (set_frame_size): Use FRAME_SCROLL_BAR_COLS
4654         to determine vertical_scroll_bar_extra.
4655         (EmacsFrameSetCharSize): Ditto.
4656         * xfns.c (x_figure_window_size): Ditto.
4658         * xterm.c (x_draw_row_bitmaps): Draw in `bitmap-area' face.
4659         (x_draw_bitmap): Ditto.
4661         * dispextern.h (face_id): New id BITMAP_AREA_FACE_ID.
4662         * xfaces.c (realize_basic_faces): Realize it.
4664 1998-11-20  Gerd Moellmann  <gerd@gnu.org>
4666         * xmenu.c (xmenu_show): Add workaround for remaining button grab
4667         under LessTif   Use the widget of the frame as parent for the 
4668         menu, again.
4670 1998-11-19  Gerd Moellmann  <gerd@gnu.org>
4672         * xterm.c (XTread_socket): Inhibit busy cursor for EnterNotify.
4673         When EnterNotify, don't generate a mouse movement event if
4674         notification is from a busy-cursor child window.
4676         * xterm.h (struct x_output): Add busy_window, remove cursor.
4678         * xfns.c (Fx_show_busy_cursor): Formerly Fx_display_busy_cursor.
4679         Use a transparent window to display the busy-cursor.
4680         (Fx_hide_busy_cursor): Formerly Fx_undisplay_busy_cursor.
4682 1998-11-17  Gerd Moellmann  <gerd@gnu.org>
4684         * xdisp.c (check_window_end): New, for debugging.
4685         (CHECK_WINDOW_END): New.
4686         (try_window_id): Use it.
4688         * xterm.c (process_expose_from_menu): Return int.
4690         * keyboard.c (kbd_buffer_get_event): Set flag to prevent recording
4691         TOOLBAR_EVENT events in last_nonmenu_event.
4693 1998-11-16  Gerd Moellmann  <gerd@gnu.org>
4695         * xdisp.c (redisplay_window): If windows_or_buffers_changed,
4696         window end isn't reliable, so set window_end_valid to nil.
4697         (redisplay_internal): If overlay arrow has changed, set
4698         windows_or_buffers_changed to redisplay thoroughly.
4700         * dispnew.c (adjust_glyph_matrix): Invalidate window end, if
4701         necessary.
4703         * xfns.c (file_dialog_cb): New.
4704         (Fx_file_dialog): New.
4705         * fileio.c (Fread_file_name): Call it.
4707         * xrdb.c (x_load_resources): Add default resoures for file 
4708         selection dialog.
4710 1998-11-14  Gerd Moellmann  <gerd@gnu.org>
4712         * xterm.c (note_mouse_highlight): Don't highlight when popup
4713         is active.
4715         * xlwmenu.c (xlwMenuResources): Change previously unused 
4716         XtNmargin to 4.
4717         (size_menu): Take margin into account.
4718         (display_menu_item): Ditto.
4719         (remap_menubar): Ditto.
4720         (draw_arrow): Draw it 3D.
4722         * keyboard.c (timer_check): Inhibit busy cursor around calls to
4723         timer-event-handler.  This busy cursor tends to be anoying if
4724         fontifying stealthily.
4726         * dispnew.c (direct_output_for_insert): Give up if current row
4727         contains trailing whitespace.
4729 1998-11-13  Gerd Moellmann  <gerd@gnu.org>
4731         * dispextern.h (prop_idx): Add FONTIFIED_PROP_IDX.
4733         * xdisp.c (handle_fontified_prop): New.
4734         (Vfontification_functions): New.
4735         (Qfontification_functions): New.
4736         (it_props): Add handle_fontified_prop.
4738 1998-11-12  Gerd Moellmann  <gerd@gnu.org>
4740         * xmenu.c (xmenu_show): Use the frame's edit_widget as parent.
4741         Otherwise, under LessTif, after the popup has gone, all button
4742         press events come in for the frame's widget, and release events
4743         come in for the edit_widget.
4744         * xterm.c (XTread_socket): Remove workaround for that problem.
4745         (x_set_toolkit_scroll_bar_thumb): Add workaround for LessTif
4746         XmScrollBarSetValues.
4747         (SET_SAVED_MENU_EVENT): Give it statement form.
4749         * lwlib-Xm.c (make_menu_in_widget): Set alignment of menu
4750         title after all widgets have been created.
4752         * xfaces.c (display_message): If waiting_for_input, don't display
4753         the message.
4755         * window.c (scroll_command): If not acting on current_buffer,
4756         make redisplay consider all windows.
4758         * xfns.c (Fx_hide_tip): Return t if tooltip was open.
4760         * xdisp.c (handle_glyph_prop): Set it->object for images to
4761         the object having the glyph property.
4763         * xterm.c (x_draw_row_bitmaps): Don't draw if row is completely
4764         invisible.
4766 1998-11-11  Gerd Moellmann  <gerd@gnu.org>
4768         * xterm.h (struct x_display_info): Add gray pixmap.  * xterm.c
4769         (x_term_init): Create the gray pixmap.
4770         (x_setup_relief_color): Use it.
4771         (x_get_glyph_string_clip_rect): Draw a toolbar window over the
4772         internal border at the top of a frame.
4773         (x_init_glyph_string): Likewise.
4774         (x_draw_glyph_string_relief): Correct right x by 1 pixel for 
4775         full-width lines.
4776         (XTflash): Don't flash the toolbar window.
4778         * xterm.c (XTread_socket): Workaround for LessTif popup menus
4779         in case of ButtonPress events.
4781 1998-11-10  Gerd Moellmann  <gerd@gnu.org>
4783         * xrdb.c (x_load_resources): Add grey background colors as
4784         defaults for menus, scroll bars, and dialogs.
4786         * insdel.c (prepare_to_modify_buffer): Move setting
4787         windows_or_buffers_changed from modify_region here.
4789         * xfns.c (Fx_show_tip): Inhibit redisplay.
4790         (Fx_hide_tip): Ditto.
4791         (Fx_image_header): New.
4793 1998-11-09  Gerd Moellmann  <gerd@gnu.org>
4795         * dispnew.c (clear_window_matrices): Set window_end_valid to nil
4796         when clearing current window matrices.
4798 1998-11-08  Gerd Moellmann  <gerd@gnu.org>
4800         * xdisp.c (handle_glyph_prop): Don't set an iterator's buffer
4801         position from a string position.  Use the right end position
4802         if the property spans a whole overlay string.
4804 1998-11-07  Gerd Moellmann  <gerd@gnu.org>
4806         * xmenu.c (menubar_selection_callback): Remove workaround for
4807         Lesstif not calling XmNpopdownCallback because it doesn't
4808         handle the case where users don't select any menu item.
4810         * xlwmenu.c (toggle_button_width): Renamed from
4811         toggle_or_radio_button_width.
4812         (radio_button_width): New.
4813         (size_menu_item): Use new functions.
4814         (draw_shadow_rhombus): New.
4815         (draw_radio): Use radio_button_width and draw_shadow_rhombus.
4816         (draw_toggle): Use toggle_button_width.
4818         * insdel.c (modify_region): Set windows_or_buffers_changed.
4820         * buffer.c (set_buffer_internal): Don't set
4821         windows_or_buffers_changed.
4823         * lwlib-Xm.c (xm_update_toggle): Add callback xm_generic_callback
4824         instead of xm_internal_update_other_instances.
4826         * xmenu.c (HAVE_BOXES): Define if USE_X_TOOLKIT.
4828         * lwlib-Xm.c (make_menu_in_widget): Do help button before managing
4829         children to get it to the right place.
4830         (make_menu_in_widget): Create toggle buttons.
4831         (update_one_menu_entry): Update toggle buttons.
4833         * xmenu.c (menubar_selection_callback): Add workaround for
4834         Lesstif not calling XmNpopdownCallback.
4836         * xdisp.c (eval_mode_element): New.
4837         (eval_mode_handler): New.
4838         (display_mode_element): Use eval_mode_element.
4840         * xdisp.c (display_mode_element): Allow `(:eval FORM)'.
4841         Remove code looking at text props of default value.
4843         * xmenu.c (HAVE_BOXES): Define if using Lucid menus.
4845         * xlwmenu.c (size_menu_item): Add parameter button_width.
4846         (size_menu): Compute button_width.
4847         (toggle_or_radio_button_width): New.
4848         (draw_toggle): New.
4849         (draw_radio): New.
4850         (draw_shadow_rectangle): Add parameter `down_p'.
4852         * xlwmenuP.h (_window_state): Add button_width.
4854 1998-11-06  Gerd Moellmann  <gerd@gnu.org>
4856         * xmenu.c (single_submenu): Set button_type of menu to 
4857         BUTTON_TYPE_NONE.
4858         (single_submenu): Likewise for panes and menu items.
4859         (set_frame_menubar): Set button_type of menu bar to none.
4860         (xmenu_show): Likewise.
4861         (single_submenu): Set widget values selected slot.
4862         (xmenu_show): Likewise.
4864         * lwlib.c (merge_widget_value): Handle button_type.
4865         (copy_widget_value_tree): Copy button_type.
4867         * lwlib.h (enum button_type): New.
4868         (_widget_value): New member button_type.
4870         * xmenu.c (push_menu_item): Add parameters `type' and
4871         `selected'. Store it in menu_items.
4872         (MENU_ITEMS_ITEM_TYPE): New.
4873         (MENU_ITEMS_ITEM_SELECTED): New.
4874         (MENU_ITEMS_ITEM_LENGTH): Increase by two.
4876         * xfns.c (clear_image_cache): Get the current time, before
4877         doing anything.
4878         (cache_image): Set prev pointer of next image.
4879         (clear_image_cache): Clear current matrices if any image was
4880         freed.
4882         * xterm.c (XTread_socket): Set inhibit_busy_cursor.
4884         * xfns.c (x_set_cursor): New.
4885         (Fx_display_busy_cursor): New.
4886         (Fx_undisplay_busy_cursor): New.
4888         * xterm.h (struct x_output): Add busy_cursor.
4890         * xfns.c (Vx_busy_pointer_shape): New.
4891         (x_set_mouse_color): Create busy cursor.
4893         * process.c (wait_reading_process_input): Show and hide busy
4894         cursor.
4896         * keyboard.c (command_loop_1): Display busy cursor.
4898         * eval.c (Fsignal): Hide busy cursor.
4900         * buffer.c (set_buffer_internal): Don't set
4901         windows_or_buffers_changed.
4903         * xterm.c (redo_mouse_highlight): New.
4905 1998-11-04  Gerd Moellmann  <gerd@gnu.org>
4907         * lwlib-Xm.c (make_menu_in_widget): Test for menubar widgets
4908         using XmNrowColumnType.
4910         * xfns.c (x_create_x_image_and_pixmap): Add depth parameter.
4911         (x_build_heuritic_mask): New.
4912         (lookup_image): Call it.
4914         * xterm.c (note_toolbar_highlight): Always set up help_echo.
4915         (previous_help_echo): New.
4916         (XTread_socket): Generate help event with nil message when
4917         leaving a region with help-echo.
4918         (note_mouse_highlight): Handle `help-echo' over text.
4919         (XTread_socket): Dispatch VisibilityNotify, CirculateNotify,
4920         CirculateRequest.
4921         (clear_mouse_face): Don't clear if tooltip is shown.
4922         (XTread_socket): Redo mouse-highlight after tooltip is gone.
4923         Avoid SET_FRAME_GARBAGED when tooltip is mapped.
4925         * keyboard.c (Vshow_help_function): New.
4926         (read_char): Use it.
4928 1998-11-03  Gerd Moellmann  <gerd@gnu.org>
4930         * xfns.c (x_create_tip_frame): New.
4931         (Fx_show_tip): New.
4932         (Fx_hide_tip): New.
4934         * xterm.c (x_destroy_window): Handle case that we don't have 
4935         a widget.
4937         * dispextern.h (struct glyph_row): Rename no_marginal_areas_p
4938         to full_width_p.  Add internal_border_p.
4940 1998-11-02  Gerd Moellmann  <gerd@gnu.org>
4942         * xterm.c (note_mode_line_highlight): Check the charpos of
4943         the glyph under the mouse pointer before accessing text
4944         properties at that position.
4946 1998-11-01  Gerd Moellmann  <gerd@gnu.org>
4948         * xterm.c (x_draw_image_relief): Handle toolbar_button_relief.
4950         * xdisp.c (auto-raise-toolbar-buttons): New.
4951         (build_desired_toolbar_string): Handle the flag.
4952         (toolbar-button-margin): New.
4953         (toolbar-button-relief): New.
4954         (build_desired_toolbar_string): Use margin and relief.
4956         * xterm.c (x_set_toolkit_scroll_bar_thumb): Remove workaround
4957         for FreeBSD.
4958         (note_mode_line_highlight): New.
4959         (note_mouse_highlight): Call it.
4961 1998-10-31  Gerd Moellmann  <gerd@gnu.org>
4963         * s/freebsd.h (NARROWPROTO): New.
4965         * xdisp.c (display_string): New parameter face_string.
4966         (display_mode_element): When displaying a symbol with a string
4967         value, use text properties from the symbol's default value, maybe.
4969         * xrdb.c (x_load_resources): Add font defaults for menus and
4970         dialogs.
4972 1998-10-30  Gerd Moellmann  <gerd@gnu.org>
4974         * xfns.c (Fx_create_frame): Try 12pt Courier font first.
4976 1998-10-29  Gerd Moellmann  <gerd@gnu.org>
4978         * xterm.c (x_produce_glyphs): Fix bug causing glyphs to be
4979         produced for characters with codes < 32 under certain
4980         circumstances.
4982         * xdisp.c (redisplay_window): Handle values of PT in front
4983         of invisible, intangible text.
4984         (try_window_id): Set overlay_arrow_seen to zero before 
4985         displaying lines.
4986         (display_mode_element): Assign to glyphs written for a mode
4987         line spec `%x' as object the Lisp format string, as position
4988         the position of the `%' in that string.
4989         (display_string): If displaying a C string, optionally get
4990         the face to use from a Lisp string.
4992         * xterm.c (expose_window_tree): Include mode line height.
4994         * xfns.c (Fx_create_frame): Add toolbar height to frame height.
4996 1998-10-27  Gerd Moellmann  <gerd@gnu.org>
4998         * xterm.c (note_mouse_highlight): Change mouse pointer shape
4999         over mode line.
5001 1998-10-26  Gerd Moellmann  <gerd@gnu.org>
5003         * window.c (coordinates_in_window): Use CURRENT_MODE_LINE_HEIGHT.
5005         * xdisp.c (redisplay_window): If mode line height has changed,
5006          arrange for a thorough immediate redisplay using the correct mode
5007          line height.
5008          (window_box_height): Use CURRENT_MODE_LINE_HEIGHT.
5010         * dispextern.h (MATRIX_MODE_LINE_HEIGHT): New.
5011         (CURRENT_MODE_LINE_HEIGHT): New.
5012         (DESIRED_MODE_LINE_HEIGHT): New.
5014         * keyboard.c (make_lispy_event): Add string and string position
5015         info to mouse-click events.
5016         (read_key_sequence): Handle `local-map' property of mode line
5017         strings.
5019         * keyboard.h (POSN_STRING): New.
5021 1998-10-25  Gerd Moellmann  <gerd@gnu.org>
5023         * dispnew.c (mode_line_string): Mew.
5025         * xterm.c (xt_action_hook): New.
5026         (x_create_toolkit_scroll_bar): Add action hook.
5027         (xm_scroll_callback): Implement dragging.
5029         * keyboard.c (Qend_scroll): New.
5030         (scroll_bar_parts): Add it.
5032         * termhooks.h (scroll_bar_end_scroll): New.
5034         * xterm.c (XTread_socket): Bug fix.
5036 1998-10-24  Gerd Moellmann  <gerd@gnu.org>
5038         * xdisp.c (redisplay_window): Finish scroll bars after
5039         redisplaying toolbar.
5041         * keyboard.c (scroll_bar_parts): Add Qtop and Qbottom.
5042         (syms_of_keyboard): Add Qbottom.
5044         * termhooks.h (scroll_bar_to_top): New.
5045         (scroll_bar_to_bottom): New.
5047         * xdisp.c (redisplay_window): Always resize toolbar window if
5048         auto_resize_toolbar_p is non-zero.
5049         (auto_resize_toolbar_p): Renamed from auto_resize_toolbar.
5050         (window_box): New.
5051         (window_box_height): New.
5052         (window_box_width): New.
5053         (window_box_left): New.
5054         (window_box_right): New.
5055         (window_box_edges): New.
5057 1998-10-23  Gerd Moellmann  <gerd@gnu.org>
5059         * xterm.c (x_set_toolkit_scroll_bar_thumb): Kluge for call to
5060         XawScrollbarSetThumb in FreeBSD.
5061         (x_create_toolkit_scroll_bar): Set resource "beNiceToColormap"
5062         to true.
5064         * window.c (get_phys_cursor_glyph): Return null if cursor vpos
5065         is out of range.
5067         * xterm.c (x_create_toolkit_scroll_bar): Set scroll_bar_pixel.
5068         (x_term_init): Initialize it.
5070         * xterm.h (struct x_display_info): Add scroll_bar_pixel.
5072         * xterm.c (x_create_toolkit_scroll_bar): Set LessTif scroll bar's
5073         cursor.
5075 1998-10-22  Gerd Moellmann  <gerd@gnu.org>
5077         * keyboard.c (make_lispy_event): Handle scroll_bar_click
5078         differently when using toolkit scroll bars.
5080         * xterm.c (x_send_scroll_bar_event): New.
5081         (x_scroll_bar_to_input_event): New.
5082         (xaw3d_scroll_callback): New.
5083         (xaw3d_jump_callback): New.
5084         (xm_scroll_callback): New.
5085         (x_toolkit_scroll_p): New.
5086         (XTread_socket): Handle scroll bar client message.
5087         (x_term_init): Initialize Xatom_Scrollbar.
5088         (x_scroll_bar_create): Set cursor.
5089         (xm_scroll_callback):
5090         (x_create_toolkit_scroll_bar): New.
5091         (x_set_toolkit_scroll_bar_thumb): New.
5092         (x_scroll_bar_create): Call x_create_toolkit_scroll_bar.
5093         (XTset_vertical_scroll_bar): Call x_set_toolkit_scroll_bar_thumb.
5095         * xterm.h (struct x_display_info): Add Xatom_Scrollbar.
5097 1998-10-21  Gerd Moellmann  <gerd@gnu.org>
5099         * xterm.c (x_scroll_bar_remove): Handle toolkit scroll bars.
5100         (XTread_socket): Don't handle mouse button events for scroll bars
5101         if using toolkit scroll bars.
5102         (XTset_vertical_scroll_bar): Set thumb size and position for
5103         Athena scroll bar.
5105         * xterm.h (scroll_bar): Add x_widget_low and x_widget_high.
5107         * xterm.c (XTread_socket): Dispatch expose event to widget
5108         if using toolkit scroll bars.
5109         (x_scroll_bar_expose): Make no-op for toolkit scroll bars.
5110         (x_scroll_bar_create): Create and show a scroll bar widget 
5111         if using toolkit scroll bars.
5112         (x_scroll_bar_move): Handle tookit scroll bars.
5114         * Makefile.in (LIBW): Use Xaw3d if present.
5116         * configure.in (USE_TOOLKIT_SCROLL_BARS): New.
5117         (HAVE_XAW3D): New.
5118         
5119         * config.in (USE_TOOLKIT_SCROLL_BARS): New.
5120         (HAVE_XAW3D): New.
5122         * xterm.c (XTset_vertical_scroll_bar): Correct position of 
5123         right vertical scroll bar.
5125 1998-10-20  Gerd Moellmann  <gerd@gnu.org>
5127         * xfns.c (xpm_load): Support reading XPM images from string
5128         buffers containing data in the same format as an XPM file.
5129         Support `:color-symbols'.
5130         (xpm_format): Add `:data'.
5131         (xpm_keyword_index): Add XPM_DATA.
5132         (syms_of_xfns): Add `:color-symbols'.
5133         (xpm_keyword_index): Add XPM_COLOR_SYMBOLS.
5134         (xpm_valid_color_symbols_p): New.
5135         (xpm_image_p): Call it.
5137         * xdisp.c (build_desired_toolbar_string): Add `:algorithm'
5138         attribute to the image if item is not enabled.
5140         * xfns.c (x_laplace): New.
5141         (x_laplace_read_row): New.
5142         (x_laplace_write_row): New.
5143         (lookup_image): Handle common image attributes here.  New
5144         attribute `:algorithm'.
5146         * xfaces.c (clear_face_cache): Call clear_image_cache.
5148         * xterm.c (x_inverted_image_mask): Removed.
5149         (x_draw_image_foreground_1): New.
5150         (x_draw_image_glyph_string): Draw images with mask to a temporary
5151         pixmap to reduce flickering.
5153         * xdisp.c (redisplay_toolbar): Handle auto-resize-toolbars.
5154         (display_toolbar_line): Remove parameter `margin'.
5156 1998-10-19  Gerd Moellmann  <gerd@gnu.org>
5158         * xdisp.c (toolbar_lines_needed): New.
5159         (auto-resize-toolbars): New.
5161         * xfns.c (cache_image): Correct call to xrealloc.
5163         * dispnew.c (Fset_toolbar_height): Removed.
5165         * xdisp.c (init_xdisp): Use FRAME_TOP_MARGIN instead of
5166         FRAME_MENU_BAR_LINES.
5168         * window.c (Fdelete_other_windows): Use FRAME_TOP_MARGIN
5169         instead of FRAME_MENU_BAR_LINES.
5170         (check_frame_size): Ditto.
5172         * dispnew.c (adjust_frame_glyphs_initially): Use FRAME_TOP_MARGIN
5173         instead of FRAME_MENU_BAR_LINES.
5174         (adjust_frame_glyphs_for_frame_redisplay): Ditto.
5175         (build_frame_matrix): Ditto.
5176         (change_frame_size_1): Ditto.
5178         * frame.h (FRAME_TOOLBAR_LINES): New.
5179         (FRAME_TOP_MARGIN): New.
5181         * window.c (struct save_window_data): Add frame_toolbar_lines.
5182         (Fset_window_configuration): Handle toolbar lines.
5183         (Fcurrent_window_configuration): Save toolbar lines.
5185         * frame.c (syms_of_frame_1): Add Qtoolbar_lines.
5187         * xfns.c (Fx_create_frame): Add default parameter for toolbar.
5189         * frame.h (struct frame): Rename top_margin to toolbar_lines.
5191         * xfns.c (x_frame_parms): Add `toolbar-lines'.
5192         (x_set_toolbar_lines): New.
5194         * keyboard.c (cmd_error_internal): Bug fix.
5196         * xterm.c: Remove double include of syssignal.h.
5198 1998-10-18  Gerd Moellmann  <gerd@gnu.org>
5200         * xterm.c (x_toolbar_item): New.
5201         (x_handle_toolbar_click): Use it.
5202         (note_toolbar_highlight): Use it.
5204         * keyboard.c (syms_of_keyboard): Staticpro toolbar_item_properties
5205         and toolbar_items_vectors.
5207         * xterm.c (help_echo): New.
5208         (draw_glyphs_face): Add DRAW_IMAGE_RAISED and DRAW_IMAGE_SUNKEN.
5209         (x_set_glyph_string_gc): Handle them.
5210         (x_after_update_window_line): Don't do anything in pseudo-windows.
5211         (x_produce_image_glyph): Take image margin and face relief into
5212         account.
5213         (x_get_glyph_string_clip_rect): Handle pseudo-windows.
5214         (x_draw_glyph_string_background): Optimize case when face has
5215         relief.
5216         (x_setup_relief_color): Take frame instead of glyph string
5217         parameter.
5218         (x_draw_relief_rect): New.
5219         (x_draw_glyph_string_relief): Call it.
5220         (x_draw_image_glyph_string_foreground): Handle margin and image
5221         relief.
5222         (x_draw_image_glyph_string_background): Ditto.
5223         (expose_frame): Redraw toolbar window.
5224         (expose_window): Don't draw cursor for pseudo-windows.
5225         (x_y_to_hpos_vpos): Handle pseudo-windows.
5226         (frame_to_window_pixel_xy): New.
5227         (note_mouse_highlight): Call note_toolbar_highlight.
5228         (x_handle_toolbar_click): New.
5229         (note_toolbar_highlight): New.
5230         (show_mouse_face): Change int parameter `hl' to parameter of
5231         type enum draw_glyphs_face.  Handle image highlighting.
5232         (XTread_socket): Return a HELP_EVENT input event if help_echo is
5233         non-nil.  Use x_handle_toolbar_click.
5235         * termhooks.h (event_kind): Add HELP_EVENT, TOOLBAR_EVENT.
5237         * xfns.c (image_value_type): Add IMAGE_INTEGER_VALUE,
5238         IMAGE_BOOL_VALUE.
5239         (parse_image_spec): Handle them.
5240         (image_spec_value): Additional parameter found.
5241         (free_image): Remove image from the vector `images' of the 
5242         image cache.
5243         (clear_image_cache): Additional parameter force_p.
5244         (Fclear_image_cache): New.
5245         (x_find_image_file): New.
5246         (xbm_load): Handle `:margin' and `:relief'.  Use
5247         x_find_image_file.
5248         (xpm_load): Likewise.
5249         (pbm_load): Likewise.
5250         (jpeg_load): Likewise.
5251         (tiff_load): Likewise.
5252         (gif_load): Likewise.
5254         * keyboard.c (Qhelp_echo): New symbol.
5255         (read_char): Handle `toolbar' and `help_echo' events.
5256         (kbd_buffer_get_event): Handle HELP_ECHO input event.
5257         (make_lispy_event): Handle TOOLBAR_EVENT.
5258         (toolbar_items): New.
5259         (process_toolbar_item): New.
5260         (PROP): New.
5261         (init_toolbar_items): New.
5262         (append_toolbar_item): New.
5263         (read_char_x_menu_prompt): Handle `toolbar' event.
5264         (read_key_sequence): Ditto.
5266         * xfaces.c (Qtoolbar): New.
5267         (realize_basic_faces): Realize `toolbar' face.
5268         (face_at_string_position): Remove parameter modeline_p, add
5269         base_face_id.
5271         * xfns.c (xbm_load_image_from_file): Don't use Xmu function
5272         to read data.
5274 1998-10-17  Gerd Moellmann  <gerd@gnu.org>
5276         * xdisp.c (init_iterator): Replace parameter modeline_p with
5277         base_face_id.
5278         (next_element_from_string): Call get_next_display_element
5279         recursively after handling text properties.
5280         (prepare_menu_bars): Call update_toolbar.
5281         (update_toolbar): New.
5282         (build_desired_toolbar_string): New.
5283         (display_toolbar_line): New.
5284         (redisplay_toolbar): New.
5285         (toolbar_item_info): New.
5286         (redisplay_window): Call redisplay_toolbar.
5287         (Fdump_toolbar_row): New.  Defined if compiled with GLYPH_DEBUG.
5289         * dispnew.c (clear_current_matrices): Clear matrices of toolbar
5290         window.
5291         (clear_desired_matrices): Ditto.
5292         (adjust_frame_glyphs_for_window_redisplay): Make toolbar window.
5293         (free_glyphs): Free matrices of toolbar window.
5294         (update_frame): Update toolbar window.
5295         (change_frame_size_1): Take toolbar into account.
5296         (Fset_toolbar_height): New.
5298         * dispextern.h (struct it): Remove member modeline_p, add
5299         base_face_id.
5300         (struct image): Add members relief and margin.
5301         (IMAGE_ASCENT): Include margin in height.
5303 1998-10-14  Gerd Moellmann  <gerd@gnu.org>
5305         * xfns.c (Fclear_image_cache): New.
5307         * xfaces.c (realize_basic_faces): Realize toolbar face.
5308         (face_at_string_position): Remove parameter modeline_p, add
5309         base_face_id.
5311         * dispextern.h (enum face_id): Add TOOLBAR_FACE_ID.
5313 1998-10-13  Gerd Moellmann  <gerd@gnu.org>
5315         * keyboard.c (syms_of_keyboard): Intern `:help'.
5317 1998-10-12  Gerd Moellmann  <gerd@gnu.org>
5319         * xterm.c (note_toolbar_highlight): New.
5320         (note_mouse_highlight): Call it.
5322         * window.c (window_from_coordinates): Additional parameter toolbar_p.
5323         (coordinates_in_window): Handle toolbar window.
5325         * keyboard.c (toolbar_items): New.
5326         (process_toolbar_item): New.
5327         (parse_toolbar_item): New.
5328         (init_toolbar_items): New.
5329         (append_toolbar_item): New.
5331         * dispextern.h (enum toolbar_item_idx): New.
5332         (enum toolbar_item_image): New.
5334         * frame.h (struct frame): Add toolbar-related members.
5336         * xfaces.c (face_at_string_position): Remove assertion that
5337         current_buffer == window's buffer.  This is not the case when
5338         called for the toolbar window.
5340         * frame.c (make_frame): Initialize toolbar members.
5342         * alloc.c (mark_object): Mark toolbar data of frames.
5344         * frame.h (struct frame): Add toolbar-related members
5345         toolbar_window, desired_toolbar_items, current_toolbar_items,
5346         desired_toolbar_string, current_toolbar_string,
5347         n_desired_toolbar_items, n_current_toolbar_items.  Add
5348         window_height.
5350         * xterm.c (x_after_update_window_line): Don't draw bitmap
5351         areas for pseudo-windows.
5352         (expose_frame): Handle toolbar window.
5353         (expose_window): Don't do cursor stuff for pseudo-windows.
5355         * xdisp.c (display_menu_bar): Correct calls to init_iterator.
5357 1998-10-11  Gerd Moellmann  <gerd@gnu.org>
5359         * frame.c (make_frame): Initialize toolbar_window.
5361         * alloc.c (mark_object): Make the toolbar window.
5363         * dispnew.c (update_frame): Update frame's toolbar_window.
5364         (clear_current_matrices): Likewise.
5365         (clear_desired_matrices): Likewise.
5366         (adjust_frame_glyphs_for_window_redisplay): Make toolbar_window.
5367         (free_glyphs): Free the toolbar window and its matrices.
5369         * frame.h (struct frame): Add toolbar_window.
5371         * xterm.c (x_draw_glyph_string_relief): Handle mouse-face
5372         with relief.
5374 1998-10-10  Gerd Moellmann  <gerd@gnu.org>
5376         * dispnew.c (buffer_posn_from_coords): Don't screw up if 
5377         window start is not in the range BEGV..ZV.
5379 1998-10-09  Gerd Moellmann  <gerd@gnu.org>
5381         * xdisp.c (try_scrolling): Experimentally handle the case
5382         that scroll-preserve-screen-position is set to `always'.
5384         * window.c (Vscroll_preserve_screen_position): Replacement for
5385         scroll_preserve_screen_position.
5387 1998-10-08  Gerd Moellmann  <gerd@gnu.org>
5389         * dispnew.c: Don't initialize auto structs; the HP/UX compiler
5390         doesn't like it.
5391         * xdisp.c: Ditto.
5393         * xdisp.c (make_cursor_line_fully_visible): Adjust this_line_y.
5395 1998-10-06  Gerd Moellmann  <gerd@gnu.org>
5397         * minibuf.c (Fminibuffer_complete_word): Fix computation of 
5398         i_byte when prompts are inserted into minibuffers.
5400         * dispextern.h (FRAME_INTERNAL_BORDER_WIDTH_SAFE): New.
5401         (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X): Use it.
5402         (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y): Ditto.
5404 1998-10-04  Gerd Moellmann  <gerd@gnu.org>
5406         * xdisp.c (make_cursor_line_fully_visible): New.
5407         (try_scrolling): New.
5408         (redisplay_window): Move scrolling code to try_scrolling.
5409         (make_cursor_line_fully_visible): Handle case of window too small
5410         to show a single line.
5411         (redisplay_window): Case forced window start---use
5412         make_cursor_line_fully_visible.
5413         (redisplay_window): Case cursor movement via current matrix.
5414         If ending up on a partially visible line, make it fully visible
5415         instead of recentering.
5416         (try_scrolling): Additional parameter scroll_smoothly.
5418         * xterm.c (x_draw_bitmap): Don't XClearArea under the pixmap.
5420 1998-09-28  Gerd Moellmann  <gerd@gnu.org>
5422         * window.c (window_scroll_pixel_based): Bug fix: vpos used
5423         instead of y-position for scroll-preserved-screen-position.
5425 1998-09-07  Gerd Moellmann  <gerd@gnu.org>
5427         * dispnew.c (update_frame_line): If current row is not enabled,
5428         write the whole line.
5430 1998-09-06  Gerd Moellmann  <gerd@gnu.org>
5432         * lisp.h (HAVE_FACES): Removed.
5434         * dispextern.h (HAVE_FACES): Removed.
5436         * config.in (HAVE_FACES): Removed.
5438         * dispnew.c (HAVE_FACES): Removed.
5440         * xdisp.c (HAVE_FACES): Removed.
5442         * xfaces.c (HAVE_FACES): Removed.
5444 1998-09-05  Gerd Moellmann  <gerd@gnu.org>
5446         * xdisp.c (init_iterator): If face_change_count is non-zero,
5447         free realized faces.
5449         * xfaces.c (free_all_realized_faces): Make it externally visible.
5450         (Finternal_set_lisp_face_attribute): Increment
5451         windows_or_buffers_changed.
5453         * dispnew.c (direct_output_for_insert): Give up if
5454         face_change_count is non-zero.
5455         (direct_output_forward_char): Ditto.
5457         * xfaces.c (face_change_count): New.
5459 1998-09-04  Gerd Moellmann  <gerd@gnu.org>
5461         * xterm.c (x_draw_bar_cursor): Don't draw if cursor hpos is out
5462         of range.
5464 1998-09-03  Gerd Moellmann  <gerd@gnu.org>
5466         * term.c (Ftty_display_color_p): New.
5468 1998-09-02  Gerd Moellmann  <gerd@gnu.org>
5470         * xfaces.c (Ftty_defined_colors): New.
5472         * xterm.c (x_produce_glyphs): Fix computation of
5473         contains_overlapping_glyphs_p for ASCII.
5475         * dispnew.c (Fshow_cursor): Don't change cursor state while
5476         redisplaying.
5477         (direct_output_for_insert): If a glyph with lbearing or rbearing
5478         is among the new glyphs, set row flag contains_overlapping_glyph_p.
5480 1998-09-01  Gerd Moellmann  <gerd@gnu.org>
5482         * term.c (OUTPUT_IF): Make replacement text have statement form.
5483         (OUTPUT1_IF): Ditto.
5484         (TS_italic_mode, TS_end_italic_mode): Removed.
5485         (TS_bold_mode): Removed.
5486         (TS_underscore_mode, TS_end_underscore_mode): Removed.
5487         (TS_enter_bold_mode, TS_enter_dim_mode, TS_enter_blink_mode): New.
5488         (TS_enter_reverse_mode): New.
5489         (TS_enter_underline_mode, TS_exit_underline_mode): New.
5490         (TN_magic_cookie_glitch_ul): New.
5491         (TS_enter_alt_charset_mode, TS_exit_alt_charset_mode): New.
5492         (TS_exit_attribute_mode): New.
5493         (TN_max_colors, TN_max_pairs, TS_orig_pairs): New.
5494         (TS_set_foreground, TS_set_background): New.
5495         (reset_terminal_modes): Switch colors back to default.
5496         (write_glyphs): Turn face on before writing text, turn it off
5497         afterwards.
5498         (insert_glyphs): Ditto.
5499         (term_init): Initialize new terminal capability variables.
5500         (turn_on_face): Turn a face on.
5501         (turn_off_face): Turn a face off.
5503         * lisp.h (MAKE_GLYPH): Remove test for frame type.
5504         (GLYPH_CHAR): Ditto.
5505         (GLYPH_FACE): Ditto.
5507         * xfaces.c (Vface_tty_color_alist): New.
5508         (face-register-tty-color): New.
5509         (face-clear-tty-colors): New.
5511         * dispextern.h (FACE_TTY_DEFAULT_COLOR): New.
5512         (struct it): Remove member faces_p since we now always have faces.
5514 1998-08-31  Gerd Moellmann  <gerd@gnu.org>
5516         * dispextern.h (struct face): Add tty appearance flags.
5518         * xdisp.c (init_iterator): Always handle faces.
5519         (extend_face_to_end_of_line): Handle tty frames.
5521         * dispnew.c (clear_glyph_matrix): Allow a null matrix to be
5522         passed in.
5524 1998-08-30  Gerd Moellmann  <gerd@gnu.org>
5526         * xfaces.c (realize_default_face): Use empty strings to indicate
5527         that the face should use the default foreground/background
5528         color of the terminal.  Fill font-related attributes with 
5529         appropriate values for tty frames.
5531         * emacs.c (main): Call syms_of_xfaces before init_window_once.
5533         * xfaces.c (realize_default_face): If face `default' is not
5534         yet known, create it.
5536         * frame.c (make_terminal_frame): Call init_frame_faces
5537         unconditionally.
5539         * xfaces.c (init_frame_faces): Make it work for tty frames.
5540         (free_frame_faces): Ditto.
5541         (clear_face_cache): Ditto.
5542         (recompute_basic_faces): Ditto.
5543         (Fframe_face_alist): Ditto.
5544         (free_realized_face): Ditto.
5545         (prepare_face_for_display): Ditto.
5546         (clear_face_gcs): Ditto.
5547         (lookup_face): Ditto.
5548         (smaller_face): Ditto.
5549         (realize_default_face): Ditto.
5550         (realize_face): Ditto.
5551         (realize_face): Dispatch to functions depending on the frame type.
5552         (realize_x_face): X way of realizing faces.
5553         (realize_tty_face): TTY way of realizing faces.
5555 1998-08-29  Gerd Moellmann  <gerd@gnu.org>
5557         * xfaces.c (realize_face): Remove parameter unibyte_registry,
5558         compute it instead.
5559         (lookup_face): Remove local variable unibyte_registry.
5561 1998-08-22  Gerd Moellmann  <gerd@gnu.org>
5563         * xterm.c (x_draw_glyph_string_relief): Draw top and bottom lines
5564         1 pixel longer.
5566         * xdisp.c (face_before_or_after_it_pos): Fix computation 
5567         of face in buffer.
5569         * editfns.c (make_buffer_string_both): If prompt in buffer,
5570         prevent start > end.
5572         * indent.c (Fvertical_motion): Set current_buffer to window's
5573         buffer if it isn't already.
5575 1998-08-21  Gerd Moellmann  <gerd@gnu.org>
5577         * dispextern.h (GLYPH_DEBUG): Use default 0.
5579         * xdisp.c (it_props): New member `smaller'.
5580         (init_iterator): Initialize it.
5581         (Qsmaller): New.
5582         (push_it): Save value of `smaller' value on the stack.
5583         (pop_it): Restore `smaller' from the stack.
5584         (handle_smaller_prop): New.
5585         (handle_face_prop): Use `smaller' text property to select a
5586         suitable face.
5588         * dispextern.h (SMALLER_PROP_IDX): New.
5589         (struct it): Add member `smaller'.
5591         * xfaces.c (smaller_face): New.
5593         * frame.h (FRAME_WINDOW_WIDTH_ARG): Add bitmap area widths.
5595         * dispnew.c (allocate_matrices_for_window_redisplay): Compute
5596         total pixel width of window differently.
5598         * xdisp.c (init_iterator): Compute width of mode line differently.
5600         * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH): Subtract width
5601         of bitmap areas.
5603         * window.c (Fsplit_window): Include width of bitmap areas in
5604         window width.
5605         (window_internal_width): Subtract width of bitmap areas from
5606         total width.
5608 1998-08-18  Gerd Moellmann  <gerd@gnu.org>
5610         * xdisp.c: Functions reordered for better readability.
5612         * dispnew.c (update_text_area): Handle glyphs with arbitrary
5613         lbearing.
5614         (update_window_tree): Parameter no_scrolling_p removed.
5615         (update_single_window): Ditto.
5617         * xterm.c (x_get_char_font_and_encoding): Renamed to
5618         x_get_char_face_and_encoding.
5620         * dispnew.c (update_text_area): Don't call get_glyph_overhangs
5621         if end of current row reached.
5623         * xterm.c (x_get_glyph_face_and_encoding): New.
5624         (x_get_glyph_overhangs): Call it.
5626         * xdisp.c (Qshow_trailing_whitespace): New.
5627         (Qtrailing_whitespace): New.
5628         (enum prop_handled): New.
5629         (struct props, it_props): New.
5630         (next_overlay_change): New.  Works like Fnext_overlay_change
5631         but doesn't use xmalloc.
5632         (handle_stop): Restructured.
5633         (face_before_or_after_it_pos): Case iteration over a string: fix
5634         handling of face before current position.
5636 1998-08-16  Gerd Moellmann  <gerd@gnu.org>
5638         * dispnew.c (adjust_glyph_matrix): Don't optimize matrix
5639         reallocation matrix if fonts_changed_p.
5640         (update_text_area): Handle glyphs with lbearing.
5642 1998-08-14  Gerd Moellmann  <gerd@gnu.org>
5644         * xdisp.c (struct props): New.
5645         (it_props): New.
5646         (compute_prop_info): New.
5647         (handle_stop): New.
5649         * textprop.c (validate_interval_range): Make it externally
5650         visible.
5652         * dispnew.c (direct_output_for_insert): Remove calls
5653         to compute_stop_pos.
5655         * dispextern.h (struct it): Remove check_charpos,
5656         next_overlay_pos.  Add what_changes.
5658 1998-08-10  Gerd Moellmann  <gerd@gnu.org>
5660         * xterm.c (note_mouse_highlight): Set BEGV_BYTE, ZV_BYTE.
5662         * xfaces.c (Vx_unibyte_registry_and_encoding): Removed.  Use
5663         face_default_registry instead.
5665         * syntax.c (scan_sexps_forward): Set up syntax table before
5666         jumping to initial state label.
5668 1998-08-09  Gerd Moellmann  <gerd@gnu.org>
5670         * dispnew.c (check_matrix_invariants): Handle case of row end pos
5671         >= ZV specially.
5673 1998-08-08  Gerd Moellmann  <gerd@gnu.org>
5675         * xdisp.c (redisplay_window): Case cursor movement---if cursor
5676         ends up in partially visible row, try to scroll.  Case forced
5677         window start---handle windows not tall enough to show a single
5678         line.
5680         * window.h (struct window): Member dy renamed vscroll.
5682         * xterm.c (x_list_fonts): Re-activate suppression of scalable
5683         fonts.
5684         (x_draw_stretch_glyph_string): Set clipping if using GC that
5685         hasn't set it yet.
5687         * xdisp.c (redisplay_window): Case forced window start -
5688         don't let cursor end on partially visible row.  Use desired
5689         matrix to find a suitable PT if it doesn't appear.
5690         (decode_mode_spec): Merged with 20.2.97.
5691         (try_window_reusing_current_matrix): Give up if old or
5692         new display is vscrolled.
5693         (redisplay_window): Reset vscrolling if forced window start,
5694         or if recentering.
5696 1998-08-06  Gerd Moellmann  <gerd@gnu.org>
5698         * xfaces.c (realize_default_face): Use the fontset name instead of
5699         the alias for the family attribute of the default face because we
5700         can't easily determine a good alias from fontset-alias-alist.
5701         (face_fontset): Use Fquery_fontset to find the fontset.
5702         (font_list): Additional pattern parameter.
5703         (try_font_list): Ditto.
5704         (set_lface_from_font_name): Set face family from font foundry
5705         and family.
5706         (font_list): If family contains a hyphen, build pattern differently.
5708 1998-08-05  Gerd Moellmann  <gerd@gnu.org>
5710         * xfaces.c (free_realized_faces): Increment windows_or_buffers_-
5711         changed instead of setting the frame garbaged.
5713         * xfaces.c (lface_equal_p): Don't assume equal Lisp types for
5714         all attribute values.  This is wrong if values are unspecified,
5715         i.e. nil.
5717         * xdisp.c (try_window_id): Give up if window start changed.
5719         * xfaces.c (make_realized_face): Store registry as Lisp object.
5720         (load_face_font_or_fontset): Compute registry of a face
5721         differently.  Make it `eq' to Vx_unibyte_registry_and_encoding if
5722         possible.
5724         * dispextern.h (FACE_SUITABLE_FOR_CHARSET_P): Compare registries
5725         differently.
5727         * alloc.c (mark_face_cache): Mark the registry member of faces.
5729         * dispextern.h (struct face): Make registry a Lisp string.
5731 1998-08-04  Gerd Moellmann  <gerd@gnu.org>
5733         * xterm.c (x_get_char_font_and_encoding): Additional parameter
5734         multibyte_p.  Handle unibyte text.
5735         (x_append_glyph): Set the multibyte_p flag of glyphs.
5736         (x_produce_image_glyph): Ditto.
5737         (x_append_stretch_glyph): Ditto.
5738         (x_produce_glyphs): Handle unibyte text like ASCII.
5740         * xdisp.c (push_it): Save the multibyte flag of an iterator on the
5741         stack.
5742         (pop_it): Restore it.
5743         (face_before_or_after_it_pos): Handle the case that the string or
5744         buffer is unibyte.
5745         (get_overlay_strings): Set the multibyte flag of the iterator if
5746         the new overlay string is multibyte.
5747         (get_glyph_property): Likewise.
5748         (get_next_display_element): Don't check for charset changes in
5749         unibyte text.
5750         (append_space): Compute face differently for unibyte text.
5751         (extend_face_to_end_of_line): Don't return quickly if face has
5752         stipple.
5754         * xfaces.c (load_face_font_or_fontset): Store registry and
5755         encoding of the font in the registry member of the face.
5756         (make_realized_face): Additional parameter `registry'.
5757         (free_realized_face): Free the registry of a realized face.
5758         (face_suitable_for_charset_p): Function form of the macro
5759         with the same name in uppercase.
5760         (lookup_face): Use Vx_unibyte_registry_and_encoding if charset < 0.
5761         (choose_face_font): New parameter unibyte_registry.
5762         (choose_face_fontset_font): Ditto.
5763         (realize_default_face): Remember the registry and encoding of
5764         the specified frame font in Vx_unibyte_registry_and_encoding.
5765         (face_at_buffer_position): Handle unibyte.
5766         (face_at_string_position): Likewise.
5767         (realize_face): New parameter unibyte_registry.  
5768         (compute_char_face): Handle the unibyte case.
5770         * dispextern.h (struct glyph): Add bit multibyte_p.
5771         (struct face): New member registry holding the registry and
5772         encoding of the X font of the face.
5773         (FACE_UNIBYTE_P): Value is non-zero if face is for unibye text.
5774         (enum face_id): Add BASIC_FACE_ID_SENTINEL.
5775         (FACE_SUITABLE_FOR_CHARSET_P): Handle charset < 0 meansing unibyte
5776         text.
5777         (struct iterator_stack_entry): Add multibyte_p.
5779         * xdisp.c (string_pos): Use string_char_to_byte.
5780         (char_charset): Removed.
5782 1998-08-03  Gerd Moellmann  <gerd@gnu.org>
5784         * xterm.c (x_draw_image_glyph_string_foreground): Draw a
5785         rectangle for a block cursor over an image without a mask.
5786         (x_stretch_block_cursor): Added.  Non-zero means don't draw
5787         a block cursor over a stretch as wide as that stretch.
5788         (x_draw_stretch_glyph_string): Use it.
5789         (x_draw_hollow_cursor): Ditto.
5791         * minibuf.c (read_minibuf): Use minibuf_prompt instead of prompt.
5792         (read_minibuf): Add front-sticky text property for prompt.
5794         * xdisp.c (char_charset): Return charset of a character,
5795         depending on whether or not multi-byte characters are enabled.
5797         * xfaces.c (Fset_face_charset_registry): Removed.
5798         (x_charset_registry): Determine registry from charset plist.
5800 1998-08-02  Gerd Moellmann  <gerd@gnu.org>
5802         * xdisp.c (get_next_display_element): Don't check for charset
5803         changes if multi-byte characters are not enabled.
5804         
5805         * xdisp.c (echo_area_display): Use the flush function from the
5806         redisplay interface.  
5807         * keyboard.c (detect_input_pending_run_timers): Likewise.
5809         * dispextern.h (produce_*glyphs_hook): Removed.
5810         * term.c (produce_*glyphs): Ditto.
5811         (cursor_to): Remove pixel position parameters.
5813         * dispnew.c: Remove hooks for window-based redisplay, introduce
5814         a redisplay interface structure.
5816         * xterm.c (x_per_char_metric): Return default char metrics if per
5817         char metric exists but contains a zero width.  Adobe Courier seems
5818         to contain such characters.
5820         * xdisp.c (compute_line_metrics): Compute the width of rows
5821         without stopping at glyphs with zero width.
5823 1998-08-01  Gerd Moellmann  <gerd@gnu.org>
5825         * xdisp.c (display_mode_line): If nothing was displayed at all,
5826         display a space.
5827         (hscroll_window_tree): Don't subtract 1 from target point if equal
5828         to ZV and window is not the selected window.
5830         * dispnew.c (check_matrix_invariants): Remove check for window
5831         start at BEGV or after newline.  This happens in rare cases
5832         intentionally.
5834 1998-07-31  Gerd Moellmann  <gerd@gnu.org>
5836         * xfaces.c (x_charset_registry): Use STRING_BYTES.
5837         (syms_of_xfaces): Add Vface_default_registry.
5838         (x_charset_registry): Use it.
5840         * xdisp.c (run_window_scroll_functions): Run window scroll functions.
5841         (redisplay_window): Use it.
5843         * dispnew.c (update_text_area): Handle lbearing of deleted text
5844         by backing up one character.
5846 1998-07-30  Gerd Moellmann  <gerd@gnu.org>
5848         * dispnew.c (adjust_glyph_matrix): Use a different check to 
5849         decide to do nothing.
5851         * xfaces.c (face_at_string_position): Additional parameter
5852         mode_line_p.  If non-zero, merge with the mode line face
5853         instead of the default face.
5854         * dispextern.h (struct it): Add mode_line_p.
5855         * xdisp.c (init_iterator): Set it.
5856         (compute_face_in_string): Use it.
5857         (face_before_or_after_it_pos): Handle strings.
5858         (get_next_display_element): Don't look for relief end in C strings.
5859         (next_element_from_string): Deliver string position instead of
5860         buffer position.
5862         * xterm.c (x_flush): Flush X output buffer.
5863         (XTflash): Use it.
5865         * xfaces.c (lface_from_face_name): Renamed from lface_from_symbol.
5866         Allow strings as face names.
5868         * xfns.c (forall_images_in_image_cache): Check that frame is
5869         alive.
5871         * widget.c (EmacsFrameDestroy): Remove call to free_frame_faces;
5872         it's also called from x_destroy_window.  Since this function is
5873         called from X, freeing stuff allocated with xmalloc is dangerous
5874         here, anyway.
5876         * xfaces.c (free_realized_faces): Don't clear current matrices
5877         of a frame being destroyed.
5879         * frame.c (make_frame): Call set_window_buffer instead of 
5880         Fset_window_buffer.
5882         * window.c (set_window_buffer): Extracted from Fset_window_buffer,
5883         with an additional argument specifying whether or not hooks may
5884         be called.
5885         (Fset_window_buffer): Call it.
5887         * dispnew.c (clear_desired_matrices): Check that frame has
5888         a valid root window before clearing matrices in the window tree.
5889         (clear_current_matrices): Ditto.
5890         (clear_window_matrices): If GLYPH_DEBUG, check that hchild and
5891         vchild are valid windows if not nil.
5893         * xfaces.c (merge_face_vector_with_property): Allow :reverse-video
5894         for :inverse-video.
5895         (Finternal_set_lisp_face_attribute): Ditto.
5896         (Finternal_set_lisp_face_attribute_from_resource): Ditto.
5897         (Finternal_get_lisp_face_attribute): Ditto.
5898         (Finternal_lisp_face_attribute_values): Ditto.
5899         (syms_of_xfaces): Define the symbol `:reverse-video'.
5901         * xdisp.c (get_glyph_property): Renamed from
5902         fill_iterator_from_glyph_property.
5903         (next_element_from_buffer): Handle case that no `glyph' property
5904         was found correctly.
5905         (display_line): Extend face to end of line only if we have faces.
5907 1998-07-29  Gerd Moellmann  <gerd@gnu.org>
5909         * dispnew.c (Fshow_cursor): Renamed from blink_cursor.  Take
5910         additional window argument.
5912         * xdisp.c (reseat_at_previous_visible_line_start): Renamed from
5913         set_iterator_to_previous_visible_line_start.
5914         (reseat_at_next_visible_line_start): Likewise.
5915         (compute_stop_pos): Renamed from set_iterator_stop_pos.
5916         (face_before_or_after_it_pos): Renamed from get_face_at_it_pos.
5917         (compute_face_in_buffer): Renamed from
5918         compute_face_at_iterator_position.
5919         (compute_face_in_string): Renamed from
5920         compute_face_at_iterator_string_position.
5921         (get_space_width): Renamed from get_iterator_space_width.
5922         (next_overlay_string): Renamed from
5923         set_iterator_to_next_overlay_string.
5924         (get_overlay_strings): Renamed from
5925         get_overlay_strings_at_iterator_position.
5926         (restore_overlay_strings): Renamed from
5927         setup_overlay_strings_from_glyph_pos.
5928         (restore_dpvec): Renamed from setup_iterator_dpvec_from_glyph_pos.
5929         (init_from_display_pos): Renamed from init_iterator_from_glyph_pos.
5930         (init_to_row_start): Renamed from init_iterator_to_row_start.
5931         (init_to_row_end): Formerly init_iterator_to_next_row_start.
5933         * xterm.c: Merge with 20.2.97.
5934         (x_produce_glyphs): Use x_append_stretch_glyph for tabs.
5936         * dispextern.h (struct glyph): Replace text_pos position with
5937         simple charpos.
5939         * xdisp.c (this_line_start_pos): Use struct text_pos.
5940         (this_line_end_pos): Renamed from .*endpos; use struct text_pos.
5941         (enum move_it_result): Renamed from move_iterator_result.
5942         (string_pos_nchars_ahead): Compute text_pos in a string from a
5943         known text_pos plus a character delta.
5944         (string_pos): Compute text_pos in string from charpos.
5945         (c_string_pos): Likewise for a C string.
5946         (number_of_chars): Return number of characters in a possibly
5947         multi-byte C string.
5948         (check_it): Renamed from check_iterator.  Check that charpos and
5949         bytepos are in sync.
5950         (push_it): Renamed from save_iterator_settings.
5951         (pop_it): Renamed from restore_iterator_settings.
5952         (move_it_.*): Renamed from move_iterator_.*.
5953         (charset_at_position): Take charpos/bytepos into account.
5954         (back_to_previous_line_start): Set iterator to previous line start.
5955         (forward_to_next_line_start): Set iterator to next line start.
5956         (back_to_previous_visible_line_start): Renamed from 
5957         move_iterator_previous_visible_line_start.
5958         (set_iterator_to_next_visible_line_start): Handle charpos/bytepos.
5959         (get_face_at_it_pos): Renamed from get_face_from_cursor_pos.
5960         Handle charpos/bytepos.
5961         (compute_face_at_iterator_position): Handle charpos/bytepos.
5962         (compute_face_at_iterator_string_position): Likewise.
5963         (get_iterator_space_width): Likewise.
5964         (load_overlay_strings): Likewise.
5965         (get_overlay_strings_at_iterator_position): Likewise.
5966         (reseat_iterator): Take a text_pos position argument.
5967         (setup_iterator_overlay_strings_from_glyph_pos): Handle charpos/
5968         bytepos.
5969         (init_iterator): Take additional bytepos parameter.
5970         (reseat_iterator_to_string): Handle charpos/bytepos.
5971         (start_display): Take a text_pos parameter.  Handle charpos/bytepos.
5972         (next_element_from_string): Handle charpos/bytepos.
5973         (next_element_from_c_string): Likewise.
5974         (fill_iterator_from_glyph_property): Likewise.
5975         (next_element_from_buffer): Likewise.
5976         (set_iterator_to_next): Increment charpos and bytepos of an iterator.
5977         (move_iterator_in_display_line_to): Handle charpos/bytepos.
5978         (move_it_to): Likewise.
5979         (move_it_vertically_backward): Likewise.
5980         (move_it_vertically): Likewise.
5981         (move_it_by_lines): Likewise.
5982         (hscroll_window_tree): Likewise.
5983         (redisplay_internal): Likewise.
5984         (set_cursor_from_row): Likewise.
5985         (redisplay_window): Likewise.
5986         (try_window): Take a text_pos parameter.  Handle charpos/bytepos.
5987         (try_window_reusing_current_matrix): Handle charpos/bytepos.
5988         (get_first_unchanged_at_end_row): Compute and return delta_bytes.
5989         (try_window_id): Handle charpos/bytepos.
5990         (Ftrace_redisplay_toggle): Return Qnil.
5991         (get_overlay_arrow_glyph_row): Handle charpos/bytepos.
5992         (insert_left_trunc_glyphs): Likewise.
5994         * dispnew.c: `Merge' with 20.2.97 (it's really too different to
5995         do a real merge).
5996         (increment_glyph_matrix_buffer_positions): Add parameter delta_bytes.
5997         (increment_glyph_row_buffer_positions): Ditto.
5998         (copy_glyph_row_contents): Ditto.
5999         (check_matrix_invariants): Add additional checks for charpos/
6000         bytepos consistency.
6001         (direct_output_for_insert): Changed for charpos/bytepos.
6002         (buffer_posn_from_coords): Likewise.  Put code dealing with 
6003         `direction-reversed' in #if 0.
6005         * xterm.h: Merge with 20.2.97.
6006         
6007         * frame.h: Merge with 20.2.97.
6009         * window.h: Merge with 20.2.97.  Add window_end_bytepos.
6011         * dispextern.h (MATRIX_ROW_START_CHARPOS): Get charpos of a row
6012         start.
6013         (MATRIX_ROW_START_BYTEPOS): Likewise for the byte position.
6014         (MATRIX_ROW_END_CHARPOS): Likewise for the row end.
6015         (MATRIX_ROW_END_BYTEPOS): Likewise for the row end byte position.
6016         (struct it): Various members renamed from .*pos to .*charpos.
6017         (IT_CHARPOS): Access current buffer character position of an
6018         iterator.
6019         (IT_BYTEPOS): Access current buffer byte position of an iterator.
6020         (IT_STRING_CHARPOS): Access current string character position of
6021         an iterator.
6022         (IT_STRING_BYTEPOS): Access current string byte position of
6023         an iterator.
6024         (globally): Add function prototypes from 20.2.97.
6026         * everywhere: Use P_ instead of PROTO for function prototypes
6027         because everyone else seems to use P_.
6029         * dispextern.h (struct text_pos): Structure describing a charpos/
6030         bytepos position in text.
6031         (BYTEPOS): Access the byte position part of a text_pos.
6032         (CHARPOS): Likewise for the character position.
6033         (SET_TEXT_POS): Set a text_pos from a character and byte position.
6034         (INC_TEXT_POS, DEC_TEXT_POS): Increment/decrement a text position.
6035         (SET_TEXT_POS_FROM_MARKER): Set a text_pos from a marker.
6036         (SET_MARKER_FROM_TEXT_POS): Set a marker from a text_pos.
6037         (TEXT_POS_EQUAL_P): Compare two text_pos structures for equality.
6038         (struct display_pos): Renamed from glyph_pos. Use struct text_pos
6039         for buffer and string positions.
6040         (struct glyph): Use text_pos.
6041         (struct it): Renamed from display_iterator.  Use text_pos.
6043 1998-07-23  Gerd Moellmann  <gerd@gnu.org>
6045         * xfns.c (x_kill_gs_process): Get image colors from XImage of a
6046         pixmap.
6048 1998-07-21  Gerd Moellmann  <gerd@gnu.org>
6050         * dispextern.h (struct glyph_row): New flag indicate_zv_line_p.
6051         * xterm.c (x_draw_row_bitmaps): Use it.
6052         * dispnew.c (row_equal_p): Ditto.
6053         (update_window_line): Ditto.
6055         * xfns.c (prepare_image_for_display): Don't set loading_failed_p
6056         flag of images.
6058         * dispextern.h (struct image): Removed member loading_failed_p.
6059         It's probably better to have the chance to try to load an image
6060         again.
6062 1998-07-20  Gerd Moellmann  <gerd@gnu.org>
6064         * xterm.c (x_draw_bitmap): Draw bitmap for empty lines ending
6065         at ZV if `indicate-zv-lines' is non-nil.
6066         (x_draw_row_bitmaps): Compute bitmap for `indicate-zv-lines'.
6068         * dispnew.c (row_equal_p): Compare displays_text_p and
6069         ends_at_zv_p flags of rows.
6070         (update_window_line): Ditto.
6072         * buffer.h (struct buffer): New member indicate_zv_lines.
6074         * buffer.c (init_buffer_once): Add default for `indicate-zv-lines'.
6075         (init_buffer_once): New variable `default-indicate-zv-lines'.
6076         (syms_of_buffer): New buffer-local varianle `indicate-zv-lines'.
6078         * xdisp.c (redisplay_window): Don't try moving the cursor
6079         if current glyph row w->last_cursor.vpos isn't enabled.
6081         * xterm.c (bitmap_type): Add ZV_LINE_BITMAP.
6083         * window.c (Fset_window_vscroll): Allow only negative scroll
6084         values.  Others don't seem to make sense, and this way it's easy
6085         to restore a vscroll of zero.
6087         * xterm.c (x_inverted_image_mask): Check that pixmap could be
6088         allocated.
6089         (x_draw_image_glyph_string_background): Don't clip if pixmap
6090         could not be created.
6092         * xfns.c (xbm_load_image_from_file): Check that pixmap could
6093         be created.
6094         (xbm_load): Ditto.
6095         (gs_load): Ditto.
6097         * xterm.c (x_get_glyph_overhangs): Take image and stretch
6098         glyphs into account.
6100         * xfaces.c (realize_default_face): Don't set font family of
6101         the default face from the fontset alias name for `fontset-startup'.
6103         * xfns.c (gs_load): Pass frame's pixel foreground and background
6104         color to the Lisp loader.
6106 1998-07-19  Gerd Moellmann  <gerd@gnu.org>
6108         * xfns.c (tiff_image_p, tiff_load): Support TIFF images via
6109         libtiff34.
6111         * configure.in (--with-tiff, HAVE_TIFF): Added.
6113         * config.in (HAVE_TIFF): Added.
6115         * Makefile.in (LIBTIFF): Added.
6117         * xfns.c (jpeg_image_p, jpeg_load): Support JPEG images.
6119         * Makefile.in (LIBJPEG): Added.
6121         * xfns.c (resource_types): Enumerators renamed to RES_TYPE_NUMBER,
6122         RES_TYPE_BOOLEAN etc. because of conflict of `boolean' with
6123         jpeglib.h.
6125         * configure.in (HAVE_JPEG, --with-jpeg): Added.  On systems 
6126         where the library is installed in /usr/local/lib, e.g. FreeBSD,
6127         configure must be run with `--x-includes=/usr/X11R6/include:
6128         /usr/local/include --x-libraries=/usr/X11R6/lib:/usr/local/lib'.
6130 1998-07-18  Gerd Moellmann  <gerd@gnu.org>
6132         * config.in (HAVE_JPEG): Added.
6134         * xfns.c (ct_init): Initialize color table used to map RGB colors
6135         from images to X pixel colors.
6136         (ct_free): Free color table.
6137         (ct_lookup): Look an RGB color up.
6138         (ct_allocated_colors): Get vector of allocated colors.
6139         (pbm_image_p): Test if image specification is a valid PPM 
6140         image specification.
6141         (pbm_scan_number): Scan a decimal ASCII number from a file.
6142         (pbm_load): Load a PPM image.
6144         * window.c (Fset_window_vscroll): Adjust glyph matrix if
6145         necessary.  Take canonical character units as parameter.
6146         (Fwindow_vscroll): Return canonical character units.
6148         * dispnew.c (allocate_matrices_for_window_redisplay): Add negative
6149         w->dy to display height for which glyph rows must be allocated.
6151 1998-07-17  Gerd Moellmann  <gerd@gnu.org>
6153         * xfaces.c (face_at_string_position): Merge in region face
6154         so that it won't overwrite the font in the region.
6155         (face_at_buffer_position): Ditto.
6156         (realize_basic_faces): Don't realize region face.
6158         * dispextern.h (enum face_id): REGION_FACE_ID removed.
6160         * xterm.c (x_set_glyph_string_background_width): Don't let
6161         cursor face extend to end of line.
6163         * xdisp.c (append_space): If adding space of default face,
6164         make sure glyph ist produced with right face.
6166         * xterm.c (x_clear_glyph_string_rect): Draw a rectangle in the
6167         background color of a glyph string.
6168         (x_draw_glyph_string_background): Call it.
6169         (x_draw_glyph_string_bg_rect): Ditto.
6170         (x_draw_stretch_glyph_string): Ditto.
6172 1998-07-15  Gerd Moellmann  <gerd@gnu.org>
6174         * xdisp.c (init_iterator): Initialize it->current_y to the
6175         window's vscroll w->dy.
6177         * window.c (Fwindow_vscroll): Return number of pixels window
6178         is vscrolled smoothly.
6179         (Fset_window_vscroll): Set the number.
6181         * xdisp.c (move_iterator_to): Recognize case MOVE_TO_POS and
6182         to_pos in truncated part of a line.
6184 1998-07-14  Gerd Moellmann  <gerd@gnu.org>
6186         * xdisp.c (move_iterator_in_display_line_to): If very first glyph
6187         doesn't fit on the line, truncate it, despite truncate_lines nil.
6188         (display_line): Ditto.
6190         * xfns.c: Experimental support for Ghostscript images.
6192         * xterm.c (x_term_init): Initialize new atoms DONE and PAGE.
6193         (XTread_socket): React on events from Ghostscript.
6194         (expose_frame): If width or height are zero, redraw entire frame.
6195         (XTread_socket): Call expose_frame after receiving event from
6196         Ghostscript.
6198         * xterm.h (struct x_display_info): Add atoms DONE and PAGE
6199         for Ghostscript support.
6201         * xdisp.c (redisplay_internal): Return quickly if called
6202         recursively.
6204         * alloc.c (NSTATICS): Increased to 1024.
6206 1998-07-08  Gerd Moellmann  <gerd@gnu.org>
6208         * xterm.c (x_append_stretch_glyph): Append a stretch glyph to an
6209         iterator's glyph row.
6210         (x_produce_stretch_glyph): Call it.
6211         (x_produce_glyphs): Handle `space-width' property; call
6212         x_append_stretch_glyph.
6214         * xdisp.c (syms_of_xdisp): Add symbol `space-width' used as a text
6215         property.
6216         (get_iterator_space_width): Determine value of `space-width'
6217         property at iterator's position.
6218         (reseat_iterator): Call it.
6219         (next_element_from_string): Ditto.
6220         (next_element_from_buffer): Ditto.
6221         (init_iterator): Initialize space_width of iterator.
6222         (redisplay_internal): Don't goto end_of_redisplay if PT hasn't
6223         moved, but cursor blinks.
6224         (redisplay_internal): Set w->last_cursor_off_p after update.
6226         * dispextern.h (enum iterator_prop_idx): Add SPACE_WIDTH_PROP_IDX.
6227         (struct display_iterator): Add new member space_width.
6229         * window.h (struct window): Add last_cursor_off_p.
6231 1998-07-07  Gerd Moellmann  <gerd@gnu.org>
6233         * Saved.
6235         * window.c (Fpos_visible_in_window_p): Case window not up to
6236         date---return nil if iterator hasn't reached position.
6238 1998-07-06  Gerd Moellmann  <gerd@gnu.org>
6240         * xdisp.c (text_outside_line_unchanged_p): Fix case that
6241         overlays have changed.
6242         (redisplay_window): Case cursor movement.  Don't try it if
6243         last_cursor.vpos is out of range.
6245         * xdisp.c (set_cursor_from_row): Set this_line_.* variables.  This
6246         way, the display optimization for the line containing the cursor
6247         is used more frequently, esp. when we have a blinking cursor.
6248         (display_line): Don't set this_line_.* variables.
6250         * xterm.c (x_redraw_cursor): Removed.
6251         (x_display_and_set_cursor): Set cursor type depending on
6252         cursor_off_p flag of window.
6254         * dispnew.c (redraw_cursor_hook): Removed.
6255         (Fblink_cursor): Additional parameter on_p to set the cursor_off_p
6256         member of the selected window.
6258         * xfaces.c (Fface_font): Added for compatibility with 20.2.
6260         * xterm.c (x_y_to_hpos_vpos): Return null if not over text.
6261         Return glyph area under x/y.
6262         (note_mouse_highlight): Use x_y_to_hpos_vpos in its new form.
6264         * keyboard.c (detect_input_pending_run_timers): Call gobble_input
6265         after redisplaying.
6267 1998-07-05  Gerd Moellmann  <gerd@gnu.org>
6269         * xdisp.c (text_outside_line_unchanged_p): Test if changes
6270         are all outside of a line of text.
6271         (redisplay_internal): Use it.
6273 1998-06-30  Gerd Moellmann  <gerd@gnu.org>
6275         * xdisp.c (next_element_from_buffer): After skipping over
6276         invisible text, look for the `glyph' property.
6277         (set_iterator_stop_pos): Ignore check positions in front
6278         of an iterator's current position.
6280         * xterm.c (show_mouse_face): Don't act on rows that don't exist
6281         anymore or which are marked as not having valid contents.
6283         * xfaces.c (Finternal_set_lisp_face_attribute): Don't free
6284         realized faces if new attribute value is equal to old value.
6286 1998-06-29  Gerd Moellmann  <gerd@gnu.org>
6288         * xfaces.c (Finternal_make_lisp_face): Increment
6289         lface_id_to_name_size when lface_id_to_name is reallocated.
6291 1998-06-27  Gerd Moellmann  <gerd@gnu.org>
6293         * xdisp.c (set_iterator_stop_pos): Compute initial stop_pos
6294         as minimum of endpos and overlay_pos.
6295         (load_overlay_strings): Set next_overlay_pos of iterator to
6296         -1 if we don't have to check for more overlay strings.
6298 1998-05-09  Gerd Moellmann  <gerd@gnu.org>
6300         * xdisp.c (set_iterator_to_next_visible_line_start): Don't
6301         do anything if iterator is at ZV because scan_buffer doesn't
6302         work otherwise.
6304         * xterm.c (x_encode_char): Inline it.
6305         (x_get_char_font_and_encoding): Simplified.
6306         (x_per_char_metric): Inline it.
6308         * xterm.c (x_draw_glyph_string_relief): Use clipping.
6310         * xdisp.c (get_next_display_element): Check for end of relief
6311         face moved here from next_element_from_buffer.
6313         * xterm.c (x_produce_image_glyph): Add relief thickness.
6314         (x_produce_stretch_glyph): Ditto.
6316 1998-05-08  Gerd Moellmann  <gerd@gnu.org>
6318         * xdisp.c (fill_iterator_from_glyph_property): Handle glyph
6319         property value (space :width WIDTH :height HEIGHT :ascent ASCENT).
6321         * xterm.c (x_produce_stretch_glyph): Produce a stretch glyph
6322         from a glyph property.
6323         (x_produce_glyphs): Use it.
6325         * xdisp.c (set_iterator_to_next): Handle next_element_from_stretch.
6327         * xterm.c (x_produce_image_glyph): Add to current_x only if 
6328         in text area.
6329         (x_produce_glyphs): Ditto.
6331         * xdisp.c (display_line): Compute row height from glyphs in 
6332         marginal areas.
6334         * xterm.c (x_draw_image_glyph_string_background): Draw 
6335         background of an image glyph string.
6336         (x_draw_glyph_string_bg_rect): Draw a rectangular region of 
6337         the background of a glyph string.
6338         (x_draw_image_glyph_string_foreground): Draw the foreground of
6339         an image glyph string.
6340         (x_inverted_image_mask): Return the inverted mask of an image.
6342         * xfns.c (x_draw_image): Removed.
6344         * dispextern.h (struct image_type): Remove drawing function.
6346         * xfaces.c (load_face_colors): Swap colors if face is inverse.
6348         * xdisp.c (get_next_display_element): In marginal areas, translate
6349         newlines, tabs, etc. like normal control characters.
6351         * xfaces.c (Fface_color_supported_p): Transpose parameters frame
6352         and color.
6353         (free_realized_faces): Set frame garbaged.
6355         * xfaces.c (syms_of_xfaces): Add defsubr for
6356         internal-lisp-face-attribute-values.
6358 1998-05-07  Gerd Moellmann  <gerd@gnu.org>
6360         * xterm.c (x_produce_image_glyph): Don't add glyph if area is
6361         full.
6362         (x_produce_image_glyph): Set IT->nglyphs to 1.
6363         (x_draw_image_glyph_string): Use inverted mask to draw background.
6365         * dispextern.h (struct image_type): Additional clipping rect
6366         parameters for drawing functions.
6368         * xterm.c (x_get_glyph_string_clip_rect): Get clip rect for 
6369         a glyph string.
6370         (x_draw_image_glyph_string): Use it and pass the rect to the
6371         image drawing function.
6373         * xdisp.c (fill_iterator_from_glyph_property): Use position of
6374         first character with `glyph' property as image position.  Set
6375         iterator back to that position as long as the image hasn't been
6376         consumed with set_iterator_to_next.
6377         (set_cursor_from_row): Accept when glyph with given position is
6378         not found in the row.  Set cursor x to end of line in that case,
6379         so that we can hscroll.
6380         (redisplay_internal): Correct computation of delta by which
6381         positions have changed in redisplay optimization for cursor
6382         row of selected window.
6384         * xdisp.c (display_line): Remove start_pos.
6385         (display_line): Fix bug preventing display optimization for 
6386         cursor line of selected window.
6387         (next_element_from_buffer): Avoid XSETBUFFER, use it->w->buffer
6388         instead.
6390         * dispnew.c (update_text_area): Use GLYPH_EQUAL_P.
6391         (update_text_area): Take glyph pixel width into account
6392         when trying to find a resync point.
6393         (row_equal_p): Compare glyphs in all areas.
6395 1998-05-06  Gerd Moellmann  <gerd@gnu.org>
6397         * xterm.c (x_produce_glyphs): Don't add glyph if area is full.
6399         * dispextern.h (struct glyph_row): Use unsigned hash value.
6401         * xdisp.c (display_line): Simplified and made faster by setting
6402         the cursor with set_cursor_from_row.
6403         (set_cursor_from_row): Handle rows of desired matrix.
6405 1998-05-05  Gerd Moellmann  <gerd@gnu.org>
6407         * xdisp.c (set_cursor_from_row): Don't put cursor on glyphs
6408         with type != CHAR_GLYPH.
6409         (fill_iterator_from_glyph_property): Return void.  Set
6410         method to next_element_from_image.
6411         (next_element_from_image): Dummy function for delivering a
6412         single image id.
6413         (set_iterator_to_next): Add method next_element_from_image.
6414         (redisplay_window): When recentering, and cursor vpos is -1
6415         after display, assume middle of window is in first line displayed
6416         in window, and display again.
6417         (fill_iterator_from_glyph_property): Assign image glyph 
6418         the position of the first character having the glyph property.
6420         * dispextern.h (IMAGE_ASCENT): Compute ascent of image.
6421         * xfns.c (x_draw_image): Use it.
6422         * xterm.c (x_produce_image_glyph): Use it.
6424         * xterm.c (x_produce_image_glyph): Set iterator's pixel_width.
6426         * Makefile.in: Extraneous #define of LIBXPM removed.
6428         * xterm.c (x_produce_glyphs): Produce a STRETCH_GLYPH for tabs.
6429         (x_fill_stretch_glyph_string): Fill a glyph string from a 
6430         stretch glyph.
6431         (x_compute_glyph_string_overhangs): Compute overhangs only
6432         for text glyph strings.
6433         (x_draw_stretch_glyph_string): Draw a stretch glyph string.
6434         (x_draw_glyph_string): Call it.
6436         * dispextern.h (glyph_type): Add STRETCH_GLYPH.
6437         (struct glyph): Add sub-structure for stretchable glyphs.
6438         (GLYPH_EQUAL_P): Compare glyph type and u.val.
6440         * xdisp.c (get_overlay_arrow_glyph_row): Put face code into
6441         #ifdef HAVE_FACES.
6443         * xterm.c (x_produce_glyphs): Use ASCII face for spaces of a TAB.
6445         * xdisp.c (fill_iterator_from_glyph_property): Renamed from
6446         setup_iterator_from_glyph_property.  Don't do it for terminal
6447         frames.
6449         * xterm.c (x_produce_image_glyph): Produce glyph for image
6450         that can't be loaded.
6452         * xfns.c (lookup_image): If image can't be loaded, set its
6453         width and height so that we can draw a rectangle.
6454         (x_draw_image): Draw a rectangle for images that don't have
6455         a pixmap.
6456         (make_image): Set hash value.
6457         (image_spec_equal_p): Use image_spec_value.
6459         * xterm.c (expose_frame): Don't try to redraw if basic faces
6460         haven't benn realized yet.
6461         (x_draw_image_glyph_string): Fill background only if image 
6462         is not as tall as row.
6464 1998-05-04  Gerd Moellmann  <gerd@gnu.org>
6466         * Makefile.in (LIBXPM): If not already defined, define to -lXpm.
6467         (LIBX)[HAVE_X11]: Add LIBXPM.
6469         * xfns.c (xpm_image_p): Implementation of image type functions
6470         for XPM.
6471         (xpm_load): Ditto.
6473         * dispextern.h (struct image): Add mask pixmap for XPM.
6475         * xfns.c (x_draw_image): Handle images with masks.
6477         * configure.in: --with-xpm added.  Code detecting -lXpm added.
6479         * config.in: Add HAVE_XPM.
6481         * xfns.c (xbm_draw): Removed.
6482         (x_draw_image): Default implementation for drawing images.
6483         (xbm_keyword_index): Remove XBM_DEPTH.
6484         (xbm_format): Remove `:depth'.
6485         (xbm_image_spec_from_file): Removed to reduce consing.
6486         (xbm_load_image_from_file): Added for the same reason. 
6488         * xterm.c (x_fill_image_glyph_string): Don't set ybase of 
6489         glyph string.
6490         (x_draw_image_glyph_string): Pass ybase to image draw function.
6492         * xfns.c (make_image): Set default baseline.
6494         * xterm.c (x_produce_image_glyph): Compute ascent of image
6495         from its height and baseline percentage.
6497         * xfns.c (xbm_keyword_index): Add XBM_BASELINE.
6498         (xbm_format): Add description for `:baseline'.
6499         (xbm_image_spec_from_file): Add keywords from original spec to
6500         result.
6501         (xbm_load): Set baseline of image.
6502         (xbm_image_p): Check range for baseline.
6504         * dispextern.h (struct image): Add member baseline.
6506         * xdisp.c (dump_glyph_matrix): Handle image glyphs.
6508         * term.c (produce_glyphs): Change assertion to allow DISP_IMAGE.
6510         * xdisp.c (get_next_display_element): Do character translations
6511         only if delivering characters.
6513 1998-05-03  Gerd Moellmann  <gerd@gnu.org>
6515         * dispextern.h (ITERATOR_AT_END_OF_LINE_P): Test for 
6516         DISP_CHARACTER.
6518         * xterm.c (x_produce_image_glyph): Poduce image glyphs.
6519         (x_produce_glyphs): Call x_produce_glyphs for DISP_IMAGE.
6521 1998-05-02  Gerd Moellmann  <gerd@gnu.org>
6523         * xfns.c (prepare_image_for_display): Set image timestamp.
6524         (clear_image_cache): Clear images if image's timestamp +
6525         Vimage_eviction_seconds is > now.
6526         (syms_of_xfns): New variables image-eviction-seconds, and
6527         image-types.
6528         (add_image_format): Add to image-types.
6529         (xbm_load): Support new image spec format.
6530         (x_alloc_image_color): Allocate a color for an image.
6532         * dispextern.h (struct image): Add timestamp.
6534         * xfns.c (xbm_image_p): Allow bool-vectors, vectors of strings and
6535         vectors of bool-vectors.
6536         (xbm_lisp_object_from_file): Build new format image spec.
6538 1998-05-01  Gerd Moellmann  <gerd@gnu.org>
6540         * xfaces.c (init_frame_faces): Initialize image cache.
6541         (free_frame_faces): Free it.
6543         * xterm.c (x_delete_display): Don't free image cache.
6545         * emacs.c (main): Call init_xfns.
6547 1998-04-30  Gerd Moellmann  <gerd@gnu.org>
6549         * alloc.c (mark_object): Mark objects in image cache.
6551         * xfns.c (x_set_internal_border_width): Correct call to 
6552         widget_store_internal_border_width.
6554         * widget.c (widget_store_internal_border): Return void.
6556         * xfns.c (x_destroy_bitmap): Use xfree instead of free.  Return
6557         void.
6558         (init_x_parm_symbols): Return void.
6559         (x_report_frame_params): Ditto.
6560         (x_set_border_pixel): Ditto.
6561         (syms_of_xfns): Ditto.
6562         (x_destroy_all_bitmaps): Use xfree instead of free.
6564         * xterm.h (FRAME_X_IMAGE_CACHE): Access the image cache of a frame.
6566         * xterm.c (x_term_init): Initialize image_cache of display info.
6567         (x_delete_display): Free image cache.
6569         * xterm.h (struct x_display_info): Add image_cache.
6571         * xfns.c (make_image_cache): Allocate a new image cache.
6572         (free_image_cache): Free an image cache.
6573         (make_image): Allocate an image.
6574         (free_image): Free an image.
6576         * dispextern.h (struct image): Structure describing an image.
6577         (struct image_cache): Structure describing an image cache.
6579 1998-04-29  Gerd Moellmann  <gerd@gnu.org>
6581         * xdisp.c (check_iterator_glyph_property): Return int.  Value is
6582         non-zero if iterator is filled with something to return.
6583         (next_element_from_buffer): Immediately return if
6584         setup_iterator_from_glyph_prop has filled iterator with pixmap.
6585         (next_element_from_string): Likewise.
6587         * xfaces.c (load_pixmap): Allow to pass null for W_PTR and H_PTR.
6589         * dispextern.h (struct glyph): Add pixmap_id.
6590         (display_element_type): Add DISP_PIXMAP.
6592         * xmenu.c (popup_get_selection): Use xmalloc/xfree instead of
6593         malloc/free.
6595         * xfaces.c (clear_font_table): Free fonts not used by fontsets.
6596         (clear_face_cache): Call it.
6598         * xterm.c (x_query_font): Don't look at empty font table slots.
6599         (x_compute_min_glyph_bounds): Likewise.
6600         (x_term_init): Initialize font_table to null.
6601         (x_load_font): Change allocation of font_info structures so
6602         that it is possible to free fonts.
6604         * xfns.c (Fx_close_connection): Use xfree instead of free. 
6605         Only free fonts from filled font table entries.
6607         * xfaces.c (best_matching_font): Support use of scalable fonts.
6608         (Fface_scalable_fonts_mode): Toggle use of scalable fonts.
6610         * xterm.h (struct x_display_info): Remove screen_dpi, add resx
6611         and resy.
6612         * xterm.c (x_term_init): Compute resx and resy.
6614         * xfaces.c (split_font_name): Don't reject scalable fonts.
6616         * xterm.c (x_list_fonts): Set code exclusing scalable fonts 
6617         in #if 0.
6619         * xfaces.c (xlfd_point_size): Return 0 for fonts whose real
6620         point size cannot be determined.
6622         * xterm.h (FRAME_SMALLEST_CHAR_WIDTH): Return smallest character
6623         width over all fonts on a frame.
6624         (FRAME_SMALLEST_FONT_HEIGHT): Likewise for font height.
6625         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Use these
6626         macros.
6628         * xterm.c (x_font_min_bounds): Moved here from xfaces.c.
6629         (x_compute_min_char_bounds): Formerly min_char_bounds in xfaces.c.
6630         (x_load_font): Use x_compute_min_char_bounds.
6632         * xterm.h (struct x_display_info): New members smallest_char_width
6633         and smallest_font_height.
6635 1998-04-28  Gerd Moellmann  <gerd@gnu.org>
6637         * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Call function with
6638         the same name if GC of face is zero.
6640         * dispextern.h (struct face): Member non_ascii_gc removed.
6642         * xterm.c (x_get_char_font_and_encoding): Return face's font
6643         for characters < 0177 in default face.  Prepare face for 
6644         display before returning it.
6645         (x_produce_glyphs): Use it->charset.
6646         (x_get_char_font_and_encoding): Simplified.
6647         (x_encode_char): Remove parameter `font'.
6649         * xfaces.c (choose_face_font): If registry from charset symbol
6650         doesn't contain a `-', make it a pattern by appending "*-*".
6652         * xdisp.c (check_iterator_glyph_property): Adjust limit for
6653         glyph_check_pos computation to character boundary.
6655 1998-04-27  Gerd Moellmann  <gerd@gnu.org>
6657         * fontset.h (FONT_INFO_FROM_ID): Return null if ID is invalid.
6659         * xfaces.c (ascii_face_of_lisp_face): Get the id of the realized
6660         ASCII face for a given Lisp face id.
6662         * xdisp.c (set_iterator_stop_pos): Take glyph_check_pos into
6663         account.
6664         (reseat_iterator): Set glyph_check_pos. Handle case where 
6665         new position is < original position.
6666         (check_iterator_glyph_property): Handle glyph property in strings.
6667         (next_element_from_string): Call above function.
6668         (next_element_from_display_vector): Handle faces in glyphs.
6669         (get_next_display_element): Set face_id of glyphs for
6670         control chars to zero.
6672         * Makefile.in (term.o): Add dependency on dispextern.h.
6674         * xdisp.c (syms_of_xdisp): Add symbol `glyph'.
6675         (display_line): Handle marginal areas.
6676         (move_iterator_in_display_line_to): Likewise.
6678         * xfaces.c (Finternal_make_lisp_face): Assign Lisp faces an id.
6680         * xfaces.c (face_at_buffer_position): Don't merge with nil
6681         text property.
6682         (face_at_string_position): Ditto.
6684         * dispextern.h (struct display_iterator): Use a stack of saved
6685         values instead of saving check positions etc. individually.
6687         * xdisp.c (set_iterator_to_next): If end of Lisp string reached,
6688         maybe pop the iterator's stack.
6689         (save_iterator_settings): Push a value on iterator's stack.
6690         (get_overlay_strings_at_iterator_position): Use it.
6691         (restore_iterator_settings): Pop the stack.
6692         (set_iterator_to_next_overlay_string): Use it.
6694         * xfaces.c (try_font_list): Use alternative font families.
6696 1998-04-26  Gerd Moellmann  <gerd@gnu.org>
6698         * xfaces.c (Fset_face_font_sort_order): Set the order in which
6699         font selection matches fonts.
6700         (Fface_font_sort_order): Return the font sort order.
6701         (best_matching_font): Find best matching font based on sort order.
6702         (cmp_font_names): Sort by given sort order.
6704         * dispextern.h (struct display_iterator): New member faces_p.
6705         * xdisp.c (init_iterator): Initialize it->faces_p.
6706         (compute_face_at_iterator_string_position): Use it.
6707         (compute_face_at_iterator_position): Use it.
6708         (init_iterator): Use it.
6709         (display_mode_line): Ditto.
6711         * xdisp.c (get_next_display_element): Put code choosing a face
6712         when the charset changes in #ifdef HAVE_FACES.
6714         * dispextern.h (FACE_FOR_CHARSET): Replacement for function 
6715         lookup_face_for_charset.
6717         * xfaces.c (free_font_names): Renamed from free_split_font_names.
6718         (free_all_realized_faces): Renamed from remove_all_realized_faces.
6720 1998-04-25  Gerd Moellmann  <gerd@gnu.org>
6722         * xfaces.c (best_matching_font): Return the name of the best
6723         matching font in an array of font_name structures.
6724         (choose_face_font): Use it.
6725         (choose_face_fontset_font): Use it.
6726         (find_best_weight_font): If final font found has same weight as
6727         the font we started with, return the original font because it is a
6728         better match for the resolution of the display.
6729         (find_best_slant_font): Likewise.
6730         (merge_face_vector_with_property): Check more invalid attribute
6731         values.
6732         (lface_suitable_for_charset_p): Replaced by a macro with the same
6733         name in upper-case.
6735 1998-04-24  Gerd Moellmann  <gerd@gnu.org>
6737         * dispextern.h (struct face): Member
6738         fontset_chosen_for_realization_p removed.
6740         * xfaces.c (cache_face): If face->fontset >= 0, add face to the
6741         end of the collision list, so that we find more specific faces
6742         first.
6743         (lookup_face_for_charset): Look up a new face if face->fontset >=
6744         0, and charset != CHARSET_COMPOSITION.
6746         * xfaces.c (split_font_name): Return zero if point size of font
6747         couldn't be computed.
6748         (realize_default_face): Use ASCII font of a fontset to determine
6749         font-related attributes of the default face.
6750         (face_fontset): Return fontset id for face family.
6751         (font_list): Additional parameter font_pattern.  If non-nil,
6752         return fonts matching that pattern.
6754 1998-04-23  Gerd Moellmann  <gerd@gnu.org>
6756         * xfaces.c (choose_face_fontset): If new fontset cannot be
6757         constructed, or fontset name cannot be split, return the id of the
6758         standard fontset.
6760         * xterm.c (XTframe_up_to_date): Check that frame is an X frame.
6761         When Emacs starts, it may be called for the initial frame which
6762         isn't an X frame.
6764         * dispextern.h (struct face): New members foreground_defaulted_p,
6765         background_defaulted_p.
6766         (struct face): Members `mask' and `cache' removed.
6768         * xfaces.c (load_color): Set them.
6769         (free_face_colors): Check them.
6770         (xlfd_point_size): Return -1 if resolution or point size of 
6771         font unknown.
6773         * xfaces.c (free_font): Removed.
6774         (load_face_font_or_fontset): Renamed from load_font.
6775         (load_face_font_or_fontset): Use message2 instead of signalling.
6776         (load_color): Likewise.
6777         (load_pixmap): Likewise.
6779         * xterm.h (struct x_display_info): Add screen_dpi.
6780         * xterm.c (x_term_init): Initialize it.
6781         * xfaces.c (xlfd_point_size): Use it.
6782         (split_font_name): Compute numeric XLFD_RESY.
6783         (cmp_font_names): Make fonts with an y-resolution more 
6784         similar to that of the frame appear first in the result.
6786         * xfaces.c (cache_face): If fontset_chosen_for_realization_p
6787         is set for the face to cache, add it to the end of the collision
6788         list.
6789         (try_font_list): If fonts for given family and registry cannot
6790         be found, first try to keep the registry, and choose a different
6791         family.
6792         (choose_face_font): Allow nfonts == 0.
6793         (try_font_list): Give up if no font matches given registry.
6795 1998-04-22  Gerd Moellmann  <gerd@gnu.org>
6797         * xterm.c (x_get_char_font_and_encoding): Get font_info from
6798         font info id of the face.
6800         * xfaces.c (load_font): Set font_info_id.
6801         (realize_face): Ditto.
6803         * dispextern.h (struct face): Change member font_info to
6804         font_info_id.
6806         * fontset.h (FONT_INFO_ID): Build an ID from a font_info pointer.
6807         (FONT_INFO_FROM_ID): Get a font_info pointer from an ID.
6809         * xdisp.c (extend_face_to_end_of_line): If IT's current charset
6810         isn't ASCII, get the ASCII face before adding a space.
6811         (append_space): Likewise.
6812         (insert_left_trunc_glyphs): Initialize truncate_it's charset
6813         to -1 so that it will compute the right face for the truncation
6814         glyphs.
6816         * xfaces.c (realize_face): Set
6817         face->fontset_chosen_for_realization_p.
6818         (lookup_face_for_charset): If fontset wasn't specified originally
6819         and new charset != CHARSET_COMPOSITION, get a new face for that
6820         charset.
6822         * dispextern.h (struct face): New member
6823         fontset_chosen_for_realization_p_specified_p.  Set to 1 when
6824         realize_face has chosen a fontset to display composite characters
6825         for a Lisp face not specifying a fontset.
6827         * xdisp.c (extend_face_to_end_of_line): Move tests for default
6828         face and line already filled here.  Don't do anything if current
6829         face hasn't a relief or has a background equal to the frame
6830         background.
6832         * xfaces.c (split_font_name): Additional parameter numeric_p.
6833         Don't compute numeric values if it is non-zero.
6834         (choose_face_fontset): Call split_font_name with numeric_p == 0.
6835         (choose_face_fontset): Print a message if fontset contains a 
6836         font whose name cannot be split into fields.
6838 1998-04-21  Gerd Moellmann  <gerd@gnu.org>
6840         * xfaces.c (try_font_list): Try to load a list of fonts, 
6841         possibly using less restrictive patterns.
6842         (choose_face_font): Use it.
6844         * xterm.c (x_get_char_font_and_encoding): For charset !=
6845         CHARSET_ASCII use font_info of face if face hasn't a fontset set.
6847         * dispextern.h (struct face): New member font_info.
6849         * xfaces.c (load_font): Use FS_LOAD_FONT to load fonts for faces
6850         specifying a fontset as well as those not having a fontset.
6851         (free_font): Make it empty.
6852         (realize_face): Use changed load_font.
6854         * xterm.c (x_get_char_font_and_encoding): If face doesn't
6855         fit for charset, get the right one.
6857         * xfaces.c (load_font): Take frame and name parameter, return
6858         font.
6859         (free_font): Likewise.
6860         (split_font_name): Compute numeric values for height, swidth etc.
6861         (cmp_font_names): Use them.
6862         (find_best_width_font): Ditto.
6863         (find_best_height_font): Ditto.
6864         (find_best_weight_font): Ditto.
6865         (find_best_slant_font): Ditto.
6866         (lface_hash): Add weight, slant, swidth and relief to hash value.
6867         (lface_equal_p): Make it faster.
6868         (lface_from_symbol): Use assq_no_quit.
6869         (Fnote_default_face_changed): Removed.
6870         (cmp_font_names): Use strcmp instead of xstricmp.
6871         (face_charset_registries): Removed.
6873 1998-04-20  Gerd Moellmann  <gerd@gnu.org>
6875         * frame.h (CHECK_FRAME): Give this macro a statement form.
6876         (CHECK_LIVE_FRAME): Ditto.
6878         * xfaces.c (find_best_width_font): Find the best matching font
6879         for a given width.
6880         (find_best_height_font): Likewise for height.
6881         (find_best_weight_font): Likewise for weight.
6882         (find_best_slant_font): Likewise for slant.
6883         (choose_face_font): Use them.
6884         (get_lface_attributes): Always return frame-local face attrs.
6885         (Finternal_merge_in_global_face): Merge local face with 
6886         global face attributes.
6888         * xfaces.c (check_lface_attrs, check_lface): Check consistency of
6889         Lisp face attributes.
6891 1998-04-19  Gerd Moellmann  <gerd@gnu.org>
6893         * xfaces.c (Finternal_set_lisp_face_attribute): Add :bold
6894         and :italic for compatibility.
6895         (Finternal_set_lisp_face_attribute_from_resource): Handle
6896         :bold and :italic.  Handle boolean resource values for 
6897         :underline and :italic.
6899         * xfns.c (display_x_get_resource): Make it externally visible.
6901         * xfaces.c (lface_from_symbol): Take a frame as parameter.
6902         If that frame is non-null, return the frame-local face.
6903         (Finternal_make_lisp_face): Additional frame argument.
6904         (lface_attributes): Get face attributes from global and frame-local
6905         definitions.
6906         (Finternal_lisp_face_equal_p): Additional frame argument.
6907         (merge_lisp_face_vector_with_property): Ditto.
6908         (Frealize_basic_faces): Removed.
6909         (Finternal_get_lisp_face_attribute): Additional frame argument.
6910         (Finternal_lisp_face_p): Ditto.
6911         (load_color) [MSDOS]: Removed because it isn't clear how
6912         to do this for MS-DOS.
6914         * xfaces.c (lface_from_symbol): Get global face definition
6915         from face-global-alist.
6917         * xfaces.c (Finternal_set_lisp_face_attribute): Allow `t'
6918         as values for :underline and :inverse-video.
6919         (Finternal_set_lisp_face_attribute): Allow nil values.
6921 1998-04-17  Gerd Moellmann  <gerd@gnu.org>
6923         * xfaces.c (Finternal_make_lisp_face): Return Lisp face vector.
6925         * xfaces.c (syms_of_xfaces): Add Vall_faces.
6926         (Finternal_make_lisp_face): Add new face to Vall_faces.
6928         * xdisp.c (echo_area_display): Remove code recomputing faces.
6929         (redisplay_internal): Ditto.
6930         (init_iterator): Do it here.
6932         * xfaces.c (choose_face_font): Check that swidth doesn't change
6933         for subusequent attributes.
6934         (xlfd_point_size): Return int.
6936         * xdisp.c (redisplay_internal, echo_area-display): If realized
6937         faces have been cleared, call recompute_basic_faces.
6939         * xfaces.c (recompute_basic_faces): Free realized faces.  Reset
6940         face_attributes_changed_p.
6941         (remove_all_realized_faces): Remove all realized faces on 
6942         all frames.
6943         (Finternal_set_lisp_face_attribute): Call remove_all_realized_faces.
6945         * xdisp.c (redisplay_internal): If face attributes have been
6946         changed since the last redisplay, recompute basic faces.
6947         (echo_area_display): Ditto.
6949         * xfaces.c (clear_face_gcs): Renamed from clear_realized_face_cache.
6951         * xfaces.c (min_char_bounds): If face cache not yet present,
6952         don't try to get font dimensions from faces.
6954         * xterm.c (x_frame_mode_line_height): If face cache not present
6955         set, return default height.
6957         * alloc.c (mark_face_cache): Check for null faces.  Correct
6958         index bug.
6960         * dispextern.h (struct face): Renamed from struct rface.  Member
6961         underline renamed underline_p.  Make it a bit-field.
6963         * xfaces.c (init_frame_faces): Allocate face cache.
6964         (free_frame_faces): Free face cache.
6965         (recompute_basic_faces): Realize basic faces only if face cache is
6966         allocated, i.e. after init_frame_faces has been called.
6968         * frame.c (make_frame): Initialze face cache with null.
6970         * xfaces.c (same_size_fonts): Removed.
6972         * xterm.c (x_set_glyph_string_gc): Add post-condition 
6973         s->gc != 0.
6974         (x_set_mouse_face_gc): Ditto.
6975         (x_set_mode_line_face_gc): Ditto.
6977         * xfaces.c (realize_default_face): Return int.  Value is 
6978         zero if frame params don't contain enough information to 
6979         realize the default face.
6980         (realize_basic_faces): Ditto.
6981         (init_frame_faces): Realize basic faces.
6983         * xfns.c (x_set_font): First store real font name in frame
6984         parameters, then call recompute_basic_faces.
6986         * xfaces.c (recompute_basic_faces): Call realize_basic_faces.
6988 1998-04-16  Gerd Moellmann  <gerd@gnu.org>
6990         * xfaces.c (syms_of_xfaces): Correct calls to defsubr.
6992         * xfns.c (Fx_face_fixed_p): Removed.
6993         (Fx_list_fonts): Moved to xfaces.c.
6995         * xfaces.c (compute_face_at_buffer_pos): Renamed to
6996         face_at_buffer_position.  Parameter charset removed; always
6997         compute face for CHARSET_ASCII.
6998         (face_at_string_position): Renamed from
6999         compute_face_at_string_pos. Parameter charset removed; always
7000         compute for CHARSET_ASCII.
7001         (lookup_face_for_charset): Take frame parameter instead of 
7002         face_cache.
7003         (lookup_face): Ditto.
7004         (compute_char_face): Renamed from compute_glyph_face.
7006         * xdisp.c (init_iterator): Initialize charset member.
7007         (reseat_iterator_to_string): Ditto.
7008         (get_charset_at_buffer_position): Determine charset at
7009         buffer position in current_buffer.
7010         (reseat_iterator): Call above function.
7011         (compute_face_at_iterator_position): Call
7012         compute_face_at_buffer_pos.
7013         (compute_face_at_iterator_string_position): Call
7014         compute_face_at_string_pos.
7015         (get_face_from_id): Removed.
7016         (get_face_from_cursor_pos): Call compute_face_at_buffer_pos.
7017         Call get_charset_at_buffer_position.
7018         (reseat_iterator): Determine face if charset at pos differs
7019         from iterator's charset.
7020         (reseat_iterator_to_glyph_pos): Removed.
7022         * xfaces.c (compute_face_at_bufpos): Remove parameter charset.
7023         Determine charset from buffer position.
7024         (compute_string_char_face): Renamed to compute_face_at_string_pos.
7025         (compute_face_at_bufpos): Renamed to compute_face_at_buffer_pos.
7027         * dispextern.h (struct display_iterator): Add member charset.
7029 1998-04-15  Gerd Moellmann  <gerd@gnu.org>
7031         * xfaces.c (compute_char_face): Removed.
7033         * xdisp.c (get_overlay_arrow_glyph_row): Use compute_glyph_face
7034         with new parameter list.
7036         * xfaces.c (region_face): Removed.
7037         (allocate_face): Removed.
7038         (copy_face): Ditto.
7039         (face_eql): Removed.
7040         (intern_face): Removed.
7041         (clear_face_cache): Removed.
7042         (load_font): Ditto.
7043         (unload_font): Ditto.
7044         (load_color): Ditto.
7045         (unload_color): Ditto.
7046         (new_computed_face): Ditto.
7047         (intern_computed_face): Ditto.
7048         (ensure_face_ready): Ditto.
7049         (merge_faces): Ditto.
7050         (compute_base_face): Ditto.
7051         (merge_face_list): Ditto.
7052         (Fmake_face_internal): Removed.
7053         (Fset_face_attribute_internal): Ditto.
7054         (face_name_id_number): Removed.
7055         (Fframe_face_alist): Ditto.
7056         (Fset_frame_face_alist): Ditto.
7057         (Finternal_next_face_id): Ditto.
7059         * xterm.h (struct x_output): Remove computed_faces, and
7060         param_faces.  Remove macros accessing them.
7062         * xfaces.c: Entirely new face implementation added.
7064 1998-04-11  Gerd Moellmann  <gerd@gnu.org>
7066         * dispextern.h (struct glyph_pos): Member `bufpos' renamed
7067         `charpos'.
7069 1998-04-10  Gerd Moellmann  <gerd@gnu.org>
7071         * xterm.c (x_scroll_bar_move): Clear only regions not covered by
7072         scroll bar window to reduce flickering.  Clear entire height.
7074         * xdisp.c (move_iterator_vertically_backward): Set iterator's
7075         current_x and hpos to zero after moving to previous line
7076         start.
7078 1998-04-03  Gerd Moellmann  <gerd@gnu.org>
7080         * frame.h (FRAME_FACE_CACHE): Access to a frame's face cache.
7082         * xfaces.c (xlfd_point_size): Compute relative point size of
7083         fonts from font and frame resolution.
7084         (sort_fonts): New function to sort fonts, temporarily setting
7085         font_frame to the frame in effect.
7086         (xlfd_point_size): Take additional frame parameter to be able
7087         to get at the display's resolution.
7089         * xterm.c (x_setup_relief_colors): Use WHITE_PIX_DEFAULT and
7090         BLACK_PIX_DEFAULT.
7091         (x_setup_relief_color): Use FRAME_X_SCREEN instead of default
7092         screen of display.
7094 1998-03-31  Gerd Moellmann  <gerd@gnu.org>
7096         * xfaces.c (choose_face_fontset): Instantiate fontsets.
7098         * fontset.h: Add external declarations for Vfontset_alias_alist
7099         and Vglobal_fontset_alist.
7101         * xfaces.c (merge_lisp_face_vector_with_property): Simplified.
7102         (realize_default_face): If frame parameters contain an artificial
7103         font name naming a fontset, set the family of the default face to
7104         the fontset name given by the registry.
7106         * Makefile.in (alloc.o): Add dependency to dispextern.h.
7108 1998-03-22  Gerd Moellmann  <gerd@gnu.org>
7110         * alloc.c (mark_object): Add function prototype.  Add cast to
7111         Lisp_Object pointer in call to mark_object for symbol names
7112         because this otherwise gives a warning from gcc 2.8.1.
7113         (mark_face_cache): Mark Lisp objects in realized faces.
7115 1998-03-19  Gerd Moellmann  <gerd@gnu.org>
7117         * frame.h (struct frame): Add member face_cache.
7119         * alloc.c (mark_object): Mark face cache.
7120         (mark_face_cache): Mark Lisp faces in face cache of frame.
7122         * frame.c (make_frame): Initialize face_cache.
7123         (Fdelete_frame): Free it.
7125 1998-03-18  Gerd Moellmann  <gerd@gnu.org>
7127         * xfaces.c: Very first skeleton of functions for face realization,
7128         face merging, face cache etc.
7130         * dispextern.h (struct rface): Realized faces.  Will replace
7131         struct face when tested.
7132         (struct face_cache): Realized face caches.
7134         * xdisp.c (init_iterator): Initialize area member of display
7135         iterator.
7137 1998-03-17  Gerd Moellmann  <gerd@gnu.org>
7139         * xterm.c (x_append_glyph): Use it->area to store glyphs.
7141         * dispextern.h (struct display_iterator): New member area.
7143         * xterm.c (note_overwritten_text_cursor): Note when the text
7144         cursor of a window is overwritten.
7146         * xdisp.c (set_cursor_from_row): If PT is not found in the
7147         row, display the cursor at the start of the row.
7149         * dispnew.c (direct_output_forward_char): Call
7150         set_cursor_from_row.
7152         * xdisp.c (setup_iterator_overlay_strings_from_glyph_pos): If
7153         position is not in an overlay string, set iterator's position and
7154         method explicitly so.
7155         (set_cursor_from_row): Correct cursor position calculation. 
7156         Make it externally visible.
7157         (redisplay_window): Call set_cursor_from_row so that there is only
7158         one place where the cursor position is calculated from a current
7159         row.
7161         * dispextern.h (struct display_iterator): New member
7162         overlay_strings_at_end_processed_p.
7164         * xdisp.c (check_iterator): Perform sanity checks on
7165         display_iterators.
7166         (next_element_from_buffer): Check for overlay strings at ZV.
7168 1998-03-16  Gerd Moellmann  <gerd@gnu.org>
7170         * buffer.c (init_buffer_once): Add left_margin_width and
7171         right_margin_width to buffer_local_flags.
7173         * dispnew.c (margin_glyphs_to_reserve): Function computing
7174         number of glyphs to reserve for a marginal area.
7175         (adjust_glyph_matrix): Call it.
7176         (adjust_frame_glyphs_for_frame_redisplay): Return if frame
7177         is not alive.
7179         * window.c (Fset_window_margins): Allow floats.
7181         * buffer.c (syms_of_buffer): Add buffer-local variables
7182         left-margin-width and right-margin-width.  Add defaults
7183         default-left-margin-width and default-right-margin-width.
7185         * buffer.h (struct buffer): New members left_margin_width
7186         and right_margin_width.
7188         * window.c (Fset_window_margins): Make window the last and
7189         optional argument.
7191         * xterm.c (x_draw_glyphs): Compute x-positions for rows with
7192         flag no_marginal_areas_p differently.
7193         (x_clear_end_of_line): Ditto.
7194         (x_draw_glyph_string_relief): Compute width of relief differently
7195         for rows with flag no_marginal_areas_p.
7197         * dispnew.c (update_window_line): Update marginal areas only
7198         for rows that don't have no_marginal_areas_p set.
7200         * xdisp.c (display_mode_line): Set row's flag no_marginal_areas_p.
7201         (display_menu_bar): Ditto.
7203         * dispextern.h (struct glyph_row): New member no_marginal_areas_p.
7205         * dispnew.c (adjust_glyph_matrix): Compute glyph pointers for
7206         marginal areas in window-based redisplay.
7208         * dispextern.h (struct glyph_matrix): New members
7209         left_margin_glyphs and right_margin_glyphs.
7211 1998-03-15  Gerd Moellmann  <gerd@gnu.org>
7213         * minibuf.c (read_minibuf_unwind): Return Lisp_Object.
7215         * charset.c (non_ascii_char_to_string): Use char type parameters
7216         because the function is used that way from outside.  Use unsigned
7217         char internally.
7219         * window.c (change_window_height): Return void.
7220         (make_dummy_parent): Return void.
7221         (init_window_once): Return void.
7222         (syms_of_window): Ditto.
7223         (keys_of_window): Ditto.
7224         (delete_window): Correct return with and without value.
7226         * buffer.c (record_buffer): Return void.
7228         * marker.c (unchain_marker): Return void.
7230         * window.c (unshow_buffer): Return void.
7231         (replace_window): Ditto.
7232         (delete_window): Ditto.
7234         * term.c (delete_glyphs_hook): Void return type.
7235         (ring_bell_hook): Ditto.
7236         (set_terminal_window_hook): Ditto.
7238         * sysdep.c (init_sigio): Return void.
7240         * xterm.c (x_set_window_size): Return void.
7241         (x_calc_absolute_position): Ditto.
7242         (x_set_offset): Ditto.
7243         (x_focus_on_frame): Ditto.
7244         (x_unfocus_frame): Ditto.
7245         (x_make_frame_visible): Ditto.
7246         (x_make_frame_invisible): Ditto.
7247         (x_iconify_frame): Ditto.
7248         (x_destroy_window): Ditto.
7249         (x_wm_set_window_state): Ditto.
7250         (x_wm_set_icon_pixmap): Ditto.
7251         (x_wm_set_icon_position): Ditto.
7252         (x_initialize): Ditto.
7253         (x_error_quitter): Ditto.
7254         (x_destroy_window): Use xfree instead of free.
7256         * keyboard.c (clear_waiting_for_input): Return void.
7258         * xterm.c (x_wm_set_size_hint): Return void.
7259         (x_raise_frame): Ditto.
7260         (refreshicon): Ditto.
7261         (x_error_catcher): Ditto.
7262         (x_clear_errors): Ditto.
7264         * keyboard.c (record_asynch_buffer_change): Return void.
7266         * xterm.c (XTroï\0ðoï\0ðÃâ\0ðoï\0ðoï\0ðTÿ\0ðLá\0ðoï\0ðterminal_window): Ditto.
7267         (x_lower_frame): Ditto.
7268         (x_scroll_bar_clear): Ditto.
7269         (XTflash): Add default case in switch for -Wall.
7270         (construct_mouse_click): Return Qnil.
7271         (cancel_mouse_face): Return void.
7272         (x_queue_event): Use xmalloc instead of malloc.
7273         (x_unqueue_events): Use xfree instead of free.
7275         * ccl.c (ccl_driver): Return int.
7277         * keyboard.c (stop_polling): Return void.
7278         (start_polling): Ditto.
7280         * term.c (keys): Add braces in initializer list for -Wall.
7282         * sysdep.c (tabs_safe_p): Return int.
7283         (init_baud_rate): Return void.
7285         * xterm.c (x_draw_bitmap): Add default case.
7286         (x_setup_relief_colors): Use DefaultScreen instead of
7287         DefaultScreenOfDisplay.
7288         (x_delete_glyphs): Return void.
7289         (construct_menu_click): Put in #if 0 because it isn't called.
7291         * xdisp.c (load_overlay_strings): Remove extraneous argument
7292         in call to qsort.
7293         (get_overlay_arrow_glyph_row): Add missing return value.
7295         * window.c (set_window_height): Return void.
7296         (set_window_width): Ditto.
7298         * sysdep.c (request_sigio): Return void.
7299         (unrequest_sigio): Ditto.
7300         (get_frame_size): Ditto.
7302         * scroll.c (scroll_cost): Return int.
7303         (do_line_insertion_deletion_costs): Return void.
7305         * frame.c (Fdelete_frame): Use xfree instead of free.
7307         * fileio.c (report_file_error): Return void.
7309         * dispnew.c: Make compilable with -Wall.
7310         * term.c: Ditto.
7312         * charset.h (CHAR_LEN): Moved here from dispextern.h.
7314 1998-03-14  Gerd Moellmann  <gerd@gnu.org>
7316         * xterm.c (x_scroll_bar_move): Clear under scroll bar if height is
7317         increased.
7318         (x_setup_relief_color): Free color only for appropriate visual
7319         classes.
7321         * xterm.c (expose_window): Fix calculation of intersection of mode
7322         line rectangle with exposed rectangle.
7324         * xdisp.c (redisplay_window): Don't do cursor movement based
7325         on current matrix if w->last_point is not valid.
7327 1998-03-09  Gerd Moellmann  <gerd@gnu.org>
7329         * xterm.c (expose_line): Redraw mode line and menu lines
7330         differently because they reach into the scroll bar area.
7332         * xdisp.c (redisplay_window): If redisplaying with same window
7333         start, don't accept cursor on partially visible line.
7335 1998-03-08  Gerd Moellmann  <gerd@gnu.org>
7337         * xterm.c (x_set_glyph_string_clipping): Set clip rectangle
7338         for wider mode lines.
7339         (x_draw_glyph_string_relief): Use larger rectangle for mode lines.
7341         * xdisp.c (init_iterator): Increase last_visible_x by vertical
7342         scroll bar width for mode lines.
7344         * dispnew.c (allocate_matrices_for_window_redisplay): Include
7345         vertical scroll bar width in width calculation so that we can
7346         display mode lines wider.
7348         * xdisp.c (redisplay_window): Restore buffers before returning
7349         when fonts have changed.
7351         * dispnew.c (update_window): Mark invisible rows in the current
7352         matrix invalid.
7354         * xdisp.c (try_window_id): Force update of first row displayed
7355         at window end.
7356         (dump_glyph_matrix): Extracted from Fdump_glyph_matrix.
7358 1998-03-05  Gerd Moellmann  <gerd@gnu.org>
7360         * dispextern.h (struct glyph_row): Member max_ascent renamed
7361         ascent.  Member max_descent replaced by height.
7362         (struct display_iterator): Member max_descent replaced by height.
7363         (MATRIX_ROW_PIXEL_HEIGHT): Removed.
7365         * xterm.c (x_alloc_lighter_color): Don't free colors if visual
7366         class makes it unnecessary or dangerous.
7368         * xdisp.c (redisplay_window): Case only point has changed, and
7369         point has moved forward.  Move forward over overlay strings.
7370         (display_line): Don't set cursor if first glyph from PT is part of
7371         a continuation line.
7373 1998-02-21  Gerd Moellmann  <gerd@gnu.org>
7375         * xdisp.c (start_display): When computing continuation lines
7376         width, add current_x to the continuation lines width because
7377         move_iterator_to will stop in front of the buffer position moved
7378         to.
7380 1998-02-20  Gerd Moellmann  <gerd@gnu.org>
7382         * xdisp.c (redisplay_window): Don't try try_window_id if
7383         windows_or_buffers_changed.
7385         * xterm.c (x_alloc_lighter_color): Try both factor and delta to
7386         determine a color.
7387         (x_setup_relief_color): Allocate/ change one relief.
7388         (x_setup_relief_colors): Call above function.
7390         * xterm.h (struct relief): New structure type holding relief info:
7391         GCs, colors, and whether colors are allocated.
7393         * xterm.c (x_alloc_lighter_color): If multiplying by factor 
7394         produces the same color, try adding a delta to RGB values.
7395         (x_setup_relief_colors): Free color cells.
7397         * xterm.h (struct x_output): New members white_relief_pixel, 
7398         black_relief_pixel holding the foreground colors allocated for
7399         relief GCs.  New members white_allocated_p, black_allocated_p.
7401         * xterm.c (x_scroll_run): Don't set updated_window to null.
7402         This resets updated_window when called from scrolling_window.
7404         * dispextern.h (scroll_run_hook): Renamed from line_dance_hook.
7405         
7406         * xterm.c (x_scroll_run): Additional window parameter.  Set
7407         and reset updated_window.
7409         * dispnew.c (line_dance_hook): Additional window parameter.
7411         * xdisp.c (try_window_reusing_current_matrix): Don't call
7412         update_window_begin/end here.  The end function would display the
7413         cursor on a wrong position and the additional functionality of
7414         update_window_begin is not needed anyway.  Just set
7415         updated_window.
7416         (try_window_id): Ditto.
7418         * dispnew.c (Fblink_cursor): Remove call to detect_input_pending.
7419         Don't redraw cursor during redisplay.
7421         * xterm.c (x_scroll_run): Renamed from do_line_dance.
7423         * xdisp.c (redisplay_window): For window-based redisplay, alway
7424         try try_window_id.
7426         * xterm.c (struct glyph_string): New member two_byte_p that is
7427         non-zero if 16-bit drawing functions must be used.
7428         (x_fill_composite_glyph_string): Set it.
7429         (x_fill_glyph_string): Set it.
7430         (x_draw_glyph_string_foreground): Use it.
7431         (x_draw_vertical_border): Make line 1 pixel less tall.
7432         (x_draw_row_bitmaps): Decrease width of area cleared on the left
7433         side by 1 pixel if window is not right-most hasn't vertical scroll
7434         bars.
7435         (x_draw_phys_cursor_glyph): Do nothing if phys_cursor.hpos is
7436         out of bounds.
7437         (x_draw_glyph_string_foreground): Use XDrawImageStringX if
7438         hl == DRAW_CURSOR.
7440         * xdisp.c (start_display): Check that window start is at line
7441         start if GLYPH_DEBUG != 0.
7443         * window.c (window_scroll_pixel_based): Move assertion to
7444         start_display.
7446 1998-02-19  Gerd Moellmann  <gerd@gnu.org>
7448         * xterm.c (x_redraw_cursor): Don't redraw the cursor if the 
7449         frame hasn't the focus.
7451         * window.c (make_window): Initialize dy.
7452         (replace_window): Ditto.
7454         * window.h (window): New member dy specifying the amount by which
7455         a window is scrolled "smoothly".
7457         * xterm.c (x_set_glyph_string_clipping): Don't use glyph string's
7458         y-position because it can be negative. 
7459         (x_draw_row_bitmaps): Don't clear with negative y-position like
7460         above.
7461         (x_clear_end_of_line): Same theme as above.
7463         * xterm.c (x_alloc_nearest_color): Allocate a color or, if no
7464         exact match exists, the nearest existing color.  Patterned after
7465         defined_color.
7466         (x_alloc_lighter_color): Allocate a color that is lighter or
7467         darker than a given color by a specified factor.
7468         (x_setup_relief_colors): Set up relief line colors based on 
7469         the background color of a glyph string face.
7470         (x_draw_glyph_string_relief): Call x_setup_relief_colors.
7472         * xfns.c (x_make_gc): Don't allocate relief GCs.
7473         * widget.c (create_frame_gcs): Don't allocate relief GCs.
7474         (setup_frame_gcs): Don't change relief GCs.
7476         * xterm.h (struct x_output): New member relief_background giving
7477         the background pixel color for which relief GCs can be used.
7478         Set by x_setup_relief_colors.
7480         * xterm.c (x_draw_glyph_string_relief): Draw relief differently
7481         for mode and menu lines.
7483         * xdisp.c (set_next_iterator_stop_pos): No longer static.
7485         * dispnew.c (direct_output_for_insert): Call
7486         set_next_iterator_stop_pos after having changed it2.endpos.
7488 1998-02-17  Gerd Moellmann  <gerd@gnu.org>
7490         * dispnew.c (update_window): Work on selected_window, only.
7492         * xterm.c (x_erase_phys_cursor): Return quickly if physical cursor
7493         hpos is >= number of glyphs in the cursor row.
7495         * xdisp.c (try_window_id): Bug fix; update_window_end was not
7496         called.
7498 1998-02-16  Gerd Moellmann  <gerd@gnu.org>
7500         * xdisp.c (init_iterator): Increase last_visible_x for mode lines
7501         and menu lines.
7503         * dispnew.c (allocate_matrices_for_window_redisplay): Allocate
7504         enough glyphs to display a mode line or menu line which draws over
7505         flags areas.
7507         * xterm.c (XTset_vertical_scroll_bar): Use
7508         WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT instead of
7509         VERTICAL_SCROLL_BAR_PIXEL_HEIGHT.
7510         (x_draw_glyphs): Draw over flags areas when drawing a mode line 
7511         or menu.
7512         (x_set_glyph_string_clipping): Set clipping differently if drawing
7513         a mode line or menu line.
7515         * xterm.h (VERTICAL_SCROLL_BAR_PIXEL_HEIGHT): Removed.
7517         * xterm.c (expose_line): Don't draw bitmaps for mode lines and
7518         menu lines.
7519         (x_scroll_bar_create): Don't clear flags areas.
7520         (x_draw_row_bitmaps): Clear visible row height, only.
7522         * dispnew.c (Fblink_cursor): Moved here from xdisp.c.
7524 1998-02-15  Gerd Moellmann  <gerd@gnu.org>
7526         * dispnew.c (direct_output_for_insert): When checking for tabs in
7527         the line, set it2.endpos to ZV.
7528         
7529         * window.h (struct window): New member cursor_off_p.
7530         * xterm.c (x_redraw_cursor): Implementation of redraw_cursor_hook
7531         for X.
7532         * dispnew.c (redraw_cursor_hook): If non-null, function that can
7533         be called to display or erase the cursor.
7534         * xdisp.c (Fblink_cursor): Blink the cursor of a specified window
7535         or selected_window.
7537         * xterm.h (text_cursor_kinds): Enumerators changed to uppercase.
7539         * dispnew.c (update_window_line): Special handling of inverse
7540         lines in #if 0 removed.
7542         * xterm.c (x_write_glyphs): Renamed from XTwrite_glyphs.
7543         (x_insert_glyphs): Renamed from XTinsert_glyphs.
7544         (x_clear_frame): Renamed from XTclear_frame.
7545         (x_clear_end_of_line): Renamed from XTclear_end_of_line.
7546         (x_ins_del_lines): Renamed from XTins_del_lines.
7547         (x_change_line_height): Renamed from XTchange_line_height.
7548         (x_delete_glyphs): Renamed from XTdelete_glyphs.
7549         (x_clear_cursor): Renamed from clear_cursor.
7550         (x_update_begin): Renamed from XTupdate_begin.
7551         (x_update_end): Renamed from XTupdate_end.
7552         (x_update_window_begin): Renamed from XTupdate_window_begin.
7553         (x_update_window_end): Renamed from XTupdate_window_end.
7554         (x_frame_mode_line_height): Renamed from XTframe_mode_line_height.
7555         (x_produce_glyphs): Renamed from XTproduce_glyphs.
7556         (x_produce_special_glyphs): Renamed from XTproduce_special_glyphs.
7557         (x_produce_special_glyphs): Implementation in #if 0 removed.
7559         * xdisp.c (Fdump_redisplay_state): Display row's fill_line_p
7560         flag in the dump.
7562         * dispnew.c (update_text_area): Handling of glyphs with pixel
7563         width zero removed.  Decrement desired stop pos if desired row
7564         fills its line.
7566         * xterm.c (x_fill_glyph_string): Handling of glyphs with pixel
7567         width zero removed.
7568         (BUILD_GLYPH_STRINGS): Set glyph string flag
7569         extends_to_end_of_line_p based on row's flag fill_line_p and face
7570         background and stipple.  Make sure it works for composite characters.
7572         * xdisp.c (extend_face_to_end_of_line): Set the glyph row flag
7573         fill_line_p.  For window-based redisplay, add a space only if
7574         the row is empty so that we know the face to draw.
7576         * dispextern.h (struct glyph_row): New flag fill_line_p.  Non-zero
7577         means draw the face of the last glyph in the text area to the
7578         right end of the text area.
7580         * xdisp.c (init_iterator): Show region in window mini-buffer
7581         window refers to.
7583         * dispextern.h (struct display_iterator): Redundant member 
7584         region_showing_p removed.  Test for region_beg > 0 instead.
7586         * dispnew.c (update_text_area): Clear to end of line if cursor is
7587         beyond the end of the desired line.  Necessary because we don't
7588         have a phys_cursor_glyph with which to erase the cursor.  We don't
7589         have one because this method of drawing a cursor doesn't work with
7590         lbearing/rbearing.
7592         * xterm.c (XTinsert_glyphs): Block input.
7594 1998-02-14  Gerd Moellmann  <gerd@gnu.org>
7596         * xterm.c (x_set_cursor_gc): Don't use cursor_gc for composite
7597         glyph strings.
7598         (x_draw_glyph_string_background): Fill background with background
7599         pixel for the first glyph of a composite character.
7601         * xdisp.c (try_window): Change return type to int.  Value is zero
7602         if fonts were loaded during redisplay.
7603         (redisplay_window): Return if fonts have been loaded during
7604         redisplay.
7605         (append_space): New parameter default_face_p.
7607 1998-02-13  Gerd Moellmann  <gerd@gnu.org>
7609         * dispnew.c (adjust_glyph_matrix): In case of optimizing C-x 2,
7610         don't let a partially visible line in a current matrix stay
7611         enabled.
7613 1998-02-09  Gerd Moellmann  <gerd@gnu.org>
7615         * minibuf.c (read_minibuf): Put access to minibuffer_prompt_length
7616         in #if PROMPT_IN_BUFFER.
7618         * xdisp.c (display_line): If row ends in ZV, make the space
7619         that is added to place the cursor on it appear in default face.
7621         * xterm.c (expose_area): New function redrawing a single 
7622         glyph row area.
7623         (expose_line): Use it to redraw all areas of a row.
7625         * dispextern.h (move_operation_enum): New enum
7626         move_operation_enum.
7628         * window.c (window_scroll_pixel_based): Remove now unnecessary
7629         code that made sure that it->current_y doesn't become negative.
7631         * xdisp.c (move_iterator_in_display_line_to): New parameter
7632         op.  Special meaning of to_pos <= 0 and to_x < 0 removed.
7633         (move_iterator_to): Ditto.
7635         * dispextern.h (struct glyph_matrix): New member window_width.
7637         * dispnew.c (adjust_glyph_matrix): Set window_width.  Optimize
7638         case of changing window height.
7640         * xterm.c (x_draw_row_bitmaps): Don't clear vertical window
7641         border to the left. 
7643         * dispextern.h (struct glyph_row): Remove right_to_left_p.  RMS
7644         says this aspect of Emacs is currently redesigned.
7646         * xterm.c (x_clip_to_row): Subtract 1 from clip width if we
7647         have to draw a vertical border.
7649         * window.c (window_scroll_pixel_based): When scrolling down by
7650         screen-fulls, make sure it.current_y doesn't get negative because
7651         this would confuse move_iterator_vertically.
7653         * xdisp.c (move_iterator_vertically_backward): Bug fix for
7654         the case continuation lines are involved.
7655         (try_window_id): Don't set the cursor into scroll margins.
7657 1998-02-08  Gerd Moellmann  <gerd@gnu.org>
7659         * xterm.c (x_append_glyph): Don't compute left_overhang and
7660         right_overhang.
7661         (XTproduce_glyphs): left_overhang and right_overhang removed.
7662         Set it->glyph_row->contains_overlapping_glyphs_p.
7664         * xdisp.c (Fdump_redisplay_state): Output of glyph->left_overhang
7665         and right_overhang removed.
7667         * dispextern.h (struct glyph_row): New member
7668         contains_overlapping_glyphs_p used to optimize glyph drawing.
7669         (struct display_iterator): left_overhang and right_overhang
7670         removed.
7671         (struct glyph): Ditto.
7673         * xterm.c (x_draw_relief): Removed.
7674         (x_draw_bitmap): Renamed from draw_bitmap.
7675         (x_draw_glyphs): Completely new implementation of draw_glyphs
7676         capable of handling arbitrary lbearing and rbearing values.
7677         Several sub-functions not mentioned here.
7679 1998-01-30  Gerd Moellmann  <gerd@gnu.org>
7681         * xterm.c (x_erase_phys_cursor): Clear area under the cursor only
7682         if displaying hollow box cursor.  draw_glyphs should handle 
7683         other cases.
7684         (draw_glyphs): Move start to the left and end to the right if they
7685         overlap with previous or following characters.  
7686         (draw_glyphs): If background is cleared for hl == DRAW_CURSOR,
7687         make sure XDrawString uses function GXset.  Otherwise the 
7688         character under the cursor would be invisible.
7689         (x_draw_bar_cursor): Don't draw over previous character if it
7690         has right_overhang.
7692         * window.c (get_phys_cursor_glyph): Return the glyph under a
7693         window's physical cursor.
7694         
7695         * xterm.c (x_draw_hollow_cursor): Use get_phys_cursor_glyph.
7696         (x_draw_bar_cursor): Ditto.
7697         (x_erase_phys_cursor): Ditto.
7698         (x_phys_cursor_in_rect_p): Ditto.
7699         (x_display_and_set_cursor): Remove reference to w->phys_cursor_glyph.
7701         * window.c (make_window): Remove reference to phys_cursor_glyph.
7702         (replace_window): Ditto.
7704         * window.h (struct window): Remove phys_cursor_glyph.  There is
7705         now always a glyph present for placing the cursor on it in 
7706         each glyph row, even at the end of a line.
7708         * xdisp.c (append_space): Function to add a space to an iterators
7709         glyph row.
7710         (display_line): Add spaces at the end of lines that are used to
7711         place the cursor on them.
7712         (compute_line_metrics): If row consists of a space only that was
7713         added to place the cursor on it, use that space's height as the 
7714         line height.
7716 1998-01-29  Gerd Moellmann  <gerd@gnu.org>
7718         * xdisp.c (Fdump_redisplay_state): Dump left and right overhang of
7719         glyphs.
7721 1998-01-28  Gerd Moellmann  <gerd@gnu.org>
7723         * xterm.c (x_append_glyph): Set overhang of glyph from iterator.
7724         (XTproduce_glyphs): Set it->left_overhang and it->right_overhang.
7726         * dispextern.h (struct glyph): Add left_overhang and
7727         right_overhang.  
7728         (struct display_iterator): Ditto.
7730         * dispnew.c (direct_output_for_insert): Give up if newly inserted
7731         glyphs have different ascent or descent than original row.
7733         * xdisp.c (compute_line_metrics): Compute row->max_ascent and
7734         row->max_descent only if unknown.
7735         (display_line): Compute row->max_ascent and row->max_descent.
7736         (display_string): Ditto.
7738         * window.h (struct window): New members phys_cursor_ascent and
7739         phys_cursor_descent.  
7741         * xterm.c (x_phys_cursor_in_rect_p): Use them.
7742         (x_draw_hollow_cursor): Ditto.
7743         (x_erase_phys_cursor): Ditto.
7744         (x_display_and_set_cursor): Set them.
7745         (x_append_glyph): Don't set glyph members that were removed.
7747         * dispextern.h (struct glyph): Members ascent, descent,
7748         contributes_to_line_height_p removed.
7750 1998-01-25  Gerd Moellmann  <gerd@gnu.org>
7752         * dispextern.h (DEFAULT_FACE_ID, MODE_LINE_FACE_ID): Symbolic
7753         names for face ids of frame default face and mode line face.
7755         * xdisp.c (compute_face_at_iterator_string_position): If
7756         displaying a mode line use MODE_LINE_FACE_ID instead of
7757         DEFAULT_FACE_ID.
7759         * xdisp.c (reseat_iterator_to_string): Additional parameter start.
7760         (display_string): Ditto, additional parameter lisp_string.
7761         (display_line): Call display_string with Lisp mini-buffer prompt
7762         string.
7763         (display_menu_bar): Call display_string with Lisp string.
7764         (display_mode_element): Ditto.
7765         (next_element_from_string): Make it work for non-overlay Lisp
7766         strings with field width and precision.
7768         * minibuf.c (minibuffer-prompt-in-buffer): Bound if
7769         PROMPT_IN_BUFFER.
7771         * xfaces.c (compute_string_char_face): Fix face computation
7772         for overlay strings.
7774         * xdisp.c (struct overlay_entry): Add member after_string_p.
7775         (load_overlay_strings): Simplify.
7777         * window.c (delete_window): Defer glyph matrix adjustment.
7778         (Fsplit_window): Ditto.
7779         (change_window_height): Ditto.
7780         (Fset_window_configuration): Ditto.
7781         (Fset_window_margins): Ditto.
7782         * frame.c (set_menu_bar_lines): Ditto.
7783         (Fmake_terminal_frame): Ditto.
7784         * dispnew.c (change_frame_size_1): Ditto.
7786 1998-01-24  Gerd Moellmann  <gerd@gnu.org>
7788         * xdisp.c (move_iterator_vertically_backward): Change algorithm.
7790         * dispnew.c (direct_output_for_insert): Give up if start 
7791         position has overlay strings.
7793         * xdisp.c (display_line): Don't set cursor if row ends in middle
7794         of overlay string.
7795         (Fdump_redisplay_state): Print complete row start and end
7796         position.
7797         (redisplay_window): Cursor movement when matrix hasn't changed---
7798         if PT < last_point, maybe move forward if row ends at PT and
7799         in middle of char.
7801         * minibuf.c (read_minibuf): Save the value of
7802         minibuffer_prompt_length in minibuf_save_list.
7803         (read_minibuf_unwind): Restore minibuffer_prompt_length.
7805         * xdisp.c (redisplay_window): Add assertion for cursor movement
7806         case, PT < last_point.
7807         (move_iterator_in_display_line_to): If to_pos specified, move
7808         over before-strings.
7810         * dispextern.h (MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P): Test
7811         start.string_index > 0.
7813         * xdisp.c (redisplay_internal): Adjust glyphs if fonts_changed_p
7814         is set.  Retry redisplay if fonts_changed_p is set before update.
7816         * xterm.c (x_load_font): Set fonts_changed_p.
7818         * xfaces.c (Fset_face_attribute_internal): Set fonts_changed_p.
7820         * dispnew.c (adjust_glyphs_for_font_change): Removed.
7822         * xdisp.c (try_window): Check fonts_changed_p.
7823         (try_window_reusing_current_matrix): Ditto.
7824         (try_window_id): Ditto.
7826         * dispnew.c (adjust_glyphs_for_font_change): Set fonts_changed_p.
7827         (fonts_changed_p): Flag indicating a font change since the last
7828         glyph matrix adjustment.
7830         * xterm.c (x_per_char_metric): Use font->max_bounds as
7831         char metric of the font's default char if the default char
7832         hasn't per char metric itself.
7834         * xfaces.c (Fset_face_attribute_internal): Adjust glyphs
7835         for font change.
7836         (min_char_bounds): Check face->font != NULL.
7837         (font_min_bounds): Return minimum font metrics.  Capture the 
7838         case of invalid min_bounds contents.
7839         (min_char_bounds): Call font_min_bounds.
7841 1998-01-22  Gerd Moellmann  <gerd@gnu.org>
7843         * xdisp.c (start_display): Don't set it->prompt_width if
7844         PROMPT_IN_BUFFER.
7845         (move_iterator_in_display_line_to): Ditto.
7846         (display_line): Don't display prompt via display_string if
7847         PROMPT_IN_BUFFER.
7849         * minibuf.c (Fminibuffer_prompt_width): Return value from
7850         current_buffer if PROMPT_IN_BUFFER.
7851         (read_minibuf): If PROMPT_IN_BUFFER, insert prompt into 
7852         mini-buffer and make it read-only.
7853         (Fminibuffer_complete_and_exit): If PROMPT_IN_BUFFER, use
7854         minibuffer_prompt_length instead of BEGV.
7855         (Fminibuffer_complete_word): Ditto.
7856         (Fminibuffer_complete_word): Ditto.
7858         * insdel.c (del_range_1): If PROMPT_IN_BUFFER, and start position
7859         is less than mini-buffer prompt width, use prompt width as start.
7861         * editfns.c (make_buffer_string): If PROMPT_IN_BUFFER, and start
7862         position is less than mini-buffer prompt width, use the prompt
7863         width as start.
7865         * cmds.c (Fbeginning_of_line): If PROMPT_IN_BUFFER, set point to
7866         end of prompt if applied to a mini-buffer and BEG reached.
7868 1998-01-21  Gerd Moellmann  <gerd@gnu.org>
7870         * editfns.c (make_buffer_string): If PROMPT_IN_BUFFER, add prompt
7871         length to start position.
7873         * buffer.c (Fget_buffer_create): Initialize
7874         minibuffer_prompt_length.
7875         (Fmake_indirect_buffer): Ditto.
7876         (Fkill_buffer): Ditto.
7878         * buffer.h (struct buffer): Add member minibuffer_prompt_length
7879         if PROMPT_IN_BUFFER.
7881 1998-01-19  Gerd Moellmann  <gerd@gnu.org>
7883         * xdisp.c (next_element_from_string): Make it work for arbitrary
7884         Lisp strings.
7885         (set_iterator_to_next): Advance to next overlay string only
7886         if it->string is an overlay string.
7888         * dispextern.h (struct display_iterator):
7889         next_ovstr_face_check_pos renamed next_string_face_check_pos.
7891         * xfaces.c (compute_string_char_face): Compute face for 
7892         arbitrary Lisp string.  Renamed from compute_overlay_string_char_face.
7894         * xdisp.c (next_element_from_string): Renamed from
7895         next_element_from_overlay_string.
7896         (compute_face_at_iterator_string_position): Renamed from 
7897         compute_face_at_iterator_overlay_string_position.
7899         * dispextern.h (struct display_iterator): Member overlay_string
7900         renamed string.
7902         * xdisp.c (next_element_from_c_string): Renamed from
7903         next_element_from_string.
7905         * dispextern.h (struct glyph_pos): Reversed meaning of
7906         overlay_string_index and string_index.
7908         * xdisp.c (next_element_from_overlay_string): Fix bug that made
7909         this function always return the first character of an overlay
7910         string.
7912 1998-01-18  Gerd Moellmann  <gerd@gnu.org>
7914         * xdisp.c (reseat_iterator): Set next_invisible_check_pos only if
7915         forced or new pos > next_invisible_check_pos.
7916         (redisplay_window): Don't try same window start if PT < window
7917         start.
7918         (move_iterator_vertically): Bug fix satisfying post-condition
7919         when ZV is reached and no newline in front.
7920         (move_iterator_vertically_backward): New implementation.
7921         (move_iterator_vertically_backward): Bug fixes.
7923         * xterm.c (XTmouse_position): Change call to min_char_bounds.
7924         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Ditto.
7925         (adjust_glyphs_for_font_change): Always adjust.
7927         * dispnew.c (struct dim): Use int.
7929         * xfaces.c (Fset_face_attribute_internal): Set face->font_name;
7930         (allocate_face): Initialize it.
7931         (load_font): Use XLoadQueryFont again instead of x_load_font.
7932         (unload_font): Use XFreeFont again.
7933         (min_char_bounds): Iterate over fonts of faces.  Use frame's
7934         font sizes as default.  Remove parameter except_last_font_p.
7936         * dispextern.h (struct face): Add font_name.
7938 1998-01-17  Gerd Moellmann  <gerd@gnu.org>
7940         * xdisp.c (move_iterator_vertically): Check post-condition.  Move
7941         to start of line if ending at ZV and no newline in front.
7942         (move_iterator_to): If to_y specified, always first move to x = 0,
7943         so that move stops at line start instead of line end.  This is
7944         probably what callers would expect to happen.
7946         * window.c (window_scroll_pixel_based): Pixel-based scrolling that
7947         can handle different line heights.
7948         (window_scroll_line_based): Formerly window_scroll.
7949         (window_scroll): Call both.
7951         * xdisp.c (start_display): Exclude code if PROMPT_IN_BUFFER.
7952         (move_iterator_in_display_line_to): Ditto.
7953         (display_line): Ditto.
7955         * minibuf.c (read_minibuf): Conditionally insert prompt into
7956         buffer instead of handling prompts specially.  Change other
7957         functions accordingly.  All such code is in #if PROMPT_IN_BUFFER.
7959         * dispnew.c (adjust_glyph_matrix): Optimize the handling of C-x 2,
7960         upper window.  Optimize calls to xrealloc if same width.
7962         * xdisp.c (redisplay_window): Don't use
7963         try_window_reusing_current_matrix if window scroll functions
7964         exist.
7966         * dispextern.h (struct display_iterator): Member
7967         redisplay_end_trigger_p removed.
7969         * dispextern.h (WINDOW_DISPLAY_PIXEL_HEIGHT_WITHOUT_MODE_LINE):
7970         Renamed to WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
7972 1998-01-16  Gerd Moellmann  <gerd@gnu.org>
7974         * xdisp.c (move_iterator_by_lines): Optimize for truncate-lines
7975         nil.  Optimize truncate-lines t and moving backward.
7976         (move_iterator_to_previous_visible_line_start): Contains the heart
7977         of the previous set_iterator_to_previous_visible_line_end.  Don't
7978         reseat the iterator.  Used by move_iterator_by_lines.
7979         (set_iterator_to_previous_visible_line_start): Call function
7980         above.
7981         (move_iterator_in_display_line_to): Check TO_POS before doing
7982         anything else.  Otherwise to_pos == PT would move to x of PT+1.
7984         * indent.c (Fvertical_motion): Use display_iterator.
7986         * xdisp.c (move_iterator_by_lines): New function moving by screen
7987         lines.
7988         (redisplay_window): Use it.
7989         (move_iterator_to): Correct branch of to_vpos specified.
7990         (move_iterator_vertically_backward): Increment nlines after having
7991         backed up over some lines because the last line was not backed up
7992         over.
7993         (move_iterator_via_matrix): Look for it->pos in the matrix, and
7994         calculate it->vpos and it->current_y relative to this row.
7995         (move_iterator_via_matrix): Set in #if 0.  It doesn't seem to 
7996         have a big effect and it is complex.
7997         (move_iterator_to): Call to move_iterator_via_matrix in #if 0.
7999 1998-01-15  Gerd Moellmann  <gerd@gnu.org>
8001         * xterm.c (x_draw_relief): Simplify drawing and draw so that lines
8002         join nicely.  Lines with widths > 2 don't join nicely under X.
8003         * xterm.h (struct x_output): Remove member relief_gc_line_width.
8004         * widget.c (setup_frame_gcs): Initialize relief GC's to line
8005         width 1; remove references to relief_gc_line_width.
8006         * xfns.c (x_make_gc): Ditto.
8008         * xfaces.c (Fset_face_attribute_internal): Set frame garbaged
8009         if relief changes.
8010         (Fset_face_attribute_internal): Use XINT instead of XFASTINT
8011         to get a relief because they can be negative.
8013         * xterm.c (x_draw_relief): Correct line drawing positions.  Pixel
8014         positions are for the middle of lines under X.
8016         * xdisp.c (try_window_id): Always search for the cursor by setting
8017         w->cursor.vpos = -1.  Search in unchanged rows at the top and
8018         bottom if cursor not found in displayed lines.
8019         (display_mode_line): First extend face, then set right shadow 
8020         flag.  Otherwise the wrong glyph gets the right shadow.
8022         * dispnew.c (direct_output_for_insert): Give up if line contains
8023         a tab.  The number of spaces inserted for a tab changes if we
8024         insert glyphs in front of it.
8026         * xterm.c (x_list_fonts): Changes undone because the Lisp
8027         implementation for make-face-smaller, make-face-larger, and
8028         make-face-fixed can do without them.
8030         * xfns.c (Fx_list_fonts): Original x-list-fonts from x-list-font.c
8031         inserted.
8033         * xdisp.c (try_window_id): First compute beg_unchanged, then
8034         compare with window start pos.
8036         * xfns.c (Fx_face_fixed_p): Determine whether a face has a
8037         fixed-width font.
8038         (syms_of_xfns): defsubr for x-face-fixed-p.
8040         * xterm.c (x_erase_phys_cursor): If row containing cursor is not
8041         enabled, don't do anything because this row will be newly drawn
8042         anyway and because we can additionally no longer determine the row
8043         height.
8045         * xdisp.c (display_line): Bug fix cursor positioning.
8047         * xfns.c (x-list-fonts): Copied from x-list-fonts.c; #include
8048         removed.  x-list-fonts.c is now obsolete.
8049         (Qfixed, Qvariable): Moved here from xfaces.c.
8051 1998-01-14  Gerd Moellmann  <gerd@gnu.org>
8053         * xdisp.c (display_line): Set row->ends_at_zv_p based on
8054         FETCH_BYTE for truncated lines.
8055         (display_line): Set cursor differently.
8056         (display_line): Fixed bug setting last_pos_on_this_line wrong
8057         for truncated lines.
8059         * dispnew.c (adjust_glyph_matrix): Always adjust for frame-based
8060         redisplay.
8062         * window.c (Fsplit_window): Adjust glyphs before setting buffer.
8064         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Add
8065         assertion that character dimensions are not zero.
8067         * xterm.c (x_load_font): adjust_glyphs_for_font_change while
8068         input is blocked.
8070         * xdisp.c (decode_mode_spec): Faster implementation of line number
8071         display.
8073         * xterm.c (x_draw_row_bitmaps): Clear flags area before drawing
8074         bitmaps if bitmaps don't fill the entire area.
8075         (draw_bitmap): Draw bitmaps horizontally centered in flags area.
8077         * xterm.h (FRAME_FLAGS_BITMAP_HEIGHT): Macro giving the 
8078         pixel height of flags bitmaps.
8080         * frame.h (FRAME_FLAGS_AREA_COLS): Use FRAME_X_FLAGS_AREA_COLS.
8081         (FRAME_FLAGS_AREA_WIDTH): Ditto.
8083         * xterm.h (FRAME_FLAGS_BITMAP_WIDTH): Macro giving the width
8084         in pixels of a flags area of a frame.
8085         (FRAME_X_FLAGS_AREA_WIDTH): Removed.
8086         (FRAME_X_FLAGS_AREA_COLS): Macro giving the number of columns
8087         occupied by a flags area.
8089 1998-01-13  Gerd Moellmann  <gerd@gnu.org>
8091         * xdisp.c (hscroll_window_tree): Remove test for non-nil
8092         window_end_valid.
8094         * dispnew.c (adjust_glyph_matrix): Check redisplay_p if
8095         GLYPH_DEBUG != 0.
8097         * xdisp.c (display_line): Correct wrong calculation of row->x for
8098         the case of nglyphs == 1.
8099         (hscroll_window_tree): Renamed from hscroll_windows.
8100         (hscroll_windows): New function calling hscroll_window_tree that
8101         clears desired matrices on a frame when hscroll has been changed.
8102         (redisplay_p): Global flag set during redisplay.
8103         (redisplay_internal): Set and clear redisplay_p.
8105         * xfaces.c (min_char_bounds): Add assertion that width and height
8106         are not zero at the end.  Initialize *height and *width to -1,
8107         instead of using BITS_PER_SHORT.  If font has min_bounds.width
8108         zero, use its max_bounds.width.
8110         * x-list-font.c (Fx_list_fonts): Check INTEGERP or FLOATP for
8111         width and height.
8113 1998-01-12  Gerd Moellmann  <gerd@acm.org>
8115         * dispnew.c (adjust_glyph_matrix): Do nothing if sizes haven't
8116         changed.  Don't clear desired matrices.
8118         * xdisp.c (hscroll_windows): Compute pt after setting
8119         current_buffer.
8120         (redisplay_window): Don't do cursor movement based on current
8121         matrix if just_this_one_p is zero.
8123         * x-list-font.c (Fx_list_fonts): Additional parameter fixed.
8124         specifying that fixed-width, variable-width fonts or both 
8125         should be returned.
8127         * xfaces.c (Qfixed, Qvariable): Symbols for use by x-list-fonts.
8128         (syms_of_xfaces): Initialize them.
8130         * xterm.c (x_list_fonts): Include auto-scaled fonts.  Extend
8131         cached information.
8133 1998-01-11  Gerd Moellmann  <gerd@acm.org>
8135         * xdisp.c (display_mode_line): Extend face to end of line.
8137         * xdisp.c (echo_area_display): Don't call display_string with
8138         echo_area_glyphs_length == 0 which would mean infinite precision.
8139         (redisplay_internal): Adjust window_end_vpos if necessary.
8141 1998-01-07  Gerd Moellmann  <gerd@acm.org>
8143         * xdisp.c (display_line): Set it->ends_at_zv_p differently.
8145 1998-01-05  Gerd Moellmann  <gerd@acm.org>
8147         * xdisp.c (get_row_start_continuation_line_width): Removed.
8148         (init_iterator_to_row_start): Set it.current_x from row.
8149         (try_window_id): Set it.continuation_lines_width directly from
8150         row.
8152         * xdisp.c (hscroll_windows): Use w->pointm if window is not
8153         selected_window.
8154         (hscroll_windows): Center cursor in window.
8155         (hscroll_windows): Call move_iterator_in_display_line_to.
8157 1998-01-04  Gerd Moellmann  <gerd@acm.org>
8159         * xdisp.c (hscroll_windows): Check hscroll < 0.
8160         (redisplay_window): Allow quick cursor movement if overlay arrow
8161         but frame uses window-based redisplay.
8162         (display_line): Take special case for nglyphs == 1 out of #if 0.
8163         (display_line): Set row->ends_at_zv_p after the loop displaying
8164         glyphs because ZV can be in truncated text.
8165         (hscroll_windows): Use init_iterator_to_row_start.
8167         * dispnew.c (scrolling_window): Calculation of overlapping
8168         runs fixed.
8169         (row_equal_p): Compare continued_p and continuation_line_p.
8171 1998-01-02  Gerd Moellmann  <gerd@acm.org>
8173         * xterm.c (x_get_mode_line_face_gc): Renamed from
8174         x_get_modeline_face_gc.
8176         * xdisp.c (TEXT_PROP_DISTANCE_LIMIT): Max. distance from current
8177         buffer position to look for text properties.
8178         (get_face_from_cursor_pos): Use it.
8179         (compute_face_at_iterator_position): Use it.
8180         (next_element_from_buffer): Use it.
8182         * dispnew.c (scrolling_window): Decrement run's y-position
8183         when extending it backwards.
8185         * xterm.c (do_line_dance): Don't ever copy more than window height.
8187 1998-01-01  Gerd Moellmann  <gerd@acm.org>
8189         * xdisp.c (redisplay_window): Cursor motion in unchanged
8190         matrix---use MATRIX_ROW_.*_IN_MIDDLE_OF_CHAR_P.
8191         (init_iterator_to_next_row_start): Special handling of lines
8192         ending in middle of char removed.
8193         (hscroll_windows): Hscroll windows only if window_end_valid is not
8194         nil.
8195         (try_window_reusing_current_matrix): Call hscroll_windows.
8196         (init_iterator_to_row_start): Initialize iterator for display
8197         starting at a position given by a glyph_row->start.
8198         (redisplay_window): Don't use vmotion because it gives wrong
8199         results if lines are continued and variable width fonts are used.
8201         * dispextern.h (struct glyph_pos): New member dpvec_index.  
8202         (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P): Test if row ends in the
8203         the middle of a character.
8204         (MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P): Test if row starts in 
8205         the middle of a character.
8207         * xdisp.c (set_iterator_to_next): Increment it->dpvec_index, reset
8208         it.
8209         (next_element_from_display_vector): Use it->dpvec_index.
8210         (reseat_iterator): Reset it.
8211         (init_iterator): Reset it.
8212         (setup_iterator_dpvec_from_glyph_pos): Set up it->dpvec and
8213         it->pos.dpvec_index from a glyph_pos structure.
8214         (init_iterator_from_glyph_pos): Call the function above.
8215         (reseat_iterator_to_glyph_pos): Ditto.
8217         * dispnew.c (direct_output_forward_char): Don't use this method at
8218         overlay boundaries or near invisible text.
8219         (direct_output_forward_char): Step through glyph row to find
8220         cursor position.
8222         * xterm.c (x_get_cursor_gc): Don't return cursor_gc for font == 
8223         frame font if line height differs from font height.
8225         * xdisp.c (set_iterator_to_next): Renamed from
8226         move_iterator_forward to avoid confusion with other move_.*
8227         functions.
8229         * dispextern.h (FACE_RELIEF_P): Renamed from FACE_3D_P.
8231 1997-12-31  Gerd Moellmann  <gerd@acm.org>
8233         * xterm.c (x_get_cursor_gc): Renamed from x_cursor_gc to use the
8234         same naming convention as for other GC functions.
8235         (draw_glyphs): Don't fill background when drawing a cursor and
8236         font height is less than line height.
8238 1997-12-30  Gerd Moellmann  <gerd@acm.org>
8240         * xdisp.c (init_display_iterator.*): Renamed to shorter names
8241         init_iterator_.*.
8243         * xdisp.c (move_iterator_forward): Restore it->len from
8244         it->dpvec_char_len if dpend reached.
8245         (get_next_display_element): Don't consume translated char
8246         prematurely.
8247         (display_line): Don't set this_.* variables if row is continued.
8248         (start_display): Move to start of continuation line if ending
8249         up at end of continued line.
8251         * dispextern.h (struct display_iterator): New member dpvec_char_len.
8253         * xdisp.c (move_iterator_in_display_line_to): Check TO_POS after
8254         checking TO_X and continuation lines.
8255         (get_last_unchanged_at_beg_row): If first_changed_pos is the end
8256         of a continued line, don't consider this line as unchanged because
8257         it may no longer be continued.
8259 1997-12-29  Gerd Moellmann  <gerd@acm.org>
8261         * xdisp.c (try_window_id): Catch the case that moving over
8262         continuation lines moves first_unchanged_at_end_row to a row not
8263         displaying text.
8265         * dispextern.h (struct glyph_row): New member
8266         continuation_lines_width.  Member continuation_line_p removed.
8267         (MATRIX_ROW_CONTINUATION_LINE_P): Non-zero if row displays a 
8268         continuation line.
8269         * xdisp.c (display_line): Set row->continuation_lines_width.
8270         (get_row_start_continuation_line_width): Set continuation lines
8271         width of iterator from continuation lines width of glyph row.
8272         (get_row_start_continuation_line_width): Make it inline.
8273         (set_window_cursor): Make it inline.
8274         (try_window_id): Use MATRIX_ROW_CONTINUATION_LINE_P.
8275         (Fdump_redisplay_state): Ditto.
8276         
8277         * dispnew.c (update_window_line): Use MATRIX_ROW_CONTINUATION_LINE_P.
8278         * xterm.c (x_draw_row_bitmaps): Use MATRIX_ROW_CONTINUATION_LINE_P.
8280         * xdisp.c (try_window_id): Set it.hpos and it.current_x to zero
8281         after determining the continuation lines width for
8282         last_unchanged_at_beg_row.
8284         * xterm.c (x_draw_row_bitmaps): Let overlay arrow have precedence.
8286         * xdisp.c (display_mode_line): Handle 3D faces only on frames
8287         which support faces.
8288         (init_display_iterator): Ditto.
8289         (move_iterator_via_matrix): Skip over truncation glyph at the row
8290         start on terminal frames.
8291         (hscroll_windows): Choose hscroll margin differently for window
8292         system and terminal frames.
8294 1997-12-28  Gerd Moellmann  <gerd@acm.org>
8296         * xdisp.c (hscroll_windows): Change hscroll of windows.
8297         (redisplay_internal): Call it.
8299         * dispnew.c (direct_output_for_insert): Give up if a glyph 
8300         doesn't fit completely on the line.
8301         (direct_output_forward_char): Give up for non-ASCII chars.
8302         (direct_output_forward_char): Set redisplay_performed_directly_p.
8304         * dispextern.h (struct display_iterator): Make first_visible_x
8305         and last_visible_x ints; this is for very long truncated lines.
8307         * xdisp.c (move_iterator_in_display_line_to): Separate check for
8308         MOVE_X_REACHED only if it->nglyphs == 0.  This fixes cursor
8309         positioning problems with the mouse.
8310         (move_iterator_in_display_line_to): Truncate lines if it->current_x
8311         >= it->last_visible_x instead of >.
8312         (display_line): Ditto.
8314         * xterm.c (draw_glyphs): Draw rectangles if font could not be
8315         loaded.
8316         (XTproduce_glyphs): Calculate pixel_width for composite chars and
8317         non-ASCII chars differently.  Always produce 1 glyph for composite
8318         chars.  If font not found, use CHARSET_WIDTH to calculate width of
8319         non-ASCII chars.
8320         (x_get_char_font_and_encoding): Return null if font could not be
8321         loaded.  Reset font to null if fontset could not be loaded.
8322         (draw_glyphs): Fill background if font not found.
8323         (draw_glyphs): Unused parameter just_foreground_p removed. New
8324         parameter composite_glyph.
8325         (draw_glyphs): Use enumeration for parameter hl.
8326         (draw_glyphs): Pass a display area relative x-position to 
8327         draw_glyphs when calling it recursively for composite chars.
8329 1997-12-27  Gerd Moellmann  <gerd@acm.org>
8331         * xterm.c: Patches from handa.etl.go.jp integrated.
8332         (draw_glyphs): Don't rely on x_get_char_font_and_encoding to
8333         find a font_info.
8335         * xdisp.c (move_iterator_in_display_line_to): Check to_x
8336         for nglyphs == 1.
8338         * xterm.c (x_draw_relief): Draw relief lines.
8339         (draw_glyphs): Call x_draw_relief.
8341 1997-12-26  Gerd Moellmann  <gerd@acm.org>
8343         * xfns.c (x_make_gc): Create relief GC's.
8345         * widget.c (create_frame_gcs): Create GC's for relief drawing.
8346         (setup_frame_gcs): Initialize them.
8347         (EmacsFrameDestroy): Free them.
8349         * xdisp.c (try_window_id): Get continuation lines width if 
8350         last_unchanged_at_beg_row is continued or a continuation line.
8351         (move_iterator_via_matrix): Don't do it for mini-buffer windows.
8352         (redisplay_window): Case point has changed, and it has not 
8353         moved off the frame.  Don't increment row if PT equals the row
8354         end if the row ends in ZV.
8356         * xterm.c (x_draw_row_bitmaps): New function to draw bitmaps.
8357         (expose_line): Call it.
8358         (x_after_update_window_line): Call it.
8360         * xdisp.c (display_line): Reset continuation_lines_width when ZV
8361         reached.
8363         * xterm.c (x_after_update_window_line): Draw continuation line
8364         bitmap.
8366         * dispnew.c (update_window_line): Call
8367         after_update_window_line_hook when row's continuation_line_p
8368         changes.
8370         * xterm.c (draw_bitmap): Draw new bitmap CONTINUATION_LINE_BITMAP.
8372         * xdisp.c (display_line): Handle continued lines on window system
8373         frames differently since continuation glyphs are not displayed.
8374         (move_iterator_in_display_line_to): Ditto.
8375         (move_iterator_in_display_line_to): Take the mini-buffer prompt
8376         into account.
8377         (move_iterator_vertically_backward): Handle dy == 0 specially.
8378         (redisplay_window): Catch the case of small windows when
8379         recentering where moving back window_height/2 moves us beyond the
8380         top of the display area of the window.
8382 1997-12-18  Gerd Moellmann  <gerd@acm.org>
8384         * xdisp.c (move_iterator_vertically_backward): Unused parameter
8385         dvpos removed.
8387 1997-12-17  Gerd Moellmann  <gerd@acm.org>
8389         * dispnew.c (direct_output_forward_char): Correct new cursor
8390         x-position.
8392 1997-12-16  Gerd Moellmann  <gerd@acm.org>
8394         * xterm.c (x_after_update_window_line): Remove unused parameters.
8395         (XTclear_end_of_line): Clear to display_height instead of
8396         display_height - 1.
8398         * dispnew.c (set_frame_matrix_frame): Make it INLINE.
8399         (update_window_line): Call after_update_window_line_hook if 
8400         rows have different y-positions, or different height.
8402 1997-12-14  Gerd Moellmann  <gerd@acm.org>
8404         * frame.h (FRAME_MODE_LINE_PIXEL_HEIGHT): Removed.
8406         * window.c (coordinates_in_window): Call frame_mode_line_height.
8408         * xterm.c (x_draw_3d_border): Removed.
8409         (x_draw_row_borders): Removed.
8411         * dispnew.c (update_window): References to
8412         FRAME_MODE_LINE_BORDER_WIDTH removed.
8414         * xterm.h (FRAME_MODE_LINE_BORDER_WIDTH): Removed.
8415         (FRAME_MODE_LINE_HEIGHT): Removed.
8417         * xterm.c (draw_3d_borders_p): Removed.
8418         (draw_glyphs): Ditto.
8419         (XTwrite_glyphs): Ditto.
8420         (expose_line): Ditto.
8421         (x_initialize): Ditto.
8423         * dispextern.h (WINDOW_DISPLAY_MODE_LINE_HEIGHT): Call
8424         frame_mode_line_height.
8426         * term.c (frame_mode_line_height): Get the pixel height of a
8427         frame's mode line.
8428         (frame_mode_line_height_hook): Hook to implement system dependent
8429         versions.  
8430         
8431         * xterm.c (x_initialize): Set the hook.
8432         (XTframe_mode_line_height): X version of frame_mode_line_height.
8434         * xdisp.c (echo_area_display): Call gobble_input to flush the X
8435         output buffer.
8436         (display_string): Don't add right truncation mark if line ends in
8437         padding space.
8438         (init_display_iterator): If called with modeline_p non-zero, set
8439         face_id to 1, which is the id of the mode line face.
8441         * keyboard.c (cmd_error_internal): Write to stderr if selected
8442         frame is Vterminal_frame under X.  This is the case when a font
8443         cannot be loaded when Emacs starts.  Replace test for
8444         FRAME_MESSAGE_BUF with test for glyphs_initialized_p.
8446         * xfaces.c (compute_overlay_string_char_face): Compute the
8447         face of a character in an overlay string.
8448         * xterm.h (compute_overlay_string_char_face): Prototype.
8449         * xdisp.c (compute_face_at_iterator_overlay_string_position): 
8450         Use it.
8452         * xdisp.c (set_iterator_to_next_overlay_string): Formerly
8453         set_iterator_to_next_overlay.
8454         (struct overlay_entry): Structure used to sort overlay strings.
8455         (compare_overlay_entries): Compare overlay strings.
8456         (load_iterator_with_overlay_strings): Load a chunk of overlay
8457         strings.
8458         (get_overlay_strings_at_iterator_position): Call it.
8459         (next_element_from_overlay_string): Set it->object to the overlay
8460         string.  Prepare for setting it->position to a string position.
8461         (get_overlay_strings_at_iterator_position): Renamed from
8462         get_overlays_at_iterator_position.
8463         (setup_iterator_overlay_strings_from_glyph_pos): Changed to load
8464         chunks of overlay strings.
8465         (load_overlay_strings): Renamed from load_iterator_overlay_strings.
8467         * dispextern.h (struct display_iterator): New vector
8468         overlay_strings and new member n_overlay_strings---formerly
8469         overlays and n_overlays.  
8470         (struct glyph_pos): Remove after_string_p; overlay_index 
8471         renamed to string_index.
8473 1997-12-13  Gerd Moellmann  <gerd@acm.org>
8475         * xdisp.c (copy_iterator): Increment n_iterator_overlay_vectors
8476         when allocating a vector.
8477         (release_iterator): Removed.
8478         (restore_iterator): Removed.
8479         (copy_iterator): Removed.
8481 1997-12-08  Gerd Moellmann  <gerd@acm.org>
8483         * xdisp.c (redisplay_window): Use make_empty_enabled_row for
8484         clearing a mini-buffer window that is not active.
8485         (redisplay_window): Do not scroll one line too early when last
8486         window line is completely visible.
8487         (init_display_iterator): Leave some room to display the cursor
8488         after the last glyph on a continued line.
8490         * xterm.h (struct x_output): trunc_area_extra renamed
8491         flags_areas_extra.
8492         (FRAME_X_FLAGS_AREA_WIDTH): Renamed from FRAME_X_TRUNC_WIDTH.
8494         * dispnew.c (update_window_line): Call
8495         after_update_window_line_hook when current row is not enabled
8496         which is the case after a frame has been cleared.
8498         * xdisp.c (display_mode_line): Reset row flags for truncation
8499         on right side for the mode line.
8501         * xterm.c (bitmap_type): Type of bitmap to display in flags
8502         area of frame.
8503         (x_after_update_window_line): Use the enum.
8504         (draw_bitmap): Ditto.
8506 1997-12-07  Gerd Moellmann  <gerd@acm.org>
8508         * xterm.c (x_clip_to_row): Include width of both flag areas.
8509         (do_line_dance): Ditto.
8510         (expose_window_tree): Ditto.
8511         * dispnew.c (update_window_line): Call
8512         after_update_window_line_hook for right truncation and continuation.
8513         * xdisp.c (init_display_iterator): Don't subtract width of
8514         continuation glyphs for window-based redisplay.
8515         * xterm.c (draw_bitmap): Draw continuation bitmap.
8516         * widget.c (set_frame_size): Double trunc_area_extra.
8517         (EmacsFrameSetCharSize): Ditto.
8518         * xfns.c (x_figure_window_size): Ditto.
8519         * xterm.c (x_set_window_size): Ditto.
8520         (x_after_update_window_line): Draw right truncation mark.
8522         * xterm.c (draw_glyphs): Bug fix buffer overrun.
8524         * window.h: Include blocker around dispextern.h removed.
8526         * eval.c (Feval): Check interrupt_input_block == 0.
8527         
8528         * dispextern.h (struct display_iterator): Former ovstr made a
8529         Lisp_Object overlay_string.  New next_ovstr_face_check_pos and
8530         next_ovstr_invisble_check_pos; check at these positions for
8531         face changes and changes in invisible text property.
8532         (struct glyph_pos): Former ovlen now overlay_string_index.
8534         * xdisp.c (setup_iterator_overlays_from_glyph_pos): Set
8535         overlay_string.
8536         (set_iterator_to_next_overlay_string): Set overlay_string and
8537         pos.overlay_string_index.
8538         (get_overlays_at_iterator_position): Use overlay_string and
8539         overlay_string_index.
8540         (next_element_from_overlay_string): Use overlay_string and
8541         overlay_string_index.
8542         (move_iterator_forward): Increment overlay_string_index.
8543         (try_window_id): Use overlay_string and overlay_string_index.
8544         (move_iterator_forward): At end of dpvec, maybe use method
8545         next_element_from_overlay_string for the case a character from an
8546         overlay string was translated via a display table.
8547         (reseat_iterator_to_string): Take a Lisp string.
8548         (display_string): Pass a Lisp string to reseat_iterator_to_string.
8549         (compute_face_at_iterator_overlay_string_position): Compute face
8550         based on text properties for an overlay string.
8551         (next_element_from_overlay_string): Check invisible and face text
8552         properties.
8553         (set_iterator_to_next_overlay_string): Restore face id before
8554         overlay strings when no more overlay strings are found to return.
8555         Initialize next_ovstr_.*check_pos for each new overlay string
8556         roï\0ðoï\0ðÃâ\0ðoï\0ðoï\0ðTÿ\0ðLá\0ðoï\0ðase_face): Made public.
8557         (merge_face_list): Ditto.
8558         (intern_computed_face): Ditto.
8560         * xdisp.c (redisplay_window): Cursor movement in unchanged 
8561         window if PT > w->last_point.  Goto try_to_scroll if bottom Y
8562         of row is > instead of >= last_y.
8564         * buffer.h (overlays_at): Function prototype.
8566         * xdisp.c (reseat_iterator_to_string): Clear iterator position.
8567         * dispextern.h (GET_NEXT_DISPLAY_ELEMENT): Removed.
8569         * xdisp.c (release_iterator): Release dynamically allocated 
8570         memory of a display_iterator.
8571         (copy_iterator): Copy an iterator.
8572         (restore_iterator): Restore an iterator from a backup copy.
8573         (global): Use the functions above.
8574         * window.c (Fpos_visible_in_window_p): Call release_iterator.
8575         * dispnew.c (direct_output_for_insert): Call release_iterator.
8577         * dispextern.h (struct display_iterator): Allocate overlays
8578         vector dynamically.
8580 1997-12-06  Gerd Moellmann  <gerd@acm.org>
8582         * Makefile.in (window.o): Depends on dispextern.h.
8584         * buffer.c (overlays_at): Make it work when extending vectors
8585         and an initial vector of zero size.
8587         * xdisp.c (set_iterator_to_previous_visible_line_end): Renamed
8588         from set_cursor_to_previous_visible_line_end.
8589         (set_iterator_to_next_visible_line_start): Renamed from
8590         set_cursor_to_next_visible_line_end.
8591         (set_next_iterator_stop_pos): Renamed from set_next_stop_pos.
8592         (compute_face_at_iterator_position): Renamed from
8593         compute_cursor_face.
8594         (set_iterator_to_next_overlay_string): Renamed from
8595         cursor_to_next_overlay_string.
8596         (get_overlays_at_iterator_position): Renamed from
8597         get_overlays_for_cursor.
8598         (reseat_iterator): Renamed from reseat_cursor.
8599         (setup_iterator_overlays_from_glyph_pos): Renamed from
8600         setup_overlays_from_pos.
8601         (init_string_iterator): Renamed from init_string_cursor.
8602         (get_next_display_element): Renamed from next_display_element.
8603         (move_iterator_forward): Renamed from advance_display_cursor.
8604         (get_overlays_at_iterator_position): Allocate overlays vector 
8605         dynamically.
8607         * xdisp.c: display_cursor renamed display_iterator.
8608         * dispextern.h: Ditto.
8609         * dispnew.c: Ditto.
8611 1997-12-01  Gerd Moellmann  <gerd@acm.org>
8613         * window.c (mark_window_cursors_off): Function comment added.
8614         (window_topmost_p, window_rightmost_p): Removed because not used.
8616 1997-11-30  Gerd Moellmann  <gerd@acm.org>
8618         * emacs.c (main): Function prototypes removed in profiling code.
8619         Use safe_bcopy as start of text.
8621         * dispnew.c (update_frame_line): update_line -> update_frame_line;
8622         mirrored_make_current -> make_current.
8624         * xdisp.c: (store_frame_title_char): New function to store a
8625         single character for the frame title with re-allocation of
8626         frame_title_buf.
8627         (init_xdisp): Intialize frame_title_.* variables to null.
8629         * dispnew.c (quit_error_check): Removed.
8631         * eval.c (Fsignal): Call to quit_error_check removed.
8632         * keyboard.c (quit_throw_to_read_char): Ditto.
8634 1997-11-23  Gerd Moellmann  <gerd@acm.org>
8636         * xfaces.c (Fset_face_attribute_internal): Allow nil relief
8637         to mean a zero relief.
8639         * .gdbinit (xprintsym): Print a symbol.
8640         (xbacktrace): Print a backtrace of Lisp function calls from
8641         backtrace_list.
8643 1997-11-19  Gerd Moellmann  <gerd@acm.org>
8645         * dispnew.c (new_glyph_matrix): Increment glyph_matrix_count
8646         unconditionally.
8647         (glyph_matrix_count, glyph_pool_count): Define unconditionally.
8648         (free_glyph_matrix): Decrement glyph_matrix_count unconditionally.
8649         (check_glyph_memory): Define function body unconditionally.
8651 1997-11-17  Gerd Moellmann  <gerd@acm.org>
8653         * dispnew.c (scrolling_window): Alternative version of this
8654         function removed.
8656 1997-11-16  Gerd Moellmann  <gerd@acm.org>
8658         * dispnew.c (make_empty_enabled_row): Make an empty, enabled row
8659         of height CANON_Y_UNIT.
8660         * dispextern.h: Prototype for that function.
8661         * xdisp.c (echo_area_display): Don't use display_string to 
8662         produce empty rows.  Use make_empty_enabled_row instead.
8664         * dispnew.c (scrolling_window): New version using diff-like
8665         algorithm activated.
8666         
8667 1997-11-15  Gerd Moellmann  <gerd@acm.org>
8669         * dispnew.c (clear_current_matrices): Clear matrix of menu_bar_window
8670         (clear_desired_matrices): Ditto.
8671         (adjust_frame_glyphs_for_window_redisplay): Use FRAME_WINDOW_WIDTH
8672         for menu_bar_window.
8674         * alloc.c (mark_object): Mark menu_bar_window of frames.
8676         * xterm.c (XTupdate_window_end): Don't display cursor if
8677         pseudo_window_p.
8679         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Don't
8680         set mini_p.
8681         (update_window): Don't set cursor if pseudo_window_p.
8683         * dispextern.h (WINDOW_WANTS_MODELINE_P): Test pseudo_window_p.
8685         * window.h (struct window): New flag pseudo_window_p set to
8686         1 for windows that aren't really part of the window tree, like
8687         menu_bar_window's of frames.
8688         * window.c (make_window): Initialize it.
8689         (replace_window): Ditto.
8690         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Ditto.
8692         * frame.c (make_frame): Initialize menu_bar_window to nil.
8694         * xterm.c (XTget_display_info): FACE_SHADOW_THICKNESS renamed
8695         FACE_RELIEF
8697         * xfaces.c (copy_face): shadow_thickness -> relief.
8698         (face_eql): Ditto.
8699         (merge_faces): Ditto.
8700         (compute_base_face): Ditto.
8701         (Fset_face_attribute_internal): Ditto.
8702         * dispextern.h (struct face): Ditto.
8704         * dispnew.c (update_frame): Update menu_bar_window of the frame if
8705         it is non-nil.
8707         * xdisp.c (display_menu_bar): Display the menu bar in
8708         f->menu_bar_window if appropriate.
8709         (display_mode_line): Use MATRIX_MODE_LINE_ROW.
8711         * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Allocate
8712         dummy window and window matrices for f->menu_bar_window.
8713         (free_glyphs): Free the dummy window and its glyph matrices.
8715         * frame.h (struct frame): New member menu_bar_window.
8717 1997-11-09  Gerd Moellmann  <gerd@acm.org>
8719         * dispnew.c (scrolling_window): New version with diff-like
8720         algorithm.
8722         * xdisp.c (try_window_reusing_current_matrix): If new_start >
8723         old_start always start displaying at start of
8724         first_row_to_display.  The previous scheme failed if the last row
8725         was fully visible.
8727         * dispnew.c (update_window): Remove cost calculations.  Remove
8728         redundant preempt_count calculations.
8730         * xterm.c (x_clip_to_row): Set clipping for non-text rows
8731         differently.
8733         * dispnew.c (update_window): Use WINDOW_WANTS_MODELINE_P.
8735         * window.c (syms_of_window): Functions for marginal areas if 
8736         WITH_MARGINAL_AREAS is defined.
8738         * xdisp.c (try_window_reusing_current_matrix): Trace fprintf 
8739         removed.
8741         * dispnew.c (scrolling): Call line_hash_code because hash values
8742         are not set in the frame matrix.
8744         * xdisp.c (try_window_id): Fix scrolling for terminal frames.
8745         (redisplay_window): Check line_ins_del_ok before calling
8746         try_window_id.
8747         (try_window_reusing_current_matrix): Give up for terminal frames
8748         if window is not full width or we cannot insert/delete lines.
8749         (try_window_reusing_current_matrix): Fixed scrolling for terminal
8750         frames.
8752         * alloc.c (mark_glyph_matrix): Bug fix - pass pointer to
8753         Lisp_Object to mark_object.
8755         * xdisp.c (sync_frame_with_window_matrix_rows): Make frame and
8756         window rows have the same glyph pointers.
8757         (try_window_id): Call it.
8759         * alloc.c (mark_glyph_matrix): Function to mark Lisp objects in
8760         a glyph matrix.
8761         (mark_object): Call it.
8763         * xdisp.c (insert_left_trunc_glyphs): Use 0 object in glyphs for
8764         truncations.
8765         (display_line): Ditto.
8766         (display_line): Ditto for DISP_CONTINUATION.
8767         (display_line): Truncation on right: test current_x >
8768         last_visible_x.
8769         (skip_in_display_line_to): Ditto.
8770         (skip_via_matrix): Stop skipping in glyph row at face extending
8771         glyphs or at padding spaces.
8773         * dispnew.c (fill_up_glyph_row_with_spaces): Comment extended.
8775         * xdisp.c (display_line): Use glyph->object == 0 for padding
8776         glyphs.
8777         (redisplay_window): Don't let cursor move over padding
8778         spaces.
8780         * dispextern.h (struct glyph): Fix comment for object.
8782 1997-11-08  Gerd Moellmann  <gerd@acm.org>
8784         * dispextern.h (WINDOW_WANTS_MODELINE_P): Non-zero if a window
8785         has a mode line.
8786         * xdisp.c (redisplay_window): Use it.
8787         (display_mode_line): Check that window wants mode line.
8789 1997-11-03  Gerd Moellmann  <gerd@acm.org>
8791         * xdisp.c (display_menu_bar): Enable menu bar rows.
8793         * xterm.c (x_draw_hollow_cursor): X positions based on text area.
8794         (x_erase_phys_cursor): Ditto.
8795         (x_draw_bar_cursor): Ditto.
8797 1997-11-02  Gerd Moellmann  <gerd@acm.org>
8799         * dispnew.c (update_marginal_area): Update a marginal area.
8800         (update_text_area): Update text area.
8801         (update_window_line): Call both.
8803         * xterm.c (XTclear_end_of_line): Translate coordinates area
8804         dependent.
8806         * dispnew.c (updated_area): Row area being updated in
8807         update_window_line.
8808         (update_window_line): Set it.
8809         (update_marginal_area): Clear to end of line if not in text area.
8811         * window.c (Fset_window_margins): Increment
8812         windows_or_buffer_changed.  Adjust glyphs.
8814         * dispextern.h (WINDOW_TEXT_TO_FRAME_PIXEL_X): Convert text
8815         area X coordinates to frame coordinates.
8816         (WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH): Width of left marginal area. 
8817         (WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH): Same for right area.
8818         (WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH): Same for text area.
8820         * xterm.c (draw_glyphs): Use text area width as display width.
8822         * xdisp.c (init_display_info): Subtract widths of marginal areas
8823         from last_visible_x.
8825         * alloc.c (mark_object): Mark objects in glyphs only if they are
8826         overlays.  Mark only if current_matrix != 0.  Activate the code.
8828         * window.c (Fset_window_margins): Set margins.
8829         (Fwindow_margins): Return margin area widths.
8830         (syms_of_window): Add defsubr's.
8832         * window.h (struct window): left_margin_width, right_margin_width.
8834         * xfns.c (x_set_trunc_area_width): Set truncation pixel width
8835         and cols.
8837         * frame.h (FRAME_TRUNC_COLS): Number of columns occupied by
8838         truncation/overlay arrow area.
8839         (struct frame): trunc_area_pixel_width, and _cols.
8841         * window.c (Fsplit_window): Use it.
8843         * window.c (Fsplit_window): Set cursor vpos to -1 after
8844         splitting.
8845         (Fsplit_window): SUbtract/add FRAME_TRUNC_WIDTH for horizontally
8846         split windows.
8848         * dispnew.c (set_window_cursor_after_update): Accept out
8849         of bounds cursor positions. 
8851         * xdisp.c (redisplay_internal): Check that after cursor motion
8852         within line, PT is on same line.
8854         * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH): Don't subtract
8855         FRAME_TRUNC_WIDTH.
8857         * xterm.h (struct x_output): trunc_area_extra.
8858         (CHAR_TO_PIXEL_WIDTH): Add in trunc_area_extra.
8859         (PIXEL_TO_CHAR_WIDTH): Subtract it.
8860         * widget.c (set_frame_size): Set it.
8861         (EmacsFrameSetCharSize): Ditto.
8862         * xfns.c (x_figure_window_size): Ditto.
8863         * xterm.c (x_set_window_size): Ditto.
8865         * dispnew.c (check_matrix_invariants): First try to check window
8866         ends (in #if 0).
8868         * xdisp.c (try_window_reusing_current_matrix): Try window
8869         redisplay with different window start.
8871 1997-11-01  Gerd Moellmann  <gerd@acm.org>
8873         * window.c (make_window): Set window_end_pos/vpos.
8874         (Fsplit_window): Zero last_cursor, window_end_valid.
8875         (Fset_window_buffer): Set window_end_vpos, zero last_cursor.
8877         * dispnew.c (check_matrix_invariants): Check window_end_pos/vpos.
8879 1997-10-31  Gerd Moellmann  <gerd@acm.org>
8881         * window.c (make_window): Initialize last_cursor.
8882         (replace_window): Ditto.
8884 1997-10-29  Gerd Moellmann  <gerd@acm.org>
8886         * window.h: New member last_cursor.
8887         * dispnew.c (direct_output_for_insert): Set it.
8888         (direct_output_forward_char): Ditto.
8889         * xdisp.c (redisplay_internal): Ditto.
8891 1997-10-28  Gerd Moellmann  <gerd@acm.org>
8893         * xdisp.c (redisplay_internal): Optimization 1 change partially
8894         reverted.  Check this again later.
8895         (skip_via_matrix): Remove redundent test for
8896         MATRIX_ROW_DISPLAYS_TEXT_P. 
8898 1997-10-27  Gerd Moellmann  <gerd@acm.org>
8900         * dispnew.c (update_window_line): Call
8901         after_update_window_line_hook only for interesting constellations.
8902         (free_glyph_matrix): Fix memory leak.
8904         * window.h: Include blocker WINDOW_H_INCLUDED, include
8905         dispextern.h.
8906         (struct window): phys_cursor_glyph as struct glyph.  * window.c
8907         (make_window): Initialize it.
8908         (replace_window): Ditto.  
8909         * dispnew.c (free_window_matrices): Remove freeing of
8910         phys_cursor_glyph.
8911         (check_matrix_invariants): Renamed from check_current_matrix_...
8912         * xterm.c: All references to phys_cursor_glyph changed.
8914         * dispextern.h (DISPEXTERN_H_INCLUDED: New include blocker.
8916         * xfaces.c: Comment update.
8918         * window.h (struct window): Make phys_cursor_glyph a struct glyph
8919         pointer. Remove phys_cursor_ascent, descent, etc.
8920         * dispnew.c (free_window_matrices): Free it.
8921         * window.c (make_window): Allocate it.
8922         (replace_window): Ditto.
8923         * xterm.c (x_draw_phys_cursor_glyph): Draw it.
8924         (x_display_and_set_cursor): Fill it.
8925         (x_phys_cursor_in_rect_p): Use it.
8926         (x_draw_hollow_cursor): Ditto.
8927         (x_draw_bar_cursor): Ditto.
8928         (x_erase_phys_cursor): Ditto.
8930         * xdisp.c (skip_in_display_line_to): Use SET_INFO_FROM_CURSOR.
8932         * xterm.c (XTget_display_info): Handle 3D facess.
8933         (draw_glyphs): Ditto.
8935         * xdisp.c (Fdump_redisplay_state): Change interactive spec to "p".
8937         * xfaces.c (Fset_face_attribute_internal): New face attribute
8938         shadow-thickness.
8939         (copy_face): Handle shadow_thickness.
8940         (face_eql): Ditto.
8941         (merge_faces): Ditto.
8942         (compute_base_face): Ditto.
8944         * dispextern.h (struct display_cursor): New member start_of_3d_run_p.
8945         (struct display_info): Ditto.
8946         (SET_INFO_FROM_CURSOR): Transfer it to display_info.
8947         * xdisp.c (compute_cursor_face): Set it.
8948         (advance_display_cursor): Clear it.
8950         * xdisp.c (init_string_cursor): Initialize face_id to -1.
8951         (init_string_cursor): Init face_id to zero.
8953         * dispextern.h (struct face): New member shadow_thickness.
8955         * xdisp.c (compute_cursor_face): Set limit for text property 
8956         search to 100.
8958         * dispnew.c (update_window_line): Try to resynch with current line
8959         to prevent mode line flickering.
8961 1997-10-26  Gerd Moellmann  <gerd@acm.org>
8963         * dispnew.c (set_window_cursor_after_update): React again 
8964         on cursor_in_echo_area >= 0.
8966         * xdisp.c (echo_area_display): Clear desired matrix before
8967         displaying into it.
8968         (display_menu_bar): Clear glyph row instead of hoping it is not
8969         enabled.  This is safer.
8971         * dispnew.c (check_current_matrix_invariants): Check only
8972         visible rows.
8974         * xdisp.c (try_window_id): Handle window end setting in case of
8975         display to end of window, but only non-text lines displayed.
8977         * dispnew.c (check_current_matrix_invariants): Check nrows for zero.
8978         (check_current_matrix_invariants): Check used counts.
8980         * Revisiob v114.
8982         * dispnew.c (scrolling): Use hash codes from rows.
8984         * xdisp.c (Fdump_redisplay_state): Dump current matrix.
8986         * dispnew.c (scrolling_window): Invalidate conflicting runs.
8988 1997-10-25  Gerd Moellmann  <gerd@acm.org>
8990         * dispextern.h (struct glyph_matrix): Flag no_scrolling_p.
8991         * dispnew.c (update_window): Use it.
8992         (clear_glyph_matrix): Clear it.
8993         * xdisp.c (try_window_id): Set it.
8995         * dispextern.h (struct glyph_row): New flag ends_at_zv_p.
8997         * xdisp.c (redisplay_internal): Increment glyph positions differently.
8999         * dispextern.h: More comments etc.
9001 1997-10-24  Gerd Moellmann  <gerd@acm.org>
9003         * dispnew.c (set_window_cursor_after_update): Set cursor
9004         for cursor_in_echo_area == 0 to (0, 0).
9006         * dispextern.h (struct glyph_row): New flags continuation_line_p
9007         and displays_text_p.
9008         (MATRIX_ROW_DISPLAYS_TEXT_P): Use displays_text_p.
9009         * xdisp.c (display_line): Set them.
9010         (try_window_id): Move to start of continuation line to find out
9011         continuation_line_width.
9012         (first_unchanged_current_row): Don't retract row if continued,
9013         truncated etc.
9015         * xterm.c: Map X coordinates.
9017 1997-10-23  Gerd Moellmann  <gerd@acm.org>
9019         * dispnew.c (buffer_posn_from_coords): Translate X for right to
9020         left text.
9022         * xdisp.c (display_line): Set right_to_left_p after clearing the row.
9024         * xterm.c (XTclear_end_of_line): Respect right_to_left_p.
9026         * xdisp.c (try_window_id): clear desired matrix if not successul.
9028         * xdisp.c (try_window_id): Call update_window_begin_hook/end_hook.
9030         * dispnew.c (update_window_begin_hook, update_winodw_end_hook):
9031         Set this to functions to be called before/after window updates.
9032         (direct_output_for_insert): Call them.
9033         (update_window): Ditto.
9034         (update_frame): Call update_begin/ update_end for windows.
9036         * xterm.c (XTupdate_window_begin): Called before window updates.
9037         (XTupdate_end): Called after window updates.
9038         (x_initialize): Set hooks to above.
9040         * xdisp.c (init_display_info): Initialize c and len of
9041         display_info.
9043         * xterm.c (x_get_char_font_and_encoding): Bug fix.  Don't load
9044         fonts more than once.
9046 1997-10-22  Gerd Moellmann  <gerd@acm.org>
9048         * xdisp.c (display_line): Handle most common case of current_x <
9049         last_visible_x separately.
9051         * dispextern.h (display_element_type): DISP_ELLIPSIS removed.
9053         * dispnew.c (update_window_line): Compare pixel widths of glyphs
9054         so that face extending space doesn't compare equal to normal space
9055         with same face.
9057         * xdisp.c (display_line): Make sure we have a position for
9058         a line end in an otherwise blank line if face is extended.
9060         * dispnew.c (direct_output_for_insert): Increment row end position.
9062         * window.c (Fpos_visible_in_window_p): Use old meaning of 
9063         window_end_pos.
9065         * xdisp.c (init_display_cursor_from_glyph_pos): New.
9067         * dispextern.h (MATRIX_ROW_FIRST_POS): Use row start.
9069         * dispnew.c (increment_glyph_row_buffer_positions): Adjust
9070         start and end positions in rows.
9071         (increment_glyph_row_buffer_positions): Stop adjusting at
9072         glyphs with positions <= 0.
9074         * dispextern.h (struct glyph_pos): Structure desribing a text
9075         position including position in overlay. 
9076         (struct glyph_row): Use it for start and end positions.
9077         (struct display_cursor): Use it.
9078         * xdisp.c: Use it.
9079         (display_line): Set row start and end positions.
9081         * dispnew.c (copy_row_except_pointers): Use bcopy and struct
9082         assignment.
9084 1997-10-21  Gerd Moellmann  <gerd@acm.org>
9086         * dispnew.c (update_window): Add scrolling_window again.  It's
9087         necessary for scroll_step != 0.
9089         * xdisp.c (redisplay_window): Use vmotion for scroll_step
9090         scrolling.
9092         * xdisp.c (last_unchanged_current_row): Use window_end_vpos.
9094         * xterm.c (XTupdate_end): Flush only for messages.
9096         * xdisp.c (try_window_id): Assert last_unchanged_row >=
9097         first_unchanged_row.
9099         * xterm.c (XTupdate_end): Flush if miniwindow.
9101         * dispnew.c (matrix_row_last_pos): New function.
9102         * dispextern.h (MATRIX_ROW_LAST_POS): Call it.
9103         Large comment moved to xdisp.c. 
9105         * xdisp.c (redisplay_window): Bug fix: PT set to value > Z.
9106         (skip_via_matrix): Check window_end_valid instead of
9107         display_completed.
9109         * dispnew.c (scroll_glyph_matrix_range): Bug fix.
9110         (update_window): scrolling_window commented out.  It has negative
9111         effect most of the time.
9113         * xdisp.c (try_window_id): Correct parameters to
9114         scroll_glyph_matrix_range.
9116         * xterm.c (XTupdate_end): XFlush commented out.  
9118         * window.h: Comments for window_end_pos/vpos.
9120         * xdisp.c (skip_to): assert current_buffer is the buffer
9121         of the window in which we are skipping.
9123         * dispnew.c (update_window_line): Optimized clear_end_of_line.
9125         * xterm.c (draw_glyphs): Bug fix.  Return window relative X
9126         reached.
9128 1997-10-20  Gerd Moellmann  <gerd@acm.org>
9130         * dispextern.h (MATRIX_ROW_LAST_POS): Go back one glyph if this is
9131         a face extending glyph.
9133         * xdisp.c (try_window_id): Check if point will appear.  
9134         (set_cursor_from_row): Set cursor position from a glyph row.
9136         * dispnew.c (update_window_line): Write entire line if hash
9137         codes of lines differ.
9139         * dispextern.h (MATRIX_ROW_EXTENDS_FACE_P): Value is non-zero
9140         if glyph row has an infinite width glyph at its end.
9142         * xdisp.c (last_unchanged_current_row): Respect partially visible
9143         lines when looking for the last row displaying text.
9144         (try_window_id): Handle partially visible lines better.
9146 1997-10-19  Gerd Moellmann  <gerd@acm.org>
9148         * dispnew.c (update_window): Remove unused variable.
9149         (update_window_line): Simplified.
9151         * xterm.c (x_get_char_font_and_encoding): Handle most common
9152         case at the beginning.
9154         * xdisp.c (advance_display_cursor): Dispatch on method and
9155         order if statements by expected call frequency.  Fixed unclosed
9156         comment.
9158         * xdisp.c (try_window_id): New implementation.
9160         * dispnew.c (increment_glyph_row_buffer_positions): Capture
9161         rows displaying a line end, only.
9163 1997-10-18  Gerd Moellmann  <gerd@acm.org>
9165         * window.c (Fpos_visible_in_window_p): Remove use of window_end_vpos.
9167 1997-10-14  Gerd Moellmann  <gerd@acm.org>
9169         * xdisp.c (display_line): Mark empty lines not corresponding to
9170         text with position -1.
9172         * xterm.c (x_erase_phys_cursor): Don't bother to erase cursor if
9173         not within window matrix bounds.
9175         * dispextern.h (struct display_cursor): New member REGION_SHOWING_P.
9176         (struct display_info): NGLYPHS_TO_IGNORE removed.
9177         * xdisp.c: References to NGLYPHS_TO_IGNORE removed.
9178         * term.c: Ditto.
9179         * xterm.c: Ditto.
9181         * xdisp.c (init_display_cursor): Set it.
9182         (display_line): Use it to set W->REGION_SHOWING.
9184         * xdisp.c (skip_via_matrix): Check for overlay arrow.
9186         * region-cache.h: functino prototypes with PROTO.
9188         * dispnew.c (buffer_posn_from_coords): Use -1 as skip position.
9190         * xdisp.c (skip_via_matrix): Check for rows that don't contain
9191         a position.
9193         * xterm.c (XTmouse_position): Calculate LAST_MOUSE_GLYPH 
9194         rectangle based on minimum character bounds.
9196         * keyboard.c (make_lispy_event): mouse clicks; don't do frame
9197         glyph position calculations.
9198         (make_lispy_movement): Use buffer_posn_from_coords and window
9199         relative coordinates.
9201         * xterm.c (construct_mouse_click): Remove #if 0 case.
9203         * dispextern.h (MATRIX_ROW_BOTTOM_Y): Return bottom pixel y of
9204         given row.
9206         * xdisp.c (skip_via_matrix): Skip using current matrix if up to 
9207         date. 
9208         (skip_to): Use it.
9209         (redisplay_window): Remove code skipping using current matrix.
9211 1997-10-13  Gerd Moellmann  <gerd@acm.org>
9213         * xdisp.c (redisplay_window): Use available current matrix to
9214         skip faster when only point is moved withing the window.
9216         * intervals.c: Include stdio.h.  
9217         (find_interval): Trace to stderr to catch some nasty error
9218         that did not yet occur again with tracing.
9219         (set_point): Ditto.
9221         * dispnew.c (shift_glyph_matrix): Experimental code for handling
9222         cursor positioning on partially visible lines.
9223         (set_window_cursor_after_update): Ditto.
9225         * dispextern.h (MATRIX_ROW_PARTIALLY_VISIBLE_P): bug fix.
9227         * window.h (struct window): start_y removed.
9229         * window.c (make_window): start_y removed.
9230         (replace_window): Ditto.
9232         * xdisp.c (last_max_ascent, last_max_descent):  Ascent and 
9233         descent values of the last line processed by skip_to.
9234         (redisplay_window): Use them.
9235         (skip_to): Set them.
9237         * dispextern.h (struct display_cursor): New member METHOD.
9239         * xdisp.c: Use function member METHOD.
9241         * xdisp.c (set_next_stop_pos): Determine next position at which to
9242         check for face properties, invisible text properties, and overlays.
9243         (compute_cursor_face): Use it.
9244         (get_overlays_for_cursor): Ditto.
9245         (reseat_cursor): Ditto.
9246         (next_display_element): Ditto.
9248 Sun Aug 24 08:50:52 1997  Gerd Moellmann  <gerd@acm.org>
9250         * termhooks.h: Some hooks with prototypes.
9252         * term.c: Some hooks with function prototypes.
9253         
9254         * xdisp.c (reseat_cursor):  Additional argument force_p.  Avoid
9255         computing face if possible.
9257         * xdisp.c (next_display_element):  Use face from glyph from display
9258         table only if != 0.
9260         * emacs.c: FreeBSD headers for profiling removed.
9262         * dispnew.c (direct_output_for_insert): Don't use PT-1 for 
9263         display cursor, use DEC_POS instread. 
9265         * xfaces.c (load_font): Use x_load_font to load fonts so that
9266         all fonts are in the font table. 
9267         (unload_font): Don't XFreeFont.
9269         * dispnew.c (row_equal_p): Compare ascent, descent and visible
9270         row height.
9272         * xterm.c (draw_glyphs): Use 8-bit functions if possible.
9273         (x_erase_phys_cursor): Clear only visible part of row.
9274         (x_draw_bar_cursor): Set clipping.
9275         (x_draw_hollow_cursor): Ditto.
9276         (x_display_and_set_cursor): Remove clipping.
9277         (expose_window_tree): Take trunc border into account.
9278         (x_phys_cursor_in_rect_p): Test if phys_cursor intersects a rect.
9279         (expose_window): Use it.
9281         * xdisp.c (display_string): Catch case that we are called with
9282         current_x already beyond max_x.
9283         (global): Fix usage of FRAME_WINDOW_P <-> FRAME_WINDOW_REDISPLAY_P.
9284         (init_display_info): Subtract vertical border glyph from
9285         last_visible_x.
9287         * scroll.c (scrolling_window_1): Removed.
9289         * dispnew.c (adjust_frame_glyphs): Split into two functions,
9290         based on redisplay method used.
9291         (adjust_frame_glyphs_for_frame_redisplay): Part for frame
9292         based redisplay.
9293         (adjust_frame_glyphs_for_window_redisplay): Part for purely
9294         window based redisplay.
9296         * frame.h (FRAME_WINDOW_REDISPLAY_P): Changed to not depend
9297         on data structures.
9299         * dispnew.c (adjust_glyph_matrix): Additional parameter W.
9300         Handle own storage for purely window based redisplay.
9301         (allocate_matrices_for_frame_redisplay): Formerly part of
9302         allocate_matrices.  
9303         (allocate_matrices_for_window_redisplay): Ditto.
9305         * dispextern.h (struct glyph_matrix): window_top_y,
9306         window_height.
9308         * dispnew.c (allocate_matrices_for_window_redisplay): Detect
9309         and optimize some common cases of window changes.
9311         * emacs.c (main): Remove own profiling code because 0.95 now
9312         has it in.
9314 Fri Aug 22 18:46:43 1997  Gerd Moellmann  <gerd@acm.org>
9316         * xterm.c (XTupdate_end): Draw horizontal border at right
9317         position.
9318         (expose_window): Draw vertical border.
9319         (XTclear_end_of_line): Accept width <= 0 and height <= 0 but
9320         don't do anything.
9322         * xdisp.c (redisplay_internal): Set update_mode_line if paused
9323         for non full width windows only if not window redisplay.
9325         * dispnew.c (update_window_tree): Or paused_p return of called
9326         functions.
9328         * xterm.c (x_display_and_set_cursor): Return if hpos/vpos outside
9329         of window.
9331         * window.c (Fset_window_configuration): adjust_glyphs being
9332         called twice.
9333         (Fset_window_configuration): Set frame garbaged if not all
9334         leaf windows reused.
9336 1997-08-21  Gerd Moellmann  <gerd@acm.org>
9338         * dispnew.c (clear_glyph_matrix): Additional argument specifiying
9339         that rows should really be cleared.  Used for current matrices.
9341         * dispnew.c (scrolling_window):  Bug fix.
9342         (line_dance_hook):  Formerly line_dance_fn, take only one 
9343         parameter.
9345         * dispextern.h (struct run): Remove current_vpos.
9347         * xterm.c (do_line_dance): Only one parameter.
9349         * xdisp.c (display_line): set continued_p.
9351         * dispextern.h (struct glyph_row): New flag continued_p.
9352         Fix truncated_on_left_p and truncated_on_right_p to be bits.
9353         (struct glyph_row): 
9355 Thu Aug 21 14:37:34 1997  Gerd Moellmann  <gerd@acm.org>
9357         * xdisp.c (skip_vertically_backward): Avoid negative vpos values
9358         when calling skip_to for continued lines.
9360         * dispnew.c (change_frame_size_1): Set frame garbaged.
9362         * xterm.c (expose_window): Check enabled_p of rows.
9364         * xdisp.c (redisplay_internal): Compare line heights before and
9365         now for redisplay optimization 2 (hit).
9366         (display_line): Set this_line_pixel_height.
9368         * xterm.c (x_draw_row_borders): Use FRAME_MODE_LINE_HEIGHT height
9369         value.
9370         (x_clip_to_row): Use MATRIX_ROW_VISIBLE_HEIGHT. Simplified.
9371         (do_line_dance): Simplified and pixel corrected.
9373         * dispnew.c (scrolling_window): Simplified.
9375         * xterm.c (x_draw_3d_border): Inset rectangle by line width.
9377         * dispnew.c (update_window): Add FRAME_MODE_LINE_BORDER_WIDTH
9378         to mode line row->x.
9380 Wed Aug 20 11:23:28 1997  Gerd Moellmann  <gerd@acm.org>
9382         * xterm.c (x_get_char_font_and_encoding): Don't let fontset
9383         override font of face.
9384         (draw_glyphs): Correct return value.
9385         (XTclear_end_of_line): Compare differently with output cursor
9386         position.
9387         (x_draw_hollow_cursor): 2 parameters, window and row.
9389         * dispnew.c (update_window_line): If rows have different height
9390         or y, write entire line.
9392         * xdisp.c (compute_line_metrics): reset max_ascent and max_descent
9393         of info struct.
9395         * xfaces.c (Fset_face_attribute_internal): Don't call 
9396         frame_update_line_height.
9397         (merge_faces): Don't use default font if new font has different
9398         size.
9400 Tue Aug 19 14:38:05 1997  Gerd Moellmann  <gerd@acm.org>
9402         * xterm.c (x_display_and_set_cursor): Use FONT_WIDTH if width
9403         unknown.  Some fonts have min_width zero.
9404         (draw_glyphs): Don't draw underlines to the end of the display
9405         line if face is merely extended to that point.
9406         (draw_glyphs): Don't assume background is filled if
9407         just_foreground_p but extending to end of line.
9409         * xterm.c (XTclear_end_of_line): Clip only to display_height - 1
9410         for partially visible last lines.
9411         (x_clip_to_row): Ditto.
9412         (x_clip_to_row): Clip to display_height-1 if y + line_height >
9413         display_height since line_height is really a line distance.
9414         (x_display_and_set_cursor): If cursor on padding glyph, use
9415         min_bounds pixel width.
9417 Mon Aug 18 09:39:18 1997  Gerd Moellmann  <gerd@acm.org>
9419         * xterm.c (x_clip_to_row):  Height value was 1 too large.
9420         (XTclear_end_of_line):  Clip to display area.
9422         * xfns.c (x_figure_window_sizes):  Add trunc border width
9423         to frame pixel width.
9425         * xdisp.c (next_display_element): Don't display overlay strings
9426         within invisible text.
9427         (skip_vertically_backward):  Skip display lines. 
9429 Sat Aug 16 13:13:32 1997  Gerd Moellmann  <gerd@acm.org>
9431         * xdisp.c (x_consider_frame_titie): Don't pad with blanks.
9433         * xdisp.c (next_display_element):  Next invisible
9434         text check position computed differently.
9436         * dispextern.h (struct display_cursor): last_invisible_text_pos
9437         and display_ellipsis_for_invisible_p removed.
9439         * xdisp.c (next_display_element):  Set last_invisible_text_pos
9440         to the last position at which invisible text was found.  Don't
9441         decrement cursor.pos for newlines and cr with ellipsis.  Set
9442         dpvec for `...' due to invisible text directly.  
9443         (redisplay_internal):  Don't assert that cursor is at PT after
9444         skip_to.  It may be in invisible text.
9446         * keyboard.c (make_lispy_event): For mouse clicks, use 
9447         x_y_to_hpos_vpos.
9449         * xdisp.c (next_display_element):  Call get_overlays_for_cursor when 
9450         next_overlay_pos is reached.  Use limit cursor.pos + 100 when
9451         checking for invisible text.
9453         * xterm.h (WINDOW_COL_PIXEL_X etc.) Removed.
9455         * dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Moved to dispnew.c
9457         * xfns.c (x_contour_region):  Use pixel coordinates from window
9458         cursor instead of WINDOW_TO_FRAME_H/VPOS.
9460         * dispextern.h (FRAME_TO_WINDOW_HPOS, FRAME_TO_WINDOW_VPOS):
9461         Removed.
9463         * dispnew.c (frame_to_window_hpos, frame_to_window_vpos): Removed.
9465         * xterm.c (x_y_to_hpos_vpos):  Get hpos/vpos from window relative
9466         pixel coordinates.
9467         (note_mouse_highlight): Use it.
9469         * xdisp.c (echo_area_display):  Ignore calls for terminal frames
9470         under a window system.
9472         * dispnew.c (adjust_frame_glyphs): Call redraw_frame if 
9473         necessary.
9474         (update_window_line): Add width of face padding glyph to 
9475         displayed widths of rows.
9477         * xterm.c (x_display_and_set_cursor):  Set clipping after
9478         erasing cursor.
9479         
9480         * window.c (Fset_window_configuration): Free only those 
9481         window matrices not reused.
9482         (get_leaf_windows): Build vector of leaf windows.
9483         Corrupted archive restored from v77.
9485         * xdisp.c (display_string): stop at >= last_visible_x if truncating
9486         like display_line does.
9488         * xdisp.c (display_mode_line): Don't hscroll mode line.
9490         * xterm.c (draw_glyphs): Wrong run_width computed for horiz. split
9491         windows.
9492         (x_scroll_bar_create): #3039 Clear area below scroll bar to remove
9493         garbage between mode lines when splitting windows horiz.
9495         * dispnew.c (direct_output_for_insert): Bug fix.
9497         * dispextern.h (struct display_cursor): New member string_length.
9499         * xdisp.c (next_display_element): Return padding spaces.
9500         (init_string_cursor): take precision and field_width
9501         (display_string): Use string cursor, skip over invisible text.
9503 Thu Aug 14 10:41:41 1997  Gerd Moellmann  <gerd@acm.org>
9505         * xterm.c (x_clip_to_row): Clip to partially visible lines.
9506         (x_display_and_set_cursor): Call it.
9507         (draw_glyphs): Call it
9508         (draw_bitmap): Call it.
9510         * dispnew.c (adjust_frame_glyphs): Optimize frame garbaging. 
9511         (allocate_leaf_matrix): Return flags.
9512         (row_equal_p): Compare enabled_p.
9514         * xterm.c (x_erase_phys_cursor):  Set phys_cursor_on_p to 0
9515         for type == -1.
9517         * xterm.c (x_display_and_set_cursor): Bar cursor 1 pixel taller.
9518         (draw_glyphs):  Clip height one pixel taller. 
9520         * dispnew.c (direct_output_for_insert): Give up for hscrolled 
9521         mini window.
9523         * xdisp.c (display_line): don't scroll mini prompt.
9525         * xdisp.c (echo_area_display): Call update_single_window if 
9526         possible. 
9528         * dispnew.c (update_window_line):  Call scrolling_window.
9529         (scrolling_window): work on enabled desired lines only.
9530         (update_single_window): Update a single window like update_frame
9531         does for all windows.
9532         (update_window, update_window_tree): Additional argument 
9533         no_scrolling_p.
9534         (update_frame): Pass no_scrolling_p to update_window_tree.
9535         (update_window): Don't call scrolling_window if no_scrolling_p.
9537         * xterm.c (x_erase_phys_cursor): Do nothing if type == -1.
9538         Erase under hollow cursor. 
9539         (x_display_and_set_cursor): Do nothing if cursor glyph row 
9540         not enabled.  Draw bar cursor 1 pixel smaller.
9542         * dispnew.c (adjust_frame_glyphs): don't set frame garbaged
9543         since update will follow soon.
9545         * xdisp.c (echo_area_display): Unitialized variable.
9547         * xterm.c (draw_bitmap): previously draw_truncation; draw
9548         overlay arrow bitmap.
9550         * xdisp.c (display_line): for truncated lines, consider everything
9551         up to the final \n as part of the line for cursor positioning. 
9553         * xterm.c (draw_truncation): take FRAME_X_TRUNC_WIDTH into account.
9554         (x_after_update_window_line): clear trunc marks.
9556         * xterm.h (FRAME_X_TRUNC_WIDTH).
9558         * frame.h (FRAME_TRUNC_WIDTH):  width of area at the left margin
9559         of a window reserved for truncation mark.
9561         * dispextern.h: Take FRAME_TRUNC_WIDTH into account. 
9563         * dispnew.c (update_window_line): Call after_update_windwo_line-
9564         hook.  
9566         * xdisp.c (display_line): Set overlay_arrow_p in row.
9568         * dispextern.h (struct glyph_row): New flag overlay_arrow_p.
9570         * xterm.c (x_after_update_window_line): Draw truncation marks.
9572         * xdisp.c (display_line): Insert truncation for lines with
9573         current_x > 0.
9575         * xterm.c (x_draw_row_borders): Convert y to frame coords.
9576         Correct y by 1.
9577         (x_display_cursor): Use default font width if width not
9578         known. 
9580         * xdisp.c (echo_area_display): set row->y.
9582         * dispnew.c (set_window_cursor_after_update): Don't assume
9583         all rows are enabled.
9585         * xdisp.c (skip_in_display_line_to): Test cursor.position instead
9586         of cursor.pos.
9587         (skip_in_display_line_to): Check cursor.position after call to
9588         next_display_element.
9590         * dispextern.h (CURSOR_AT_P): Test if cursor has reached 
9591         buffer position.
9593         * xdisp.c (display_line): Set row->y here.
9594         (skip_in_display_line_to): Test for to_pos after all glyphs
9595         have been added to hpos so that hpos is at the end of all
9596         glyphs for to_pos.
9597         (start_display): Remove assertion.
9599         * dispnew.c (direct_output_forward_char): Bug fix, = instead of
9600         ==.
9601         (update_window): Don't set row->y here.
9603         * xdisp.c (next_display_element): Don't translate control chars
9604         from display table entries.
9606         * dispnew.c (direct_output_for_insert): Set cursor before 
9607         update end to prevent cursor flickering.  Revert changes to
9608         setting cursor.endpos.
9610 Wed Aug 13 10:46:12 1997  Gerd Moellmann  <gerd@acm.org>
9612         * dispnew.c (direct_output_for_insert):  Don't set cursor.endpos
9613         to PT because this prevents multi-byte characters from being
9614         recognized.
9616         * xdisp.c (skip_to, display_line):  Advance cursor at end of 
9617         truncated line. 
9619         * xterm.c (x_draw_3d_borders): Use CapRound. Struct rect
9620         replaced by XRectangle.
9622         * dispnew.c (scrolling_window): New method.
9624         * xterm.c (do_line_dance): New implementation, new method.
9625          
9626         * xdisp.c (draw_glyphs):  Draw truncation bitmaps. Clip to
9627         visible part of line.
9629         * dispnew.c (update_window_line): Fill inverse video lines
9630         with infinite width space.
9631         (update_window): Handle completely empty matrices.
9632         (set_window_cursor_after_update): Bug fix.
9634         * xterm.c (draw_glyphs): Stop drawing at right window end. 
9636         * dispnew.c (update_window_line): Don't ignore spaces, don't
9637         fill with spaces.
9639         * xdisp.c (compute_line_metrics): Stop adding glyph widths with
9640         the first glyph having width 0.
9642         * xterm.c (draw_glyphs): Let a glyph pixel with of 0 denote
9643         a glyph that extends to the end of the line. 
9645         * xdisp.c (display_line): Insert one padding glyph
9647         * xdisp.c (skip_in_display_line_to): Don't subtract shift left
9648         amount from info.current_x.
9649         (display_line): Ditto.
9651         * dispnew.c (direct_output_for_insert): Correct use of cursor.x.
9652         (change_frame_size_1): Correct cursor.x if frame gets too small.
9653         (update_window_line): Start at row->x.
9655         * xdisp.c (redisplay_internal): Correct cursor.x (everwhere
9656         in xdisp.c).
9658         * xterm.c (set_output_cursor): Use window relative X/Y.
9659         (global): Use window relative output cursor x/y.
9660         (draw_glyphs): Remove y param. Pass window relative x/y.
9662         * dispnew.c (update_window): Start rows at start_y.
9663         (update_window): Don't try scrolling because it wouldn't work
9664         with variable height lines, anyway.
9666         * dispextern.h (struct glyph_row): Remove shift_left_by,
9667         add x.
9669         * window.h: (struct window): New member start_y.
9671         * window.c (replace_window): Initialize start_y.
9672         (make_window): Ditto.
9674 Tue Aug 12 14:53:04 1997  Gerd Moellmann  <gerd@acm.org>
9676         * xterm.c (draw_glyphs): Clip rows that would paint over
9677         the mode line. 
9679         * dispnew.c (update_window): Take mode line border into 
9680         account. 
9682         * xterm.h (FRAME_MODE_LINE_BORDER_WIDTH): Number of pixels
9683         of border around mode line. 
9685         * xterm.c (x_draw_row_borders): Bug fix.
9686         (x_erase_phys_cursor): Set pyhs_cursor.x/y before calling
9687         drawing functions.
9689         * xterm.c (x_draw_row_border): Experimental; draw 3d borders
9690         around modeline instead of inverting it. 
9692         * xterm.c (glyph_to_pixel_coords): Use current matrix. 
9694         * dispnew.c (buffer_posn_from_coords): Use SKIP_TO.  Now takes
9695         window relative pixel coordinates as arguments.
9697         * keyboard.c (make_lispy_event): Use BUFFER_POSN_FROM_COORDS
9698         with window relative pixel coordinates.  Use GLYPH_TO_PIXEL_-
9699         COORDS mit new arguments.
9701 Mon Aug 11 12:32:34 1997  Gerd Moellmann  <gerd@acm.org>
9703         * xdisp.c (start_display): Use SKIP_TO instead of SKIP_IN-
9704         DISPLAY_LINE.  
9706         * keyboard.c (make_lispy_event): WINDOW_FROM_COORDINATES with
9707         pixel coords.
9708         (make_lispy_movement): Same.
9710         * xterm.c (note_mouse_highlight): Use WINDOW_FROM_COORDINATES
9711         with new parameter meaning.
9713         * window.c (Fcoordinates_in_window_p): Convert Lisp params
9714         from canon units to pixels.
9715         (coordinates_in_window): Pixel based.
9716         (Fcoordinates_in_window_p): Convert result pixel values back
9717         to canonical units.
9719         * window.h: phys_cursor_ascent + descent instead of height.
9721         * xterm.c (XTget_char_info): Use per char metrics for multi-byte
9722         chars with charset width 1.
9724         * dispnew.c (direct_output_for_insert): Set updated_row.
9726 Sat Aug  9 12:11:44 1997  Gerd Moellmann  <gerd@acm.org>
9728         * dispextern.h (struct glyph): Padding flag removed.
9730 Tue Aug  5 09:59:08 1997  Gerd Moellmann  <gerd@acm.org>
9732         * sysdep.c (reset_sys_modes): cursor_to with 4 params.
9734         * keyboard.c (interrupt_signal): Cursor_to with 4 params.
9736         * dispnew.c (update_window_line): Use pixels.
9738         * xdisp.c (compute_line_metrics): Correct pixel_width by
9739         shift_left_by.
9741         * dispextern.h (struct glyph_row): FIRST_SHIFTED_LEFT_GLYPH
9742         removed.  Remove references to it everywhere.  Reverse_p in 
9743         glyph_row -> right_to_left_p.  Change references to it.
9745 Mon Aug  4 18:09:27 1997  Gerd Moellmann  <gerd@acm.org>
9747         * dispnew.c (direct_output_for_insert): Use INSERT_GLYPHS.
9749         * xterm.c (XTinsert_glyphs): Implement it.
9751         * term.c (insert_glyphs): UPDATING_FRAME may be NULL in case
9752         of a call from DIRECT_OUTPUT_FOR_INSERT.
9754         * window.h (struct cursor_pos): Keeps both matrix positions
9755         and pixel positions.
9756         (struct window): Use it.
9758         * dispnew.c (direct_output_for_insert): New version.
9760         * xdisp.c (redisplay_internal): Don't do anything if it has
9761         already be done directly.
9763         * keyboard.c (command_loop_1): Call DIRECT_OUTPUT_FOR_INSERT
9764         for any character.
9766 Thu Jul 31 15:39:10 1997  Gerd Moellmann  <gerd@acm.org>
9768         * xdisp.c (echo_area_display): Use new DISPLAY_STRING.
9770 Wed Jul 30 12:18:03 1997  Gerd Moellmann  <gerd@acm.org>
9772         * dispextern.h (struct glyph_row): MAX_ASCENT, MAX_DESCENT.
9773         (struct glyph): ASCENT, DESCENT.
9774         (MATRIX_ROW_PIXEL_HEIGHT): Pixel height of row.
9775         (GLYPH_PIXEL_HEIGHT): Pixel height of glyph.
9777         * xterm.c (XTget_display_info): Correct tab computation.
9779         * term.c (get_display_info): Correct tab computation.
9781         * dispextern.h (struct display_cursor): WHAT_FOUND, SOURCE_OBJECT.
9782         Renamed from CHAR_CURSOR.
9784 Tue Jul 29 12:52:40 1997  Gerd Moellmann  <gerd@acm.org>
9786         * xdisp.c (display_text_line): Mostly pixel oriented.
9788         * dispextern.h (struct glyph): BOX_WIDTH -> PIXEL_WIDTH.
9790         * term.c (append_intermediate_glyph): Generate padding glyphs.
9792         * xdisp.c (display_text_line): More into final direction.
9794         * xterm.c (XTget_char_info): Use WHAT field of CHAR_INFO.
9795         (XTget_char_info): Use tabs as multiples of spaces.
9797         * term.c (get_char_info): Use WHAT field of CHAR_INFO.
9798         Use tabs as multiples of spaces.
9800         * dispextern.h (struct char_info ): WHAT field.
9802         * term.c (encode_terminal_code): Don't use GLYPH_CHAR, use
9803         FAST_GLYPH_CHAR instead because GLYPH_CHAR won't remove faces.
9805 Mon Jul 28 14:23:06 1997  Gerd Moellmann  <gerd@acm.org>
9807         * dispnew.c (init_char_info): Correct TAB_WIDTH to a reasonable
9808         value.
9809         (init_char_info): Initialize with glyph row.
9811         * term.c (get_char_info): Check WANT_ELLIPSIS_P.
9813         * xterm.c (XTget_char_info): Check WANT_ELLIPSIS_P.
9815         * dispextern.h (struct char_info ): GLYPH_ROW for intermediate
9816         glyphs.
9818         * dispnew.c (init_char_info): Init GLYPH_ROW to NULL. CHAR_CURSOR
9819         moved to xdisp.c.
9821         * xdisp.c (display_text_line): Use CHAR_CURSOR.
9823         * xterm.c (x_append_intermediate_glyph): Intermediate glyph
9824         generation.
9825         (XTget_char_info): Ditto.
9827         * term.c (get_char_info): Intermediate glyph generation.
9828         (append_intermediate_glyph): Ditto.
9830 Sun Jul 27 18:57:24 1997  Gerd Moellmann  <gerd@acm.org>
9832         * dispnew.c (compute_char_cursor_face): Compute the face for a 
9833         CHAR_CURSOR.
9834         (init_char_cursor): Initialize a CHAR_CURSOR.
9835         (get_char_and_advance): Get next character to display.
9837         * dispextern.h (struct char_cursor): Cursor for iterating over
9838         display text of CURRENT_BUFFER.
9840 Sat Jul 26 13:33:03 1997  Gerd Moellmann  <gerd@acm.org>
9842         * term.c (get_char_info): Set MAX_PIXEL_WIDTH in CHAR_INFO.
9844         * dispextern.h (struct char_info ): Use LISP_CHAR_TABLE for DP.
9845         New member MAX_PIXEL_HEIGHT.
9847         * xterm.c (x_per_char_metric): Get per character metrics.
9848         (XTget_char_info): More cases covered.
9850         * term.c (get_char_and_info): Get next character and character
9851         display information.
9852         (get_char_info): Get character display information.
9854         * dispextern.h: Character display information.
9856         * xterm.c (x_get_char_font_and_encoding): Get font and 
9857         encode character.
9858         (XTget_char_info): Get display information about a character.
9860 Wed Jul 23 16:50:18 1997  Gerd Moellmann  <gerd@acm.org>
9862         * dispextern.h (WINDOW_DISPLAY_MODE_LINE_HEIGHT): Height is
9863         zero if window is mini-window.
9865         * xdisp.c: Include xterm.h or w32term.h for FRAME_LINE_HEIGHT.
9866         (try_window): DISPLAY_TEXT_LINE as long as Y < DISPLAY_HEIGHT.
9868         * dispnew.c (assign_row): Assign row pixel height. 
9869         (clear_glyph_row): Clear pixel height.
9870         (update_window): Use PIXEL_HEIGHT.
9872         * xdisp.c (display_string): Set row pixel height temporarily.
9873         (display_text_line): Ditto.
9875         * dispextern.h (GLYPH_PIXEL_WIDTH): 
9876         (GLYPH_PIXEL_HEIGHT): Get glyph pixel dimension.
9878         * frame.h (FRAME_DEFAULT_PIXEL_LINE_HEIGHT): Get height of 
9879         line in default font.
9880         (FRAME_DEFAULT_GLYPH_PIXEL_WIDTH): Get width of character
9881         in default font.
9882         (FRAME_MODE_LINE_PIXEL_HEIGHT): Get height of mode line.
9884         * xterm.h (FRAME_MODE_LINE_HEIGHT): Return height of mode line
9885         in pixels.
9887         * dispnew.c (allocate_leaf_matrix): Use window pixel macros.
9889         * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH):
9890         (WINDOW_DISPLAY_PIXEL_HEIGHT): 
9891         (WINDOW_DISPLAY_MODE_LINE_HEIGHT): 
9892         (WINDOW_DISPLAY_PIXEL_HEIGHT_WITHOUT_MODE_LINE): 
9893         (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X): 
9894         (WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X): 
9895         (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y): 
9896         (WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y): Macros to get various
9897         pixel values related to windows.
9899 Mon Jul 21 12:22:02 1997  Gerd Moellmann  <gerd@acm.org>
9901         * xterm.c (XTflash): Flash last line of frame.
9903         * dispextern.h (cursor_in_echo_area): Extern declaration.
9905         * xterm.c (dumpglyphs): 8-bit version to test if my Xserver
9906         freezes stem from 16-bit functions.
9908         * xterm.c (x_display_and_set_cursor): Don't display hollow
9909         cursor in mini windows.
9911         * window.c (replace_window): Initialize PHYS_CURSOR_TYPE.
9912         (make_window): Ditto.
9914         * xterm.c (x_erase_phys_cursor): Erase cursor image.
9915         (x_display_and_set_cursor): Merged version of X_DISPLAY_BOX_CURSOR
9916         and X_DISPLAY_BAR_CURSOR.
9917         (x_display_cursor): Use it.
9918         (x_update_window_cursor): Use it.
9920         * xdisp.c (display_text_line): Set cursor for window even if not
9921         selected.
9923         * xterm.c (x_display_bar_cursor): Use HPOS and VPOS instead
9924         of X and Y to denote matrix positions.
9925         (x_display_cursor): Ditto.
9927         * dispnew.c (scrolling_window): Scrolling for windows.
9929 Wed Jul 16 13:37:51 1997  Gerd Moellmann  <gerd@acm.org>
9931         * dispnew.c (build_frame_matrix): Work on windows with update
9932         flag set.
9933         (build_frame_matrix_from_window_tree): Ditto.
9934         (build_frame_matrix_from_leaf_window): Ditto.
9936         * xdisp.c (echo_area_display): Set MUST_BE_UPDATED_P instead of
9937         building frame matrix.
9938         (redisplay_internal): Set window update flags instead of 
9939         building frame matrix.
9941         * minibuf.c (read_minibuf): Set MUST_BE_UPDATED_P instead of
9942         building frame matrix.
9944         * window.c (make_window): Initialize new members.
9945         (replace_window): Ditto.
9947         * xfns.c (Fx_create_frame): Don't set PHYS_CURSOR_X to -1.
9948         I don't believe this is really necessary.
9950         * dispnew.c (build_frame_matrix_from_leaf_window): Determine
9951         border glyph once. 
9953 Tue Jul 15 13:58:33 1997  Gerd Moellmann  <gerd@acm.org>
9955         * window.c (mark_window_cursors_off): Mark all cursors in 
9956         window tree off.
9958         * xterm.c (x_display_box_cursor): Window paraemter.  Use 
9959         window matrix.
9960         (glyph_to_pixel_pos): Convert matrix pos -> pixels.
9961         (pixel_to_glyph_pos): Convert pixel pos -> matrix pos.
9962         (x_update_cursor): Work on windows.
9963         (x_display_bar_cursor): Ditto.
9964         (x_draw_single_glyph): Ditto.
9966         * xterm.h: Prototype for X_DISPLAY_CURSOR.
9968         * xterm.c (XTcursor_to): Void return type.  Test for
9969         UPDATED_WINDOW.  Call x_display_cursor with window.
9970         (x_display_cursor): Void return type.  Window instead of frame
9971         parameter.
9973         * window.h (WINDOW_RIGHTMOST_P, WINDOW_TOPMOST_P): Use functions
9974         below.
9976         * window.c (window_rightmost_p, window_topmost_p): Based on
9977         window tree.
9979         * dispnew.c (adjust_frame_message_buffer): Allocate with
9980         FRAME_MESSAGE_BUF_SIZE.
9982         * window.h: PHYS_CURSOR_.* added.
9984         * frame.h (struct frame): Cursor information removed.
9986         * frame.h (FRAME_SCROLL_BAR_WIDTH): Removed because unused.
9987         (FRAME_WINDOW_WIDTH_ARG): Don't add scroll bar width.
9989         * window.h (WINDOW_LEFT_MARGIN): Remove FRAME_LEFT_SCROLL_BAR.
9991         * window.c (window_internal_width): Scroll bars no longer
9992         part of window.
9994         * xterm.c (XTclear_end_of_line): FRAME_LEFT_SCROLL_BAR_WIDTH
9995         removed.
9997         * xfns.c (x_set_scroll_bar_width): FRAME_LEFT_SCROLL_BAR_WIDTH
9998         removed.
10000         * xdisp.c (echo_area_display): FRAME_LEFT_SCROLL_BAR_WIDTH removed.
10001         (redisplay_internal): Ditto.
10002         (redisplay_window): Ditto.
10003         (redisplay_window): Ditto.
10004         (display_text_line): Ditto.
10005         (display_mode_line): Ditto.
10007         * minibuf.c (read_minibuf): FRAME_LEFT_SCROLL_BAR_WIDTH removed.
10009         * dispnew.c (set_cursor_to): FRAME_LEFT_SCROLL_BAR_WIDTH removed.
10010         (direct_output_for_insert): Ditto.
10011         (direct_output_forward_char): Ditto.
10012         (update_frame_1): Ditto.
10014 Mon Jul 14 12:30:03 1997  Gerd Moellmann  <gerd@acm.org>
10016         * dispnew.c (updated_window): Set by UPDATE_WINDOW to the window
10017         being updated.
10018         (update_window): Set and clear it.
10020         * dispnew.c (update_window_line, update_window, scrolling_window):
10021         First versions.
10023         * dispnew.c (build_frame_matrix_from_leaf_window): Add vertical
10024         bar for window borders.
10025         (fill_up_glyph_row_area_with_spaces): Fill an area of a row
10026         with spaces.
10027         (fill_up_glyph_row_with_spaces): Call above function.
10029         * xdisp.c (display_text_line): Don't add vertical bar for
10030         window borders.
10031         (display_string): Ditto.
10033         * window.c (make_window): Init CURSOR_VPOS/HPOS.
10034         (replace_window): Ditto.
10036         * xterm.c (XTwrite_glyphs): Use selected window cursor position.
10038         * xfns.c (Fx_contour_region): Use selected window cursor position.
10039         (Fx_uncontour_region): Ditto.
10040         (Fx_select_region): Ditto.
10042         * frame.c (make_frame): Remove CURSOR_X/Y.
10044         * xdisp.c (redisplay_internal): Use window cursor position.
10046         * dispnew.c (update_frame_1): Use cursor position of selected
10047         window.
10048         (change_frame_size_1): Ditto.
10050         * xterm.c (XTupdate_begin): Set CURS_X/Y from selected window.
10051         (XTwrite_glyphs): Use cursor position of selected window.
10053         * xfns.c (x_set_scroll_bar_width): Set cursor pos of selected
10054         window.
10056         * dispnew.c (set_cursor_to): Set window cursor position.
10057         (direct_output_for_insert): Use window cursor position.
10058         (init_display): Don't use frame cursor position.
10060         * window.h: CURSOR_VPOS/HPOS added.
10062         * frame.h (struct frame): CURSOR_X/Y removed.
10063         (FRAME_CURSOR_X): Removed.
10064         (FRAME_CURSOR_Y): Ditto.
10066         * dispnew.c (direct_output_for_insert): LAST_POINT_X removed.
10067         (direct_output_forward_char): Ditto.
10069         * xdisp.c (redisplay_internal): LAST_POINT_X and LAST_POINT_Y
10070         removed.
10072         * window.c (make_window): LAST_POINT_X and LAST_POINT_Y removed.
10074         * window.h: LAST_POINT_X and LAST_POINT_Y removed.
10076 Sun Jul 13 14:18:24 1997  Gerd Moellmann  <gerd@acm.org>
10078         * xdisp.c: Bug fixes using SET_CURSOR with HPOS 0 instead
10079         of FRAME_LEFT_SCROLL_BAR_WIDTH.
10081         * dispextern.h: Changed function names.
10083         * dispnew.c (scrolling): Don't call SCROLLING_1 if WINDOW_SIZE
10084         < 2.
10085         (clear_window_matrices): Formerly two functions for desired
10086         and current matrix.
10087         (update_frame_1): Call CLEAR_DESIRED_MATRICES.
10088         (update_frame): Return return value from UPDATE_FRAME_1.
10090 Sat Jul 12 12:58:48 1997  Gerd Moellmann  <gerd@acm.org>
10092         * xdisp.c (try_window): Set WINDOW_END_VPOS with window relative
10093         LAST_TEXT_VPOS.
10095         * frame.c (set_menu_bar_lines): Adjust matrices.
10097         * dispnew.c (set_cursor_to): Set cursor position.
10099         * minibuf.c (read_minibuf): Build frame matrix.
10101         * xdisp.c (this_line_start_hpos): Renamed to
10102         THIS_LINE_START_WINDOW_HPOS to make it clear that this is window
10103         relative.
10104         (this_line_vpos): Renamed to THIS_LINE_WINDOW_VPOS for the same
10105         reason.
10107         * dispnew.c (build_frame_matrix): Don't clear rows of the 
10108         menu bar.
10109         (clear_window_records): Clear window rows.
10110         (clear_frame_records): Clear window and frame rows.
10111         (clear_glyph_matrix): Set all rows of a matrix to empty.
10113         * xdisp.c (echo_area_display): Parameter UPDATE_FRAME_P.  Update
10114         frame if set.
10115         (message2_nolog): Pass 1 to ECHO_AREA_DISPLAY.  UPDATE_FRAME
10116         removed.
10117         (redisplay_internal): Pass 0 to ECHO_AREA_DISPLAY.
10118         (redisplay_internal): Build frame matrix before UPDATE_FRAME.
10120         * dispnew.c (assign_row): Assign one glyph row to another.
10121         (mirrored_make_current): Use it.
10122         (mirror_make_current): Use it.
10123         (update_line): Rely on MIRRORED_MAKE_CURRENT to set flags and
10124         used counters for the current glyph row.
10125         
10127 Fri Jul 11 13:16:50 1997  Gerd Moellmann  <gerd@acm.org>
10129         * lisp.h: Prototype for SCAN_BUFFER.
10131         * xdisp.c (redisplay_windows): Simplified.
10133         * dispnew.c (window_to_frame_vpos): Convert window to frame vpos
10134         with debug checks.
10135         (window_to_frame_hpos): Convert window to frame hpos with checks.
10136         (frame_to_window_vpos): Convert frame to window vpos with checks.
10137         (frame_to_window_hpos): Convert frame to window hpos with checks.
10139         * dispextern.h: PRESERVE_OTHER_COLUMNS removed.
10141         * dispnew.c: PRESERVE_OTHER_COLUMNS removed.
10143         * xdisp.c (redisplay_internal): Another instance of
10144         DISPLAY_TEXT_LINE with window relative VPOS.
10145         (redisplay_internal): Remove PRESERVE_OTHER_COLUMNS.
10147         * dispnew.c (init_desired_glyphs): Do it on window matrices,
10148         only.
10150         * xdisp.c (try_window_id): Use CANCEL_WINDOW_LINE.
10151         (redisplay_internal): Ditto.
10153         * dispnew.c (cancel_window_line): Use window matrix.  Changed
10154         name to CANCEL_WINDOW_LINE.
10156         * xdisp.c (try_window_id): Use DISPLAY_TEXT_LINE with window
10157         relative VPOS.
10159         * dispextern.h (WINDOW_TO_FRAME_VPOS): Convert window vpos 
10160         to frame vpos. 
10161         (WINDOW_TO_FRAME_HPOS): Convert window hpos to frame hpos.
10162         (FRAME_TO_WINDOW_VPOS): Convert frame vpos to window vpos.
10163         (FRAME_TO_WINDOW_HPOS): Convert frame hpos to window hpos.
10165         * xdisp.c (try_window_id): Use ADJUST_WINDOW_CHARSTARTS with
10166         window relative VPOS.
10167         (redisplay_internal): Use ADJUST_WINDOW_CHARSTARTS with window
10168         relative VPOS.
10170         * dispnew.c (adjust_window_charstarts): Use INCREMENT_GLYPH_-
10171         MATRIX_BUFFER_POSITIONS.
10173         * xdisp.c (try_window_id): Use SCROLL_FULL_WIDTH_WINDOW.
10175         * dispextern.h: Prototype for SCROLL_FULL_WIDTH_WINDOW.
10177         * dispnew.c (scroll_frame_lines): Make it work on window 
10178         matrix.  Change name to scroll_full_width_window.
10180         * xdisp.c (message2_nolog): Don't fwrite NULL message If
10181         NONINTERACTIVE.
10183 Mon Jul  7 14:44:38 1997  Gerd Moellmann  <gerd@acm.org>
10185         * dispnew.c (init_desired_glyphs): Clear both frame matrix
10186         and window matrices. 
10187         (adjust_window_charstarts): Use window matrix.
10188         (cancel_my_columns): Use window matrix.
10189         (direct_output_for_insert): Use window matrix, only.
10191         * xdisp.c (display_glyphs): Extracted code from DISPLAY_STRING.
10192         (display_string): Call display_glyphs.
10193         (display_menu_bar_string): Display a string in a menu bar line.
10194         (display_menu_bar): Use DISPLAY_MENU_BAR_STRING.
10195         (display_text_line): Use window matrix.
10196         (try_window): Use window relative positions.
10198 Sun Jul  6 17:02:26 1997  Gerd Moellmann  <gerd@acm.org>
10200         * dispnew.c (adjust_frame_glyphs): Allocate window matrices from
10201         (0, 0).
10202         (allocate_leaf_matrix): Add FRAME_MENU_BAR_LINES to the height of
10203         top-most windows.
10205         * window.h (WINDOW_TOPMOST_P): Added.
10207         * xdisp.c (echo_area_display): Use PREPARE_DESIRED_ROW.
10208         (redisplay_window): Ditto.
10209         (display_text_line): Ditto.
10210         (display_menu_bar): Ditto.
10211         (display_mode_line): Ditto.
10212         (display_mode_line): Use window matrix.
10213         (display_string): Use window matrix.
10214         (display_mode_element): Ditto.
10215         (echo_area_display): Don't display if frame has no pools yet.
10216         (echo_area_display): Work with window matrix for mini window.
10217         (redisplay_window): Use window marix for mini window.
10218         (display_text_line): Assume HPOS and VPOS are window relative and
10219         use that for DISPLAY_STRING.
10221         * dispextern.h: Prototype for prepare_desired_row.
10223         * dispnew.c (prepare_desired_row): Replacement for
10224         GET_DISPLAY_LINE.
10226         * dispnew.c (adjust_window_charstarts): Always allocate window
10227         matrices.
10228         (clear_glyph_row): Only reset used counters and flags.
10230 Sat Jul  5 14:55:44 1997  Gerd Moellmann  <gerd@acm.org>
10232         * dispnew.c (scroll_frame_lines): Don't assume first scolled
10233         line is non-empty. 
10234         (realloc_glyph_pool): Don't add 1 to the pool size.
10235         (adjust_glyph_matrix): Don't add 1 to pointers to glyph areas.
10237         * dispnew.c (line_hash_code): Don't use null-glyph end marker.
10238         (line_draw_cost): Ditto.
10239         (update_line): Ditto.
10240         (update_line): Use SPACE_GLYPH.
10241         (count_blanks): Additional parameter LEN.
10243         * xdisp.c (display_text_line): Use SPACE_GLYPH.
10244         (display_text_line): Don't add null-glyph end marker.
10245         (display_string): Use SPACE_GLYPH.
10246         (display_string): Don't use null-glyph end marker.
10248         * term.c (clear_end_of_line): Use SPACE_GLYPH.
10250         * dispnew.c (clear_glyph_row): Don't use null-glyph end markers.
10251         (fill_up_glyph_row_with_spaces): Ditto.
10252         (preserve_other_columns): Add SPACE_GLYPH at then end of desired
10253         rows, instead of null-glyphs.
10254         (direct_output_for_insert): Don't add null-glyph end marker.
10256         * scroll.c (do_direct_scrolling): Change algorithm to construct
10257         vector of lines assigned.  Call MIRRORED_LINE_DANCE:
10258         (do_scrolling): Ditto.
10260         * dispnew.c (mirror_line_dance): Mirror line assignments in a
10261         frame matrix in window matrices.
10262         (mirrored_line_dance): Do line assignments during scrolling.
10263         Maybe do corresponding assignments in window matrices.
10264         (check_window_matrix_pointers): Check that window rows and frame
10265         rows agree about glyph pointers.
10266         (check_matrix_pointers): Ditto.
10267         (mirrored_make_current): Make a row of a desired matrix current;
10268         maybe mirror the operation in window matrices.
10269         (mirror_make_current): Make window desired matrix row current when
10270         frame matrix row was made current.
10272 Fri Jul  4 13:27:46 1997  Gerd Moellmann  <gerd@acm.org>
10274         * dispnew.c (check_matrix_pointer_lossage): Check against
10275         pointer lossage in matrices.
10276         (get_glyph_matrix_row): Removed.
10278         * scroll.c (do_scrolling): Simplified.
10279         (do_direct_scrolling): Simplified.
10280         (scrolling_1): Pass CURRENT_MATRIX instead of FRAME to
10281         DO_.*SCROLLING.
10282         
10284         * dispnew.c (ins_del_glyph_rows): Insert/delete rows in a matrix.
10285         (rotate_vector): Removed.
10286         (rotate_pointers): Removed.
10287         (scroll_frame_lines): Simplified.
10289 Thu Jul  3 13:54:21 1997  Gerd Moellmann  <gerd@acm.org>
10291         * dispextern.h (MATRIX_ROW_SWAP_CONTENTS): Removed.
10293         * dispnew.c (increment_glyph_matrix_buffer_positions): Does
10294         what the name says.
10295         (clear_glyph_row): Make a glyph row structure empty.
10296         (make_matrix_row_current): Make a glyph row current.
10297         (make_window_matrix_row_current): Perform analogous row swaps
10298         for window matrices.
10299         (update_line): Call make_matrix_row_current.
10301 Wed Jul  2 13:43:35 1997  Gerd Moellmann  <gerd@acm.org>
10303         * dispextern.h (SET_MATRIX_ROW_ENABLED_P): Better macro name.
10304         (SET_MATRIX_ROW_INVERSE_P): Better name and HIGHLIGHT_P ->
10305         INVERSE_P.
10306         (MATRIX_ROW_INVERSE_P): Former MATRIX_ROW_HIGHLIGHT_P.
10307         (struct glyph_row): HIGHLIGHT_P -> INVERSE_P
10309         * all files: use above new names.
10311         * dispnew.c (scroll_frame_lines): Simplified.  Use
10312         SCROLL_GLYPH_MATRIX.
10313         (make_glyph_row_empty): Mark a glyph row empty.
10314         (increment_glyph_row_buffer_positions): Increment 
10315         buffer positions in a glyph row.
10316         (increment_glyph_matrix_buffer_positions): Increment buffer
10317         positions in a range of rows.
10318         (scroll_glyph_matrix): Scroll a glyph matrix.
10319         (swap_glyphs_in_rows): Swap glyphs between rows.
10320         (swap_glyph_pointers): Swap pointers between rows.
10321         (glyph_row_slice_p): Return 1 if one row is a slice of another.
10322         (init_display): Initialize SPACE_GLYPH.
10323         (fill_up_glyph_row_areas_with_spaces): Fill up areas with
10324         spaces. 
10326 Tue Jul  1 13:49:55 1997  Gerd Moellmann  <gerd@acm.org>
10328         * xterm.c (dumprectangle): Use vectors in glyph rows.
10330         * xdisp.c (display_text_line): Use vectors in glyph rows.
10331         (display_string): Ditto.
10333         * scroll.c (do_scrolling): Use vectors in glyph rows.
10334         (do_direct_scrolling): Ditto.
10336         * alloc.c (mark_object): Use vectors in glyph rows.
10337         Mark for all frame types.
10339         * dispnew.c (adjust_glyph_matrix): Use vectors to glyphs in
10340         glyph rows.
10341         (get_glyph_matrix_row): Ditto.
10342         (matrix_row): Ditto.
10343         (rotate_pointers): Ditto.
10344         (scroll_frame_lines): Ditto.
10345         (preserve_other_columns): Ditto.
10346         (cancel_my_columns): Ditto.
10347         (update_line): Ditto.
10348         (direct_output_for_insert): Ditto.
10350         * dispextern.h (struct glyph_row): Use a vector of pointers
10351         instead of individual members.  Use a vector of used counters.
10352         (MATRIX_ROW_SWAP_CONTENTS): Use vectors.
10353         (MATRIX_ROW_GLYPH_START): Ditto.
10354         (MATRIX_ROW_GLYPH_END): Ditto.
10355         (MATRIX_ROW_USED): Ditto.
10356         (MATRIX_ROW_SET_USED): Ditto.
10358         * dispnew.c (line_hash_code): Simplified.
10360 Mon Jun 30 20:39:38 1997  Gerd Moellmann  <gerd@acm.org>
10362         * dispnew.c: Prototype for ROTATE_VECTOR, ROTATE_POINTERS,
10363         CHANGE_FRAME_SIZE_1
10364         (preserve_other_columns): Void return.
10365         (cancel_my_columns): Void return type.
10366         (scrolling): Int return type.
10367         (do_pending_window_change): Void return type.
10368         (change_frame_size): Ditto.
10369         (bitch_at_user): Ditto.
10370         (init_display): Ditto.
10371         (syms_of_display): Ditto.
10373         * dispextern.h: add prototypes for REDRAW_FRAME,
10374         REDRAW_GARBAGED_FRAMES, CANCEL_LINE, CLEAR_FRAME_RECORDS,
10375         INIT_DESIRED_GLYPHS, SCROLL_FRAME_LINES, PRESERVE_OTHER_COLUMNS,
10376         ADJUST_WINDOW_CHARSTARTS, CANCEL_MY_COLUMNS,
10377         DIRECT_OUTPUT_FOR_INSERT, DIRECT_OUTPUT_FORWARD_CHAR,
10378         UPDATE_FRAME, SCROLLING, BUFFER_POSN_FROM_COORDS,
10379         DO_PENDING_WINDOW_CHANGE, CHANGE_FRAME_SIZE, BITCH_AT_USER,
10380         SIT_FOR, INIT_DISPLAY, SYMS_OF_DISPLAY,
10381         
10382         * dispnew.c (redraw_frame): FRAME_PTR -> struct frame.  Return
10383         void.
10384         (cancel_line): Return void.
10385         (clear_frame_records):  Return void.
10386         
10387         * dispextern.h (struct glyph): Remove GLYPH, add bit-fields.
10388         (SET_CHAR_GLYPH): Fill a character glyph.
10389         (SET_CHAR_GLYPH_FROM_GLYPH): Set a character glyph from a GLYPH.
10390         (GLYPH_FROM_CHAR_GLYPH): Construct a GLYPH from a character
10391         glyph. 
10392         (CHAR_GLYPH_CHAR_CODE): Return character code of a glyph.
10393         (SET_CHAR_GLYPH_CHAR_CODE): Set character code of a glyph.
10394         (CHAR_GLYPH_FACE_ID): Return face id of a glyph.
10395         (SET_CHAR_GLYPH_FACE_ID): Set face id of a glyph.
10396         (CHAR_GLYPH_PADDING_P): Return padding flag of a glyph.
10397         (SET_CHAR_GLYPH_PADDING_P): Set padding flag.
10398         (CHAR_GLYPH_REVERSE_P): Return reversed flag.
10399         (SET_CHAR_GLYPH_REVERSE_P): Set reversed flag.
10400         (MATRIX_ROW_SWAP_CONTENTS): Swap pointers between rows.
10402         * term.c (reassert_line_highlight): Check CHARS_WASTED == 0.
10404         * window.h (struct window): Add comment that no Lisp data may
10405         come below CURRENT_MATRIX.
10407         * alloc.c (mark_object): Change window mark code to stop with
10408         member CURRENT_MATRIX.
10410 Sat Jun 28 13:54:55 1997  Gerd Moellmann  <gerd@acm.org>
10412         * scroll.c (do_scrolling): Change algorithm to use pointers.
10413         (do_direct_scrolling): Ditto.
10415         * dispnew.c (get_glyph_matrix_row): Use pointers stored in rows.
10416         (new_glyph_pool): Formerly new_FRAME_GLYPH_MATRIX.
10417         (free_glyph_pool): Formerly FREE_FRAME_GLYPH_MATRIX
10418         (realloc_glyph_pool): Formerly REALLOC_FRAME_GLYPH_MATRIX.
10419         Returns 1 if pool changed.
10420         (matrix_row): Additional check for lost pointers to glyph rows.
10421         (compute_matrices): Additional parameter DIM_P set means that no
10422         allocation should take place.  Addtional parameter
10423         ANY_WINDOWS_CHANGED_P set if any windows matrix has changed.
10424         (compute_leaf_matrix): Additional parameter CHANGED_P set to 1
10425         when window matrix changes.  Additional parameter DIM_ONLY_P set
10426         to 1 to indicate that no allocation should take place.
10427         (adjust_frame_glyphs): Construct new glyph pools and glyph
10428         matrices.  Optimize frame redraws.
10429         (free_glyphs): Free pools.
10430         (check_glyph_memory): Check pools not freed.
10431         (rotate_pointers): Rotate pointers in a vector of glyph rows.
10432         (scroll_frame_lines): Change algorithm to use pointers.
10433         (update_line): Ditto.
10435         * dispextern.h (struct glyph_row): Use pointers to areas in a row.
10436         (global): All macro names changed from prefix FRAME_MATRIX to
10437         MATRIX.
10439 Fri Jun 27 14:51:15 1997  Gerd Moellmann  <gerd@acm.org>
10441         * dispextern.h (struct glyph_pool): Replacement for former
10442         FRAME_GLYPH_MATRIX.
10443         (struct glyph_matrix): No longer contains sizes of allocated
10444         areas.
10446         * xdisp.c (redisplay_internal): Don't redisplay if frame has
10447         no glyph pools.
10449         * frame.c (make_frame): Initialize pools.
10451 Thu Jun 26 00:00:55 1997  Gerd Moellmann  <gerd@acm.org>
10453         * scroll.c (do_direct_scrolling): Don't assume that the 
10454         line moving algorithm has no intermediate steps.
10455         (do_scrolling): Ditto.
10457         * Makefile.in (alloc.o): Add dependency dispextern.h.
10459         * alloc.c: Include dispextern.h for glyph definitions.
10461         * dispnew.c (get_glyph_matrix_row): Return 1 if ROW_INDEX
10462         is legal, return 0 otherwise.
10464         * window.h: Add comment that windows are marked specially.
10466         * alloc.c (mark_object): Mark windows specially.
10469 Wed Jun 25 15:22:58 1997  Gerd Moellmann  <gerd@acm.org>
10471         * dispextern.h (struct glyph): Add member OBJECT
10472         referencing a Lisp object from which a glyph was drawn.
10473         Member TEXT_POSITION renamed POSITION.
10474         * xterm.c, xdisp.c, dispnew.c: Rename TEXT_POSITION -> POSITION.
10476         * alloc.c: Include dispextern.h
10477         (mark_object): Mark objects referenced from glyphs.
10479         * frame.c (make_frame): initialize DECODE_MODE_SPEC_BUFFER.
10481         * scroll.c (do_direct_scrolling): Remove TEMP_MATRIX.
10482         (do_scrolling): Ditto.
10484         * frame.h (struct frame): TEMP_MATRIX removed.  
10485         DECODE_MODE_SPEC_BUFFER added.
10487         * window.h: TEMP_MATRIX removed.
10489         * scroll.c: OPHYS_LINES removed.
10491         * dispnew.c: OPHYS_LINES and OPHYS_LINES_LENGTH removed.
10492         FRAME_PTR -> struct frame *.
10494         * termhooks.h: Prototypes for INSERT_GLYPHS_HOOK,
10495         WRITE_GLYPHS_HOOK, DELETE_GLYPHS_HOOK,
10497         * term.c: Prototypes for INSERT_GLYPHS_HOOK,
10498         WRITE_GLYPHS_HOOK, DELETE_GLYPHS_HOOK,
10500         * xdisp.c (redisplay_internal): Remove call to VERIFY_CHARSTARTS.
10501         (do_verify_charstarts): Removed.
10503         * frame.c (Fmake_terminal_frame): Adjust glyphs.
10504         (Fdelete_frame): Free glyphs.
10505         (make_frame): Initialize matrix fields in frame.
10507         * config.in (PROTO): added.
10509         * emacs.c (shut_down_emacs): check glyph memory.
10511         * window.c (Fdelete_window): Free window matrices.
10512         (Fset_window_configuration): Ditto.
10513         (Fdelete_window): Adjust glyphs.
10514         (Fsplit_window): Ditto.
10515         (change_window_height): Ditto.
10516         (Fset_window_configuration): Ditto.
10517         (make_window): Initialize DESIRED_MATRIX and CURRENT_MATRIX.
10518         (replace_window): Reset DESIRED_MATRIX and CURRENT_MATRIX
10520         * Makefile.in (window.o): Add dependency window.c -> dispextern.h
10522         * window.c: Include dispextern.h
10524         * scroll.c (do_scrolling): Use new glyphs.
10525         (do_direct_scrolling): Ditto.
10527         * xdisp.c: Some function prototypes.
10528         (redisplay_internal): Don't do anything if matrices not yet set.
10529         (redisplay_internal): Use new glyphs.
10530         (try_window_id): Ditto.
10531         (copy_part_of_rope): Ditto.
10532         (display_text_line): Ditto.
10533         (display_menu_bar): Ditto.
10534         (display_mode_line): Ditto.
10535         (display_string): Ditto.
10537         * xterm.c: Prototypes for some local functions.
10538         (dumpglyphs): Use new glyphs.
10539         (XTwrite_glyphs): Ditto.
10540         (dumprectangle): Ditto.
10541         (note_mouse_highlight): Ditto.
10542         (fast_find_position): Ditto.
10543         (show_mouse_face): Ditto.
10544         (x_draw_single_glyph): Ditto.
10545         (x_display_bar_cursor): Ditto.
10546         (x_display_box_cursor): Ditto.
10547         (x_new_font): Adjust glyphs when font change.
10549         * term.c (clear_end_of_line): Use new glyphs.
10550         (write_glyphs): Ditto.
10551         (insert_glyphs): Ditto.
10553         * Makefile.in (term.o): term.c depends on dispextern.h
10555         * term.c: Include dispextern.h
10557         * dispnew.c (direct_output_forward_char): Old glyph functions
10558         removed, new inserted. 
10559         (line_hash_code): Use new glyphs.
10560         (line_draw_cost): Ditto
10561         (cancel_line): Ditto
10562         (clear_frame_records): Ditto.
10563         (init_desired_glyphs): Ditto.
10564         (get_display_line): Ditto
10565         (scroll_frame_lines): Ditto.
10566         (preserve_other_columns): Ditto.
10567         (adjust_window_charstarts): Ditto.
10568         (cancel_my_columns): Ditto.
10569         (direct_output_for_insert): Ditto.
10570         (update_frame): Ditto.
10571         (quit_error_check): Made empty.
10572         (scrolling): Use new glyphs.
10573         (count_blanks): Ditto.
10574         (count_match): Ditto.
10575         (update_line): Ditto.
10576         (init_display): Adjust glyphs initially.
10577         (change_frame_size_1): Adjust glyphs.
10579         * dispextern.h: Old glyphs removed, new added.
10581         * xfaces.c (min_char_bounds): Get smallest char in loaded fonts.
10583         * xterm.h: Prototype for min_char_bounds.
10585         * window.h (struct window): Remove old glyphs, add new.
10587         * frame.h (struct frame): Remove old glyphs, add new.
10588         
10589 1999-07-20  Dave Love  <fx@gnu.org>
10591         * buffer.c (syms_of_buffer): Make
10592         default-enable-multibyte-characters a user variable.
10594 1999-07-14  Richard Stallman  <rms@gnu.org>
10596         * Version 20.4 released.
10598 1999-07-14  Richard Stallman  <rms@gnu.org>
10600         * filelock.c (lock_file): Do nothing if purifying.
10602 1999-07-10  Richard Stallman  <rms@gnu.org>
10604         * xterm.c (x_display_bar_cursor): Use the cursor-color
10605         to display the bar, not the cursor foreground pixel.
10607 1999-07-09  Andrew Innes  <andrewi@gnu.org>
10609         * w32console.c (w32_use_full_screen_buffer): New variable.
10610         (syms_of_ntterm): Register it.
10611         (initialize_w32_display): Set initial frame size accordingly,
10612         respecting the LINES and COLUMNS environment variables if set.
10614         * w32inevt.c (w32_console_read_socket): Use it.
10616 1999-07-07  Kenichi Handa  <handa@etl.go.jp>
10618         * callproc.c (Fcall_process): Decide coding system for decoding
10619         after we set to the target buffer.  If the output goes to a
10620         unibyte buffer, suppress character code conversion.
10622         * fileio.c (Finsert_file_contents): If reading into a unibyte
10623         buffer, suppress character code conversion.
10625         * process.c (create_process): If the output goes to a unibyte
10626         buffer, suppress character code conversion.p
10628 1999-07-07  Andreas Schwab  <schwab@gnu.org>
10630         * xdisp.c (line-number-display-limit): Doc fix.
10632 1999-07-05  Richard Stallman  <rms@gnu.org>
10634         * callproc.c (Fcall_process): Don't use initializer on coding_systems.
10635         (Fcall_process_region): Likewise.
10637 1999-07-01  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
10639         * callproc.c (init_callproc): Set exec_directory if
10640         installation_directory is non-nil, without a test of exec_path.
10642 1999-07-01  Andrew Innes  <andrewi@gnu.org>
10644         * w32xfns.c (drain_message_queue): New function.
10646         * w32term.h (drain_message_queue): Add extern.
10648         * w32proc.c (sys_select): Call MsgWaitForMultipleObjects instead
10649         of WaitForMultipleObjects when user input is allowed, so we can
10650         handle incoming window messages.  Call drain_message_queue when
10651         there are messages waiting; this ensures that windows created
10652         indirectly from the lisp thread get processed properly, and don't
10653         hang other applications by failing to respond to broadcasts.
10655 1999-07-01  Andreas Schwab  <schwab@gnu.org>
10657         * callint.c (Fcall_interactively): Ignore first element of
10658         event-symbol-elements property.
10660 1999-07-01  Richard Stallman  <rms@gnu.org>
10662         * fileio.c (Fread_file_name): Check type of DEFAULT_FILENAME.
10664 1999-07-01  Kenichi Handa  <handa@etl.go.jp>
10666         * minibuf.c (read_minibuf): Set the multibyteness of the
10667         minibuffer before inserting `initial' string.
10669 1999-06-30  Richard Stallman  <rms@gnu.org>
10671         * xfns.c (x_make_gc): Turn off GCStipple when setting up cursor_gc.
10673 1999-06-29  Richard M. Stallman  <rms@gnu.org>
10675         * emacs.c [DOUG_LEA_MALLOC] (malloc_initialize_hook):
10676         Move the handling of MALLOC_CHECK_ envvar here.
10677         (main): Moved from here.
10679 1999-06-29  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
10681         * emacs.c [DOUG_LEA_MALLOC] (malloc_initialize_hook): New
10682         function, assigned to the global __malloc_initialize_hook pointer.
10683         (main): Move malloc_set_state call into malloc_initialize_hook
10684         so that it happens as early as possible.
10686 1999-06-27  Richard M. Stallman  <rms@gnu.org>
10688         * keyboard.c (read_key_sequence): Properly reinitialize
10689         fkey_map after translating thru Vkey_translation_map.
10690         After translating thru Vfunction_key_map, don't reset
10691         keytrans-start to 0.
10693 1999-06-24  Geoff Voelker  <voelker@cs.washington.edu>
10695         * w32.c (get_emacs_configuration): Use GetVersionEx to
10696         handle NT5.0 correctly.  Include build number in configuration.
10697         w32heap.c (osinfo_cache): New variable.
10698         (cache_system_info): Initialize osinfo_cache.
10699         w32heap.h (osinfo_cache): Declare.
10701 1999-06-24  Richard M. Stallman  <rms@gnu.org>
10703         * casefiddle.c (casify_object): Use make_multibyte_string
10704         if we casify a multibyte string.
10706 1999-06-22  Ken'ichi Handa  <handa@gnu.org>
10708         * fileio.c: (Finsert_file_contents): In the case of REPLACE, call
10709         del_range_byte instead of del_range_1, set `inserted' to the
10710         number of characters actually inserted.
10712 1999-06-17  Dave Love  <fx@gnu.org>
10714         * coding.c (decode_coding_sjis_big5): Avoid compiler warning.
10716 1999-06-18  Paul Eggert  <eggert@twinsun.com>
10718         * filelock.c (BOOT_TIME_FILE): New macro.
10719         (get_boot_time): Use it instead of hardwiring the file name.
10720         Check BOOT_TIME_FILE only after inspecting the kernel directly.
10722 1999-06-17  Dave Love  <fx@gnu.org>
10724         * xdisp.c (invalid_eol_type): Make it unsigned.
10726 1999-06-17  Karl Heuer  <kwzh@gnu.org>
10728         * process.c (send_process): Delete unsafe/redundant assignment.
10730 1999-06-17  Jason Rumney  <jasonr@gnu.org>
10732         * w32term.c (dumprectangle): Handle wide characters properly.
10734 1999-06-16  Andrew Innes  <andrewi@gnu.org>
10736         * s/ms-w32.h (strerror): Override the default implementation of
10737         strerror, so we can map winsock error codes.
10739         * w32.c (sys_strerror): New function.
10741         * w32fns.c (w32_to_x_weight): Return "demibold" instead of "semibold".
10743 1999-06-15  Ken'ichi Handa  <handa@gnu.org>
10745         * buffer.c (syms_of_buffer): Don't make
10746         enable-multibyte-characters customizable.
10748 1999-06-15  Richard M. Stallman  <rms@gnu.org>
10750         * editfns.c (Fuser_full_name): Doc fix.
10752 1999-06-14  Tak Ota <ota@atc.sel.sony.com>
10754         * w32bdf.c: (clear_cached_bitmap_slots): Remove.
10755         (get_bitmap_with_cache): Check if CreateBitmap failed.
10756         Adjust cache size dynamically so cache is never larger than the
10757         system limit of GDI resources.
10758         Do cache clearing inline.  Move global variables to local scope.
10761 1999-06-13  Wolfgang Glas <Wolfgang.Glas@hfm.tu-graz.ac.at>
10763         * unexsgi.c (unexec): Dump the .rodata section from memory
10764         under IRIX6.5 in order to be able to unexec with gcc.
10766 1999-06-11  Greg Hudson  <ghudson@MIT.EDU>
10768         * indent.c (compute_motion): Fix boundary case.
10770 1999-06-11  Jason Rumney  <jasonr@altavista.net>
10772         * w32term.c (cancel_mouse_face): New function. See equiv
10773         changes to xterm.c on 1996-10-31.
10774         (x_set_window_size): Use cancel_mouse_face.
10775         (w32_read_socket): Use cancel_mouse_face.
10776         Update frame position when size is restored.
10778 1999-06-04  Richard M. Stallman  <rms@gnu.org>
10780         * lread.c (Vuser_init_file): New variable.
10781         (syms_of_lread): Set up Lisp variable.
10782         (Fload): Store the file name there, if var was t before.
10784 1999-06-04  Paul Eggert  <eggert@twinsun.com>
10786         * filelock.c (get_boot_time): Don't look at /proc/uptime; it
10787         doesn't work if the system date is changed, or if the system
10788         is suspended.  Look at the last-modified time of
10789         /var/run/random-seed instead.
10791 1999-06-03  Ken'ichi Handa  <handa@gnu.org>
10793         * coding.c (ENCODE_SJIS_BIG5_CHARACTER): Encode charset
10794         japanese-jisx0208-1978 correctly.
10796 1999-06-03  Andrew Innes  <andrewi@gnu.org>
10798         * unexw32.c (get_section_info) [_ALPHA_]: Force as much bss data
10799         as possible to be dumped, for safety.
10801 1999-06-02  Ken'ichi Handa  <handa@gnu.org>
10803         * coding.c (ENCODE_SJIS_BIG5_CHARACTER): Encode charset
10804         latin-jisx0201 correctly.
10806 1999-05-26  Ken'ichi Handa  <handa@gnu.org>
10808         * charset.h (Vcharset_table): Comment fixed.
10810 1999-05-24  Richard Stallman  <rms@gnu.org>
10812         * coding.c (syms_of_coding): Doc fix.
10814         * buffer.c (syms_of_buffer): Doc fix.
10816         * filelock.c (lock_if_free): After deleting a stale lock,
10817         try again to lock the file.
10819 1999-05-22  Andrew Innes  <andrewi@gnu.org>
10821         * w32inevt.c (maybe_generate_resize_event): Detect changes in the
10822         console window size.
10823         (w32_console_read_socket): Call maybe_generate_resize_event
10824         whenever input events are received, since we don't get told when
10825         the window size changes (as opposed to the buffer size, which we
10826         don't care about).
10828         * w32console.c (clear_frame): Remember that the window width might
10829         be smaller than the screen buffer width.
10830         (write_glyphs): Remove redundant variable attrs.  Use
10831         FillConsoleOutputAttribute instead of WriteConsoleOutputAttribute.
10833 1999-05-20  Andrew Innes  <andrewi@gnu.org>
10835         * w32term.c (w32_read_socket): Reset the grabbed flag when a frame gains or
10836         loses focus.
10838         * w32fns.c (w32_wnd_proc): Ensure mouse capture is released if
10839         frame loses focus, and that mouse button state is reset.  Ditto
10840         when the menu bar is activated.
10842 1999-05-18  Richard Stallman  <rms@gnu.org>
10844         * abbrev.c (Fdefine_abbrev): Doc fix.
10846 1999-05-13  Paul Eggert  <eggert@twinsun.com>
10848         * filelock.c: Fix performance bug on hosts with large
10849         /var/adm/wtmp files with no boot records.
10851         (boot_time_initialized): New var.
10852         (init_filelock): Initialize it.
10853         (get_boot_time): Use it, instead of nonzero boot_time,
10854         to test whether boot_time is initialized.
10855         Don't invoke utmp routines when dumping.
10857         (get_boot_time): First, try to get the boot time from the
10858         current utmp file, as this can be much faster.  Don't try to
10859         get the boot time from utmp and/or wtmp more than once.
10861         (get_boot_time_1): When passed null pointer, don't invoke utmpname.
10862         New arg LATEST.  All uses changed.
10864 1999-05-15  Andrew Innes  <andrewi@gnu.org>
10866         * w32term.c (dumpglyphs): Use correct colours for drawing
10867         rectangles in place of missing fonts, and make them the right
10868         size.
10870 1999-05-14  Dave Love  <fx@gnu.org>
10872         * syntax.c (Fparse_partial_sexp): Correct test for element 8 to be
10873         non-nil.
10875 1999-05-11  Andrew Innes  <andrewi@gnu.org>
10877         * w32fns.c (x_to_w32_charset): Reinstall VIETNAMESE_CHARSET
10878         definition.
10879         (w32_wnd_proc): Reinstall debugging output.
10880         (w32_wnd_proc): Reinstall SetForegroundWindow change.
10881         (syms_of_w32fns): Reinstall new initializer for
10882         Vw32_phantom_key_code.
10884         * w32fns.c (x_to_w32_charset): Do partial matching of charset
10885         names for most non-European charsets, to cope with wildcards or
10886         missing spec dates.
10887         (Fw32_send_sys_command): Post WM_SYSCOMMAND rather than sending it
10888         to avoid deadlock when activating the menu bar.
10890 1999-05-10  Ken'ichi Handa  <handa@gnu.org>
10892         * search.c (boyer_moore): Get charset base value of `untranslated'
10893         by masking by ~CHAR_FIELD3_MASK (instead of ~0xff).
10895 1999-05-10  Andreas Schwab  <schwab@gnu.org>
10897         * fileio.c (Fread_file_name): Correct handling of dollars in file
10898         names.  Protect dollars in strings put on the file-name-history.
10899         Substitute homedir by `~' also in default_filename.
10901         * xdisp.c (try_window_id): Fix computation of tab_offset when
10902         backing up over a character that is splitted across lines.
10904 1999-05-08  Kenichi HANDA  <handa@etl.go.jp>
10906         * coding.c (code_convert_region): If eol format is inconsistent,
10907         change coding->symbol to the sibling coding system of Unix like
10908         eol format.
10910 1999-05-09  Richard M. Stallman  <rms@gnu.org>
10912         * s/irix5-2.h (NO_WTMP_FILE): Define it.
10914         * filelock.c (get_boot_time): Handle NO_WTMP_FILE.
10916 1999-05-05  Andrew Innes  <andrewi@gnu.org>
10918         * w32fns.c (w32_strict_painting): New variable.
10919         (w32_wnd_proc): Use it to select repaint rules.
10920         (syms_of_w32fns): Defvar it.
10922 1999-05-04  Andrew Innes  <andrewi@gnu.org>
10924         * w32fns.c (x_to_w32_charset): Fix typo: want to map all Japanese
10925         charsets to the standard Windows charset for Japanese.
10927 1999-05-04  Ken'ichi Handa  <handa@gnu.org>
10929         * xterm.c (x_load_font): Fix typo (`>' -> `=').
10931         * ccl.h (struct ccl_program): New member stack_idx.
10933         * ccl.c (ccl_prog_stack_struct): Declare it as static.
10934         (ccl_driver): Setup stack_idx and ccl_prog correctly.  Update them
10935         before returing.
10936         (setup_ccl_program): Initialize ccl->stack_idx to 0.
10938 1999-05-03  Jason Rumney  <jasonr@altavista.net>
10940         * w32term.c (dumpglyphs): Always fill background for italic fonts.
10942 1999-05-03  Eli Zaretskii <eliz@is.elta.co.il>
10944         * dired.c (make_time): Make argument type be time_t.
10946 1999-05-02  Eli Zaretskii <eliz@is.elta.co.il>
10948         * msdos.c (unibyte_display_via_language_environment): Add extern.
10950 1999-05-02  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
10952         * xdisp.c (display_text_line): Convert unibyte char to multibyte
10953         if unibyte_display_via_language_environment is set.
10954         (unibyte_display_via_language_environment):
10955         Variable moved from xfns.c and elsewhere.
10956         (syms_of_xfns): Set up Lisp var.
10958         * xfns.c (unibyte_display_via_language_environment):
10959         Variable moved to xdisp.c.
10960         (syms_of_xfns): Don't set up Lisp var here.
10962         * msdos.c (unibyte_display_via_language_environment):
10963         Variable moved to xdisp.c.
10964         (syms_of_msdos): Don't set up Lisp var here.
10966         * w32fns.c (unibyte_display_via_language_environment):
10967         Variable moved to xdisp.c.
10968         (syms_of_w32fns): Don't set up Lisp var here.
10970 1999-05-02  Andrew Innes  <andrewi@gnu.org>
10972         * s/ms-w32.h (HAVE_FSYNC): New macro.
10973          (fsync): Map to _commit.
10974          (ftruncate): Map to _chsize.
10976         * w32term.c (dumpglyphs): On Windows NT, do output in Unicode even
10977         for ASCII, if enabled, to avoid memory allocation overhead for
10978         implicit Unicode conversion.  Also, recognize that ASCII and
10979         Latin-1 have a trivial conversion to Unicode, so x_2byte_buffer
10980         already contains the Unicode characters in that case.
10981         (construct_drag_n_drop): Remove old code that was
10982         trashing the drop location.
10984         * w32select.c (Fw32_set_clipboard_data): Undo last change to add
10985         nlines to encoding_buffer_size (real bug was in a ccl program in
10986         lisp/international/coding.el).
10988         * w32reg.c (w32_get_string_resource): Check for name in current
10989         user area, and if not found look in the local machine area.
10991         * w32fns.c (w32_list_bdf_fonts): Initialize n_fonts.
10992         (Fw32_shell_execute): New function; used to support browse-url.
10993         (syms_of_w32fns): Register it.
10994         (w32_load_system_font): Force max width to be average
10995         char width for fixed-pitch fonts, to avoid unnecessary redisplay
10996         slowdown.
10997         (x_to_w32_charset): Define VIETNAMESE_CHARSET if not
10998         already defined.
10999         (syms_of_w32fns): Set Vw32_phantom_key_code to 255.
11001         * unexw32.c (get_section_info): Dump back the entire EMDATA
11002         section if we can put Emacs' initialized data in a separate
11003         section, otherwise use the my_begdata/my_edata method.
11005         * makefile.nt ($(BLD)\w32term.obj): Add dependency on w32heap.h.
11007         * coding.c (decode_eol): Set produced/consumed values to zero if
11008         src_bytes is <= 0 on entry.
11010 1999-05-02  Jason Rumney  <jasonr@altavista.net>
11012         * w32term.c (w32_write_glyphs, w32_clear_end_of_line,
11013         w32_clear_frame, clear_cursor, x_display_bar_cursor,
11014         x_display_box_cursor, x_set_window_size): Use phys_cursor_on
11015         field in frame.
11016         (do_line_dance): Updated WRT xterm.c. Use macros where possible.
11017         (dumprectangle): Take into account the width of a left-side
11018         scroll bar.
11020         * w32proc.c (sys_kill): Attach to current foreground thread
11021         when grabbing focus; necessary on NT 5.0.
11023         * w32fns.c (w32_wnd_proc) [WM_PAINT]: Use rectangle from
11024         GetUpdateRect rather than BeginPaint.
11025         (w32_wnd_proc): Attach to current foreground thread
11026         when grabbing focus; necessary on NT 5.0.
11027         (w32_wnd_proc) [W32_DEBUG_DISPLAY]: Add output for
11028         debugging display messages.
11029         (w32_to_x_charset): Put wildcard last in unknown charsets to avoid
11030         false matching.
11032 1999-05-02  Kenichi HANDA  <handa@etl.go.jp>
11034         * coding.c (setup_raw_text_coding_system): Call
11035         setup_coding_system to initialize the fields of struct
11036         coding_system correctly.
11037         
11038 1999-04-26  Kenichi HANDA  <handa@etl.go.jp>
11040         * xterm.c (x_list_fonts): Fix previous change.
11042 1999-04-26  Richard Stallman  <rms@gnu.org>
11044         * config.in (HAVE_LIBXP): Add #undef.
11045         * Makefile.in (LIB_MOTIF_EXTRA): Check HAVE_LIBXP.
11047 1999-04-12  Ken'ichi Handa  <handa@gnu.org>
11049         * xterm.c (x_list_fonts): Trap X errors so that Emacs doesn't die
11050         by them.
11052 1999-04-12  Karl Heuer  <kwzh@gnu.org>
11054         * s/freebsd.h (BSD_SYSTEM): Define for FreeBSD 4 as with FreeBSD 3.
11056 1999-04-11  Ken'ichi Handa  <handa@gnu.org>
11058         * fontset.c (Fset_fontset_font): Fix previous change.
11060 1999-04-09  Ken'ichi Handa  <handa@gnu.org>
11062         * fontset.c (Fquery_fontset): Check for fontset aliases here.
11063         (Fnew_fontset, Fset_fontset_font): Don't check for them here.
11065 1999-04-08  Richard Stallman  <rms@gnu.org>
11067         * process.c (Faccept_process_output): Check validity of PROCESS.
11069 1999-04-08  Eli Zaretskii  <eliz@gnu.org>
11071         * msdos.c (jp_kbd_translate_table): Fix the other \ key.
11073 1999-04-07  Richard Stallman  <rms@gnu.org>
11075         * xfns.c (x_set_font): Fix error message.
11077         * fontset.c (Fquery_fontset): Don't check for fontset aliases here.
11078         (Fnew_fontset, Fset_fontset_font): Check for them here.
11079          (Ffontset_info, Fnew_fontset, Fset_fontset_font):
11080         Fix error message syntax.
11082         * buffer.c (Fmake_indirect_buffer): Copy multibyte status
11083         from the base buffer.
11084         (Fset_buffer_multibyte): Copy new multibyte status
11085         into the buffer's indirect buffers.
11087 1999-04-07  Ken'ichi Handa  <handa@gnu.org>
11089         * fns.c (base64_encode_1): Don't add unnecessary newline at the
11090         tail.
11092 1999-04-06  Richard Stallman  <rms@gnu.org>
11094         * dired.c (Ffile_attributes): Doc fix.
11096         * keymap.c (Faccessible_keymaps): Really initialize i_byte.
11097         Convert 0200 to meta only in a unibyte string.
11098         (Fkey_description): Likewise.
11100         * eval.c (do_autoload): Preserve match data.
11102 1999-04-06  Kenichi HANDA  <handa@etl.go.jp>
11104         * w32fns.c (x_to_w32_font): Provide sufficient buffer to
11105         encode_coding to avoid carryover.
11107         * coding.c: Add comments for decode_coding and encode_coding.
11109         * ccl.c (ccl_driver) <CCL_ReadMultibyteChar2>: Fix bug of handling
11110         a composite character by skipping its leading code.
11111         <CCL_WriteMultibyteChar2>: Handle non-ascii single byte character
11112         correctly.
11114         * coding.c: Add comments for decode_coding and encode_coding.
11116         * ccl.c (ccl_driver) <CCL_ReadMultibyteChar2>: Fix bug of handling
11117         a composite character by skipping its leading code.
11118         <CCL_WriteMultibyteChar2>: Handle non-ascii single byte character
11119         correctly.
11121 1999-04-06  Eli Zaretskii  <eliz@gnu.org>
11123         * msdos.c (dos_rawgetc): Don't zero out c if private translation
11124         table was used.
11125         (jp_kbd_translate_table): Support C-\.
11126         (it_kbd_translate_table): Map `>' correctly.
11127         (it_keyboard): Add `>'.
11129 1999-04-06  Richard Stallman  <rms@gnu.org>
11131         * intervals.c (graft_intervals_into_buffer): Turn off
11132         inhibit_modification_hooks around calling Fset_text_properties.
11134 1999-04-05  Kenichi HANDA  <handa@etl.go.jp>
11136         * xterm.c (dumpglyphs): Be sure to fill the whole background of
11137         glyphs.
11139 1999-04-05  Eli Zaretskii  <eliz@gnu.org>
11141         * msdos.c (jp_kbd_translate_table): Fix last change.
11143 1999-04-04  Eli Zaretskii  <eliz@gnu.org>
11145         * msdos.c (struct kbd_translate): New struct, for key translation
11146         tables private to certain national keyboard layouts.
11147         (struct dos_keyboard_map): Add a pointer to a private translation
11148         table.
11149         (jp_kbd_translate_table): Private table for the Japanese
11150         keyboard.
11151         (jp_keyboard): Japanese keyboard layout.
11152         (it_kbd_translate_table): Private table for the Italian keyboard.
11153         (it_keyboard): Use it_kbd_translate_table.
11154         (keyboard_layout_list): Add the Japanese keyboard.
11155         (dos_rawgetc): Use the keyboard-private translation table, if
11156         available.
11157         (abort) [__DJGPP_MINOR__ >= 2]: Raise SIGABRT.
11159 1999-04-02  Kenichi HANDA  <handa@etl.go.jp>
11161         * xdisp.c (redisplay_window): When we call compute_motion with
11162         HPOS got from w->last_point_x, call it with DID_MOTION 1.
11163         (display_text_line): Stop the loop for processing overlay strings
11164         when we reach the right edge of the window.
11166 1999-03-31  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
11168         * doc.c (get_doc_string): When UNIBYTE and DEFINITION are 0,
11169         let the data control whether string is unibyte.
11171 1999-03-30  Richard M. Stallman  <rms@gnu.org>
11173         * macros.c (Fexecute_kbd_macro): Save real_this_command.
11174         (pop_kbd_macro): Restore the saved real_this_command.
11175         (Fcall_last_kbd_macro): Set real_this_command to the macro.
11177 1999-03-26  Richard M. Stallman  <rms@gnu.org>
11179         * buffer.c (Fset_buffer_modified_p): Don't lock or unlock
11180         if buffer-file-name is nil.
11182 1999-03-25  Jason Rumney  <jasonr@altavista.net>
11184         * w32select.c (Fw32_set_clipboard_data): Take into account line
11185         ends when calculating clipboard storage needed for non-ASCII text.
11187 1999-03-25  Andrew Innes  <andrewi@gnu.org>
11189         * makefile.nt (PREPARED_HEADERS): Change name of paths.h to epaths.h.
11190         (epaths.h): Renamed from paths.h.
11191         (clean): 
11192         ($(BLD)\filelock.obj): 
11193         ($(BLD)\lread.obj): 
11194         ($(BLD)\w32fns.obj): Renamed paths.h to epaths.h.
11196 1999-03-23  Ken'ichi Handa  <handa@gnu.org>
11198         * coding.c (encode_coding_iso2022): Initialize dummy arguments to
11199         ENCODE_ISO_CHARACTER for the previous change on this macro.
11201 1999-03-23  Kenichi Handa  <handa@etl.go.jp>
11203         * xdisp.c (decode_mode_spec_coding): Handle integer value in
11204         eoltype correctly for backward compatibility.
11206 1999-03-20  Kenichi HANDA  <handa@etl.go.jp>
11208         * coding.c (ENCODE_ISO_CHARACTER): Check validity of CHARSET.  If
11209         invalid, produce the buffer internal byte sequence without encoding.
11211 1999-03-19  Karl Heuer  <kwzh@gnu.org>
11213         * editfns.c (Fformat): Accept %i format.
11215 1999-03-17  Karl Heuer  <kwzh@gnu.org>
11217         * filelock.c (get_boot_time): Test tempname, not filename.
11219 1999-03-17  Jason Rumney <jasonr@altavista.net>
11221         * w32bdf.h: Merged patches from Meadow; introduce bitmap cache to
11222         speed display.
11224         * w32bdf.c: Merged patches from Meadow; introduce bitmap cache to
11225         speed display.
11226         (get_cached_font_char, cache_char_offset, get_bitmap_with_cache)
11227         New functions.
11228         (w32_free_bdf_font, seek_char, w32_get_bdf_glyph, w32_BDF_TextOut)
11229         Use bitmap cache.
11231         * w32fns.c (enum_font_cb2): Set the font height to be the
11232         character height, not the cell height.
11233         (Fw32_select_font): Initialize font dialog with current default font.
11234         (Vw32_system_coding_system): New variable.
11235         (w32_strict_filenames): Add comment.
11236         (w32_to_x_font): Decode font name using Vw32_system_coding_system.
11237         (x_to_w32_font): Encode font name using Vw32_system_coding_system. 
11238         (syms_of_w32fns): Add w32-system-coding-system.
11240 1999-03-15  Richard M. Stallman  <rms@gnu.org>
11242         * xterm.c (XTread_socket) <ConfigureNotify>:
11243         If cursor pos is outside the new frame size, mark cursor as off.
11245 1999-03-14  Ken'ichi Handa  <handa@gnu.org>
11247         * xdisp.c (try_window_id): Initialize val.ovstring_chars_done to 0.
11249         * xterm.c (x_load_font): Trap X errors so that Emacs doesn't die
11250         by them.
11252 1999-03-14  Richard M. Stallman  <rms@gnu.org>
11254         * macros.c (Fexecute_kbd_macro): Initialize executing_macro_iterations
11255         at beginning.
11257 1999-03-14  Jason Rumney <jasonr@altavista.net>
11259         * w32fns.c (w32_strict_fontnames): New variable.
11260         (Fx_create_frame): Formatting fix.
11261         (w32_load_system_font): Keep trying to load non-existant font
11262         if w32_strict_fontnames is nil. Formatting fix.
11263         (syms_of_w32fns): Add w32-strict-fontnames.
11265         * w32term.c (W32_TEXTOUT): Do not multiply nchars by charset_dim.
11266         (dumpglyphs): Formatting fixes.
11268 1999-03-14  Geoff Voelker  <voelker@cs.washington.edu>
11270         * w32fns.c (w32_wnd_proc): Handle WM_GETMINMAXINFO message.
11272 1999-03-10  Karl Heuer  <kwzh@gnu.org>
11274         * puresize.h (BASE_PURESIZE): Increase to 505000.
11276 1999-03-09  Richard M. Stallman  <rms@gnu.org>
11278         * emacs.c (main) [CLASH_DETECTION]: Call init_filelock.
11280         * filelock.c (init_filelock): New function.
11282 1999-03-09  Dave Love  <fx@gnu.org>
11284         * fileio.c (Ffile_directory_p): Doc fix.
11286 1999-03-05  Richard M. Stallman  <rms@caffeine.ai.mit.edu>
11288         * coding.c (setup_coding_system): Check for CODING_SYSTEM = nil.
11290 1999-03-08  Richard M. Stallman  <rms@gnu.org>
11292         * filelock.c (get_boot_time): Reduce scope of #ifdef BOOT_TIME
11293         to only the part that uses get_boot_time_1.
11295 1999-03-07  Dave Love  <fx@gnu.org>
11297         * fileio.c (Finsert_file_contents): Use xfree.
11299 1999-03-06  Kenichi Handa  <handa@etl.go.jp>
11301         * Makefile.in (callproc.o, coding.o, fileio.o, msdos.o, process.o,
11302         term.o, xselect.o): Depend on ccl.h.
11304 1999-03-05  Geoff Voelker  <voelker@cs.washington.edu>
11306         * makefile.nt: Remove common multiple file compilation commands.
11308 1999-03-04  Takeshi YAMADA <yamada@cslab.kecl.ntt.co.jp>
11310         * fns.c (Fbase64_encode_string): Allocate sufficient memory for
11311         newlines added when the arg NO-LINE-BREAK is nil.
11313 1999-03-04  Karl Heuer  <kwzh@gnu.org>
11315         * search.c (Fstring_match, Fposix_string_match): Doc fix.
11317         * buffer.c (syms_of_buffer): Doc fix for case-fold-search.
11319 1999-03-04  Dave Love  <fx@gnu.org>
11321         * term.c (term_init): Use xmalloc, not malloc.
11323         * callproc.c (Fcall_process): Use xmalloc, xfree.
11325 1999-03-03  Andreas Schwab  <schwab@gnu.org>
11327         * eval.c (Fdefconst): Doc fix.
11329 1999-03-01  Kenichi Handa  <handa@etl.go.jp>
11331         * coding.c: Comment for ISO 2022 encoding mechanism modified.
11333 1999-03-01  Eli Zaretskii  <eliz@gnu.org>
11335         * w16select.c (get_clipboard_data): Always stop at the first null byte.
11337 1999-02-28  Richard M. Stallman  <rms@gnu.org>
11339         * filelock.c (get_boot_time): Support FreeBSD way to read boot-time.
11341         * cmds.c (internal_self_insert): Calculate column properly
11342         in overwrite-of-tab case.
11344 1999-02-27  Andreas Schwab  <schwab@gnu.org>
11346         * emacs.c (main) [DOUG_LEA_MALLOC]: Don't use unsetenv, it calls
11347         malloc in glibc 2.1.
11349 1999-02-26  Richard Stallman  <rms@gnu.org>
11351         * Makefile.in: paths.h and paths.in renamed to epaths.h and epaths.in.
11353         * epaths.in: Renamed from paths.in.
11354         This avoids a conflict with a system header file paths.h on GNU/Linux.
11356         * callproc.c, lread.c, w32fns.c, xfns.c, xrdb.c:
11357         Use epaths.h istead of paths.h.
11359 1999-02-26  Andreas Schwab  <schwab@gnu.org>
11361         * emacs.c (main) [DOUG_LEA_MALLOC]: Work around a bug in glibc's
11362         malloc.
11364 1999-02-25  Dave Love  <fx@gnu.org>
11366         * buffer.c (syms_of_buffer): Doc fix for enable-multibyte-characters.
11368 1999-02-25  Richard Stallman  <rms@gnu.org>
11370         * filelock.c (get_boot_time): Use WTMP_FILE for file name.
11371         (WTMP_FILE): Default definition in case not defined.
11372         (get_boot_time_1): Test that file exists before trying to read it.
11373         
11374 1999-02-25  Ken'ichi Handa  <handa@gnu.org>
11376         * keymap.c (push_key_description): If enable-multibyte-characters
11377         is nil and C is single byte, push C as is.
11379 1999-02-24  Kenichi Handa  <handa@etl.go.jp>
11381         * keymap.c (push_key_description): If enable-multibyte-characters
11382         is non-nil, try to convert unibyte character to multibyte.  For
11383         invalid multibyte character, show all bits by octal form.
11384         (Fsingle_key_description): Check the validity of charset for a
11385         generic character.
11387 1999-02-23  Richard M. Stallman  <rms@gnu.org>
11389         * fileio.c (Ffile_regular_p): Undo previous change.
11391         * eval.c (Fdefconst): Doc fix.
11393         * filelock.c (get_boot_time): Don't use BUFSIZ.
11395 1999-02-22  Andrew Innes  <andrewi@gnu.org>
11397         * makefile.nt ($(BLD)\w32bdf.obj): Add missing continuation character.
11398         (EXTRA_LINK): Do version test with strings.
11400 1999-02-22  Andreas Schwab  <schwab@gnu.org>
11402         * fns.c (Fbase64_encode_string): Fix last change.
11404         * termhooks.h (event_kind): Add user_signal.
11406         * keyboard.c (Qusr1_signal, Qusr2_signal): New variables.
11407         (syms_of_keyboard): Initialize them.
11408         (lispy_user_signals): New variable.
11409         (make_lispy_event): Handle user_signal event type.
11411         * emacs.c: Don't define Qusr1_signal and Qusr2_signal.
11412         (syms_of_emacs): Don't initialize them.
11413         (handle_USR1_signal, handle_USR2_signal): Set event type to
11414         user_signal instead of non_ascii_keystroke, and use plain integers
11415         as code instead of Lisp symbols.
11417 1999-02-21  Eli Zaretskii  <eliz@delysid.gnu.org>
11419         * fileio.c: (lstat) [!S_ISLNK]: Use stat instead of lstat.
11421 1999-02-21  Richard Stallman  <rms@gnu.org>
11423         * filelock.c (get_boot_time_1): Put this in #ifdef BOOT_TIME.
11425         * print.c (print_error_message): Don't crash if (cdr data)
11426         is not a list.
11428 1999-02-21  Eli Zaretskii  <eliz@gnu.org>
11430         * fileio.c (lstat) [!S_ISLNK]: Use stat instead of lstat.
11432 1999-02-20  Andrew Innes  <andrewi@gnu.org>
11434         * vm-limit.c (memory_warnings) [WINDOWSNT]: Reset lim_data on each
11435         run, since size can vary from run to run.
11437         * makefile.nt (EXTRA_LINK, LINK_FLAGS): Ensure base relocation
11438         data is included, to enable profiling.
11439         ($(EMACS)): Map file not needed for emacs.exe.
11441         * emacs.c (main): [!SYSTEM_MALLOC]: Call realloc and free as well
11442         as malloc before calling uninterrupt_malloc, for consistency.
11443         This also enables profiling to work on WINDOWSNT.
11445 1999-02-18  Richard Stallman  <rms@gnu.org>
11447         * Makefile.in (emacs.o): Depend on termhooks.h.
11448         (filelock.o): Depend on systime.h.
11450 1999-02-18  Ken'ichi Handa  <handa@gnu.org>
11452         * coding.c (Fdecode_sjis_char): Use %x for formatting error message.
11453         (Fdecode_big5_char): Likewise.
11455 1999-02-17  Richard Stallman  <rms@gnu.org>
11457         * insdel.c (adjust_markers_for_replace): When doing an insertion
11458         (replacing a region of zero length), handle markers at the
11459         insertion point properly.
11461 1999-02-17  Andrew Innes  <andrewi@gnu.org>
11463         * w32fns.c (Vw32_quit_key): New variable.
11464         (post_character_message): Use it.
11465         (syms_of_w32fns): DEFVAR it.
11467 1999-02-16  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
11469         * fns.c (Fbase64_encode_string): New optional argument `NO_LINE_BREAK'.
11471 1999-02-16  Richard Stallman  <rms@gnu.org>
11473         * filelock.c (within_one_second): New function.
11474         (current_lock_owner): Use that.
11475         (get_boot_time): Use /proc/uptime if available.
11476         Otherwise, if nothing found in wtmp, try wtmp.1.gz and so on.
11477         (get_boot_time_1): New subroutine taken from get_boot_time.
11478         
11479 1999-02-16  Richard Stallman  <rms@gnu.org>
11481         * emacs.c (Qusr1_signal, Qusr2_signal): New variables.
11482         (syms_of_emacs): Init and staticpro them.
11483         (handle_USR1_signal): Don't run any code, just queue up an event.
11484         (handle_USR2_signal): Likewise.
11486 1999-02-16  Eli Zaretskii  <eliz@gnu.org>
11488         * dired.c (Ffile_attributes): If the file's size doesn't fit in
11489         an integer, return it as a float.  Doc string fixed.
11491 1999-02-16  Richard Stallman  <rms@gnu.org>
11493         * emacs.c (Qusr1_signal, Qusr2_signal): New variables.
11494         (syms_of_emacs): Init and staticpro them.
11495         (handle_USR1_signal): Don't run any code, just queue up an event.
11496         (handle_USR2_signal): Likewise.
11498 1999-02-15  Kenichi Handa  <handa@etl.go.jp>
11500         * coding.c (Fdecode_sjis_char, Fencode_sjis_char): Handle
11501         ASCII correctly.  Signal error on invalid characters.
11502         (Fdecode_big5_char, Fencode_big5_char): Likewise.
11504 1999-02-15  Eli Zaretskii  <eliz@gnu.org>
11506         * w16select.c (get_clipboard_data): Work around a bug in Windows95
11507         DOS box which doubles the reported size of text in the clipboard.
11509 1999-02-15  Kenichi Handa  <handa@etl.go.jp>
11511         * coding.c (decode_coding_iso2022): Don't set
11512         coding->composed_chars to 0 here.
11513         (setup_coding_system): Set coding->composed_chars to 0 here.
11515 1999-02-10  Richard Stallman  <rms@gnu.org>
11517         * fileio.c (Ffile_regular_p): Use lstat.
11519 1999-02-09  Richard Stallman  <rms@gnu.org>
11521         * unexelf.c (HAS_SBSS_SECTION): Define this in some cases.
11522         (unexec): Test this instead of specific systems.
11524         * m/macppc.h: New file.
11526 1999-02-08  Dave Love  <fx@gnu.org>
11528         * fns.c (Fyes_or_no_p, Fy_or_n_p): Doc fix.
11530 1999-02-08  Ken'ichi Handa  <handa@gnu.org>
11532         * coding.c (ccl_coding_driver): On encoding, coding->produced_char
11533         should be set to coding->produced.
11535 1999-02-07  Paul Fisher  <rao@gnu.org>
11537         * fns.c (IS_BASE64_IGNORABLE, READ_QUADRUPLET_BYTE): New macros.
11538         (base64_decode_1): Use READ_QUADRUPLET_BYTE.
11540 1999-02-07  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
11542         * editfns.c (Fformat): Doc fix.
11544 1999-02-06  Richard Stallman  <rms@gnu.org>
11546         * process.c (syms_of_process): defsubr it.
11547         (Fprocess_running_child_p): New function.
11549 1999-02-05  Andrew Innes  <andrewi@gnu.org>
11551         * w32term.c (construct_drag_n_drop): Call DraqQueryPoint before
11552         recording drop position.
11554 1999-02-05  Ken'ichi Handa  <handa@gnu.org>
11556         * coding.c (encode_coding_iso2022): Before writing out an invalid
11557         code, reset graphic planes and registers if necessary.
11559         * term.c (encode_terminal_code): Fix previous change.
11561 1999-02-04  Eli Zaretskii  <eliz@gnu.org>
11563         * w16select.c (last_clipboard_text, clipboard_storage_size): New
11564         static variables.
11565         (set_clipboard_data): Save a copy of the text we put into
11566         clipboard in last_clipboard_text.
11567         (get_clipboard_data): If the clipboard text is identical to what
11568         last_clipboard_text holds, pretend there's no data in the clipboard.
11570 1999-02-03  Richard Stallman  <rms@gnu.org>
11572         * s/gnu.h (NLIST_STRUCT): Add #undef.
11574 1999-02-03  Eli Zaretskii  <eliz@gnu.org>
11576         * w16select.c (Fw16_set_clipboard_data): When the text needs to be
11577         encoded, set its pointer and size as returned by encode_coding.
11579 1999-02-02  Ken'ichi Handa  <handa@gnu.org>
11581         * fns.c (Fset_char_table_default): To handle the case that CH is
11582         an ASCII char, use SPLIT_CHAR instead of SPLIT_NON_ASCII_CHAR.
11584 1999-02-02  Andrew Innes  <andrewi@gnu.org>
11586         * w32fns.c (syms_of_w32fns): Change default value of
11587         w32-mouse-move-interval to 0, so that the mouse wheel/rocker on
11588         some mice works properly.
11590 1999-02-02  Eli Zaretskii  <eliz@gnu.org>
11592         * w16select.c (set_clipboard_data): Correctly null-terminate the
11593         string to be put into the Windows clipboard.  Use xbuf_addr.
11595 1999-02-01  Richard Stallman  <rms@gnu.org>
11597         * buffer.c (Fset_buffer_multibyte): Error if buffer is indirect.
11599 1999-01-31  Richard Stallman  <rms@gnu.org>
11601         * process.c (process_send_signal): If CURRENT_GROUP is `lambda'
11602         then don't send the signal if the shell owns the terminal.
11603         (Finterrupt_process): Doc change.
11604         
11605 1999-01-31  Andrew Innes  <andrewi@gnu.org>
11607         * unexw32.c: (ROUND_UP_DST_AND_ZERO): New macro.
11608         (copy_executable_and_dump_data): Use it to ensure alignment slop
11609         is zeroed.
11611 1999-01-30  Andrew Innes  <andrewi@gnu.org>
11613         * w32.c (init_environment): Change argv[0] to contain the full
11614         path to Emacs.
11616         * emacs.c (main) [WINDOWSNT]: Pass argv to init_environment.
11618 1999-01-29  Ken'ichi Handa  <handa@gnu.org>
11620         * xterm.c (x_new_fontset): For ASCII font, don't use the font name
11621         returned by x_new_font (the resolved one) but use the font name
11622         set in the fontset specification.
11623         (x_load_font): For the height of font, if normarl ascent and
11624         descent value are larger than those in max_bounds field, use the
11625         former.
11627 1999-01-28  Eli Zaretskii  <eliz@gnu.org>
11629         * xdisp.c (decode_mode_spec_coding): Fix previous change.
11631 1999-01-27  Geoff Voelker  <voelker@cs.washington.edu>
11633         * makefile.nt: Use full path to temacs.exe when dumping.
11635 1999-01-27  Jason Rumney <jasonr@altavista.net>
11637         * w32fns.c (w32_load_system_font): Do not load unlisted fonts if
11638         list was reliable.
11639         (enum_fontex_cb1, enum_fontex_cb2): New functions.
11640         (w32_list_bdf_fonts): New parameter; max_names.  Callers updated.
11641         (w32_list_synthesized_fonts): New function.
11642         (w32_list_fonts): Use maxnames.  Use EnumFontFamiliesEx when
11643         available instead of EnumFontFamilies.  List synthesized fonts if
11644         Vw32_enable_italics is non-nil.
11645         
11646 1999-01-27  Richard Stallman  <rms@gnu.org>
11648         * s/ptx4.h (SETUP_SLAVE_PTY): Use the ptem module if it exists.
11649         Don't complain if ttcompat does not exist.
11651         * w32fns.c (x_set_frame_parameters): gcpro as needed.
11653 1999-01-27  Andrew Innes  <andrewi@gnu.org>
11655         * w32fns.c (w32_wnd_proc): Fix bug introduced by previous change;
11656         the lwindow, rwindow and apps keys could not be used as function
11657         keys, because they were being passed to TranslateMessage which
11658         ignores them.  Also, key was being changed to SPC.
11660         * makefile.nt: Do make version comparison as strings.
11662 1999-01-27  Eli Zaretskii  <eliz@gnu.org>
11664         * coding.c (syms_of_coding): eol-mnemonic-* variables are now
11665         strings, not characters.
11667         * coding.h: Likewise.
11669         * xdisp.c (decode_mode_spec_coding): Display the EOL type as a
11670         string.
11672 1999-01-26  Dave Love  <fx@gnu.org>
11674         * emacs.c (main): Up-date copyright.
11676 1999-01-25  Dave Love  <fx@gnu.org>
11678         * coding.c (syms_of_coding): Doc fix for inhibit-eol-conversion.
11680 1999-01-25  Andreas Schwab  <schwab@gnu.org>
11682         * eval.c (Fsignal): Move comment to avoid confusing make-docfile.
11684 1999-01-23  Richard M. Stallman  <rms@borg.ai.mit.edu>
11686         * xfns.c (x_set_frame_parameters): gcpro as needed.
11688         * window.c (Fset_window_point): If WINDOW is selected but the
11689         current buffer is not its buffer, don't use Fgoto_char.
11691 1999-01-22  Richard M. Stallman  <rms@gnu.org>
11693         * syntax.c (scan_sexps_forward): Delete duplicate code
11694         to set prev_from_syntax, above start of main loop.
11695         At startinstring, check syntax when checking for a match.
11697 1999-01-22  Jason Rumney <jasonr@altavista.net>
11699         * w32bdf.c: New file.
11700         * w32bdf.h: New file.
11701         * makefile.nt: Add w32bdf.c and w32bdf.h.
11703         * w32gui.h: Include w32bdf.h.
11704         (W32FontStruct) Add bdf element.
11706         * w32term.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_MAX_WIDTH):
11707         Support BDF fonts.
11709         * w32term.c (W32_TEXTOUT): New macro.
11710         (dumpglyphs): Support BDF fonts.  Use W32_TEXTOUT macro.
11711         Simplify baseline calculation.  Detect SJIS by font, not glyph.
11712         Call SetTextAlign.
11713         (syms_of_w32term): Remove "jisx0212-sjis" from
11714         w32-charset-to-codepage-alist.
11715         Replace "ksc5601" with "ksc5601.1987" in w32-charset-to-codepage-alist.
11716         Add "ksc5601.1992' to w32-charset-to-codepage-alist.
11717         
11718         * w32fns.c (Vw32_bdf_filename_alist): New variable.
11719         (x_destroy_bitmap): Returns void not int.
11720         (x_set_border_pixel): Returns void.
11721         (w32_load_bdf_font): New function.
11722         (w32_load_system_font): New function, was w32_load_font.  List
11723         fonts before loading.  Explicitly set encoding for SJIS fonts.
11724         Set default_ascent to 0 as comment indicates.
11725         (w32_load_font): Call w32_load_system_font and w32_load_bdf_font.
11726         (w32_unload_font): Support BDF fonts.
11727         (w32_to_x_charset): Fix mappings to avoid wildcard mismatches.
11728         Autodetect whether to use koi8-r instead of iso8859-5.
11729         Associate "ksc5601.1987" with HANGUEL_CHARSET.
11730         Associate "ksc5601.1992" with JOHAB_CHARSET.
11731         (x_to_w32_charset): Make consistent with w32_to_x_charset.
11732         (w32_to_x_font): Add resolution.
11733         (x_to_w32_font): Use font resolution to calculate height if supplied.
11734         (w32_font_match): Handle wildcards anywhere within field.
11735         (enumfont_t): Remove unused head pointer.
11736         (enum_font_cb2): Dereference elfLogFont.
11737         (w32_list_bdf_fonts): New function.
11738         (w32_list_fonts): Use one_w32_dispay_info instead of insisting on
11739         valid frame.  Remove MessageBox.  Support BDF fonts.
11740         (Fw32_find_bdf_fonts): New function.
11741         (syms_of_w32fns): Add Vw32_bdf_filename_alist and
11742         Sw32_find_bdf_fonts.
11744 1999-01-21  Andrew Innes  <andrewi@gnu.org>
11746         * makefile.nt (temacs): Use del to delete file, not rm.
11748 1999-01-19  Richard Stallman  <rms@psilocin.ai.mit.edu>
11750         * keyboard.c (read_key_sequence): Fix previous change.
11752         * xterm.c (same_x_server): Detect treat ":0" and "unix:0"
11753         as the same.  Treat "myname:0" as the same as those two.
11755 1999-01-19  Jason Rumney <jasonr@altavista.net>
11757         * w32fns.c (x_to_w32_charset): Add iso8859-9.
11758         (w32_to_x_charset): Fix charset mappings.
11760         * w32term.c: Remove codepage macros. Remove redundant BIG5 macros.
11761         (dumpglyphs): Move definitions out of block containing goto.
11762         Remove redundant code for BIG5.
11763         Use w32_codepage_for_font instead of
11764         w32_codepage_for_charset.  Add cast to int where float
11765         operation is assigned to int.
11766         (Vw32_charset_to_codepage_alist): New variable.
11767         (w32_codepage_for_charset): Removed.
11768         (w32_codepage_for_font): New function, replacing 
11769         w32_codepage_for_charset. 
11770         (syms_of_w32term): Add and initialize
11771         w32-charset-to-codepage-alist.
11773 1999-01-17  Richard Stallman  <rms@psilocin.ai.mit.edu>
11775         * xselect.c (x_handle_selection_clear): Don't clear the
11776         selection if Emacs still owns it through a different display.
11778 1999-01-17  Andrew Innes  <andrewi@gnu.org>
11780         * w32proc.c: (w32_executable_type): Relax the check to identify
11781         cygwin-compiled applications, because the exact dll name varies
11782         with release.  Now only require the name to start "cygwin".
11784         * w32heap.h: (ROUND_UP):
11785         (ROUND_DOWN): New macros.
11786         (need_to_recreate_heap): Renamed to using_dynamic_heap.
11787         (init_heap): New extern.
11788         (data_region_size):
11789         (recreate_heap):
11790         (read_in_bss):
11791         (map_in_heap):
11792         (round_to_next):
11793         (w32_fatal_reload_error):
11794         (get_section_size): Obsolete externs removed.
11796         * w32heap.c: (RVA_TO_PTR): Redefine to convert RVA to address in
11797         current process.
11798         (round_to_next): Obsolete function removed.
11799         (preload_heap_section): New variable.
11800         (data_region_size): Obsolete variable removed.
11801         (allocate_heap): Modified to determine end of static heap section
11802         used during preload, and use that as initial base address for
11803         dynamic heap instead of hard-coded value.
11804         (sbrk): Remove call to allocate_heap; handled by init_heap.  Skip
11805         calls to commit or decommit pages when allocating from static heap
11806         section during preload.
11807         (recreate_heap): Obsolete function removed.
11808         (init_heap): New function to initialize internal sbrk heap
11809         variables.  Uses static heap section during preload, otherwise
11810         calls allocate_heap to reserve a heap region dynamically.
11811         (round_heap): Use ROUND_UP macro instead of round_to_next.
11813         * unexw32.c: Major rewrite to support cleaner method of dumping; a
11814         static "bss" section is used for heap space during preload, and
11815         bss data is now written to the proper section area when dumping.
11816         (need_to_recreate_heap): Renamed to using_dynamic_heap.
11817         (heap_index_in_executable): Obsolete variable removed.
11818         (data_section): New variable.
11819         (data_start_va): Renamed to data_start.
11820         (data_start_file): Obsolete variable removed.
11821         (bss_section):
11822         (extra_bss_size):
11823         (bss_section_static):
11824         (bss_start_static):
11825         (bss_size_static):
11826         (extra_bss_size_static):
11827         (heap_section): New variables.
11828         (_start): Remove code based on old unexec method.  Call init_heap
11829         to initialize sbrk heap.
11830         (close_file_data): Update size of file when closing, so that
11831         unexec doesn't have to work out exact size in advance.
11832         (get_bss_info_from_map_file):
11833         (get_section_size): Obsolete functions removed.
11834         (rva_to_section): Fix minor bug, and add a work-around for a bug
11835         in very old linkers.
11836         (offset_to_section):
11837         (relocate_offset): New functions.
11838         (OFFSET_TO_RVA):
11839         (RVA_TO_OFFSET):
11840         (RVA_TO_SECTION_OFFSET):
11841         (PTR_TO_RVA):
11842         (PTR_TO_OFFSET):
11843         (OFFSET_TO_PTR): New macros.
11844         (get_section_info): Modify to support new unexec method;
11845         determines address ranges in process that need dumping, and COFF
11846         sections where data will be dumped.  Allows for static and global
11847         bss data to be in separate ranges.  No longer relies on knowledge
11848         of section names.
11849         (copy_executable_and_dump_data_section): Renamed
11850         copy_executable_and_dump_data.  Completely rewritten to copy
11851         executable section by section, so that raw data areas can be
11852         expanded to hold dumped data as necessary.  Allows for bss data to
11853         be in same section as initialized data.  Reduces size of static
11854         heap section to that used during preload.
11855         (dump_bss_and_heap):
11856         (w32_fatal_reload_error):
11857         (read_in_bss):
11858         (map_in_heap): Obsolete functions removed.
11859         (unexec): Rounds off preload heap to nearest page rather than
11860         virtual allocation unit.  Modified to match other changes.
11862         * mem-limits.h: (get_lim_data): Use reserved_heap_size instead of
11863         data_region_size.
11865         * makefile.nt: (TEMACS_TMP): New macro.
11866         ($(TEMACS)): Output to TEMACS_TMP from link, use post-link
11867         processor to add static heap section in support of new unexec.
11869         * lastfile.c: Include config.h to pick up data layout pragmas.
11870         [WINDOWSNT]: Remove explicit pragma.
11872 1999-01-12  Kenichi Handa  <handa@etl.go.jp>
11874         * coding.c (Fdecode_sjis_char): Decode Japanese Katakana character
11875         correctly.
11876         (Fencode_sjis_char): Encode Japanese Katakana character correctly.
11878 1999-01-11  Dave Love  <fx@gnu.org>
11880         * coding.c (syms_of_coding): Doc fix for inhibit-eol-conversion.
11882 1999-01-11  Richard Stallman  <rms@psilocin.ai.mit.edu>
11884         * keyboard.c (read_key_sequence): In key-translation-map and
11885         function-key-map, handle symbol with array as fn def.
11886         In function-key-map, handle symbol with keymap as fn def,
11887         and autoloaded definitions.
11888         
11889         * puresize.h (BASE_PURESIZE): Increment to 500000.
11891         * print.c (Qtemp_buffer_setup_hook): New variable.
11892         (syms_of_print): Init and staticpro that.
11893         (temp_output_buffer_setup): Run Qtemp_buffer_setup_hook.
11895 1999-01-11  Kenichi Handa  <handa@etl.go.jp>
11897         * insdel.c (del_range_1): Call signal_after_change.
11898         (del_range_byte): Likewise.
11899         (del_range_both): Likewise.
11900         (del_range_2): Don't call signal_after_change.
11902         * xdisp.c (message_dolog): Use insert_1_both to avoid running any
11903         Lisp code here.
11905 1999-01-07  Richard Stallman  <rms@psilocin.ai.mit.edu>
11907         * eval.c (find_handler_clause): If SIG is nil (memory full error),
11908         never run the debugger, and don't bother checking the args
11909         to see whether the debugger should be run.
11911 1999-01-06  Richard Stallman  <rms@psilocin.ai.mit.edu>
11913         * keyboard.c (read_key_sequence):
11914         Tell get_keyelt to look handle autoloads.
11915         Handle symbols defined as keymaps, and autoloaded keymaps.
11917 1999-01-06  Kenichi Handa  <handa@etl.go.jp>
11919         * search.c (search_buffer): Fix previous change.
11921 1999-01-06  Eli Zaretskii  <eliz@gnu.org>
11923         * w16select.c (set_clipboard_data): Terminate the text with a null
11924         character.  Don't allow to put binary data into the clipboard.
11925         Return zero in case of success, 1 or 2 otherwise.
11926         (get_clipboard_data): Only bail out if the null character is in
11927         the last 32-byte chunk of clipboard data
11928         (Fw16_set_clipboard_data): Make ok and put_status be unsigned.  If
11929         they save binary data, print a message in the echo area saying the
11930         text was not put into the clipboard.
11932         * msdos.c (IT_write_glyphs): Move constant expression out of the loop.
11934 1999-01-06  Andreas Schwab  <schwab@gnu.org>
11936         * systty.h [__GLIBC__ >= 2]: Check __FAVOR_BSD instead of
11937         _BSD_SOURCE, the latter is always defined.
11939 1999-01-05  Richard Stallman  <rms@psilocin.ai.mit.edu>
11941         * fns.c (Frequire): Don't fail to unbind bindings.
11943 1999-01-02  Richard Stallman  <rms@psilocin.ai.mit.edu>
11945         * emacs.c (main) [DOUG_LEA_MALLOC]: Don't call r_alloc_reinit.
11947         * charset.c (Ffind_charset_region): Fix doc typo.
11949 1998-12-31  Eli Zaretskii  <eliz@mescaline.gnu.org>
11951         * msdos.c (IT_write_glyphs): Convert unibyte characters to
11952         multibyte in unibyte buffers only.
11954         * keymap.c (Fdefine_prefix_command): Accept a third argument NAME
11955         and pass it to Fmake_sparse_keymap.
11957 1998-12-29  Richard Stallman  <rms@psilocin.ai.mit.edu>
11959         * alloc.c (MMAP_MAX_AREAS): New macro.
11960         (allocate_vectorlike, make_uninit_multibyte_string): Use that.
11961         (init_alloc_once): Use that.
11963         * s/gnu-linux.h [DOUG_LEA_MALLOC] (REL_ALLOC): Undefine it.
11965         * alloc.c (lisp_malloc, lisp_free): New functions.
11966         Use them instead of malloc, xmalloc, and xfree, for Lisp objects.
11967         Don't set allocating_for_lisp in the callers; let lisp_malloc do it.
11968         (n_interval_blocks, n_float_blocks): New variable.
11969         (n_cons_blocks, n_vectors, n_symbol_blocks): New variable.
11970         (n_marker_blocks, n_string_blocks): New variable.
11971         (init_intervals, make_interval): Set a count variable.
11972         Use lisp_malloc instead of setting allocating_for_lisp.
11973         (init_float, make_float, init_cons, Fcons): Likewise.
11974         (allocate_vectorlike, init_symbol, Fmake_symbol): Likewise
11975         (init_marker, allocate_misc, init_strings): Likewise.
11976         (make_uninit_multibyte_string): Likewise.
11977         (gc_sweep, compact_strings): Decrement the count variables.
11979         * alloc.c (uninterrupt_malloc): Don't store Emacs's hooks
11980         into the old_..._hook variables.
11982 1998-12-28  Richard Stallman  <rms@psilocin.ai.mit.edu>
11984         * keyboard.c: In each active map, for each menu bar item, use only
11985         the first submap.
11986         (menu_bar_one_keymap): Initialize menu_bar_one_keymap_changed_items.
11987         (menu_bar_item): Update and test menu_bar_one_keymap_changed_items.
11988         (syms_of_keyboard): Staticpro and init it.
11990         * xmenu.c (single_keymap_panes): 
11992 1998-12-28  Andrew Innes  <andrewi@delysid.gnu.org>
11994         * w32fns.c (w32_msg_pump): Ignore WM_NULL message posted to thread
11995         by complete_deferred_msg.
11996         (post_character_message): Cancel all deferred messages when
11997         quit_char is typed, in order to break out of potential deadlocks.
11998         (cancel_all_deferred_msgs): New function.
11999         (complete_deferred_msg): Don't abort if msg not found; may have
12000         been cancelled.
12001         (Fw32_reconstruct_hot_key): Use pre-interned symbols.
12002         (Fw32_send_sys_command): Wait for system command to
12003         complete before returning.
12005         * w32term.c (x_iconify_frame): Wait for frame to be iconified; do
12006         not set async_iconified flag though.
12008         * w32proc.c: (Vw32_start_process_inherit_error_mode): New variable.
12009         (create_child): Use it.
12010         (syms_of_ntproc): Defvar it.  Also fix docstrings for
12011         w32-start-process-share-console and w32-start-process-show-window.
12013         * unexw32.c (_start): Force system calls accessing unmounted
12014         devices to fail without prompting.
12016 1998-12-26  Richard Stallman  <rms@psilocin.ai.mit.edu>
12018         * emacs.c (main): Call memory_warnings and uninterrupt_malloc
12019         even when starting the dumped Emacs.
12021         * keymap.c (Fsingle_key_description): Handle (control ?x) etc.
12022         (Fkey_description): Handle lists like vectors.
12024 1998-12-21  Kenichi Handa  <handa@etl.go.jp>
12026         * callint.c (Fcall_interactively) <'C'>: Give Fread_char Qnil
12027         because of the change of the second argument of Fread_char.
12029         * charset.c (Fcharset_after): Check range.  If POS is out of
12030         range, return nil.
12032         * keyboard.c (read_char): Don't bind input-method-exit-on-first-char.
12034         * lread.c (Fread_char): Change the meaning of the second argument.
12035         (Fread_event): Likewise.
12036         (Fread_char_exclusive): Likewise.
12038         * print.c (printchar): Fix previous change.
12040         * process.c (read_process_output): Decide the multibyteness of
12041         string given to a process filter by a coding system used for
12042         decoding the process output.
12044 1998-12-21  Eli Zaretskii  <eliz@mescaline.gnu.org>
12046         * xterm.c (dumpglyphs): Don't convert 7-bit ASCII characters via
12047         nonascii-translation-table.
12048         * msdos.c (IT_write_glyphs): Likewise.
12049         * fns.c (concat): Likewise.
12050         * charset.c (unibyte_char_to_multibyte): Likewise.
12051         * insdel.c (copy_text, count_size_as_multibyte): Likewise.
12053 1998-12-21  Andreas Schwab  <schwab@delysid.gnu.org>
12055         * doc.c (Fdocumentation): Change the doc string for prefix
12056         commands to make it a complete sentence in one line.
12058 1998-12-16  Petri Kaurinkoski  <Petri.Kaurinkoski@hut.fi>
12060         * s/irix6-5.h: New file.
12061         * s/irix6-0.h (IRIX6): Define this symbol.
12062         * s/usg5-4.h (TIOCSIGSEND): Don't define this if irix6.
12063         (bcopy, bcmp, bzero): Likewise.
12064         * m/iris4d.h (LIBS_MACHINE): Leave this blank if irix6.5.
12065         (C_SWITCH_MACHINE): New value for irix6.5.
12067 1998-12-15  Richard Stallman  <rms@gnu.org>
12069         * fns.c (Fbase64_decode_region, Fbase64_decode_string):
12070         Do free malloc'd memory even in case of failure.  Use xfree, not free.
12071         (Fbase64_encode_region, Fbase64_encode_string): Use xfree, not free.
12072         (base64_decode_1): Don't fail for short lines.
12074         * print.c (printchar): Outputting multibyte characters
12075         to echo area always makes it multibyte.
12077         * search.c (search_buffer): Don't use Boyer-Moore
12078         to search for an invalid multibyte code.
12079         In unibyte case, no need to check whether there are translations
12080         in more than one charset; just set charset_base to 0.
12082 1998-12-15  Ken'ichi Handa  <handa@delysid.gnu.org>
12084         * print.c (printchar): Cancel previous change.
12086 1998-12-15  Kenichi Handa  <handa@etl.go.jp>
12088         * callproc.c: Include "ccl.h".
12089         (Fcall_process): Doc-string modified.  Set CODING_MODE_LAST_BLOCK
12090         bit in argument_coding.mode to tell encoding procedure to flush
12091         data.  While encoding arguments, if argument_coding uses CCL
12092         program, initialize it again after encoding.
12093         (Fcall_process_region): Doc-string modified.  Handle the case that
12094         NARGS is 3.
12096         * ccl.c (CCL_SUCCESS): Don't set ccl->ic.
12097         (ccl_driver) <CCL_End>: Pretend that all source text is consumed.
12098         Set `ic' to the head of this command.
12099         (ccl_driver) <CCL_ReadMultibyteChar2>: Return a single byte 8-bit
12100         code for an invalid code.
12101         (setup_ccl_program): If the arg VEC is nil, skip setting ups
12102         based on VEC.
12104         * charset.c (Qunknown): New variable.
12105         (init_charset_once): Intern and staticpro Qunknown.  Initialize
12106         all elements of Vcharset_symbol_table to Qunknown.
12107         (find_charset_in_str): New arg MULTIBYTE.  If it is zero, check
12108         unibyte characters only.  For an invalid composition sequence, set
12109         CHARSETS[1] to 1.
12110         (Ffind_charset_region): Call find_charset_in_str with an
12111         appropriate MULTIBYTE arg.  If undefined charsets are found,
12112         include `unknown' is the return value.
12113         (Ffind_charset_string): Likewise.
12114         (Fsplit_char): If CHAR is invalid, return `(unknown CHAR)'.
12115         (str_cmpchar_id): Max composite character code should be less than
12116         GENERIC_COMPOSITION_CHAR.
12118         * charset.h (find_charset_in_str): Update declaration.
12120         * coding.c (DECODE_DESIGNATION): Jump to label_invalid_code if
12121         final_char is invalid.
12122         (decode_coding): If coding->type is coding_type_ccl, call
12123         ccl_coding_driver even if SRC_BYTES is zero.
12124         (code_convert_region): Update `inserted' correctly after calling
12125         coding->post_read_conversion.  Even after the code converter
12126         consumed all source text, call it once more if it is
12127         coding_type_ccl to flush out data.
12129         * fileio.c (Finsert_file_contents): Even if INSERTED is zero, if
12130         CODING is handled by CCL program, call code_convert_region.
12132         * fns.c (string_char_to_byte): Handle invalid multibyte sequence
12133         correctly.
12134         (string_byte_to_char): Likesize.
12136         * print.c (printchar): When outputting a multibyte character to
12137         echo area, always set message_enable_multibyte to 1.
12139         * process.c (read_process_output): If NBYTES is zero and
12140         CODING_MODE_LAST_BLOCK bit is not yet set in coding->mode, set it
12141         and try decoding again.
12142         (Fprocess_send_eof): If the coding system of PROCESS
12143         requires flushing, call send_process with null-string at first.
12145         * w16select.c (Fw16_set_clipboard_data): Call find_charset_in_str
12146         with MULTIBYTE arg 0.
12147         * w32select.c (Fw32_set_clipboard_data): Likewise.
12148         * xselect.c (lisp_data_to_selection_data): Likewise.
12150 1998-11-30  Richard Stallman  <rms@psilocin.ai.mit.edu>
12152         * search.c (Freplace_match): Set OPOINT clearly for the case
12153         where point is in the middle of the text to be replaced.
12155         * xdisp.c (display_text_line): When handling HPOS < 0 after loop,
12156         if compute_motion fails to advance at all, don't back it up.
12158 1998-12-10  Geoff Voelker  <voelker@cs.washington.edu>
12160         * w32.c (w32_get_long_filename): Handle root dirs correctly.
12162         * s/ms-w32.h (LOCALTIME_CACHE): Define. 
12164 1998-12-09  Richard Stallman  <rms@gnu.org>
12166         * insdel.c (insert_from_buffer_1): Properly count the size
12167         of output from conversion to multibyte even when input
12168         is split across the gap.
12170 1998-12-09  Karl Heuer  <kwzh@gnu.org>
12172         * keyboard.c: Doc fixes.
12174         * s/irix4-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Increase space.
12176 1998-12-08  Andrew Innes  <andrewi@harlequin.co.uk>
12178         * w32select.c (Fw32_get_clipboard_data): Do not delete isolated CR
12179         characters, only convert CRLF to LF.
12181 1998-12-08  Geoff Voelker  <voelker@cs.washington.edu>
12183         * makefile.nt: Do string comparision of _NMAKE_VER.
12185 1998-12-06  Eli Zaretskii  <eliz@mescaline.gnu.org>
12187         * Makefile.in (msdos.o): Depend on termchar.h, charset.h,
12188         coding.h, and disptab.h
12190         * msdos.c (Vdos_unsupported_char_glyph): New variable.
12191         (syms_of_msdos): DEFVAR_LISP it.
12192         (IT_insert_glyphs, IT_delete_glyphs): New functions which abort Emacs.
12193         (internal_terminal_init): Set up insert_glyphs_hook and
12194         delete_glyphs_hook to call them.  Explicitly set char_ins_del_ok to 0.
12195         (unibyte_display_via_language_environment): New variable.
12196         (syms_of_msdos): Devfar it.
12197         (IT_write_glyphs): Honor glyph aliasing via Vglyph_table.
12198         Encode the character codes of the glyphs according to the
12199         terminal_coding in effect.
12201 1998-12-04  Andreas Schwab  <schwab@delysid.gnu.org>
12203         * fns.c (Fstring_as_unibyte): Doc fix.
12205 1998-12-03  Andreas Schwab  <schwab@delysid.gnu.org>
12207         * charset.h: Declare char_valid_p.
12209 1998-12-03  Eli Zaretskii  <eliz@mescaline.gnu.org>
12211         * dosfns.c (dos_cleanup): Flush and fsync the termscript stream.
12213         * msdos.c (init_environment): Record the time we started up.
12214         (IT_reset_terminal_modes): Don't restore the screen if we exit too
12215         fast after startup (aka crash).
12217 1998-12-02  Geoff Voelker  <voelker@cs.washington.edu>
12219         * w32.c (check_windows_init_file): Use decode_env_path when
12220         using EMACSLOADPATH.
12222 1998-12-02  Jason Rumney  <jasonr@altavista.net>
12224         * w32term.c (dumpglyphs): Use unsigned char arrays.
12225         Use FONT_MAX_WIDTH to detect and fudge proportional fonts
12226         for various languages.
12227         Compensate for fonts that have underhangs (e.g., Thai).
12229         * w32term.h (FONT_MAX_WIDTH): New macro.
12231 1998-12-02  Andrew Innes  <andrewi@harlequin.co.uk>
12233         * keyboard.c (Qlanguage_change): New variable.
12234         (syms_of_keyboard): Init it.
12235         (kbd_buffer_get_event) [WINDOWSNT]: Generate language-change events.
12236         (lispy_function_keys) [HAVE_NTGUI]: Remove names for modifier
12237         keys; add name for Escape key; extend to 256 elements.
12238         (parse_modifiers): Make non-static.
12240         * keyboard.h (parse_modifiers): Declare prototype.
12242         * termhooks.h (event_kind) [WINDOWSNT]: Define language_change_event.
12244         * w32fns.c (w32_last_error): Fix cut+paste error.
12245         (Vw32_phantom_key_code): New variable.
12246         (Qhyper, Qsuper, Qmeta, Qalt, Qctrl, Qcontrol, Qshift): New variables.
12247         (syms_of_w32fns): Init and register them.
12248         (reset_modifiers): Use a more precise test for whether Emacs has
12249         keyboard focus.  Synchronize state of all keys that can be used as
12250         modifiers, to overcome problems arising from hot-keys.
12251         (w32_key_to_modifier): Be careful not to call intern() to avoid
12252         requiring thread synchronization.
12253         (w32_msg_pump): Handle new WM_EMACS_TOGGLE_LOCK_KEY message.
12254         (w32_wnd_proc): Ensure lock key indicator lights are updated
12255         promptly on Windows 9x, by passing key events on to the system.
12256         (w32_wnd_proc): Use Vw32_phantom_key_code to stop system
12257         responding to Windows key events when not wanted.
12258         (w32_wnd_proc): Undo the mapping of Ctrl-Pause into cancel and
12259         Ctrl-NumLock into pause by the system.
12260         (w32_wnd_proc): Don't translate key combinations containing any
12261         modifiers other than shift (and capslock).
12262         (w32_wnd_proc): Reset modifier key states when receiving focus (we
12263         can't determine the key states until we have keyboard focus).
12264         (Fw32_toggle_lock_key): New function.
12265         (syms_of_w32fns): Defsubr it.
12267         * w32inevt.c (key_event): Use Vw32_phantom_key_code.  Undo the
12268         mapping of Ctrl-Pause into cancel, and Ctrl-NumLock into pause.
12269         (w32_console_toggle_lock_key): New function.
12271         * w32term.h (WM_EMACS_TOGGLE_LOCK_KEY): New define.
12273 1998-11-30  Richard Stallman  <rms@psilocin.ai.mit.edu>
12275         * search.c (Freplace_match): Set OPOINT clearly for the case
12276         where point is in the middle of the text to be replaced.
12278         * xdisp.c (display_text_line): When handling HPOS < 0 after loop,
12279         if compute_motion fails to advance at all, don't back it up.
12281 1998-11-28  Richard Stallman  <rms@psilocin.ai.mit.edu>
12283         * xfns.c (Qouter_window_id): New variable.
12284         (syms_of_xfns): Initialize it.
12285         (x_report_frame_params): Set up outer-window-id parameter.
12287         * keymap.c (Fsingle_key_description): Fix previous change.
12289 1998-11-26  Ken'ichi Handa  <handa@delysid.gnu.org>
12291         * lisp.h (Frequire): Update declaration.
12293 1998-11-26  Kenichi Handa  <handa@etl.go.jp>
12295         * ccl.c (ccl_driver) <CCL_TranslateCharacter>: Don't suppress MSB
12296         if the charset is ascii.
12297         (ccl_driver) <CCL_TranslateCharacterConstTbl>: Likewise.
12299         * charset.c (non_ascii_char_to_string): If C has modifier bits,
12300         make an appropriate one byte string.
12301         (char_bytes): Handle the case that C is a single byte char or has
12302         modifier bits.
12304         * charset.h (CHAR_BYTES): If C has modifier bits, return 1.
12306         * cmds.c (internal_self_insert): If C has modifier bits, insert
12307         appropriate one byte char.
12309 1998-11-25  Richard Stallman  <rms@psilocin.ai.mit.edu>
12311         * fns.c (Fstring_as_unibyte, Fstring_as_multibyte):
12312         Clear text properties in the new string.
12314 1998-11-24  Felix Lee  <flee@cygnus.com>
12316         * process.c (read_process_output): Call signal_after_change.
12318 1998-11-24  Richard Stallman  <rms@psilocin.ai.mit.edu>
12320         * buffer.c (syms_of_buffer): Doc fix.
12322         * keyboard.c (syms_of_keyboard): Doc fix.
12324 1998-11-22  Richard Stallman  <rms@psilocin.ai.mit.edu>
12326         * frame.c (Fset_mouse_position): Doc fix.
12328 1998-11-20  Richard Stallman  <rms@psilocin.ai.mit.edu>
12330         * keymap.c (Fmake_keymap): Doc fix.
12332 1998-11-17  Kenichi Handa  <handa@etl.go.jp>
12334         * category.c (word_boundary_p): If C1 or C2 are composite
12335         characters, test their first components.
12337 1998-11-16  Richard Stallman  <rms@sucrose.ai.mit.edu>
12339         * window.c (temp_output_buffer_show): Around temp-buffer-show-hook,
12340         don't do save-excursion, just restore selected window.
12342         * window.c (window_loop): For UNSHOW_BUFFER,
12343         always do consider minibuffer windows.
12344         
12345 1998-11-16  Kenichi Handa  <handa@etl.go.jp>
12347         * charset.h (SINGLE_BYTE_CHAR_P): Check if C is negative or not.
12349         * charset.c (non_ascii_char_to_string): If C is negative, signal error.
12351         * lisp.h (CHAR_TABLE_REF): Check if IDX is negative or not.
12353         * s/bsdos4.h: New file.
12355 1998-11-16  Kenichi Handa  <handa@etl.go.jp>
12357         * Makefile.in (abbrev.o): Depend on charset.h
12358         (bytecode.o): Depend on charset.h.
12360         * bytecode.c: Include charset.h.
12362         * abbrev.c: Include charset.h.
12364         * syntax.h (SYNTAX_ENTRY_INT): For a composite character, check
12365         the first component.
12367 1998-11-13  Ehud Karni  <ehud@unix.simonwiesel.co.il>
12369         * m/aviion-intel.h (LIBS_MACHINE): Delete redundant definition.
12371 1998-11-11  Richard Stallman  <rms@gnu.org>
12373         * xterm.c (XTread_socket): Fix previous change in case F == 0.
12375         * s/dgux5-4-3.h (BSD_PGRPS): Add #undef.
12377         * s/dgux4.h (BROKEN_FIONREAD): #undef commented out.
12378         (INTERRUPT_INPUT): #define commented out.
12380         * m/aviion-intel.h: New file.
12382 1998-11-11  Eli Zaretskii  <eliz@delysid.gnu.org>
12384         * fns.c (MAX_ALLOCA): New macro.
12385         (Fbase64_encode_region, Fbase64_encode_string,
12386         Fbase64_decode_region, Fbase64_decode_string):  Don't allocate
12387         more than MAX_ALLOCA bytes with alloca; otherwise use xmalloc.
12389 1998-11-11  Ken'ichi Handa  <handa@delysid.gnu.org>
12391         * insdel.c (byte_combining_error): Error message improved.
12393         * charset.c (char_valid_p): Handle a composite character correctly.
12395 1998-11-11  Kenichi Handa  <handa@etl.go.jp>
12397         * charset.c (str_cmpchar_id): Check the byte sequence for
12398         composition more rigidly.
12399         (Fcompose_string): Allow DEL to be composed.  Signal error if STR
12400         contains an invalid multibyte sequence.
12402         * xterm.c (x_list_fonts): Don't change the value of maxnames.
12404 1998-11-10  Andrew Innes  <andrewi@harlequin.co.uk>
12406         * w32term.h (struct w32_display_info): New element faked_key.
12407         (WM_EMACS_SETKEYBOARDLAYOUT): 
12408         (WM_EMACS_REGISTER_HOT_KEY): 
12409         (WM_EMACS_UNREGISTER_HOT_KEY): New message definitions.
12410         (LEFT_WIN_PRESSED): 
12411         (RIGHT_WIN_PRESSED): 
12412         (APPS_PRESSED): New console keyboard modifier flags.
12414         * w32term.c (convert_to_key_event): Removed.
12415         (is_dead_key): Copied to w32fns.c.
12416         (w32_read_socket): Generate language_change_event.  Modify to work
12417         with keyboard handling changes in w32_wnd_proc.
12419         * w32proc.c (sys_kill): Set extended key flag when faking
12420         Ctrl-Break keystrokes.
12421         (Fw32_get_locale_info): Allow LONGFORM parameter to specify an
12422         arbitrary locale property using a numerical index.
12423         (Vw32_valid_codepages): New variable.
12424         (enum_codepage_fn): 
12425         (Fw32_get_valid_codepages): 
12426         (Fw32_get_console_codepage): 
12427         (Fw32_set_console_codepage): 
12428         (Fw32_get_console_output_codepage): 
12429         (Fw32_set_console_output_codepage): 
12430         (Fw32_get_codepage_charset): 
12431         (Fw32_get_valid_keyboard_layouts): 
12432         (Fw32_get_keyboard_layout): 
12433         (Fw32_set_keyboard_layout): New functions, exposing Windows locale
12434         handling functions.
12435         (syms_of_ntproc): Register them.
12437         * w32inevt.c: Include w32term.h and w32heap.h.
12438         (map_keypad_keys):
12439         (Vw32_enable_caps_lock):
12440         (Vw32_enable_num_lock):
12441         (Vw32_pass_lwindow_to_system):
12442         (Vw32_pass_rwindow_to_system):
12443         (Vw32_lwindow_modifier):
12444         (Vw32_rwindow_modifier):
12445         (Vw32_apps_modifier):
12446         (Vw32_scroll_lock_modifier):
12447         (w32_key_to_modifier): Add externs.
12448         (w32_kbd_mods_to_emacs): Recognize Windows keys, Apps key, and
12449         Scroll Lock as potential modifiers; exclude numpad keys from
12450         effect by CapsLock; act on Vw32_enable_caps_lock; remove obsolete
12451         code.
12452         (is_dead_key): Copy from w32fns.c.
12453         (w32_kbd_patch_key): Comment attempt to improve handling of
12454         dead-keys, and system bug relating to same on Windows NT.  Work
12455         around the bug by calling ToUnicode and then converting to the
12456         correct codepage.
12457         (map_virt_key): Removed obsolete variable.
12458         (lispy_function_keys): Add extern.
12459         (key_event): Major rework of keyboard input handling: optionally
12460         recognize Windows keys and Apps key as modifiers; optionally treat
12461         NumLock, CapsLock and ScrollLock as function keys; let system
12462         translate keystrokes to characters to avoid system bugs relating
12463         to dead-key handling; preserve shift distinction for control
12464         characters.  Remove some obsolete code.
12466         * makefile.nt ($(BLD)\w32inevt.obj): Add dependencies on w32term.h
12467         and w32heap.h.
12469         * w32fns.c (Vw32_pass_optional_keys_to_system): Variable removed.
12470         (Vw32_pass_lwindow_to_system):
12471         (Vw32_pass_rwindow_to_system):
12472         (Vw32_lwindow_modifier):
12473         (Vw32_rwindow_modifier):
12474         (Vw32_apps_modifier):
12475         (Vw32_enable_num_lock):
12476         (Vw32_enable_caps_lock):
12477         (Vw32_scroll_lock_modifier): New variables.
12478         (modifier_set): Return toggle state for Scroll Lock.
12479         (w32_key_to_modifier): New function.  Returns chosen modifier bit
12480         for given key.
12481         (w32_get_modifiers): Returns modifier flags for
12482         non-keyboard input events.
12483         (construct_console_modifiers): Renamed from construct_modifiers;
12484         recognize Windows and Apps keys as modifiers.
12485         (w32_get_key_modifiers): New function.  Returns modifier flags for
12486         keyboard input events.
12487         (map_keypad_keys): Make non-static.  Use second arg as extended
12488         flag.
12489         (w32_grabbed_keys): New variable.
12490         (HOTKEY, HOTKEY_ID, HOTKEY_VK_CODE, HOTKEY_MODIFIERS): New macros.
12491         (register_hot_keys):
12492         (unregister_hot_keys):
12493         (lookup_vk_code):
12494         (w32_parse_hot_key):
12495         (Fw32_register_hot_key):
12496         (Fw32_unregister_hot_key):
12497         (Fw32_registered_hot_keys):
12498         (Fw32_reconstruct_hot_key): New functions to support hotkeys.
12499         (post_character_message): New function.
12500         (w32_msg_pump): Handle new messages for using hotkeys and changing
12501         keyboard layout/language.
12502         (w32_wnd_proc): Major rework of keyboard input handling:
12503         optionally recognize Windows keys and Apps key as modifiers;
12504         optionally treat NumLock, CapsLock and ScrollLock as function
12505         keys; let system translate keystrokes to characters to avoid
12506         system bugs relating to dead-key handling; preserve shift
12507         distinction for control characters; forward keyboard
12508         layout/language changes to lisp; detect and convert hot-key events
12509         to normal keystrokes.
12510         (syms_of_w32fns): Register new functions and variables.
12511         (w32_last_error): New function for use in debugging.
12513 1998-11-10  Kenichi Handa  <handa@etl.go.jp>
12515         * category.h (CATEGORY_SET): Adjusted for the change of
12516         cmpchar_component.
12517         (CATEGORY_SET): Likewise.
12519         * charset.c (cmpchar_component): New arg NOERROR.  Check
12520         composition char ID more strictly.
12521         (Fcmpchar_component): Call cmpchar_component with NOERROR arg zero.
12522         (Fcmpchar_cmp_rule): If CHARACTER should be composed relatively,
12523         return 255.
12524         (Fcompose_string): Signal error if STR contains a rule-based
12525         composition character.
12527         * charset.h (cmpchar_component): Proto-type adjusted.
12529 1998-11-09  Kenichi Handa  <handa@etl.go.jp>
12531         * charset.c (string_to_non_ascii_char): Return correct length for
12532         a charset of dimension 2 and composition character.
12534 1998-11-08  Richard Stallman  <rms@sucrose.ai.mit.edu>
12536         * keymap.c (Fsingle_key_description): Handle generic characters.
12538         * process.c (Fprocess_status): Doc fix.
12540 1998-11-06  Ken'ichi Handa  <handa@delysid.gnu.org>
12542         * charset.c (init_charset_once): Fix previous change.
12544 1998-11-06  Kenichi Handa  <handa@etl.go.jp>
12546         * charset.c (string_to_non_ascii_char): Fix previous change.
12547         (char_valid_p): Check the validity of CHARSET by CHARSET_DEFINED_P.
12549         * charset.h (SPLIT_NON_ASCII_CHAR): Check dimension of an invalid
12550         character correctly.
12551         (STRING_CHAR): Handle an invalid charater correctly.
12553 1998-11-05  Kenichi Handa  <handa@etl.go.jp>
12555         * charset.c (string_to_non_ascii_char): Fix previous change.
12557         * charset.h (MAKE_NON_ASCII_CHAR): Check validity of CHARSET.
12559         * editfns.c (Fstring_to_char): Don't return a multibyte character
12560         if STRING is a unibyte string.
12562         * indent.c (MULTIBYTE_BYTES_WIDTH): Check validity of a multibyte
12563         character.
12565         * xdisp.c (display_text_line): Check validity of a multibyte character.
12566         (display_string): Likewise.  Handle an invalid character correctly.
12568 1998-11-05  Karl Heuer  <kwzh@gnu.org>
12570         * insdel.c (Fcombine_after_change_execute): Return nil, not junk.
12571         If nothing to do, return immediately.
12572         (syms_of_insdel): Initialize combine_after_change_buffer.
12574 1998-11-05  Richard Stallman  <rms@gnu.org>
12576         * xterm.c (XTread_socket): ButtonPress clears f->mouse_moved.
12578 1998-11-04  Geoff Voelker  <voelker@cs.washington.edu>
12580         * w32term.c (w32_enable_unicode_output): Rename from
12581         w32_no_unicode_output.
12582         (w32_use_unicode_for_codepage, syms_of_w32term): Use new name
12583         and new semantics.
12585 1998-11-04  Jason Rumney  <jasonr@altavista.net>
12587         * w32fns.c (w32_list_fonts): Report an error if a frame has not
12588         been created yet.
12590         * w32term.c (dumpglyphs): Use FRAME_FONT for w32_fill_area.
12592 1998-11-04  Kenichi Handa  <handa@etl.go.jp>
12594         * charset.c (string_to_non_ascii_char): Change the check for the
12595         varidity of multibyte form.
12596         (update_charset_table): Check validity of BYTES.  Don't set
12597         bytes_by_char_head here.
12598         (init_charset_once): Set bytes_by_char_head completely.
12600         * frame.c (do_switch_frame): Cancel previous change.
12602         * print.c (print_string): Check validity of a character.
12603         (print): Likewise.
12605         * sysdep.c [nec_ews_svr4]: Extern *_sobuf.
12607         * m/ews4800.h, s/ux4800.h: New files.
12609 1998-11-03  Theodore Jump <tjump@tertius.com>
12611         * makefile.nt: Compile multiple source files when possible.
12613         * w32faces.c (Qmouse_face): Replace definition with extern decl.
12614         
12615 1998-11-03  Andrew Innes  <andrewi@delysid.gnu.org>
12617         * w32.c (stat): GetFileInformationByHandle can legitimately fail,
12618         so don't rely on it succeeding.
12620         * w32fns.c (x_to_w32_font): Specify DEFAULT_CHARSET in the w32
12621         LOGFONT struct if x font doesn't specify the charset.
12622         (x_to_w32_charset): Change >= to == when testing results of
12623         stricmp.
12625 1998-11-02  Richard Stallman  <rms@sucrose.ai.mit.edu>
12627         * fns.c (Frequire): New arg NOERROR.
12629 1998-11-02  Andrew Innes  <andrewi@harlequin.co.uk>
12631         * fileio.c (Fsubstitute_in_file_name) [DOS_NT]: Fix typo.
12633 1998-10-31  Richard Stallman  <rms@psilocin.ai.mit.edu>
12635         * xfaces.c (Qmouse_face): Replace definition with extern decl.
12636         (syms_of_xfaces): Initialization deleted.
12638         * textprop.c (Qmouse_face): Variable definition moved here.
12639         (syms_of_textprop): Initialize it.
12641         * data.c (set_internal): For built-in maybe-local vars,
12642         when BINDFLAG is set, do not mark them as local.
12644 1998-10-31  Ken'ichi Handa  <handa@delysid.gnu.org>
12646         * insdel.c (replace_range): Fix previous change.
12648 1998-10-31  Kenichi Handa  <handa@etl.go.jp>
12650         * editfns.c (Fsubst_char_in_region): Fix previous change.
12651         (Ftranslate_region): Fix previous change.
12653         * fns.c (Fbase64_decode_region): Fix previous change.
12655         * frame.c (do_switch_frame): Update minibuf_window if necessary.
12657         * insdel.c (byte_combining_error): New function.
12658         (CHECK_BYTE_COMBINING_FOR_INSERT): Call byte_combining_error.
12659         (insert_from_string_1): Set *(GPT_ADDR) to 0 before calling
12660         CHECK_BYTE_COMBINING_FOR_INSERT.
12661         (insert_from_buffer_1): Likewise.
12662         (adjust_after_replace): Check the posibility of inhibitted byte
12663         combining correctly.
12664         (replace_range): Before signaling an error for inhibitted byte
12665         combining, recover the buffer in a safe state.
12666         (del_range_2): Check the posibility of inhibitted byte combining
12667         correctly.
12669 1998-10-30  Andreas Schwab  <schwab@delysid.gnu.org>
12671         * xselect.c (Vselection_coding_system): Doc fix.
12673         * fns.c (Fbase64_encode_region): Use SET_PT_BOTH instead of SET_PT
12674         when we have both char and byte position.  Fix type clashes.
12676         * eval.c (Fsignal): Use a separate format string when passing
12677         error message string to fatal, in case it contains %'s.
12679         * editfns.c (Fchar_after): Fix type clashes.
12681         * charset.c (Fchar_bytes): Doc fix.
12682         (char_bytes): Fix returned value to match returned type.
12683         (syms_of_charset): Fix type clash in initialisation of
12684         Vauto_fill_chars.
12686 1998-10-29  Geoff Voelker  <voelker@cs.washington.edu>
12688         * w32console.c (initialize_w32_display): Use buffer coords
12689         instead of buffer size (which may be larger than the window).
12691         * fileio.c (init_fileio_once): New function.
12693         * emacs.c (main): Invoke init_fileio_once.
12695 1998-10-28  Paul Eggert  <eggert@twinsun.com>
12697         * xterm.c (XTread_socket): Check the returned value of
12698         XmbLookupString more carefully.
12700 1998-10-28  Kenichi Handa  <handa@etl.go.jp>
12702         * coding.c (DECODE_CHARACTER_ASCII): Check validity of inserted code.
12703         (DECODE_CHARACTER_DIMENSION1): Likewise.
12704         (DECODE_CHARACTER_DIMENSION2): Likewise.
12705         (decode_coding_sjis_big5): Check the 2nd byte of SJIS correctly.
12707         * editfns.c (Fsubst_char_in_region): Fix previous change.
12708         (Ftranslate_region): Fix previous change.
12710         * insdel.c (check_markers): Check if markers are at character boundry.
12711         (adjust_markers_for_insert): Fix previous change.
12712         (count_combining_before): Don't limit the check at BEGV.
12713         (count_combining_after): Don't limit the check at ZV.
12714         (CHECK_BYTE_COMBINING_FOR_INSERT): New macro.
12715         (insert_1_both): Call CHECK_BYTE_COMBINING_FOR_INSERT.
12716         (insert_from_string_1): Likewise.
12717         (insert_from_buffer_1): Likewise.
12718         (adjust_after_replace): Inhibit bytes combined across region
12719         boundary.  Update end_unchanged correctly.
12720         (replace_range): Call CHECK_BYTE_COMBINING_FOR_INSERT.  Update
12721         end_unchanged correctly.
12722         (del_range_2): Inhibit bytes combined across region boundary.
12723         Update end_unchanged correctly.
12725 1998-10-27  Geoff Voelker  <voelker@cs.washington.edu>
12727         * w32.c (check_windows_init_file): Also look in load path specified
12728         in environment.
12730         * w32console.c (Fset_message_beep): Recognize 'silent.
12731         (w32_sys_ring_bell): Do nothing for the 'silent sound.
12732         
12733         * w32fns.c (w32_color_map_lookup): Remove duplicate definition.
12735         * w32select.c (Vnext_selection_coding_system): New variable.
12736         (syms_of_w32select): DEFVAR_LISP it.
12737         (Fw32_set_clipboard_data): Use Vnext_selection_coding_system if
12738         non-nil.  Always convert multibyte strings.
12739         (Fw32_get_clipboard_data): Use Vnext_selection_coding_system if
12740         non-nil.  Always convert a string that includes non-ASCII characters.
12741         
12742 1998-10-27  Richard Stallman  <rms@psilocin.ai.mit.edu>
12744         * fns.c (Fbase64_decode_string): Doc fix.
12745         (Fbase64_decode_region, Fbase64_encode_string Fbase64_encode_region):
12746         Likewise.
12748 1998-10-27  Dave Love  <fx@gnu.org>
12750         * fns.c (Fbase64_decode_region, Fbase64_encode_region): Fix
12751         newline in doc string.
12753 1998-10-27  Kenichi Handa  <handa@etl.go.jp>
12755         * editfns.c (Fsubst_char_in_region): Correctly handle the case
12756         that byte combining before happens.
12757         (Ftranslate_region): Likewise.
12759         * insdel.c (adjust_after_replace): Correctly handle the case that
12760         both byte combining before and byte combining after happen.
12761         (replace_range): Likewise.
12763 1998-10-26  Kenichi Handa  <handa@etl.go.jp>
12765         * category.c (syms_of_category): Doc-string modified.
12767         * coding.c (code_convert_region): Kill the work buffer created by
12768         pre-write-conversion.
12770 1998-10-25  Jason Rumney  <jasonr@altavista.net>
12772         * emacs.c (main) [HAVE_NTGUI]: Invoke syms_of_fontset().
12774 1998-10-23  Kenichi Handa  <handa@etl.go.jp>
12776         * coding.c (code_convert_region): While preserving the orignal
12777         point, pay attention to the byte combining problem.
12779         * fns.c (Fbase64_decode_region): Pay attention to the byte
12780         combining problem.
12782         * insdel.c (adjust_markers_for_insert): Adjust markers by taking
12783         combined_before_bytes and combined_after_bytes into account.
12784         (count_combining_after): Handle the case that LENGTH is zero.
12785         (adjust_after_replace): Record deletion at correct buffer
12786         position.  Handle the case that LEN is zero.
12787         (replace_range): Record deletion at correct buffer position.
12788         (del_range_2): Call adjust_makers_for_replace to adjust makers for
12789         combined bytes.
12791 1998-10-21  Richard Stallman  <rms@psilocin.ai.mit.edu>
12793         * alloc.c (Fgarbage_collect): Block input around most of the function.
12794         
12795 1998-10-21  Kenichi Handa  <handa@etl.go.jp>
12797         * coding.c (setup_coding_system): Fix setting up
12798         coding->spec.ccl.valid_codes for CCL based coding system.
12799         (code_convert_region): Set point to FROM before inserting the
12800         result of pre-write-funciton.  Preserve original point.
12801         (code_convert_string): If coding->type is coding_type_ccl, do
12802         conversion even if the length of conversion region is zero.
12804         * fontset.c: Include frame.h before fontset.h.
12805         (list_fonts_func): Fix prototype.       
12807         * frame.c: Include frame.h before fontset.h.
12809         * xterm.c: Likewise.
12811 1998-10-21  Jason Rumney  <jasonr@altavista.net>
12813         * x-list-font.c (Fx_list_fonts): Access frame parameters throught
12814         general macros.   Don't call x_list_font directory, instead call a
12815         function set in list_fonts_func.
12817         * fontset.h (list_fonts_func): Fix prototype.
12819 1998-10-20  Jason Rumney  <jasonr@altavista.net>
12821         * makefile.nt (w32fns.c): Add x-list-font.c to dependancies.
12823         * w32faces.c: Update comments referring to obsolete structs.
12824         (allocate_face, copy_face, face_eql, load_font,
12825         Fpixmap_spec_p, free_frame_faces, new_computed_face,
12826         frame_update_line_height, merge_faces, compute_base_face,
12827         Fset_face_attribute_internal): Use fontset support based on xfaces.c.
12829         * w32fns.c: (Vx_pixel_size_width): New global variable.
12830         (unibyte_display_via_language_environment): New global variable.
12831         (x_set_font): Add support for setting fontsets.
12832         (Fx_create_frame): Add check_w32(). Initialize fontsets.  Fix
12833         font names to match xlfd-tight-regexp.
12834         (w32_load_font): Rewrite based on x_load_font.
12835         (x_to_w32_charset, w32_to_x_charset): Add character sets.  Use
12836         `iso8859-1' rather than `ansi'.
12837         (w32_to_x_font): Remove `-' from font name.  Remove the `-' off the
12838         end. Move charset into `charset registry' field.
12839         (enum_font_cb2): Check charsets match.  Include width in font list.
12840         (w32_list_fonts): Rewrite based on x_list_fonts.
12841         Moved from w32term.c to have access to enumfont_t struct.
12842         (Fx_list_fonts): w32 specific version eliminated.  Include
12843         `x-list-fonts.c'.
12844         (w32_get_font_info, w32_query_font, w32_find_ccl_program): New
12845         functions for fontset support - adapted from x_ equivalents.
12846         (syms_of_w32fns): New lisp variables initialised.  Function
12847         pointers for fontset.c set up.
12849         * w32term.c: Include fontset.h.  Define codepage macros. 
12850         Add ENCODE_BIG5 macro from coding.c.
12851         (w32_no_unicode_output): New variable.
12852         (w32_codepage_for_charset, w32_use_unicode_for_codepage): New
12853         functions.
12854         (BUILD_WCHAR_T, BYTE1, BYTE2): New macros.
12855         (dumpglyphs): Rewrite based on xterm.c equivalent.
12856         (x_new_font): Use functionality provided in fontset.c.
12857         (x_new_fontset): New function based on the one in xterm.c.
12858         (syms_of_w32term): Add w32-no-unicode-output flag.
12860         * w32term.h: Remove redundant font_info struct definition. 
12861         (Vx_pixel_size_width_font_regexp,
12862         unibyte_display_via_language_environment): Declare variables.
12863         (w32_list_fonts, w32_get_font_info, w32_query_font, w32_load_font): 
12864         Declare functions.
12865         (w32_output): New fields font_baseline and fontset.
12866         (FRAME_FONTSET, FRAME_W32_FONT_TABLE): New macros.
12868         * w32xfns.c: Include charset.h and fontset.h.
12870 1998-10-20  Richard Stallman  <rms@psilocin.ai.mit.edu>
12872         * syntax.c (syms_of_syntax): Fix the setup of Qscan_error.
12874 1998-10-20  Eli Zaretskii  <eliz@mescaline.gnu.org>
12876         * msdos.c (mouse_init): Reset the button press/release info of the
12877         mouse driver.
12878         (mouse_preempted): New variable.
12879         (dos_rawgetc): Don't generate mouse events if mouse is preempted.
12880         (XMenuActivate): Preempt the mouse during menu-handling loop.
12881         Release the current time slice while idling in the menu-handling
12882         loop.  Leave the loop only if the user pressed, then released the
12883         same button.  Discard all mouse events that are pending in the
12884         event queue before exiting.
12886 1998-10-19  Richard Stallman  <rms@psilocin.ai.mit.edu>
12888         * editfns.c (Fformat): Increase buffer size for floating format.
12890 1998-10-17  Kenichi Handa  <handa@etl.go.jp>
12892         * charset.c (Vauto_fill_chars, Qauto_fill_chars): New variables.
12893         (syms_of_charset): Staticpro and initialize Qauto_fill_chars.
12894         Declare auto-fill-chars as a Lisp variable and initialize it.
12896         * charset.h (Vauto_fill_chars): Extern it.
12898         * cmds.c (internal_self_insert): Check Vauto_fill_chars.
12900 1998-10-16  Kenichi Handa  <handa@etl.go.jp>
12902         * casefiddle.c (casify_object): Use make_string instead of
12903         make_specified_string to cope with byte-combining situation.
12905         * coding.c (decode_coding_iso2022): Set coding->fake_multibyte to
12906         1 when encountered with a code of the range 0x80..0x9F.
12908 1998-10-14  Eli Zaretskii  <eliz@mescaline.gnu.org>
12910         * callproc.c (Fcall_process) [MSDOS]: Use $TMPDIR instead of
12911         trying $TMP and $TEMP, since the former is always set in msdos.c.
12912         (Fcall_process_region) [DOS_NT]: When looking for a place to put
12913         the temporary files, check $TMPDIR as well.
12915 1998-10-14  Richard Stallman  <rms@psilocin.ai.mit.edu>
12917         * process.c (exec_sentinel, read_process_output): 
12918         Restore waiting_for_user_input_p after running Lisp code.
12920         * keyboard.c (parse_menu_item): Avoid initialization for Lisp_Object.
12921         (command_loop): Likewise.
12923 1998-10-14  Kenichi HANDA  <handa@etl.go.jp>
12925         * data.c (Faset): Fix previous change.
12927         * fns.c (Ffillarray): Fix previous change.
12929         * insdel.c (adjust_markers_for_combining): This function deleted.
12930         (adjust_markers_for_replace): Correctly adjust marker positions.
12931         Don't record these adjustment because they were recorded already.
12932         (combine_bytes): Don't adjust markers here.
12934 1998-10-13  Richard Stallman  <rms@psilocin.ai.mit.edu>
12936         * minibuf.c (Fdisplay_completion_list): Put on mouse-face properties.
12938 1998-10-12  Richard Stallman  <rms@psilocin.ai.mit.edu>
12940         * keyboard.c (Fclear_this_command_keys): New function.
12941         (syms_of_keyboard): defsubr it.
12943         * macros.c (Fexecute_kbd_macro): Set real_this_command.
12945 1998-10-12  Kenichi Handa  <handa@etl.go.jp>
12947         * ccl.c (CCL_DECODE_SJIS, CCL_ENCODE_SJIS): Swap the definitions.
12949         * charset.c (Fstring): Call make_string instead of
12950         make_string_from_bytes.
12951         (Ffind_charset_region): Include `composition' in the returned list
12952         if the region contains any composite characters.
12953         (Ffind_charset_string): Include `composition' in the returned list
12954         if the string contains any composite characters.
12955         (find_charset_in_str): Handle CMPCHARP arg correctly.
12957         * coding.c (shrink_decoding_region): If a charset other than ascii
12958         is initially designated to G0, don't shrink the region.
12959         (shrink_encoding_region): Likewise.
12961         * data.c (Faset): If ARRAY is a multibyte string, pay attention to
12962         byte-combining situation.
12964         * fns.c (clear_string_char_byte_cache): New function.
12965         (Ffillarray): Handle multibyte string correctly.
12967         * lisp.h (clear_string_char_byte_cache): Extern it.
12969         * xselect.c (lisp_data_to_selection_data): Call
12970         find_charset_in_str with CMPCHARP arg 0.
12971         * w16select.c (Fw16_set_clipboard_data): Likewise.
12972         * w32select.c (Fw32_set_clipboard_data): Likewise.
12974 1998-10-11  Richard Stallman  <rms@psilocin.ai.mit.edu>
12976         * keyboard.c (parse_menu_item): For top level of menu bar,
12977         accept ordinary commands, and treat them just like a keymap.
12979 1998-10-11  Richard Stallman  <rms@sucrose.ai.mit.edu>
12981         * xdisp.c (redisplay_window): Clear w->window_end_valid
12982         before running the window-scroll-functions hook, if appropriate.
12984 1998-10-10  Richard Stallman  <rms@psilocin.ai.mit.edu>
12986         * data.c (Fstring_to_number): Don't recognize floating point
12987         if base is not 10.
12989         * window.c (window_loop): New alternative CHECK_ALL_WINDOWS.
12990         (check_all_windows): New function for debugging tests.
12991         (syms_of_window): Initialize it.
12993         * window.c (Qwindow_configuration_p): New variable.
12994         (Fwindow_configuration_frame): New function.
12995         (syms_of_window): defsubr it.
12996         (Fset_window_configuration): Return t if frame is live.
12997         Use Qwindow_configuration_p.
12999         * xfns.c (check_x_display_info): Don't use selected_frame
13000         if it is dead.
13002 1998-10-09  Geoff Voelker  <voelker@cs.washington.edu>
13004         * w32fns.c (x_create_bitmap_from_file): Skip special files.
13006 1998-10-08  Kenichi Handa  <handa@etl.go.jp>
13008         * buffer.h (inhibit_modification_hooks): Extern it.
13010         * buffer.c (inhibit_modification_hooks): New variable.
13011         (init_buffer_once): Initialize inhibit_modification_hooks to 0.
13013         * charset.c (invalid_character): Prepend `0' to octal
13014         representation.  Give error sufficient args.
13016         * coding.c (code_convert_region): Set inhibit_modification_hooks
13017         to 1 before calling Fset_text_properties.
13019         * insdel.c (signal_before_change): If inhibit_modification_hooks
13020         is nonzero, do nothing.
13021         (signal_after_change): Likewise.
13023 1998-10-08  Emilio Lopes  <Emilio.Lopes@Physik.TU-Muenchen.DE>
13025         * process.c: Doc fixes.
13027 1998-10-08  Richard Stallman  <rms@sucrose.ai.mit.edu>
13029         * syntax.c (scan_lists): Bring FROM back into range BEGV...ZV.
13031 1998-10-07  Geoff Voelker  <voelker@cs.washington.edu>
13033         * w32.c (init_ntproc): Check for Windows init file.
13034         (term_ntproc): Do not check for it here.
13036 1998-09-28  Kenichi Handa  <handa@etl.go.jp>
13038         * coding.c (check_composing_code): Fix previous change.  Now it
13039         alwasy returns 0 or -1.
13040         (decode_coding_iso2022): Adjusted for the above change.
13041         (encode_coding_iso2022): When encoding the last block, flush out
13042         tailing garbage bytes.
13043         (setup_coding_system): Delete unnecessary code.
13044         (shrink_decoding_region): Check translation table.  If ASCII
13045         should be translated, give up shrinking.
13046         (shrink_encoding_region): Likewise.
13047         (SHRINK_CONVERSION_REGION_THRESHHOLD): New macro.
13048         (SHRINK_CONVERSION_REGION): New macro.
13049         (code_convert_region): Call SHRINK_CONVERSION_REGION.  Delete text
13050         properties here.
13051         (code_convert_region): In the case of encoding, always calulate
13052         correct character number.
13053         (code_convert_string): Call SHRINK_CONVERSION_REGION.
13054         (code_convert_region1): Don't delete text properties here.
13056         * insdel.c (adjust_after_replace): Don't delete text properties here.
13058         * term.c (encode_terminal_code): Handle raw 8-bit codes correctly.
13060 1998-09-27  Richard Stallman  <rms@psilocin.ai.mit.edu>
13062         * emacs.c (sort_args): Fill extra space with NULL ptrs.
13064 1998-09-26  Kenichi Handa  <handa@etl.go.jp>
13066         * coding.h (struct coding_system): New member composed_chars.
13068         * coding.c (check_composing_code): If the current composing
13069         sequence doesn't end properly, return -1.
13070         (DECODE_CHARACTER_ASCII): Update coding->composed_chars.
13071         (DECODE_CHARACTER_DIMENSION1): Likewise.
13072         (decode_coding_iso2022): Check validity of a composing sequence.
13073         (code_convert_string): If the length of text to be converted is
13074         shrunk to zero, don't perform code conversion.
13075         (shrink_decoding_region): Fix previous change.
13077         * editfns.c (Fformat): Check format control characters.
13079 1998-09-25  Kenichi Handa  <handa@etl.go.jp>
13081         * coding.c (decode_eol): While decoding DOS-like eol, handle a
13082         single CR code correctly.
13083         (shrink_decoding_region) <CODING_CATEGORY_IDX_ISO_7 or
13084         CODING_CATEGORY_IDX_ISO_7_TIGHT>: Skip also 8-bit codes.
13086 1998-09-23  Geoff Voelker  <voelker@cs.washington.edu>
13088         * w32fns.c (w32_color_map_lookup): New function.
13089         (x_to_w32_color): Approximate colors ending in numbers if necessary.
13091 1998-09-22  Kenichi Handa  <handa@etl.go.jp>
13093         * ccl.c (ccl_driver): Report correct CCL program counter on error.
13095         * xmenu.c (single_submenu) [! HAVE_MULTILINGUAL_MENU]: Make
13096         strings unibyte.
13097         (xmenu_show) [! HAVE_MULTILINGUAL_MENU]: Likewise.
13099 1998-09-22  Kenichi Handa  <handa@etl.go.jp>
13101         * callint.c (Fcall_interactively): Don't use input method when
13102         reading a character in the case of `c' code letter.
13104 1998-09-21  Dave Love  <fx@gnu.org>
13106         * editfns.c (Fsave_restriction): Doc fix.
13108 1998-09-21  Richard Stallman  <rms@gnu.org>
13110         * lread.c (build_load_history): Do add to Vload_history
13111         even when dumping Emacs.
13113 1998-09-18  Kenichi Handa  <handa@etl.go.jp>
13115         * ccl.c (CCL_WRITE_CHAR): Don't use bcopy.
13116         (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0,
13117         cause error if the program is going to output some bytes.  When
13118         outputing a string to notify an error, check the case that
13119         DST_BYTES is zero.
13121         * coding.h (CODING_FINISH_INTERRUPT): New macro. 
13123         * coding.c (ccl_coding_driver): If ccl_driver is interrupted by a
13124         user or the CCL program executed an invalid command, return
13125         CODING_FINISH_INTERRUPT.
13126         (code_convert_region): Pay attention to the converters return
13127         value CODING_FINISH_NORMAL and CODING_FINISH_INTERRUPT.
13129 1998-09-16  Kenichi Handa  <handa@etl.go.jp>
13131         * coding.c (code_convert_region): Update beg_unchanged and
13132         end_unchanged after we delete the source text.
13134         * insdel.c (adjust_markers_for_replace): Don't adjust a byte
13135         position if it is FROM.
13136         (adjust_markers_for_combining): New function.
13137         (combine_bytes): Call adjust_markers_for_combining instead of
13138         adjust_markers_for_replace.
13139         (adjust_after_replace): Record deletion of combining after bytes
13140         with the correct position.
13141         (replace_range): Likewise.  Record the actual deletion after
13142         recoding deletions of combining bytes.
13144         * xdisp.c (message_log_check_duplicate): Count byte length of the
13145         latest message correctly.
13147 1998-09-12  Richard Stallman  <rms@gnu.org>
13149         * xdisp.c (redisplay_internal): Use TEMP_SET_PT_BOTH
13150         instead of SET_PT_BOTH.
13151         (try_window_id, display_text_line): Likewise.
13153 1998-09-12  Karl Heuer  <kwzh@gnu.org>
13155         * data.c (Fmake_local_variable): Doc fix.
13157 1998-09-10  Dave Love  <fx@gnu.org>
13159         * print.c (Fwith_output_to_temp_buffer): Doc fix.
13161 1998-09-10  Richard Stallman  <rms@gnu.org>
13163         * s/irix6-0.h (TIOCSIGSEND): Add #undef.
13164         (bcopy, bcmp, bzero): Add #undef.
13166         * keyboard.c (command_loop_1): When switching to selected window's bfr,
13167         first exit if selected frame is dead (no live frames remain).
13168         (read_key_sequence): Likewise.
13170 1998-09-10  Karl Heuer  <kwzh@gnu.org>
13172         * emacs.c (main): Mention --display and --eval in help.
13174 1998-09-07  Paul Eggert  <eggert@twinsun.com>
13176         * editfns.c (emacs_memftime): New function.
13177         (Fformat_time_string): Use it to handle null bytes in formats
13178         correctly.
13180 1998-09-08  Kenichi Handa  <handa@etl.go.jp>
13182         * charset.c (Ffind_charset_region): Optimization for unibyte buffer.
13183         (Ffind_charset_string): For unibyte string, return (ascii).
13185         * editfns.c (Fsubst_char_in_region): Call replace_range with the
13186         arg MARKERS 1.
13188         * insdel.c (adjust_after_replace): Don't add combining bytes to
13189         the args given to adjust_point.  Handle correctly the case that
13190         there are both before and after combining bytes.
13191         (replace_range): Likewise.
13193 1998-09-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
13195         * fns.c (base64_decode_1, base64_encode_1): New functions.
13196         (Fbase64_decode_string, Fbase64_encode_string): New functions.
13197         (Fbase64_decode_region, Fbase64_encode_region): New functions.
13199 1998-09-07  Karl Heuer  <kwzh@gnu.org>
13201         * eval.c (error): After enlarging buffer, write to it, not to buf.
13203         * fns.c (Fwidget_put): Return VALUE instead of garbage.
13205 1998-09-07  Kenichi Handa  <handa@etl.go.jp>
13207         * charset.h (STRING_CHAR_AND_LENGTH): Return correct value in
13208         ACTUAL_LEN even if LEN is too short to have a valid multibyte form.
13209         (STRING_CHAR_AND_CHAR_LENGTH): Likewise.
13211         * coding.c (ccl_coding_driver): Always calculate correct mulibyte
13212         chars in produced byte sequence.
13213         (Ffind_operation_coding_system): Doc-string fixed.
13215         * insdel.c (count_combining_after): Check also preceding bytes at
13216         POS if all characters in STRING are not character head.
13218 1998-09-06  Paul Eggert  <eggert@twinsun.com>
13220         * editfns.c (Fformat_time_string, Fdecode_time, Fcurrent_time_zone):
13221         Don't assume that localtime and gmtime return non-NULL.
13223 1998-09-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
13225         * fns.c (Fbase64_decode_string, Fbase64_encode_string,
13226         base64_decode_1, Fbase64_decode_region, Fbase64_encode_region):
13227         New functions.
13229 1998-09-06  Richard Stallman  <rms@gnu.org>
13231         * editfns.c (Fformat): Detect incomplete format spec at string's end.
13233         * lread.c (Fload): Handle case where openp finds a magic file
13234         but it has no `load' handler or that handler calls `load'.
13235         If FOUND != FILE, find FOUND's handler even if inhibited for FILE.
13237 1998-09-04  Dave Love  <fx@gnu.org>
13239         * buffer.c (enable-multibyte-characters): Doc fix.
13241 1998-09-02  Geoff Voelker  <voelker@cs.washington.edu>
13243         * w32heap.c (allocate_heap): Define NTHEAP_PROBE_BASE by default.
13245 1998-09-01  Kenichi Handa  <handa@etl.go.jp>
13247         * editfns.c (Ftranspose_regions): Use BYTE_POS_ADDR to get an
13248         address in buffer from byte-position.
13250 1998-09-01  Eli Zaretskii  <eliz@delysid.gnu.org>
13252         * w16select.c (Vnext_selection_coding_system): New variable.
13253         (syms_of_win16select): DEFVAR_LISP it.  No need to staticpro
13254         Vselection_coding_system.
13255         (Fw16_set_clipboard_data): Always convert multibyte strings.  Use
13256         Vnext_selection_coding_system if non-nil.
13257         (Fw16_get_clipboard_data): Always convert a string that includes
13258         non-ASCII characters. Use Vnext_selection_coding_system if
13259         non-nil.
13261 1998-08-31  Andrew Innes  <andrewi@harlequin.co.uk>
13263         * w32fns.c (w32_wnd_proc): Always zero button_state when releasing
13264         mouse capture.
13266 1998-08-31  Kenichi Handa  <handa@etl.go.jp>
13268         * xterm.c (x_load_font): If SIZE is 0, don't use a name
13269         x_list_font returns.
13271 1998-08-31  Paul Eggert  <eggert@twinsun.com>
13273         * lread.c (read1): Don't assume that atof ("-0.0") yields +0.0.
13274         Handle leading '-' uniformly for zeros, infinities, and NaNs.
13276 1998-08-31  Eli Zaretskii  <eliz@delysid.gnu.org>
13278         * msdos.c (IT_cmgoto): When tracking echo area messages with the
13279         cursor, save and restore previous cursor position in the
13280         minibuffer.
13282 1998-08-31  Kenichi Handa  <handa@etl.go.jp>
13284         * charset.c (unibyte_char_to_multibyte):
13285         Vnonacii_translation_table will convert a 7-bit charcater.
13286         (multibyte_char_to_unibyte): Handle the case that
13287         Vnonacii_translation_table converts a multibyte charcater to a
13288         unibyte charcter of less than 128.
13289         (init_charset_once): Initialize nonascii_insert_offset and
13290         Vnonacii_translation_table.
13292         * coding.c (decode_coding): Even if SRC_BYTES is zero, try
13293         processing if CODING requires flushing.
13294         (encode_coding): Likewise.
13295         (code_convert_region): Likewise.
13296         (code_convert_string): Likewise.
13298         * fns.c (concat): If Vnonascii_translation_table is non-nil, try
13299         to convert a character less than 160 to multibyte.
13300         * insdel.c (copy_text): Likewise.
13301         (count_size_as_multibyte): Likewise.
13302         * xterm.c (dumpglyphs): Likewise.
13304 1998-08-29  Paul Eggert  <eggert@twinsun.com>
13306         * data.c (arith_driver, float_arith_driver): Compute (- x) by
13307         using negation, not subtraction; this makes a difference with
13308         IEEE floating point arithmetic (and also if integer arithmetic
13309         is ones' complement or signed-magnitude!).
13311 1998-08-29  Karl Heuer  <kwzh@gnu.org>
13313         * xfns.c (x_create_bitmap_from_file): Fail immediately if magic.
13315 1998-08-28  Ken'ichi Handa  <handa@delysid.gnu.org>
13317         * charset.c (Fchar_bytes): Add \n\ in doc-string.
13319 1998-08-28  Paul Eggert  <eggert@twinsun.com>
13321         * s/sol2-4.h (NOT_USING_MOTIF): New macro.
13322         (LD_SWITCH_SYSTEM_TEMACS): Put /usr/dt/lib in the link library
13323         path only if we're not building with Motif.
13325 1998-08-28  Kenichi Handa  <handa@etl.go.jp>
13327         * insdel.c (adjust_after_replace): Fix the code to record undo
13328         information for the case that `before combining' happens.  Remove
13329         text properties which are added to the new text by
13330         offset_intervals.
13332         * coding.c (code_convert_region1): Remove all text properties of
13333         the region.
13335 1998-08-28  Kenichi Handa  <handa@etl.go.jp>
13337         * charset.h (CHAR_BYTES): New macro.
13339         * charset.c (Fchar_bytes): Now always return 1.
13340         (char_bytes): New function.
13342         * editfns.c (Fposition_bytes): If the arg POSITION is out of
13343         range, return nil.
13344         (Fbyte_to_position): If the arg BYTEPOS is out of range, return
13345         nil.
13347         * data.c (Faset): Use macro CHAR_BYTES instead of Fchar_bytes.
13348         * fns.c (concat): Likewise.
13349         * insdel.c (count_size_as_multibyte): Likewise.
13350         * xdisp.c (message_dolog): Likewise.
13352 1998-08-27  Kenichi Handa  <handa@etl.go.jp>
13354         * coding.c (detect_coding_iso2022): Handle ESC N and ESC O
13355         correctly.  They are for SS2 and SS3 respectively.
13356         (ccl_coding_driver): Fix previous change.
13358 1998-08-26  Paul Eggert  <eggert@twinsun.com>
13360         * xterm.c (fixup_locale): New function.  For now, it resets
13361         LC_TIME to "C" (reverting the 1998-08-07 change), and also
13362         resets LC_MESSAGES to "C".
13363         (x_term_init): Use it to fix up the locale after setlocale
13364         (LC_ALL, "").
13366 1998-08-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13368         * xterm.c (x_calc_absolute_position): Cast argument to XFree, in
13369         case it was prototyped the old way.
13371 1998-08-25  Kenichi Handa  <handa@etl.go.jp>
13373         * xterm.c (x_list_fonts): Work-around for the case XGetAtomName
13374         returns a null string.  This happens when dxpc 3.7 is being used.
13376 1998-08-24  Andreas Schwab  <schwab@delysid.gnu.org>
13378         * keyboard.c (input-method-previous-message): Doc fix.
13380         * coding.c (file-coding-system-alist,
13381         select-safe-coding-system-function): Doc fix.
13383 1998-08-23  Kenichi HANDA  <handa@etl.go.jp>
13385         * coding.c (detect_coding_iso2022): Don't check the byte length of
13386         succeeding codes (0xa0..0xFF) if the codes follows single shift
13387         code (SS2 or SS3).
13389 1998-08-21  Ken'ichi Handa  <handa@delysid.gnu.org>
13391         * coding.c (detect_coding_system): If detect_eol_type returns
13392         CODING_EOL_INCONSISTENT, set eol_type to CODING_EOL_UNDECIDED
13393         correctly.
13395 See ChangeLog.7 for earlier changes.