Do not use GTK 3 if it exists but cannot be compiled.
[bpt/emacs.git] / src / ChangeLog
index c432c1a..fa44810 100644 (file)
@@ -1,3 +1,316 @@
+2013-06-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Do not use GTK 3 if it exists but cannot be compiled.
+       * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
+       * xterm.c (x_error_handler) [!USE_GTK]:
+       Do not use GTK 3.
+
+       * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
+
+2013-06-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * intervals.c (get_local_map): Instead of aborting, clip POSITION
+       to the valid range of values.  (Bug#14753)
+
+       * xdisp.c (Fmove_point_visually): Invalidate the cursor position
+       when moving point by using the current glyph matrix.  This avoids
+       the need to force redisplay when this function is called in a
+       loop.
+
+2013-06-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix minor problems found by static checking.
+       * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
+       Redo the latter's body to sidestep GCC parenthesization warnings.
+       (setup_coding_system, detect_coding, detect_coding_system): Use them.
+       * coding.c (detect_coding, detect_coding_system):
+       * coding.h (struct undecided_spec):
+       Use bool for boolean.
+       * image.c (QCmax_width, QCmax_height): Now static.
+       * xdisp.c (Fmove_point_visually): Remove unused local.
+
+2013-06-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fmove_point_visually): New function.
+
+2013-06-28  Kenichi Handa  <handa@gnu.org>
+
+       * coding.h (define_coding_undecided_arg_index): New enum.
+       (coding_attr_index): New members
+       coding_attr_undecided_inhibit_null_byte_detection,
+       coding_attr_undecided_inhibit_iso_escape_detection,
+       coding_attr_undecided_prefer_utf_8.
+       (undecided_spec): New struct.
+       (struct coding_system): New member `undecided' of the member
+       `spec'.
+
+       * coding.c (setup_coding_system): Handle CODING->spec.undecided.
+       (detect_coding): Likewise.
+       (detect_coding_system): Likewise.
+       (Fdefine_coding_system_internal): New coding system properties
+       :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
+       :prefer-utf-8.
+       (syms_of_coding): Adjusted for coding_arg_undecided_max.
+
+2013-06-28  Kenichi Handa  <handa@gnu.org>
+
+       * coding.h (define_coding_undecided_arg_index): New enum.
+       (coding_attr_index): New members
+       coding_attr_undecided_inhibit_null_byte_detection,
+       coding_attr_undecided_inhibit_iso_escape_detection,
+       coding_attr_undecided_prefer_utf_8.
+       (undecided_spec): New struct.
+       (struct coding_system): New member `undecided' of the member
+       `spec'.
+
+       * coding.c (setup_coding_system): Handle CODING->spec.undecided.
+       (detect_coding): Likewise.
+       (detect_coding_system): Likewise.
+       (Fdefine_coding_system_internal): New coding system properties
+       :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
+       :prefer-utf-8.
+       (syms_of_coding): Adjust for coding_arg_undecided_max.
+
+2013-06-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c (x_from_xcolors): Remove unused local.
+
+2013-06-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       Defer image data transfer between X client and server until actual
+       display happens.
+
+       * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
+       and `mask_img'.
+
+       * image.c (Destroy_Image): Remove.
+       (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
+       `mask_p', and `colors_p'.  All uses changed.
+       (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
+       (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS): New
+       macros for `flags' arg to x_clear_image_1.
+       (postprocess_image, xpm_load_image, x_build_heuristic_mask)
+       (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
+       (ZPixmap, XGetImage) [HAVE_NS]: Remove.
+       (image_get_x_image_or_dc, image_unget_x_image_or_dc)
+       (image_get_x_image, image_unget_x_image): New functions or macros.
+       (image_background, image_background_transparent, x_to_xcolors)
+       (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
+       XGetImage or CreateCompatibleDC.  Use image_unget_x_image_or_dc
+       instead of Destroy_Image.
+       (image_create_x_image_and_pixmap, image_put_x_image): New functions.
+       (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
+       (png_load_body, jpeg_load_body, tiff_load, gif_load)
+       (imagemagick_load_image, svg_load_image): Use them instead of
+       x_create_x_image_and_pixmap, and x_put_x_image followed by
+       x_destroy_x_image, respectively.
+       (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
+       XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
+       XpmCreatePixmapFromBuffer.  Create pixmaps.  Fill background and
+       background_transparent fields.
+       (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
+       (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
+
+2013-06-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
+       This mostly consists of undoing recent changes.
+       * callproc.c (Fcall_process):
+       * process.c (create_process):
+       Do not worry about catching SIGCHLD here, undoing previous change.
+       * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
+       * process.c, process.h (catch_child_signal):
+       No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
+       * process.c (catch_child_handler): Don't worry about being called
+       lazily and do not assume caller has blocked SIGCHLD, undoing
+       previous change.  Move first-time stuff back to
+       init_process_emacs, undoing 06-22 change.  If CYGWIN, do not
+       tickle glib, as that causes Cygwin bootstrap to fail.  Do not
+       set lib_child_handler if it's already initialized, which may
+       help avoid problems on GNUStep.
+
+2013-06-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
+       * callproc.c (Fcall_process):
+       * process.c (create_process):
+       Make sure SIGCHLD is caught before we fork,
+       since Emacs startup no arranges to catch SIGCHLD.
+       * process.c (lib_child_handler): Initialize to null, not to
+       dummy_handler.
+       (catch_child_signal): Allow self to be called lazily.
+       Do nothing if it's already been called.
+       Assume caller has blocked SIGCHLD (all callers do now).
+       * emacs.c (main): Do not catch SIGCHLD here; defer it until
+       just before it's really needed.
+       * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
+       since it hasn't been caught yet.
+
+2013-06-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (compute_image_size): New function to implement
+       :max-width and :max-height.
+       (imagemagick_load_image): Use it.
+
+2013-06-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Try to avoid malloc SEGVs on Cygwin (Bug#14569).
+       * callproc.c, process.h (block_child_signal, unblock_child_signal):
+       Now extern.
+       * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
+       * process.c (catch_child_signal): Block SIGCHLD while futzing with
+       the SIGCHLD handler, since the code is not atomic and (due to glib)
+       signals may be arriving now.
+       * sysdep.c (init_signals): Do not catch child signals here;
+       'main' now does that later, at a safer time.
+
+2013-06-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Clean up SIGCHLD handling a bit (Bug#14569).
+       * process.c, process.h (catch_child_signal):
+       Now always extern, even if !NS_IMPL_GNUSTEP.
+       * process.c (catch_child_signal): Move glib tickler here from
+       init_process_emacs, so that it's done earlier in Emacs
+       initialization.  Also move the noninteractive && !initialized
+       check here from init_process_emacs.  This is all a bit cleaner for
+       GNUish platforms, and I hope it works around the Cygwin bug.
+       * sysdep.c (init_signals): Invoke catch_child_signal here, so
+       that glib signal handling is tickled before glib creates threads.
+
+       * process.c (wait_reading_process_output): Avoid int overflow
+       when reading more than 2 GiB total from a process.
+
+2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (create_process): Handle a couple more cases,
+       i.e., work even if new_argv and wait_child_setup[i] are cached.
+       Use Fcall_process's style for volatile vars.
+
+2013-06-21  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * process.c (create_process): Mark PROCESS volatile.
+
+2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use C99-style flexible array members if available.
+       This avoids some subtle aliasing issues, which typically
+       aren't a problem with GCC but may be a problem elsewhere.
+       * alloc.c (sdata): New typedef, replacing the old struct sdata.
+       It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
+       In either case, it uses a flexible array member rather than
+       the old struct hack.  All uses changed.
+       (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
+       Adjust to sdata reorganization.
+       * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
+       Use offsetof (struct, flex_array_member), not sizeof (struct), as
+       that ports better to pre-C99 non-GCC.
+       * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
+       Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
+       as the latter has changed.
+       * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
+       and port better to pre-C99 GCC.
+       * image.c (struct xpm_cached_color):
+       * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
+       (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
+       Use FLEXIBLE_ARRAY_MEMBER.
+       * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
+       Move decl to top level so it gets checked against implementation.
+       (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
+       * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
+
+2013-06-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * syntax.c: Integer cleanups.
+       (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
+       All uses that need 0-or-2 changed to:
+       (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
+       as the old SYNTAX_FLAGS_COMMENT_STYLEC.
+       (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
+       (char_quoted, prev_char_comend_first, back_comment)
+       (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
+       (in_classes, forw_comment, scan_lists, scan_sexps_forward):
+       Use bool for boolean.
+       (update_syntax_table, skip_chars, skip_syntaxes):
+       Prefer int to unsigned when either will do.
+       (back_comment): Return boolean success flag, like forw_comment,
+       instead of positive-or-minus-1 (which might have overflowed int anyway).
+       Don't stuff ptrdiff_t into int.
+       (syntax_spec_code, syntax_code_spec): Now const.
+       (Fmatching_paren, scan_lists, scan_sexps_forward):
+       Use enum syntaxcode for syntax code.
+       (Fmatching_paren): Check that arg is a character, not just an integer.
+       (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
+       (Finternal_describe_syntax_value): Omit no-longer-needed
+       comparison to 0.
+       (skip_chars): Use char, not unsigned char, when the distinction
+       doesn't matter.
+       (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
+       * bytecode.c (exec_byte_code):
+       * syntax.c (syntax_spec_code, Fchar_syntax)
+       (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
+       (init_syntax_once):
+       * syntax.h (SYNTAX_WITH_FLAGS):
+       Omit unnecessary casts.
+
+2013-06-20  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
+       line dimensions here, to avoid race conditions with the main
+       thread.  (Bug#14062, bug#14630, bug#14669)
+
+       * w32term.c (w32_draw_window_cursor): Compute the header line and
+       mode line dimensions here.
+       <w32_system_caret_window, w32_system_caret_hdr_height>:
+       <w32_system_caret_mode_height>: New variables.
+
+       * w32term.h: Declare them.
+
+2013-06-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * alloc.c (die): Move "assertion failed" string here ...
+       * lisp.h (eassert): ... from here.  Also, suppress evaluation of
+       COND when SUPPRESS_CHECKING.  This shrinks the executable text
+       size by 0.8% to 2.2% when configured with --enable-checking,
+       depending on optimization flags (GCC 4.8.1 x86-64).
+
+       * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
+
+2013-06-20  Rüdiger Sonderfeld <ruediger@c-plusplus.de>
+
+       * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
+       base is 2; this is more accurate.
+
+2013-06-19  Juanma Barranquero  <lekktu@gmail.com>
+
+       * sound.c (string_default): Move to !WINDOWSNT section.
+       (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
+
+2013-06-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sound.c: Integer cleanups.
+       Remove unnecessary forward decls.
+       (struct sound_device): The 'file' member is now a Lisp_Object, not
+       a char *, so that we needn't invoke alloca on a huge size.
+       (Fplay_sound_internal): Adjust to this.
+       (string_default): New function.
+       (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
+       Use it to adjust to the struct sound_device change.
+       (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
+       (be2hs) [0]: Remove.
+
+       * syntax.c (skip_chars): Don't use uninitialized storage
+       when searching a multibyte buffer for characters that are not in a
+       unibyte string that contains non-ASCII characters.
+
+2013-06-18  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * process.c: Include xgselect.h if HAVE_GLIB.  Include glib.h
+       if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
+
+2013-06-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
+
 2013-06-18  Kenichi Handa  <handa@gnu.org>
 
        * font.c (Ffont_spec): Signal an error for an invalid font name
        (update_frame_tool_bar): Update code for GNUStep.
        (clearAll): New method.
        (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
-       argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
+       argument.  Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
        Move identifierToItem setObject and activeIdentifiers addObject before
        call to insertItemWithItemIdentifier.
        (validateVisibleItems): Fix indentation.