diff options
Diffstat (limited to 'src')
44 files changed, 1056 insertions, 2105 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 36e6ca3b00d..4cf00fc3c30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,157 @@ +2007-11-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * xdisp.c (load_overlay_strings): Fix copy&paste typo. + +2007-11-09 Jason Rumney <jasonr@gnu.org> + + * s/ms-w32.c (USE_TOOLKIT_SCROLL_BARS): Define. + + * w32term.c (w32_scroll_bar_handle_click): Use SCROLL_BAR_CLICK_EVENT. + + * keyboard.c (discard_mouse_events, make_lispy_event) [WINDOWSNT]: + Remove W32_SCROLL_BAR_CLICK_EVENT. + + * termhooks.h (enum event_kind) [WINDOWSNT]: Likewise. + Add MULTIMEDIA_KEY_EVENT. + + * keyboard.c (lispy_function_keys) [WINDOWSNT]: Add more keys. + (lispy_multimedia_keys) [WINDOWSNT]: New array. + (make_lispy_event) [WINDOWSNT]: Use it to translate + MULTIMEDIA_KEY_EVENT. + + * w32term.h (WM_APPCOMMAND): Define if not already. + (GET_APPCOMMAND_LPARAM): Likewise. + + * w32term.c (w32_read_socket): Generate MULTIMEDIA_KEY_EVENT from + WM_APPCOMMAND. + + * w32fns.c (w32_pass_multimedia_buttons_to_system): New user option. + (syms_of_w32fns): Export and initialize it. + (w32_wnd_proc): Pass WM_APPCOMMAND on to w32_read_socket. + +2007-11-09 Chong Yidong <cyd@stupidchicken.com> + + * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE + twice. + + * xdisp.c (handle_face_prop): Fix last change. + +2007-11-09 Richard Stallman <rms@gnu.org> + + * xdisp.c (handle_face_prop): Test for strings that came from overlays, + not just for after-strings and before-strings. + Call face_for_overlay_string and pass the overlay to it. + (handle_display_prop): Determine whether property came from an overlay. + Pass OVERLAY arg to handle_single_display_spec. + (handle_single_display_spec): New arg OVERLAY sets it->from_overlay. + (load_overlay_strings): Fill in it->string_overlays. + (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays. + + * xfaces.c (face_for_overlay_string): Function renamed from + face_at_buffer_position_no_overlays, and add arg OVERLAY. + + * dispextern.h (struct it): New elt string_overlays. + New elt from_overlay, also in stack. + Rearrange a few elements. + (face_for_overlay_string): Decl renamed from + face_at_buffer_position_no_overlays, and add argument. + +2007-11-09 Richard Stallman <rms@gnu.org> + + * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays + to get the base face for an overlay string. + + * dispextern.h (face_at_buffer_position_no_overlays): Add decl. + + * xfaces.c (face_at_buffer_position_no_overlays): New function. + + * xdisp.c (handle_stop): Move some code out of loop. + +2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes): + Fix conversion from Lisp object to ATSUFontID. + +2007-11-09 Jason Rumney <jasonr@gnu.org> + + * xdisp.c (Fformat_mode_line): Do nothing when noninteractive. + +2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * unexmacosx.c (unexec_regions_recorder, unexec_regions_merge): + Don't assume regions are aligned to page boundary. + (print_load_command_name): Add LC_UUID if defined. + +2007-11-09 Richard Stallman <rms@gnu.org> + + * emacs.c (syms_of_emacs) <installation-directory>: Reflow docstring. + +2007-11-07 Jason Rumney <jasonr@gnu.org> + + * s/windows95.h: Remove. + +2007-11-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and + abort with a message on unhandled store_type values. + +2007-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xterm.c, xfns.c, xselect.c, xterm.h, s/msdos.h, s/sco4.h, s/sco5.h: + Remove HAVE_X11R5 and HAVE_X11R4. + +2007-11-01 Dan Nicolaescu <dann@ics.uci.edu> + + * Makefile.in: Remove references to sunfns.c and sunfns.o. + +2007-11-01 Johan Bockg,Ae(Brd <bojohan@gnu.org> + + * macterm.c, w32term.c, xterm.c (x_draw_stretch_glyph_string): + Don't set s->stippled_p here, since it has already been set by + x_set_glyph_string_gc from x_draw_glyph_string. + +2007-11-01 Dan Nicolaescu <dann@ics.uci.edu> + + * sunfns.c: Remove file + + * m/sun386.h: + * m/sun2.h: + * m/sparc.h: Remove Sun windows code. + +2007-10-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * keyboard.c (syms_of_keyboard): Initialize the initial_kboard. + (init_keyboard): Set current_kboard's window-system to nil. + (tty_read_avail_input): Typo. + * frame.c (make_initial_frame): Don't initialize the initial_kboard. + +2007-10-31 Dan Nicolaescu <dann@ics.uci.edu> + + * s/usg5-4.h: + * s/usg5-3.h: + * s/ptx.h: + * m/is386.h: + * m/ibmps2-aix.h: + * Makefile.in: Remove all mentions of X10 + + * dispnew.c (syms_of_display): Don't mention version 10. + +2007-10-28 Juanma Barranquero <lekktu@gmail.com> + + * makefile.w32-in (OBJ1): Remove abbrev.$(O). + ($(BLD)/abbrev.$(O)): Remove. + +2007-10-28 Stefan Monnier <monnier@iro.umontreal.ca> + + Rewrite abbrev.c in Elisp. + * image.c (Qcount): Don't declare as extern. + (syms_of_image): Initialize and staticpro `Qcount'. + * puresize.h (BASE_PURESIZE): Increase for the new abbrev.el functions. + * emacs.c (main): Don't call syms_of_abbrev. + * Makefile.in (obj): Remove abbrev.o. + (abbrev.o): Remove. + * abbrev.c: Remove. + 2007-10-26 Martin Rudalics <rudalics@gmx.at> * window.c (window_min_size_2): Don't count header-line. @@ -5,7 +159,7 @@ 2007-10-26 Dan Nicolaescu <dann@ics.uci.edu> * frame.h (struct frame): Move all bit fields after the first bit - field to take advantage of the available space. Group all the + field to take advantage of the available space. Group all the chars together to reduce wasted space due to padding. 2007-10-26 Juanma Barranquero <lekktu@gmail.com> diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index 514204939ee..09880efa16d 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 @@ -1481,7 +1481,7 @@ 1998-05-07 Eli Zaretskii <eliz@mescaline.gnu.org> * process.c (init_process, syms_of_process) [not subprocesses]: - Make definition consistent with prototypes on lisp.h + Make definition consistent with prototypes on lisp.h. 1998-05-07 Kenichi Handa <handa@etl.go.jp> @@ -1777,7 +1777,7 @@ * emacs.c (standard_args): Apply --unibyte/multibyte after --nw. - * lisp.h: Include initial_obarray from lread.c + * lisp.h: Include initial_obarray from lread.c. * data.c (set_internal): Test keywordness only in initial obarray. @@ -2217,7 +2217,7 @@ * window.c (Fset_window_configuration): Fix mixing of Lisp_Object and int. - * sysdep.c (init_sys_modes): Fix mixing of Lisp_Object and int + * sysdep.c (init_sys_modes): Fix mixing of Lisp_Object and int. * search.c (compile_pattern, compile_pattern_1): Fix mixing of Lisp_Object and int. @@ -2246,7 +2246,7 @@ * fileio.c (Fwrite_region): Fix mixing of Lisp_Object and int. * editfns.c (Fchar_after, Fchar_before): Fix mixing of Lisp_Object - and int + and int. * coding.c (code_convert_region): Fix mixing of Lisp_Object and int. @@ -2624,7 +2624,7 @@ 1998-03-21 Richard Stallman <rms@delysid.gnu.org> * dired.c (Fdirectory_files): - In FULL case, compute number of characters + In FULL case, compute number of characters. * fns.c (substring_both, Fsubstring): Use make_specified_string. (concat): Make string result unibyte or multibyte as appropriate. @@ -3077,7 +3077,7 @@ 1998-03-04 Kenichi HANDA <handa@etl.go.jp> * buffer.c (Fset_buffer_multibyte): Fix arg for chars_in_text. - Be sure not to have a multibyte sequence striding over the GAP + Be sure not to have a multibyte sequence striding over the GAP. * charset.c (strwidth): Make it work for invalid bytes sequence. (Fstring_width): Give byte length of STR to strwidth. @@ -4166,7 +4166,7 @@ insert_from_string. Scan string by bytes and chars. (Ftry_completion): Use size_byte while comparing. (Fall_completions): Use size_byte while comparing. - (test_completion): + (test_completion): Pass both kinds of size to oblookup. * editfns.c (syms_of_editfns): Delete defsubr for sref. @@ -4358,7 +4358,6 @@ (insert_1, indented_beyond_p): Decls changed. (move_gap_both, del_range_byte, del_range_both, del_range_2) (scan_newline, Ffile_locked_p): New decls. - (struct Lisp_Marker): * search.c (scan_newline): Always restore prev value of immediate_quit. @@ -5200,7 +5199,7 @@ 1997-10-21 Kenichi Handa <handa@etl.go.jp> - * Makefile.in (xselect.o): Depend on buffer.h + * Makefile.in (xselect.o): Depend on buffer.h. * coding.c (Qcoding_system_spec): Deleted. (Vcoding_system_list, Vcoding_system_alist): New variables. @@ -5844,7 +5843,7 @@ placed in the main popup instead of a blank-named submenu. This seems to be an undocumented feature of x-popup-menu. (list_of_items): New argument HMENU. - Use 1 and 0 instead of Qt and Qnil for enable in add_menu_item + Use 1 and 0 instead of Qt and Qnil for enable in add_menu_item. 1997-09-02 Geoff Voelker <voelker@cs.washington.edu> @@ -7383,7 +7382,7 @@ (x_new_fontset): If frame F has already using FONTSET, avoid the duplicated work. Use FS_LOAD_FONT. (x_list_fonts): Call Fassoc to search Valternate_charset_table. - (x_load_font): Get around a buf of XListFonts + (x_load_font): Get around a buf of XListFonts. 1997-06-20 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> @@ -7619,7 +7618,7 @@ * Makefile.in (XOBJ, MSDOS_OBJ, SOME_MACHINE_OBJECTS): Delete xfaces.o. (obj): Add xfaces.o. (FACE_SUPPORT, SOME_MACHINE_LISP): Delete faces.elc. - (shortlisp, lisp): Add faces.elc + (shortlisp, lisp): Add faces.elc. * emacs.c (main): Call syms_of_xfaces whenever ! HAVE_NTGUI. @@ -7907,7 +7906,7 @@ (r_alloc_init) [DOUG_LEA_MALLOC]: Call mallopt, instead of setting __malloc_extra_blocks. -Thu May 15 22:21:18 1997 Ken'ichi Handa <handa@diazepam.gnu.ai.mit.edu> +1997-05-15 Ken'ichi Handa <handa@diazepam.gnu.ai.mit.edu> * Makefile.in (charset.o): Add disptab.h in dependency list. @@ -8578,13 +8577,12 @@ Thu May 15 22:21:18 1997 Ken'ichi Handa <handa@diazepam.gnu.ai.mit.edu> * xterm.c (dumpglyphs): Clip and highlight glyphs displayed with fonts of wrong size. -Sun Apr 6 10:26:53 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> +1997-04-06 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> * emacs.c (init_cmdargs) [MSDOS]: Make the change that sets `installation-directory' if `info' is found as its subdirectory or sibling, be conditioned on MSDOS (it makes trouble on Unix). - 1997-04-05 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> * coding.c (Ffind_coding_system): Doc fix. @@ -8818,7 +8816,7 @@ Sun Apr 6 10:26:53 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> * coding.c (setup_coding_system): Now, flags of ISO2022 coding systems contains charsets instead of charset IDs. Correct setting coding->symbol and coding->eol_type. The performance improved. - (encode_coding) : Fix typo ("=" -> "=="). + (encode_coding): Fix typo ("=" -> "=="). (detect_coding_iso2022, decode_coding_iso2022): Make the code robust against invalid SI and SO. (ENCODE_RESET_PLANE_AND_REGISTER): Argument `eol' is deleted. @@ -8914,7 +8912,7 @@ Sun Apr 6 10:26:53 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> 1997-02-22 Tsugutomo ENAMI <enami@ba2.so-net.or.jp> - * regex.c: Include charset.h and category.h + * regex.c: Include charset.h and category.h. [!emacs] (BASE_LEADING_CODE_P, WORD_BOUNDARY_P, CHAR_HEAD_P) (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MULTIBYTE_FORM_LENGTH) @@ -9407,7 +9405,7 @@ Sun Apr 6 10:26:53 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> * emacs.c (main): Don't extend stack limit too far. -Sun Feb 2 10:36:26 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> +1997-02-02 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> * msdos.c (dos_rawgetc): When international keyboard doesn't have to be supported, recognize Alt-key combinations even if the Alt @@ -10403,7 +10401,7 @@ Sun Feb 2 10:36:26 1997 Eli Zaretskii <eliz@wombat.gnu.ai.mit.edu> * xfns.c (Fx_create_frame): Default Qvertical_scroll_bars to `left'. -Fri Sep 20 02:37:37 1996 Marcus Daniels <marcus@sayre.sysc.pdx.edu> +1996-09-20 Marcus Daniels <marcus@sayre.sysc.pdx.edu> * xterm.c (XTclear_end_of_line): Shift end-of-line when there is a left-side scroll bar by FRAME_LEFT_SCROLL_BAR_WIDTH. @@ -10710,13 +10708,13 @@ Fri Sep 20 02:37:37 1996 Marcus Daniels <marcus@sayre.sysc.pdx.edu> (XMARKBIT): Test BITS_PER_EMACS_INT to conditionalize fast definition. * m/alpha.h (BITS_PER_EMACS_INT): New definition. - * s/sol2.h (LIBS_SYSTEM): Use -lkstat instead of -lelf -lkvm + * s/sol2.h (LIBS_SYSTEM): Use -lkstat instead of -lelf -lkvm. * process.c (create_process): Test HAVE_SETPGID for using setpgid. * config.in (HAVE_SETPGID): Add #undef. - * keymap.c (syms_of_keymap): staticpro current_global_map; + * keymap.c (syms_of_keymap): staticpro current_global_map. * intervals.c (get_local_map): Call indirect-function. diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index b156e4e39f8..da95bbd8a0b 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 @@ -6,26 +6,26 @@ 1999-12-31 William M. Perry <wmperry@aventail.com> - * xfns.c (jpeg_format): Add the :data keyword - (jpeg_image_p): JPEG is valid with :file _or_ :data + * xfns.c (jpeg_format): Add the :data keyword. + (jpeg_image_p): JPEG is valid with :file _or_ :data. (jpeg_memory_src): Define new JPEG image source to read from a memory buffer. (jpeg_load): Pay attention to the :data keyword if specified. Instantiates a jpeg_memory_src instead of jpeg_stdio_src if found. - (png_format): Add the :data keyword - (png_image_p): PNG is valid with :file _or_ :data + (png_format): Add the :data keyword. + (png_image_p): PNG is valid with :file _or_ :data. (png_read_from_memory): New PNG read function to read from a memory buffer. (png_load): Pay attention to the :data keyword if specified. Use png_set_read_fn() instead of png_init_io() if specified. (tiff_format): Add the :data keyword for TIFF images. - (tiff_image_p): TIFF is valid with :file _or_ :data + (tiff_image_p): TIFF is valid with :file _or_ :data. (tiff_read_from_memory): Define new TIFF I/O functions to read from a memory buffer. (tiff_load): Pay attention to the :data keyword if specified. Uses TIFFClientOpen() instead of TIFFOpen() if specified. - (gif_format): Add the :data keyword - (gif_image_p): GIF is valid with :file _or_ :data + (gif_format): Add the :data keyword. + (gif_image_p): GIF is valid with :file _or_ :data. (gif_read_from_memory): New GIF input function to read from a memory buffer. (gif_load): Pay attention to the :data keyword. Uses DGifOpen() @@ -237,7 +237,7 @@ 1999-12-15 Eli Zaretskii <eliz@is.elta.co.il> * dispextern.h (FACE_TTY_DEFAULT_FG_COLOR) - (FACE_TTY_DEFAULT_BG_COLOR): New macros. + (FACE_TTY_DEFAULT_BG_COLOR): New macros. * xfaces.c (Qunspecified_fg, Qunspecified_bg): New variables. (syms_of_xfaces): Initialize and staticpro them. @@ -561,7 +561,7 @@ (produce_glyphs): When called, it->what can be IT_COMPOSITION. Delete codes for a composite character. - * textprop.c (Vtext_property_default_nonsticky): New variable + * textprop.c (Vtext_property_default_nonsticky): New variable. (syms_of_textprop): Declare it as a Lisp variable. * window.c (Frecenter): Clear all caches of compositions. @@ -687,7 +687,7 @@ 1999-12-09 Dave Love <fx@gnu.org> - * frame.h: (PIX_TYPE) [! HAVE_X_WINDOWS]: Define PIX_TYPE. + * frame.h (PIX_TYPE) [! HAVE_X_WINDOWS]: Define PIX_TYPE. 1999-12-08 Gerd Moellmann <gerd@gnu.org> @@ -766,8 +766,8 @@ (tty_defined_color): New function. (defined_color): Rewrite to support any type of frame. (tty_color_name): New function. - (face_color_supported_p, Fface_color_gray_p, - Fface_color_supported_p): Support non-X frames. + (face_color_supported_p, Fface_color_gray_p) + (Fface_color_supported_p): Support non-X frames. (load_color): Enclose the color name in quotes, in the log messages. Remove DOS-specific version of load_color. (realize_tty_face): Take the supported colors from @@ -795,10 +795,10 @@ selected_frame. (struct x_output): Remove unused members; document who uses each member. - (FRAME_PARAM_FACES, FRAME_N_PARAM_FACES, FRAME_DEFAULT_PARAM_FACE, - FRAME_MODE_LINE_PARAM_FACE, FRAME_COMPUTED_FACES, - FRAME_N_COMPUTED_FACES, FRAME_SIZE_COMPUTED_FACES, - FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color): Remove + (FRAME_PARAM_FACES, FRAME_N_PARAM_FACES, FRAME_DEFAULT_PARAM_FACE) + (FRAME_MODE_LINE_PARAM_FACE, FRAME_COMPUTED_FACES) + (FRAME_N_COMPUTED_FACES, FRAME_SIZE_COMPUTED_FACES) + (FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color): Remove unused macro definintions. * msdos.c (IT_set_frame_parameters): Don't call @@ -826,9 +826,9 @@ changed. (Fxw_display_color_p): Renamed from Fx_display_color_p; all callers changed. - (x_window_to_frame, x_any_window_to_frame, - x_non_menubar_window_to_frame, x_menubar_window_to_frame, - x_top_window_to_frame): Use !FRAME_X_P instead of + (x_window_to_frame, x_any_window_to_frame) + (x_non_menubar_window_to_frame, x_menubar_window_to_frame) + (x_top_window_to_frame): Use !FRAME_X_P instead of f->output_data.nothing. * xterm.h (x_defined_color): Rename from defined_color. @@ -898,7 +898,7 @@ 1999-11-28 Gerd Moellmann <gerd@gnu.org> * systime.h (EMACS_TIME_CMP, EMACS_TIME_EQ, EMACS_TIME_NE) - (EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT,EMACS_TIME_LE): New + (EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT, EMACS_TIME_LE): New macros. * config.in (HAVE_SETITIMER, HAVE_UALARM): New. @@ -1211,7 +1211,7 @@ Add extern declaration for byte_stack_list. * bytecode.c (struct byte_stack): New. - (byte_stack_list, mark_byte_stack, relocate_byte_pcs): New + (byte_stack_list, mark_byte_stack, relocate_byte_pcs): New. (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): New. (FETCH, PUSH, POP, DISCARD, TOP, MAYBE_GC): Rewritten. (HANDLE_RELOCATION): Removed. @@ -1378,38 +1378,38 @@ * alloc.c: Undef HIDE_LISP_IMPLEMENTATION before including lisp.h. - * buffer.c (Fbuffer_list, Fget_file_buffer, get_truename_buffer, - Fbuffer_local_variables, Fother_buffer, record_buffer, - set_buffer_internal_1, Fbury_buffer, Fkill_all_local_variables, - swap_out_buffer_local_variables, overlays_at, overlays_in, - overlay_touches_p, overlay_strings, recenter_overlay_lists, - fix_overlays_in_range, fix_overlays_before, Foverlay_get, - Foverlay_put, report_overlay_modification, evaporate_overlays): + * buffer.c (Fbuffer_list, Fget_file_buffer, get_truename_buffer) + (Fbuffer_local_variables, Fother_buffer, record_buffer) + (set_buffer_internal_1, Fbury_buffer, Fkill_all_local_variables) + (swap_out_buffer_local_variables, overlays_at, overlays_in) + (overlay_touches_p, overlay_strings, recenter_overlay_lists) + (fix_overlays_in_range, fix_overlays_before, Foverlay_get) + (Foverlay_put, report_overlay_modification, evaporate_overlays): Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member references. - * data.c (Fcar, Fcar_safe, Fcdr, Fcdr_safe, Fsetcar, Fsetcdr, - swap_in_symval_forwarding, set_internal, default_value, - Fset_default, Fmake_variable_buffer_local, Fmake_local_variable, - Fmake_variable_frame_local, Flocal_variable_p, - Flocal_variable_if_set_p, arithcompare, Fzerop, cons_to_long, - Fnumber_to_string, float_arith_driver, Fadd1, Fsub1): Likewise. + * data.c (Fcar, Fcar_safe, Fcdr, Fcdr_safe, Fsetcar, Fsetcdr) + (swap_in_symval_forwarding, set_internal, default_value) + (Fset_default, Fmake_variable_buffer_local, Fmake_local_variable) + (Fmake_variable_frame_local, Flocal_variable_p) + (Flocal_variable_if_set_p, arithcompare, Fzerop, cons_to_long) + (Fnumber_to_string, float_arith_driver, Fadd1, Fsub1): Likewise. * dispnew.c (Fframe_or_buffer_changed_p): Likewise. * emacs.c (main): Likewise. - * fontset.c (fs_load_font, fs_register_fontset, - CACHED_FONTSET_NAME, CACHED_FONTSET_REGEX, Fquery_fontset, - Fnew_fontset, Fset_fontset_font): Likewise. - * frame.c (do_switch_frame, next_frame, prev_frame, - other_visible_frames, Fdelete_frame, Fvisible_frame_list): + * fontset.c (fs_load_font, fs_register_fontset) + (CACHED_FONTSET_NAME, CACHED_FONTSET_REGEX, Fquery_fontset) + (Fnew_fontset, Fset_fontset_font): Likewise. + * frame.c (do_switch_frame, next_frame, prev_frame) + (other_visible_frames, Fdelete_frame, Fvisible_frame_list): Likewise. - * keyboard.c (read_char, help_char_p, event_to_kboard, - kbd_buffer_get_event, timer_start_idle, timer_check, - make_lispy_event, apply_modifiers, reorder_modifiers, - Fevent_convert_list, lucid_event_type_list_p, menu_bar_items, - menu_bar_one_keymap, menu_item_eval_property_1, parse_menu_item, - tool_bar_items, read_char_x_menu_prompt, read_key_sequence, - Fcommand_execute, Fexecute_extended_command): Likewise. - * minibuf.c (read_minibuf, get_minibuffer, Ftry_completion, - Fall_completions): Likewise. + * keyboard.c (read_char, help_char_p, event_to_kboard) + (kbd_buffer_get_event, timer_start_idle, timer_check) + (make_lispy_event, apply_modifiers, reorder_modifiers) + (Fevent_convert_list, lucid_event_type_list_p, menu_bar_items) + (menu_bar_one_keymap, menu_item_eval_property_1, parse_menu_item) + (tool_bar_items, read_char_x_menu_prompt, read_key_sequence) + (Fcommand_execute, Fexecute_extended_command): Likewise. + * minibuf.c (read_minibuf, get_minibuffer, Ftry_completion) + (Fall_completions): Likewise. * window.c (Fset_window_margins): Likewise. * callint.c (quotify_args): Don't explicitly use struct @@ -1477,9 +1477,9 @@ * coding.h (emacs_strerror, Vlocale_coding_system): New decls. - * config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING, - HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN, - HAVE_STRSIGNAL): New macros. + * config.in (HAVE_STDIO_EXT_H, HAVE_TM_GMTOFF, HAVE___FPENDING) + (HAVE_FTELLO, HAVE_GETLOADAVG, HAVE_MBLEN, HAVE_MBRLEN) + (HAVE_STRSIGNAL): New macros. (BITS_PER_LONG): Default to 64 if _LP64 is defined. <stdlib.h>: Include if HAVE_STDLIB_H is defined and NOT_C_CODE isn't. @@ -1501,14 +1501,14 @@ emacs_memftimeu, passing ut, instead of emacs_memftime. * emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined. - (Vmessages_locale, Vprevious_messages_locale, Vtime_locale, - Vprevious_time_locale): New variables. + (Vmessages_locale, Vprevious_messages_locale, Vtime_locale) + (Vprevious_time_locale): New variables. (main): Invoke setlocale early, so that initial error messages are localized properly. But skip locale-setting if LC_ALL is "C". Fix up locale when it's safe to do so. (fixup_locale): Moved here from xterm.c. - (synchronize_locale, synchronize_time_locale, - synchronize_messages_locale): New functions. + (synchronize_locale, synchronize_time_locale) + (synchronize_messages_locale): New functions. (syms_of_emacs): Accommodate above changes. * fileio.c (report_file_error): Convert strerror output according @@ -1526,9 +1526,9 @@ default these values to long, BITS_PER_LONG, and unsigned long. (VALBITS, MARKBIT, XINT): Do not assume 32-bit EMACS_INT. (PNTR_COMPARISON_TYPE): Default to EMACS_UINT, not to unsigned int. - (code_convert_string_norecord, fixup_locale, - synchronize_messages_locale, synchronize_time_locale, - emacs_open, emacs_close, emacs_read, emacs_write): New decls. + (code_convert_string_norecord, fixup_locale) + (synchronize_messages_locale, synchronize_time_locale) + (emacs_open, emacs_close, emacs_read, emacs_write): New decls. All Emacs callers of open, close, read, write changed to use emacs_open, emacs_close, emacs_read, emacs_write. @@ -1579,13 +1579,13 @@ s/hpux.h, s/iris3-5.h, s/iris3-6.h, s/irix3-3.h, s/osf1.h, s/rtu.h, s/sunos4-1.h, s/unipl5-0.h, s/unipl5-2.h, s/usg5-0.h, s/usg5-2-2.h, s/usg5-2.h, s/usg5-3.h, s/xenix.h: - (open, close, read, write, INTERRUPTIBLE_OPEN, - INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove. + (open, close, read, write, INTERRUPTIBLE_OPEN) + (INTERRUPTIBLE_CLOSE, INTERRUPTIBLE_IO): Remove. * s/sol2-5.h (_LARGEFILE_SOURCE, _FILE_OFFSET_BITS): New macros. - * sysdep.c (sys_read, sys_write, read, write, sys_close, close, - sys_open, open): Remove. + * sysdep.c (sys_read, sys_write, read, write, sys_close, close) + (sys_open, open): Remove. (emacs_open, emacs_close, emacs_read, emacs_write): Always define; the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO macros are no longer used. @@ -1711,8 +1711,8 @@ 1999-10-17 Miles Bader <miles@gnu.org> * editfns.c (Qfield): New variable. - (find_field, Ferase_field, Ffield_string, - Ffield_beginning, Ffield_end, Fconstrain_to_field): New functions. + (find_field, Ferase_field, Ffield_string) + (Ffield_beginning, Ffield_end, Fconstrain_to_field): New functions. (Fline_beginning_position, Fline_end_position): Constrain to any field. (make_buffer_string_both): Remove minibuffer-prompt hack. (syms_of_editfns): Initialize Qfield, and subr entries for @@ -1823,9 +1823,8 @@ (Fbitmap_spec_p): Replaces Fpixmap_spec_p. (load_pixmap): Use Fbitmap_spec_p and Qbitmap_spec_p instead of Fpixmap_spec_p and Qpixmap_spec_p. - (load_face_colors, check_lface_attrs, - merge_face_vector_with_property, - Finternal_set_lisp_face_attribute): Use Fbitmap_spec_p. + (load_face_colors, check_lface_attrs, merge_face_vector_with_property) + (Finternal_set_lisp_face_attribute): Use Fbitmap_spec_p. (syms_of_xfaces): Initialize Qbitmap_spec_p, defsubr Fbitmap_spec_p. @@ -1922,8 +1921,8 @@ * xfns.c (image_error): Use add_to_log. * xfaces.c (load_pixmap): Call add_to_log without frame parameter. - (load_face_font_or_fontset, load_color, - merge_face_vector_with_property): Ditto. + (load_face_font_or_fontset, load_color) + (merge_face_vector_with_property): Ditto. * dispextern.h: Add prototype for add_to_log. @@ -1942,8 +1941,8 @@ * window.c (window_min_size): Add parameter ignore_fixed_p. (change_window_height): Call window_min_size with new parameter. - (shrink_window_lowest_first, save_restore_orig_size, - grow_mini_window, shrink_mini_window): New. + (shrink_window_lowest_first, save_restore_orig_size) + (grow_mini_window, shrink_mini_window): New. (make_window, replace_window): Initialize orig_top and orig_height. (enlarge_window): Renamed from change_window_height. Make it @@ -1991,8 +1990,8 @@ conditinally compiled section in #ifdef. (toplevel): Include stdio.h. - * keymap.c (Flookup_key, Faccessible_keymaps, describe_vector, - keys_of_keymap, syms_of_keymap): Remove unused variables. + * keymap.c (Flookup_key, Faccessible_keymaps, describe_vector) + (keys_of_keymap, syms_of_keymap): Remove unused variables. 1999-09-20 Gerd Moellmann <gerd@gnu.org> @@ -2012,8 +2011,8 @@ 1999-09-19 Gerd Moellmann <gerd@gnu.org> - * syntax.c (update_syntax_table, find_defun_start, back_comment, - describe_syntax, skip_chars): Remove unused variables. + * syntax.c (update_syntax_table, find_defun_start, back_comment) + (describe_syntax, skip_chars): Remove unused variables. (back_comment, forw_comment): Add braces to if-statement with if-else as dependent statement. @@ -2022,30 +2021,30 @@ conditional expressions. (create_process): Put declaration of sigchld in #if 0. (Fopen_network_stream): Removed unused variables. - (Fopen_network_stream, wait_reading_process_input, - wait_reading_process_input, send_process, send_process): Ditto. + (Fopen_network_stream, wait_reading_process_input) + (wait_reading_process_input, send_process, send_process): Ditto. (toplevel): Add prototypes for set_waiting_for_input and keyboard_bit_set. * abbrev.c (Fexpand_abbrev): Remove unused variables. * textprop.c (Fset_text_properties): Remove unused variables. - (text_property_list, verify_interval_modification, - interval_has_all_properties): Ditto. + (text_property_list, verify_interval_modification) + (interval_has_all_properties): Ditto. * callproc.c (toplevel) [HAVE_UNISTD_H]: Include unistd.h. (Fcall_process): Remove unused variable. * keyboard.c (Frecursive_edit): Remove unused variable. - (command_loop_1, safe_run_hooks, kbd_buffer_get_event, - timer_check, make_lispy_event, menu_bar_items, - menu_bar_one_keymap, menu_bar_item, parse_menu_item, - parse_tool_bar_item, read_char_x_menu_prompt, read_key_sequence, - kbd_buffer_get_event, make_lispy_event, read_char_x_menu_prompt, - read_key_sequence): Ditto. Fread_key_sequence, - Fread_key_sequence_vector, Fsuspend_emacs): Ditto. + (command_loop_1, safe_run_hooks, kbd_buffer_get_event) + (timer_check, make_lispy_event, menu_bar_items) + (menu_bar_one_keymap, menu_bar_item, parse_menu_item) + (parse_tool_bar_item, read_char_x_menu_prompt, read_key_sequence) + (kbd_buffer_get_event, make_lispy_event, read_char_x_menu_prompt) + (read_key_sequence): Ditto. + (Fread_key_sequence, Fread_key_sequence_vector, Fsuspend_emacs): Ditto. (read_key_sequence) [GOBBLE_FIRST_EVENT]: Put local variables only - used when GOBBLE_FIRST_EVENT is defined in #ifdef + used when GOBBLE_FIRST_EVENT is defined in #ifdef. (Fexecute_extended_command): Cast XINT to long for %ld. (toplevel) [HAVE_UNISTD_H]: Include unistd.h. (toplevel): Include sys/types.h. @@ -2059,8 +2058,8 @@ * buffer.h: Add prototype for r_re_alloc. * insdel.c (copy_text): Removed unused variables. - (count_combining_after, count_combining_after, insert_1_both, - insert_from_string_1, insert_from_buffer_1, check_markers): Ditto. + (count_combining_after, count_combining_after, insert_1_both) + (insert_from_string_1, insert_from_buffer_1, check_markers): Ditto. (adjust_after_replace, replace_range): Add parentheses to logical expressions. Remove unused variables. (CHECK_BYTE_COMBINING_FOR_INSERT): Add parentheses to logical @@ -2108,17 +2107,17 @@ * intervals.c (rotate_right, rotate_left): Add braces to avoid ambiguous else warning. (split_interval_left): Remove unused variables. - (previous_interval, adjust_intervals_for_deletion, - set_point_both, set_point_both, set_intervals_multibyte_1): Ditto. + (previous_interval, adjust_intervals_for_deletion) + (set_point_both, set_point_both, set_intervals_multibyte_1): Ditto. (icount, idepth, zero_length): Move into #if 0 section below original position where these are used. * buffer.h [REL_ALLOC]: Add prototypes for r_alloc and r_alloc_free. * buffer.c (Fkill_buffer): Remove unused variables. - (Fkill_buffer, overlays_at, overlays_in, recenter_overlay_lists, - fix_overlays_in_range, Fmove_overlay, Fprevious_overlay_change, - init_buffer_once, (syms_of_buffer): Ditto. + (Fkill_buffer, overlays_at, overlays_in, recenter_overlay_lists) + (fix_overlays_in_range, Fmove_overlay, Fprevious_overlay_change) + (init_buffer_once, syms_of_buffer): Ditto. * xrdb.c (get_fallback): Remove unused variable. (x_load_resources): Ditto. Put local variable used for Motif only @@ -2178,15 +2177,15 @@ * xdisp.c (resize_mini_window): Don't report changed window height if it actually hasn't changed. - * widget.c (set_frame_size, EmacsFrameSetCharSize): Remove + * widget.c (set_frame_size, EmacsFrameSetCharSize): Remove unused variables. (mark_shell_size_user_specified): Put in #if 0 because not used. (create_frame_gcs): Put in #if 0 because currently unused. (first_frame_p): Ditto. - * xmenu.c (single_menu_item, Fx_popup_menu, Fx_popup_menu, - single_submenu, update_frame_menubar, set_frame_menubar, - free_frame_menubar, xmenu_show, xdialog_show): Remove unused + * xmenu.c (single_menu_item, Fx_popup_menu, Fx_popup_menu) + (single_submenu, update_frame_menubar, set_frame_menubar) + (free_frame_menubar, xmenu_show, xdialog_show): Remove unused variables. * print.c (PRINTFULLP): Removed because it is no longer used and @@ -2202,8 +2201,8 @@ 1999-09-14 Ken Raeburn <raeburn@gnu.org> - * print.c (Ferror_message_string, print_error_message, - print_object): Use XCAR, XCDR and XFLOAT_DATA instead of explicit + * print.c (Ferror_message_string, print_error_message) + (print_object): Use XCAR, XCDR and XFLOAT_DATA instead of explicit member access. 1999-09-14 Gerd Moellmann <gerd@gnu.org> @@ -2222,10 +2221,10 @@ (x_set_menu_bar_lines): Put local variable used only for non-toolkit case in #ifdef/#endif. (x_figure_window_size): Remove unused variable(s). - (x_figure_window_size, x_window, lookup_image, - xbm_read_bitmap_file_data, x_build_heuristic_mask, pbm_load, - png_load, jpeg_load, gif_load, x_create_tip_frame, - x_create_tip_frame, Fx_show_tip, x_set_border_pixel): Ditto. + (x_figure_window_size, x_window, lookup_image) + (xbm_read_bitmap_file_data, x_build_heuristic_mask, pbm_load) + (png_load, jpeg_load, gif_load, x_create_tip_frame) + (x_create_tip_frame, Fx_show_tip, x_set_border_pixel): Ditto. * xterm.c (x_scroll_bar_handle_click): Compile only if not USE_TOOLKIT_SCROLL_BARS. @@ -2235,8 +2234,8 @@ x_kill_gs_process. * xterm.c (x_produce_glyphs): Remove unused variable(s). - (x_alloc_nearest_color_for_widget, note_tool_bar_highlight, - x_set_toolkit_scroll_bar_thumb): Ditto. + (x_alloc_nearest_color_for_widget, note_tool_bar_highlight) + (x_set_toolkit_scroll_bar_thumb): Ditto. (x_scroll_bar_create): Move local variable to the conditionally compiled section of code where it is used. (x_scroll_bar_create): Remove unused variable(s). @@ -2255,8 +2254,8 @@ to use do-while. * fns.c (SXHASH_COMBINE): Add missing parentheses. - (Fchar_table_range, Fset_char_table_default, mapcar1, - Fyes_or_no_p, sweep_weak_hash_tables): Remove unused variable(s). + (Fchar_table_range, Fset_char_table_default, mapcar1) + (Fyes_or_no_p, sweep_weak_hash_tables): Remove unused variable(s). * lisp.h: Add prototype for getloadavg. @@ -2285,9 +2284,9 @@ * xdisp.c (QCfile): Move here from xfns.c. (syms_of_xdisp): Initialize it. (message2_nolog): Change for Lisp_Object selected_frame. - (message3_nolog, message_with_string, message, - setup_echo_area_for_printing, truncate_echo_area, - prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto. + (message3_nolog, message_with_string, message) + (setup_echo_area_for_printing, truncate_echo_area) + (prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto. 1999-09-13 Dave Love <fx@gnu.org> @@ -2338,11 +2337,11 @@ (Fdump_face): Ditto. * term.c (OUTPUT): Change for Lisp_Object selected_frame. - (OUTPUT_IF, ring_bell, set_terminal_modes, reset_terminal_modes, - set_terminal_window, set_scroll_region, reassert_line_highlight, - change_line_highlight, cursor_to, raw_cursor_to, clear_to_end, - clear_end_of_line, clear_end_of_line_raw, clear_end_of_line_raw, - encode_terminal_code, write_glyphs, term_init): Ditto. + (OUTPUT_IF, ring_bell, set_terminal_modes, reset_terminal_modes) + (set_terminal_window, set_scroll_region, reassert_line_highlight) + (change_line_highlight, cursor_to, raw_cursor_to, clear_to_end) + (clear_end_of_line, clear_end_of_line_raw, clear_end_of_line_raw) + (encode_terminal_code, write_glyphs, term_init): Ditto. * sysdep.c (reset_sys_modes): Change for Lisp_Object selected_frame. (kbd_input_ast, read_input_waiting): Ditto. @@ -2352,10 +2351,10 @@ (read_minibuf): Ditto. * keyboard.c (command_loop_1): Change for Lisp_Object selected_frame. - (cmd_error_internal, command_loop_1, read_char, - kbd_buffer_get_event, read_avail_input, - read_char_minibuf_menu_prompt, read_key_sequence, Fsuspend_emacs, - interrupt_signal, quit_throw_to_read_char): Ditto. + (cmd_error_internal, command_loop_1, read_char) + (kbd_buffer_get_event, read_avail_input) + (read_char_minibuf_menu_prompt, read_key_sequence, Fsuspend_emacs) + (interrupt_signal, quit_throw_to_read_char): Ditto. * fontset.c (Ffont_info): Change for Lisp_Object selected_frame. (Ffontset_info): DItto. @@ -2364,8 +2363,8 @@ * dispnew.c (selected_frame): Make it a Lisp_Object. (adjust_frame_glyphs_initially): Change for Lisp_Object selected_frame. - (direct_output_for_insert, direct_output_forward_char, - init_display): Ditto. + (direct_output_for_insert, direct_output_forward_char) + (init_display): Ditto. * data.c (swap_in_symval_forwarding): Change for Lisp_Object selected_frame. @@ -2379,20 +2378,20 @@ (Fselected_frame): Ditto. (Fframe_first_window): Use SELECTED_FRAME. (Fframe_root_window): Change for Lisp_Object selected_frame. - (Fframe_selected_window, Fset_frame_selected_window, Fnext_frame, - Fprevious_frame, other_visible_frames, Fdelete_frame, - Fmouse_position, Fmouse_pixel_position, Fmake_frame_visible, - Fmake_frame_invisible, Ficonify_frame, Fraise_frame, Flower_frame, - Fframe_parameters, Fmodify_frame_parameters, Fframe_char_height, - Fframe_char_width, Fframe_pixel_height, Fframe_pixel_width, - Fset_frame_height, Fset_frame_width): Ditto. + (Fframe_selected_window, Fset_frame_selected_window, Fnext_frame) + (Fprevious_frame, other_visible_frames, Fdelete_frame) + (Fmouse_position, Fmouse_pixel_position, Fmake_frame_visible) + (Fmake_frame_invisible, Ficonify_frame, Fraise_frame, Flower_frame) + (Fframe_parameters, Fmodify_frame_parameters, Fframe_char_height) + (Fframe_char_width, Fframe_pixel_height, Fframe_pixel_width) + (Fset_frame_height, Fset_frame_width): Ditto. 1999-09-13 Gerd Moellmann <gerd@gnu.org> * xdisp.c (message2_nolog): Change for Lisp_Object selected_frame. - (message3_nolog, message_with_string, message, - setup_echo_area_for_printing, truncate_echo_area, - prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto. + (message3_nolog, message_with_string, message) + (setup_echo_area_for_printing, truncate_echo_area) + (prepare_menu_bars, redisplay_internal, Fdump_tool_bar_row): Ditto. * xmenu.c (Fx_popup_menu): Change for Lisp_Object selected_frame. (Fx_popup_dialog): Ditto. @@ -2406,48 +2405,48 @@ * window.c (Fminibuffer_window): Change for Lisp_Object selected_frame. - (Fwindow_at, Fprevious_window, window_loop, select_window_1, - display_buffer_1, Fdisplay_buffer, temp_output_buffer_show, - Fcurrent_window_configuration, init_window_once): Ditto. + (Fwindow_at, Fprevious_window, window_loop, select_window_1) + (display_buffer_1, Fdisplay_buffer, temp_output_buffer_show) + (Fcurrent_window_configuration, init_window_once): Ditto. * frame.h (SELECTED_FRAME): New. 1999-09-12 Ken Raeburn <raeburn@gnu.org> * category.c (word_boundary_p): Use XCAR and XCDR. - * ccl.c (ccl_driver, resolve_symbol_ccl_program, - Fregister_code_conversion_map): Likewise. - * coding.c (setup_coding_system, detect_coding_system, - Ffind_operation_coding_system, Fset_coding_priority_internal): + * ccl.c (ccl_driver, resolve_symbol_ccl_program) + (Fregister_code_conversion_map): Likewise. + * coding.c (setup_coding_system, detect_coding_system) + (Ffind_operation_coding_system, Fset_coding_priority_internal): Likewise. - * doc.c (get_doc_string, Fdocumentation, - store_function_docstring): Likewise. + * doc.c (get_doc_string, Fdocumentation) + (store_function_docstring): Likewise. * editfns.c (save_restriction_restore): Likewise. - * eval.c (Fcond, Fmacroexpand, Fcondition_case, wants_debugger, - skip_debugger, find_handler_clause, Fautoload, Fapply, - run_hook_with_args, run_hook_list_with_args, Ffetch_bytecode): + * eval.c (Fcond, Fmacroexpand, Fcondition_case, wants_debugger) + (skip_debugger, find_handler_clause, Fautoload, Fapply) + (run_hook_with_args, run_hook_list_with_args, Ffetch_bytecode): Likewise. - * fileio.c (Ffind_file_name_handler, Finsert_file_contents, - Fwrite_region, do_auto_save_unwind, Fdo_auto_save, - Fread_file_name): Likewise. + * fileio.c (Ffind_file_name_handler, Finsert_file_contents) + (Fwrite_region, do_auto_save_unwind, Fdo_auto_save) + (Fread_file_name): Likewise. * filelock.c (unlock_all_files): Likewise. * insdel.c (Fcombine_after_change_execute): Likewise. * intervals.c (adjust_intervals_for_insertion): Likewise. - * keymap.c (get_keymap_1, Fkeymap_parent, Fset_keymap_parent, - Fset_keymap_parent, fix_submap_inheritance, access_keymap, - store_in_keymap, Fcopy_keymap, define_as_prefix, - current_minor_maps, Faccessible_keymaps, - accessible_keymaps_char_table, Fkey_description, - Fwhere_is_internal, where_is_internal_2, where_is_internal_1, - describe_buffer_bindings, describe_map_tree, shadow_lookup, - describe_map): Likewise. - * lread.c (Fload, load_unwind, close_load_descs, read_vector, - read_list, init_lread): Likewise. + * keymap.c (get_keymap_1, Fkeymap_parent, Fset_keymap_parent) + (Fset_keymap_parent, fix_submap_inheritance, access_keymap) + (store_in_keymap, Fcopy_keymap, define_as_prefix) + (current_minor_maps, Faccessible_keymaps) + (accessible_keymaps_char_table, Fkey_description) + (Fwhere_is_internal, where_is_internal_2, where_is_internal_1) + (describe_buffer_bindings, describe_map_tree, shadow_lookup) + (describe_map): Likewise. + * lread.c (Fload, load_unwind, close_load_descs, read_vector) + (read_list, init_lread): Likewise. * search.c (Fmatch_data): Likewise. * sunfns.c (Fsun_menu_internal): Likewise. * syntax.c (describe_syntax): Likewise. - * undo.c (record_insert, record_delete, Fundo_boundary, - truncate_undo_list): Likewise. + * undo.c (record_insert, record_delete, Fundo_boundary) + (truncate_undo_list): Likewise. * vmsproc.c (child_sig): Likewise. * editfns.c (Fformat): Use XFLOAT_DATA. @@ -2531,63 +2530,63 @@ 1999-09-12 Ken Raeburn <raeburn@gnu.org> - * alloc.c (Fcons, pure_cons, Fpurecopy, Fgarbage_collect, - mark_object, mark_buffer): Use XCAR and XCDR. + * alloc.c (Fcons, pure_cons, Fpurecopy, Fgarbage_collect) + (mark_object, mark_buffer): Use XCAR and XCDR. * bytecode.c (Fbyte_code): Likewise. * callint.c (Fcall_interactively, Fprefix_numeric_value): Likewise. - * callproc.c (Fcall_process, Fcall_process_region, child_setup, - getenv_internal): Likewise. + * callproc.c (Fcall_process, Fcall_process_region, child_setup) + (getenv_internal): Likewise. * dired.c (file_name_completion): Likewise. - * fns.c (Fsafe_length, concat, Fcopy_alist, Fmember, Fmemq, Fassq, - assq_no_quit, Fassoc, Frassq, Frassoc, Fdelq, Fdelete, Freverse, - Fplist_get, Fplist_put, internal_equal, mapcar1): Likewise. + * fns.c (Fsafe_length, concat, Fcopy_alist, Fmember, Fmemq, Fassq) + (assq_no_quit, Fassoc, Frassq, Frassoc, Fdelq, Fdelete, Freverse) + (Fplist_get, Fplist_put, internal_equal, mapcar1): Likewise. * indent.c (Fcompute_motion): Likewise. - * process.c (decode_status, Fprocess_status, Fprocess_exit_status, - list_processes_1, Fstart_process, Fopen_network_stream, - wait_reading_process_input, read_process_output_call, - kill_buffer_processes, sigchld_handler, exec_sentinel_unwind, - status_notify, wait_reading_process_input): Likewise. - * textprop.c (PLIST_ELT_P, property_value, set_properties, - extend_property_ranges): Likewise. + * process.c (decode_status, Fprocess_status, Fprocess_exit_status) + (list_processes_1, Fstart_process, Fopen_network_stream) + (wait_reading_process_input, read_process_output_call) + (kill_buffer_processes, sigchld_handler, exec_sentinel_unwind) + (status_notify, wait_reading_process_input): Likewise. + * textprop.c (PLIST_ELT_P, property_value, set_properties) + (extend_property_ranges): Likewise. * w32faces.c (Fpixmap_spec_p, merge_face_list): Likewise. - * w32fns.c (x_window_to_frame, x_set_frame_parameters, - x_report_frame_params, x_set_cursor_type, x_icon_type, - x_figure_window_size, Fx_create_frame, w32_load_system_font, - w32_load_font, enum_font_cb2, w32_list_bdf_fonts, w32_list_fonts, - w32_list_synthesized_fonts, w32_find_ccl_program, Fx_list_fonts, - Fw32_find_bdf_fonts, w32_find_bdf_fonts_in_dir, - x_display_info_for_name, Fx_display_list): Likewise. - * w32menu.c (menubar_id_to_frame, single_keymap_panes, - Fx_popup_menu, Fx_popup_dialog): Likewise. + * w32fns.c (x_window_to_frame, x_set_frame_parameters) + (x_report_frame_params, x_set_cursor_type, x_icon_type) + (x_figure_window_size, Fx_create_frame, w32_load_system_font) + (w32_load_font, enum_font_cb2, w32_list_bdf_fonts, w32_list_fonts) + (w32_list_synthesized_fonts, w32_find_ccl_program, Fx_list_fonts) + (Fw32_find_bdf_fonts, w32_find_bdf_fonts_in_dir) + (x_display_info_for_name, Fx_display_list): Likewise. + * w32menu.c (menubar_id_to_frame, single_keymap_panes) + (Fx_popup_menu, Fx_popup_dialog): Likewise. * w32proc.c (Fw32_set_keyboard_layout): Likewise. - * w32term.c (x_window_to_scroll_bar, w32_read_socket, - w32_term_init, x_delete_display): Likewise. - * xfns.c (x_window_to_frame, x_any_window_to_frame, - x_non_menubar_window_to_frame, x_menubar_window_to_frame, - x_top_window_to_frame, x_set_frame_parameters, - x_report_frame_params, x_set_cursor_type, x_icon_type, - x_figure_window_size, Fx_create_frame, x_display_info_for_name, - Fx_display_list, x_create_tip_frame): Likewise. - * xmenu.c (menubar_id_to_frame, single_keymap_panes, - Fx_popup_menu, Fx_popup_dialog): Likewise. - * xselect.c (x_own_selection, x_get_local_selection, - x_handle_selection_request, x_handle_selection_clear, - x_clear_frame_selections, wait_for_property_change_unwind, - wait_for_property_change, x_handle_property_notify, - copy_multiple_data, x_get_foreign_selection, - lisp_data_to_selection_data, clean_local_selection_data, - x_handle_selection_notify, Fx_get_selection_internal, - x_disown_buffer_selections): Likewise. - * xterm.c (x_window_to_scroll_bar, XTread_socket, x_list_fonts, - x_load_font, x_find_ccl_program, x_term_init, x_delete_display): + * w32term.c (x_window_to_scroll_bar, w32_read_socket) + (w32_term_init, x_delete_display): Likewise. + * xfns.c (x_window_to_frame, x_any_window_to_frame) + (x_non_menubar_window_to_frame, x_menubar_window_to_frame) + (x_top_window_to_frame, x_set_frame_parameters) + (x_report_frame_params, x_set_cursor_type, x_icon_type) + (x_figure_window_size, Fx_create_frame, x_display_info_for_name) + (Fx_display_list, x_create_tip_frame): Likewise. + * xmenu.c (menubar_id_to_frame, single_keymap_panes) + (Fx_popup_menu, Fx_popup_dialog): Likewise. + * xselect.c (x_own_selection, x_get_local_selection) + (x_handle_selection_request, x_handle_selection_clear) + (x_clear_frame_selections, wait_for_property_change_unwind) + (wait_for_property_change, x_handle_property_notify) + (copy_multiple_data, x_get_foreign_selection) + (lisp_data_to_selection_data, clean_local_selection_data) + (x_handle_selection_notify, Fx_get_selection_internal) + (x_disown_buffer_selections): Likewise. + * xterm.c (x_window_to_scroll_bar, XTread_socket, x_list_fonts) + (x_load_font, x_find_ccl_program, x_term_init, x_delete_display): Likewise. * alloc.c (make_float, make_pure_float, Fpurecopy): Use XFLOAT_DATA. * bytecode.c (Fbyte_code): Likewise. - * floatfns.c (extract_float, Fexpt, Fabs, rounding_driver, - fmod_float): Likewise. + * floatfns.c (extract_float, Fexpt, Fabs, rounding_driver) + (fmod_float): Likewise. 1999-09-11 Richard Stallman <rms@gnu.org> @@ -2599,8 +2598,8 @@ * charset.h (GET_TRANSLATION_TABLE): Use XCDR. * frame.h (FOR_EACH_FRAME): Use XCAR and XCDR. (PIXEL_X_FROM_CANON_X, PIXEL_Y_FROM_CANON_Y): Use XFLOAT_DATA. - * keyboard.h (EVENT_HEAD, EVENT_START, EVENT_END, POSN_WINDOW, - POSN_BUFFER_POSN, POSN_WINDOW_POSN, POSN_TIMESTAMP): Use XCAR and + * keyboard.h (EVENT_HEAD, EVENT_START, EVENT_END, POSN_WINDOW) + (POSN_BUFFER_POSN, POSN_WINDOW_POSN, POSN_TIMESTAMP): Use XCAR and XCDR. * syntax.h (SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH): Use XCAR and XCDR. @@ -2616,8 +2615,8 @@ * print.c: Support print-circle and related features. (Vprint_gensym_alist): Removed. - (Vprint_circle, Vprint_continuous_numbering, print_number_index - Vprint_number_table): New variables. + (Vprint_circle, Vprint_continuous_numbering, print_number_index) + (Vprint_number_table): New variables. (PRINT_NUMBER_OBJECT, PRINT_NUMBER_STATUS): New macros. (PRINTPREPARE, PRINTFINISH): Don't set Vprint_gensym_alist. (print, print_preprocess, print_preprocess_string, print_object): @@ -2720,8 +2719,8 @@ * xfaces.c (realize_basic_faces): Realize new basic faces. - * dispextern.h (SCROLL_BAR_FACE_ID, BORDER_FACE_ID, - CURSOR_FACE_ID, MOUSE_FACE_ID): New. + * dispextern.h (SCROLL_BAR_FACE_ID, BORDER_FACE_ID) + (CURSOR_FACE_ID, MOUSE_FACE_ID): New. * xfaces.c (Qscroll_bar, Qcursor, Qborder, Qmouse): New. (syms_of_xfaces): Intialize new symbols. @@ -2857,7 +2856,7 @@ 1999-09-03 Richard Stallman <rms@gnu.org> - * callproc.c: Delete the system-independent include of stdlib.h + * callproc.c: Delete the system-independent include of stdlib.h. (leaving only the one in the WINDOWSNT conditional). 1999-09-03 Andrew Choi <choi@cs.hku.hk> @@ -2880,8 +2879,8 @@ (Fmodify_frame_parameters) [macintosh]: Call mac_set_frame_parameter in macterm.c. - * keyboard.c [macintosh]: Set KBD_BUFFER_SIZE to a smaller value - (512) because Mac compilers limit local data of a function to 32K. + * keyboard.c [macintosh]: Set KBD_BUFFER_SIZE to a smaller value (512) + because Mac compilers limit local data of a function to 32K. * make-docfiles.c: Correctly handle input files with Mac-style eol's. @@ -2926,8 +2925,8 @@ (Fset_window_point): Remove references to deleted variables. (Fset_window_start): Ditto. - * xdisp.c (Vresize_mini_config, resize_mini_frame, - resize_mini_initial_height): Removed. + * xdisp.c (Vresize_mini_config, resize_mini_frame) + (resize_mini_initial_height): Removed. (syms_of_xdisp): Remove references to these variables. (resize_mini_window): Don't save window configuration, freeze window starts instead. Enlarge window until displaying an empty @@ -3205,8 +3204,8 @@ (resize_mini_window): Save/restore window configuration differently. - * lisp.h (Vresize_mini_config, resize_mini_frame, - resize_mini_initial_height): Add extern declarations. + * lisp.h (Vresize_mini_config, resize_mini_frame) + (resize_mini_initial_height): Add extern declarations. * xterm.c (expose_window_tree): Fix typo CANON_Y_UNIT to CANON_X_UNIT. @@ -3244,7 +3243,7 @@ * xdisp.c (Vresize_mini_config): New. (resize_mini_window): Use it to save restore original window - configuration + configuration. (syms_of_xdisp): Initialize it. * buffer.h (struct buffer): Add prevent_redisplay_optimizations_p. @@ -3266,37 +3265,37 @@ prevent_redisplay_optimizations_p to 1. (Fget_buffer_create): Set prevent_redisplay_optimizations_p to 1. - * buffer.h (BUF_UNCHANGED_MODIFIED, UNCHANGED_MODIFIED, - BUF_OVERLAY_UNCHANGED_MODIFIED, OVERLAY_UNCHANGED_MODIFIED, - BUF_BEG_UNCHANGED, BEG_UNCHANGED, BUF_END_UNCHANGED, - END_UNCHANGED): New. - (struct buffer_text): Add beg_unchanged, end_unchanged, + * buffer.h (BUF_UNCHANGED_MODIFIED, UNCHANGED_MODIFIED) + (BUF_OVERLAY_UNCHANGED_MODIFIED, OVERLAY_UNCHANGED_MODIFIED) + (BUF_BEG_UNCHANGED, BEG_UNCHANGED, BUF_END_UNCHANGED) + (END_UNCHANGED): New. + (struct buffer_text): Add beg_unchanged, end_unchanged, unchanged_modified, overlay_unchanged_modified. - * window.h (beg_unchanged, end_unchanged, unchanged_modified, - overlay_unchanged_modified): Removed. + * window.h (beg_unchanged, end_unchanged, unchanged_modified) + (overlay_unchanged_modified): Removed. (with_echo_area_unwind_data): Don't save beg/end_unchanged. (unwind_with_echo_area_buffer): Don't restore them. (debug_beg_unchanged, debug_end_unchanged) [GLYPH_DEBUG]: Removed. - (text_outside_line_unchanged_p, redisplay_internal, - try_scrolling): Use/set buffer-specific beg/end_unchanged. + (text_outside_line_unchanged_p, redisplay_internal) + (try_scrolling): Use/set buffer-specific beg/end_unchanged. (redisplay_window): Let try_window_id be called if more than one window is displayed. Use/set buffer-specific beg/end_unchanged. - (get_last_unchanged_at_beg_row, get_first_unchanged_at_end_row, - try_window_id): + (get_last_unchanged_at_beg_row, get_first_unchanged_at_end_row) + (try_window_id): Use buffer-specific beg/end_unchanged. - * window.h (beg_unchanged, end_unchanged, unchanged_modified, - overlay_unchanged_modified): Remove extern declarations. + * window.h (beg_unchanged, end_unchanged, unchanged_modified) + (overlay_unchanged_modified): Remove extern declarations. - * keyboard.c (command_loop_1): Set beg/end_unchanged per buffer. + * keyboard.c (command_loop_1): Set beg/end_unchanged per buffer. * insdel.c (gap_left): Compute beg/end_unchanged per buffer. (gap_right): Ditto. (adjust_after_replace): Likewise. (replace_range, del_range_2, modify_region): Likewise. - * dispnew.c (direct_output_for_insert): Set beg_unchanged + * dispnew.c (direct_output_for_insert): Set beg_unchanged and unchanged_modified per buffer. * coding.c (code_convert_region): Compute beg/end_unchanged per @@ -3312,7 +3311,7 @@ * lisp.h: Add prototype for copy_hash_table and Fcopy_hash_table. * fns.c (Qkey, Qvalue): Renamed from Qkey_weak, and Qvalue_weak. - (Qkey_value_weak): Removed. + (Qkey_value_weak): Removed. (make_hash_table): Use nil, `key', `value', t for weakness. (Fmake_hash_table): Ditto. (copy_hash_table): New. @@ -3398,25 +3397,22 @@ cursor_in_echo_area case only for a mini-window showing a message. Don't let cursor end up after the end of a row. - * xdisp.c (echo_area_glyphs, echo_area_message, - echo_area_glyphs_length, previous_echo_glyphs, - previous_echo_area_message, previous_echo_area_glyphs_length): + * xdisp.c (echo_area_glyphs, echo_area_message) + (echo_area_glyphs_length, previous_echo_glyphs) + (previous_echo_area_message, previous_echo_area_glyphs_length): Removed. - (Vmessage_stack, echo_area_buffer, echo_buffer, - display_last_displayed_message_p, Vwith_echo_area_save_vector): New. + (Vmessage_stack, echo_area_buffer, echo_buffer) + (display_last_displayed_message_p, Vwith_echo_area_save_vector): New. (message2_nolog): Use set_message and clear_message. - (message3): Rename parameter len to nbytes to make clear what - it is. + (message3): Rename parameter len to nbytes to make clear what it is. (message3_nolog): Ditto. Use set_message and clear_message. (update_echo_area): Rewritten. (with_echo_area_buffer): New. (with_echo_area_buffer_unwind_data, unwind_with_area_buffer): New. (setup_echo_area_for_printing): New. (display_echo_area, display_echo_area_1): New. - (current_message, current_message_1): New. - (push_message, restore_message, pop_message, - check_message_stack): New. + (push_message, restore_message, pop_message, check_message_stack): New. (truncate_echo_area): Rewritten. (truncate_message_1): New. (set_message, set_message_1, clear_message): New. @@ -3439,8 +3435,8 @@ don't try to set cursor on rows that aren't enabled. * print.c: Remove conditional compilation on `standalone'. - (glyph_len, str_to_glyph_cpy, str_to_glyph_ncpy, - glyph_to_str_cpy): Remove that section because GLYPHs are no + (glyph_len, str_to_glyph_cpy, str_to_glyph_ncpy) + (glyph_to_str_cpy): Remove that section because GLYPHs are no longer used in that way. (PRINTDECLARE): Add multibyte. (PRINTPREPARE, PRINTFINISH): Handle printcharfun t differently. @@ -3457,7 +3453,7 @@ (command_loop_1): Check for echo area messages differently. (read_char): Likewise. (record_menu_key): Use clear_message. - (Fexecute_extended_command): Check for echo area messages + (Fexecute_extended_command): Check for echo area messages differently. Use push_message, restore_message, pop_message. * alloc.c (Fgarbage_collect): Use push_message, restore_message, @@ -3621,7 +3617,7 @@ is fixed-size. (window_min_size_1): New. (window_min_size): Handle fixed-size windows. - (size_window): New. Rewritten combination of set_window_height and + (size_window): New. Rewritten combination of set_window_height and set_window_width that handles fixed-size windows. (set_window_height): Call it. (set_window_width): Call it. @@ -3739,8 +3735,8 @@ 1999-08-06 Geoff Voelker <voelker@cs.washington.edu> - * dired.c (directory_files_internal, Fdirectory_files_and_attributes, - Ffile_attributes_lessp): New functions. + * dired.c (directory_files_internal, Fdirectory_files_and_attributes) + (Ffile_attributes_lessp): New functions. (Fdirectory_files): Use directory_files_internal. (syms_of_dired): Initialize Fdirectory_files_and_attributes, Ffile_attributes_lessp. @@ -3762,7 +3758,7 @@ * xdisp.c (reseat_at_next_visible_line_start): New parameter on_newline_p. - (set_iterator_to_next): After delivering last char + (set_iterator_to_next): After delivering last char from display vector, reseat on next visible line start if dpvec_char_len < 0. (next_element_from_buffer): Set dpvec_char_len to -1 for @@ -4337,7 +4333,7 @@ * term.c (TS_cursor_visible): Renamed from TS_visual_mode. (TS_cursor_normal): Renamed from TS_end_visual_mode. - (TS_cursor_invisible): New. + (TS_cursor_invisible): New. (term_init): Initialize TS_cursor_invisible. (tty_hide_cursor): New. (tty_show_cursor): New. @@ -4648,7 +4644,7 @@ (syms_of_buffer): Add default-scroll-*-aggressively. * buffer.h (scroll_up_aggressively): New. - (scroll_down_aggressively): New. + (scroll_down_aggressively): New. * Makefile.in (LIBPNG): Add -lz -lm in case we're linking with a static PNG library. @@ -4733,7 +4729,7 @@ (build_scalable_font_name) [SCALABLE_FONTS]: New. (may_use_scalable_font_p) [SCALABLE_FONTS]: New. (best_matching_font) [SCALABLE_FONTS]: Handle scalable fonts. - (syms_of_xfaces): Add scalable-fonts-allowed. + (syms_of_xfaces): Add scalable-fonts-allowed. 1999-05-26 Gerd Moellmann <gerd@gnu.org> @@ -4995,7 +4991,7 @@ * xfaces.c (set_font_frame_param): New. (Finternal_set_lisp_face_attribute): Call it. -Sun Feb 14 10:54:02 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> +1999-02-14 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * xfaces.c (Finternal_set_lisp_face_attribute_from_resource): Accept specifications of color for underline. @@ -5011,21 +5007,21 @@ Sun Feb 14 10:54:02 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * dispnew.c (check_matrix_invariants): Put it in #if 0. (update_window): Put the call to check_matrix_invariants in #if 0. -Sun Feb 7 09:58:49 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> +1999-02-07 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * dispextern.h: Remove all else block of UNDERLINE_COLOR. Remove definition of UNDERLINE_COLOR. -Mon Jan 4 04:43:41 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> +1999-01-04 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * xfaces.c (free_face_colors): Free the color for underline. * xterm.c (x_draw_glyph_string_underline): Set the color for underline to the GC. -Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> +1999-01-03 Masatake Yamato <masata-y@is.aist-nara.ac.jp> - * dispextern.h (UNDERLINE_COLOR): Defined. + * dispextern.h (UNDERLINE_COLOR): Defined. (struct face): Added two new members. underline_color, underline_defaulted_p. @@ -5034,7 +5030,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> (Finternal_set_lisp_face_attribute): Likewise. * xfaces.c (load_color): Change the last argument type to enum - lface_attribute_index from int. And addec code for underling coloring. + lface_attribute_index from int. And addec code for underling coloring. (load_face_colors): Pass LFACE_*_INDEX to load_color. 1999-02-12 Gerd Moellmann <gerd@gnu.org> @@ -5211,7 +5207,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * dispextern.h (struct glyph): Add voffset. (struct it): Replace height by descent, max_height by max_descent. - * xterm.c (x_append_glyph): Set voffset + * xterm.c (x_append_glyph): Set voffset. (x_append_stretch_glyph): Ditto. (x_produce_image_glyph): Ditto. (x_produce_glyphs): Take voffset into account. @@ -5401,8 +5397,8 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> 1998-11-11 Gerd Moellmann <gerd@gnu.org> - * xterm.h (struct x_display_info): Add gray pixmap. * xterm.c - (x_term_init): Create the gray pixmap. + * xterm.h (struct x_display_info): Add gray pixmap. + * xterm.c (x_term_init): Create the gray pixmap. (x_setup_relief_color): Use it. (x_get_glyph_string_clip_rect): Draw a toolbar window over the internal border at the top of a frame. @@ -5473,7 +5469,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> (xmenu_show): Likewise. * xmenu.c (push_menu_item): Add parameters `type' and - `selected'. Store it in menu_items. + `selected'. Store it in menu_items. (MENU_ITEMS_ITEM_TYPE): New. (MENU_ITEMS_ITEM_SELECTED): New. (MENU_ITEMS_ITEM_LENGTH): Increase by two. @@ -6502,7 +6498,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * xdisp.c (get_glyph_property): Renamed from fill_iterator_from_glyph_property. - (next_element_from_buffer): Handle case that no `glyph' property + (next_element_from_buffer): Handle case that no `glyph' property was found correctly. (display_line): Extend face to end of line only if we have faces. @@ -6637,7 +6633,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> (SET_TEXT_POS_FROM_MARKER): Set a text_pos from a marker. (SET_MARKER_FROM_TEXT_POS): Set a marker from a text_pos. (TEXT_POS_EQUAL_P): Compare two text_pos structures for equality. - (struct display_pos): Renamed from glyph_pos. Use struct text_pos + (struct display_pos): Renamed from glyph_pos. Use struct text_pos for buffer and string positions. (struct glyph): Use text_pos. (struct it): Renamed from display_iterator. Use text_pos. @@ -7263,7 +7259,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * xdisp.c (set_iterator_stop_pos): Take glyph_check_pos into account. - (reseat_iterator): Set glyph_check_pos. Handle case where + (reseat_iterator): Set glyph_check_pos. Handle case where new position is < original position. (check_iterator_glyph_property): Handle glyph property in strings. (next_element_from_string): Call above function. @@ -7598,7 +7594,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> face_at_buffer_position. Parameter charset removed; always compute face for CHARSET_ASCII. (face_at_string_position): Renamed from - compute_face_at_string_pos. Parameter charset removed; always + compute_face_at_string_pos. Parameter charset removed; always compute for CHARSET_ASCII. (lookup_face_for_charset): Take frame parameter instead of face_cache. @@ -8531,7 +8527,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * dispnew.c (struct dim): Use int. - * xfaces.c (Fset_face_attribute_internal): Set face->font_name; + * xfaces.c (Fset_face_attribute_internal): Set face->font_name. (allocate_face): Initialize it. (load_font): Use XLoadQueryFont again instead of x_load_font. (unload_font): Use XFreeFont again. @@ -8925,7 +8921,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> (x_get_char_font_and_encoding): Return null if font could not be loaded. Reset font to null if fontset could not be loaded. (draw_glyphs): Fill background if font not found. - (draw_glyphs): Unused parameter just_foreground_p removed. New + (draw_glyphs): Unused parameter just_foreground_p removed. New parameter composite_glyph. (draw_glyphs): Use enumeration for parameter hl. (draw_glyphs): Pass a display area relative x-position to @@ -9231,7 +9227,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * dispnew.c (update_frame_line): update_line -> update_frame_line; mirrored_make_current -> make_current. - * xdisp.c: (store_frame_title_char): New function to store a + * xdisp.c (store_frame_title_char): New function to store a single character for the frame title with re-allocation of frame_title_buf. (init_xdisp): Intialize frame_title_.* variables to null. @@ -9272,7 +9268,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> 1997-11-15 Gerd Moellmann <gerd@acm.org> - * dispnew.c (clear_current_matrices): Clear matrix of menu_bar_window + * dispnew.c (clear_current_matrices): Clear matrix of menu_bar_window. (clear_desired_matrices): Ditto. (adjust_frame_glyphs_for_window_redisplay): Use FRAME_WINDOW_WIDTH for menu_bar_window. @@ -9509,20 +9505,20 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * window.h: Include blocker WINDOW_H_INCLUDED, include dispextern.h. - (struct window): phys_cursor_glyph as struct glyph. * window.c - (make_window): Initialize it. + (struct window): phys_cursor_glyph as struct glyph. + * window.c (make_window): Initialize it. (replace_window): Ditto. * dispnew.c (free_window_matrices): Remove freeing of phys_cursor_glyph. (check_matrix_invariants): Renamed from check_current_matrix_... * xterm.c: All references to phys_cursor_glyph changed. - * dispextern.h (DISPEXTERN_H_INCLUDED: New include blocker. + * dispextern.h (DISPEXTERN_H_INCLUDED): New include blocker. * xfaces.c: Comment update. * window.h (struct window): Make phys_cursor_glyph a struct glyph - pointer. Remove phys_cursor_ascent, descent, etc. + pointer. Remove phys_cursor_ascent, descent, etc. * dispnew.c (free_window_matrices): Free it. * window.c (make_window): Allocate it. (replace_window): Ditto. @@ -9835,7 +9831,7 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> * window.c (make_window): start_y removed. (replace_window): Ditto. - * xdisp.c (last_max_ascent, last_max_descent): Ascent and + * xdisp.c (last_max_ascent, last_max_descent): Ascent and descent values of the last line processed by skip_to. (redisplay_window): Use them. (skip_to): Set them. @@ -9851,16 +9847,16 @@ Sun Jan 3 08:41:10 1999 Masatake Yamato <masata-y@is.aist-nara.ac.jp> (reseat_cursor): Ditto. (next_display_element): Ditto. -Sun Aug 24 08:50:52 1997 Gerd Moellmann <gerd@acm.org> +1997-08-24 Gerd Moellmann <gerd@acm.org> * termhooks.h: Some hooks with prototypes. * term.c: Some hooks with function prototypes. - * xdisp.c (reseat_cursor): Additional argument force_p. Avoid + * xdisp.c (reseat_cursor): Additional argument force_p. Avoid computing face if possible. - * xdisp.c (next_display_element): Use face from glyph from display + * xdisp.c (next_display_element): Use face from glyph from display table only if != 0. * emacs.c: FreeBSD headers for profiling removed. @@ -9917,7 +9913,7 @@ Sun Aug 24 08:50:52 1997 Gerd Moellmann <gerd@acm.org> * emacs.c (main): Remove own profiling code because 0.95 now has it in. -Fri Aug 22 18:46:43 1997 Gerd Moellmann <gerd@acm.org> +1997-08-22 Gerd Moellmann <gerd@acm.org> * xterm.c (XTupdate_end): Draw horizontal border at right position. (expose_window): Draw vertical border. @@ -9943,8 +9939,8 @@ Fri Aug 22 18:46:43 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (clear_glyph_matrix): Additional argument specifiying that rows should really be cleared. Used for current matrices. - * dispnew.c (scrolling_window): Bug fix. - (line_dance_hook): Formerly line_dance_fn, take only one parameter. + * dispnew.c (scrolling_window): Bug fix. + (line_dance_hook): Formerly line_dance_fn, take only one parameter. * dispextern.h (struct run): Remove current_vpos. @@ -9956,7 +9952,7 @@ Fri Aug 22 18:46:43 1997 Gerd Moellmann <gerd@acm.org> Fix truncated_on_left_p and truncated_on_right_p to be bits. (struct glyph_row): -Thu Aug 21 14:37:34 1997 Gerd Moellmann <gerd@acm.org> +1997-08-21 Gerd Moellmann <gerd@acm.org> * xdisp.c (skip_vertically_backward): Avoid negative vpos values when calling skip_to for continued lines. @@ -9971,7 +9967,7 @@ Thu Aug 21 14:37:34 1997 Gerd Moellmann <gerd@acm.org> * xterm.c (x_draw_row_borders): Use FRAME_MODE_LINE_HEIGHT height value. - (x_clip_to_row): Use MATRIX_ROW_VISIBLE_HEIGHT. Simplified. + (x_clip_to_row): Use MATRIX_ROW_VISIBLE_HEIGHT. Simplified. (do_line_dance): Simplified and pixel corrected. * dispnew.c (scrolling_window): Simplified. @@ -9981,7 +9977,7 @@ Thu Aug 21 14:37:34 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (update_window): Add FRAME_MODE_LINE_BORDER_WIDTH to mode line row->x. -Wed Aug 20 11:23:28 1997 Gerd Moellmann <gerd@acm.org> +1997-08-20 Gerd Moellmann <gerd@acm.org> * xterm.c (x_get_char_font_and_encoding): Don't let fontset override font of face. @@ -10001,7 +9997,7 @@ Wed Aug 20 11:23:28 1997 Gerd Moellmann <gerd@acm.org> (merge_faces): Don't use default font if new font has different size. -Tue Aug 19 14:38:05 1997 Gerd Moellmann <gerd@acm.org> +1997-08-19 Gerd Moellmann <gerd@acm.org> * xterm.c (x_display_and_set_cursor): Use FONT_WIDTH if width unknown. Some fonts have min_width zero. @@ -10018,39 +10014,39 @@ Tue Aug 19 14:38:05 1997 Gerd Moellmann <gerd@acm.org> (x_display_and_set_cursor): If cursor on padding glyph, use min_bounds pixel width. -Mon Aug 18 09:39:18 1997 Gerd Moellmann <gerd@acm.org> +1997-08-18 Gerd Moellmann <gerd@acm.org> - * xterm.c (x_clip_to_row): Height value was 1 too large. - (XTclear_end_of_line): Clip to display area. + * xterm.c (x_clip_to_row): Height value was 1 too large. + (XTclear_end_of_line): Clip to display area. - * xfns.c (x_figure_window_sizes): Add trunc border width + * xfns.c (x_figure_window_sizes): Add trunc border width to frame pixel width. * xdisp.c (next_display_element): Don't display overlay strings within invisible text. - (skip_vertically_backward): Skip display lines. + (skip_vertically_backward): Skip display lines. -Sat Aug 16 13:13:32 1997 Gerd Moellmann <gerd@acm.org> +1997-08-16 Gerd Moellmann <gerd@acm.org> * xdisp.c (x_consider_frame_titie): Don't pad with blanks. - * xdisp.c (next_display_element): Next invisible + * xdisp.c (next_display_element): Next invisible text check position computed differently. * dispextern.h (struct display_cursor): last_invisible_text_pos and display_ellipsis_for_invisible_p removed. - * xdisp.c (next_display_element): Set last_invisible_text_pos + * xdisp.c (next_display_element): Set last_invisible_text_pos to the last position at which invisible text was found. Don't decrement cursor.pos for newlines and cr with ellipsis. Set dpvec for `...' due to invisible text directly. - (redisplay_internal): Don't assert that cursor is at PT after + (redisplay_internal): Don't assert that cursor is at PT after skip_to. It may be in invisible text. * keyboard.c (make_lispy_event): For mouse clicks, use x_y_to_hpos_vpos. - * xdisp.c (next_display_element): Call get_overlays_for_cursor when + * xdisp.c (next_display_element): Call get_overlays_for_cursor when next_overlay_pos is reached. Use limit cursor.pos + 100 when checking for invisible text. @@ -10058,7 +10054,7 @@ Sat Aug 16 13:13:32 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Moved to dispnew.c - * xfns.c (x_contour_region): Use pixel coordinates from window + * xfns.c (x_contour_region): Use pixel coordinates from window cursor instead of WINDOW_TO_FRAME_H/VPOS. * dispextern.h (FRAME_TO_WINDOW_HPOS, FRAME_TO_WINDOW_VPOS): @@ -10066,11 +10062,11 @@ Sat Aug 16 13:13:32 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (frame_to_window_hpos, frame_to_window_vpos): Removed. - * xterm.c (x_y_to_hpos_vpos): Get hpos/vpos from window relative + * xterm.c (x_y_to_hpos_vpos): Get hpos/vpos from window relative pixel coordinates. (note_mouse_highlight): Use it. - * xdisp.c (echo_area_display): Ignore calls for terminal frames + * xdisp.c (echo_area_display): Ignore calls for terminal frames under a window system. * dispnew.c (adjust_frame_glyphs): Call redraw_frame if @@ -10078,7 +10074,7 @@ Sat Aug 16 13:13:32 1997 Gerd Moellmann <gerd@acm.org> (update_window_line): Add width of face padding glyph to displayed widths of rows. - * xterm.c (x_display_and_set_cursor): Set clipping after + * xterm.c (x_display_and_set_cursor): Set clipping after erasing cursor. * window.c (Fset_window_configuration): Free only those @@ -10101,25 +10097,25 @@ Sat Aug 16 13:13:32 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct display_cursor): New member string_length. * xdisp.c (next_display_element): Return padding spaces. - (init_string_cursor): Take precision and field_width + (init_string_cursor): Take precision and field_width. (display_string): Use string cursor, skip over invisible text. -Thu Aug 14 10:41:41 1997 Gerd Moellmann <gerd@acm.org> +1997-08-14 Gerd Moellmann <gerd@acm.org> * xterm.c (x_clip_to_row): Clip to partially visible lines. (x_display_and_set_cursor): Call it. - (draw_glyphs): Call it + (draw_glyphs): Call it. (draw_bitmap): Call it. * dispnew.c (adjust_frame_glyphs): Optimize frame garbaging. (allocate_leaf_matrix): Return flags. (row_equal_p): Compare enabled_p. - * xterm.c (x_erase_phys_cursor): Set phys_cursor_on_p to 0 + * xterm.c (x_erase_phys_cursor): Set phys_cursor_on_p to 0 for type == -1. * xterm.c (x_display_and_set_cursor): Bar cursor 1 pixel taller. - (draw_glyphs): Clip height one pixel taller. + (draw_glyphs): Clip height one pixel taller. * dispnew.c (direct_output_for_insert): Give up for hscrolled mini window. @@ -10129,7 +10125,7 @@ Thu Aug 14 10:41:41 1997 Gerd Moellmann <gerd@acm.org> * xdisp.c (echo_area_display): Call update_single_window if possible. - * dispnew.c (update_window_line): Call scrolling_window. + * dispnew.c (update_window_line): Call scrolling_window. (scrolling_window): Work on enabled desired lines only. (update_single_window): Update a single window like update_frame does for all windows. @@ -10159,7 +10155,7 @@ Thu Aug 14 10:41:41 1997 Gerd Moellmann <gerd@acm.org> * xterm.h (FRAME_X_TRUNC_WIDTH). - * frame.h (FRAME_TRUNC_WIDTH): Width of area at the left margin + * frame.h (FRAME_TRUNC_WIDTH): Width of area at the left margin of a window reserved for truncation mark. * dispextern.h: Take FRAME_TRUNC_WIDTH into account. @@ -10210,23 +10206,23 @@ Thu Aug 14 10:41:41 1997 Gerd Moellmann <gerd@acm.org> update end to prevent cursor flickering. Revert changes to setting cursor.endpos. -Wed Aug 13 10:46:12 1997 Gerd Moellmann <gerd@acm.org> +1997-08-13 Gerd Moellmann <gerd@acm.org> - * dispnew.c (direct_output_for_insert): Don't set cursor.endpos + * dispnew.c (direct_output_for_insert): Don't set cursor.endpos to PT because this prevents multi-byte characters from being recognized. - * xdisp.c (skip_to, display_line): Advance cursor at end of + * xdisp.c (skip_to, display_line): Advance cursor at end of truncated line. - * xterm.c (x_draw_3d_borders): Use CapRound. Struct rect + * xterm.c (x_draw_3d_borders): Use CapRound. Struct rect replaced by XRectangle. * dispnew.c (scrolling_window): New method. * xterm.c (do_line_dance): New implementation, new method. - * xdisp.c (draw_glyphs): Draw truncation bitmaps. Clip to + * xdisp.c (draw_glyphs): Draw truncation bitmaps. Clip to visible part of line. * dispnew.c (update_window_line): Fill inverse video lines @@ -10255,12 +10251,12 @@ Wed Aug 13 10:46:12 1997 Gerd Moellmann <gerd@acm.org> (change_frame_size_1): Correct cursor.x if frame gets too small. (update_window_line): Start at row->x. - * xdisp.c (redisplay_internal): Correct cursor.x (everwhere + * xdisp.c (redisplay_internal): Correct cursor.x (everywhere in xdisp.c). * xterm.c (set_output_cursor): Use window relative X/Y. (global): Use window relative output cursor x/y. - (draw_glyphs): Remove y param. Pass window relative x/y. + (draw_glyphs): Remove y param. Pass window relative x/y. * dispnew.c (update_window): Start rows at start_y. (update_window): Don't try scrolling because it wouldn't work @@ -10269,12 +10265,12 @@ Wed Aug 13 10:46:12 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct glyph_row): Remove shift_left_by, add x. - * window.h: (struct window): New member start_y. + * window.h (struct window): New member start_y. * window.c (replace_window): Initialize start_y. (make_window): Ditto. -Tue Aug 12 14:53:04 1997 Gerd Moellmann <gerd@acm.org> +1997-08-12 Gerd Moellmann <gerd@acm.org> * xterm.c (draw_glyphs): Clip rows that would paint over the mode line. @@ -10301,7 +10297,7 @@ Tue Aug 12 14:53:04 1997 Gerd Moellmann <gerd@acm.org> with window relative pixel coordinates. Use GLYPH_TO_PIXEL_- COORDS mit new arguments. -Mon Aug 11 12:32:34 1997 Gerd Moellmann <gerd@acm.org> +1997-08-11 Gerd Moellmann <gerd@acm.org> * xdisp.c (start_display): Use SKIP_TO instead of SKIP_IN- DISPLAY_LINE. @@ -10326,11 +10322,11 @@ Mon Aug 11 12:32:34 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (direct_output_for_insert): Set updated_row. -Sat Aug 9 12:11:44 1997 Gerd Moellmann <gerd@acm.org> +1997-08-09 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct glyph): Padding flag removed. -Tue Aug 5 09:59:08 1997 Gerd Moellmann <gerd@acm.org> +1997-08-05 Gerd Moellmann <gerd@acm.org> * sysdep.c (reset_sys_modes): cursor_to with 4 params. @@ -10345,7 +10341,7 @@ Tue Aug 5 09:59:08 1997 Gerd Moellmann <gerd@acm.org> removed. Remove references to it everywhere. Reverse_p in glyph_row -> right_to_left_p. Change references to it. -Mon Aug 4 18:09:27 1997 Gerd Moellmann <gerd@acm.org> +1997-08-04 Gerd Moellmann <gerd@acm.org> * dispnew.c (direct_output_for_insert): Use INSERT_GLYPHS. @@ -10366,11 +10362,11 @@ Mon Aug 4 18:09:27 1997 Gerd Moellmann <gerd@acm.org> * keyboard.c (command_loop_1): Call DIRECT_OUTPUT_FOR_INSERT for any character. -Thu Jul 31 15:39:10 1997 Gerd Moellmann <gerd@acm.org> +1997-07-31 Gerd Moellmann <gerd@acm.org> * xdisp.c (echo_area_display): Use new DISPLAY_STRING. -Wed Jul 30 12:18:03 1997 Gerd Moellmann <gerd@acm.org> +1997-07-30 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct glyph_row): MAX_ASCENT, MAX_DESCENT. (struct glyph): ASCENT, DESCENT. @@ -10384,7 +10380,7 @@ Wed Jul 30 12:18:03 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct display_cursor): WHAT_FOUND, SOURCE_OBJECT. Renamed from CHAR_CURSOR. -Tue Jul 29 12:52:40 1997 Gerd Moellmann <gerd@acm.org> +1997-07-29 Gerd Moellmann <gerd@acm.org> * xdisp.c (display_text_line): Mostly pixel oriented. @@ -10405,7 +10401,7 @@ Tue Jul 29 12:52:40 1997 Gerd Moellmann <gerd@acm.org> * term.c (encode_terminal_code): Don't use GLYPH_CHAR, use FAST_GLYPH_CHAR instead because GLYPH_CHAR won't remove faces. -Mon Jul 28 14:23:06 1997 Gerd Moellmann <gerd@acm.org> +1997-07-28 Gerd Moellmann <gerd@acm.org> * dispnew.c (init_char_info): Correct TAB_WIDTH to a reasonable value. @@ -10418,7 +10414,7 @@ Mon Jul 28 14:23:06 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct char_info ): GLYPH_ROW for intermediate glyphs. - * dispnew.c (init_char_info): Init GLYPH_ROW to NULL. CHAR_CURSOR + * dispnew.c (init_char_info): Init GLYPH_ROW to NULL. CHAR_CURSOR moved to xdisp.c. * xdisp.c (display_text_line): Use CHAR_CURSOR. @@ -10430,7 +10426,7 @@ Mon Jul 28 14:23:06 1997 Gerd Moellmann <gerd@acm.org> * term.c (get_char_info): Intermediate glyph generation. (append_intermediate_glyph): Ditto. -Sun Jul 27 18:57:24 1997 Gerd Moellmann <gerd@acm.org> +1997-07-27 Gerd Moellmann <gerd@acm.org> * dispnew.c (compute_char_cursor_face): Compute the face for a CHAR_CURSOR. @@ -10440,7 +10436,7 @@ Sun Jul 27 18:57:24 1997 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct char_cursor): Cursor for iterating over display text of CURRENT_BUFFER. -Sat Jul 26 13:33:03 1997 Gerd Moellmann <gerd@acm.org> +1997-07-26 Gerd Moellmann <gerd@acm.org> * term.c (get_char_info): Set MAX_PIXEL_WIDTH in CHAR_INFO. @@ -10460,7 +10456,7 @@ Sat Jul 26 13:33:03 1997 Gerd Moellmann <gerd@acm.org> encode character. (XTget_char_info): Get display information about a character. -Wed Jul 23 16:50:18 1997 Gerd Moellmann <gerd@acm.org> +1997-07-23 Gerd Moellmann <gerd@acm.org> * dispextern.h (WINDOW_DISPLAY_MODE_LINE_HEIGHT): Height is zero if window is mini-window. @@ -10499,7 +10495,7 @@ Wed Jul 23 16:50:18 1997 Gerd Moellmann <gerd@acm.org> (WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y): Macros to get various pixel values related to windows. -Mon Jul 21 12:22:02 1997 Gerd Moellmann <gerd@acm.org> +1997-07-21 Gerd Moellmann <gerd@acm.org> * xterm.c (XTflash): Flash last line of frame. @@ -10529,7 +10525,7 @@ Mon Jul 21 12:22:02 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (scrolling_window): Scrolling for windows. -Wed Jul 16 13:37:51 1997 Gerd Moellmann <gerd@acm.org> +1997-07-16 Gerd Moellmann <gerd@acm.org> * dispnew.c (build_frame_matrix): Work on windows with update flag set. @@ -10553,7 +10549,7 @@ Wed Jul 16 13:37:51 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (build_frame_matrix_from_leaf_window): Determine border glyph once. -Tue Jul 15 13:58:33 1997 Gerd Moellmann <gerd@acm.org> +1997-07-15 Gerd Moellmann <gerd@acm.org> * window.c (mark_window_cursors_off): Mark all cursors in window tree off. @@ -10611,7 +10607,7 @@ Tue Jul 15 13:58:33 1997 Gerd Moellmann <gerd@acm.org> (direct_output_forward_char): Ditto. (update_frame_1): Ditto. -Mon Jul 14 12:30:03 1997 Gerd Moellmann <gerd@acm.org> +1997-07-14 Gerd Moellmann <gerd@acm.org> * dispnew.c (updated_window): Set by UPDATE_WINDOW to the window being updated. @@ -10671,7 +10667,7 @@ Mon Jul 14 12:30:03 1997 Gerd Moellmann <gerd@acm.org> * window.h: LAST_POINT_X and LAST_POINT_Y removed. -Sun Jul 13 14:18:24 1997 Gerd Moellmann <gerd@acm.org> +1997-07-13 Gerd Moellmann <gerd@acm.org> * xdisp.c: Bug fixes using SET_CURSOR with HPOS 0 instead of FRAME_LEFT_SCROLL_BAR_WIDTH. @@ -10685,7 +10681,7 @@ Sun Jul 13 14:18:24 1997 Gerd Moellmann <gerd@acm.org> (update_frame_1): Call CLEAR_DESIRED_MATRICES. (update_frame): Return return value from UPDATE_FRAME_1. -Sat Jul 12 12:58:48 1997 Gerd Moellmann <gerd@acm.org> +1997-07-12 Gerd Moellmann <gerd@acm.org> * xdisp.c (try_window): Set WINDOW_END_VPOS with window relative LAST_TEXT_VPOS. @@ -10722,7 +10718,7 @@ Sat Jul 12 12:58:48 1997 Gerd Moellmann <gerd@acm.org> used counters for the current glyph row. -Fri Jul 11 13:16:50 1997 Gerd Moellmann <gerd@acm.org> +1997-07-11 Gerd Moellmann <gerd@acm.org> * lisp.h: Prototype for SCAN_BUFFER. @@ -10778,7 +10774,7 @@ Fri Jul 11 13:16:50 1997 Gerd Moellmann <gerd@acm.org> * xdisp.c (message2_nolog): Don't fwrite NULL message If NONINTERACTIVE. -Mon Jul 7 14:44:38 1997 Gerd Moellmann <gerd@acm.org> +1997-07-07 Gerd Moellmann <gerd@acm.org> * dispnew.c (init_desired_glyphs): Clear both frame matrix and window matrices. @@ -10793,10 +10789,9 @@ Mon Jul 7 14:44:38 1997 Gerd Moellmann <gerd@acm.org> (display_text_line): Use window matrix. (try_window): Use window relative positions. -Sun Jul 6 17:02:26 1997 Gerd Moellmann <gerd@acm.org> +1997-07-06 Gerd Moellmann <gerd@acm.org> - * dispnew.c (adjust_frame_glyphs): Allocate window matrices from - (0, 0). + * dispnew.c (adjust_frame_glyphs): Allocate window matrices from (0, 0). (allocate_leaf_matrix): Add FRAME_MENU_BAR_LINES to the height of top-most windows. @@ -10824,7 +10819,7 @@ Sun Jul 6 17:02:26 1997 Gerd Moellmann <gerd@acm.org> matrices. (clear_glyph_row): Only reset used counters and flags. -Sat Jul 5 14:55:44 1997 Gerd Moellmann <gerd@acm.org> +1997-07-05 Gerd Moellmann <gerd@acm.org> * dispnew.c (scroll_frame_lines): Don't assume first scolled line is non-empty. @@ -10866,7 +10861,7 @@ Sat Jul 5 14:55:44 1997 Gerd Moellmann <gerd@acm.org> (mirror_make_current): Make window desired matrix row current when frame matrix row was made current. -Fri Jul 4 13:27:46 1997 Gerd Moellmann <gerd@acm.org> +1997-07-04 Gerd Moellmann <gerd@acm.org> * dispnew.c (check_matrix_pointer_lossage): Check against pointer lossage in matrices. @@ -10883,7 +10878,7 @@ Fri Jul 4 13:27:46 1997 Gerd Moellmann <gerd@acm.org> (rotate_pointers): Removed. (scroll_frame_lines): Simplified. -Thu Jul 3 13:54:21 1997 Gerd Moellmann <gerd@acm.org> +1997-07-03 Gerd Moellmann <gerd@acm.org> * dispextern.h (MATRIX_ROW_SWAP_CONTENTS): Removed. @@ -10895,7 +10890,7 @@ Thu Jul 3 13:54:21 1997 Gerd Moellmann <gerd@acm.org> for window matrices. (update_line): Call make_matrix_row_current. -Wed Jul 2 13:43:35 1997 Gerd Moellmann <gerd@acm.org> +1997-07-02 Gerd Moellmann <gerd@acm.org> * dispextern.h (SET_MATRIX_ROW_ENABLED_P): Better macro name. (SET_MATRIX_ROW_INVERSE_P): Better name and HIGHLIGHT_P -> @@ -10920,7 +10915,7 @@ Wed Jul 2 13:43:35 1997 Gerd Moellmann <gerd@acm.org> (fill_up_glyph_row_areas_with_spaces): Fill up areas with spaces. -Tue Jul 1 13:49:55 1997 Gerd Moellmann <gerd@acm.org> +1997-07-01 Gerd Moellmann <gerd@acm.org> * xterm.c (dumprectangle): Use vectors in glyph rows. @@ -10954,10 +10949,10 @@ Tue Jul 1 13:49:55 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (line_hash_code): Simplified. -Mon Jun 30 20:39:38 1997 Gerd Moellmann <gerd@acm.org> +1997-06-30 Gerd Moellmann <gerd@acm.org> * dispnew.c: Prototype for ROTATE_VECTOR, ROTATE_POINTERS, - CHANGE_FRAME_SIZE_1 + CHANGE_FRAME_SIZE_1. (preserve_other_columns): Void return. (cancel_my_columns): Void return type. (scrolling): Int return type. @@ -10979,7 +10974,7 @@ Mon Jun 30 20:39:38 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (redraw_frame): FRAME_PTR -> struct frame. Return void. (cancel_line): Return void. - (clear_frame_records): Return void. + (clear_frame_records): Return void. * dispextern.h (struct glyph): Remove GLYPH, add bit-fields. (SET_CHAR_GLYPH): Fill a character glyph. @@ -11004,14 +10999,14 @@ Mon Jun 30 20:39:38 1997 Gerd Moellmann <gerd@acm.org> * alloc.c (mark_object): Change window mark code to stop with member CURRENT_MATRIX. -Sat Jun 28 13:54:55 1997 Gerd Moellmann <gerd@acm.org> +1997-06-28 Gerd Moellmann <gerd@acm.org> * scroll.c (do_scrolling): Change algorithm to use pointers. (do_direct_scrolling): Ditto. * dispnew.c (get_glyph_matrix_row): Use pointers stored in rows. (new_glyph_pool): Formerly new_FRAME_GLYPH_MATRIX. - (free_glyph_pool): Formerly FREE_FRAME_GLYPH_MATRIX + (free_glyph_pool): Formerly FREE_FRAME_GLYPH_MATRIX. (realloc_glyph_pool): Formerly REALLOC_FRAME_GLYPH_MATRIX. Returns 1 if pool changed. (matrix_row): Additional check for lost pointers to glyph rows. @@ -11033,7 +11028,7 @@ Sat Jun 28 13:54:55 1997 Gerd Moellmann <gerd@acm.org> (global): All macro names changed from prefix FRAME_MATRIX to MATRIX. -Fri Jun 27 14:51:15 1997 Gerd Moellmann <gerd@acm.org> +1997-06-27 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct glyph_pool): Replacement for former FRAME_GLYPH_MATRIX. @@ -11045,7 +11040,7 @@ Fri Jun 27 14:51:15 1997 Gerd Moellmann <gerd@acm.org> * frame.c (make_frame): Initialize pools. -Thu Jun 26 00:00:55 1997 Gerd Moellmann <gerd@acm.org> +1997-06-26 Gerd Moellmann <gerd@acm.org> * scroll.c (do_direct_scrolling): Don't assume that the line moving algorithm has no intermediate steps. @@ -11063,14 +11058,14 @@ Thu Jun 26 00:00:55 1997 Gerd Moellmann <gerd@acm.org> * alloc.c (mark_object): Mark windows specially. -Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> +1997-06-25 Gerd Moellmann <gerd@acm.org> * dispextern.h (struct glyph): Add member OBJECT referencing a Lisp object from which a glyph was drawn. Member TEXT_POSITION renamed POSITION. * xterm.c, xdisp.c, dispnew.c: Rename TEXT_POSITION -> POSITION. - * alloc.c: Include dispextern.h + * alloc.c: Include dispextern.h. (mark_object): Mark objects referenced from glyphs. * frame.c (make_frame): Initialize DECODE_MODE_SPEC_BUFFER. @@ -11154,11 +11149,11 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * dispnew.c (direct_output_forward_char): Old glyph functions removed, new inserted. (line_hash_code): Use new glyphs. - (line_draw_cost): Ditto - (cancel_line): Ditto + (line_draw_cost): Ditto. + (cancel_line): Ditto. (clear_frame_records): Ditto. (init_desired_glyphs): Ditto. - (get_display_line): Ditto + (get_display_line): Ditto. (scroll_frame_lines): Ditto. (preserve_other_columns): Ditto. (adjust_window_charstarts): Ditto. @@ -11302,7 +11297,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-06-22 Ken'ichi Handa <handa@gnu.org> - * fileio.c: (Finsert_file_contents): In the case of REPLACE, call + * fileio.c (Finsert_file_contents): In the case of REPLACE, call del_range_byte instead of del_range_1, set `inserted' to the number of characters actually inserted. @@ -11348,7 +11343,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-06-14 Tak Ota <ota@atc.sel.sony.com> - * w32bdf.c: (clear_cached_bitmap_slots): Remove. + * w32bdf.c (clear_cached_bitmap_slots): Remove. (get_bitmap_with_cache): Check if CreateBitmap failed. Adjust cache size dynamically so cache is never larger than the system limit of GDI resources. @@ -11366,7 +11361,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-06-11 Jason Rumney <jasonr@altavista.net> - * w32term.c (cancel_mouse_face): New function. See equiv + * w32term.c (cancel_mouse_face): New function. See equiv changes to xterm.c on 1996-10-31. (x_set_window_size): Use cancel_mouse_face. (w32_read_socket): Use cancel_mouse_face. @@ -11606,11 +11601,11 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-05-02 Jason Rumney <jasonr@altavista.net> - * w32term.c (w32_write_glyphs, w32_clear_end_of_line, - w32_clear_frame, clear_cursor, x_display_bar_cursor, - x_display_box_cursor, x_set_window_size): Use phys_cursor_on + * w32term.c (w32_write_glyphs, w32_clear_end_of_line) + (w32_clear_frame, clear_cursor, x_display_bar_cursor) + (x_display_box_cursor, x_set_window_size): Use phys_cursor_on field in frame. - (do_line_dance): Updated WRT xterm.c. Use macros where possible. + (do_line_dance): Updated WRT xterm.c. Use macros where possible. (dumprectangle): Take into account the width of a left-side scroll bar. @@ -11856,7 +11851,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * w32fns.c (w32_strict_fontnames): New variable. (Fx_create_frame): Formatting fix. (w32_load_system_font): Keep trying to load non-existant font - if w32_strict_fontnames is nil. Formatting fix. + if w32_strict_fontnames is nil. Formatting fix. (syms_of_w32fns): Add w32-strict-fontnames. * w32term.c (W32_TEXTOUT): Do not multiply nchars by charset_dim. @@ -11895,8 +11890,8 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-03-06 Kenichi Handa <handa@etl.go.jp> - * Makefile.in (callproc.o, coding.o, fileio.o, msdos.o, process.o, - term.o, xselect.o): Depend on ccl.h. + * Makefile.in (callproc.o, coding.o, fileio.o, msdos.o, process.o) + (term.o, xselect.o): Depend on ccl.h. 1999-03-05 Geoff Voelker <voelker@cs.washington.edu> @@ -12013,7 +12008,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-02-21 Eli Zaretskii <eliz@delysid.gnu.org> - * fileio.c: (lstat) [!S_ISLNK]: Use stat instead of lstat. + * fileio.c (lstat) [!S_ISLNK]: Use stat instead of lstat. 1999-02-21 Richard Stallman <rms@gnu.org> @@ -12035,7 +12030,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> data is included, to enable profiling. ($(EMACS)): Map file not needed for emacs.exe. - * emacs.c (main): [!SYSTEM_MALLOC]: Call realloc and free as well + * emacs.c (main) [!SYSTEM_MALLOC]: Call realloc and free as well as malloc before calling uninterrupt_malloc, for consistency. This also enables profiling to work on WINDOWSNT. @@ -12051,9 +12046,9 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-02-17 Richard Stallman <rms@gnu.org> - * insdel.c (adjust_markers_for_replace): When doing an insertion - (replacing a region of zero length), handle markers at the - insertion point properly. + * insdel.c (adjust_markers_for_replace): When doing an + insertion (replacing a region of zero length), handle markers + at the insertion point properly. 1999-02-17 Andrew Innes <andrewi@gnu.org> @@ -12201,7 +12196,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-01-31 Andrew Innes <andrewi@gnu.org> - * unexw32.c: (ROUND_UP_DST_AND_ZERO): New macro. + * unexw32.c (ROUND_UP_DST_AND_ZERO): New macro. (copy_executable_and_dump_data): Use it to ensure alignment slop is zeroed. @@ -12354,7 +12349,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * w32fns.c (x_to_w32_charset): Add iso8859-9. (w32_to_x_charset): Fix charset mappings. - * w32term.c: Remove codepage macros. Remove redundant BIG5 macros. + * w32term.c: Remove codepage macros. Remove redundant BIG5 macros. (dumpglyphs): Move definitions out of block containing goto. Remove redundant code for BIG5. Use w32_codepage_for_font instead of @@ -12374,11 +12369,11 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1999-01-17 Andrew Innes <andrewi@gnu.org> - * w32proc.c: (w32_executable_type): Relax the check to identify + * w32proc.c (w32_executable_type): Relax the check to identify cygwin-compiled applications, because the exact dll name varies with release. Now only require the name to start "cygwin". - * w32heap.h: (ROUND_UP): + * w32heap.h (ROUND_UP): (ROUND_DOWN): New macros. (need_to_recreate_heap): Renamed to using_dynamic_heap. (init_heap): New extern. @@ -12390,7 +12385,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> (w32_fatal_reload_error): (get_section_size): Obsolete externs removed. - * w32heap.c: (RVA_TO_PTR): Redefine to convert RVA to address in + * w32heap.c (RVA_TO_PTR): Redefine to convert RVA to address in current process. (round_to_next): Obsolete function removed. (preload_heap_section): New variable. @@ -12456,10 +12451,10 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> (unexec): Rounds off preload heap to nearest page rather than virtual allocation unit. Modified to match other changes. - * mem-limits.h: (get_lim_data): Use reserved_heap_size instead of + * mem-limits.h (get_lim_data): Use reserved_heap_size instead of data_region_size. - * makefile.nt: (TEMACS_TMP): New macro. + * makefile.nt (TEMACS_TMP): New macro. ($(TEMACS)): Output to TEMACS_TMP from link, use post-link processor to add static heap section in support of new unexec. @@ -12521,7 +12516,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> character. Don't allow to put binary data into the clipboard. Return zero in case of success, 1 or 2 otherwise. (get_clipboard_data): Only bail out if the null character is in - the last 32-byte chunk of clipboard data + the last 32-byte chunk of clipboard data. (Fw16_set_clipboard_data): Make ok and put_status be unsigned. If they save binary data, print a message in the echo area saying the text was not put into the clipboard. @@ -12568,7 +12563,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> (init_intervals, make_interval): Set a count variable. Use lisp_malloc instead of setting allocating_for_lisp. (init_float, make_float, init_cons, Fcons): Likewise. - (allocate_vectorlike, init_symbol, Fmake_symbol): Likewise + (allocate_vectorlike, init_symbol, Fmake_symbol): Likewise. (init_marker, allocate_misc, init_strings): Likewise. (make_uninit_multibyte_string): Likewise. (gc_sweep, compact_strings): Decrement the count variables. @@ -12602,7 +12597,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * w32term.c (x_iconify_frame): Wait for frame to be iconified; do not set async_iconified flag though. - * w32proc.c: (Vw32_start_process_inherit_error_mode): New variable. + * w32proc.c (Vw32_start_process_inherit_error_mode): New variable. (create_child): Use it. (syms_of_ntproc): Defvar it. Also fix docstrings for w32-start-process-share-console and w32-start-process-show-window. @@ -12951,7 +12946,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1998-11-16 Kenichi Handa <handa@etl.go.jp> - * Makefile.in (abbrev.o): Depend on charset.h + * Makefile.in (abbrev.o): Depend on charset.h. (bytecode.o): Depend on charset.h. * bytecode.c: Include charset.h. @@ -12979,8 +12974,8 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1998-11-11 Eli Zaretskii <eliz@delysid.gnu.org> * fns.c (MAX_ALLOCA): New macro. - (Fbase64_encode_region, Fbase64_encode_string, - Fbase64_decode_region, Fbase64_decode_string): Don't allocate + (Fbase64_encode_region, Fbase64_encode_string) + (Fbase64_decode_region, Fbase64_decode_string): Don't allocate more than MAX_ALLOCA bytes with alloca; otherwise use xmalloc. 1998-11-11 Ken'ichi Handa <handa@delysid.gnu.org> @@ -13418,21 +13413,21 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * makefile.nt (w32fns.c): Add x-list-font.c to dependancies. * w32faces.c: Update comments referring to obsolete structs. - (allocate_face, copy_face, face_eql, load_font, - Fpixmap_spec_p, free_frame_faces, new_computed_face, - frame_update_line_height, merge_faces, compute_base_face, - Fset_face_attribute_internal): Use fontset support based on xfaces.c. + (allocate_face, copy_face, face_eql, load_font) + (Fpixmap_spec_p, free_frame_faces, new_computed_face) + (frame_update_line_height, merge_faces, compute_base_face) + (Fset_face_attribute_internal): Use fontset support based on xfaces.c. - * w32fns.c: (Vx_pixel_size_width): New global variable. + * w32fns.c (Vx_pixel_size_width): New global variable. (unibyte_display_via_language_environment): New global variable. (x_set_font): Add support for setting fontsets. - (Fx_create_frame): Add check_w32(). Initialize fontsets. Fix + (Fx_create_frame): Add check_w32(). Initialize fontsets. Fix font names to match xlfd-tight-regexp. (w32_load_font): Rewrite based on x_load_font. (x_to_w32_charset, w32_to_x_charset): Add character sets. Use `iso8859-1' rather than `ansi'. (w32_to_x_font): Remove `-' from font name. Remove the `-' off the - end. Move charset into `charset registry' field. + end. Move charset into `charset registry' field. (enum_font_cb2): Check charsets match. Include width in font list. (w32_list_fonts): Rewrite based on x_list_fonts. Moved from w32term.c to have access to enumfont_t struct. @@ -13455,8 +13450,8 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> (syms_of_w32term): Add w32-no-unicode-output flag. * w32term.h: Remove redundant font_info struct definition. - (Vx_pixel_size_width_font_regexp, - unibyte_display_via_language_environment): Declare variables. + (Vx_pixel_size_width_font_regexp) + (unibyte_display_via_language_environment): Declare variables. (w32_list_fonts, w32_get_font_info, w32_query_font, w32_load_font): Declare functions. (w32_output): New fields font_baseline and fontset. @@ -13819,8 +13814,8 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> 1998-09-06 Lars Magne Ingebrigtsen <larsi@gnus.org> - * fns.c (Fbase64_decode_string, Fbase64_encode_string, - base64_decode_1, Fbase64_decode_region, Fbase64_encode_region): + * fns.c (Fbase64_decode_string, Fbase64_encode_string) + (base64_decode_1, Fbase64_decode_region, Fbase64_encode_region): New functions. 1998-09-06 Richard Stallman <rms@gnu.org> @@ -13852,7 +13847,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> (Fw16_set_clipboard_data): Always convert multibyte strings. Use Vnext_selection_coding_system if non-nil. (Fw16_get_clipboard_data): Always convert a string that includes - non-ASCII characters. Use Vnext_selection_coding_system if + non-ASCII characters. Use Vnext_selection_coding_system if non-nil. 1998-08-31 Andrew Innes <andrewi@harlequin.co.uk> @@ -13957,8 +13952,7 @@ Wed Jun 25 15:22:58 1997 Gerd Moellmann <gerd@acm.org> * xterm.c (fixup_locale): New function. For now, it resets LC_TIME to "C" (reverting the 1998-08-07 change), and also resets LC_MESSAGES to "C". - (x_term_init): Use it to fix up the locale after setlocale - (LC_ALL, ""). + (x_term_init): Use it to fix up the locale after setlocale (LC_ALL, ""). 1998-08-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> diff --git a/src/Makefile.in b/src/Makefile.in index 11e4d00b488..401f9a92ed8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -280,18 +280,10 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcd .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -#ifndef LIBX10_MACHINE -#define LIBX10_MACHINE -#endif - #ifndef LIBX11_MACHINE #define LIBX11_MACHINE #endif -#ifndef LIBX10_SYSTEM -#define LIBX10_SYSTEM -#endif - #ifndef LIBX11_SYSTEM #define LIBX11_SYSTEM #endif @@ -447,7 +439,7 @@ XFT_LIBS=@XFT_LIBS@ X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM $(XFT_LIBS) #else /* not HAVE_X11 */ -LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM +LIBX= $(LIBXMENU) LD_SWITCH_X_SITE #endif /* not HAVE_X11 */ #else /* not HAVE_X_WINDOWS */ #endif /* not HAVE_X_WINDOWS */ @@ -621,7 +613,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \ alloc.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o print.o lread.o \ - abbrev.o syntax.o UNEXEC bytecode.o \ + syntax.o UNEXEC bytecode.o \ process.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ @@ -630,7 +622,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ /* Object files used on some machine or other. These go in the DOC file on all machines in case they are needed there. */ -SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ +SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o \ w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \ @@ -1311,10 +1303,8 @@ composite.o: composite.c buffer.h character.h $(INTERVAL_SRC) $(config_h) OTHER_FILES and OBJECTS_MACHINE select which of these should be compiled. */ -sunfns.o: sunfns.c buffer.h window.h dispextern.h termhooks.h $(config_h) - #ifdef HAVE_CARBON -abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \ +buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \ fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \ scroll.o sysdep.o term.o terminal.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \ xterm.o xselect.o sound.o: macgui.h diff --git a/src/abbrev.c b/src/abbrev.c deleted file mode 100644 index bed7f73d1c3..00000000000 --- a/src/abbrev.c +++ /dev/null @@ -1,809 +0,0 @@ -/* Primitives for word-abbrev mode. - Copyright (C) 1985, 1986, 1993, 1996, 1998, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. - -This file is part of GNU Emacs. - -GNU Emacs is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ - - -#include <config.h> -#include <stdio.h> - -#include "lisp.h" -#include "commands.h" -#include "buffer.h" -#include "window.h" -#include "character.h" -#include "syntax.h" - -/* An abbrev table is an obarray. - Each defined abbrev is represented by a symbol in that obarray - whose print name is the abbreviation. - The symbol's value is a string which is the expansion. - If its function definition is non-nil, it is called - after the expansion is done. - The plist slot of the abbrev symbol is its usage count. */ - -/* List of all abbrev-table name symbols: - symbols whose values are abbrev tables. */ - -Lisp_Object Vabbrev_table_name_list; - -/* The table of global abbrevs. These are in effect - in any buffer in which abbrev mode is turned on. */ - -Lisp_Object Vglobal_abbrev_table; - -/* The local abbrev table used by default (in Fundamental Mode buffers) */ - -Lisp_Object Vfundamental_mode_abbrev_table; - -/* Set nonzero when an abbrev definition is changed */ - -int abbrevs_changed; - -int abbrev_all_caps; - -/* Non-nil => use this location as the start of abbrev to expand - (rather than taking the word before point as the abbrev) */ - -Lisp_Object Vabbrev_start_location; - -/* Buffer that Vabbrev_start_location applies to */ -Lisp_Object Vabbrev_start_location_buffer; - -/* The symbol representing the abbrev most recently expanded */ - -Lisp_Object Vlast_abbrev; - -/* A string for the actual text of the abbrev most recently expanded. - This has more info than Vlast_abbrev since case is significant. */ - -Lisp_Object Vlast_abbrev_text; - -/* Character address of start of last abbrev expanded */ - -EMACS_INT last_abbrev_point; - -/* Hook to run before expanding any abbrev. */ - -Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; - -Lisp_Object Qsystem_type, Qcount, Qforce; - -DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0, - doc: /* Create a new, empty abbrev table object. */) - () -{ - /* The value 59 is arbitrary chosen prime number. */ - return Fmake_vector (make_number (59), make_number (0)); -} - -DEFUN ("clear-abbrev-table", Fclear_abbrev_table, Sclear_abbrev_table, 1, 1, 0, - doc: /* Undefine all abbrevs in abbrev table TABLE, leaving it empty. */) - (table) - Lisp_Object table; -{ - int i, size; - - CHECK_VECTOR (table); - size = XVECTOR (table)->size; - abbrevs_changed = 1; - for (i = 0; i < size; i++) - XVECTOR (table)->contents[i] = make_number (0); - return Qnil; -} - -DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, - doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. -NAME must be a string, and should be lower-case. -EXPANSION should usually be a string. -To undefine an abbrev, define it with EXPANSION = nil. -If HOOK is non-nil, it should be a function of no arguments; -it is called after EXPANSION is inserted. -If EXPANSION is not a string, the abbrev is a special one, - which does not expand in the usual way but only runs HOOK. - -COUNT, if specified, gives the initial value for the abbrev's -usage-count, which is incremented each time the abbrev is used. -\(The default is zero.) - -SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation -which should not be saved in the user's abbreviation file. -Unless SYSTEM-FLAG is `force', a system abbreviation will not -overwrite a non-system abbreviation of the same name. */) - (table, name, expansion, hook, count, system_flag) - Lisp_Object table, name, expansion, hook, count, system_flag; -{ - Lisp_Object sym, oexp, ohook, tem; - CHECK_VECTOR (table); - CHECK_STRING (name); - - /* If defining a system abbrev, do not overwrite a non-system abbrev - of the same name, unless 'force is used. */ - if (!NILP (system_flag) && !EQ (system_flag, Qforce)) - { - sym = Fintern_soft (name, table); - - if (!NILP (SYMBOL_VALUE (sym)) && - NILP (Fplist_get (XSYMBOL (sym)->plist, Qsystem_type))) return Qnil; - } - - if (NILP (count)) - count = make_number (0); - else - CHECK_NUMBER (count); - - sym = Fintern (name, table); - - oexp = SYMBOL_VALUE (sym); - ohook = XSYMBOL (sym)->function; - if (!((EQ (oexp, expansion) - || (STRINGP (oexp) && STRINGP (expansion) - && (tem = Fstring_equal (oexp, expansion), !NILP (tem)))) - && - (EQ (ohook, hook) - || (tem = Fequal (ohook, hook), !NILP (tem)))) - && NILP (system_flag)) - abbrevs_changed = 1; - - Fset (sym, expansion); - Ffset (sym, hook); - - if (! NILP (system_flag)) - Fsetplist (sym, list4 (Qcount, count, Qsystem_type, system_flag)); - else - Fsetplist (sym, count); - - return name; -} - -/* Check if the characters in ABBREV have word syntax in either the - * current (if global == 0) or standard syntax table. */ -static void -abbrev_check_chars (abbrev, global) - Lisp_Object abbrev; - int global; -{ - int i, i_byte, len, nbad = 0; - int j, found, nuniq = 0; - char *badchars, *baduniq; - - CHECK_STRING (abbrev); - len = SCHARS (abbrev); - - badchars = (char *) alloca (len + 1); - - for (i = 0, i_byte = 0; i < len; ) - { - int c; - - FETCH_STRING_CHAR_ADVANCE (c, abbrev, i, i_byte); - - if (global) - { - /* Copied from SYNTAX in syntax.h, except using FOLLOW_PARENT. */ - Lisp_Object syntax_temp - = CHAR_TABLE_REF (Vstandard_syntax_table, c); - if ( (CONSP (syntax_temp) - ? (enum syntaxcode) (XINT (XCAR (syntax_temp)) & 0xff) - : Swhitespace) != Sword ) badchars[nbad++] = c; - } - else if (SYNTAX (c) != Sword) - badchars[nbad++] = c; - } - - if (nbad == 0) return; - - baduniq = (char *) alloca (nbad + 1); - - for (i = 0; i < nbad; i++) - { - found = 0; - - for (j = 0; j < nuniq; j++) - { - if (badchars[i] == baduniq[j]) - { - found = 1; - break; - } - } - - if (found) continue ; - - baduniq[nuniq++] = badchars[i]; - } - - baduniq[nuniq] = '\0'; - - error ("Some abbrev characters (%s) are not word constituents %s", - baduniq, global ? "in the standard syntax" : "in this mode" ); -} - -DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2, - "sDefine global abbrev: \nsExpansion for %s: ", - doc: /* Define ABBREV as a global abbreviation for EXPANSION. -The characters in ABBREV must all be word constituents in the standard -syntax table. */) - (abbrev, expansion) - Lisp_Object abbrev, expansion; -{ - abbrev_check_chars (abbrev, 1); - - Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev), - expansion, Qnil, make_number (0), Qnil); - return abbrev; -} - -DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, - "sDefine mode abbrev: \nsExpansion for %s: ", - doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION. -The characters in ABBREV must all be word-constituents in the current mode. */) - (abbrev, expansion) - Lisp_Object abbrev, expansion; -{ - if (NILP (current_buffer->abbrev_table)) - error ("Major mode has no abbrev table"); - - abbrev_check_chars (abbrev, 0); - - Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (abbrev), - expansion, Qnil, make_number (0), Qnil); - return abbrev; -} - -DEFUN ("abbrev-symbol", Fabbrev_symbol, Sabbrev_symbol, 1, 2, 0, - doc: /* Return the symbol representing abbrev named ABBREV. -This symbol's name is ABBREV, but it is not the canonical symbol of that name; -it is interned in an abbrev-table rather than the normal obarray. -The value is nil if that abbrev is not defined. -Optional second arg TABLE is abbrev table to look it up in. -The default is to try buffer's mode-specific abbrev table, then global table. */) - (abbrev, table) - Lisp_Object abbrev, table; -{ - Lisp_Object sym; - CHECK_STRING (abbrev); - if (!NILP (table)) - sym = Fintern_soft (abbrev, table); - else - { - sym = Qnil; - if (!NILP (current_buffer->abbrev_table)) - sym = Fintern_soft (abbrev, current_buffer->abbrev_table); - if (NILP (SYMBOL_VALUE (sym))) - sym = Qnil; - if (NILP (sym)) - sym = Fintern_soft (abbrev, Vglobal_abbrev_table); - } - if (NILP (SYMBOL_VALUE (sym))) - return Qnil; - return sym; -} - -DEFUN ("abbrev-expansion", Fabbrev_expansion, Sabbrev_expansion, 1, 2, 0, - doc: /* Return the string that ABBREV expands into in the current buffer. -Optionally specify an abbrev table as second arg; -then ABBREV is looked up in that table only. */) - (abbrev, table) - Lisp_Object abbrev, table; -{ - Lisp_Object sym; - sym = Fabbrev_symbol (abbrev, table); - if (NILP (sym)) return sym; - return Fsymbol_value (sym); -} - -/* Expand the word before point, if it is an abbrev. - Returns 1 if an expansion is done. */ - -DEFUN ("expand-abbrev", Fexpand_abbrev, Sexpand_abbrev, 0, 0, "", - doc: /* Expand the abbrev before point, if there is an abbrev there. -Effective when explicitly called even when `abbrev-mode' is nil. -Returns the abbrev symbol, if expansion took place. */) - () -{ - register char *buffer, *p; - int wordstart, wordend; - register int wordstart_byte, wordend_byte, idx, idx_byte; - int whitecnt; - int uccount = 0, lccount = 0; - register Lisp_Object sym; - Lisp_Object expansion, hook, tem; - Lisp_Object value; - int multibyte = ! NILP (current_buffer->enable_multibyte_characters); - - value = Qnil; - - Frun_hooks (1, &Qpre_abbrev_expand_hook); - - wordstart = 0; - if (!(BUFFERP (Vabbrev_start_location_buffer) - && XBUFFER (Vabbrev_start_location_buffer) == current_buffer)) - Vabbrev_start_location = Qnil; - if (!NILP (Vabbrev_start_location)) - { - tem = Vabbrev_start_location; - CHECK_NUMBER_COERCE_MARKER (tem); - wordstart = XINT (tem); - Vabbrev_start_location = Qnil; - if (wordstart < BEGV || wordstart > ZV) - wordstart = 0; - if (wordstart && wordstart != ZV) - { - wordstart_byte = CHAR_TO_BYTE (wordstart); - if (FETCH_BYTE (wordstart_byte) == '-') - del_range (wordstart, wordstart + 1); - } - } - if (!wordstart) - wordstart = scan_words (PT, -1); - - if (!wordstart) - return value; - - wordstart_byte = CHAR_TO_BYTE (wordstart); - wordend = scan_words (wordstart, 1); - if (!wordend) - return value; - - if (wordend > PT) - wordend = PT; - - wordend_byte = CHAR_TO_BYTE (wordend); - whitecnt = PT - wordend; - if (wordend <= wordstart) - return value; - - p = buffer = (char *) alloca (wordend_byte - wordstart_byte); - - for (idx = wordstart, idx_byte = wordstart_byte; idx < wordend; ) - { - register int c; - - if (multibyte) - { - FETCH_CHAR_ADVANCE (c, idx, idx_byte); - } - else - { - c = FETCH_BYTE (idx_byte); - idx++, idx_byte++; - } - - if (UPPERCASEP (c)) - c = DOWNCASE (c), uccount++; - else if (! NOCASEP (c)) - lccount++; - if (multibyte) - p += CHAR_STRING (c, p); - else - *p++ = c; - } - - if (VECTORP (current_buffer->abbrev_table)) - sym = oblookup (current_buffer->abbrev_table, buffer, - wordend - wordstart, p - buffer); - else - XSETFASTINT (sym, 0); - - if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) - sym = oblookup (Vglobal_abbrev_table, buffer, - wordend - wordstart, p - buffer); - if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) - return value; - - if (INTERACTIVE && !EQ (minibuf_window, selected_window)) - { - /* Add an undo boundary, in case we are doing this for - a self-inserting command which has avoided making one so far. */ - SET_PT (wordend); - Fundo_boundary (); - } - - Vlast_abbrev_text - = Fbuffer_substring (make_number (wordstart), make_number (wordend)); - - /* Now sym is the abbrev symbol. */ - Vlast_abbrev = sym; - value = sym; - last_abbrev_point = wordstart; - - /* Increment use count. */ - if (INTEGERP (XSYMBOL (sym)->plist)) - XSETINT (XSYMBOL (sym)->plist, - XINT (XSYMBOL (sym)->plist) + 1); - else if (INTEGERP (tem = Fget (sym, Qcount))) - Fput (sym, Qcount, make_number (XINT (tem) + 1)); - - /* If this abbrev has an expansion, delete the abbrev - and insert the expansion. */ - expansion = SYMBOL_VALUE (sym); - if (STRINGP (expansion)) - { - SET_PT (wordstart); - - insert_from_string (expansion, 0, 0, SCHARS (expansion), - SBYTES (expansion), 1); - del_range_both (PT, PT_BYTE, - wordend + (PT - wordstart), - wordend_byte + (PT_BYTE - wordstart_byte), - 1); - - SET_PT (PT + whitecnt); - - if (uccount && !lccount) - { - /* Abbrev was all caps */ - /* If expansion is multiple words, normally capitalize each word */ - /* This used to be if (!... && ... >= ...) Fcapitalize; else Fupcase - but Megatest 68000 compiler can't handle that */ - if (!abbrev_all_caps) - if (scan_words (PT, -1) > scan_words (wordstart, 1)) - { - Fupcase_initials_region (make_number (wordstart), - make_number (PT)); - goto caped; - } - /* If expansion is one word, or if user says so, upcase it all. */ - Fupcase_region (make_number (wordstart), make_number (PT)); - caped: ; - } - else if (uccount) - { - /* Abbrev included some caps. Cap first initial of expansion */ - int pos = wordstart_byte; - - /* Find the initial. */ - if (multibyte) - while (pos < PT_BYTE - && SYNTAX (FETCH_MULTIBYTE_CHAR (pos)) != Sword) - INC_POS (pos); - else - while (pos < PT_BYTE - && (SYNTAX (*BUF_BYTE_ADDRESS (current_buffer, pos)) - != Sword)) - pos++; - - /* Change just that. */ - pos = BYTE_TO_CHAR (pos); - Fupcase_initials_region (make_number (pos), make_number (pos + 1)); - } - } - - hook = XSYMBOL (sym)->function; - if (!NILP (hook)) - { - Lisp_Object expanded, prop; - - /* If the abbrev has a hook function, run it. */ - expanded = call0 (hook); - - /* In addition, if the hook function is a symbol with - a non-nil `no-self-insert' property, let the value it returned - specify whether we consider that an expansion took place. If - it returns nil, no expansion has been done. */ - - if (SYMBOLP (hook) - && NILP (expanded) - && (prop = Fget (hook, intern ("no-self-insert")), - !NILP (prop))) - value = Qnil; - } - - return value; -} - -DEFUN ("unexpand-abbrev", Funexpand_abbrev, Sunexpand_abbrev, 0, 0, "", - doc: /* Undo the expansion of the last abbrev that expanded. -This differs from ordinary undo in that other editing done since then -is not undone. */) - () -{ - int opoint = PT; - int adjust = 0; - if (last_abbrev_point < BEGV - || last_abbrev_point > ZV) - return Qnil; - SET_PT (last_abbrev_point); - if (STRINGP (Vlast_abbrev_text)) - { - /* This isn't correct if Vlast_abbrev->function was used - to do the expansion */ - Lisp_Object val; - int zv_before; - - val = SYMBOL_VALUE (Vlast_abbrev); - if (!STRINGP (val)) - error ("Value of `abbrev-symbol' must be a string"); - zv_before = ZV; - del_range_byte (PT_BYTE, PT_BYTE + SBYTES (val), 1); - /* Don't inherit properties here; just copy from old contents. */ - insert_from_string (Vlast_abbrev_text, 0, 0, - SCHARS (Vlast_abbrev_text), - SBYTES (Vlast_abbrev_text), 0); - Vlast_abbrev_text = Qnil; - /* Total number of characters deleted. */ - adjust = ZV - zv_before; - } - SET_PT (last_abbrev_point < opoint ? opoint + adjust : opoint); - return Qnil; -} - -static void -write_abbrev (sym, stream) - Lisp_Object sym, stream; -{ - Lisp_Object name, count, system_flag; - - if (INTEGERP (XSYMBOL (sym)->plist)) - { - count = XSYMBOL (sym)->plist; - system_flag = Qnil; - } - else - { - count = Fget (sym, Qcount); - system_flag = Fget (sym, Qsystem_type); - } - - if (NILP (SYMBOL_VALUE (sym)) || ! NILP (system_flag)) - return; - - insert (" (", 5); - name = SYMBOL_NAME (sym); - Fprin1 (name, stream); - insert (" ", 1); - Fprin1 (SYMBOL_VALUE (sym), stream); - insert (" ", 1); - Fprin1 (XSYMBOL (sym)->function, stream); - insert (" ", 1); - Fprin1 (count, stream); - insert (")\n", 2); -} - -static void -describe_abbrev (sym, stream) - Lisp_Object sym, stream; -{ - Lisp_Object one, count, system_flag; - - if (INTEGERP (XSYMBOL (sym)->plist)) - { - count = XSYMBOL (sym)->plist; - system_flag = Qnil; - } - else - { - count = Fget (sym, Qcount); - system_flag = Fget (sym, Qsystem_type); - } - - if (NILP (SYMBOL_VALUE (sym))) - return; - - one = make_number (1); - Fprin1 (Fsymbol_name (sym), stream); - - if (!NILP (system_flag)) - { - insert_string (" (sys)"); - Findent_to (make_number (20), one); - } - else - Findent_to (make_number (15), one); - - Fprin1 (count, stream); - Findent_to (make_number (20), one); - Fprin1 (SYMBOL_VALUE (sym), stream); - if (!NILP (XSYMBOL (sym)->function)) - { - Findent_to (make_number (45), one); - Fprin1 (XSYMBOL (sym)->function, stream); - } - Fterpri (stream); -} - -static void -record_symbol (sym, list) - Lisp_Object sym, list; -{ - XSETCDR (list, Fcons (sym, XCDR (list))); -} - -DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description, - Sinsert_abbrev_table_description, 1, 2, 0, - doc: /* Insert before point a full description of abbrev table named NAME. -NAME is a symbol whose value is an abbrev table. -If optional 2nd arg READABLE is non-nil, a human-readable description -is inserted. Otherwise the description is an expression, -a call to `define-abbrev-table', which would -define the abbrev table NAME exactly as it is currently defined. - -Abbrevs marked as "system abbrevs" are normally omitted. However, if -READABLE is non-nil, they are listed. */) - (name, readable) - Lisp_Object name, readable; -{ - Lisp_Object table; - Lisp_Object symbols; - Lisp_Object stream; - - CHECK_SYMBOL (name); - table = Fsymbol_value (name); - CHECK_VECTOR (table); - - XSETBUFFER (stream, current_buffer); - - symbols = Fcons (Qnil, Qnil); - map_obarray (table, record_symbol, symbols); - symbols = XCDR (symbols); - symbols = Fsort (symbols, Qstring_lessp); - - if (!NILP (readable)) - { - insert_string ("("); - Fprin1 (name, stream); - insert_string (")\n\n"); - while (! NILP (symbols)) - { - describe_abbrev (XCAR (symbols), stream); - symbols = XCDR (symbols); - } - - insert_string ("\n\n"); - } - else - { - insert_string ("(define-abbrev-table '"); - Fprin1 (name, stream); - insert_string (" '(\n"); - while (! NILP (symbols)) - { - write_abbrev (XCAR (symbols), stream); - symbols = XCDR (symbols); - } - insert_string (" ))\n\n"); - } - - return Qnil; -} - -DEFUN ("define-abbrev-table", Fdefine_abbrev_table, Sdefine_abbrev_table, - 2, 2, 0, - doc: /* Define TABLENAME (a symbol) as an abbrev table name. -Define abbrevs in it according to DEFINITIONS, which is a list of elements -of the form (ABBREVNAME EXPANSION HOOK USECOUNT SYSTEMFLAG). -\(If the list is shorter than that, omitted elements default to nil). */) - (tablename, definitions) - Lisp_Object tablename, definitions; -{ - Lisp_Object name, exp, hook, count; - Lisp_Object table, elt, sys; - - CHECK_SYMBOL (tablename); - table = Fboundp (tablename); - if (NILP (table) || (table = Fsymbol_value (tablename), NILP (table))) - { - table = Fmake_abbrev_table (); - Fset (tablename, table); - Vabbrev_table_name_list = Fcons (tablename, Vabbrev_table_name_list); - } - CHECK_VECTOR (table); - - for (; CONSP (definitions); definitions = XCDR (definitions)) - { - elt = XCAR (definitions); - name = Fcar (elt); elt = Fcdr (elt); - exp = Fcar (elt); elt = Fcdr (elt); - hook = Fcar (elt); elt = Fcdr (elt); - count = Fcar (elt); elt = Fcdr (elt); - sys = Fcar (elt); - Fdefine_abbrev (table, name, exp, hook, count, sys); - } - return Qnil; -} - -void -syms_of_abbrev () -{ - Qsystem_type = intern ("system-type"); - staticpro (&Qsystem_type); - - Qcount = intern ("count"); - staticpro (&Qcount); - - Qforce = intern ("force"); - staticpro (&Qforce); - - DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, - doc: /* List of symbols whose values are abbrev tables. */); - Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"), - Fcons (intern ("global-abbrev-table"), - Qnil)); - - DEFVAR_LISP ("global-abbrev-table", &Vglobal_abbrev_table, - doc: /* The abbrev table whose abbrevs affect all buffers. -Each buffer may also have a local abbrev table. -If it does, the local table overrides the global one -for any particular abbrev defined in both. */); - Vglobal_abbrev_table = Fmake_abbrev_table (); - - DEFVAR_LISP ("fundamental-mode-abbrev-table", &Vfundamental_mode_abbrev_table, - doc: /* The abbrev table of mode-specific abbrevs for Fundamental Mode. */); - Vfundamental_mode_abbrev_table = Fmake_abbrev_table (); - current_buffer->abbrev_table = Vfundamental_mode_abbrev_table; - buffer_defaults.abbrev_table = Vfundamental_mode_abbrev_table; - - DEFVAR_LISP ("last-abbrev", &Vlast_abbrev, - doc: /* The abbrev-symbol of the last abbrev expanded. See `abbrev-symbol'. */); - - DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text, - doc: /* The exact text of the last abbrev expanded. -A value of nil means the abbrev has already been unexpanded. */); - - DEFVAR_INT ("last-abbrev-location", &last_abbrev_point, - doc: /* The location of the start of the last abbrev expanded. */); - - Vlast_abbrev = Qnil; - Vlast_abbrev_text = Qnil; - last_abbrev_point = 0; - - DEFVAR_LISP ("abbrev-start-location", &Vabbrev_start_location, - doc: /* Buffer position for `expand-abbrev' to use as the start of the abbrev. -When nil, use the word before point as the abbrev. -Calling `expand-abbrev' sets this to nil. */); - Vabbrev_start_location = Qnil; - - DEFVAR_LISP ("abbrev-start-location-buffer", &Vabbrev_start_location_buffer, - doc: /* Buffer that `abbrev-start-location' has been set for. -Trying to expand an abbrev in any other buffer clears `abbrev-start-location'. */); - Vabbrev_start_location_buffer = Qnil; - - DEFVAR_BOOL ("abbrevs-changed", &abbrevs_changed, - doc: /* Set non-nil by defining or altering any word abbrevs. -This causes `save-some-buffers' to offer to save the abbrevs. */); - abbrevs_changed = 0; - - DEFVAR_BOOL ("abbrev-all-caps", &abbrev_all_caps, - doc: /* *Set non-nil means expand multi-word abbrevs all caps if abbrev was so. */); - abbrev_all_caps = 0; - - DEFVAR_LISP ("pre-abbrev-expand-hook", &Vpre_abbrev_expand_hook, - doc: /* Function or functions to be called before abbrev expansion is done. -This is the first thing that `expand-abbrev' does, and so this may change -the current abbrev table before abbrev lookup happens. */); - Vpre_abbrev_expand_hook = Qnil; - Qpre_abbrev_expand_hook = intern ("pre-abbrev-expand-hook"); - staticpro (&Qpre_abbrev_expand_hook); - - defsubr (&Smake_abbrev_table); - defsubr (&Sclear_abbrev_table); - defsubr (&Sdefine_abbrev); - defsubr (&Sdefine_global_abbrev); - defsubr (&Sdefine_mode_abbrev); - defsubr (&Sabbrev_expansion); - defsubr (&Sabbrev_symbol); - defsubr (&Sexpand_abbrev); - defsubr (&Sunexpand_abbrev); - defsubr (&Sinsert_abbrev_table_description); - defsubr (&Sdefine_abbrev_table); -} - -/* arch-tag: b721db69-f633-44a8-a361-c275acbdad7d - (do not change this comment) */ diff --git a/src/config.in b/src/config.in index c23ec13ac88..616e52049ff 100644 --- a/src/config.in +++ b/src/config.in @@ -708,9 +708,6 @@ Boston, MA 02110-1301, USA. */ expects to use version 10. */ #undef HAVE_X11 -/* Define to 1 if you have the X11R5 or newer version of Xlib. */ -#undef HAVE_X11R5 - /* Define to 1 if you have the X11R6 or newer version of Xlib. */ #undef HAVE_X11R6 @@ -1147,7 +1144,7 @@ typedef unsigned size_t; #ifdef HAVE_X11R6 #define HAVE_X_I18N -#elif defined HAVE_X11R5 && !defined X11R5_INHIBIT_I18N +#elif !defined X11R5_INHIBIT_I18N #define HAVE_X_I18N #endif diff --git a/src/dispextern.h b/src/dispextern.h index e89d0d7e390..086d2bffaf6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1820,6 +1820,9 @@ struct it_slice Lisp_Object height; }; +/* Input sources for fetching characters or data to display. + The input source is found in the `method' field. */ + enum it_method { GET_FROM_BUFFER = 0, GET_FROM_DISPLAY_VECTOR, @@ -1921,20 +1924,27 @@ struct it position in overlay strings etc. */ struct display_pos current; + /* Total number of overlay strings to process. This can be > + OVERLAY_STRING_CHUNK_SIZE. */ + int n_overlay_strings; + /* Vector of overlays to process. Overlay strings are processed OVERLAY_STRING_CHUNK_SIZE at a time. */ #define OVERLAY_STRING_CHUNK_SIZE 16 Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; - /* Total number of overlay strings to process. This can be > - OVERLAY_STRING_CHUNK_SIZE. */ - int n_overlay_strings; + /* For each overlay string, the overlay it came from. */ + Lisp_Object string_overlays[OVERLAY_STRING_CHUNK_SIZE]; /* If non-nil, a Lisp string being processed. If current.overlay_string_index >= 0, this is an overlay string from pos. */ Lisp_Object string; + /* If non-nil, we are processing a string that came + from a `display' property given by an overlay. */ + Lisp_Object from_overlay; + /* Stack of saved values. New entries are pushed when we begin to process an overlay string or a string from a `glyph' property. Entries are popped when we return to deliver display elements @@ -1970,6 +1980,7 @@ struct it /* current text and display positions. */ struct text_pos position; struct display_pos current; + Lisp_Object from_overlay; enum glyph_row_area area; enum it_method method; unsigned multibyte_p : 1; @@ -1986,13 +1997,6 @@ struct it /* Stack pointer. */ int sp; - /* Setting of buffer-local variable selective-display-ellipsis. */ - unsigned selective_display_ellipsis_p : 1; - - /* 1 means control characters are translated into the form `^C' - where the `^' can be replaced by a display table entry. */ - unsigned ctl_arrow_p : 1; - /* -1 means selective display hides everything between a \r and the next newline; > 0 means hide lines indented more than that value. */ int selective; @@ -2004,6 +2008,16 @@ struct it /* Face to use. */ int face_id; + /* Setting of buffer-local variable selective-display-ellipsis. */ + unsigned selective_display_ellipsis_p : 1; + + /* 1 means control characters are translated into the form `^C' + where the `^' can be replaced by a display table entry. */ + unsigned ctl_arrow_p : 1; + + /* 1 means lines are truncated. */ + unsigned truncate_lines_p : 1; + /* Non-zero means that the current face has a box. */ unsigned face_box_p : 1; @@ -2083,9 +2097,6 @@ struct it Lisp_Object object; struct text_pos position; - /* 1 means lines are truncated. */ - unsigned truncate_lines_p : 1; - /* Number of columns per \t. */ short tab_width; @@ -2866,6 +2877,9 @@ void free_frame_faces P_ ((struct frame *)); void recompute_basic_faces P_ ((struct frame *)); int face_at_buffer_position P_ ((struct window *, int, int, int, int *, int, int)); +int face_for_overlay_string P_ ((struct window *, int, int, + int, int *, + int, int, Lisp_Object)); int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, int, int *, enum face_id, int)); int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); diff --git a/src/dispnew.c b/src/dispnew.c index fcf54652115..973630609b6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -7112,7 +7112,7 @@ The value is nil if the selected frame is on a text-only-terminal. */); DEFVAR_LISP ("window-system-version", &Vwindow_system_version, doc: /* The version number of the window system in use. -For X windows, this is 10 or 11. */); +For X windows, this is 11. */); DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area, doc: /* Non-nil means put cursor in minibuffer, at end of any message there. */); diff --git a/src/emacs.c b/src/emacs.c index db442c219a4..c7fd234c6ef 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1569,7 +1569,6 @@ main (argc, argv syms_of_fns (); syms_of_floatfns (); - syms_of_abbrev (); syms_of_buffer (); syms_of_bytecode (); syms_of_callint (); @@ -2542,8 +2541,9 @@ The value is nil if that directory's name is not known. */); DEFVAR_LISP ("installation-directory", &Vinstallation_directory, doc: /* A directory within which to look for the `lib-src' and `etc' directories. -This is non-nil when we can't find those directories in their standard installed -locations, but we can find them near where the Emacs executable was found. */); +This is non-nil when we can't find those directories in their standard +installed locations, but we can find them near where the Emacs executable +was found. */); Vinstallation_directory = Qnil; DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale, diff --git a/src/frame.c b/src/frame.c index eecc6878c55..759e21c25c8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -523,17 +523,7 @@ make_initial_frame (void) struct terminal *terminal; Lisp_Object frame; -#ifdef MULTI_KBOARD - /* Create the initial keyboard. */ - if (!initial_kboard) - { - initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); - init_kboard (initial_kboard); - /* Leave Vwindow_system at its `t' default for now. */ - initial_kboard->next_kboard = all_kboards; - all_kboards = initial_kboard; - } -#endif + eassert (initial_kboard); /* The first call must initialize Vframe_list. */ if (! (NILP (Vframe_list) || CONSP (Vframe_list))) diff --git a/src/gtkutil.c b/src/gtkutil.c index 81ef09b7ec4..e36e192c65e 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3460,6 +3460,7 @@ xg_tool_bar_menu_proxy (toolitem, user_data) GtkImage *wimage = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (wbutton))); GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton)); GtkImageType store_type = gtk_image_get_storage_type (wimage); + if (store_type == GTK_IMAGE_STOCK) { gchar *stock_id; @@ -3489,6 +3490,25 @@ xg_tool_bar_menu_proxy (toolitem, user_data) wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf); } + else + { + fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n"); + abort (); + } + } + else if (store_type == GTK_IMAGE_ICON_NAME) + { + const gchar *icon_name; + GtkIconSize icon_size; + + gtk_image_get_icon_name (wimage, &icon_name, &icon_size); + wmenuimage = gtk_image_new_from_icon_name (icon_name, + GTK_ICON_SIZE_MENU); + } + else + { + fprintf (stderr, "internal error: store_type is %d\n", store_type); + abort (); } } if (wmenuimage) diff --git a/src/image.c b/src/image.c index 33d5e1a9b2d..91be3f4b57e 100644 --- a/src/image.c +++ b/src/image.c @@ -733,9 +733,9 @@ Lisp_Object Qxbm; /* Keywords. */ extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; -extern Lisp_Object QCdata, QCtype, Qcount; +extern Lisp_Object QCdata, QCtype; extern Lisp_Object Qcenter; -Lisp_Object QCascent, QCmargin, QCrelief; +Lisp_Object QCascent, QCmargin, QCrelief, Qcount; Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; @@ -9089,6 +9089,9 @@ non-numeric, there is no explicit limit on the size of images. */); define_image_type (&xbm_type, 1); define_image_type (&pbm_type, 1); + Qcount = intern ("count"); + staticpro (&Qcount); + QCascent = intern (":ascent"); staticpro (&QCascent); QCmargin = intern (":margin"); diff --git a/src/keyboard.c b/src/keyboard.c index 426ea34e3a4..0678fcdb4de 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4017,9 +4017,6 @@ discard_mouse_events () if (sp->kind == MOUSE_CLICK_EVENT || sp->kind == WHEEL_EVENT || sp->kind == HORIZ_WHEEL_EVENT -#ifdef WINDOWSNT - || sp->kind == W32_SCROLL_BAR_CLICK_EVENT -#endif #ifdef HAVE_GPM || sp->kind == GPM_CLICK_EVENT #endif @@ -4913,13 +4910,17 @@ char *lispy_function_keys[] = 0, /* VK_MENU 0x12 */ "pause", /* VK_PAUSE 0x13 */ "capslock", /* VK_CAPITAL 0x14 */ - - 0, 0, 0, 0, 0, 0, /* 0x15 .. 0x1A */ - + "kana", /* VK_KANA/VK_HANGUL 0x15 */ + 0, /* 0x16 */ + "junja", /* VK_JUNJA 0x17 */ + "final", /* VK_FINAL 0x18 */ + "kanji", /* VK_KANJI/VK_HANJA 0x19 */ + 0, /* 0x1A */ "escape", /* VK_ESCAPE 0x1B */ - - 0, 0, 0, 0, /* 0x1C .. 0x1F */ - + "convert", /* VK_CONVERT 0x1C */ + "non-convert", /* VK_NONCONVERT 0x1D */ + "accept", /* VK_ACCEPT 0x1E */ + "mode-change", /* VK_MODECHANGE 0x1F */ 0, /* VK_SPACE 0x20 */ "prior", /* VK_PRIOR 0x21 */ "next", /* VK_NEXT 0x22 */ @@ -4952,9 +4953,8 @@ char *lispy_function_keys[] = "lwindow", /* VK_LWIN 0x5B */ "rwindow", /* VK_RWIN 0x5C */ "apps", /* VK_APPS 0x5D */ - - 0, 0, /* 0x5E .. 0x5F */ - + 0, /* 0x5E */ + "sleep", "kp-0", /* VK_NUMPAD0 0x60 */ "kp-1", /* VK_NUMPAD1 0x61 */ "kp-2", /* VK_NUMPAD2 0x62 */ @@ -5001,7 +5001,9 @@ char *lispy_function_keys[] = "kp-numlock", /* VK_NUMLOCK 0x90 */ "scroll", /* VK_SCROLL 0x91 */ - + /* Not sure where the following block comes from. + Windows headers have NEC and Fujitsu specific keys in + this block, but nothing generic. */ "kp-space", /* VK_NUMPAD_CLEAR 0x92 */ "kp-enter", /* VK_NUMPAD_ENTER 0x93 */ "kp-prior", /* VK_NUMPAD_PRIOR 0x94 */ @@ -5021,19 +5023,47 @@ char *lispy_function_keys[] = * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. * Used only as parameters to GetAsyncKeyState and GetKeyState. * No other API or message will distinguish left and right keys this way. + * 0xA0 .. 0xA5 */ - /* 0xA0 .. 0xEF */ + 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* Multimedia keys. These are handled as WM_APPCOMMAND, which allows us + to enable them selectively, and gives access to a few more functions. + See lispy_multimedia_keys below. */ + 0, 0, 0, 0, 0, 0, 0, /* 0xA6 .. 0xAC Browser */ + 0, 0, 0, /* 0xAD .. 0xAF Volume */ + 0, 0, 0, 0, /* 0xB0 .. 0xB3 Media */ + 0, 0, 0, 0, /* 0xB4 .. 0xB7 Apps */ - /* 0xF0 .. 0xF5 */ + /* 0xB8 .. 0xC0 "OEM" keys - all seem to be punctuation. */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + /* 0xC1 - 0xDA unallocated, 0xDB-0xDF more OEM keys */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, /* 0xE0 */ + "ax", /* VK_OEM_AX 0xE1 */ + 0, /* VK_OEM_102 0xE2 */ + "ico-help", /* VK_ICO_HELP 0xE3 */ + "ico-00", /* VK_ICO_00 0xE4 */ + 0, /* VK_PROCESSKEY 0xE5 */ + "ico-clear", /* VK_ICO_CLEAR 0xE6 */ + "packet", /* VK_PACKET 0xE7 */ + 0, /* 0xE8 */ + "reset", /* VK_OEM_RESET 0xE9 */ + "jump", /* VK_OEM_JUMP 0xEA */ + "oem-pa1", /* VK_OEM_PA1 0xEB */ + "oem-pa2", /* VK_OEM_PA2 0xEC */ + "oem-pa3", /* VK_OEM_PA3 0xED */ + "wsctrl", /* VK_OEM_WSCTRL 0xEE */ + "cusel", /* VK_OEM_CUSEL 0xEF */ + "oem-attn", /* VK_OEM_ATTN 0xF0 */ + "finish", /* VK_OEM_FINISH 0xF1 */ + "copy", /* VK_OEM_COPY 0xF2 */ + "auto", /* VK_OEM_AUTO 0xF3 */ + "enlw", /* VK_OEM_ENLW 0xF4 */ + "backtab", /* VK_OEM_BACKTAB 0xF5 */ "attn", /* VK_ATTN 0xF6 */ "crsel", /* VK_CRSEL 0xF7 */ "exsel", /* VK_EXSEL 0xF8 */ @@ -5046,6 +5076,65 @@ char *lispy_function_keys[] = 0 /* 0xFF */ }; +/* Some of these duplicate the "Media keys" on newer keyboards, + but they are delivered to the application in a different way. */ +static char *lispy_multimedia_keys[] = + { + 0, + "browser-back", + "browser-forward", + "browser-refresh", + "browser-stop", + "browser-search", + "browser-favorites", + "browser-home", + "volume-mute", + "volume-down", + "volume-up", + "media-next", + "media-previous", + "media-stop", + "media-play-pause", + "mail", + "media-select", + "app-1", + "app-2", + "bass-down", + "bass-boost", + "bass-up", + "treble-down", + "treble-up", + "mic-volume-mute", + "mic-volume-down", + "mic-volume-up", + "help", + "find", + "new", + "open", + "close", + "save", + "print", + "undo", + "redo", + "copy", + "cut", + "paste", + "mail-reply", + "mail-forward", + "mail-send", + "spell-check", + "toggle-dictate-command", + "mic-toggle", + "correction-list", + "media-play", + "media-pause", + "media-record", + "media-fast-forward", + "media-rewind", + "media-channel-up", + "media-channel-down" + }; + #else /* not HAVE_NTGUI */ /* This should be dealt with in XTread_socket now, and that doesn't @@ -5563,6 +5652,21 @@ make_lispy_event (event) (sizeof (lispy_function_keys) / sizeof (lispy_function_keys[0]))); +#ifdef WINDOWSNT + case MULTIMEDIA_KEY_EVENT: + if (event->code < (sizeof (lispy_multimedia_keys) + / sizeof (lispy_multimedia_keys[0])) + && event->code > 0 && lispy_multimedia_keys[event->code]) + { + return modify_event_symbol (event->code, event->modifiers, + Qfunction_key, Qnil, + lispy_multimedia_keys, &func_key_syms, + (sizeof (lispy_multimedia_keys) + / sizeof (lispy_multimedia_keys[0]))); + } + return Qnil; +#endif + #ifdef HAVE_MOUSE /* A mouse click. Figure out where it is, decide whether it's a press, click or drag, and build the appropriate structure. */ @@ -6003,52 +6107,6 @@ make_lispy_event (event) #endif /* USE_TOOLKIT_SCROLL_BARS */ -#ifdef WINDOWSNT - case W32_SCROLL_BAR_CLICK_EVENT: - { - int button = event->code; - int is_double; - Lisp_Object position; - Lisp_Object *start_pos_ptr; - Lisp_Object start_pos; - - { - Lisp_Object window; - Lisp_Object portion_whole; - Lisp_Object part; - - window = event->frame_or_window; - portion_whole = Fcons (event->x, event->y); - part = *scroll_bar_parts[(int) event->part]; - - position - = Fcons (window, - Fcons (Qvertical_scroll_bar, - Fcons (portion_whole, - Fcons (make_number (event->timestamp), - Fcons (part, Qnil))))); - } - - /* Always treat W32 scroll bar events as clicks. */ - event->modifiers |= click_modifier; - - { - /* Get the symbol we should use for the mouse click. */ - Lisp_Object head; - - head = modify_event_symbol (button, - event->modifiers, - Qmouse_click, - Vlispy_mouse_stem, - NULL, &mouse_syms, - XVECTOR (mouse_syms)->size); - return Fcons (head, - Fcons (position, - Qnil)); - } - } -#endif /* WINDOWSNT */ - case DRAG_N_DROP_EVENT: { FRAME_PTR f; @@ -7097,7 +7155,7 @@ tty_read_avail_input (struct terminal *terminal, int nread = 0; if (!terminal->name) /* Don't read from a dead terminal. */ - return; + return 0; if (terminal->type != output_termcap) abort (); @@ -11571,9 +11629,12 @@ init_keyboard () #ifdef MULTI_KBOARD current_kboard = initial_kboard; #endif + /* Re-initialize the keyboard again. */ wipe_kboard (current_kboard); init_kboard (current_kboard); - /* Leave Vwindow_system at its `t' default for now. */ + /* A value of nil for Vwindow_system normally means a tty, but we also use + it for the initial terminal since there is no window system there. */ + current_kboard->Vwindow_system = Qnil; if (!noninteractive) { @@ -12399,6 +12460,15 @@ and the Lisp function within which the error was signaled. */); Help functions bind this to allow help on disabled menu items and tool-bar buttons. */); Venable_disabled_menus_and_buttons = Qnil; + +#ifdef MULTI_KBOARD + /* Create the initial keyboard. */ + initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); + init_kboard (initial_kboard); + /* Vwindow_system is left at t for now. */ + initial_kboard->next_kboard = all_kboards; + all_kboards = initial_kboard; +#endif } void diff --git a/src/lisp.h b/src/lisp.h index 62c629bd4a8..f4b93ff9dce 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -84,6 +84,20 @@ extern void die P_((const char *, const char *, int)) NO_RETURN; #ifdef ENABLE_CHECKING +/* The suppress_checking variable is initialized to 0 in alloc.c. Set + it to 1 using a debugger to temporarily disable aborting on + detected internal inconsistencies or error conditions. + + Testing suppress_checking after the supplied condition ensures that + the side effects produced by CHECK will be consistent, independent + of whether ENABLE_CHECKING is defined, or whether the checks are + suppressed at run time. + + In some cases, a good compiler may be able to optimize away the + CHECK macro altogether, e.g., if XSTRING (x) uses CHECK to test + STRINGP (x), but a particular use of XSTRING is invoked only after + testing that STRINGP (x) is true, making the test redundant. */ + #define CHECK(check,msg) (((check) || suppress_checking \ ? (void) 0 \ : die ((msg), __FILE__, __LINE__)), \ diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h index 8c975b81bb9..045bcf2c294 100644 --- a/src/m/ibmps2-aix.h +++ b/src/m/ibmps2-aix.h @@ -213,7 +213,6 @@ so disable it for them. */ #undef NOMULTIPLEJOBS #undef BROKEN_TIOCGETC #undef BROKEN_TIOCGWINSZ -#undef LIBX10_SYSTEM #undef LIBX11_SYSTEM #undef LIB_X11_LIB #endif diff --git a/src/m/is386.h b/src/m/is386.h index 02fe12d93e5..5041db9a6c8 100644 --- a/src/m/is386.h +++ b/src/m/is386.h @@ -21,7 +21,6 @@ Intel 386 (-machine=intel386 or -machine=is386.h) It may also be correct for Microport systems. NOTE-END */ -#define LIBX10_MACHINE -lnsl_s #define LIBX11_MACHINE -lnsl_s #define LIBS_DEBUG -lg diff --git a/src/m/sparc.h b/src/m/sparc.h index 8df81ee91aa..bf122d857cc 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -64,18 +64,6 @@ NOTE-END */ #define SEGMENT_MASK (SEGSIZ - 1) -/* Arrange to link with sun windows, if requested. */ -/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */ -/* These programs require Sun UNIX 4.2 Release 3.2 or greater */ - -#ifdef HAVE_SUN_WINDOWS -#define OTHER_FILES ${etcdir}emacstool -#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect -#define OBJECTS_MACHINE sunfns.o -#define SYMS_MACHINE syms_of_sunfns () -#define PURESIZE 130000 -#endif - #if !defined (__NetBSD__) && !defined (__linux__) && !defined (__OpenBSD__) /* This really belongs in s/sun.h. */ diff --git a/src/m/sun2.h b/src/m/sun2.h index e764ded3ce7..a872bf6f3bb 100644 --- a/src/m/sun2.h +++ b/src/m/sun2.h @@ -85,17 +85,5 @@ NOTE-END */ #define SEGMENT_MASK (SEGSIZ - 1) -/* Arrange to link with sun windows, if requested. */ -/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */ -/* These programs require Sun UNIX 4.2 Release 3.2 or greater */ - -#ifdef HAVE_SUN_WINDOWS -#define OTHER_FILES ${libsrc}emacstool -#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect -#define OBJECTS_MACHINE sunfns.o -#define SYMS_MACHINE syms_of_sunfns () -#define PURESIZE 132000 -#endif - /* arch-tag: 543c3570-74ca-4099-aa47-db7c7b691c8e (do not change this comment) */ diff --git a/src/m/sun386.h b/src/m/sun386.h index a3eedbe755e..ed98960c809 100644 --- a/src/m/sun386.h +++ b/src/m/sun386.h @@ -56,18 +56,6 @@ NOTE-END */ #define LIBS_TERMCAP -ltermcap -/* Arrange to link with sun windows, if requested. */ -/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */ -/* These programs require Sun UNIX 4.2 Release 3.2 or greater */ - -#ifdef HAVE_SUN_WINDOWS -#define OTHER_FILES ${etcdir}emacstool -#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect -#define OBJECTS_MACHINE sunfns.o -#define SYMS_MACHINE syms_of_sunfns () -#define PURESIZE 132000 -#endif - /* Roadrunner uses 'COFF' format */ #define COFF diff --git a/src/macfns.c b/src/macfns.c index 0f40127637a..2b8c24db3b3 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -4644,8 +4644,8 @@ ID is specified by either an integer or a float. */) Lisp_Object result; check_mac (); - CHECK_NUMBER_OR_FLOAT(id); - font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id); + CHECK_NUMBER_OR_FLOAT (id); + font_id = INTEGERP (id) ? XINT (id) : XFLOAT_DATA (id); BLOCK_INPUT; result = mac_atsu_font_face_attributes (font_id); UNBLOCK_INPUT; diff --git a/src/macterm.c b/src/macterm.c index 7f837d2a20d..f107f081421 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -3791,7 +3791,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 296c10c4208..7c2c344a2d4 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -56,8 +56,7 @@ FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK) # OBJ0 = $(BLD)/emacs.$(O) -OBJ1 = $(BLD)/abbrev.$(O) \ - $(BLD)/alloc.$(O) \ +OBJ1 = $(BLD)/alloc.$(O) \ $(BLD)/atimer.$(O) \ $(BLD)/buffer.$(O) \ $(BLD)/bytecode.$(O) \ diff --git a/src/puresize.h b/src/puresize.h index f5b675055b8..bf4971a0b5f 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */ #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (1170000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (1180000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 56a09f9b315..2881fa1eb75 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -292,6 +292,7 @@ Boston, MA 02110-1301, USA. */ #define HAVE_INET_SOCKETS 1 #undef HAVE_AIX_SMT_EXP +#define USE_TOOLKIT_SCROLL_BARS 1 /* Define if you have the ANSI `strerror' function. Otherwise you must have the variable `char *sys_errlist[]'. */ diff --git a/src/s/msdos.h b/src/s/msdos.h index 10246513811..297fda45baa 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -263,7 +263,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #ifdef HAVE_X_WINDOWS /* We need a little extra space, see ../../lisp/loadup.el */ #define SYSTEM_PURESIZE_EXTRA 15000 -#define HAVE_X11R5 #define LIBX11_SYSTEM -lxext -lsys #else /* We need a little extra space, see ../../lisp/loadup.el */ diff --git a/src/s/ptx.h b/src/s/ptx.h index d192bd6098a..4170e5036c9 100644 --- a/src/s/ptx.h +++ b/src/s/ptx.h @@ -29,7 +29,6 @@ Boston, MA 02110-1301, USA. */ /* Undo these defines because they are incorrect or need to be changed. */ #undef LIB_X11_LIB -#undef LIBX10_SYSTEM #undef LIBX11_SYSTEM #undef USG_SHARED_LIBRARIES diff --git a/src/s/sco4.h b/src/s/sco4.h index 4912b275aaa..d16bcbead49 100644 --- a/src/s/sco4.h +++ b/src/s/sco4.h @@ -100,11 +100,9 @@ Boston, MA 02110-1301, USA. */ #define LIBS_SYSTEM -lPW #endif -#ifdef HAVE_X11R5 /* configure can't get this right linking fails unless -lsocket is used. */ #undef HAVE_XSCREENNUMBEROFSCREEN #define HAVE_XSCREENNUMBEROFSCREEN -#endif /* We don't have -loldX, and we don't need it. */ #define LIB_XMENU_LIB diff --git a/src/s/sco5.h b/src/s/sco5.h index a5cc19656ab..1f56a998014 100644 --- a/src/s/sco5.h +++ b/src/s/sco5.h @@ -98,11 +98,9 @@ Boston, MA 02110-1301, USA. */ #define LIBS_SYSTEM -lPW #endif -#ifdef HAVE_X11R5 /* configure can't get this right linking fails unless -lsocket is used. */ #undef HAVE_XSCREENNUMBEROFSCREEN #define HAVE_XSCREENNUMBEROFSCREEN -#endif /* We don't have -loldX, and we don't need it. */ #define LIB_XMENU_LIB diff --git a/src/s/usg5-3.h b/src/s/usg5-3.h index d9b53718488..5df34f31b0e 100644 --- a/src/s/usg5-3.h +++ b/src/s/usg5-3.h @@ -181,7 +181,6 @@ Boston, MA 02110-1301, USA. */ /* X needs to talk on the network, so search the network library. */ -#define LIBX10_SYSTEM -lnsl_s #define LIBX11_SYSTEM -lpt -lnls -lnsl_s -lc_s /* The docs for system V/386 suggest v.3 has sigpause, diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index 3dc05f3e9fd..657fa9c51c6 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h @@ -180,7 +180,6 @@ Boston, MA 02110-1301, USA. */ library, as opposed to a DLL. Share libraries were used in SVR3, and are available only in order to allow SVR3 binaries to run. They should not be linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ -#undef LIBX10_SYSTEM #undef LIBX11_SYSTEM /* Tell x11term.c and keyboard.c we have the system V streams feature. */ diff --git a/src/s/windows95.h b/src/s/windows95.h deleted file mode 100644 index cf7f3f13c88..00000000000 --- a/src/s/windows95.h +++ /dev/null @@ -1,8 +0,0 @@ -/* System description file for Windows 95. */ - -#include "windowsnt.h" - -#define WINDOWS95 - -/* arch-tag: 8a37be6f-312c-4b2a-919e-58a71a0fb4b3 - (do not change this comment) */ diff --git a/src/sunfns.c b/src/sunfns.c deleted file mode 100644 index 86e64cbcdcc..00000000000 --- a/src/sunfns.c +++ /dev/null @@ -1,519 +0,0 @@ -/* Functions for Sun Windows menus and selection buffer. - Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. - -This file is probably totally obsolete. In any case, the FSF is -unwilling to support it. We agreed to include it in our distribution -only on the understanding that we would spend no time at all on it. - -If you have complaints about this file, send them to peck@sun.com. -If no one at Sun wants to maintain this, then consider it not -maintained at all. It would be a bad thing for the GNU project if -this file took our effort away from higher-priority things. - - -This file is part of GNU Emacs. - -GNU Emacs is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ - -/* Author: Jeff Peck, Sun Microsystems, Inc. <peck@sun.com> -Original ideas by David Kastan and Eric Negaard, SRI International -Major help from: Steve Greenbaum, Reasoning Systems, Inc. - <froud@kestrel.arpa> -who first discovered the Menu_Base_Kludge. - */ - -/* - * Emacs Lisp-Callable functions for sunwindows - */ -#include <config.h> - -#include <stdio.h> -#include <errno.h> -#include <signal.h> -#include <sunwindow/window_hs.h> -#include <suntool/selection.h> -#include <suntool/menu.h> -#include <suntool/walkmenu.h> -#include <suntool/frame.h> -#include <suntool/window.h> - -#include <fcntl.h> -#undef NULL /* We don't need sunview's idea of NULL */ -#include "lisp.h" -#include "window.h" -#include "buffer.h" -#include "termhooks.h" - -/* conversion to/from character & frame coordinates */ -/* From Gosling Emacs SunWindow driver by Chris Torek */ - -/* Chars to frame coords. Note that we speak in zero origin. */ -#define CtoSX(cx) ((cx) * Sun_Font_Xsize) -#define CtoSY(cy) ((cy) * Sun_Font_Ysize) - -/* Frame coords to chars */ -#define StoCX(sx) ((sx) / Sun_Font_Xsize) -#define StoCY(sy) ((sy) / Sun_Font_Ysize) - -#define CHECK_GFX(x) if((win_fd<0)&&(Fsun_window_init(),(win_fd<0)))return(x) -int win_fd = -1; -struct pixfont *Sun_Font; /* The font */ -int Sun_Font_Xsize; /* Width of font */ -int Sun_Font_Ysize; /* Height of font */ - -#define Menu_Base_Kludge /* until menu_show_using_fd gets fixed */ -#ifdef Menu_Base_Kludge -static Frame Menu_Base_Frame; -static int Menu_Base_fd; -static Lisp_Object sm_kludge_string; -#endif -struct cursor CurrentCursor; /* The current cursor */ - -static short CursorData[16]; /* Build cursor here */ -static mpr_static(CursorMpr, 16, 16, 1, CursorData); -static struct cursor NewCursor = {0, 0, PIX_SRC ^ PIX_DST, &CursorMpr}; - -#define RIGHT_ARROW_CURSOR /* if you want the right arrow */ -#ifdef RIGHT_ARROW_CURSOR -/* The default right-arrow cursor, with XOR drawing. */ -static short ArrowCursorData[16] = { - 0x0001,0x0003,0x0007,0x000F,0x001F,0x003F,0x007F,0x000F, - 0x001B,0x0019,0x0030,0x0030,0x0060,0x0060,0x00C0,0x00C0}; -static mpr_static(ArrowCursorMpr, 16, 16, 1, ArrowCursorData); -struct cursor DefaultCursor = {15, 0, PIX_SRC ^ PIX_DST, &ArrowCursorMpr}; - -#else -/* The default left-arrow cursor, with XOR drawing. */ -static short ArrowCursorData[16] = { - 0x8000,0xC000,0xE000,0xF000,0xF800,0xFC00,0xFE00,0xF000, - 0xD800,0x9800,0x0C00,0x0C00,0x0600,0x0600,0x0300,0x0300}; -static mpr_static(ArrowCursorMpr, 16, 16, 1, ArrowCursorData); -struct cursor DefaultCursor = {0, 0, PIX_SRC ^ PIX_DST, &ArrowCursorMpr}; -#endif - -/* - * Initialize window - */ -DEFUN ("sun-window-init", Fsun_window_init, Ssun_window_init, 0, 1, 0, - doc: /* One time setup for using Sun Windows with mouse. -Unless optional argument FORCE is non-nil, is a noop after its first call. -Returns a number representing the file descriptor of the open Sun Window, -or -1 if can not open it. */) - (force) - Lisp_Object force; -{ - char *cp; - static int already_initialized = 0; - - if ((! already_initialized) || (!NILP(force))) { - cp = getenv("WINDOW_GFX"); - if (cp != 0) win_fd = emacs_open (cp, O_RDWR, 0); - if (win_fd > 0) - { - Sun_Font = pf_default(); - Sun_Font_Xsize = Sun_Font->pf_defaultsize.x; - Sun_Font_Ysize = Sun_Font->pf_defaultsize.y; - Fsun_change_cursor_icon (Qnil); /* set up the default cursor */ - already_initialized = 1; -#ifdef Menu_Base_Kludge - - /* Make a frame to use for putting the menu on, and get its fd. */ - Menu_Base_Frame = window_create(0, FRAME, - WIN_X, 0, WIN_Y, 0, - WIN_ROWS, 1, WIN_COLUMNS, 1, - WIN_SHOW, FALSE, - FRAME_NO_CONFIRM, 1, - 0); - Menu_Base_fd = (int) window_get(Menu_Base_Frame, WIN_FD); -#endif - } - } - return(make_number(win_fd)); -} - -/* - * Mouse sit-for (allows a shorter interval than the regular sit-for - * and can be interrupted by the mouse) - */ -DEFUN ("sit-for-millisecs", Fsit_for_millisecs, Ssit_for_millisecs, 1, 1, 0, - doc: /* Like sit-for, but ARG is milliseconds. -Perform redisplay, then wait for ARG milliseconds or until -input is available. Returns t if wait completed with no input. -Redisplay does not happen if input is available before it starts. */) - (n) - Lisp_Object n; -{ - struct timeval Timeout; - int waitmask = 1; - - CHECK_NUMBER (n); - Timeout.tv_sec = XINT(n) / 1000; - Timeout.tv_usec = (XINT(n) - (Timeout.tv_sec * 1000)) * 1000; - - if (detect_input_pending()) return(Qnil); - redisplay_preserve_echo_area (16); - /* - * Check for queued keyboard input/mouse hits again - * (A bit screen update can take some time!) - */ - if (detect_input_pending()) return(Qnil); - select(1,&waitmask,0,0,&Timeout); - if (detect_input_pending()) return(Qnil); - return(Qt); -} - -/* - * Sun sleep-for (allows a shorter interval than the regular sleep-for) - */ -DEFUN ("sleep-for-millisecs", - Fsleep_for_millisecs, - Ssleep_for_millisecs, 1, 1, 0, - doc: /* Pause, without updating display, for ARG milliseconds. */) - (n) - Lisp_Object n; -{ - unsigned useconds; - - CHECK_NUMBER (n); - useconds = XINT(n) * 1000; - usleep(useconds); - return(Qt); -} - -DEFUN ("update-display", Fupdate_display, Supdate_display, 0, 0, 0, - doc: /* Perform redisplay. */) - () -{ - redisplay_preserve_echo_area (17); - return(Qt); -} - - -/* - * Change the Sun mouse icon - */ -DEFUN ("sun-change-cursor-icon", - Fsun_change_cursor_icon, - Ssun_change_cursor_icon, 1, 1, 0, - doc: /* Change the Sun mouse cursor icon. -ICON is a lisp vector whose 1st element -is the X offset of the cursor hot-point, whose 2nd element is the Y offset -of the cursor hot-point and whose 3rd element is the cursor pixel data -expressed as a string. If ICON is nil then the original arrow cursor is used. */) - (Icon) - Lisp_Object Icon; -{ - register unsigned char *cp; - register short *p; - register int i; - Lisp_Object X_Hot, Y_Hot, Data; - - CHECK_GFX (Qnil); - /* - * If the icon is null, we just restore the DefaultCursor - */ - if (NILP(Icon)) - CurrentCursor = DefaultCursor; - else { - /* - * extract the data from the vector - */ - CHECK_VECTOR (Icon); - if (XVECTOR(Icon)->size < 3) return(Qnil); - X_Hot = XVECTOR(Icon)->contents[0]; - Y_Hot = XVECTOR(Icon)->contents[1]; - Data = XVECTOR(Icon)->contents[2]; - - CHECK_NUMBER (X_Hot); - CHECK_NUMBER (Y_Hot); - CHECK_STRING (Data); - if (SCHARS (Data) != 32) return(Qnil); - /* - * Setup the new cursor - */ - NewCursor.cur_xhot = X_Hot; - NewCursor.cur_yhot = Y_Hot; - cp = SDATA (Data); - p = CursorData; - i = 16; - while(--i >= 0) - *p++ = (cp[0] << 8) | cp[1], cp += 2; - CurrentCursor = NewCursor; - } - win_setcursor(win_fd, &CurrentCursor); - return(Qt); -} - -/* - * Interface for sunwindows selection - */ -static Lisp_Object Current_Selection; - -static -sel_write (sel, file) - struct selection *sel; - FILE *file; -{ - fwrite (SDATA (Current_Selection), sizeof (char), - sel->sel_items, file); -} - -static -sel_clear (sel, windowfd) - struct selection *sel; - int windowfd; -{ -} - -static -sel_read (sel, file) - struct selection *sel; - FILE *file; -{ - register int i, n; - register char *cp; - - Current_Selection = empty_unibyte_string; - if (sel->sel_items <= 0) - return (0); - cp = (char *) malloc(sel->sel_items); - if (cp == (char *)0) { - error("malloc failed in sel_read"); - return(-1); - } - n = fread(cp, sizeof(char), sel->sel_items, file); - if (n > sel->sel_items) { - error("fread botch in sel_read"); - return(-1); - } else if (n < 0) { - error("Error reading selection"); - return(-1); - } - /* - * The shelltool select saves newlines as carriage returns, - * but emacs wants newlines. - */ - for (i = 0; i < n; i++) - if (cp[i] == '\r') cp[i] = '\n'; - - Current_Selection = make_string (cp, n); - free (cp); - return (0); -} - -/* - * Set the window system "selection" to be the arg STRING - */ -DEFUN ("sun-set-selection", Fsun_set_selection, Ssun_set_selection, 1, 1, - "sSet selection to: ", - doc: /* Set the current sunwindow selection to STRING. */) - (str) - Lisp_Object str; -{ - struct selection selection; - - CHECK_STRING (str); - Current_Selection = str; - - CHECK_GFX (Qnil); - selection.sel_type = SELTYPE_CHAR; - selection.sel_items = SCHARS (str); - selection.sel_itembytes = 1; - selection.sel_pubflags = 1; - selection_set(&selection, sel_write, sel_clear, win_fd); - return (Qt); -} -/* - * Stuff the current window system selection into the current buffer - */ -DEFUN ("sun-get-selection", Fsun_get_selection, Ssun_get_selection, 0, 0, 0, - doc: /* Return the current sunwindows selection as a string. */) - () -{ - CHECK_GFX (Current_Selection); - selection_get (sel_read, win_fd); - return (Current_Selection); -} - -Menu sun_menu_create(); - -Menu_item -sun_item_create (Pair) - Lisp_Object Pair; -{ - /* In here, we depend on Lisp supplying zero terminated strings in the data*/ - /* so we can just pass the pointers, and not recopy anything */ - - Menu_item menu_item; - Menu submenu; - Lisp_Object String; - Lisp_Object Value; - - CHECK_LIST_CONS (Pair, Pair); - String = Fcar(Pair); - CHECK_STRING(String); - Value = Fcdr(Pair); - if (SYMBOLP (Value)) - Value = SYMBOL_VALUE (Value); - if (VECTORP (Value)) { - submenu = sun_menu_create (Value); - menu_item = menu_create_item - (MENU_RELEASE, MENU_PULLRIGHT_ITEM, SDATA (String), submenu, 0); - } else { - menu_item = menu_create_item - (MENU_RELEASE, MENU_STRING_ITEM, SDATA (String), Value, 0); - } - return menu_item; -} - -Menu -sun_menu_create (Vector) - Lisp_Object Vector; -{ - Menu menu; - int i; - CHECK_VECTOR(Vector); - menu=menu_create(0); - for(i = 0; i < XVECTOR(Vector)->size; i++) { - menu_set (menu, MENU_APPEND_ITEM, - sun_item_create(XVECTOR(Vector)->contents[i]), 0); - } - return menu; -} - -/* - * If the first item of the menu has nil as its value, then make the - * item look like a label by inverting it and making it unselectable. - * Returns 1 if the label was made, 0 otherwise. - */ -int -make_menu_label (menu) - Menu menu; -{ - int made_label_p = 0; - - if (( menu_get(menu, MENU_NITEMS) > 0 ) && /* At least one item */ - ((Lisp_Object) menu_get(menu_get(menu, MENU_NTH_ITEM, 1), - MENU_VALUE) == Qnil )) { - menu_set(menu_get(menu, MENU_NTH_ITEM, 1), - MENU_INVERT, TRUE, - MENU_FEEDBACK, FALSE, - 0); - made_label_p = 1; - } - return made_label_p; -} - -/* - * Do a pop-up menu and return the selected value - */ -DEFUN ("sun-menu-internal", - Fsun_menu_internal, - Ssun_menu_internal, 5, 5, 0, - doc: /* Set up a SunView pop-up menu and return the user's choice. -Arguments WINDOW, X, Y, BUTTON, and MENU. -*** User code should generally use sun-menu-evaluate *** - -Arguments WINDOW, X, Y, BUTTON, and MENU. -Put MENU up in WINDOW at position X, Y. -The BUTTON argument specifies the button to be released that selects an item: - 1 = LEFT BUTTON - 2 = MIDDLE BUTTON - 4 = RIGHT BUTTON -The MENU argument is a vector containing (STRING . VALUE) pairs. -The VALUE of the selected item is returned. -If the VALUE of the first pair is nil, then the first STRING will be used -as a menu label. */) - (window, X_Position, Y_Position, Button, MEnu) - Lisp_Object window, X_Position, Y_Position, Button, MEnu; -{ - Menu menu; - int button, xpos, ypos; - Event event0; - Event *event = &event0; - Lisp_Object Value, Pair; - - CHECK_NUMBER(X_Position); - CHECK_NUMBER(Y_Position); - CHECK_LIVE_WINDOW(window); - CHECK_NUMBER(Button); - CHECK_VECTOR(MEnu); - - CHECK_GFX (Qnil); - - xpos = CtoSX (WINDOW_LEFT_EDGE_COL (XWINDOW (window)) - + WINDOW_LEFT_SCROLL_BAR_COLS (XWINDOW (window)) - + XINT(X_Position)); - ypos = CtoSY (WINDOW_TOP_EDGE_LINE (XWINDOW(window)) + XINT(Y_Position)); -#ifdef Menu_Base_Kludge - {static Lisp_Object symbol[2]; - symbol[0] = Fintern (sm_kludge_string, Qnil); - Pair = Ffuncall (1, symbol); - xpos += XINT (XCDR (Pair)); - ypos += XINT (XCAR (Pair)); - } -#endif - - button = XINT(Button); - if(button == 4) button = 3; - event_set_id (event, BUT(button)); - event_set_down (event); - event_set_x (event, xpos); - event_set_y (event, ypos); - - menu = sun_menu_create(MEnu); - make_menu_label(menu); - -#ifdef Menu_Base_Kludge - Value = (Lisp_Object) menu_show(menu, Menu_Base_Frame, event, 0); -#else -/* This confuses the notifier or something: */ - Value = (Lisp_Object) menu_show_using_fd(menu, win_fd, event, 0); -/* - * Right button gets lost, and event sequencing or delivery gets mixed up - * So, until that gets fixed, we use this <Menu_Base_Frame> kludge: - */ -#endif - menu_destroy (menu); - - return ((int)Value ? Value : Qnil); -} - - -/* - * Define everything - */ -syms_of_sunfns() -{ -#ifdef Menu_Base_Kludge - /* i'm just too lazy to re-write this into C code */ - /* so we will call this elisp function from C */ - sm_kludge_string = make_pure_string ("sm::menu-kludge", 15, 15, 0); -#endif /* Menu_Base_Kludge */ - - defsubr(&Ssun_window_init); - defsubr(&Ssit_for_millisecs); - defsubr(&Ssleep_for_millisecs); - defsubr(&Supdate_display); - defsubr(&Ssun_change_cursor_icon); - defsubr(&Ssun_set_selection); - defsubr(&Ssun_get_selection); - defsubr(&Ssun_menu_internal); -} - -/* arch-tag: 2d7decb7-58f6-41aa-b45b-077ccfab7158 - (do not change this comment) */ diff --git a/src/termhooks.h b/src/termhooks.h index 4d8fb8a861b..369bdff158d 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -132,10 +132,6 @@ enum event_kind whose scroll bar was clicked in. .timestamp gives a timestamp (in milliseconds) for the click. */ -#ifdef WINDOWSNT - W32_SCROLL_BAR_CLICK_EVENT, /* as for SCROLL_BAR_CLICK, but only generated - by MS-Windows scroll bar controls. */ -#endif SELECTION_REQUEST_EVENT, /* Another X client wants a selection from us. See `struct selection_input_event'. */ SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */ @@ -200,6 +196,21 @@ enum event_kind #ifdef HAVE_GPM , GPM_CLICK_EVENT #endif + +#ifdef WINDOWSNT + /* Generated when an APPCOMMAND event is received, in response to + Multimedia or Internet buttons on some keyboards. + Such keys are available as normal function keys on X through the + Xkeyboard extension. + On Windows, some of them get mapped to normal function key events, + but others need to be handled by APPCOMMAND. Handling them all as + APPCOMMAND events means they can be disabled + (w32-pass-multimedia-buttons-to-system), important on Windows since + the system never sees these keys if Emacs claims to handle them. + On X, the window manager seems to grab the keys it wants + first, so this is not a problem there. */ + , MULTIMEDIA_KEY_EVENT +#endif }; /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT diff --git a/src/textprop.c b/src/textprop.c index e8ba1d87afc..f7b50755ed1 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -713,7 +713,7 @@ POSITION is at the end of OBJECT, both car and cdr are nil. */) Lisp_Object overlay; Lisp_Object val = get_char_property_and_overlay (position, prop, object, &overlay); - return Fcons(val, overlay); + return Fcons (val, overlay); } diff --git a/src/unexmacosx.c b/src/unexmacosx.c index e9664f94bbc..3646aec6983 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -443,15 +443,13 @@ unexec_regions_recorder (task_t task, void *rr, unsigned type, while (num && num_unexec_regions < MAX_UNEXEC_REGIONS) { - /* Subtract the size of trailing null pages from filesize. It + /* Subtract the size of trailing null bytes from filesize. It can be smaller than vmsize in segment commands. In such a - case, trailing pages are initialized with zeros. */ - for (p = ranges->address + ranges->size; p > ranges->address; - p -= sizeof (int)) - if (*(((int *) p)-1)) - break; - filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address); - assert (filesize <= ranges->size); + case, trailing bytes are initialized with zeros. */ + for (p = ranges->address + ranges->size; p > ranges->address; p--) + if (*(((char *) p)-1)) + break; + filesize = p - ranges->address; unexec_regions[num_unexec_regions].filesize = filesize; unexec_regions[num_unexec_regions++].range = *ranges; @@ -503,11 +501,19 @@ unexec_regions_merge () { int i, n; unexec_region_info r; + vm_size_t padsize; qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]), &unexec_regions_sort_compare); n = 0; r = unexec_regions[0]; + padsize = r.range.address & (pagesize - 1); + if (padsize) + { + r.range.address -= padsize; + r.range.size += padsize; + r.filesize += padsize; + } for (i = 1; i < num_unexec_regions; i++) { if (r.range.address + r.range.size == unexec_regions[i].range.address @@ -520,6 +526,17 @@ unexec_regions_merge () { unexec_regions[n++] = r; r = unexec_regions[i]; + padsize = r.range.address & (pagesize - 1); + if (padsize) + { + if ((unexec_regions[n-1].range.address + + unexec_regions[n-1].range.size) == r.range.address) + unexec_regions[n-1].range.size -= padsize; + + r.range.address -= padsize; + r.range.size += padsize; + r.filesize += padsize; + } } } unexec_regions[n++] = r; @@ -562,6 +579,11 @@ print_load_command_name (int lc) case LC_TWOLEVEL_HINTS: printf ("LC_TWOLEVEL_HINTS"); break; +#ifdef LC_UUID + case LC_UUID: + printf ("LC_UUID "); + break; +#endif default: printf ("unknown "); } diff --git a/src/w32fns.c b/src/w32fns.c index 288b1f96665..808376bf580 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -150,6 +150,9 @@ int w32_mouse_move_interval; /* Flag to indicate if XBUTTON events should be passed on to Windows. */ int w32_pass_extra_mouse_buttons_to_system; +/* Flag to indicate if media keys should be passed on to Windows. */ +int w32_pass_multimedia_buttons_to_system; + /* Non nil if no window manager is in use. */ Lisp_Object Vx_no_window_manager; @@ -3387,6 +3390,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) signal_user_input (); return 0; + case WM_APPCOMMAND: + if (w32_pass_multimedia_buttons_to_system) + goto dflt; + /* Otherwise, pass to lisp, the same way we do with mousehwheel. */ case WM_MOUSEHWHEEL: wmsg.dwModifiers = w32_get_modifiers (); my_post_msg (&wmsg, hwnd, msg, wParam, lParam); @@ -8945,6 +8952,30 @@ If this variable is non-nil, Emacs will pass them on, allowing the system to handle them. */); w32_pass_extra_mouse_buttons_to_system = 0; + DEFVAR_BOOL ("w32-pass-multimedia-buttons-to-system", + &w32_pass_multimedia_buttons_to_system, + doc: /* If non-nil, media buttons are passed to Windows. +Some modern keyboards contain buttons for controlling media players, web +browsers and other applications. Generally these buttons are handled on a +system wide basis, but by setting this to nil they are made available +to Emacs for binding. Depending on your keyboard, additional keys that +may be available are: + +browser-back, browser-forward, browser-refresh, browser-stop, +browser-search, browser-favorites, browser-home, +mail, mail-reply, mail-forward, mail-send, +app-1, app-2, +help, find, new, open, close, save, print, undo, redo, copy, cut, paste, +spell-check, correction-list, toggle-dictate-command, +media-next, media-previous, media-stop, media-play-pause, media-select, +media-play, media-pause, media-record, media-fast-forward, media-rewind, +media-channel-up, media-channel-down, +volume-mute, volume-up, volume-down, +mic-volume-mute, mic-volume-down, mic-volume-up, mic-toggle, +bass-down, bass-boost, bass-up, treble-down, treble-up + */); + w32_pass_multimedia_buttons_to_system = 1; + DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames diff --git a/src/w32term.c b/src/w32term.c index aae84473532..93e81b7bdb4 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2769,7 +2769,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) @@ -4426,7 +4425,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event) if (! WINDOWP (bar->window)) abort (); - emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT; + emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = 0; /* not really meaningful to distinguish up/down */ emacs_event->modifiers = msg->dwModifiers; @@ -4793,6 +4792,29 @@ w32_read_socket (sd, expected, hold_quit) } break; + case WM_APPCOMMAND: + f = x_window_to_frame (dpyinfo, msg.msg.hwnd); + + if (f && !f->iconified) + { + if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) + && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) + { + clear_mouse_face (dpyinfo); + dpyinfo->mouse_face_hidden = 1; + } + + if (temp_index == sizeof temp_buffer / sizeof (short)) + temp_index = 0; + temp_buffer[temp_index++] = msg.msg.wParam; + inev.kind = MULTIMEDIA_KEY_EVENT; + inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam); + inev.modifiers = msg.dwModifiers; + XSETFRAME (inev.frame_or_window, f); + inev.timestamp = msg.msg.time; + } + break; + case WM_MOUSEMOVE: /* Ignore non-movement. */ { diff --git a/src/w32term.h b/src/w32term.h index f5aff57622e..595d7d1f147 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -625,6 +625,10 @@ extern void w32_unload_font (); #ifndef WM_MOUSEHWHEEL #define WM_MOUSEHWHEEL (WM_MOUSEWHEEL + 4) #endif /* WM_MOUSEHWHEEL */ +#ifndef WM_APPCOMMAND +#define WM_APPCOMMAND 0x319 +#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff) +#endif #define WM_EMACS_START (WM_USER + 1) #define WM_EMACS_KILL (WM_EMACS_START + 0) diff --git a/src/xdisp.c b/src/xdisp.c index a83ee8983dc..96244877a2e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -963,8 +963,8 @@ static void compute_string_pos P_ ((struct text_pos *, struct text_pos, static int face_before_or_after_it_pos P_ ((struct it *, int)); static int next_overlay_change P_ ((int)); static int handle_single_display_spec P_ ((struct it *, Lisp_Object, - Lisp_Object, struct text_pos *, - int)); + Lisp_Object, Lisp_Object, + struct text_pos *, int)); static int underlying_face_id P_ ((struct it *)); static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *, struct window *)); @@ -3077,16 +3077,18 @@ handle_stop (it) if (it->method == GET_FROM_DISPLAY_VECTOR) handle_overlay_change_p = 0; - /* Handle overlay changes. */ + /* Handle overlay changes. + This sets HANDLED to HANDLED_RECOMPUTE_PROPS + if it finds overlays. */ if (handle_overlay_change_p) handled = handle_overlay_change (it); - - /* Determine where to stop next. */ - if (handled == HANDLED_NORMALLY) - compute_stop_pos (it); } } while (handled == HANDLED_RECOMPUTE_PROPS); + + /* Determine where to stop next. */ + if (handled == HANDLED_NORMALLY) + compute_stop_pos (it); } @@ -3367,18 +3369,58 @@ handle_face_prop (it) else { int base_face_id, bufpos; + int i; + Lisp_Object from_overlay + = (it->current.overlay_string_index >= 0 + ? it->string_overlays[it->current.overlay_string_index] + : Qnil); + + /* See if we got to this string directly or indirectly from + an overlay property. That includes the before-string or + after-string of an overlay, strings in display properties + provided by an overlay, their text properties, etc. + + FROM_OVERLAY is the overlay that brought us here, or nil if none. */ + if (! NILP (from_overlay)) + for (i = it->sp - 1; i >= 0; i--) + { + if (it->stack[i].current.overlay_string_index >= 0) + from_overlay + = it->string_overlays[it->stack[i].current.overlay_string_index]; + else if (! NILP (it->stack[i].from_overlay)) + from_overlay = it->stack[i].from_overlay; - if (it->current.overlay_string_index >= 0) - bufpos = IT_CHARPOS (*it); + if (!NILP (from_overlay)) + break; + } + + if (! NILP (from_overlay)) + { + bufpos = IT_CHARPOS (*it); + /* For a string from an overlay, the base face depends + only on text properties and ignores overlays. */ + base_face_id + = face_for_overlay_string (it->w, + IT_CHARPOS (*it), + it->region_beg_charpos, + it->region_end_charpos, + &next_stop, + (IT_CHARPOS (*it) + + TEXT_PROP_DISTANCE_LIMIT), + 0, + from_overlay); + } else - bufpos = 0; + { + bufpos = 0; - /* For strings from a buffer, i.e. overlay strings or strings - from a `display' property, use the face at IT's current - buffer position as the base face to merge with, so that - overlay strings appear in the same face as surrounding - text, unless they specify their own faces. */ - base_face_id = underlying_face_id (it); + /* For strings from a `display' property, use the face at + IT's current buffer position as the base face to merge + with, so that overlay strings appear in the same face as + surrounding text, unless they specify their own + faces. */ + base_face_id = underlying_face_id (it); + } new_face_id = face_at_string_position (it->w, it->string, @@ -3789,7 +3831,7 @@ static enum prop_handled handle_display_prop (it) struct it *it; { - Lisp_Object prop, object; + Lisp_Object prop, object, overlay; struct text_pos *position; /* Nonzero if some property replaces the display of the text itself. */ int display_replaced_p = 0; @@ -3817,10 +3859,12 @@ handle_display_prop (it) if (!it->string_from_display_prop_p) it->area = TEXT_AREA; - prop = Fget_char_property (make_number (position->charpos), - Qdisplay, object); + prop = get_char_property_and_overlay (make_number (position->charpos), + Qdisplay, object, &overlay); if (NILP (prop)) return HANDLED_NORMALLY; + /* Now OVERLAY is the overlay that gave us this property, or nil + if it was a text property. */ if (!STRINGP (it->string)) object = it->w->buffer; @@ -3842,7 +3886,7 @@ handle_display_prop (it) { for (; CONSP (prop); prop = XCDR (prop)) { - if (handle_single_display_spec (it, XCAR (prop), object, + if (handle_single_display_spec (it, XCAR (prop), object, overlay, position, display_replaced_p)) { display_replaced_p = 1; @@ -3857,7 +3901,7 @@ handle_display_prop (it) { int i; for (i = 0; i < ASIZE (prop); ++i) - if (handle_single_display_spec (it, AREF (prop, i), object, + if (handle_single_display_spec (it, AREF (prop, i), object, overlay, position, display_replaced_p)) { display_replaced_p = 1; @@ -3869,7 +3913,8 @@ handle_display_prop (it) } else { - int ret = handle_single_display_spec (it, prop, object, position, 0); + int ret = handle_single_display_spec (it, prop, object, overlay, + position, 0); if (ret < 0) /* Replaced by "", i.e. nothing. */ return HANDLED_RECOMPUTE_PROPS; if (ret) @@ -3911,6 +3956,9 @@ display_prop_end (it, object, start_pos) replaced text display with something else, for example an image; we ignore such properties after the first one has been processed. + OVERLAY is the overlay this `display' property came from, + or nil if it was a text property. + If PROP is a `space' or `image' specification, and in some other cases too, set *POSITION to the position where the `display' property ends. @@ -3920,11 +3968,12 @@ display_prop_end (it, object, start_pos) "something" is "nothing". */ static int -handle_single_display_spec (it, spec, object, position, +handle_single_display_spec (it, spec, object, overlay, position, display_replaced_before_p) struct it *it; Lisp_Object spec; Lisp_Object object; + Lisp_Object overlay; struct text_pos *position; int display_replaced_before_p; { @@ -4034,7 +4083,7 @@ handle_single_display_spec (it, spec, object, position, return 0; } - /* Handle `(space_width WIDTH)'. */ + /* Handle `(space-width WIDTH)'. */ if (CONSP (spec) && EQ (XCAR (spec), Qspace_width) && CONSP (XCDR (spec))) @@ -4158,6 +4207,7 @@ handle_single_display_spec (it, spec, object, position, it->position = start_pos; it->object = NILP (object) ? it->w->buffer : object; it->method = GET_FROM_IMAGE; + it->from_overlay = Qnil; it->face_id = face_id; /* Say that we haven't consumed the characters with @@ -4228,6 +4278,7 @@ handle_single_display_spec (it, spec, object, position, it->position = *position; push_it (it); it->position = save_pos; + it->from_overlay = overlay; if (NILP (location)) it->area = TEXT_AREA; @@ -5011,7 +5062,10 @@ load_overlay_strings (it, charpos) i = 0; j = it->current.overlay_string_index; while (i < OVERLAY_STRING_CHUNK_SIZE && j < n) - it->overlay_strings[i++] = entries[j++].string; + { + it->overlay_strings[i] = entries[j].string; + it->string_overlays[i++] = entries[j++].overlay; + } CHECK_IT (it); } @@ -5057,6 +5111,7 @@ get_overlay_strings_1 (it, charpos, compute_stop_p) string. */ IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; it->string = it->overlay_strings[0]; + it->from_overlay = Qnil; it->stop_charpos = 0; xassert (STRINGP (it->string)); it->end_charpos = SCHARS (it->string); @@ -5110,6 +5165,7 @@ push_it (it) p->face_id = it->face_id; p->string = it->string; p->method = it->method; + p->from_overlay = it->from_overlay; switch (p->method) { case GET_FROM_IMAGE: @@ -5163,6 +5219,7 @@ pop_it (it) it->current = p->current; it->position = p->position; it->string = p->string; + it->from_overlay = p->from_overlay; if (NILP (it->string)) SET_TEXT_POS (it->current.string_pos, -1, -1); it->method = p->method; @@ -17545,7 +17602,9 @@ are the selected window and the window's buffer). */) buffer = w->buffer; CHECK_BUFFER (buffer); - if (NILP (format)) + /* Make formatting the modeline a non-op when noninteractive, otherwise + there will be problems later caused by a partially initialized frame. */ + if (NILP (format) || noninteractive) return empty_unibyte_string; if (no_props) diff --git a/src/xfaces.c b/src/xfaces.c index 50d733c7d0b..fd7dbb88133 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -8216,6 +8216,85 @@ face_at_buffer_position (w, pos, region_beg, region_end, return lookup_face (f, attrs); } +/* Return the face ID at buffer position POS for displaying ASCII + characters associated with overlay strings for overlay OVERLAY. + + Like face_at_buffer_position except for OVERLAY. Currently it + simply disregards the `face' properties of all overlays. */ + +int +face_for_overlay_string (w, pos, region_beg, region_end, + endptr, limit, mouse, overlay) + struct window *w; + int pos; + int region_beg, region_end; + int *endptr; + int limit; + int mouse; + Lisp_Object overlay; +{ + struct frame *f = XFRAME (w->frame); + Lisp_Object attrs[LFACE_VECTOR_SIZE]; + Lisp_Object prop, position; + int i, noverlays; + Lisp_Object *overlay_vec; + Lisp_Object frame; + int endpos; + Lisp_Object propname = mouse ? Qmouse_face : Qface; + Lisp_Object limit1, end; + struct face *default_face; + + /* W must display the current buffer. We could write this function + to use the frame and buffer of W, but right now it doesn't. */ + /* xassert (XBUFFER (w->buffer) == current_buffer); */ + + XSETFRAME (frame, f); + XSETFASTINT (position, pos); + + endpos = ZV; + if (pos < region_beg && region_beg < endpos) + endpos = region_beg; + + /* Get the `face' or `mouse_face' text property at POS, and + determine the next position at which the property changes. */ + prop = Fget_text_property (position, propname, w->buffer); + XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); + end = Fnext_single_property_change (position, propname, w->buffer, limit1); + if (INTEGERP (end)) + endpos = XINT (end); + + *endptr = endpos; + + default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); + + /* Optimize common cases where we can use the default face. */ + if (NILP (prop) + && !(pos >= region_beg && pos < region_end)) + return DEFAULT_FACE_ID; + + /* Begin with attributes from the default face. */ + bcopy (default_face->lface, attrs, sizeof attrs); + + /* Merge in attributes specified via text properties. */ + if (!NILP (prop)) + merge_face_ref (f, prop, attrs, 1, 0); + + /* If in the region, merge in the region face. */ + if (pos >= region_beg && pos < region_end) + { + merge_named_face (f, Qregion, attrs, 0); + + if (region_end < endpos) + endpos = region_end; + } + + *endptr = endpos; + + /* Look up a realized face with the given face attributes, + or realize a new one for ASCII characters. */ + return lookup_face (f, attrs, 0, NULL); +} + /* Compute the face at character position POS in Lisp string STRING on window W, for ASCII characters. diff --git a/src/xfns.c b/src/xfns.c index b176b3ffda5..95efa697110 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -143,11 +143,7 @@ static Lisp_Object Vgtk_version_string; #endif /* USE_GTK */ -#ifdef HAVE_X11R4 #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) -#else -#define MAXREQUEST(dpy) ((dpy)->max_request_size) -#endif /* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses it, and including `bitmaps/gray' more than once is a problem when @@ -1601,7 +1597,6 @@ x_set_name_internal (f, name) if (FRAME_X_WINDOW (f)) { BLOCK_INPUT; -#ifdef HAVE_X11R4 { XTextProperty text, icon; int bytes, stringp; @@ -1669,12 +1664,6 @@ x_set_name_internal (f, name) if (do_free_text_value) xfree (text.value); } -#else /* not HAVE_X11R4 */ - XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - SDATA (name)); - XStoreName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - SDATA (name)); -#endif /* not HAVE_X11R4 */ UNBLOCK_INPUT; } } @@ -1861,23 +1850,6 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass, -#if !defined (HAVE_X11R4) && !defined (HAVE_XSETWMPROTOCOLS) - -Status -XSetWMProtocols (dpy, w, protocols, count) - Display *dpy; - Window w; - Atom *protocols; - int count; -{ - Atom prop; - prop = XInternAtom (dpy, "WM_PROTOCOLS", False); - if (prop == None) return False; - XChangeProperty (dpy, w, prop, XA_ATOM, 32, PropModeReplace, - (unsigned char *) protocols, count); - return True; -} -#endif /* not HAVE_X11R4 && not HAVE_XSETWMPROTOCOLS */ #ifdef USE_X_TOOLKIT @@ -4220,11 +4192,7 @@ select_visual (dpyinfo) dpyinfo->visual = DefaultVisualOfScreen (screen); -#ifdef HAVE_X11R4 vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual); -#else - vinfo_template.visualid = dpyinfo->visual->visualid; -#endif vinfo_template.screen = XScreenNumberOfScreen (screen); vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask, &vinfo_template, &n_visuals); diff --git a/src/xselect.c b/src/xselect.c index 0db5ef57767..45907b30be4 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -140,11 +140,7 @@ static Lisp_Object Qforeign_selection; incremental transfer stuff, but it might improve server performance. */ #define MAX_SELECTION_QUANTUM 0xFFFFFF -#ifdef HAVE_X11R4 #define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100) -#else -#define SELECTION_QUANTUM(dpy) (((dpy)->max_request_size << 2) - 100) -#endif /* The timestamp of the last input event Emacs received from the X server. */ /* Defined in keyboard.c. */ diff --git a/src/xterm.c b/src/xterm.c index 9af6060d167..7d20e9bd48f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2754,7 +2754,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) @@ -3688,12 +3687,7 @@ x_find_modifier_meanings (dpyinfo) dpyinfo->super_mod_mask = 0; dpyinfo->hyper_mod_mask = 0; -#ifdef HAVE_X11R4 XDisplayKeycodes (dpyinfo->display, &min_code, &max_code); -#else - min_code = dpyinfo->display->min_keycode; - max_code = dpyinfo->display->max_keycode; -#endif syms = XGetKeyboardMapping (dpyinfo->display, min_code, max_code - min_code + 1, @@ -6709,14 +6703,6 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) || (orig_keysym & (1 << 28)) || (keysym != NoSymbol && nbytes == 0)) && ! (IsModifierKey (orig_keysym) -#ifndef HAVE_X11R5 -#ifdef XK_Mode_switch - || ((unsigned)(orig_keysym) == XK_Mode_switch) -#endif -#ifdef XK_Num_Lock - || ((unsigned)(orig_keysym) == XK_Num_Lock) -#endif -#endif /* not HAVE_X11R5 */ /* The symbols from XK_ISO_Lock to XK_ISO_Last_Group_Lock don't have real modifiers but @@ -7806,7 +7792,6 @@ x_text_icon (f, icon_name) if (FRAME_X_WINDOW (f) == 0) return 1; -#ifdef HAVE_X11R4 { XTextProperty text; text.value = (unsigned char *) icon_name; @@ -7815,9 +7800,6 @@ x_text_icon (f, icon_name) text.nitems = strlen (icon_name); XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); } -#else /* not HAVE_X11R4 */ - XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name); -#endif /* not HAVE_X11R4 */ if (f->output_data.x->icon_bitmap > 0) x_destroy_bitmap (f, f->output_data.x->icon_bitmap); @@ -9505,7 +9487,6 @@ x_make_frame_invisible (f) else #endif { -#ifdef HAVE_X11R4 if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window, DefaultScreen (FRAME_X_DISPLAY (f)))) @@ -9513,31 +9494,6 @@ x_make_frame_invisible (f) UNBLOCK_INPUT_RESIGNAL; error ("Can't notify window manager of window withdrawal"); } -#else /* ! defined (HAVE_X11R4) */ - - /* Tell the window manager what we're going to do. */ - if (! EQ (Vx_no_window_manager, Qt)) - { - XEvent unmap; - - unmap.xunmap.type = UnmapNotify; - unmap.xunmap.window = window; - unmap.xunmap.event = DefaultRootWindow (FRAME_X_DISPLAY (f)); - unmap.xunmap.from_configure = False; - if (! XSendEvent (FRAME_X_DISPLAY (f), - DefaultRootWindow (FRAME_X_DISPLAY (f)), - False, - SubstructureRedirectMaskSubstructureNotifyMask, - &unmap)) - { - UNBLOCK_INPUT_RESIGNAL; - error ("Can't notify window manager of withdrawal"); - } - } - - /* Unmap the window ourselves. Cheeky! */ - XUnmapWindow (FRAME_X_DISPLAY (f), window); -#endif /* ! defined (HAVE_X11R4) */ } /* We can't distinguish this from iconification @@ -9903,16 +9859,11 @@ x_wm_set_size_hint (f, flags, user_position) them; otherwise, we set the min_width and min_height members to the size for a zero x zero frame. */ -#ifdef HAVE_X11R4 size_hints.flags |= PBaseSize; size_hints.base_width = base_width; size_hints.base_height = base_height; size_hints.min_width = base_width + min_cols * size_hints.width_inc; size_hints.min_height = base_height + min_rows * size_hints.height_inc; -#else - size_hints.min_width = base_width; - size_hints.min_height = base_height; -#endif } /* If we don't need the old flags, we don't need the old hint at all. */ @@ -9928,12 +9879,8 @@ x_wm_set_size_hint (f, flags, user_position) long supplied_return; int value; -#ifdef HAVE_X11R4 value = XGetWMNormalHints (FRAME_X_DISPLAY (f), window, &hints, &supplied_return); -#else - value = XGetNormalHints (FRAME_X_DISPLAY (f), window, &hints); -#endif #ifdef USE_X_TOOLKIT size_hints.base_height = hints.base_height; @@ -9974,11 +9921,7 @@ x_wm_set_size_hint (f, flags, user_position) } #endif /* PWinGravity */ -#ifdef HAVE_X11R4 XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints); -#else - XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints); -#endif } #endif /* not USE_GTK */ @@ -11138,9 +11081,7 @@ x_term_init (display_name, xrm_option, resource_name) argv[argc++] = "--name"; argv[argc++] = resource_name; -#ifdef HAVE_X11R5 XSetLocaleModifiers (""); -#endif gtk_init (&argc, &argv2); @@ -11205,9 +11146,7 @@ x_term_init (display_name, xrm_option, resource_name) } #else /* not USE_X_TOOLKIT */ -#ifdef HAVE_X11R5 XSetLocaleModifiers (""); -#endif dpy = XOpenDisplay (SDATA (display_name)); #endif /* not USE_X_TOOLKIT */ #endif /* not USE_GTK*/ @@ -11518,9 +11457,6 @@ x_term_init (display_name, xrm_option, resource_name) #endif /* ! defined (SIGIO) */ #ifdef USE_LUCID -#ifdef HAVE_X11R5 /* It seems X11R4 lacks XtCvtStringToFont, and XPointer. */ - /* Make sure that we have a valid font for dialog boxes - so that Xt does not crash. */ { Display *dpy = dpyinfo->display; XrmValue d, fr, to; @@ -11540,7 +11476,6 @@ x_term_init (display_name, xrm_option, resource_name) x_uncatch_errors (); } #endif -#endif /* See if we should run in synchronous mode. This is useful for debugging X code. */ diff --git a/src/xterm.h b/src/xterm.h index ec583e39f4d..40cbf695d38 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -59,43 +59,6 @@ typedef GtkWidget *xt_or_gtk_widget; /* Bookkeeping to distinguish X versions. */ -/* HAVE_X11R4 is defined if we have the features of X11R4. It should - be defined when we're using X11R5, since X11R5 has the features of - X11R4. If, in the future, we find we need more of these flags - (HAVE_X11R5, for example), code should always be written to test - the most recent flag first: - - #ifdef HAVE_X11R5 - ... - #elif HAVE_X11R4 - ... - #elif HAVE_X11 - ... - #endif - - If you ever find yourself writing a "#ifdef HAVE_FOO" clause that - looks a lot like another one, consider moving the text into a macro - whose definition is configuration-dependent, but whose usage is - universal - like the stuff in systime.h. - - It turns out that we can auto-detect whether we're being compiled - with X11R3 or X11R4 by looking for the flag macros for R4 structure - members that R3 doesn't have. */ -#ifdef PBaseSize -/* AIX 3.1's X is somewhere between X11R3 and X11R4. It has - PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints, - XSetWMIconName. - AIX 3.2 is at least X11R4. */ -#if (!defined AIX) || (defined AIX3_2) -#define HAVE_X11R4 -#endif -#endif - -#ifdef HAVE_X11R5 -/* In case someone has X11R5 on AIX 3.1, - make sure HAVE_X11R4 is defined as well as HAVE_X11R5. */ -#define HAVE_X11R4 -#endif #ifdef HAVE_X_I18N #include <X11/Xlocale.h> |