+2012-07-04 Juanma Barranquero <lekktu@gmail.com>
+
+ * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
+ (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
+
+2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (init_buffer_once): Fix initialization of
+ headers for buffer_defaults and buffer_local_symbols.
+ Reported by Juanma Barranquero <lekktu@gmail.com>.
+
+2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
+ * lisp.h (enum pvec_type): Use fewer bits.
+ (PSEUDOVECTOR_SIZE_BITS): New constant.
+ (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
+ (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
+ change in pvec_type.
+ (PSEUDOVECTOR_TYPEP): New macro.
+ (TYPED_PSEUDOVECTORP): Use it.
+ * fns.c (internal_equal): Adapt code to extract pvectype.
+ * emacs.c (gdb_pvec_type): Update type.
+ * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
+ (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
+ (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
+ (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
+ (sweep_vectors): Use it. Use local var `total_bytes' instead of
+ abusing vector->header.next.nbytes.
+ (live_vector_p): Use PVEC_TYPE.
+ (mark_object): Adapt code to extract pvectype. Use switch.
+
+2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * doprnt.c (doprnt): Don't assume string length fits in 'int'.
+ Tighten new eassert a bit.
+
+2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Fix compilation with --enable-gcc-warnings and -O1
+ optimization level.
+ * doprnt.c (doprnt): Change type of tem to int, initialize
+ to avoid compiler warning. Add eassert.
+ * search.c (simple_search): Initialize match_byte to avoid
+ compiler warning. Add eassert.
+
+2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Avoid weird behavior with large horizontal scrolls.
+ Without this change, for example, large hscroll values would
+ mess up Emacs's display on Fedora 15 x86, presumably due to
+ overflows in int calculations in the display code.
+ Also, if buffers had long lines, Emacs would freeze.
+ * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
+ (set_window_hscroll): New function, containing the old guts of
+ Fset_window_hscroll. Return the clipped value.
+ (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
+ This avoids the need to check against PTRDIFF_MAX.
+
+ * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
+
+2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
+
+2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
+ Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
+ since GCC 4.4.6 issues a bogus warning for them.
+
+ Fix bugs in file timestamp newness comparisons.
+ * fileio.c (Ffile_newer_than_file_p):
+ * lread.c (Fload): Use full timestamp resolution of files,
+ not just the 1-second resolution, so that files that are only
+ slightly newer still count as newer.
+ * fileio.c (Ffile_newer_than_file_p): Don't assume file
+ timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
+
+2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c: Improve handling of file time marker. (Bug#11852)
+ (special_mtime): New function.
+ (Finsert_file_contents, Fverify_visited_file_modtime):
+ Use it to set special mtime values consistently.
+
+2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
+
+ * fileio.c (Finsert_file_contents): Properly handle st_mtime
+ marker for non-existing file. (Bug#11852)
+
+2012-07-03 Glenn Morris <rgm@gnu.org>
+
+ * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
+ and did not make it into globals.h).
+
+2012-07-03 Tom Tromey <tromey@redhat.com>
+
+ * window.c (Fset_window_margins, Fset_window_fringes)
+ (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
+ * textprop.c (Fprevious_property_change): No longer static.
+ * syntax.c (Fsyntax_table_p): No longer static.
+ * process.c (Fget_process, Fprocess_datagram_address): No longer
+ static.
+ * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
+ * keyboard.c (Fcommand_execute): No longer static.
+ Remove EXFUN.
+ * insdel.c (Fcombine_after_change_execute): No longer static.
+ * image.c (Finit_image_library): No longer static.
+ * fileio.c (Fmake_symbolic_link): No longer static.
+ * eval.c (Ffetch_bytecode): No longer static.
+ * editfns.c (Fuser_full_name): No longer static.
+ * doc.c (Fdocumentation_property, Fsnarf_documentation):
+ No longer static.
+ * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
+ static.
+ * dired.c (Ffile_attributes): No longer static.
+ * composite.c (Fcomposition_get_gstring): No longer static.
+ * callproc.c (Fgetenv_internal): No longer static.
+
+ * ccl.h: Remove EXFUNs.
+ * buffer.h: Remove EXFUNs.
+ * dispextern.h: Remove EXFUNs.
+ * intervals.h: Remove EXFUNs.
+ * fontset.h: Remove EXFUN.
+ * font.h: Remove EXFUNs.
+ * dosfns.c (system_process_attributes): Remove EXFUN.
+ * keymap.h: Remove EXFUNs.
+ * lisp.h: Remove EXFUNs.
+ * w32term.h: Remove EXFUNs.
+ * window.h: Remove EXFUNs.
+ * xsettings.h: Remove EXFUN.
+ * xterm.h: Remove EXFUN.
+
+2012-07-03 Glenn Morris <rgm@gnu.org>
+
+ * lisp.h (Frandom): Make it visible to C.
+ * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
+ buffer for invisible buffers. (Bug#1229)
+
+2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
+ values which aren't power of 2.
+ * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro. Verify
+ it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
+ accordingly.
+
+2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
+
+ * alloc.c (mark_object): Revert part of last patch to use `switch'.
+
+2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_vector_block): Remove redundant
+ calls to mallopt if DOUG_LEA_MALLOC is defined.
+ (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
+ avoid calls to mallopt if zero_vector is returned.
+
+2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
+ is enabled, avoid dereferencing NULL current_sblock if
+ running undumped.
+
+2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Cleanup basic buffer management.
+ * buffer.h (struct buffer): Change layout to use generic vector
+ marking code. Fix some comments. Change type of 'clip_changed'
+ to bitfield. Remove unused #ifndef old.
+ (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
+ (GET_OVERLAYS_AT): Fix indentation.
+ (for_each_per_buffer_object_at): New macro.
+ * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
+ (Fbuffer_local_variables): Use it.
+ (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
+ * alloc.c (allocate_buffer): Adjust to match new layout of
+ struct buffer. Fix comment.
+ (mark_overlay): New function.
+ (mark_buffer): Use it. Use mark_vectorlike to mark normal
+ Lisp area of struct buffer.
+ (mark_object): Use it. Adjust marking of misc objects
+ and related comments.
+
+2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
+ wrapper that is not needed because the wrapped code is a no-op (zero
+ machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
+ This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
+
+2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (mark_buffer): Simplify. Remove prototype.
+ (mark_object): Add comment. Reorganize marking of vector-like
+ objects. Use CHECK_LIVE for all vector-like objects except buffers
+ and subroutines when GC_CHECK_MARKED_OBJECTS is defined. Avoid
+ redundant calls to mark_vectorlike for bool vectors.
+
+2012-06-30 Glenn Morris <rgm@gnu.org>
+
+ * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
+
+ * epaths.in (PATH_SITELOADSEARCH): New.
+ * lread.c (init_lread): Use PATH_SITELOADSEARCH.
+ This is rather than relying on --enable-locallisppath elements
+ having "site-lisp" in their names. (Bug#10208#25, 11658)
+
+2012-06-30 Eli Zaretskii <eliz@gnu.org>
+
+ * w32proc.c (sys_select): Accept and ignore one more argument.
+
+ * w32.c (emacs_gnutls_pull): Call select with one more argument.
+
+ * sysselect.h [DOS_NT]: Don't include sys/select.h.
+ (pselect) [!MS_DOS]: Redirect to sys_select.
+
+ * sysdep.c: Don't include dos.h and dosfns.h.
+
+ * process.c (sys_select):
+ * msdos.c (sys_select): Accept one more argument and ignore it.
+
+ * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
+ adapt data types and code to that.
+
+ * dosfns.c:
+ * msdos.c (gettime, settime): Define away the prototypes in dos.h,
+ which clashes with the gnulib function of the same name.
+
+2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
+
+ * font.c (font_style_to_value, font_style_symbolic)
+ (font_prop_validate_style): Add type checks for values in
+ font_style_table.
+
+ * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
+ argument.
+ * character.c, charset.c, menu.c, process.c, window.c: Adjust all
+ uses.
+
+2012-06-29 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (try_window_id): Undo last change.
+
+ * w32.c (getwd): Adjust commentary about startup_dir.
+ (init_environment): Always call sys_access, even in non-MSVC
+ builds. Don't chdir to the directory of the Emacs executable.
+ This undoes code from 1997 which was justified by the need to
+ "avoid conflicts when removing and renaming directories". But its
+ downside was that every relative file name was being interpreted
+ relative to the directory of the Emacs executable, which can never
+ be TRT. In particular, it broke sys_access when called with
+ relative file names.
+ (sys_access): Map GetLastError to errno.
+
+2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (struct window): Change type of 'fringes_outside_margins'
+ to bitfield. Fix comment. Adjust users accordingly.
+ (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
+ Adjust comment.
+ * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
+ to ptrdiff_t.
+
+2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gnutls.c (emacs_gnutls_handshake):
+ Add QUIT to make the loop interruptible.
+
+2012-06-29 Glenn Morris <rgm@gnu.org>
+
+ * charset.c (init_charset): Make lack of etc/charsets fatal.
+
+2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * editfns.c (region_limit): Fix type mismatch.
+
+2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
+ undefined. Convert from xassert to eassert.
+ * nsmenu.m: Convert from xassert to eassert.
+ * nsterm.m: Likewise.
+
+2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * editfns.c (region_limit): Clip to narrowing (bug#11770).
+
+2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ Avoid integer overflow on scroll-left and scroll-right.
+ * window.c (HSCROLL_MAX): New macro.
+ (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
+ overflow when requested scroll falls outside ptrdiff_t range.
+
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (struct window): Change type of 'hscroll',
+ 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
+ 'last_modified' and 'last_overlay_modified' to EMACS_INT.
+ Adjust users accordingly.
+ * xdisp.c (try_cursor_movement): Replace type check with eassert.
+ * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
+ from EMACS_INT to ptrdiff_t.
+ (make_window): Omit redundant initialization.
+
+2012-06-28 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
+
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (struct window): Change type of 'use_time' and
+ 'sequence_number' from Lisp_Object to int.
+ * frame.c (make_frame): Adjust users accordingly.
+ * print.c (print_object): Likewise.
+ * window.c (select_window, Fwindow_use_time, make_parent_window)
+ (make_window): Likewise.
+
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
+ enabled with --enable-checking=[all,glyphs] configure option.
+ Fix GLYPH_DEBUG usage assuming that it may be undefined,
+ adjust comments accordingly.
+ * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
+ undefined, adjust comments accordingly.
+ * image.c: Likewise.
+ * scroll.c: Likewise.
+ * w32fns.c: Likewise.
+ * w32term.c: Likewise.
+ * xdisp.c: Likewise.
+ * xfaces.c: Likewise.
+ * xfns.c: Likewise.
+ * xterm.c: Likewise.
+
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Generalize run-time debugging checks.
+ * dispextern.h (XASSERTS): Remove.
+ * fontset.c (xassert): Remove.
+ Convert from xassert to eassert.
+ * alloc.c: Convert from xassert to eassert.
+ * bidi.c: Likewise.
+ * dispnew.c: Likewise.
+ * fns.c: Likewise.
+ * fringe.c: Likewise.
+ * ftfont.c: Likewise.
+ * gtkutil.c: Likewise.
+ * image.c: Likewise.
+ * keyboard.c: Likewise.
+ * menu.c: Likewise.
+ * process.c: Likewise.
+ * scroll.c: Likewise.
+ * sound.c: Likewise.
+ * term.c: Likewise.
+ * w32console.c: Likewise.
+ * w32fns.c: Likewise.
+ * w32term.c: Likewise.
+ * window.c: Likewise.
+ * xdisp.c: Likewise.
+ * xfaces.c: Likewise.
+ * xfns.c: Likewise.
+ * xselect.c: Likewise.
+ * xterm.c: Likewise.
+
+2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fns.c (maybe_resize_hash_table): Output message when growing the
+ purify-hashtable.
+
+2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_string_data): Remove dead code.
+ * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
+ avoid GCC warning about unused macro.
+
+2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_string): Omit intervals initialization.
+ * alloc.c (make_uninit_multibyte_string): Initialize intervals
+ as in make_pure_string and make_pure_c_string.
+
+2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_string): Fix last change.
+
+2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_string): Remove two redundant calls
+ to memset, add explicit initialization where appropriate.
+
+2012-06-27 Glenn Morris <rgm@gnu.org>
+
+ * lisp.mk (lisp): Remove paths.elc.
+
+2012-06-27 Chong Yidong <cyd@gnu.org>
+
+ * doc.c (Fsubstitute_command_keys): Fix punctuation.
+
+2012-06-26 John Wiegley <johnw@newartisans.com>
+
+ * unexmacosx.c (copy_data_segment): Add two section names used
+ on Mac OS X Lion: __mod_init_func and __mod_term_func.
+
+ * alloc.c (mark_memory): Do not check with -faddress-sanitizer
+ when building with Clang.
+
+2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (Fapply): Allow calling it with a single argument.
+
+2012-06-26 Eli Zaretskii <eliz@gnu.org>
+
+ * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
+ _stricmp and _strnicmp.
+ (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
+
+2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (allocate_window): Zero out non-Lisp part of newly
+ allocated window.
+ (allocate_process): Likewise for new process.
+ (allocate_terminal): Change to use offsetof.
+ (allocate_frame): Likewise.
+ * frame.c (make_frame): Omit redundant initialization.
+ * window.c (make_parent_window): Use memset.
+ (make_window): Omit redundant initialization.
+ * process.c (make_process): Omit redundant initialization.
+ * terminal.c (create_terminal): Likewise.
+
+2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * term.c (delete_tty): Remove redundant call to memset.
+
+2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c: Remove build_string.
+ * lisp.h: Define build_string as static inline. This provides
+ a better opportunity to optimize away calls to strlen when the
+ function is called with compile-time constant argument.
+ * image.c (imagemagick_error): Convert to build_string.
+ * w32proc.c (sys_spawnve): Likewise.
+ * xterm.c (x_term_init): Likewise.
+
+2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ Use sprintf return value instead of invoking strlen on result.
+ In the old days this wasn't portable, since some sprintf
+ implementations returned char *. But they died out years ago and
+ Emacs already assumes sprintf returns int.
+ Similarly for float_to_string.
+ This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
+ * ccl.c (ccl_driver):
+ * character.c (string_escape_byte8):
+ * data.c (Fnumber_to_string):
+ * doprnt.c (doprnt):
+ * print.c (print_object):
+ * xdisp.c (message_dolog):
+ * xfns.c (syms_of_xfns):
+ Use sprintf or float_to_string result to avoid need to call strlen.
+ * data.c (Fnumber_to_string):
+ Use make_unibyte_string, since the string must be ASCII.
+ * lisp.h, print.c (float_to_string): Now returns int length.
+ * term.c (produce_glyphless_glyph):
+ Use sprintf result rather than recomputing it.
+
+ Clean out last vestiges of the old HAVE_CONFIG_H stuff.
+ * Makefile.in (ALL_CFLAGS):
+ * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
+ * gmalloc.c, regex.c: Include <config.h> unconditionally.
+
+2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dispextern.h (xstrcasecmp): Define to library function
+ strcasecmp if available.
+ * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
+
+2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
+
+ * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
+ Avoid comma operator.
+ * menu.c (push_submenu_start, push_submenu_end)
+ (push_left_right_boundary, push_menu_pane): Likewise.
+ * msdos.c (dos_rawgetc): Likewise.
+
+2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xfns.c (xic_create_fontsetname): Remove redundant calls
+ to memset.
+
+2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gtkutil.c (get_utf8_string): Remove redundant assignment.
+ sprintf already null-terminates its output.
+
+ * xfns.c (x_window): Remove redundant cast.
+
+2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
+ `const char *' to `char *' to avoid compiler warning.
+
+2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
+ instead of truncating it to 63 (admittedly a generous limit).
+
+ * process.c: Fix spelling and caps in comments.
+
+2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * emacs.c (setpgrp): Remove definition, unused.
+ * sysdep.c (setpgrp): Remove definition, not used in this file.
+
+2012-06-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in: Update dependencies.
+
2012-06-24 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.