1. 25 Sep, 2012 3 commits
    • Eli Zaretskii's avatar
      Fix handling of fatal signals and exceptions on MS-Windows. · 16b22fef
      Eli Zaretskii authored
       src/w32proc.c (sys_signal): Handle all signals defined by the
       MS-Windows runtime, not just SIGCHLD.  Actually install the signal
       handlers for signals supported by Windows.  Don't override
       term_ntproc as the handler for SIGABRT.
       (sigaction): Rewrite to call sys_signal instead of duplicating its
       code.
       (sys_kill): Improve commentary.
       src/w32.c (term_ntproc): Accept (and ignore) one argument, for
       consistency with a signature of a signal handler.  All callers
       changed.
       (init_ntproc): Accept an argument DUMPING.  If dumping, don't
       install term_ntproc as a signal handler for SIGABRT, as that
       should be done by the dumped Emacs.
       src/w32.h (init_ntproc, term_ntproc): Adjust prototypes.
       src/w32select.c (term_w32select): Protect against repeated
       invocation by setting clipboard_owner to NULL after calling
       DestroyWindow.
       src/emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
       and term_ntproc to their modified signatures.
      16b22fef
    • Eli Zaretskii's avatar
      Don't call MAYBE_UNIFY_CHAR while processing buffers and strings. · 54d629be
      Eli Zaretskii authored
       src/character.c (char_string, string_char): Remove calls to
       MAYBE_UNIFY_CHAR.  See the discussion starting at
       http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
       for the details.
      54d629be
    • Chong Yidong's avatar
      Use declare forms, where possible, to mark obsolete functions. · 59f7af81
      Chong Yidong authored
      * lisp/allout.el (allout-passphrase-hint-string): Likewise.
      (allout-init): Use a declare form to mark obsolete.
      
      * lisp/calendar/calendar.el (calendar-version):
      * lisp/calendar/icalendar.el (icalendar-extract-ical-from-buffer)
      (icalendar-convert-diary-to-ical):
      * lisp/cus-edit.el (custom-mode):
      * lisp/ansi-color.el (ansi-color-unfontify-region):
      * lisp/international/latin1-disp.el (latin1-char-displayable-p):
      * lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
      * lisp/progmodes/which-func.el (which-func-update-1): Use
      define-obsolete-function-alias.
      
      * lisp/bookmark.el (bookmark-jump-noselect): Use a declare form to mark
      this function obsolete.
      
      * lisp/calendar/cal-x.el (calendar-two-frame-setup)
      (calendar-only-one-frame-setup, calendar-one-frame-setup):
      * lisp/calendar/calendar.el (american-calendar, european-calendar)
      (calendar-for-loop):
      * lisp/comint.el (comint-dynamic-simple-complete)
      (comint-dynamic-complete-as-filename, comint-unquote-filename):
      * lisp/desktop.el (desktop-load-default):
      * lisp/dired-x.el (dired-omit-here-always)
      (dired-hack-local-variables, dired-default-directory):
      * lisp/emacs-lisp/derived.el (derived-mode-class):
      * lisp/emacs-lisp/timer.el (timer-set-time-with-usecs):
      * lisp/emacs-lock.el (toggle-emacs-lock):
      * lisp/epa.el (epa-display-verify-result):
      * lisp/epg.el (epg-sign-keys, epg-start-sign-keys)
      (epg-passphrase-callback-function):
      * lisp/eshell/esh-util.el (eshell-for):
      * lisp/eshell/eshell.el (eshell-remove-from-window-buffer-names)
      (eshell-add-to-window-buffer-names):
      * lisp/files.el (locate-file-completion):
      * lisp/imenu.el (imenu-example--create-c-index)
      (imenu-example--create-lisp-index)
      (imenu-example--lisp-extract-index-name)
      (imenu-example--name-and-position):
      * lisp/international/mule-cmds.el (princ-list):
      * lisp/international/mule-diag.el (decode-codepage-char):
      * lisp/international/mule-util.el (detect-coding-with-priority):
      * lisp/iswitchb.el (iswitchb-read-buffer):
      * lisp/mail/mailalias.el (mail-complete):
      * lisp/mail/sendmail.el (mail-sent-via):
      * lisp/mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar)
      (mouse-major-mode-menu):
      * lisp/password-cache.el (password-read-and-add):
      * lisp/pcomplete.el (pcomplete-parse-comint-arguments):
      * lisp/progmodes/sh-script.el (sh-maybe-here-document):
      * lisp/replace.el (query-replace-regexp-eval):
      * lisp/savehist.el (savehist-load):
      * lisp/simple.el (choose-completion-delete-max-match):
      * lisp/term.el (term-dynamic-simple-complete):
      * lisp/vc/ediff-init.el (ediff-check-version):
      * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically):
      * lisp/vc/vc.el (vc-diff-switches-list):
      * lisp/view.el (view-return-to-alist-update): Likewise.
      
      * lisp/iswitchb.el (iswitchb-read-buffer): Move code of
      iswitchb-define-mode-map here, and delete that obsolete function.
      
      * lisp/subr.el (eval-next-after-load, makehash, insert-string)
      (assoc-ignore-representation, assoc-ignore-case): Use declare to
      mark obsolete.
      (mode-line-inverse-video): Variable deleted.
      
      * lisp/emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that
      this applies to functions.
      
      * lisp/erc/erc.el (erc-send-command): Use define-obsolete-function-alias.
      
      * lisp/international/mule-util.el (string-to-sequence): Remove.
      
      * lisp/net/newst-backend.el (newsticker-cache-filename):
      * lisp/net/newst-treeview.el (newsticker-groups-filename): Fix
      incorrect obsolescence declaration.
      
      * lisp/net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete
      font-lock-reference-face.
      
      * lisp/url/url-parse.el (url-recreate-url-attributes):
      * lisp/url/url-util.el (url-generate-unique-filename): Use declare to mark
      obsolete.
      
      * src/xdisp.c (mode_line_inverse_video): Delete obsolete variable.
      59f7af81
  2. 24 Sep, 2012 3 commits
    • Stefan Monnier's avatar
      * src/bytecode.c (exec_byte_code): Signal an error instead of aborting, · 22e8cf4a
      Stefan Monnier authored
      when encountering an unknown bytecode.
      22e8cf4a
    • 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
    • Chong Yidong's avatar
      Remove several obsolete vars and functions unlikely to be still in use. · a5f2b6ec
      Chong Yidong authored
      * lisp/vc/log-edit.el (cvs-changelog-full-paragraphs)
      (cvs-commit-buffer-require-final-newline): Obsolete variables
      removed.
      
      * lisp/font-lock.el (font-lock-reference-face): Use
      define-obsolete-variable-alias.
      
      * lisp/international/mule.el (set-char-table-default): Remove.
      (set-coding-priority, make-coding-system, generic-char-p)
      (charset-list, charset-bytes, charset-id): Use declare to mark
      obsolete.
      
      * lisp/mail/supercite.el (sc-version): Remove obsolete function.
      (sc-describe): Don't mark as obsolete, since it is bound.
      (sc-submit-bug-report): Remove.
      
      * lisp/progmodes/compile.el (compile-internal): Remove obsolete
      function.
      (compilation-parse-errors-function): Fix typo.
      
      * lisp/vc/emerge.el (emerge-mode): Make it an obsolete alias.
      (emerge-version): Remove.
      
      * lisp/vc/pcvs-defs.el (cvs-buffer-name-alist)
      (cvs-invert-ignore-marks): Remove references to obsolete vars.
      * lisp/vc/vc-hooks.el (vc-default-registered): Don't use
      vc-master-templates.
      
      * lisp/vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks)
      * lisp/vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates)
      * lisp/vc/vc.el (vc-checkout-carefully): Likewise.
      
      * src/chartab.c (Fset_char_table_default): Obsolete function removed.
      a5f2b6ec
  3. 23 Sep, 2012 12 commits
    • Paul Eggert's avatar
      Move pid_t related decls out of lisp.h. · afea8a8a
      Paul Eggert authored
      * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
      (interruptible_wait_for_termination):
      Move these decls from lisp.h to syswait.h, since they use pid_t.
      Needed on FreeBSD; see Herbert J. Skuhra in
      <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
      * callproc.c: Include syswait.h.
      afea8a8a
    • 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
    • Juanma Barranquero's avatar
      af0e9f75
    • Eli Zaretskii's avatar
      Clean-up left-overs after 2012-09-23T08:44:20Z!eggert@cs.ucla.edu wrt signal handling. · 5101529e
      Eli Zaretskii authored
       src/.gdbinit: Set breakpoint on terminate_due_to_signal, not on
       fatal_error_backtrace.
       src/w32proc.c (sys_kill): Undo last change: don't do anything when
       invoked to deliver SIGABRT to our own process.  This is now
       handled by emacs_raise.
      
       nt/inc/ms-w32.h (emacs_raise): Redefine to invoke emacs_abort.
      
      Fixes: debbugs:12471
      5101529e
    • Juanma Barranquero's avatar
    • Paul Eggert's avatar
      Do not use SA_NODEFER. · 62a1d661
      Paul Eggert authored
      Problem reported by Dani Moncayo in
      <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
      * alloc.c (die):
      * sysdep.c (emacs_abort): Do not reset signal handler.
      * emacs.c (terminate_due_to_signal): Reset signal handler here.
      * sysdep.c (init_signals): Do not use SA_NODEFER.  It wasn't
      wanted even on POSIXish hosts, and it doesn't work on Windows.
      62a1d661
    • 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
    • Chong Yidong's avatar
      Fix last change. · 641cfd14
      Chong Yidong authored
      * image.c (valid_image_p, make_image): Fix caller to lookup_image_type.
      641cfd14
    • Chong Yidong's avatar
      Remove LIBRARIES arg from w32_delayed_load and friends. · d07ff9db
      Chong Yidong authored
      These always use Vdynamic_library_alist anyway.
      
      * src/image.c (Finit_image_library, lookup_image_type)
      (define_image_type): Remove now-unneeded second arg.
      (init_xpm_functions, init_png_functions, init_jpeg_functions)
      (init_tiff_functions, init_gif_functions, init_svg_functions):
      Arglist and w32_delayed_load calling convention changed.
      (gs_type): Remove init_gs_functions; there is no such function.
      
      * src/gnutls.c (init_gnutls_functions): Caller changed; remove arg.
      (Fgnutls_available_p): Caller changed.
      
      * src/xml.c (init_libxml2_functions, Flibxml_parse_html_region)
      (Flibxml_parse_xml_region): Likewise.
      
      * src/dispextern.h (struct image_type): Remove arg from init function.
      
      * src/w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
      Vdynamic_library_alist.
      
      * lisp/image.el (image-type-available-p): Change caller to
      init-image-library.
      d07ff9db
    • Paul Eggert's avatar
      Simplify and avoid signal-handling races. · 4d7e6e51
      Paul Eggert authored
      * nt/inc/ms-w32.h (emacs_raise): New macro.
      * src/alloc.c (die):
      * src/sysdep.c (emacs_abort) [HAVE_NTGUI]:
      Avoid recursive loop if there's a fatal error in the function itself.
      * src/atimer.c (pending_atimers):
      * src/blockinput.h: Don't include "atimer.h"; no longer needed.
      (interrupt_input_pending): Remove.  All uses removed.
      pending_signals now counts both atimers and ordinary interrupts.
      This is less racy than having three separate pending-signal flags.
      (block_input, unblock_input, totally_unblock_input, unblock_input_to)
      (input_blocked_p):
      Rename from their upper-case counterparts BLOCK_INPUT,
      UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
      INPUT_BLOCKED_P, and turn into functions.  All uses changed.
      This makes it easier to access volatile variables more accurately.
      (BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
      (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
      that's more reliable if the code is buggy and sets
      interrupt_input_blocked to a negative value.  All uses changed.
      * src/atimer.c (deliver_alarm_signal):
      Remove.  No need to deliver this to the parent; any thread can
      handle this signal now.  All uses replaced by underlying handler.
      * src/atimer.c (turn_on_atimers):
      * src/dispnew.c (handle_window_change_signal):
      * src/emacs.c (handle_danger_signal):
      * src/keyboard.c (kbd_buffer_get_event):
      Don't reestablish signal handler; not needed with sigaction.
      * src/blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
      (UNBLOCK_INPUT_TO):
      Rework to avoid unnecessary accesses to volatile variables.
      (UNBLOCK_INPUT_TO): Now a function.
      (totally_unblock_input, unblock_input): New decls.
      * src/data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
      (init_data): Remove.  Necessary stuff now done in init_signal.
      * src/emacs.c, src/xdisp.c: Include "atimer.h", since we invoke atimer functions.
      * src/emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
      (fatal_error_code): Remove; no longer needed.
      (terminate_due_to_signal): Rename from fatal_error_backtrace, since
      it doesn't always backtrace.  All uses changed.  No need to reset
      signal to default, since sigaction and/or die does that for us now.
      Use emacs_raise (FOO), not kill (getpid (), FOO).
      (main): Check more-accurately whether we're dumping.
      Move fatal-error setup to sysdep.c
      * src/floatfns.c: Do not include "syssignal.h"; no longer needed.
      * src/gtkutil.c (xg_get_file_name, xg_get_font):
      Remove no-longer-needed signal-mask manipulation.
      * src/keyboard.c, src/process.c (POLL_FOR_INPUT):
      Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
      * src/keyboard.c (read_avail_input): Remove.
      All uses replaced by gobble_input.
      (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
      (kbd_buffer_store_event_hold, gobble_input):
      (record_asynch_buffer_change) [USABLE_SIGIO]:
      (store_user_signal_events):
      No need to mess with signal mask.
      (gobble_input): If blocking input and there are terminals, simply
      set pending_signals to 1 and return.  All hooks changed to not
      worry about whether input is blocked.
      (process_pending_signals): Clear pending_signals before processing
      them, in case a signal comes in while we're processing.
      By convention callers now test pending_signals before calling us.
      (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
      New functions, to support changes to blockinput.h.
      (handle_input_available_signal): Now extern.
      (reinvoke_input_signal): Remove.  All uses replaced by
      handle_async_input.
      (quit_count): Now volatile, since a signal handler uses it.
      (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.  All
      callers changed.  Block SIGINT only if not already blocked.
      Clear sigmask reliably, even if Fsignal returns, which it can.
      Omit unnecessary accesses to volatile var.
      (quit_throw_to_read_char): No need to restore sigmask.
      * src/keyboard.c (gobble_input, handle_user_signal):
      * src/process.c (wait_reading_process_output):
      Call signal-handling code rather than killing ourselves.
      * src/lisp.h: Include <float.h>, for...
      (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
      (pending_signals): Now volatile.
      (syms_of_data): Now const if IEEE floating point.
      (handle_input_available_signal) [USABLE_SIGIO]:
      (terminate_due_to_signal, record_child_status_change): New decls.
      * src/process.c (create_process): Avoid disaster if memory is exhausted
      while we're processing a vfork, by tightening the critical section
      around the vfork.
      (send_process_frame, process_sent_to, handle_pipe_signal)
      (deliver_pipe_signal): Remove.  No longer needed, as Emacs now
      ignores SIGPIPE.
      (send_process): No need for setjmp/longjmp any more, since the
      SIGPIPE stuff is now gone.  Instead, report an error if errno
      is EPIPE.
      (record_child_status_change): Now extern.  PID and W are now args.
      Return void, not bool.  All callers changed.
      * src/sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
      Remove.  All uses removed.  This bug should be fixed now in a
      different way.
      (wait_for_termination_1): Use waitpid rather than sigsuspend,
      and record the child status change directly.  This avoids the
      need to futz with the signal mask.
      (process_fatal_action): Move here from emacs.c.
      (emacs_sigaction_flags): New function, containing
      much of what used to be in emacs_sigaction_init.
      (emacs_sigaction_init): Use it.  Block nonfatal system signals that are
      caught by emacs, to make races less likely.
      (deliver_process_signal): Rename from handle_on_main_thread.
      All uses changed.
      (BACKTRACE_LIMIT_MAX): Now at top level.
      (thread_backtrace_buffer, threadback_backtrace_pointers):
      New static vars.
      (deliver_thread_signal, deliver_fatal_thread_signal):
      New functions, for more-accurate delivery of thread-specific signals.
      (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
      (deliver_arith_signal): Handle in this thread, not
      in the main thread, since it's triggered by this thread.
      (maybe_fatal_sig): New function.
      (init_signals): New arg DUMPING so that we can be more accurate
      about whether we're dumping.  Caller changed.
      Treat thread-specific signals differently from process-general signals.
      Block all signals while handling fatal error; that's safer.
      xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
      on IEEE hosts.
      When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
      Ignore SIGPIPE unless batch.
      (emacs_backtrace): Output backtrace for the appropriate thread,
      which is not necessarily the main thread.
      * src/syssignal.h: Include <stdbool.h>.
      (emacs_raise): New macro.
      * src/xterm.c (x_connection_signal): Remove; no longer needed
      now that we use sigaction.
      (x_connection_closed): No need to mess with sigmask now.
      (x_initialize): No need to reset SIGPIPE handler here, since
      init_signals does this for us now.
      
      Fixes: debbugs:12471
      4d7e6e51
    • Jan Djärv's avatar
      * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into, · 8f4635e9
      Jan Djärv authored
      background rect may be larger.
      
      Fixes: debbugs:12445
      8f4635e9
    • Chong Yidong's avatar
  4. 22 Sep, 2012 9 commits
    • Paul Eggert's avatar
      * .gdbinit: Just stop at fatal_error_backtrace. · d41e491e
      Paul Eggert authored
      See Stefan Monnier's request in
      <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
      Remove no-longer-used query of system type.
      d41e491e
    • Chong Yidong's avatar
      Misc doc fixes. · c88b867f
      Chong Yidong authored
      * searching.texi (Replacing Match): Minor clarification.
      
      * lisp/repeat.el (repeat): Doc fix.
      
      * lisp/simple.el (shell-command-on-region): Doc fix.
      
      * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
      
      * cmds.c (Fforward_char, Fbackward_char): Doc fix.
      
      * editfns.c (Fline_beginning_position): Doc fix.
      (Fline_end_position): Doc fix.
      
      * minibuf.c (Finternal_complete_buffer): Doc fix.
      
      * search.c (Freplace_match): Doc fix.
      
      Fixes: debbugs:12325 debbugs:12391 debbugs:12416 debbugs:12414 debbugs:10909 debbugs:12348
      c88b867f
    • Chong Yidong's avatar
      Refactor image-type loading. · bb4d86b4
      Chong Yidong authored
      * src/dispextern.h (struct image_type): Add new slot, storing a type
      initialization function.
      
      * src/image.c (define_image_type): Call the image initializer function
      if it is defined.  Arguments and return value changed.
      (valid_image_p, make_image): Callers changed.
      (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
      (gif_type, imagemagick_type, svg_type, gs_type): Add
      initialization functions.
      (Finit_image_library): Call lookup_image_type.
      (CHECK_LIB_AVAILABLE): Macro deleted.
      (lookup_image_type): Call define_image_type here, rather than via
      Finit_image_library, and without using CHECK_LIB_AVAILABLE.
      (syms_of_image): Move define_image_type calls for xbm_type and
      pbm_type to lookup_image_type.
      bb4d86b4
    • Eli Zaretskii's avatar
      Fix bugs #12447 and #12326 with infloop causes by idle timers, update docs. · df9685f3
      Eli Zaretskii authored
       src/keyboard.c (timer_check_2): Move calculation of 'timers' and
       'idle_timers' from here ...
       (timer_check): ... to here.  Use Fcopy_sequence to copy the timer
       lists, to avoid infloops when the timer does something stupid,
       like reinvoke itself with the same or smaller time-out.
      
       lisp/emacs-lisp/timer.el (run-with-idle-timer)
       (timer-activate-when-idle): Warn against reinvoking an idle timer
       from within its own timer action.
      
       doc/lispref/os.texi (Idle Timers): Warn against reinvoking an idle timer
       from within its own timer action.
      df9685f3
    • Martin Rudalics's avatar
      Make Temp Buffer Resize Mode less intrusive (Bug#1806). · 8e17c9ba
      Martin Rudalics authored
      * window.c (Fsplit_window_internal): Handle only Qt value of
      Vwindow_combination_limit separately.
      (Qtemp_buffer_resize): New symbol.
      (Vwindow_combination_limit): New default value.  Rewrite
      doc-string.
      * cus-start.el (window-combination-limit): Add new optional
      values.
      * window.el (temp-buffer-window-show)
      (window--try-to-split-window): Obey new values of
      window-combination-limit.
      (split-window): Test window-combination-limit for t instead of
      non-nil.
      (display-buffer-at-bottom): New buffer display action function.
      * help.el (temp-buffer-resize-regexps): New option.
      (temp-buffer-resize-mode): Rewrite doc-string.
      (resize-temp-buffer-window): Obey temp-buffer-resize-regexps.
      Don't resize reused window.  Suggested by Glen Morris.
      8e17c9ba
    • Eli Zaretskii's avatar
      Fix bug #10159 with crashes in auto-complete package. · 589bd69b
      Eli Zaretskii authored
       src/xdisp.c (next_overlay_string): Initialize it->end_charpos for
       the new overlay string.  Otherwise, the call to composition_compute_stop_pos
       in compute_stop_pos uses a wrong it->end_charpos value, and crashes because
       it runs off the end of the overlay string.
      589bd69b
    • Paul Eggert's avatar
      * emacs.c (shut_down_emacs): Don't assume stderr is buffered, · 01108e3f
      Paul Eggert authored
      or that fprintf is async-signal-safe.  POSIX doesn't require
      either assumption.
      01108e3f
    • Chong Yidong's avatar
      Fix auto-save and locking for indirect buffers. · 82f8cd94
      Chong Yidong authored
      * lisp/simple.el (undo): Handle indirect buffers.
      
      * buffer.c (Fset_buffer_modified_p): Handle indirect buffers.
      
      Fixes: debbugs:8207
      82f8cd94
    • Kenichi Handa's avatar
      composite.c (composition_reseat_it): Handle the case that a grapheme cluster... · 3cccbd87
      Kenichi Handa authored
      composite.c (composition_reseat_it): Handle the case that a grapheme cluster is not covered by a single font (Bug#12352).
      3cccbd87
  5. 21 Sep, 2012 1 commit
  6. 20 Sep, 2012 4 commits
  7. 19 Sep, 2012 3 commits
  8. 18 Sep, 2012 1 commit
  9. 17 Sep, 2012 4 commits
    • Eli Zaretskii's avatar
      Fix bug #12196 with infloop when cache-long-line-scans is non-nil. · c8b9f1bc
      Eli Zaretskii authored
       src/search.c (scan_buffer): Use character positions in calls to
       region_cache_forward and region_cache_backward, not byte
       positions.
      c8b9f1bc
    • Eli Zaretskii's avatar
      Set pending_signals to 1 in w32term.c's read-socket hook. · b4c932a2
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket): Set pending_signals to 1, like
       xterm.c does.  Reported by Daniel Colascione <dancol@dancol.org>.
      b4c932a2
    • Eli Zaretskii's avatar
      Fix the value of __malloc_extra_blocks. · 45ba16c7
      Eli Zaretskii authored
       src/ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
       __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
       emacs_blocked_malloc, now deleted.
      45ba16c7
    • Paul Eggert's avatar
      Remove no-longer-needed Solaris 2.4 vfork bug workaround. · eeceac93
      Paul Eggert authored
      The workaround was for improving performance on Solaris 2.4, but
      is getting in the way now.  Emacs will still work if someone is
      still running Solaris 2.4 in a museum somewhere; Sun dropped
      support for Solaris 2.4 in 2003.
      * configure.ac (ac_cv_func_vfork_works): Default to 'no' on
      Solaris 2.4, so that AC_FUNC_VFORK doesn't think vfork works.
      * src/callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
      * src/process.c (create_process) [HAVE_WORKING_VFORK]:
      Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
      since Emacs no longer uses vfork on that platform.
      eeceac93