1. 01 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Avoid redundant Lisp_Object <-> struct frame conversions in font API. · fdb396e2
      Dmitry Antipov authored
      * font.h (struct font_driver): Change list, match, and list_family
      functions to accept struct frame * as first arg.
      * font.c (font_score, font_compare, font_sort_entities): Remove
      prototypes.
      (font_sort_entities, font_list_entities, font_select_entity):
      (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
      match font API change.
      * xfont.c (xfont_list, xfont_match, xfont_list_family):
      * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
      * ftxfont.c (ftxfont_list, ftxfont_match):
      * xftfont.c (xftfont_list, xftfont_match):
      * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
      * w32font.c (w32font_list, w32font_match, w32font_list):
      (w32font_list_internal, w32_font_match_internal): Likewise.
      * xfaces.c (Fx_family_fonts): Adjust user.
      fdb396e2
  2. 19 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Fix obscure porting bug with varargs functions. · 1396ac86
      Paul Eggert authored
      The code assumed that int is treated like ptrdiff_t in a vararg
      function, which is not a portable assumption.  There was a similar
      -- though these days less likely -- porting problem with various
      assumptions that pointers of different types all smell the same as
      far as vararg functions is conserved.  To make this problem less
      likely in the future, redo the API to use varargs functions.
      * alloc.c (make_save_value): Remove this vararg function.
      All uses changed to ...
      (make_save_int_int_int, make_save_obj_obj_obj_obj)
      (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
      New functions.
      (make_save_ptr): Rename from make_save_pointer, for consistency with
      the above.  Define only on platforms that need it.  All uses changed.
      1396ac86
  3. 16 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Prefer list1 (X) to Fcons (X, Qnil) when building lists. · 6c6f1994
      Paul Eggert authored
      This makes the code easier to read and the executable a bit smaller.
      Do not replace all calls to Fcons that happen to create lists,
      just calls that are intended to create lists.  For example, when
      creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
      rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
      Similarly for list2 through list5.
      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
      * bytecode.c (exec_byte_code):
      * callint.c (quotify_arg, Fcall_interactively):
      * callproc.c (Fcall_process, create_temp_file):
      * charset.c (load_charset_map_from_file)
      (Fdefine_charset_internal, init_charset):
      * coding.c (get_translation_table, detect_coding_system)
      (Fcheck_coding_systems_region)
      (Fset_terminal_coding_system_internal)
      (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
      * composite.c (update_compositions, Ffind_composition_internal):
      * dired.c (directory_files_internal, file_name_completion)
      (Fsystem_user...
      6c6f1994
  4. 18 Jun, 2013 1 commit
  5. 18 May, 2013 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to clang. · 31ff141c
      Paul Eggert authored
      * configure.ac (nw): Remove obsolescent warnings.
      These aren't needed for clang, or for gcc for that matter.
      (emacs_cv_clang): New var, which tests for clang.
      Omit warnings that clang is too picky about.
      (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this;
      needed for Ubuntu 13.04 + clang + --enable-gcc-warnings.
      * lib-src/etags.c: Omit unnecessary forward decls.
      (print_version, print_help): Declare _Noreturn.
      * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify.
      * src/bytecode.c (exec_byte_code):
      * src/regex.c:
      Redo diagnostic pragmas to pacify clang, too.
      * src/dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
      * src/editfns.c (Fencode_time):
      * src/fileio.c (file_accessible_directory_p):
      * src/font.c (font_unparse_xlfd):
      Use '&"string"[index]' instead of '"string" + (index)'.
      * src/undo.c (user_error): Remove; unused.
      31ff141c
  6. 27 Apr, 2013 1 commit
  7. 07 Apr, 2013 1 commit
    • Dmitry Antipov's avatar
      Get rid of some platform-specific functions examining window · 7452b7bd
      Dmitry Antipov authored
      system and its capabilities.  This is a partial rework of the
      2013-04-05 change.
      * lisp.h (have_menus_p): Remove prototype.  This function is
      replaced with platform-independent window_system_available.
      (check_window_system): Move to...
      * frame.h (decode_window_system_frame, window_system_available):
      ...here, add new prototypes.
      * frame.c (window_system_available, decode_window_system_frame):
      New functions.
      (check_window_system): Platform-independent now.
      * xterm.h (x_in_use): Remove declaration.
      (check_x_frame):
      * w32term.h (check_x_frame):
      * nsterm.h (check_x_frame): Remove prototypes.  This function
      is replaced with platform-independent decode_window_system_frame.
      * msdos.c (have_menus_p): Remove.
      * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
      Remove platform-specific functions.  Use check_window_system,
      decode_window_system_frame and check_ns_display_info where
      appropriate.  Minor style and comment tweaks.
      * w32fns.c (w32_in_use, check_window_system, have_menus_p)
      (check_x_frame): Likewise.
      * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
      Likewise.
      * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
      * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
      * xmenu.c, xselect.c: All related users changed.
      7452b7bd
  8. 05 Apr, 2013 1 commit
    • Dmitry Antipov's avatar
      Consistently use platform-specific function to detect window system. · 73931ad1
      Dmitry Antipov authored
      * lisp.h (check_window_system): New prototype.  This function is
      going to replace check_x, check_w32 and check_ns.
      (have_menus_p): Mention msdos.c in comment.
      * fontset.c (check_window_system_func): Remove.  Adjust all users.
      * fontset.h (check_window_system_func): Remove prototype.
      * nsterm.h (check_ns):
      * xterm.h (check_x):
      * w32term.h (check_w32): Likewise.
      * menu.c (Fx_popup_menu): Use check_window_system.
      * msdos.c (check_window_system): Define for MS-DOS.
      * nsfns.m (check_window_system): Define for NS.  Adjust all users.
      * w32fns.c (check_window_system): Likewise for MS-Windows.
      * xfns.c (check_window_system): Likewise for X.
      * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
      * xfaces.c, xmenu.c: Use check_window_system where appropriate.
      73931ad1
  9. 02 Apr, 2013 1 commit
    • Paul Eggert's avatar
      Prefer < to > in range checks such as 0 <= i && i < N. · 7216e43b
      Paul Eggert authored
      This makes it easier to visualize quantities on a number line.
      This patch doesn't apply to all such range checks,
      only to the range checks affected by the 2013-03-24 change.
      This patch reverts most of the 2013-03-24 change.
      * alloc.c (xpalloc, Fgarbage_collect):
      * ccl.c (ccl_driver, resolve_symbol_ccl_program):
      * character.c (string_escape_byte8):
      * charset.c (read_hex):
      * data.c (cons_to_unsigned):
      * dispnew.c (update_frame_1):
      * doc.c (Fsubstitute_command_keys):
      * doprnt.c (doprnt):
      * editfns.c (hi_time, decode_time_components):
      * fileio.c (file_offset):
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      * font.c (font_intern_prop):
      * frame.c (x_set_alpha):
      * gtkutil.c (get_utf8_string):
      * indent.c (check_display_width):
      * keymap.c (Fkey_description):
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
      * lread.c (read1):
      * minibuf.c (read_minibuf_noninteractive):
      * process.c (wait_reading_process_output):
      * search.c (Freplace_match):
      * window.c (get_phys_cursor_glyph):
      * xdisp.c (redisplay_internal):
      * xsmfns.c (smc_save_yourself_CB):
      Prefer < to > for range checks.
      * dispnew.c (sit_for): Don't mishandle NaNs.
      This fixes a bug introduced in the 2013-03-24 change.
      * editfns.c (decode_time_components): Don't hoist comparison.
      This fixes another bug introduced in the 2013-03-24 change.
      7216e43b
  10. 28 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * window.h (struct window): Replace hchild, vchild and buffer slots · e74aeda8
      Dmitry Antipov authored
      with the only contents slot.  This is possible because each valid
      window may have either the child window (in vertical or horizontal
      combination) or buffer to display (for the leaf window).  Using that,
      a lof of operations to traverse and/or change window hierarchies may
      be simplified.  New member horizontal is used to distinguish between
      horizontal and vertical combinations of internal windows.
      (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
      (WINDOW_VERTICAL_COMBINATION_P): New macros.
      (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
      * window.c (wset_hchild, wset_vchild): Remove.  Adjust all users.
      Use contents slot, not buffer, where appropriate.
      (wset_combination): New function.
      (wset_buffer): Add eassert.
      (Fframe_first_window): Simplify the loop reaching first window.
      (Fwindow_buffer): Use WINDOW_LEAF_P.
      (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
      (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
      (unshow_buffer): Convert initial debugging check to eassert.
      (replace_window, recombine_windows, Fdelete_other_windows_internal)
      (make_parent_window, window_resize_check, window_resize_apply)
      (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
      (Fset_window_configuration, delete_all_child_windows, save_window_save):
      Adjust to match struct window changes.
      (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
      (mark_window_cursors_off, count_windows, get_leaf_windows)
      (foreach_window_1): Simplify the loop.
      * alloc.c (mark_object): Do not check for the leaf window because
      internal windows has no glyph matrices anyway.
      * dispnew.c (clear_window_matrices, showing_window_margins_p)
      (allocate_matrices_for_window_redisplay, fake_current_matrices)
      (allocate_matrices_for_frame_redisplay, free_window_matrices)
      (build_frame_matrix_from_window_tree, mirror_make_current)
      (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
      (update_window_tree, set_window_update_flags): Simplify the loop.
      (sync_window_with_frame_matrix_rows): Enforce live window.
      Use contents slot, not buffer, where appropriate.
      * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
      and WINDOW_HORIZONTAL_COMBINATION_P.
      (make_frame_visible_1): Simplify the loop.
      Use contents slot, not buffer, where appropriate.
      * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
      (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
      (expose_window_tree): Likewise.
      Use contents slot, not buffer, where appropriate.
      * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
      to avoid deleted windows.  Use contents slot instead of buffer.
      * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
      * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
      * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
      * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
      e74aeda8
  11. 24 Mar, 2013 1 commit
    • Andreas Schwab's avatar
      Reorder conditions that are written backwards · 908589fd
      Andreas Schwab authored
      * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
      written backwards.
      * blockinput.h (input_blocked_p): Likewise.
      * bytecode.c (exec_byte_code): Likewise.
      * callproc.c (call_process_kill, call_process_cleanup)
      (Fcall_process): Likewise.
      * ccl.c (ccl_driver, resolve_symbol_ccl_program)
      (Fccl_execute_on_string): Likewise.
      * character.c (string_escape_byte8): Likewise.
      * charset.c (read_hex): Likewise.
      * cm.c (calccost): Likewise.
      * data.c (cons_to_unsigned): Likewise.
      * dired.c (directory_files_internal, file_name_completion):
      Likewise.
      * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
      (sit_for): Likewise.
      * doc.c (Fsubstitute_command_keys): Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
      * emacsgtkfixed.c: Likewise.
      * fileio.c (file_offset, Fwrite_region): Likewise.
      * floatfns.c (Fexpt, fmod_float): Likewise.
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      Likewise.
      * font.c (font_intern_prop): Likewise.
      * frame.c (x_set_alpha): Likewise.
      * gtkutil.c (get_utf8_string): Likewise.
      * indent.c (check_display_width): Likewise.
      * intervals.c (create_root_interval, rotate_right, rotate_left)
      (split_interval_right, split_interval_left)
      (adjust_intervals_for_insertion, delete_node)
      (interval_deletion_adjustment, adjust_intervals_for_deletion)
      (merge_interval_right, merge_interval_left, copy_intervals)
      (set_intervals_multibyte_1): Likewise.
      * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
      * keymap.c (Fkey_description): Likewise.
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
      * lread.c (openp, read_integer, read1, string_to_number):
      Likewise.
      * menu.c (ensure_menu_items): Likewise.
      * minibuf.c (read_minibuf_noninteractive): Likewise.
      * print.c (printchar, strout): Likewise.
      * process.c (create_process, Faccept_process_output)
      (wait_reading_process_output, read_process_output, send_process)
      (wait_reading_process_output): Likewise.
      * profiler.c (make_log, handle_profiler_signal): Likewise.
      * regex.c (re_exec): Likewise.
      * regex.h: Likewise.
      * search.c (looking_at_1, Freplace_match): Likewise.
      * sysdep.c (get_child_status, procfs_ttyname)
      (procfs_get_total_memory): Likewise.
      * systime.h (EMACS_TIME_VALID_P): Likewise.
      * term.c (dissociate_if_controlling_tty): Likewise.
      * window.c (get_phys_cursor_glyph): Likewise.
      * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
      Likewise.
      * xfns.c (Fx_window_property): Likewise.
      * xmenu.c (set_frame_menubar): Likewise.
      * xselect.c (x_get_window_property, x_handle_dnd_message):
      Likewise.
      * xsmfns.c (smc_save_yourself_CB): Likewise.
      * xterm.c (x_scroll_bar_set_handle): Likewise.
      908589fd
  12. 20 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * frame.h (struct frame): Drop resx and resy because the same data is · 42143acd
      Dmitry Antipov authored
      available from window system-specific output context.  Adjust users.
      (default_pixesls_per_inch_x, default_pixesls_per_inch_y): New
      functions to provide defaults when no window system available.
      (FRAME_RES_X, FRAME_RES_Y): New macros.
      (NUMVAL): Moved from xdisp.c.
      * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
      (Ffont_face_attributes, Fopen_font):
      * image.c (gs_load):
      * w32font.c (fill_in_logfont):
      * xdisp.c (calc_pixel_width_or_height):
      * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
      * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
      42143acd
  13. 05 Mar, 2013 1 commit
  14. 04 Mar, 2013 1 commit
  15. 13 Feb, 2013 1 commit
  16. 12 Feb, 2013 1 commit
  17. 08 Feb, 2013 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (make_uninit_vector): New function. · 25721f5b
      Dmitry Antipov authored
      * alloc.c (Fvector, Fmake_byte_code):
      * ccl.c (Fregister_ccl_program):
      * charset.c (Fdefine_charset_internal, define_charset_internal):
      * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
      * composite.c (syms_of_composite):
      * font.c (Fquery_font, Ffont_info, syms_of_font):
      * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
      * ftfont.c (ftfont_shape_by_flt):
      * indent.c (recompute_width_table):
      * nsselect.m (clean_local_selection_data):
      * syntax.c (init_syntax_once):
      * w32unsubscribe.c (uniscribe_shape):
      * window.c (Fcurrent_window_configuration):
      * xfaces.c (Fx_family_fonts):
      * xselect.c (selection_data_to_lisp_data): Use it.
      25721f5b
  18. 25 Jan, 2013 1 commit
  19. 17 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (toplevel): Add comment about using Lisp_Save_Value · 468afbac
      Dmitry Antipov authored
      objects, related functions and macros.
      (make_save_value): Adjust prototype.
      (make_save_pointer): New prototype.
      (SAFE_NALLOCA): Fix indentation.  Use make_save_pointer.
      (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
      * alloc.c (format_save_value): Rename to make_save_value.
      (make_save_pointer): New function.
      (record_xmalloc): Use make_save_pointer.
      * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
      * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
      Change users of make_save_value to make_save_pointer.
      Likewise for format_save_value and make_save_value.
      468afbac
  20. 15 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      * src/lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow extraction · 2b30549c
      Dmitry Antipov authored
      from any Lisp_Save_Value slot.  Add type checking.
      * src/alloc.c, src/dired.c, src/editfns.c, src/fileio.c, src/ftfont.c:
      * src/gtkutil.c, src/keymap.c, src/lread.c, src/nsterm.h, src/nsmenu.c:
      * src/xfns.c, src/xmenu.c, src/xselect.c: All users changed.
      * admin/coccinelle/xsave.cocci: Semantic patch to adjust users of
      XSAVE_POINTER and XSAVE_INTEGER macros.
      2b30549c
  21. 14 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      Make Lisp_Save_Value more versatile storage for up to four objects. · 73ebd38f
      Dmitry Antipov authored
      * lisp.h (toplevel): Enumeration to describe types of saved objects.
      (struct Lisp_Save_Value): New layout.  Adjust comments.
      (XSAVE_POINTER): New macro.
      (XSAVE_INTEGER): Likewise.
      (allocate_misc): Add prototype.
      (free_misc): Likewise.
      * alloc.c (allocate_misc): Now global.
      (free_misc): Likewise.  Adjust comment.
      (make_save_value): Use new Lisp_Save_Value layout.  Adjust comment.
      (free_save_value): Likewise.
      (mark_object): Likewise.
      * editfns.c (save_excursion_save): Pack everything within
      Lisp_Save_Value and so avoid xmalloc.
      (save_excursion_restore): Adjust to match new layout.  Use free_misc
      because we do not allocate extra memory any more.  Add eassert.
      * print.c (print_object): New code to print Lisp_Save_Value.  Do not
      rely on valid_lisp_object_p if !GC_MARK_STACK.  Adjust comments.
      * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
      * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
      Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
      73ebd38f
  22. 02 Jan, 2013 1 commit
    • Paul Eggert's avatar
      Simplify via eabs. · 71376d4b
      Paul Eggert authored
      * dired.c (file_name_completion):
      * doc.c (get_doc_string):
      * floatfns.c (round2):
      * font.c (font_score, font_delete_unmatched):
      * fringe.c (compute_fringe_widths):
      * lread.c (read_list):
      * minibuf.c (Ftry_completion):
      * term.c (tty_ins_del_lines):
      * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
      Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
      71376d4b
  23. 01 Jan, 2013 1 commit
  24. 18 Nov, 2012 1 commit
  25. 13 Nov, 2012 1 commit
  26. 06 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Widely used frame validity and checking functions. · d9f07150
      Dmitry Antipov authored
      * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
      * frame.c (decode_live_frame, decode_any_frame): New functions.
      (delete_frame, Fredirect_frame_focus, Fframe_parameters)
      (Fframe_parameter, Fframe_char_height, Fframe_char_width)
      (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
      (Fframe_pointer_visible_p): Use decode_any_frame.
      (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
      (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
      (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
      (Fframe_focus): Likewise.  Allow zero number of arguments.
      Adjust docstring.
      (frame_buffer_list, frame_buffer_predicate): Remove.
      * lisp.h (frame_buffer_predicate): Remove prototype.
      * buffer.c (Fother_buffer): Use decode_any_frame.
      * xdisp.c (Ftool_bar_lines_needed): Likewise.
      * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
      * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
      (Fclose_font, Ffont_info): Use decode_live_frame.
      * fontset.c (check_fontset_name): Likewise.
      * terminal.c (Fframe_terminal): Likewise.
      * w32fns.c (check_x_frame): Likewise.
      * window.c (Fminibuffer_window, Fwindow_at)
      (Fcurrent_window_configuration): Likewise.
      (Frun_window_configuration_change_hook, Fwindow_resize_apply):
      Likewise.  Allow zero number of arguments.  Adjust docstring.
      * dispnew.c (Fredraw_frame): Likewise.
      * xfaces.c (frame_or_selected_frame): Remove.
      (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
      (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
      (Fframe_face_alist): Use decode_live_frame.
      * xfns.c (check_x_frame): Likewise.
      d9f07150
  27. 03 Nov, 2012 1 commit
  28. 02 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Window-related stuff cleanup here and there. · b9e9df47
      Dmitry Antipov authored
      * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
      Use decode_any_window.
      * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
      * xdisp.c (Fformat_mode_line): Likewise.
      * font.c (Ffont_at): Use decode_live_window.
      * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
      * window.c (decode_next_window_args): Likewise.
      (decode_any_window): Remove static.
      * window.h (decode_any_window): Add prototype.
      * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
      * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
      respectively.
      b9e9df47
  29. 30 Oct, 2012 1 commit
  30. 23 Oct, 2012 1 commit
  31. 19 Oct, 2012 1 commit
  32. 17 Sep, 2012 1 commit
    • Daniel Colascione's avatar
      Implement cygw32 · 0fda9b75
      Daniel Colascione authored
      Here, we use the generic window-system configuration system we just
      implemented to support the w32 window-system in the mainline build
      under Cygwin.  (Previously, the w32 window system could only be
      compiled as part of the NT-native Emacs build process.)
      
      The changes in this patch need to be applied atomically in order to
      avoid breaking Emacs.  The changes include:
      
        - Changes throughout the Lisp and C code to not assume that
            NT Emacs and the w32 window system are synonymous.
      
        - Wiring up the regular select(2) event loop to Windows messages
      
        - Cleaning up the w32 drag-and-drop receiving code.
      
        - Exposing Cygwin path conversion functions to elisp.
      
        - Unicode file dialog support when compiling for Cygwin.
      
        - Splitting the w32 term lisp initialization code into code
          applicable to any w32 window-system and code specific to
          system-type windows-nt.
      
        - Integrating the old and new w32 code into the build system.
      0fda9b75
  33. 16 Sep, 2012 2 commits
  34. 15 Sep, 2012 2 commits
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
    • Kenichi Handa's avatar
      font.c (Ffont_shape_gstring): Don't adjust grapheme cluster here, but just... · ea964864
      Kenichi Handa authored
      font.c (Ffont_shape_gstring): Don't adjust grapheme cluster here, but just check the validity of glyphs in the glyph-string.
      ea964864
  35. 06 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Use bool for booleans in font-related modules. · a864ef14
      Paul Eggert authored
      * font.c (font_intern_prop, font_style_to_value)
      (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
      (generate_otf_features, font_check_otf_features, font_check_otf)
      (font_match_p, font_list_entities, font_at):
      * fontset.c (fontset_id_valid_p, reorder_font_vector
      (fontset_find_font, Fset_fontset_font)
      (face_suitable_for_char_p) [0]:
      * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
      (ftfont_open, ftfont_text_extents, ftfont_check_otf):
      (m17n_flt_initialized, ftfont_shape_by_flt):
      * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
      * nsfont.m (nsfont_draw):
      * w32font.c (w32font_draw):
      * w32term.c (x_draw_glyphless_glyph_string_foreground):
      Use bool for booleans.
      * font.h: Adjust to above API changes.
      (struct font, struct font_driver, struct font_driver_list):
      Use bool for booleans.
      (struct font): Remove useless member encoding_type.
      All users removed.
      * fontset.c, xftfont.c: Omit unnecessary static decls.
      a864ef14
  36. 01 Sep, 2012 1 commit
    • Daniel Colascione's avatar
      Refactor window-system configuration · 17a2cbbd
      Daniel Colascione authored
      This change streamlines the window system selection code in
      configure.in and moves many common function declarations from
      window-specific headers to frame.h.  It introduces a new TERM_HEADER
      macro in config.h: we set this macro to the right header to use for
      the window system for which we're compiling Emacs and have source
      files include it indirectly.  This way, we don't have to teach every
      file about every window system.
      17a2cbbd
  37. 16 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Use ASCII tests for character types. · 620f13b0
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add c-ctype.
      * lwlib/lwlib-Xaw.c, lwlib/lwlib.c, lwlib/xlwmenu.c:
      Don't include <ctype.h>; no longer needed.
      * lwlib/lwlib-Xaw.c (openFont):
      * lwlib/xlwmenu.c (openXftFont): Test just for ASCII digits.
      * src/category.c, src/dispnew.c, src/doprnt.c, src/editfns.c, src/syntax.c
      * src/term.c, src/xfns.c, src/xterm.c:
      Don't include <ctype.h>; was not needed.
      * src/charset.c, src/doc.c, src/fileio.c, src/font.c, src/frame.c:
      * src/gtkutil.c, src/image.c, src/sysdep.c, src/xfaces.c:
      Include <c-ctype.h> instead of <ctype.h>.
      * src/nsterm.m: Include <c-ctype.h>.
      * src/charset.c (read_hex):
      * src/doc.c (Fsnarf_documentation):
      * src/fileio.c (IS_DRIVE) [WINDOWSNT]:
      (DRIVE_LETTER) [DOS_NT]:
      (Ffile_name_directory, Fexpand_file_name)
      (Fsubstitute_in_file_name):
      * src/font.c (font_parse_xlfd, font_parse_fcname):
      * src/frame.c (x_set_font_backend):
      * src/gtkutil.c (xg_get_font):
      * src/image.c (xbm_scan, xpm_scan, pbm_scan_number):
      * src/nsimage.m (hexchar):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/sysdep.c (system_process_attributes):
      * src/xfaces.c (hash_string_case_insensitive):
      Use C-locale tests instead of locale-specific tests for character
      types, since we want the ASCII interpretation here, not the
      interpretation suitable for whatever happens to be the current locale.
      620f13b0
  38. 15 Aug, 2012 1 commit