1. 20 Jul, 2011 1 commit
  2. 03 Jun, 2011 1 commit
    • Paul Eggert's avatar
      Fix doc for machines with wider system times such as time_t. · da908fa9
      Paul Eggert authored
      On such machines, it's now safe to assume that EMACS_INT is as
      wide as the system times, so that shifting right by 16 will
      result in an integer that always fits in EMACS_INT.
      * dired.c (Ffile_attributes): Document large inode number handling.
      * termhooks.h: Fix comment for large time stamp handling.
      da908fa9
  3. 27 May, 2011 1 commit
    • Chong Yidong's avatar
      Support X clipboard managers. · a9f737ee
      Chong Yidong authored
      * lisp/select.el (xselect-convert-to-targets): Add MULTIPLE target to list.
      (xselect-convert-to-save-targets): New function.
      
      * src/xselect.c: Support for clipboard managers.
      (Vselection_alist): Move to termhooks.h as terminal-local var.
      (LOCAL_SELECTION): New macro.
      (x_atom_to_symbol): Handle x_display_info_for_display fail case.
      (symbol_to_x_atom): Remove gratuitous arg.
      (x_handle_selection_request, lisp_data_to_selection_data)
      (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
      (x_own_selection, x_get_local_selection, x_convert_selection): New
      arg, specifying work frame.  Use terminal-local Vselection_alist.
      (some_frame_on_display): Delete unused function.
      (Fx_own_selection_internal, Fx_get_selection_internal)
      (Fx_disown_selection_internal, Fx_selection_owner_p)
      (Fx_selection_exists_p): New optional frame arg.
      (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
      (x_handle_selection_clear): Don't treat other terminals with the
      same keyboard specially.  Use the terminal-local Vselection_alist.
      (x_clear_frame_selections): Use Frun_hook_with_args.
      
      * src/termhooks.h (Vselection_alist): Make it terminal-local.
      
      * src/terminal.c (create_terminal): Initialize it.
      
      * src/xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
      
      * src/xterm.h: Add support for those atoms.
      a9f737ee
  4. 12 May, 2011 1 commit
    • Paul Eggert's avatar
      Be more systematic about user-interface timestamps. · 08dc5ae6
      Paul Eggert authored
      Before, the code sometimes used 'Time', sometimes 'unsigned long',
      and sometimes 'EMACS_UINT', to represent these timestamps.  This
      change causes it to use 'Time' uniformly, as that's what X uses.
      This makes the code easier to follow, and makes it easier to catch
      integer overflow bugs such as Bug#8664.
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      Use Time, not unsigned long, for user-interface timestamps.
      * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
      (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
      * keyboard.h (last_event_timestamp): Likewise.
      * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
      * menu.h (xmenu_show): Likewise.
      * term.c (term_mouse_position): Likewise.
      * termhooks.h (struct input_event.timestamp): Likewise.
      (struct terminal.mouse_position_hook): Likewise.
      * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
      * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
      * systime.h (Time): New decl.  Pull it in from <X11/X.h> if
      HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
      what it was before.
      * menu.h, termhooks.h: Include "systime.h", for Time.
      08dc5ae6
  5. 09 May, 2011 1 commit
    • Eli Zaretskii's avatar
      Backport revisions... · 14fe7b53
      Eli Zaretskii authored
      Backport revisions 2011-04-24T05:30:24Z!eggert@cs.ucla.edu..2011-04-25T19:40:22Z!eggert@cs.ucla.edu (inclusive) from trunk (bug#8623)
      
      	The next log entry shows the actual changes by Paul Eggert.
      
       Fix a problem with aliasing and vector headers.
       GCC 4.6.0 optimizes based on type-based alias analysis.  For
       example, if b is of type struct buffer * and v of type struct
       Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
       != &v->size, and therefore "v->size = 1; b->size = 2; return
       v->size;" must therefore return 1.  This assumption is incorrect
       for Emacs, since it type-puns struct Lisp_Vector * with many other
       types.  To fix this problem, this patch adds a new type struct
       vector_header that documents the constraints on layout of vectors
       and pseudovectors, and helps optimizing compilers not get fooled
       by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
       XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
       src/lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
       XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
       of writing XVECTOR (foo)->header.size.
       src/lisp.h: Say "vectorlike header" rather than "vector header.
       (struct vectorlike_header): Rename from struct vector_header.
       (XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
       All uses changed.
       (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
       (XSETTYPED_PVECTYPE): New macro, specifying the name of the size
       member.
       (XSETPVECTYPE): Rewrite in terms of new macro.
       (XSETPVECTYPESIZE): New macro, specifying both type and size.
       This is a bit clearer, and further avoids the possibility of
       undesirable aliasing.
       (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
       (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
       and XVECTOR_HEADER_SIZE.
       (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
       since Lisp_Subr is a special case (no "next" field).
       (ASIZE): Rewrite in terms of XVECTOR_SIZE.
       (struct vector_header): New type.
       (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
       object, to help avoid aliasing.
       (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
       (SUBRP): Likewise, since Lisp_Subr is a special case.
       src/lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
       (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
       (struct Lisp_Hash_Table): Combine first two members into a single
       struct vector_header member.  All uses of "size" and "next" members
       changed to be "header.size" and "header.next".
       src/buffer.h (struct buffer): Likewise.
       src/font.h (struct font_spec, struct font_entity, struct font): Likewise.
       src/frame.h (struct frame): Likewise.
       src/process.h (struct Lisp_Process): Likewise.
       src/termhooks.h (struct terminal): Likewise.
       src/window.c (struct save_window_data, struct saved_window): Likewise.
       src/window.h (struct window): Likewise.
       src/alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
       Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
       src/buffer.c (init_buffer_once): Likewise.
       src/lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
       special case.
       src/process.c (Fformat_network_address): Use local var for size,
       for brevity.
       src/fns.c (vector): Remove; this old hack is no longer needed.
       src/bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
      14fe7b53
  6. 25 Apr, 2011 2 commits
    • Paul Eggert's avatar
      * lisp.h: Say "vectorlike header" rather than "vector header. · b102ceb1
      Paul Eggert authored
      (struct vectorlike_header): Rename from struct vector_header.
      (XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
      All uses changed.
      b102ceb1
    • Paul Eggert's avatar
      lisp.h: Fix a problem with aliasing and vector headers. · eab3844f
      Paul Eggert authored
      GCC 4.6.0 optimizes based on type-based alias analysis.  For
      example, if b is of type struct buffer * and v of type struct
      Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
      != &v->size, and therefore "v->size = 1; b->size = 2; return
      v->size;" must therefore return 1.  This assumption is incorrect
      for Emacs, since it type-puns struct Lisp_Vector * with many other
      types.  To fix this problem, this patch adds a new type struct
      vector_header that documents the constraints on layout of vectors
      and pseudovectors, and helps optimizing compilers not get fooled
      by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
      XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
      * lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
      XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
      of writing XVECTOR (foo)->header.size.
      (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
      (XSETTYPED_PVECTYPE): New macro, specifying the name of the size
      member.
      (XSETPVECTYPE): Rewrite in terms of new macro.
      (XSETPVECTYPESIZE): New macro, specifying both type and size.
      This is a bit clearer, and further avoids the possibility of
      undesirable aliasing.
      (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
      (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
      and XVECTOR_HEADER_SIZE.
      (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
      since Lisp_Subr is a special case (no "next" field).
      (ASIZE): Rewrite in terms of XVECTOR_SIZE.
      (struct vector_header): New type.
      (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
      object, to help avoid aliasing.
      (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
      (SUBRP): Likewise, since Lisp_Subr is a special case.
      * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
      (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
      (struct Lisp_Hash_Table): Combine first two members into a single
      struct vector_header member.  All uses of "size" and "next" members
      changed to be "header.size" and "header.next".
      * buffer.h (struct buffer): Likewise.
      * font.h (struct font_spec, struct font_entity, struct font): Likewise.
      * frame.h (struct frame): Likewise.
      * process.h (struct Lisp_Process): Likewise.
      * termhooks.h (struct terminal): Likewise.
      * window.c (struct save_window_data, struct saved_window): Likewise.
      * window.h (struct window): Likewise.
      * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
      Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
      * buffer.c (init_buffer_once): Likewise.
      * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
      special case.
      * process.c (Fformat_network_address): Use local var for size,
      for brevity.
      eab3844f
  7. 17 Apr, 2011 1 commit
    • Chong Yidong's avatar
      Minor redisplay cleanups. · 4581706e
      Chong Yidong authored
      * src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
      definition for no-X builds.
      
      * src/termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
      
      * src/xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
      4581706e
  8. 16 Apr, 2011 1 commit
  9. 14 Apr, 2011 1 commit
    • Paul Eggert's avatar
      * term.c: Make symbols static if they're not exported. · 64520e5c
      Paul Eggert authored
      (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
      (max_frame_lines, tty_set_terminal_modes):
      (tty_reset_terminal_modes, tty_turn_off_highlight):
      (get_tty_terminal): Now static.
      (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
      * termhooks.h (term_mouse_moveto): Do not declare if
      HAVE_WINDOW_SYSTEMM.
      * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
      (tty_turn_off_highlight, get_tty_terminal): Remove decls.
      64520e5c
  10. 11 Mar, 2011 1 commit
    • Eli Zaretskii's avatar
      Fix MS-Windows build broken by 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. · 7ef4b50c
      Eli Zaretskii authored
       src/term.c (encode_terminal_code): Now external again, used by
       w32console.c and msdos.c.
       src/termhooks.h (encode_terminal_code): Declare prototype.
       src/msdos.c (encode_terminal_code): Don't declare prototype.
       src/makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend
       on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
      7ef4b50c
  11. 26 Jan, 2011 1 commit
  12. 25 Jan, 2011 1 commit
  13. 15 Jan, 2011 1 commit
  14. 02 Jan, 2011 1 commit
  15. 27 Dec, 2010 1 commit
    • Andreas Schwab's avatar
      Remove unused declarations · 2f7c71a1
      Andreas Schwab authored
      * src/buffer.c: Remove unused declarations.
      * src/buffer.h: Likewise.
      * src/charset.h: Likewise.
      * src/composite.h: Likewise.
      * src/dispextern.h: Likewise.
      * src/dispnew.c: Likewise.
      * src/font.h: Likewise.
      * src/fontset.c: Likewise.
      * src/fontset.h: Likewise.
      * src/intervals.h: Likewise.
      * src/keymap.h: Likewise.
      * src/lisp.h: Likewise.
      * src/syntax.c: Likewise.
      * src/syntax.h: Likewise.
      * src/termhooks.h: Likewise.
      * src/window.h: Likewise.
      * src/xsettings.h: Likewise.
      * src/xterm.c: Likewise.
      * src/xterm.h: Likewise.
      
      * src/chartab.c (sub_char_table_ref): Make static.
      * src/dispnew.c (line_hash_code, required_matrix_height)
      (required_matrix_width): Likewise.
      * src/eval.c (interactive_p, apply_lambda): Likewise.
      * src/fns.c (string_make_multibyte, copy_hash_table, hash_clear):
      Likewise.
      * src/font.c (QCadstyle, QCregistry, font_make_spec)
      (font_parse_fcname, font_encode_char, font_at): Likewise.
      * src/frame.c (x_frame_get_arg): Likewise.
      * src/keymap.c (get_keyelt): Likewise.
      * src/lread.c (read_filtered_event): Likewise.
      * src/print.c (write_string_1): Likewise.
      * src/window.c (delete_window, window_height, window_width)
      (foreach_window): Likewise.
      * src/xrdb.c (x_get_customization_string, x_get_resource): Likewise.
      * src/xterm.c (x_scroll_bar_clear, xembed_set_info)
      (xembed_send_message): Likewise.
      
      * src/eval.c (run_hook_list_with_args): Delete.
      * src/font.c (font_unparse_gtkname, font_update_lface): Likewise.
      * src/terminal.c (get_terminal_param): Likewise.
      * src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
      2f7c71a1
  16. 01 Nov, 2010 1 commit
  17. 03 Oct, 2010 1 commit
  18. 25 Sep, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix int/EMACS_INT use in keyboard.c. · 41118bd3
      Eli Zaretskii authored
       keyboard.c <last_point_position, last_non_minibuf_size>: Declare EMACS_INT.
       (echo_truncate, adjust_point_for_property, read_char)
       (gen_help_event, make_lispy_event, modify_event_symbol)
       (Fexecute_extended_command, stuff_buffered_input): Use EMACS_INT
       for buffer positions and string length.
       keyboard.h (gen_help_event): Adjust prototype.
       termhooks.h <struct input_event>: Make `code' member EMACS_INT.
       commands.h <last_point_position>: Declare EMACS_INT.
       xdisp.c <help_echo_pos>: Define as EMACS_INT.
       (truncate_echo_area): Accept EMACS_INT argument.
       dispextern.h <help_echo_pos>: Declare EMACS_INT.
       lisp.h (truncate_echo_area): Adjust prototype.
       composite.c (composition_adjust_point): Return EMACS_INT.
       composite.h (composition_adjust_point): Adjust prototype.
      41118bd3
  19. 07 Jul, 2010 1 commit
    • Andreas Schwab's avatar
      Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp · 72af86bd
      Andreas Schwab authored
      * alloc.c (overrun_check_malloc, overrun_check_realloc)
      (overrun_check_free, xstrdup, allocate_string)
      (allocate_string_data, compact_small_strings, Fmake_string)
      (make_unibyte_string, make_multibyte_string)
      (make_string_from_bytes, make_specified_string, make_float)
      (Fcons, allocate_terminal, allocate_frame, make_pure_string)
      (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
      memcpy, memmove, memset, memcmp.
      * atimer.c (start_atimer, set_alarm): Likewise.
      * buffer.c (clone_per_buffer_values, report_overlay_modification)
      (mmap_realloc, init_buffer_once): Likewise.
      * callint.c (Fcall_interactively): Likewise.
      * callproc.c (Fcall_process, Fcall_process_region, child_setup)
      (getenv_internal_1): Likewise.
      * casefiddle.c (casify_object): Likewise.
      * ccl.c (ccl_driver): Likewise.
      * character.c (str_as_multibyte, str_to_multibyte): Likewise.
      * charset.c (load_charset_map_from_file)
      (load_charset_map_from_file, load_charset_map_from_vector)
      (Fdefine_charset_internal): Likewise.
      * cm.c (Wcm_clear): Likewise.
      * coding.c (decode_eol, decode_coding_object)
      (Fset_coding_system_priority, make_subsidiaries): Likewise.
      * data.c (Faset): Likewise.
      * dired.c (directory_files_internal, file_name_completion_stat):
      Likewise.
      * dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
      (clear_glyph_row, copy_row_except_pointers)
      (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
      (save_current_matrix, restore_current_matrix)
      (build_frame_matrix_from_leaf_window, mirrored_line_dance)
      (mirror_line_dance, scrolling_window): Likewise.
      * doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
      Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (Fuser_full_name, make_buffer_string_both)
      (Fmessage_box, Fformat, Ftranspose_regions): Likewise.
      * emacs.c (sort_args): Likewise.
      * eval.c (Fapply, Ffuncall): Likewise.
      * fileio.c (Ffile_name_directory, make_temp_name)
      (Fexpand_file_name, search_embedded_absfilename)
      (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
      (auto_save_error): Likewise.
      * fns.c (Fstring_equal, Fcopy_sequence, concat)
      (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
      (internal_equal, Fclear_string, larger_vector, copy_hash_table)
      (Fmake_hash_table): Likewise.
      * fringe.c (Fdefine_fringe_bitmap): Likewise.
      * ftfont.c (ftfont_text_extents): Likewise.
      * getloadavg.c (getloadavg): Likewise.
      * image.c (define_image_type, make_image, make_image_cache)
      (x_create_x_image_and_pixmap, xbm_image_p)
      (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
      (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
      (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
      (png_image_p, png_read_from_memory, png_load, jpeg_image_p)
      (tiff_image_p, tiff_read_from_memory, gif_image_p)
      (gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
      Likewise.
      * indent.c (scan_for_column, compute_motion): Likewise.
      * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
      (insert_1_both, insert_from_gap, replace_range_2): Likewise.
      * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
      * keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
      (kbd_buffer_store_event_hold, apply_modifiers_uncached)
      (store_user_signal_events, menu_bar_items, tool_bar_items)
      (process_tool_bar_item, append_tool_bar_item)
      (read_char_minibuf_menu_prompt, read_key_sequence)
      (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
      Likewise.
      * keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
      Likewise.
      * lisp.h (STRING_COPYIN): Likewise.
      * lread.c (Fload, read1, oblookup): Likewise.
      * msdos.c (Frecent_doskeys): Likewise.
      * nsfns.m (Fx_create_frame): Likewise.
      * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
      Likewise.
      * nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
      (EmacsImage-initForXPMWithDepth:width:height:flip:length:):
      Likewise.
      * nsmenu.m (ns_update_menubar): Likewise.
      * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
      * print.c (print_unwind, printchar, strout, print_string)
      (print_error_message): Likewise.
      * process.c (conv_lisp_to_sockaddr, set_socket_option)
      (Fmake_network_process, Fnetwork_interface_list)
      (Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
      (init_process): Likewise.
      * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
      * regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
      Likewise.
      * scroll.c (do_scrolling, do_direct_scrolling)
      (scrolling_max_lines_saved): Likewise.
      * search.c (search_buffer, wordify, Freplace_match): Likewise.
      * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
      * syntax.c (skip_chars, skip_syntaxes): Likewise.
      * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
      (emacs_set_tty): Likewise.
      * term.c (encode_terminal_code, calculate_costs)
      (produce_special_glyphs, create_tty_output, init_tty, delete_tty):
      Likewise.
      * termcap.c (tgetst1, gobble_line): Likewise.
      * termhooks.h (EVENT_INIT): Likewise.
      * tparam.c (tparam1): Likewise.
      * unexalpha.c (unexec): Likewise.
      * unexec.c (write_segment): Likewise.
      * unexmacosx.c (unexec_write_zero): Likewise.
      * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
      (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
      * w32font.c (w32font_list_family, w32font_text_extents)
      (w32font_list_internal, w32font_match_internal)
      (w32font_open_internal, compute_metrics, Fx_select_font):
      Likewise.
      * w32menu.c (set_frame_menubar, add_menu_item)
      (w32_menu_display_help, w32_free_submenu_strings): Likewise.
      * w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
      * w32uniscribe.c (uniscribe_list_family): Likewise.
      * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
      * window.c (make_window, replace_window, set_window_buffer)
      (Fsplit_window): Likewise.
      * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
      (add_to_log, message3, x_consider_frame_title)
      (append_space_for_newline, extend_face_to_end_of_line)
      (decode_mode_spec_coding, init_glyph_string): Likewise.
      * xfaces.c (x_create_gc, get_lface_attributes_no_remap)
      (Finternal_copy_lisp_face, Finternal_merge_in_global_face)
      (face_attr_equal_p, make_realized_face, make_face_cache)
      (free_realized_faces, lookup_named_face, smaller_face)
      (face_with_height, lookup_derived_face)
      (x_supports_face_attributes_p, Finternal_set_font_selection_order)
      (Finternal_set_font_selection_order, realize_default_face)
      (compute_char_face, face_at_buffer_position)
      (face_for_overlay_string, face_at_string_position, merge_faces):
      Likewise.
      * xfns.c (xic_create_fontsetname, Fx_create_frame)
      (Fx_window_property, x_create_tip_frame)
      (Fx_backspace_delete_keys_p): Likewise.
      * xfont.c (xfont_list, xfont_match, xfont_list_family)
      (xfont_text_extents): Likewise.
      * xmenu.c (set_frame_menubar, xmenu_show): Likewise.
      * xrdb.c (magic_file_p, x_get_resource): Likewise.
      * xselect.c (x_queue_event, x_get_window_property)
      (receive_incremental_selection): Likewise.
      * xsmfns.c (x_session_check_input): Likewise.
      * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
      (handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
      Likewise.
      * character.h (BCOPY_SHORT): Removed.
      * config.in: Regenerate.
      * dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
      * emacs.c (main) [PROFILING]: Don't declare
      dump_opcode_frequencies.
      * lisp.h (safe_bcopy): Remove declaration.
      (memset) [!HAVE_MEMSET]: Declare.
      (memcpy) [!HAVE_MEMCPY]: Likewise.
      (memmove) [!HAVE_MEMMOVE]: Likewise.
      (memcmp) [!HAVE_MEMCMP]: Likewise.
      * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
      (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
      Don't define.
      (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
      * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
      (BCOPY_DOWNWARD_SAFE): Don't define.
      * sysdep.c (memset) [!HAVE_MEMSET]: Define.
      (memcpy) [!HAVE_MEMCPY]: Define.
      (memmove) [!HAVE_MEMMOVE]: Define.
      (memcmp) [!HAVE_MEMCMP]: Define.
      
      * config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
      (HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
      
      * sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
      (HAVE_BZERO): Don't edit.
      
      * lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
      (malloc_widget_value, free_widget_info, allocate_widget_instance)
      (lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
      memset, memcpy, memcmp.
      * lwlib-utils.c (XtApplyToWidgets): Likewise.
      * xlwmenu.c (XlwMenuInitialize): Likewise.
      * lwlib.h (lwlib_bcopy): Remove declaration.
      
      * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
      memcpy, memmove, memset.
      * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
      
      * CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
      (GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
      Remove.
      
      * configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
      <strings.h> and don't define bcopy, bzero, BCMP in config.h.
      72af86bd
  20. 02 Jul, 2010 1 commit
    • Jan D's avatar
      Remove P_ and __P macros. · 383e0970
      Jan D authored
      * lwlib/lwlib-Xaw.h: Remove P_ and __P macros.
      * lwlib/lwlib-Xlw.h:
      * lwlib/lwlib-Xm.h:
      * lwlib/lwlib-int.h:
      * lwlib/lwlib-utils.h:
      * lwlib/lwlib.h: Likewise.
      
      * src/buffer.h: Remove P_ and __P macros.
      * src/category.h:
      * src/ccl.h:
      * src/character.h:
      * src/charset.h:
      * src/cm.h:
      * src/coding.h:
      * src/composite.h:
      * src/dispextern.h:
      * src/disptab.h:
      * src/font.h:
      * src/fontset.h:
      * src/frame.h:
      * src/gtkutil.h:
      * src/indent.h:
      * src/intervals.h:
      * src/keyboard.h:
      * src/keymap.h:
      * src/lisp.h:
      * src/macros.h:
      * src/md5.h:
      * src/menu.h:
      * src/msdos.h:
      * src/nsterm.h:
      * src/puresize.h:
      * src/region-cache.h:
      * src/syntax.h:
      * src/syssignal.h:
      * src/systime.h:
      * src/termhooks.h:
      * src/w32term.h:
      * src/widget.h:
      * src/window.h:
      * src/xgselect.h:
      * src/xsettings.h:
      * src/xterm.h: Likewise.
      383e0970
  21. 13 Jan, 2010 1 commit
  22. 17 Nov, 2009 1 commit
    • Jan Djärv's avatar
      Handle system default font and changing font parameters. · 637fa988
      Jan Djärv authored
      * xterm.h (struct x_display_info): Add atoms and Window for xsettings.
      
      * xterm.c (handle_one_xevent): Call xft_settings_event for
      ClientMessage, PropertyNotify and DestroyNotify.
      (x_term_init): If we have XFT, get DPI from Xft.dpi.
      Call xsettings_initialize.
      
      * xftfont.c (xftfont_fix_match): New function.
      (xftfont_open): Call XftDefaultSubstitute before XftFontMatch.
      Call xftfont_fix_match after XftFontMatch.
      
      * xfont.c (xfont_driver): Initialize all members.
      
      * xfns.c (x_default_font_parameter): Try font from Ffont_get_system_font.
      Do not get font from x_default_parameter if we got one from
      Ffont_get_system_font.
      (Fx_select_font): Get the defaut font name from :name of FRAME_FONT (f).
      
      * w32font.c (w32font_driver): Initialize all members.
      
      * termhooks.h (enum event_kind): CONFIG_CHANGED_EVENT is new.
      
      * lisp.h: Declare syms_of_xsettings.
      
      * keyboard.c (kbd_buffer_get_event, make_lispy_event): Handle
      CONFIG_CHANGED_EVENT.
      
      * ftfont.c (ftfont_filter_properties): New function.
      
      * frame.c (x_set_font): Remove unused variable lval.
      
      * font.h (struct font_driver): filter_properties is new.
      
      * font.c (font_put_extra): Don't return if val is nil, it means
      boolean option is off.
      (font_parse_fcname): Collect all extra properties in extra_props
      and call filter_properties for all drivers with extra_props and
      font as parameter.
      (font_open_entity): Do not use cache, it does not pick up new fontconfig
      settings like hinting.
      (font_load_for_lface): If spec had a name in it, store it in entity.
      
      * emacs.c (main): Call syms_of_xsettings
      
      * config.in: HAVE_GCONF is new.
      
      * Makefile.in (GCONF_CFLAGS, GCONF_LIBS): New variables for HAVE_GCONF.
      xsettings.o is new.
      
      * menu-bar.el: Put "Use system font" in Option-menu.
      
      * loadup.el: If feature system-font-setting or font-render-setting is
      there, load font-setting.
      
      * Makefile.in (ELCFILES): font-settings.el is new.
      * font-setting.el: New file.
      
      * NEWS: Mention dynamic font changes (font-use-system-font).
      
      * configure.in: New option: --with(out)-gconf.
      Set HAVE_GCONF if we find gconf.
      637fa988
  23. 03 Jul, 2009 1 commit
    • Jan Djärv's avatar
      * xterm.h (struct x_display_info): Add invisible_cursor. · e044e4fc
      Jan Djärv authored
      (struct x_output): Add current_cursor.
      
      * xterm.c (XTtoggle_invisible_pointer): New function.
      (x_define_frame_cursor): Don't define cursor if invisible or the
      same as before.  Set current_cursor.
      (x_create_terminal): Set toggle_invisible_pointer_hook.
      
      * xfns.c (make_invisible_cursor): New function.
      (x_set_mouse_color): Call make_invisible_cursor.
      Set current_cursor.
      (x_window): Set current_cursor.
      
      * termhooks.h (struct terminal): Add toggle_invisible_pointer_hook.
      
      * keyboard.c (command_loop_1): Call frame_make_pointer_invisible after
      inserting a character.
      (read_avail_input): Call frame_make_pointer_visible.
      
      * frame.c (Vmake_pointer_invisible): New variable.
      (frame_make_pointer_invisible, frame_make_pointer_visible): New
      functions.
      (syms_of_frame): DEFVAR make-pointer-invisible, initialize to Qt.
      
      * frame.h: Declare frame_make_pointer_invisible and
      frame_make_pointer_visible.
      (struct frame): Add pointer_invisible.
      
      * cus-start.el (all): Added make-pointer-invisible.
      e044e4fc
  24. 27 Mar, 2009 1 commit
  25. 12 Mar, 2009 1 commit
  26. 25 Jan, 2009 1 commit
    • Adrian Robert's avatar
      Changes to remove Feval calls from GUI under NS. · 8612b71a
      Adrian Robert authored
      * nsterm.h: Move KEY_NS_... definitions here from nsterm.m.  Add
      NS_TOGGLE_TOOLBAR, NS_PUT_WORKING_TEXT, NS_UNPUT_WORKING_TEXT.
      Remove NS_INSERT_WORKING_TEXT, NS_DELETE_WORKING_TEXT.
      
      * nsterm.m: Move KEY_NS_... definitions to nsterm.h.
      (EmacsView-toggleToolbar:): Use KEY_NS_TOGGLE_TOOLBAR.
      (EmacsView-setMarkedText:,-deleteWorkingText:): Use NS_TEXT_EVENT
      instead of NON_ASCII_KEYSTROKE_EVENT.
      (EmacsApp-terminate:): Use KEY_NS_POWER_OFF instead of Feval.
      (EmacsApp-applicationShouldTerminate:): Query user.
      (EmacsPreferencesController-runHelp:): Use KEY_NS_INFO_PREFS
      instead of Feval.
      
      * termhooks.h (NS_TEXT_EVENT): New event type under HAVE_NS.
      
      * keyboard.c (kbd_buffer_get_event): Check for it.
      (keys_of_keyboard): Define lispy keys for
      ns-put/unput-working-text.
      
      * nsmenu.m (ns_popup_dialog): Resync window setting with X and W32
      versions.
      (EmacsDialog-runDialogAt:): Use NSModalPanelRunLoopMode.
      8612b71a
  27. 08 Jan, 2009 1 commit
  28. 23 Dec, 2008 1 commit
  29. 12 Sep, 2008 1 commit
  30. 23 Aug, 2008 1 commit
  31. 31 Jul, 2008 1 commit
    • Dan Nicolaescu's avatar
      * s/ms-w32.h (MULTI_KBOARD): Remove. · 69ab3201
      Dan Nicolaescu authored
      * xterm.c:
      * xselect.c:
      * xfns.c:
      * window.c:
      * w32term.c:
      * w32fns.c:
      * terminal.c:
      * termhooks.h:
      * term.c:
      * sysdep.c:
      * keyboard.h:
      * keyboard.c:
      * frame.h:
      * frame.c:
      * frame.c: Remove references to MULTI_KBOARD, it is now the
      default.
      * config.in: Regenerate.
      
      * config.nt (MULTI_KBOARD): Remove.
      
      * configure.in (MULTI_KBOARD): Remove.
      69ab3201
  32. 27 Jul, 2008 1 commit
    • Dan Nicolaescu's avatar
      Remove support for Mac Carbon. · 9e2a2647
      Dan Nicolaescu authored
      * mactoolbox.c:
      * macterm.h:
      * macterm.c:
      * macselect.c:
      * macmenu.c:
      * macgui.h:
      * macfns.c:
      * mac.c: Remove file.
      * s/darwin.h:
      * m/intel386.h:
      * xfaces.c:
      * xdisp.c:
      * window.c:
      * tparam.c:
      * termhooks.h:
      * termcap.c:
      * term.c:
      * syssignal.h:
      * sysselect.h:
      * sysdep.c:
      * process.c:
      * lread.c:
      * lisp.h:
      * keyboard.c:
      * image.c:
      * fringe.c:
      * frame.h:
      * frame.c:
      * fontset.c:
      * font.h:
      * font.c:
      * fns.c:
      * fileio.c:
      * emacs.c:
      * dispnew.c:
      * dispextern.h:
      * config.in:
      * atimer.c:
      * Makefile.in: Remove code for Carbon
      
      * erc.el: Remove code for Carbon.
      
      Remove support for Mac Carbon.
      * term/mac-win.el: Remove file
      * international/mule-cmds.el:
      * version.el:
      * startup.el:
      * simple.el:
      * mwheel.el:
      * mouse.el:
      * loadup.el:
      * isearch.el:
      * info.el:
      * frame.el:
      * faces.el:
      * disp-table.el:
      * cus-start.el:
      * cus-face.el:
      * cus-edit.el:
      * Makefile.in: Remove code for Carbon.
      
      Remove support for Mac Carbon.
      * makefile.w32-in:
      * emacsclient.c: Remove code for Carbon.
      
      * PROBLEMS:
      * MACHINES: Remove mentions of Mac Carbon.
      
      * ns-emacs.texi:
      * faq.texi: Remove mentions of Mac Carbon.
      
      * os.texi:
      * frames.texi:
      * display.texi: Remove mentions of Mac Carbon.
      
      * xresources.texi: Remove mentions of Mac Carbon.
      
      * make-tarball.txt:
      * admin.el:
      * FOR-RELEASE:
      * CPP-DEFINES: Remove mentions of Mac Carbon.
      
      Remove support for Mac Carbon.
      * mac: Remove directory.
      * make-dist:
      * configure.in:
      * README:
      * Makefile.in:
      * INSTALL:  Remove code for Carbon.
      * configure: Regenerate.
      9e2a2647
  33. 15 Jul, 2008 1 commit
  34. 15 May, 2008 1 commit
  35. 22 Feb, 2008 1 commit
    • Stefan Monnier's avatar
      Consolidate the image_cache to the terminal struct. · 354884c4
      Stefan Monnier authored
      * termhooks.h (P_): Remove redundant def.
      (struct terminal): New field `image_cache'.
      * frame.h (FRAME_IMAGE_CACHE): New macro.  Use it everywhere in place
      of FRAME_X_IMAGE_CACHE.
      * xterm.h (struct x_display_info): Remove image_cache field.
      (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
      * w32term.h (struct w32_display_info): Remove image_cache field.
      (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
      * macterm.h (struct mac_display_info): Remove image_cache field.
      (FRAME_X_IMAGE_CACHE): Remove.  Use FRAME_IMAGE_CACHE instead.
      * xterm.c (x_term_init):
      * w32term.c (w32_term_init):
      * macterm.c (mac_term_init): Set the image_cache in the terminal.
      * dispextern.h (clear_image_cache, forall_images_in_image_cache):
      Remove declarations.
      (clear_image_caches, mark_image_cache): New declarations.
      * xfaces.c (clear_face_cache):
      * xdisp.c (redisplay_internal): Use clear_image_caches.
      * image.c (clear_image_cache): Don't check that a frame is on
      a window-system before checking if it shares the same cache.
      (clear_image_caches): New function.
      (Fclear_image_cache): Use it.
      (mark_image): Move from allo.c.
      (mark_image_cache): Move from alloc.c and forall_images_in_image_cache.
      * alloc.c (mark_image, mark_image_cache): Move to image.c.
      (mark_object): Don't call mark_image_cache for frames.
      (mark_terminals): Call mark_image_cache.
      354884c4
  36. 08 Jan, 2008 1 commit
  37. 02 Dec, 2007 1 commit
    • Michael Albinus's avatar
      * config.in (HAVE_DBUS): Add. · 033b73e2
      Michael Albinus authored
      * Makefile.in: (HAVE_DBUS): Add D-Bus definitions if defined.
      (ALL_CFLAGS): Add ${DBUS_CFLAGS}.
      (obj): Add $(DBUS_OBJ).
      (LIBES): Add $(DBUS_LIBS).
      (dbusbind.o): New target.
      
      * dbusbind.c: New file.
      
      * emacs.c (main): Call syms_of_dbusbind when HAVE_DBUS is defined.
      
      * keyboard.c: All D-Bus related code is wrapped by "#ifdef HAVE_DBUS".
      (Qdbus_event) New Lisp symbol.
      (kbd_buffer_get_event, make_lispy_event): Handle DBUS_EVENT.
      (gobble_input): Call xd_read_queued_messages, reading D-Bus
      messages.
      (keys_of_keyboard ): Define dbus-event.
      
      * termhooks.h (event_kind): Add DBUS_EVENT when HAVE_DBUS is defined.
      033b73e2
  38. 09 Nov, 2007 1 commit
  39. 02 Oct, 2007 1 commit
    • Stefan Monnier's avatar
      * window.h (struct window): · d0fdb6da
      Stefan Monnier authored
      * window.c (struct save_window_data, struct saved_window):
      * termhooks.h (struct terminal):
      * process.h (struct Lisp_Process):
      * frame.h (struct frame):
      * buffer.h (struct buffer):
      * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
      (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
      The size field of (pseudo)vectors is now unsigned.
      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
      d0fdb6da