1. 01 Aug, 2013 2 commits
  2. 30 Jul, 2013 1 commit
    • Dmitry Antipov's avatar
      * fringe.c (draw_window_fringes, update_window_fringes) · d7e6881a
      Dmitry Antipov authored
      (compute_fringe_widths):
      * w32term.c (x_draw_glyph_string):
      * window.c (candidate_window_p, Frecenter):
      * xfaces.c (realize_basic_faces, realize_default_face)
      (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
      (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
      * xfns.c (x_set_cursor_color, xic_free_xfontset):
      * xmenu.c (Fx_menu_bar_open_internal):
      * xselect.c (x_reply_selection_request, Fx_get_atom_name):
      * xsettings.c (xft_settings_event):
      * xterm.c (x_draw_glyph_string, x_had_errors_p):
      Use bool for booleans.  Adjust style and comments where
      appropriate.
      * dispextern.h (draw_window_fringes, update_window_fringes)
      (compute_fringe_widths):
      * xterm.h (x_had_errors_p): Adjust prototype.
      d7e6881a
  3. 26 Jul, 2013 1 commit
    • Stefan Monnier's avatar
      Add support for lexical variables to the debugger's `e' command. · 56ea7291
      Stefan Monnier authored
      * lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-*
      vars, except for debugger-outer-match-data.
      (debugger-frame-number): Move check for "on a function call" from
      callers into it.  Add `skip-base' argument.
      (debugger-frame, debugger-frame-clear): Simplify accordingly.
      (debugger-env-macro): Only reset the state stored in non-variables,
      i.e. current-buffer and match-data.
      (debugger-eval-expression): Rewrite using backtrace-eval.
      * lisp/subr.el (internal--called-interactively-p--get-frame): Remove.
      (called-interactively-p):
      * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new
      `base' arg of backtrace-frame instead.
      * src/eval.c (set_specpdl_old_value): New function.
      (unbind_to): Minor simplification.
      (get_backtrace_frame): New function.
      (Fbacktrace_frame): Use it.  Add `base' argument.
      (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
      (syms_of_eval): Export backtrace-eval.
      * src/xterm.c (x_focus_changed): Simplify.
      56ea7291
  4. 16 Jul, 2013 2 commits
    • Jan Djärv's avatar
      Stop cursor blink after blink-cursor-blinks (10), stop timers when not blinking. · 18c26d81
      Jan Djärv authored
      * etc/NEWS: Document blink-cursor-blinks and blink timers stopped.
      
      * lisp/frame.el (blink-cursor-blinks): New defcustom.
      (blink-cursor-blinks-done): New defvar.
      (blink-cursor-start): Set blink-cursor-blinks-done to 1.
      (blink-cursor-timer-function): Check if number of blinks has been
      done on X and NS.
      (blink-cursor-suspend, blink-cursor-check): New defuns.
      
      * src/frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
      (Fhandle_switch_frame): Call Fhandle_focus_in.
      (syms_of_frame): defsubr handle-focus-in/out.
      
      * src/keyboard.c (Qfocus_in, Qfocus_out): New static objects.
      (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
      (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
      switch frame event is made.  Check ! NILP (event->arg) if X11 (moved
      from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
      and there is a focused frame.
      (head_table): Add focus-in and focus-out.
      (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
      bind to handle-focus-in/out.
      
      * src/nsterm.m (windowDidResignKey): If this is the focused frame, generate
      FOCUS_OUT_EVENT.
      
      * src/termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
      
      * src/xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
      Set event->arg to Qt if switch-event shall be generated.
      Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
      18c26d81
    • 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_users):
      * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
      * doc.c (Fsnarf_documentation):
      * editfns.c (Fmessage_box):
      * emacs.c (main):
      * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
      (Feval, eval_sub, Ffuncall, apply_lambda):
      * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
      (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
      (Fset_file_times, Finsert_file_contents)
      (Fchoose_write_coding_system, Fwrite_region):
      * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
      * font.c (font_registry_charsets, font_parse_fcname)
      (font_prepare_cache, font_update_drivers, Flist_fonts):
      * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
      * frame.c (make_frame, Fmake_terminal_frame)
      (x_set_frame_parameters, x_report_frame_params)
      (x_default_parameter, Fx_parse_geometry):
      * ftfont.c (syms_of_ftfont):
      * image.c (gif_load):
      * keyboard.c (command_loop_1):
      * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
      (Fcopy_keymap, append_key, Fcurrent_active_maps)
      (Fminor_mode_key_binding, accessible_keymaps_1)
      (Faccessible_keymaps, Fwhere_is_internal):
      * lread.c (read_emacs_mule_char):
      * menu.c (find_and_return_menu_selection):
      * minibuf.c (get_minibuffer):
      * nsfns.m (Fns_perform_service):
      * nsfont.m (ns_script_to_charset):
      * nsmenu.m (ns_popup_dialog):
      * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
      (Fx_own_selection_internal):
      * nsterm.m (append2):
      * print.c (Fredirect_debugging_output)
      (print_prune_string_charset):
      * process.c (Fdelete_process, Fprocess_contact)
      (Fformat_network_address, set_socket_option)
      (read_and_dispose_of_process_output, write_queue_push)
      (send_process, exec_sentinel):
      * sound.c (Fplay_sound_internal):
      * textprop.c (validate_plist, add_properties)
      (Fput_text_property, Fadd_face_text_property)
      (copy_text_properties, text_property_list, syms_of_textprop):
      * unexaix.c (report_error):
      * unexcoff.c (report_error):
      * unexsol.c (unexec):
      * xdisp.c (redisplay_tool_bar, store_mode_line_string)
      (Fformat_mode_line, syms_of_xdisp):
      * xfaces.c (set_font_frame_param)
      (Finternal_lisp_face_attribute_values)
      (Finternal_merge_in_global_face, syms_of_xfaces):
      * xfns.c (x_default_scroll_bar_color_parameter)
      (x_default_font_parameter, x_create_tip_frame):
      * xfont.c (xfont_supported_scripts):
      * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
      (menu_help_callback, xmenu_show):
      * xml.c (make_dom):
      * xterm.c (set_wm_state):
      Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
      and similarly for list2 through list5.
      6c6f1994
  5. 10 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Port to C89. · 29abe551
      Paul Eggert authored
      * lib-src/ebrowse.c (USAGE): Remove macro with too-long string literal ...
      (usage_message): ... and replace it with this new static constant
      containing multiple literals.  All uses changed.
      * lib-src/emacsclient.c (print_help_and_exit):
      Rewrite to avoid string literals longer than the C89 limits.
      (start_daemon_and_retry_set_socket):
      Rewrite to avoid non-constant array initializer.
      * lib-src/make-docfile.c (enum global_type): Omit trailing comma.
      * src/bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
      (B__dummy__): New dummy symbol, to pacify C89.
      * src/dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
      they can't grok varargs macros.
      * src/dispnew.c (add_window_display_history)
      (add_frame_display_history):
      * src/print.c (print_object):
      * src/xdisp.c (debug_method_add):
      Use %p printf format only for void pointers.
      * src/emacs.c (usage_message): New constant, replacing ...
      (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
      (main): Adjust to usage reorg.
      * src/fns.c (syms_of_fns):
      * src/profiler.c (syms_of_profiler):
      Don't use non-constant struct initializers.
      * src/gnutls.h (gnutls_initstage_t):
      * src/lisp.h (enum Lisp_Fwd_Type):
      * src/lread.c (lisp_file_lexically_bound_p):
      * src/xsettings.c (anonymous enum):
      Remove trailing comma.
      * src/xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
      * src/lisp.h (ENUM_BF): Use unsigned if pedantic.
      (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
      (DEFUN): Use it.
      * src/regex.c (const_re_char): New type, to pacify strict C89.
      All uses of 'const re_char' replaced to use it.
      * src/regex.h (_Restrict_): Rename from __restrict, to avoid clash
      with glibc when strict C89.  This change is imported from gnulib.
      All uses changed.
      (_Restrict_arr_): Rename from __restrict_arr, similarly.
      * src/sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
      Omit GNU_LINUX implementation, since it requires long long.
      * src/xterm.c (x_draw_underwave):
      Do not assume the traditional order of struct's members.
      (x_term_init): Rewrite to avoid the need for non-constant structure
      initializers.
      29abe551
  6. 05 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Remove duplicate #include directives. · 47ba6d43
      Paul Eggert authored
      * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
      * xfaces.c:
      Don't include stdio.h twice.
      * buffer.c [USE_MMAP_FOR_BUFFERS]:
      Don't include sys/types.h or stdio.h twice.
      * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
      * lread.c: Don't include coding.h twice.
      * nsfont.m: Don't include frame.h twice.
      * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
      * ralloc.c: Don't include <unistd.h> twice.
      * xdisp.c: Don't include font.h twice.
      * xterm.c: Don't include fontset.h twice.
      * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
      47ba6d43
  7. 30 Jun, 2013 1 commit
  8. 05 Jun, 2013 1 commit
    • Paul Eggert's avatar
      Chain glib's SIGCHLD handler from Emacs's (Bug#14474). · f019a684
      Paul Eggert authored
      * process.c (dummy_handler): New function.
      (lib_child_handler): New static var.
      (handle_child_signal): Invoke it.
      (catch_child_signal): If a library has set up a signal handler,
      save it into lib_child_handler.
      (init_process_emacs): If using glib and not on Windows, tickle glib's
      child-handling code so that it initializes its private SIGCHLD handler.
      * syssignal.h (SA_SIGINFO): Default to 0.
      * xterm.c (x_term_init): Remove D-bus hack that I installed on May
      31; it should no longer be needed now.
      f019a684
  9. 31 May, 2013 1 commit
  10. 09 May, 2013 1 commit
  11. 08 May, 2013 1 commit
  12. 07 May, 2013 1 commit
  13. 25 Mar, 2013 1 commit
  14. 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
  15. 07 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (list2i, list3i): New functions. · 3de717bd
      Dmitry Antipov authored
      (list4i): Move from window.c and make LISP_INLINE.
      * editfns.c (make_lisp_time):
      * fns.c (Flocale_info):
      * keyboard.c (parse_modifiers):
      * xterm.c (x_ewmh_activate_frame): Use list2i.
      * instel.c (signal_after_change):
      * nsfns.m (Fx_server_version, Fxw_color_values):
      * w32fns.c (Fxw_color_values, Fx_server_version):
      * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
      * fileio.c (Fvisited_file_modtime):
      * nsfns.m (Fns_display_usable_bounds):
      * w32.c (ltime): Use list4i.
      3de717bd
  16. 17 Feb, 2013 1 commit
  17. 24 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop async_visible and async_iconified fields of struct frame. · edfa7fa0
      Dmitry Antipov authored
      This is possible because async input is gone; for details, see
      http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
      * frame.h (struct frame): Remove async_visible and async_iconified
      members, convert garbaged to unsigned bitfield.  Adjust comments.
      (FRAME_SAMPLE_VISIBILITY): Remove.  Adjust all users.
      (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
      * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
      Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
      FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
      * w32term.c: Ditto.
      (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
      properly.  Likewise for obscured.
      * xterm.c: Ditto.
      (handle_one_xevent): Save visible state go generate ICONIFY_EVENT
      properly.
      * nsterm.m: Ditto.
      (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
      edfa7fa0
  18. 11 Jan, 2013 2 commits
  19. 04 Jan, 2013 2 commits
  20. 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
  21. 01 Jan, 2013 1 commit
  22. 12 Dec, 2012 1 commit
  23. 08 Dec, 2012 1 commit
    • Paul Eggert's avatar
      Use putenv+unsetenv instead of modifying environ directly. · 5745a7df
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
      * lib/putenv.c, lib/unsetenv.c, m4/putenv.m4, m4/setenv.m4:
      New files, copied automatically from gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * src/alloc.c (xputenv): New function.
      * src/dbusbind.c (Fdbus_init_bus):
      * src/emacs.c (main):
      * src/xterm.c (x_term_init):
      Use xputenv instead of setenv or putenv, to detect memory exhaustion.
      * src/editfns.c (initial_tz): Move static var decl up.
      (tzvalbuf_in_environ): New static var.
      (init_editfns):	Initialize these two static vars.
      (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
      Save old TZ value on stack, if it's small.
      (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
      instead, use xputenv+unsetenv to set and restore TZ.
      (environbuf): Remove static var.  All uses removed.
      (Fset_time_zone_rule): Do not save TZ and environ;
      no longer needed here.
      (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
      Move to inside set_time_zone_rule; they don't need file scope any more.
      (set_time_zone_rule): Maintain the TZ=value string separately.
      (syms_of_editfns): Don't initialize initial_tz;
      init_editfns now does it.
      * src/emacs.c (dump_tz) [HAVE_TZSET]: Now const.
      * src/lisp.h (xputenv): New decl.
      
      Fixes: debbugs:13070
      5745a7df
  24. 04 Dec, 2012 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state · 350f51ad
      Dmitry Antipov authored
      member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
      and mouse_face_hidden members to a bitfields.
      * frame.h (struct frame): Remove set-but-not-used space_width member.
      (FRAME_SPACE_WIDTH): Remove.
      * nsterm.m, w32term.c, xterm.c: Adjust users.
      * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
      member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
      costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
      members to a bitfields.
      350f51ad
  25. 01 Dec, 2012 2 commits
  26. 22 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      * alloc.c (Fgarbage_collect): Unblock input after clearing · 5c747675
      Dmitry Antipov authored
      gc_in_progress to avoid note_mouse_highlight glitch with GC.
      * frame.h (FRAME_MOUSE_UPDATE): New macro.
      * msdos.c (IT_frame_up_to_date): Use it here...
      * w32term.c (w32_frame_up_to_date): ...here...
      * xterm.c (XTframe_up_to_date): ...and here...
      * nsterm.m (ns_frame_up_to_date): ...but not here.
      * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
      Adjust users.
      * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
      Do not check whether GC is in progress.
      5c747675
  27. 12 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Simplify by using FOR_EACH_FRAME here and there. · 5b04e9f9
      Dmitry Antipov authored
      * frame.c (next_frame, prev_frame, other_visible_frames)
      (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
      * w32term.c (x_window_to_scroll_bar): Likewise.
      * window.c (window_list): Likewise.
      * xdisp.c (x_consider_frame_title): Likewise.
      * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
      * xfns.c (x_window_to_frame, x_any_window_to_frame)
      (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
      * xmenu.c (menubar_id_to_frame): Likewise.
      * xselect.c (frame_for_x_selection): Likewise.
      * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
      (x_window_to_menu_bar): Likewise.
      * w32fns.c (x_window_to_frame): Likewise.  Adjust comment.
      5b04e9f9
  28. 08 Nov, 2012 1 commit
    • Stefan Monnier's avatar
      Use ad-hoc comparison function for the profiler's hash-tables. · b7432bb2
      Stefan Monnier authored
      * src/profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
      (make_log): Use them.
      (handle_profiler_signal): Don't inhibit quit any longer since we don't
      call Fequal any more.
      (Ffunction_equal): New function.
      (cmpfn_profiler, hashfn_profiler): New functions.
      (syms_of_profiler): Initialize them.
      * src/lisp.h (struct hash_table_test): New struct.
      (struct Lisp_Hash_Table): Use it.
      * src/alloc.c (mark_object): Mark hash_table_test fields of hash tables.
      * src/fns.c (make_hash_table): Take a struct to describe the test.
      (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
      (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
      (hash_lookup, hash_remove_from_table): Move assertion checking of
      hashfn result here.  Check hash-equality before calling cmpfn.
      (Fmake_hash_table): Adjust call to make_hash_table.
      (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
      (syms_of_fns): Initialize them.
      * src/emacs.c (main): Move syms_of_fns earlier.
      * src/xterm.c (syms_of_xterm):
      * src/category.c (hash_get_category_set): Adjust call to make_hash_table.
      * src/print.c (print_object): Adjust to new hash-table struct.
      * src/composite.c (composition_gstring_put_cache): Adjust to new hashfn.
      b7432bb2
  29. 02 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Remove pad from struct input_event. · 2b371ff7
      Dmitry Antipov authored
      * termhooks.h (struct input_event): Remove padding field.
      Adjust comment.
      * keyboard.c (event_to_kboard): Simplify because frame_or_window
      member is never cons for a long time.  Adjust comment.
      (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
      SELECTION_CLEAR_EVENT has no Lisp_Objects to mark.  Add comment.
      * xterm.c (handle_one_xevent): Do not initialize frame_or_window
      field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
      2b371ff7
  30. 31 Oct, 2012 1 commit
  31. 21 Oct, 2012 1 commit
  32. 01 Oct, 2012 1 commit
    • Paul Eggert's avatar
      Prefer plain 'static' to 'static inline'. · b0ab8123
      Paul Eggert authored
      With static functions, modern compilers inline pretty well by
      themselves; advice from programmers often hurts as much as it helps.
      On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
      this change shrinks the text size of the Emacs executable by 1.1%
      without affecting CPU significantly in my benchmark.
      * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
      (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
      (mark_maybe_object, mark_maybe_pointer, bounded_number):
      * buffer.c (bset_abbrev_mode, bset_abbrev_table)
      (bset_auto_fill_function, bset_auto_save_file_format)
      (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
      (bset_bidi_display_reordering, bset_buffer_file_coding_system)
      (bset_cache_long_line_scans, bset_case_fold_search)
      (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
      (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
      (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
      (bset_fringe_indicator_alist, bset_fringes_outside_margins)
      (bset_header_line_format, bset_indicate_buffer_boundaries)
      (bset_indicate_empty_lines, bset_invisibility_spec)
      (bset_left_fringe_width, bset_major_mode, bset_mark)
      (bset_minor_modes, bset_mode_line_format, bset_mode_name)
      (bset_name, bset_overwrite_mode, bset_pt_marker)
      (bset_right_fringe_width, bset_save_length)
      (bset_scroll_bar_width, bset_scroll_down_aggressively)
      (bset_scroll_up_aggressively, bset_selective_display)
      (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
      (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
      (set_buffer_overlays_after):
      * category.c (bset_category_table):
      * charset.c (read_hex):
      * coding.c (produce_composition, produce_charset)
      (handle_composition_annotation, handle_charset_annotation)
      (char_encodable_p):
      * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
      (assign_row, set_frame_matrix_frame, make_current)
      (add_row_entry):
      * eval.c (set_specpdl_symbol, set_specpdl_old_value):
      * fns.c (maybe_resize_hash_table):
      * frame.c (fset_buffer_predicate, fset_minibuffer_window):
      * gmalloc.c (register_heapinfo):
      * image.c (lookup_image_type):
      * intervals.c (set_interval_object, set_interval_left)
      (set_interval_right, copy_interval_parent, rotate_right)
      (rotate_left, balance_possible_root_interval):
      * keyboard.c (kset_echo_string, kset_kbd_queue)
      (kset_keyboard_translate_table, kset_last_prefix_arg)
      (kset_last_repeatable_command, kset_local_function_key_map)
      (kset_overriding_terminal_local_map, kset_real_last_command)
      (kset_system_key_syms, clear_event, set_prop):
      * lread.c (digit_to_number):
      * marker.c (attach_marker, live_buffer, set_marker_internal):
      * nsterm.m (ns_compute_glyph_string_overhangs):
      * process.c (pset_buffer, pset_command)
      (pset_decode_coding_system, pset_decoding_buf)
      (pset_encode_coding_system, pset_encoding_buf, pset_filter)
      (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
      (pset_status, pset_tty_name, pset_type, pset_write_queue):
      * syntax.c (bset_syntax_table, dec_bytepos):
      * terminal.c (tset_param_alist):
      * textprop.c (interval_has_some_properties)
      (interval_has_some_properties_list):
      * window.c (wset_combination_limit, wset_dedicated)
      (wset_display_table, wset_hchild, wset_left_fringe_width)
      (wset_left_margin_cols, wset_new_normal, wset_new_total)
      (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
      (wset_right_fringe_width, wset_right_margin_cols)
      (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
      (wset_vertical_scroll_bar_type, wset_window_parameters):
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing)
      (window_box_edges, run_window_scroll_functions)
      (append_glyph_string_lists, prepend_glyph_string_lists)
      (append_glyph_string, set_glyph_string_background_width)
      (append_glyph, append_composite_glyph)
      (take_vertical_position_into_account):
      * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
      (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
      (lface_hash, lface_same_font_attributes_p, lookup_face):
      * xml.c (libxml2_loaded_p):
      * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
      (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
      Now 'static', not 'static inline'.
      
      Fixes: debbugs:12541
      b0ab8123
  33. 24 Sep, 2012 1 commit
    • Paul Eggert's avatar
      image.c, indent.c: Use bool for booleans. · 578098f3
      Paul Eggert authored
      * dispextern.h (struct image_type): Members valid_p, load, init
      now return bool, not int.  All uses changed.
      * image.c: Omit unnecessary static decls.
      (x_create_bitmap_mask, x_build_heuristic_mask):
      Return void, not int, since callers don't care about the return value.
      (x_create_bitmap_mask, define_image_type, valid_image_p)
      (struct image_keyword, parse_image_spec, image_spec_value)
      (check_image_size, image_background)
      (image_background_transparent, x_clear_image_1)
      (postprocess_image, lookup_image, x_check_image_size)
      (x_create_x_image_and_pixmap, xbm_image_p)
      (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
      (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
      (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
      (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
      (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
      (png_image_p, init_png_functions, png_load_body, png_load)
      (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
      (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
      (init_gif_functions, gif_load, imagemagick_image_p)
      (imagemagick_load_image, imagemagick_load, svg_image_p)
      (init_svg_functions, svg_load, svg_load_image, gs_image_p)
      (gs_load):
      * nsimage.m (ns_load_image):
      * nsterm.m (ns_defined_color):
      * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
      * xfns.c (x_defined_color):
      * xterm.c (x_alloc_lighter_color_for_widget)
      (x_alloc_nearest_color_1, x_alloc_nearest_color)
      (x_alloc_lighter_color):
      * indent.c (disptab_matches_widthtab, current_column)
      (scan_for_column, string_display_width, indented_beyond_p)
      (compute_motion, vmotion, Fvertical_motion):
      Use bool for booleans.
      578098f3
  34. 23 Sep, 2012 2 commits
    • Paul Eggert's avatar
      gnutls.c, gtkutil.c: Use bool for boolean. · 18e27ea8
      Paul Eggert authored
      * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
      (emacs_gnutls_handle_error):
      * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
      (xg_hide_tooltip, xg_create_frame_widgets)
      (create_dialog, xg_uses_old_file_dialog)
      (xg_get_file_with_chooser, xg_get_file_with_selection)
      (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
      (xg_item_label_same_p, xg_update_menubar)
      (xg_modify_menubar_widgets, xg_event_is_for_menubar)
      (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
      (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
      (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
      (update_frame_tool_bar, free_frame_tool_bar):
      * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
      * nsmenu.m (ns_update_menubar):
      * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
      * xfns.c (Fx_show_tip) [USE_GTK]:
      Use bool for boolean.
      * gtkutil.c (xg_update_frame_menubar):
      * xmenu.c (update_frame_menubar):
      Return void, not int, since caller ignores return value.
      * gtkutil.c (xg_change_toolbar_position):
      Return void, not 1.
      18e27ea8
    • Jan Djärv's avatar
      * xterm.c (x_term_init): Call fixup_locale before and after calling · a0942b9a
      Jan Djärv authored
      gtk_init.
      
      Fixes: debbugs:12392
      a0942b9a