Merge from emacs-24; up to 2012-12-29T06:14:00Z!cyd@gnu.org
authorGlenn Morris <rgm@gnu.org>
Mon, 24 Jun 2013 06:58:52 +0000 (23:58 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 24 Jun 2013 06:58:52 +0000 (23:58 -0700)
1  2 
ChangeLog
configure.ac
doc/emacs/files.texi
doc/lispref/ChangeLog
doc/lispref/functions.texi
doc/lispref/loading.texi
doc/misc/ChangeLog
doc/misc/eshell.texi

diff --combined ChangeLog
+++ b/ChangeLog
 -2013-06-22  Glenn Morris  <rgm@fencepost.gnu.org>
++2013-06-24  Glenn Morris  <rgm@fencepost.gnu.org>
+       * configure.ac: Include X11/X.h when testing for Xft.h.  (Bug#14684)
 +2013-06-22  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * .bzrignore: Add GNU idutils ID database file.
 +
 +2013-06-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * configure.ac (HAVE_LIBXML2): Try built-in libxml2 on OS X 10.8
 +      as a fallback.
 +
 +2013-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * .bzrignore: Don't unignore cl-loaddefs.el.
 +
 +2013-06-20  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
 +
 +      * configure.ac (log2): Check for this function.
 +
 +2013-06-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * .bzrignore: Add GNU GLOBAL files.
 +
 +2013-06-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use functions, not macros, for XINT etc.  (Bug#11935).
 +      * configure.ac (WARN_CFLAGS): Remove -Wbad-function-cast,
 +      as it generates bogus warnings about reasonable casts of calls.
 +
 +2013-06-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * configure.ac: Report ACL usage at the end (Bug#14612).
 +
 +2013-06-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      --without-all should imply --with-file-notification=no.  (Bug#14569)
 +      * configure.ac (with_file_notification): Default to $with_features.
 +
 +2013-06-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-06-02 sig2str: port to C++
 +      2013-05-29 c-ctype, regex, verify: port to gcc -std=c90 -pedantic
 +
 +2013-06-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no.
 +      (with_file_notification): Don't set to gfile if with_ns = yes.
 +
 +2013-06-07  Richard Copley  <rcopley@gmail.com>  (tiny change)
 +
 +      * Makefile.in (msys_to_w32): Modify to support d:\foo file names.
 +      (msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape):
 +      New variables.
 +      (epaths-force-w32): Use them.  (Bug#14513)
 +
 +2013-06-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * configure.ac (HAVE_GFILENOTIFY): Check for gio >= 2.24.
 +
 +2013-06-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS.
 +      (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute.
 +
 +2013-06-03  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * configure.ac (HAVE_GLIB): Add GLib check.  Set XGSELOBJ if GLib is
 +      used.  Remove xgselect.o from XOBJ.
 +
 +2013-06-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * configure.ac (file-notification): New option, replaces inotify option.
 +      (HAVE_W32): Remove w32notify.o.
 +      (with_file_notification): Add checks for glib and w32.  Adapt check
 +      for inotify.
 +      (Summary): Add entry for file notification.
 +
 +      * autogen/config.in: Add entries for HAVE_GFILENOTIFY,
 +      HAVE_W32NOTIFY and USE_FILE_NOTIFY.
 +
 +2013-06-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * .bzrignore: Ignore dirs libexec/, share/ and var/.
 +
 +2013-05-29  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * INSTALL: Fix description.
 +
 +2013-05-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * configure.ac (HAVE_XRANDR): Check availability of
 +      XRRGetScreenResources rather than that of XRRQueryExtension.
 +
 +2013-05-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * make-dist (files): Add nt/msysconfig.sh, nt/mingw-cfg.site,
 +      nt/epaths.nt, and nt/INSTALL.MSYS.
 +
 +2013-05-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port --enable-gcc-warnings to clang.
 +      * configure.ac (nw): Remove obsolescent warnings.
 +      These aren't needed for clang, or for gcc for that matter.
 +      (emacs_cv_clang): New var, which tests for clang.
 +      Omit warnings that clang is too picky about.
 +      (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this;
 +      needed for Ubuntu 13.04 + clang + --enable-gcc-warnings.
 +
 +      * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk.
 +      Otherwise, 'configure; make' fails on non-Windows builds.
 +
 +2013-05-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lib/Makefile.am: If building for MS-Windows, include
 +      nt/gnulib.mk instead of lib/gnulib.mk.
 +
 +      * configure.ac: Adapt to MSYS build on MS-Windows.
 +
 +      * Makefile.in (NTDIR): New variable, for the MSYS build on
 +      MS-Windows.
 +      (SUBDIR): Add $(NTDIR).
 +      (.PHONY): Add epaths-force-w32.
 +      (msys_to_w32): New variable.
 +      (epaths-force-w32, install-nt, uninstall-nt): New targets.
 +      (lib-src src): Add $(NTLIB) to prerequisites.
 +      (lib lib-src lisp leim nt): Add 'nt'.
 +      (config.status): Use $(CFG).
 +      (.PHONY): Add install-$(NTDIR) and uninstall-$(NTDIR).
 +      (install, install-arch-dep): Add install-$(NTDIR).
 +      (uninstall): Depend on uninstall-$(NTDIR).
 +      (mostlyclean, clean, distclean, bootstrap-clean): Add 'nt'.
 +
 +      * GNUmakefile (CFG): New variable, uses mingw-cfg.site as
 +      CONFIG_SITE for the MSYS build on MS-Windows.
 +      (Makefile): Use $(CFG).
 +
 +      * .bzrignore: Ignore *.res, *.tmp, and *.map.  Remove
 +      src/emacs.res.
 +
 +2013-05-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-05-15 manywarnings: update for GCC 4.8.0
 +      2013-05-15 stdio: use __REDIRECT for fwrite, fwrite_unlocked
 +      2013-05-15 sig2str, stdio, warnings: port to clang
 +
 +2013-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * Makefile.in (install-doc): DOC file is not version specific any more.
 +      * .bzrignore: Don't ignore DOC-* any more.
 +
 +2013-05-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -nopie.
 +      Reported privately by Han Boetes <han@boetes.org>.
 +
 +2013-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * lib/makefile.w32-in (ACL_H): New macro.
 +      ($(BLD)/acl-errno-valid.$(O)): Update dependencies.
 +
 +2013-05-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use Gnulib ACL implementation, for benefit of Solaris etc.  (Bug#14295)
 +      * configure.ac: Remove -with-acl option, since Gnulib does that for
 +      us now.
 +      (LIBACL_LIBS): Remove; no longer needed.
 +      * lib/Makefile.am (CLEANFILES, SUFFIXES): New (empty) macros,
 +      for the benefit of the new ACL implementation.
 +      * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/acl-errno-valid.$(O).
 +      ($(BLD)/acl-errno-valid.$(O)): New rule.
 +      * lib/acl-errno-valid.c, lib/acl-internal.h, lib/acl.h:
 +      * lib/acl_entries.c, lib/errno.in.h, lib/file-has-acl.c:
 +      * lib/qcopy-acl.c, lib/qset-acl.c, m4/acl.m4, m4/errno_h.m4:
 +      New files, taken from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +
 +2013-05-07  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * configure.ac (HAVE_XRANDR, HAVE_XINERAMA): Define if available.
 +      (XRANDR_LIBS, XINERAMA_LIBS): New AC_SUBSTs.
 +
 +2013-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-04-30 utimens, utimensat: work around Solaris UTIME_OMIT bug
 +
 +2013-05-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * make-dist: Keep necessary restrictions on file access.
 +
 +2013-04-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-04-28 extern-inline: work around bug in Sun c99
 +
 +2013-04-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-04-27 alignof, intprops, malloca: port better to IBM's C compiler
 +
 +2013-04-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port better to AIX (Bug#14258).
 +      * configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
 +      we did not already infer an optimization option, and -O works.
 +      AIX xlc needs -O, otherwise garbage collection doesn't work.
 +
 +2013-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * make-dist: Do not distribute admin/unidata/Makefile.
 +      It is generated by 'configure'.
 +
 +      * build-aux/update-subdirs: Don't leave subdirs.el~ behind.
 +      It messes up 'make distclean', and contains no useful information
 +      because it's a copy of subdirs.el.
 +
 +2013-04-18  John Marino  <gnugcc@marino.st>  (tiny change)
 +
 +      * configure.ac: Add DragonFly BSD, mostly same as FreeBSD.  (Bug#14068)
 +
 +2013-04-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * configure.ac (AC_PROG_LN_S): Remove, too restrictive.
 +      (LN_S_FILEONLY): New output variable.
 +      * Makefile.in (LN_S): Remove.
 +      (LN_S_FILEONLY): New, set by configure.
 +      (install-arch-dep): Use LN_S_FILEONLY rather than LN_S.
 +
 +2013-04-12  Ken Brown  <kbrown@cornell.edu>
 +
 +      * configure.ac (canonical): Adapt to 64-bit Cygwin, for which
 +      `canonical' is `x86_64-unknown-cygwin'.
 +
 +2013-04-09  Ken Brown  <kbrown@cornell.edu>
 +
 +      * configure.ac (W32_RES_LINK): Remove unneeded linker directive
 +      `-Wl,-bpe-i386', which is confusing in the 64-bit case.
 +      (Bug#12993)
 +
 +2013-04-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
 +      * configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling
 +      and if not on GNU/Linux or FreeBSD.
 +      * lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that
 +      lib/*.o is profiled too.
 +
 +2013-03-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-03-29 stdalign: port to stricter ISO C11
 +      This helps to run 'configure' on MS-Windows; see Eli Zaretskii in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00999.html>.
 +
 +2013-03-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * configure.ac (HAVE_XKBGETKEYBOARD): Remove.
 +      Subsumed by HAVE_XKB.  All uses changed.
 +
 +2013-03-25  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * configure.ac (HAVE_XKB): Define if Xkb is present.
 +
 +2013-03-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-03-21 sys_select, sys_time: port 2013-01-30 fix to Cygwin
 +
 +2013-03-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix bug when building Emacs with a GNU Make submake (Bug#13962).
 +      * Makefile.in (QUIET_SUBMAKE): New macro.
 +      (install-info, uninstall): Use it.
 +
 +      Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9 (Bug#13867).
 +      * configure.ac (IMAGEMAGICK_MODULE): Reject 6.8.2.
 +      We want to reject 6.8.2-3 through 6.8.3-9, but there seems to be
 +      no way to do this in pkg-config, so make do with a reasonable
 +      approximation.
 +
 +      Automate the build of ja-dic.el (Bug#13984).
 +      * .bzrignore: Add leim/ja-dic/.
 +
 +2013-03-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      File synchronization fixes (Bug#13944).
 +      * configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
 +      (fsync): Remove check; now done by gnulib.
 +      * lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4:
 +      New files, from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +
 +      Merge from gnulib, incorporating:
 +      2013-03-13 putenv: port to Solaris 10
 +      2013-03-12 mktime: fix configure typo
 +      2013-03-11 regex: port to mingw's recent addition of undeclared alarm
 +      2013-03-11 putenv: avoid compilation warning on mingw
 +      2013-03-11 unistd: don't prevent Tru64 Unix from using gnulib strtod.
 +
  2013-03-11  Glenn Morris  <rgm@gnu.org>
  
 -      * Version 24.3 released.
 +      * Merge in all changes up to version 24.3 release.
  
 -2013-03-05  Paul Eggert  <eggert@cs.ucla.edu>
 +2013-03-06  Paul Eggert  <eggert@cs.ucla.edu>
  
        * configure.ac (TERM_HEADER): Remove duplicate definition (Bug#13872).
        It can mess up 'configure' runs.
  
        * Makefile.in (install-man): Ignore gzip exit status.
  
 -2013-02-14  Paul Eggert  <eggert@cs.ucla.edu>
 +2013-03-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * make-dist: Remove lzma (it's replaced by xz).
 +
 +2013-03-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-02-21 putenv: port better to native Windows
 +      2013-02-18 extern-inline: avoid compilation error with HP-UX cc
 +      2013-02-14 putenv: fix heap corruption with mixed putenv/_putenv
 +
 +2013-02-28  Ken Brown  <kbrown@cornell.edu>
 +
 +      * configure.ac (HAVE_DATA_START): Fix test.  (Bug#13818)
 +
 +2013-02-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify data_start configuration (Bug#13783).
 +      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
 +      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
 +      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
 +      not always needed.
 +      (HAVE_DATA_START): New macro.
 +
 +2013-02-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Parallelize documentation builds.
 +      This speeds up building of documentation on multiprocessor
 +      platforms, and is motivated by Texinfo 5.0, which is much slower.
 +      Add a toplevel rule 'make docs' to make all the documentation.
 +      * .bzrignore: Add .dvi, .html, .ps.
 +      * Makefile.in (DVIS, HTMLS, INFOS, PSS, DOCS): New macros.
 +      ($(DOCS), docs, vi, html, pdf, ps): New rules.
 +      (info-real): Depend on $(INFOS) rather than doing it sequentially.
 +      (dvi): Depend on $(DVIS) rather than doing it sequentially.
 +
 +2013-02-15  Paul Eggert  <eggert@cs.ucla.edu>
  
        Fix AIX port (Bug#13650).
        * configure.ac (DATA_START, DATA_SEG_BITS): Set to 0x20000000 on AIX.
 -      (GC_MARK_STACK): Do not set to GC_USE_GCPROS_AS_BEFORE on AIX, as that
 -      runs afoul of some other bug in Emacs, and the default value
 -      GC_MAKE_GCPROS_NOOPS has been tested and works.
  
 -2013-01-16  Glenn Morris  <rgm@gnu.org>
 +2013-02-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/memrchr.$(O).
 +      ($(BLD)/memrchr.$(O)): New dependency.
 +
 +2013-02-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Tune by using memchr and memrchr.
 +      * .bzrignore: Add string.h.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +      * lib/memrchr.c, lib/string.in.h, m4/memrchr.m4, m4/string_h.m4:
 +      New files, from gnulib.
 +
 +      Merge from gnulib, incorporating:
 +      2013-02-11 unsetenv etc.: port to Solaris 11 + GNU Emacs
 +      2013-02-09 secure_getenv: fix C++ declaration typo
 +
 +2013-02-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * configure.ac (emacs_config_options): Record some env vars.
 +
 +2013-02-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * configure.ac (emacs_config_options): Strip out the (internal)
 +      arguments --no-create and --no-recursion.
 +
 +2013-02-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-02-08 careadlinkat: stop exporting careadlinkatcwd
 +      The MS-Windows port can remove careadlinkatcwd at its convenience.
 +      2013-02-08 extensions: port better to HP-UX
 +      2013-02-06 extensions: port better to MINIX 3, HP-UX, autoheader 2.62
 +      2013-02-06 unistd: avoid namespace pollution on non-glibc systems
 +      2013-02-04 secure_getenv: new module [module not used by Emacs]
 +      2013-01-30 sys_time: port to Solaris 2.6
 +
 +2013-02-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
 +      On my host, this speeds up directory-files-and-attributes by a
 +      factor of 3, when applied to Emacs's src directory.
 +      These functions are standardized by POSIX and are common these
 +      days; fall back on a (slower) gnulib implementation if the host
 +      is too old to supply them.
 +      * .bzrignore: Add lib/dirent.h.
 +      * lib/Makefile.am (libgnu_a_SOURCES): Add openat-die.c, save-cwd.c.
 +      * lib/careadlinkat.c, lib/careadlinkat.h: Merge from gnulib,
 +      incorporating: 2013-01-29 careadlinkat: do not provide careadlinkatcwd.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +      * lib/dirent.in.h, lib/fdopendir.c, lib/fstatat.c, lib/openat-priv.h:
 +      * lib/openat-proc.c, lib/openat.h, m4/dirent_h.m4, m4/fdopendir.m4:
 +      * m4/fstatat.m4: New files, from gnulib.
 +      * lib/openat-die.c, lib/save-cwd.c, lib/save-cwd.h: New files.
 +      These last three are specific to Emacs and are not copied from gnulib.
 +      They are simpler than the gnulib versions and are tuned for Emacs.
 +
 +2013-02-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * make-dist: Only README files exist in lisp/ now, not README*.
 +
 +2013-01-23  Giorgos Keramidas  <gkeramidas@gmail.com>  (tiny change)
 +
 +      * .bzrignore: Add lib-src/blessmail.
 +
 +2013-01-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-01-16 unistd: port to recent mingw
 +
 +2013-01-19  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in (install-arch-indep): Put back a chmod that was
        removed 2012-05-19.  (Bug#13430)
  
 -2013-01-10  Glenn Morris  <rgm@gnu.org>
 +2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-01-16 largefile: port better to Mac OS X 10.5
 +      2013-01-15 stdint: fix build with Android's Bionic fox x86
 +
 +2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * configure.ac: Document that --enable-gcc-warnings emits errors.
 +      (Bug#13448)
 +
 +2013-01-13  Glenn Morris  <rgm@gnu.org>
  
        * make-dist: Add options for xz compression and no compression.
  
 +2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Enable conservative stack scanning for all architectures.
 +      Suggested by Stefan Monnier in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00183.html>.
 +      * configure.ac (GC_MARK_STACK): Remove.
 +
 +2013-01-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lib/getopt_.h: Remove trailing CRs that crept in.
 +
 +2013-01-11  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lib/getopt_.h: Regenerate.
 +
 +2013-01-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-01-09 stdlib: port to Solaris 2.6
 +
  2013-01-04  Glenn Morris  <rgm@gnu.org>
  
        * info/dir: Add htmlfontify.
  
 -2012-12-29  Andreas Schwab  <schwab@linux-m68k.org>
 +2013-01-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2013-01-04 stdio: remove now-unnecessary stdio.c
 +      2013-01-04 fprintftime: depend on stdio, not ignore-value
 +      2013-01-04 fwrite: silence __wur only for older glibc versions
 +      2013-01-04 fwrite: silence __wur without using inline
 +      * lib/stdio.c: Remove.
 +      * lib/stdio.in.h, lib/strftime.c: Update from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +
 +2013-01-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating copyright-date changes and:
 +      2012-12-31 dup2: work around cygwin bug
 +
 +2012-12-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * configure.ac: Check for GtkHandlebox.
 +      Check for GtkTearoffMenuItem.
 +      New enable: --enable-gtk-deprecation-warnings, default off.
 +      (HAVE_GTK3): If above enable is off, add
 +      -DGDK_DISABLE_DEPRECATION_WARNINGS to GTK_CFLAGS.
 +
 +2012-12-30  Andreas Schwab  <schwab@linux-m68k.org>
  
        * configure.ac (TEMACS_LDFLAGS2): Don't define.
        (LIBS_GNUSTEP): Set for GNUstep and substitute.
        (LD_SWITCH_SYSTEM_TEMACS): Don't set for GNUstep.
  
 -2012-12-24  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-12-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * configure.ac (emacs_config_options): New.
 +      Use $@ rather than undocumented $ac_configure_args.
 +      Replace any embedded double quotes.  (Bug#13274)
 +
 +2012-12-27  Andreas Schwab  <schwab@linux-m68k.org>
  
        * configure.ac (SIGNALS_VIA_CHARACTERS): Also define for darwin.
        (Bug#13222)
  
 -2012-12-20  Akinori MUSHA  <knu@iDaemons.org>  (tiny change)
 +2012-12-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Revert static checking of stack smashing.
 +      * configure.ac (WARN_CFLAGS): Omit -Wstack-protector when
 +      configured with --enable-gcc-warnings.  -Wstack-protector causes
 +      diagnostics to be issued on Ubuntu 12.10 x86-64.
 +
 +2012-12-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib, incorporating:
 +      2012-12-21 AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
 +      2012-12-20 AC_PROG_MKDIR_P: don't workaround if not buggy
 +      2012-12-17 filemode, sys_stat: Handle MPX files a la AIX.
 +
 +2012-12-21  Akinori MUSHA  <knu@iDaemons.org>  (tiny change)
  
        * Makefile.in (install-arch-dep): Ignore chmod errors.  (Bug#13233)
  
 +2012-12-16  Romain Francoise  <romain@orebokech.com>
 +
 +      * configure.ac (acl): New option.
 +      (HAVE_POSIX_ACL): Test for POSIX ACL support.  This is typically
 +      provided by libacl on GNU/Linux.
 +
 +2012-12-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix permissions bugs with setgid directories etc.  (Bug#13125)
 +      * configure.ac (BSD4_2): Remove; no longer needed.
 +
  2012-12-13  Glenn Morris  <rgm@gnu.org>
  
 -      * info/dir: Add bovine, wisent.
 +      * info/dir: Add bovine, srecode, wisent.
  
 -2012-12-12  Andreas Schwab  <schwab@suse.de>
 +2012-12-13  Andreas Schwab  <schwab@suse.de>
  
        * Makefile.in (install-info): Use `${MAKE} -s' for echo-info.
 -      (uninstall): Likewise.
 +      (uninstall): Likewise.  (Bug#13143)
 +
 +2012-12-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib for 'inline' (Bug#13040), incorporating:
 +      2012-12-11 extern-inline: avoid incompatibility with Darwin Libc
 +      * m4/extern-inline.m4: Update from gnulib.
 +
 +2012-12-11  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * lib/makefile.w32-in (SIG2STR_H): New macro.
 +      ($(BLD)/sig2str.$(O)): Update dependencies.
 +
 +2012-12-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * configure.ac (HAVE_INOTIFY): Speed up configure-time test.
 +      There's no need to test for any of three inotify functions,
 +      since we use all three.  Check for just the first one.
 +
 +2012-12-10  Daniel Colascione  <dancol@dancol.org>
 +
 +      * .bzrignore: Add src/emacs.res.
  
 -2012-12-12  Glenn Morris  <rgm@gnu.org>
 +      * configure.ac (W32_RES, W32_RES_LINK, WINDRES): Teach the cygw32
 +      build how to compile Windows resource files; use these variables
 +      to tell src/Makefile.in how and whether to compile resources.
  
 -      * info/dir: Add srecode.
 +2012-12-10  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
  
 -2012-12-11  Nicolas Richard  <theonewiththeevillook@yahoo.fr>  (tiny change)
 +      * configure.ac (inotify): New option.
 +      (HAVE_INOTIFY): Test for inotify.
  
 -      * Makefile.in (install-info, uninstall): Ensure make's messages
 -      about changing directories are in English.  (Bug#13143)
 +2012-12-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * configure.ac: Fix source command in .gdbinit.
 +      Don't quote $MAKEINFO.
 +
 +2012-12-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Allow spaces in some configuration vars (Bug#13078).
 +      * configure.ac (srcdir): Don't assume $PWD lacks spaces.
 +      (srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION):
 +      All uses quoted, to allow spaces in these vars.
 +
 +2012-12-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
 +      * 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.
 +
 +2012-12-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lib/makefile.w32-in ($(BLD)/sig2str.$(O)): New dependency.
 +      Remove a stray character at the beginning of the file.
 +      (Bug#13026)
 +
 +2012-12-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify get_lim_data.
 +      * configure.ac (ULIMIT_BREAK_VALUE): Remove.
 +
 +      Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
 +      * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
 +      Use SIGCHLD rather than SIGCLD.
 +      * lib/sig2str.c, lib/sig2str.h, m4/sig2str.m4: New files, from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +      * lib/makefile.w32-in (GNULIBOBJS): Add $(BUILD)/sig2str.$(O).
  
 -2012-12-05  Glenn Morris  <rgm@gnu.org>
 +2012-12-06  Glenn Morris  <rgm@gnu.org>
  
        * configure.ac: Handle info/ files with or without ".info" extension.
  
 -2012-11-24  Eli Zaretskii  <eliz@gnu.org>
 +2012-11-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Merge from gnulib for 'inline' (Bug#13040), incorporating:
 +      2012-11-29 snippet/warn-on-use: no 'static inline'
 +      2012-11-29 ftruncate, fts, lstat, openat, raise: no 'static inline'
 +      2012-11-29 arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
 +      2012-11-29 fflush, stat: no 'static inline'
 +      2012-11-29 stdio: better 'inline'
 +      2012-11-29 sys_stat: no 'static inline'
 +      2012-11-29 unistd: better 'inline'
 +      2012-11-29 c-strtod, memcoll, readutmp: no 'static inline'
 +      2012-11-29 extern-inline: no 'static inline'
 +      2012-11-29 sys_socket: better 'inline'
 +      * lib/stdio.c, lib/unistd.c: New files, from gnulib.
 +      * build-aux/snippet/warn-on-use.h, lib/gnulib.mk, lib/lstat.c:
 +      * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/stat.c:
 +      * lib/stdio.in.h, lib/sys_stat.in.h, lib/unistd.in.h, m4/c-strtod.m4:
 +      * m4/extern-inline.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/md5.m4:
 +      * m4/sha1.m4, m4/sha256.m4, m4/sha512.m4, m4/stat.m4, m4/stdio_h.m4:
 +      * m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/unistd_h.m4:
 +      Update from gnulib.
 +
 +2012-11-27  Eli Zaretskii  <eliz@gnu.org>
  
        * make-dist (nt): Adjust to changes in names of the *.manifest files.
  
 +2012-11-24  Ken Brown  <kbrown@cornell.edu>
 +
 +      * configure.ac (HAVE_MOUSE): Remove.
 +
 +2012-11-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
 +      * configure.ac: Do not check for dirent.h or closdir.
 +
 +2012-11-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
 +      * configure.ac: Do not check for getcwd or getwd.
 +
  2012-11-21  Glenn Morris  <rgm@gnu.org>
  
        * configure.ac (--enable-profiling): Doc fix.
  
 +2012-11-20  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Improve static checking of integer overflow and stack smashing.
 +      * configure.ac (WARN_CFLAGS): Add -Wstack-protector
 +      if using GCC 4.7.2 or later on a platform with
 +      at least 64-bit long int.  This improves static checking on these
 +      platforms, when configured with --enable-gcc-warnings.
 +
 +2012-11-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
 +      * configure.ac: Do not check for fcntl.h.
 +      * lib/gnulib.mk: Regenerate.
 +
 +2012-11-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove no-longer-used pty_max_bytes variable.
 +      * configure.ac (fpathconf): Remove unnecessary check.
 +
 +2012-11-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use faccessat, not access, when checking file permissions (Bug#12632).
 +      * .bzrignore: Add lib/fcntl.h.
 +      * configure.ac (euidaccess): Remove check; gnulib does this for us now.
 +      (gl_FCNTL_O_FLAGS): Define a dummy version.
 +      * lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
 +      * lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
 +      * lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
 +      * m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
 +      New files, from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +
 +2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
 +      * configure.ac (setpgid, setsid): Assume their existence.
 +      (AC_FUNC_GETPGRP, SETPGRP_RELEASES_CTTY): Remove; obsolete.
 +
 +      Simplify by assuming __fpending.
 +      Now that Emacs is using the gnulib fpending module,
 +      there's no need for Emacs to have a separate implementation.
 +      * configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks.
 +      (PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove.
 +
 +2012-11-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/fpending.$(O) and
 +      $(BLD)/close-stream.$(O).
 +      ($(BLD)/close-stream.$(O)):
 +      ($(BLD)/fpending.$(O)): New dependencies.
 +
 +2012-11-03  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix data-loss with --batch (Bug#9574).
 +      * lib/close-stream.c, lib/close-stream.h, lib/fpending.c
 +      * lib/fpending.h, m4/close-stream.m4, m4/fpending.m4:
 +      New files, from gnulib.
 +      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 +
  2012-11-03  Eli Zaretskii  <eliz@gnu.org>
  
        * config.bat: Copy lib/execinfo.in.h to lib/execinfo.in-h if needed.
  
 +2012-11-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (EMACS_ICON): New variable.
 +      (install-etc): Use EMACS_ICON to allow choice of icon.
 +
  2012-10-26  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in (EMACS_NAME): New variable.
  
  2012-02-05  Christoph Scholtes  <cschol2112@googlemail.com>
  
 -      * make-dist (README.W32): Include file in source tarball. (Bug#9750)
 +      * make-dist (README.W32): Include file in source tarball.  (Bug#9750)
  
        * lib/makefile.w32-in (PRAGMA_SYSTEM_HEADER): Move to platform
        specific makefiles to support getopt_.h generation with MSVC.
diff --combined configure.ac
@@@ -22,22 -22,7 +22,22 @@@ dnl  You should have received a copy o
  dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
  
  AC_PREREQ(2.65)
 -AC_INIT(emacs, 24.3)
 +AC_INIT(emacs, 24.3.50)
 +
 +dnl This is the documented way to record the args passed to configure,
 +dnl rather than $ac_configure_args.
 +emacs_config_options="$@"
 +## Add some environment variables, if they were passed via the environment
 +## rather than on the command-line.
 +for var in CFLAGS CPPFLAGS LDFLAGS; do
 +    case "$emacs_config_options" in
 +      *$var=*) continue ;;
 +    esac
 +    eval val="\$${var}"
 +    test x"$val" = x && continue
 +    emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
 +done
 +
  AC_CONFIG_HEADER(src/config.h:src/config.in)
  AC_CONFIG_SRCDIR(src/lisp.h)
  AC_CONFIG_AUX_DIR(build-aux)
@@@ -86,7 -71,7 +86,7 @@@ AC_DEFUN([OPTION_DEFAULT_OFF], [dn
  ])dnl
  
  dnl OPTION_DEFAULT_ON(NAME, HELP-STRING)
 -dnl Create a new --with option that defaults to $enable_features.
 +dnl Create a new --with option that defaults to $with_features.
  dnl NAME is the base name of the option.  The shell variable with_NAME
  dnl   will be set either to 'no' (for a plain --without-NAME) or to
  dnl   'yes' (if the option is not specified).  Note that the shell
@@@ -145,7 -130,7 +145,7 @@@ OPTION_DEFAULT_ON([sound],[don't compil
  
  dnl FIXME currently it is not the last.
  dnl This should be the last --with option, because --with-x is
 -dnl added later on when we find the path of X, and it's best to
 +dnl added later on when we find the file name of X, and it's best to
  dnl keep them together visually.
  AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
   [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])],
@@@ -192,7 -177,7 +192,7 @@@ OPTION_DEFAULT_ON([toolkit-scroll-bars]
  OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
  OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
  OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
 -OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI])
 +OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
  
  OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
  OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
@@@ -201,23 -186,6 +201,23 @@@ OPTION_DEFAULT_ON([gsettings],[don't co
  OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
  OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
  
 +AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
 + [use a file notification library (LIB one of: yes, gfile, inotify, w32, no)])],
 + [ case "${withval}" in
 +    y | ye | yes )    val=yes ;;
 +    n | no )          val=no  ;;
 +    g | gf | gfi | gfil | gfile )     val=gfile ;;
 +    i | in | ino | inot | inoti | inotif | inotify )  val=inotify ;;
 +    w | w3 | w32 )    val=w32 ;;
 +    * ) AC_MSG_ERROR([`--with-file-notification=$withval' is invalid;
 +this option's value should be `yes', `no', `gfile', `inotify' or `w32'.
 +`yes' is a synonym for `w32' on MS-Windows, and for `gfile' otherwise.])
 +    ;;
 +   esac
 +   with_file_notification=$val
 + ],
 + [with_file_notification=$with_features])
 +
  ## For the times when you want to build Emacs but don't have
  ## a suitable makeinfo, and can live without the manuals.
  dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
  AC_SUBST(GZIP_INFO)
  
  AC_ARG_WITH([pkg-config-prog],dnl
 -[AS_HELP_STRING([--with-pkg-config-prog=PATH],
 -                  [path to pkg-config for finding GTK and librsvg])])
 +[AS_HELP_STRING([--with-pkg-config-prog=FILENAME],
 +                  [file name of pkg-config for finding GTK and librsvg])])
  if test "X${with_pkg_config_prog}" != X; then
     if test "${with_pkg_config_prog}" != yes; then
        PKG_CONFIG="${with_pkg_config_prog}"
     fi
  fi
  
 -CRT_DIR=
 -AC_ARG_WITH([crt-dir],dnl
 -[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc.
 -The default is /usr/lib, or /usr/lib64 on some platforms.])])
 -CRT_DIR="${with_crt_dir}"
 -
  AC_ARG_WITH(gameuser,dnl
  [AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])])
  test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
  test "X$gameuser" = X && gameuser=games
  
  AC_ARG_WITH([gnustep-conf],dnl
 -[AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
 +[AS_HELP_STRING([--with-gnustep-conf=FILENAME],
 +   [name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
  test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
    GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
  test "X$GNUSTEP_CONFIG_FILE" = "X" && \
@@@ -380,33 -353,28 +380,33 @@@ AC_ARG_ENABLE(autodepend
                 found])],
  [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes])
  
 +AC_ARG_ENABLE(gtk-deprecation-warnings,
 +[AS_HELP_STRING([--enable-gtk-deprecation-warnings],
 +              [Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
 +[ac_enable_gtk_deprecation_warnings="${enableval}"],[])
 +
  #### Make srcdir absolute, if it isn't already.  It's important to
 -#### avoid running the path through pwd unnecessarily, since pwd can
 +#### avoid running the file name through pwd unnecessarily, since pwd can
  #### give you automounter prefixes, which can go away.  We do all this
  #### so Emacs can find its files when run uninstalled.
  ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
  unset CDPATH
  case "${srcdir}" in
 -  /* ) ;;
 +  [[\\/]]* | ?:[[\\/]]*) ;;
    . )
      ## We may be able to use the $PWD environment variable to make this
      ## absolute.  But sometimes PWD is inaccurate.
 -    ## Note: we used to use ${PWD} at the end instead of `pwd`,
 +    ## Note: we used to use $PWD at the end instead of `pwd`,
      ## but that tested only for a well-formed and valid PWD,
      ## it did not object when PWD was well-formed and valid but just wrong.
 -    if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`"  ;
 +    if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`"  ;
      then
        srcdir="$PWD"
      else
 -      srcdir="`(cd ${srcdir}; pwd)`"
 +      srcdir=`(cd "$srcdir"; pwd)`
      fi
    ;;
 -  *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
 +  *  ) srcdir=`(cd "$srcdir"; pwd)` ;;
  esac
  
  ### Canonicalize the configuration name.
@@@ -454,11 -422,6 +454,11 @@@ case "${canonical}" i
      opsys=freebsd
    ;;
  
 +  ## DragonFly ports
 +  *-*-dragonfly* )
 +    opsys=dragonfly
 +  ;;
 +
    ## FreeBSD kernel + glibc based userland
    *-*-kfreebsd*gnu* )
      opsys=gnu-kfreebsd
  ##    fi
    ;;
  
 +  ## Cygwin ports
 +  *-*-cygwin )
 +    opsys=cygwin
 +  ;;
 +
    ## HP 9000 series 700 and 800, running HP/UX
    hppa*-hp-hpux10.2* )
      opsys=hpux10-20
    ## Intel 386 machines where we don't care about the manufacturer.
    i[3456]86-*-* )
      case "${canonical}" in
 -      *-cygwin )                opsys=cygwin ;;
        *-darwin* )               opsys=darwin ;;
 +      *-mingw32 )
 +              opsys=mingw32
 +              # MinGW overrides and adds some system headers in nt/inc.
 +              GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
 +              ;;
        *-sysv4.2uw* )          opsys=unixware ;;
        *-sysv5uw* )            opsys=unixware ;;
        *-sysv5OpenUNIX* )      opsys=unixware ;;
@@@ -623,14 -577,6 +623,14 @@@ els
    test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
  fi
  
 +dnl This is used in lib/Makefile.am to use nt/gnulib.mk, the
 +dnl alternative to lib/gnulib.mk, so as to avoid generating header files
 +dnl that clash with MinGW.
 +AM_CONDITIONAL([BUILDING_FOR_WINDOWSNT], [test "x$opsys" = "xmingw32"])
 +
 +# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
 +# as we don't use them.
 +AC_DEFUN([gl_FCNTL_O_FLAGS])
  # Avoid gnulib's threadlib module, as we do threads our own way.
  AC_DEFUN([gl_THREADLIB])
  
  dnl Amongst other things, this sets AR and ARFLAGS.
  gl_EARLY
  
 -# It's helpful to have C macros available to GDB, so prefer -g3 to -g
 -# if -g3 works and the user does not specify CFLAGS.
 -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
  if test "$ac_test_CFLAGS" != set; then
 +  # It's helpful to have C macros available to GDB, so prefer -g3 to -g
 +  # if -g3 works and the user does not specify CFLAGS.
 +  # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
    case $CFLAGS in
      '-g')
        emacs_g3_CFLAGS='-g3';;
        [emacs_cv_prog_cc_g3],
        [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
         [emacs_cv_prog_cc_g3=yes],
 -         [emacs_cv_prog_cc_g3=no])])
 -    if test $emacs_cv_prog_cc_g3 = yes; then
 -      CFLAGS=$emacs_g3_CFLAGS
 -    else
 +       [emacs_cv_prog_cc_g3=no])])
 +    if test $emacs_cv_prog_cc_g3 != yes; then
        CFLAGS=$emacs_save_CFLAGS
      fi
 +    if test $opsys = mingw32; then
 +      CFLAGS="$CFLAGS -gdwarf-2"
 +    fi
    fi
 +
 +  case $CFLAGS in
 +    *-O*) ;;
 +    *)
 +      # No optimization flag was inferred for this non-GCC compiler.
 +      # Try -O.  This is needed for xlc on AIX; see Bug#14258.
 +      emacs_save_CFLAGS=$CFLAGS
 +      test -z "$CFLAGS" || CFLAGS="$CFLAGS "
 +      CFLAGS=${CFLAGS}-O
 +      AC_CACHE_CHECK([whether $CC accepts -O],
 +        [emacs_cv_prog_cc_o],
 +      [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
 +         [emacs_cv_prog_cc_o=yes],
 +         [emacs_cv_prog_cc_o=no])])
 +      if test $emacs_cv_prog_cc_o != yes; then
 +      CFLAGS=$emacs_save_CFLAGS
 +      fi ;;
 +  esac
  fi
  
  AC_ARG_ENABLE([gcc-warnings],
@@@ -763,45 -690,41 +763,45 @@@ els
    esac
    AC_SUBST([WERROR_CFLAGS])
  
 -  nw="$nw -Waggregate-return"       # anachronistic
 -  nw="$nw -Wlong-long"              # C90 is anachronistic
 -  nw="$nw -Wc++-compat"             # We don't care about C++ compilers
 -  nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
 -  nw="$nw -Wtraditional"            # Warns on #elif which we use often
 -  nw="$nw -Wcast-qual"              # Too many warnings for now
 -  nw="$nw -Wconversion"             # Too many warnings for now
    nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
 -  nw="$nw -Wsign-conversion"        # Too many warnings for now
    nw="$nw -Woverlength-strings"     # Not a problem these days
 -  nw="$nw -Wtraditional-conversion" # Too many warnings for now
 -  nw="$nw -Wunreachable-code"       # so buggy that it's now silently ignored
 -  nw="$nw -Wpadded"                 # Our structs are not padded
 -  nw="$nw -Wredundant-decls"        # we regularly (re)declare functions
    nw="$nw -Wlogical-op"             # any use of fwrite provokes this
    nw="$nw -Wformat-nonliteral"      # we do this a lot
    nw="$nw -Wvla"                    # warnings in gettext.h
    nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
 -  nw="$nw -Wswitch-enum"            # Too many warnings for now
    nw="$nw -Wswitch-default"         # Too many warnings for now
 -  nw="$nw -Wfloat-equal"            # warns about high-quality code
    nw="$nw -Winline"                 # OK to ignore 'inline'
    nw="$nw -Wjump-misses-init"       # We sometimes safely jump over init.
 +  nw="$nw -Wstrict-overflow"        # OK to optimize assuming that
 +                                    # signed overflow has undefined behavior
    nw="$nw -Wsync-nand"              # irrelevant here, and provokes ObjC warning
    nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
 +  nw="$nw -Wbad-function-cast"      # These casts are no worse than others.
  
    # Emacs doesn't care about shadowing; see
    # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
    nw="$nw -Wshadow"
  
 -  # The following lines should be removable at some point.
 +  # Emacs's use of alloca inhibits protecting the stack.
    nw="$nw -Wstack-protector"
 -  nw="$nw -Wstrict-overflow"
 +
 +  # The following line should be removable at some point.
    nw="$nw -Wsuggest-attribute=pure"
  
 +  # clang is unduly picky about some things.
 +  AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
 +    [AC_COMPILE_IFELSE(
 +       [AC_LANG_PROGRAM([[
 +          #ifndef __clang__
 +            #error "not clang"
 +          #endif
 +          ]])],
 +       [emacs_cv_clang=yes],
 +       [emacs_cv_clang=no])])
 +  if test $emacs_cv_clang = yes; then
 +    nw="$nw -Wcast-align"
 +  fi
 +
    gl_MANYWARN_ALL_GCC([ws])
    gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
    for w in $ws; do
    # gcc 4.5.0 20090517.
    gl_WARN_ADD([-Wno-logical-op])
  
 +  # More things that clang is unduly picky about.
 +  if test $emacs_cv_clang = yes; then
 +    gl_WARN_ADD([-Wno-format-extra-args])
 +    gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
 +    gl_WARN_ADD([-Wno-unused-command-line-argument])
 +    gl_WARN_ADD([-Wno-unused-value])
 +  fi
 +
    gl_WARN_ADD([-fdiagnostics-show-option])
    gl_WARN_ADD([-funit-at-a-time])
  
@@@ -857,48 -772,7 +857,48 @@@ dnl AC_PROG_MKDIR_
  dnl if test "x$RANLIB" = x; then
  dnl   AC_PROG_RANLIB
  dnl fi
 -AC_PROG_LN_S
 +
 +
 +dnl Sadly, AC_PROG_LN_S is too restrictive.  It also tests whether links
 +dnl can be made to directories.  This is not relevant for our usage, and
 +dnl excludes some cases that work fine for us.  Eg MS Windows or files
 +dnl hosted on AFS, both examples where simple links work, but links to
 +dnl directories fail.  We use a cut-down version instead.
 +dnl AC_PROG_LN_S
 +
 +AC_MSG_CHECKING([whether ln -s works for files in the same directory])
 +rm -f conf$$ conf$$.file
 +
 +LN_S_FILEONLY='cp -p'
 +
 +if (echo >conf$$.file) 2>/dev/null; then
 +  if ln -s conf$$.file conf$$ 2>/dev/null; then
 +    LN_S_FILEONLY='ln -s'
 +  elif ln conf$$.file conf$$ 2>/dev/null; then
 +    LN_S_FILEONLY=ln
 +  fi
 +fi
 +
 +rm -f conf$$ conf$$.file
 +
 +if test "$LN_S_FILEONLY" = "ln -s"; then
 +   AC_MSG_RESULT([yes])
 +else
 +   AC_MSG_RESULT([no, using $LN_S_FILEONLY])
 +fi
 +
 +AC_SUBST(LN_S_FILEONLY)
 +
 +
 +dnl AC_PROG_LN_S sets LN_S to 'cp -pR' for MinGW, on the premise that 'ln'
 +dnl doesn't support links to directories, as in "ln file dir".  But that
 +dnl use is non-portable, and OTOH MinGW wants to use hard links for Emacs
 +dnl executables at "make install" time.
 +dnl See http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00475.html
 +dnl for more details.
 +if test "$opsys" = "mingw32"; then
 +  LN_S="ln"
 +fi
  
  AC_PATH_PROG(INSTALL_INFO, install-info, :,
    $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
  AC_PATH_PROG(MAKEINFO, makeinfo, no)
  dnl By this stage, configure has already checked for egrep and set EGREP,
  dnl or exited with an error if no egrep was found.
 -if test "$MAKEINFO" != "no" && \
 -  test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)'`" = x; then
 -   MAKEINFO=no
 +if test "$MAKEINFO" != "no"; then
 +  case `
 +    $MAKEINFO --version 2> /dev/null |
 +    $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)'
 +  ` in
 +    '') MAKEINFO=no;;
 +  esac
  fi
  
  ## Makeinfo is unusual.  For a released Emacs, the manuals are
@@@ -944,7 -814,7 +944,7 @@@ if test "$MAKEINFO" = "no"; the
    MAKEINFO=makeinfo
    if test "x${with_makeinfo}" = "xno"; then
      HAVE_MAKEINFO=no
 -  elif test ! -e $srcdir/info/emacs && test ! -e $srcdir/info/emacs.info; then
 +  elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
      AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your
  source tree does not seem to have pre-built manuals in the `info' directory.
  Either install a suitable version of makeinfo, or re-run configure
@@@ -1005,6 -875,7 +1005,6 @@@ AC_SUBST(CANNOT_DUMP
  UNEXEC_OBJ=unexelf.o
  case "$opsys" in
    # MSDOS uses unexcoff.o
 -  # MSWindows uses unexw32.o
    aix4-2)
     UNEXEC_OBJ=unexaix.o
     ;;
    hpux10-20 | hpux11)
     UNEXEC_OBJ=unexhp9k800.o
     ;;
 +  mingw32)
 +   UNEXEC_OBJ=unexw32.o
 +   ;;
    sol2-10)
     # Use the Solaris dldump() function, called from unexsol.c, to dump
     # emacs, instead of the generic ELF dump code found in unexelf.c.
@@@ -1038,7 -906,7 +1038,7 @@@ esa
  
  LD_SWITCH_SYSTEM=
  case "$opsys" in
 -  freebsd)
 +  freebsd|dragonfly)
     ## Let `ld' find image libs and similar things in /usr/local/lib.
     ## The system compiler, GCC, has apparently been modified to not
     ## look there, contrary to what a stock GCC would do.
     ;;
  
    openbsd)
 -   ## Han Boetes <han@mijncomputer.nl> says this is necessary,
 +   ## Han Boetes <han@boetes.org> says this is necessary,
     ## otherwise Emacs dumps core on elf systems.
     LD_SWITCH_SYSTEM="-Z"
     ;;
@@@ -1114,7 -982,6 +1114,7 @@@ C_SWITCH_SYSTEM
  ## additional optimization.  --nils@exp-math.uni-essen.de
  test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
    C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
 +test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
  ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
  ## It is redundant in glibc2, since we define _GNU_SOURCE.
  AC_SUBST(C_SWITCH_SYSTEM)
@@@ -1125,7 -992,7 +1125,7 @@@ case "$opsys" i
    ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
    aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
  
 -  freebsd) LIBS_SYSTEM="-lutil" ;;
 +  freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
  
    hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
  
    ## Motif needs -lgen.
    unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
  esac
 -AC_SUBST(LIBS_SYSTEM)
  
 +AC_SUBST(LIBS_SYSTEM)
  
  ### Make sure subsequent tests use flags consistent with the build flags.
  
@@@ -1152,33 -1019,42 +1152,33 @@@ AC_DEFUN([AC_TYPE_UID_T]
  
  
  LIB_MATH=-lm
 -LIB_STANDARD=
 -START_FILES=
  dnl Current possibilities handled by sed (aix4-2 -> aix,
  dnl gnu-linux -> gnu/linux, etc.):
  dnl gnu, gnu/linux, gnu/kfreebsd, aix, cygwin, darwin, hpux, irix.
  dnl And special cases: berkeley-unix, usg-unix-v, ms-dos, windows-nt.
  SYSTEM_TYPE=`echo $opsys | sed -e 's/[[0-9]].*//' -e 's|-|/|'`
  
 -dnl NB do not use CRT_DIR unquoted here, since it might not be set yet.
  case $opsys in
    cygwin )
      LIB_MATH=
 -    START_FILES='pre-crt0.o'
      ;;
    darwin )
      ## Adding -lm confuses the dynamic linker, so omit it.
      LIB_MATH=
 -    START_FILES='pre-crt0.o'
      ;;
 -  freebsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
 +  freebsd | dragonfly )
      SYSTEM_TYPE=berkeley-unix
      ;;
    gnu-linux | gnu-kfreebsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
      ;;
    hpux10-20 | hpux11 )
 -    LIB_STANDARD=-lc
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
 +    ;;
 +  mingw32 )
 +    LIB_MATH=
 +    SYSTEM_TYPE=windows-nt
      ;;
    dnl NB this may be adjusted below.
    netbsd | openbsd )
 -    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
 -    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
      SYSTEM_TYPE=berkeley-unix
      ;;
  
  esac
  
  AC_SUBST(LIB_MATH)
 -AC_SUBST(START_FILES)
  AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE",
    [The type of system you are compiling for; sets `system-type'.])
  
 -dnl Not all platforms use crtn.o files.  Check if the current one does.
 -crt_files=
 -
 -for file in x $LIB_STANDARD $START_FILES; do
 -  case "$file" in
 -    *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
 -  esac
 -done
 -
 -if test "x$crt_files" != x; then
 -
 -  ## If user specified a crt-dir, use that unconditionally.
 -  crt_gcc=no
 -
 -  if test "X$CRT_DIR" = "X"; then
 -
 -    CRT_DIR=/usr/lib            # default
 -
 -    case "$canonical" in
 -      x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
 -      ## On x86-64 and s390x GNU/Linux distributions, the standard library
 -      ## can be in a variety of places.  We only try /usr/lib64 and /usr/lib.
 -      ## For anything else (eg /usr/lib32), it is up the user to specify
 -      ## the location (bug#5655).
 -      ## Test for crtn.o, not just the directory, because sometimes the
 -      ## directory exists but does not have the relevant files (bug#1287).
 -      ## FIXME better to test for binary compatibility somehow.
 -      test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
 -      ;;
 -
 -      powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
 -    esac
 -
 -    case "$opsys" in
 -      hpux10-20) CRT_DIR=/lib ;;
 -    esac
 -
 -    test "x${GCC}" = xyes && crt_gcc=yes
 -
 -  fi                            # CRT_DIR = ""
 -
 -  crt_missing=
 -
 -  for file in $crt_files; do
 -
 -    ## If we're using gcc, try to determine it automatically by asking
 -    ## gcc.  [If this doesn't work, CRT_DIR will remain at the
 -    ## system-dependent default from above.]
 -    if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
 -
 -       crt_file=`$CC --print-file-name=$file 2>/dev/null`
 -       case "$crt_file" in
 -         */*)
 -           CRT_DIR=`AS_DIRNAME(["$crt_file"])`
 -           ;;
 -       esac
 -    fi
 -
 -    dnl We expect all the files to be in a single directory, so after the
 -    dnl first there is no point asking gcc.
 -    crt_gcc=no
 -
 -    test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
 -  done                          # $crt_files
 -
 -  test "x$crt_missing" = x || \
 -    AC_MSG_ERROR([Required file(s) not found:$crt_missing
 -Try using the --with-crt-dir option.])
 -
 -fi                              # crt_files != ""
 -
 -AC_SUBST(CRT_DIR)
 -
 -case $opsys in
 -  netbsd | openbsd )
 -    if test -f $CRT_DIR/crti.o; then
 -
 -        test -f $CRT_DIR/crtn.o || \
 -          AC_MSG_ERROR([Required file not found: crtn.o])
 -
 -        LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
 -        START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
 -    fi
 -    ;;
 -esac
 -
  
  pre_PKG_CONFIG_CFLAGS=$CFLAGS
  pre_PKG_CONFIG_LIBS=$LIBS
@@@ -1207,15 -1170,15 +1207,15 @@@ AC_DEFUN([PKG_CHECK_MODULES], 
  
    if test "$PKG_CONFIG" = "no" ; then
       ifelse([$4], , [AC_MSG_ERROR([
 -      *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4])
 +      *** The pkg-config script could not be found. Make sure it is in your path, or give the full name of pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4])
    else
       PKG_CONFIG_MIN_VERSION=0.9.0
 -     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
 +     if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
          AC_MSG_CHECKING(for $2)
  
 -        if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
 -         $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
 -         $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
 +        if "$PKG_CONFIG" --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
 +         $1_CFLAGS=`"$PKG_CONFIG" --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
 +         $1_LIBS=`"$PKG_CONFIG" --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
            edit_cflags="
              s,///*,/,g
              s/^/ /
              ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.  Do it in a subshell
            ## to capture any diagnostics in invoking pkg-config.
 -          $1_PKG_ERRORS=`($PKG_CONFIG --print-errors "$2") 2>&1`
 +          $1_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$2") 2>&1`
            ifelse([$4], ,echo "$$1_PKG_ERRORS",)
          fi
  
    fi
  ])
  
 -
  if test "${with_sound}" != "no"; then
 -  # Sound support for GNU/Linux and the free BSDs.
 -  AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h,
 -    have_sound_header=yes)
 +  # Sound support for GNU/Linux, the free BSDs, and MinGW.
 +  AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h,
 +    have_sound_header=yes, [], [
 +    #ifdef __MINGW32__
 +    #define WIN32_LEAN_AND_MEAN
 +    #include <windows.h>
 +    #endif
 +    ])
    # Emulation library used on NetBSD.
    AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
    AC_SUBST(LIBSOUND)
    if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
       case "$opsys" in
         dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
 -       gnu-linux|freebsd|netbsd)
 +       gnu-linux|freebsd|netbsd|mingw32)
           AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.])
           ;;
       esac
  dnl checks for header files
  AC_CHECK_HEADERS_ONCE(
    linux/version.h sys/systeminfo.h
 -  stdio_ext.h fcntl.h coff.h pty.h
 -  sys/vlimit.h sys/resource.h
 -  sys/utsname.h pwd.h utmp.h dirent.h util.h)
 +  coff.h pty.h
 +  sys/resource.h
 +  sys/utsname.h pwd.h utmp.h util.h)
  
  AC_MSG_CHECKING(if personality LINUX32 can be set)
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])],
@@@ -1530,6 -1489,8 +1530,6 @@@ if test "${with_ns}" != no; the
       CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
       LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
       LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
 -     LIB_STANDARD=
 -     START_FILES=
       dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
       dnl If they had chosen to either define it or not, we could have
       dnl just used AC_CHECK_DECL here.
@@@ -1618,101 -1579,26 +1618,101 @@@ AC_SUBST(INSTALL_ARCH_INDEP_EXTRA
  AC_SUBST(ns_self_contained)
  AC_SUBST(NS_OBJ)
  AC_SUBST(NS_OBJC_OBJ)
 -AC_SUBST(LIB_STANDARD)
  
  HAVE_W32=no
  W32_OBJ=
  W32_LIBS=
 +EMACSRES=
 +CLIENTRES=
 +CLIENTW=
 +W32_RES_LINK=
 +EMACS_MANIFEST=
  if test "${with_w32}" != no; then
 -  if test "${opsys}" != "cygwin"; then
 -    AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin.])
 +  case "${opsys}" in
 +    cygwin)
 +      AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
 +             [AC_MSG_ERROR([`--with-w32' was specified, but windows.h
 +                   cannot be found.])])
 +    ;;
 +    mingw32)
 +    ## Using --with-w32 with MinGW is a no-op, but we allow it.
 +    ;;
 +    *)
 +      AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.])
 +    ;;
 +  esac
 +fi
 +
 +if test "${opsys}" = "mingw32"; then
 +  AC_MSG_CHECKING([whether Windows API headers are recent enough])
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 +     #include <windows.h>
 +     #include <usp10.h>]],
 +   [[void test(PIMAGE_NT_HEADERS pHeader)
 +     {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
 +   [emacs_cv_w32api=yes
 +    HAVE_W32=yes],
 +   emacs_cv_w32api=no)
 +  AC_MSG_RESULT($emacs_cv_w32api)
 +  if test "${emacs_cv_w32api}" = "no"; then
 +    AC_MSG_ERROR([the Windows API headers are too old to support this build.])
    fi
 -  AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
 -                  [AC_MSG_ERROR([`--with-w32' was specified, but windows.h
 -                  cannot be found.])])
 +fi
 +
 +FIRSTFILE_OBJ=
 +NTDIR=
 +LIBS_ECLIENT=
 +LIB_WSOCK32=
 +NTLIB=
 +CM_OBJ="cm.o"
 +XARGS_LIMIT=
 +if test "${HAVE_W32}" = "yes"; then
    AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
 +  AC_CHECK_TOOL(WINDRES, [windres],
 +                [AC_MSG_ERROR([No resource compiler found.])])
    W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
    W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
 -  W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
 -  W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
 +  EMACSRES="emacs.res"
 +  case "$canonical" in
 +    x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
 +    *) EMACS_MANIFEST="emacs-x86.manifest" ;;
 +  esac
 +  if test "${opsys}" = "cygwin"; then
 +    W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
 +    W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
 +    # Tell the linker that emacs.res is an object (which we compile from
 +    # the rc file), not a linker script.
 +    W32_RES_LINK="-Wl,emacs.res"
 +  else
 +    W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
 +    W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
 +    W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
 +    W32_RES_LINK="\$(EMACSRES)"
 +    CLIENTRES="emacsclient.res"
 +    CLIENTW="emacsclientw\$(EXEEXT)"
 +    FIRSTFILE_OBJ=firstfile.o
 +    NTDIR=nt
 +    CM_OBJ=
 +    LIBS_ECLIENT="-lcomctl32"
 +    LIB_WSOCK32="-lwsock32"
 +    NTLIB="ntlib.$ac_objext"
 +    XARGS_LIMIT="-s 10000"
 +  fi
  fi
  AC_SUBST(W32_OBJ)
  AC_SUBST(W32_LIBS)
 +AC_SUBST(EMACSRES)
 +AC_SUBST(EMACS_MANIFEST)
 +AC_SUBST(CLIENTRES)
 +AC_SUBST(CLIENTW)
 +AC_SUBST(W32_RES_LINK)
 +AC_SUBST(FIRSTFILE_OBJ)
 +AC_SUBST(NTDIR)
 +AC_SUBST(CM_OBJ)
 +AC_SUBST(LIBS_ECLIENT)
 +AC_SUBST(LIB_WSOCK32)
 +AC_SUBST(NTLIB)
 +AC_SUBST(XARGS_LIMIT)
  
  if test "${HAVE_W32}" = "yes"; then
    window_system=w32
@@@ -1818,20 -1704,6 +1818,20 @@@ if test "${system_malloc}" = "yes"; the
  else
    test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
    VMLIMIT_OBJ=vm-limit.o
 +
 +  AC_CHECK_HEADERS([sys/vlimit.h])
 +  AC_CACHE_CHECK([for data_start], [emacs_cv_data_start],
 +    [AC_LINK_IFELSE(
 +       [AC_LANG_PROGRAM(
 +       [[extern char data_start[]; char ch;]],
 +       [[return data_start < &ch;]])],
 +       [emacs_cv_data_start=yes],
 +       [emacs_cv_data_start=no])])
 +  if test $emacs_cv_data_start = yes; then
 +    AC_DEFINE([HAVE_DATA_START], 1,
 +      [Define to 1 if data_start is the address of the start
 +       of the main data segment.])
 +  fi
  fi
  AC_SUBST(GMALLOC_OBJ)
  AC_SUBST(VMLIMIT_OBJ)
@@@ -2001,7 -1873,7 +2001,7 @@@ if test "${HAVE_X11}" = "yes"; the
        emacs_xkb=yes, emacs_xkb=no)
    AC_MSG_RESULT($emacs_xkb)
    if test $emacs_xkb = yes; then
 -    AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.])
 +    AC_DEFINE(HAVE_XKB, 1, [Define to 1 if you have the Xkb extension.])
    fi
  
    AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
  
  ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
  HAVE_RSVG=no
 -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
 +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
    if test "${with_rsvg}" != "no"; then
      RSVG_REQUIRED=2.11.0
      RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
@@@ -2060,8 -1932,7 +2060,8 @@@ if test "${HAVE_X11}" = "yes"; the
      ## 6.2.8 is the earliest version known to work, but earlier versions
      ## might work - let us know if you find one.
      ## 6.0.7 does not work.  See bug#7955.
 -    IMAGEMAGICK_MODULE="Wand >= 6.2.8"
 +    ## 6.8.2 makes Emacs crash; see Bug#13867.
 +    IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
      PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
      AC_SUBST(IMAGEMAGICK_CFLAGS)
      AC_SUBST(IMAGEMAGICK_LIBS)
@@@ -2080,46 -1951,40 +2080,46 @@@ HAVE_GTK=n
  GTK_OBJ=
  check_gtk2=no
  gtk3_pkg_errors=
 -if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
 -  GLIB_REQUIRED=2.28
 -  GTK_REQUIRED=3.0
 -  GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
 -
 -  dnl Checks for libraries.
 -  PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
 -  if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
 -     AC_MSG_ERROR($GTK_PKG_ERRORS)
 -  fi
 -  if test "$pkg_check_gtk" = "yes"; then
 -     AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
 -     GTK_OBJ=emacsgtkfixed.o
 -     term_header=gtkutil.h
 -     USE_GTK_TOOLKIT="GTK3"
 -  else
 -     check_gtk2=yes
 -     gtk3_pkg_errors="$GTK_PKG_ERRORS "
 +if test "${opsys}" != "mingw32"; then
 +  if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
 +    GLIB_REQUIRED=2.28
 +    GTK_REQUIRED=3.0
 +    GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
 +
 +    dnl Checks for libraries.
 +    PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
 +    if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
 +       AC_MSG_ERROR($GTK_PKG_ERRORS)
 +    fi
 +    if test "$pkg_check_gtk" = "yes"; then
 +       AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
 +       GTK_OBJ=emacsgtkfixed.o
 +       term_header=gtkutil.h
 +       USE_GTK_TOOLKIT="GTK3"
 +       if test "x$ac_enable_gtk_deprecation_warnings" = x; then
 +                GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
 +                GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
 +       fi
 +    else
 +       check_gtk2=yes
 +       gtk3_pkg_errors="$GTK_PKG_ERRORS "
 +    fi
    fi
 -fi
  
 -if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
 -  GLIB_REQUIRED=2.10
 -  GTK_REQUIRED=2.10
 -  GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
 +  if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
 +    GLIB_REQUIRED=2.10
 +    GTK_REQUIRED=2.10
 +    GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
  
 -  dnl Checks for libraries.
 -  PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
 -  if test "$pkg_check_gtk" = "no" &&
 -     { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
 -  then
 -    AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS)
 +    dnl Checks for libraries.
 +    PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
 +    if test "$pkg_check_gtk" = "no" &&
 +       { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
 +    then
 +      AC_MSG_ERROR($gtk3_pkg_errors$GTK_PKG_ERRORS)
 +    fi
 +    test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
    fi
 -  test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
  fi
  
  if test x"$pkg_check_gtk" = xyes; then
      AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.])
      GTK_OBJ="gtkutil.o $GTK_OBJ"
      USE_X_TOOLKIT=none
 -    if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
 +    if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
        :
      else
        AC_MSG_WARN([[Your version of Gtk+ will have problems with
@@@ -2176,23 -2041,6 +2176,23 @@@ if test "${HAVE_GTK}" = "yes"; the
      AC_CHECK_FUNCS(gtk_file_selection_new)
    fi
  
 +  dnl Same as above for gtk_handle_box.
 +  HAVE_GTK_HANDLE_BOX=no
 +  AC_CHECK_DECL(GTK_TYPE_HANDLE_BOX, HAVE_GTK_HANDLE_BOX=yes,
 +                   HAVE_GTK_HANDLE_BOX=no, [AC_INCLUDES_DEFAULT
 +#include <gtk/gtk.h>])
 +  if test "$HAVE_GTK_HANDLE_BOX" = yes; then
 +    AC_CHECK_FUNCS(gtk_handle_box_new)
 +  fi
 +
 +  dnl Same as above for gtk_tearoff_menu_item.
 +  HAVE_GTK_TEAROFF_MENU_ITEM=no
 +  AC_CHECK_DECL(GTK_TYPE_TEAROFF_MENU_ITEM, HAVE_GTK_TEAROFF_MENU_ITEM=yes,
 +                   HAVE_GTK_TEAROFF_MENU_ITEM=no, [AC_INCLUDES_DEFAULT
 +#include <gtk/gtk.h>])
 +  if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
 +    AC_CHECK_FUNCS(gtk_tearoff_menu_item_new)
 +  fi
  
    dnl Check for functions introduced in 2.14 and later.
    AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \
@@@ -2289,8 -2137,6 +2289,8 @@@ if test "${with_gnutls}" = "yes" ; the
      AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.])
    fi
  
 +  OLD_CFLAGS=$CFLAGS
 +  OLD_LIBS=$LIBS
    CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
    LIBS="$LIBGNUTLS_LIBS $LIBS"
    AC_CHECK_FUNCS(gnutls_certificate_set_verify_function, HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes)
    if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
      AC_DEFINE(HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY, 1, [Define if using GnuTLS certificate verification callbacks.])
    fi
 +
 +  # Windows loads GnuTLS dynamically
 +  if test "${opsys}" = "mingw32"; then
 +    CFLAGS=$OLD_CFLAGS
 +    LIBS=$OLD_LIBS
 +    LIBGNUTLS_LIBS=
 +  fi
  fi
  
  AC_SUBST(LIBGNUTLS_LIBS)
  AC_SUBST(LIBGNUTLS_CFLAGS)
  
 +NOTIFY_OBJ=
 +NOTIFY_SUMMARY=no
 +
 +dnl Set defaults of $with_file_notification.
 +if test "${with_file_notification}" = "yes"; then
 +   if test "${opsys}" = "mingw32"; then
 +      with_file_notification=w32
 +   else
 +      if test "${with_ns}" != yes; then
 +        with_file_notification=gfile
 +      fi
 +   fi
 +fi
 +
 +dnl g_file_monitor exists since glib 2.18.  G_FILE_MONITOR_EVENT_MOVED
 +dnl has been added in glib 2.24.  It has been tested under
 +dnl GNU/Linux only.  We take precedence over inotify, but this makes
 +dnl only sense when glib has been compiled with inotify support.  How
 +dnl to check?
 +if test "${with_file_notification}" = "gfile"; then
 +   PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no)
 +   if test "$HAVE_GFILENOTIFY" = "yes"; then
 +      AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
 +      NOTIFY_OBJ=gfilenotify.o
 +      NOTIFY_SUMMARY="yes -lgio (gfile)"
 +   fi
 +fi
 +dnl inotify is only available on GNU/Linux.
 +if test "${with_file_notification}" = "inotify"; then
 +   AC_CHECK_HEADER(sys/inotify.h)
 +   if test "$ac_cv_header_sys_inotify_h" = yes ; then
 +       AC_CHECK_FUNC(inotify_init1)
 +       if test "$ac_cv_func_inotify_init1" = yes; then
 +           AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
 +         NOTIFY_OBJ=inotify.o
 +         NOTIFY_SUMMARY="yes -lglibc (inotify)"
 +      fi
 +  fi
 +fi
 +dnl MS Windows native file monitor is available for mingw32 only.
 +if test "${with_file_notification}" = "w32"; then
 +   AC_CHECK_HEADER(windows.h)
 +   if test "$ac_cv_header_windows_h" = yes ; then
 +      AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.])
 +      NOTIFY_OBJ=w32notify.o
 +      NOTIFY_SUMMARY="yes (w32)"
 +   fi
 +fi
 +if test -n "$NOTIFY_OBJ"; then
 +   AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.])
 +fi
 +AC_SUBST(NOTIFY_OBJ)
 +AC_SUBST(GFILENOTIFY_CFLAGS)
 +AC_SUBST(GFILENOTIFY_LIBS)
 +
  dnl Do not put whitespace before the #include statements below.
  dnl Older compilers (eg sunos4 cc) choke on it.
  HAVE_XAW3D=no
@@@ -2464,9 -2248,6 +2464,9 @@@ case $opsys i
    hpux* | aix4-2 )
      test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
      ;;
 +  mingw32 )
 +    LIBXMU=
 +    ;;
  esac
  AC_SUBST(LIBXMU)
  
@@@ -2644,7 -2425,8 +2644,8 @@@ if test "${HAVE_X11}" = "yes"; the
        XFT_LIBS="-lXrender $XFT_LIBS"
        LIBS="$XFT_LIBS $LIBS"
        AC_CHECK_HEADER(X11/Xft/Xft.h,
-         AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))
+         AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS) , ,
+           [[#include <X11/X.h>]])
  
        if test "${HAVE_XFT}" = "yes"; then
          AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.])
@@@ -2725,10 -2507,10 +2726,10 @@@ AC_SUBST(M17N_FLT_CFLAGS
  AC_SUBST(M17N_FLT_LIBS)
  
  ### Use -lXpm if available, unless `--with-xpm=no'.
 +### mingw32 doesn't use -lXpm, since it loads the library dynamically.
  HAVE_XPM=no
  LIBXPM=
 -
 -if test "${HAVE_W32}" = "yes"; then
 +if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
    if test "${with_xpm}" != "no"; then
      SAVE_CPPFLAGS="$CPPFLAGS"
      SAVE_LDFLAGS="$LDFLAGS"
@@@ -2789,33 -2571,19 +2790,33 @@@ no_return_alloc_pixel
    fi
  fi
  
 +### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
 +### slightly different requirements wrt image libraries (it doesn't
 +### use -lXpm because it loads the xpm shared library dynamically at
 +### run time).
 +if test "${opsys}" = "mingw32"; then
 +  if test "${with_xpm}" != "no"; then
 +    AC_CHECK_HEADER(X11/xpm.h, HAVE_XPM=yes, HAVE_XPM=no, [
 +#define FOR_MSW 1])
 +  fi
 +
 +  if test "${HAVE_XPM}" = "yes"; then
 +    AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
 +  fi
 +fi
 +
  AC_SUBST(LIBXPM)
  
  ### Use -ljpeg if available, unless `--with-jpeg=no'.
 +### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
  HAVE_JPEG=no
  LIBJPEG=
 -if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
 +if test "${opsys}" = "mingw32"; then
    if test "${with_jpeg}" != "no"; then
      dnl Checking for jpeglib.h can lose because of a redefinition of
 -    dnl  HAVE_STDLIB_H.
 -    AC_CHECK_HEADER(jerror.h,
 -      [AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
 +    dnl HAVE_STDLIB_H.
 +    AC_CHECK_HEADER(jerror.h, HAVE_JPEG=yes, HAVE_JPEG=no)
    fi
 -
    AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
    if test "${HAVE_JPEG}" = "yes"; then
      AC_DEFINE(HAVE_JPEG)
          [AC_MSG_WARN([libjpeg found, but not version 6b or later])
          HAVE_JPEG=no])
    fi
 +elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
 +  if test "${with_jpeg}" != "no"; then
 +    dnl Checking for jpeglib.h can lose because of a redefinition of
 +    dnl  HAVE_STDLIB_H.
 +    AC_CHECK_HEADER(jerror.h,
 +      [AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
 +  fi
 +
 +  AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
 +  if test "${HAVE_JPEG}" = "yes"; then
 +    AC_DEFINE(HAVE_JPEG)
 +    AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
 +      [#include <jpeglib.h>
 +       version=JPEG_LIB_VERSION
 +],
 +      [AC_DEFINE(HAVE_JPEG)],
 +      [AC_MSG_WARN([libjpeg found, but not version 6b or later])
 +      HAVE_JPEG=no])
 +  fi
    if test "${HAVE_JPEG}" = "yes"; then
      LIBJPEG=-ljpeg
    fi
  AC_SUBST(LIBJPEG)
  
  ### Use -lpng if available, unless `--with-png=no'.
 +### mingw32 doesn't use -lpng, since it loads the library dynamically.
  HAVE_PNG=no
  LIBPNG=
 -if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
 +if test "${opsys}" = "mingw32"; then
 +  if test "${with_png}" != "no"; then
 +    AC_CHECK_HEADER(png.h, HAVE_PNG=yes, HAVE_PNG=no)
 +  fi
 +  if test "${HAVE_PNG}" = "yes"; then
 +    AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
 +
 +    AC_CHECK_DECL(png_longjmp,
 +      [],
 +      [AC_DEFINE(PNG_DEPSTRUCT, [],
 +       [Define to empty to suppress deprecation warnings when building
 +        with --enable-gcc-warnings and with libpng versions before 1.5,
 +        which lack png_longjmp.])],
 +      [[#ifdef HAVE_LIBPNG_PNG_H
 +      # include <libpng/png.h>
 +      #else
 +      # include <png.h>
 +      #endif
 +      ]])
 +  fi
 +elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
    if test "${with_png}" != "no"; then
      # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
      # in /usr/include/libpng.
  AC_SUBST(LIBPNG)
  
  ### Use -ltiff if available, unless `--with-tiff=no'.
 +### mingw32 doesn't use -ltiff, since it loads the library dynamically.
  HAVE_TIFF=no
  LIBTIFF=
 -if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
 +if test "${opsys}" = "mingw32"; then
 +  if test "${with_tiff}" != "no"; then
 +    AC_CHECK_HEADER(tiffio.h, HAVE_TIFF=yes, HAVE_TIFF=no)
 +  fi
 +  if test "${HAVE_TIFF}" = "yes"; then
 +    AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
 +  fi
 +elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
    if test "${with_tiff}" != "no"; then
      AC_CHECK_HEADER(tiffio.h,
        [tifflibs="-lz -lm"
  AC_SUBST(LIBTIFF)
  
  ### Use -lgif or -lungif if available, unless `--with-gif=no'.
 +### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
  HAVE_GIF=no
  LIBGIF=
 -if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
 +if test "${opsys}" = "mingw32"; then
 +  if test "${with_gif}" != "no"; then
 +    AC_CHECK_HEADER(gif_lib.h, HAVE_GIF=yes, HAVE_GIF=no)
 +  fi
 +  if test "${HAVE_GIF}" = "yes"; then
 +    AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif (or ungif) library.])
 +  fi
 +elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
          || test "${HAVE_W32}" = "yes"; then
    AC_CHECK_HEADER(gif_lib.h,
  # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
@@@ -3050,82 -2762,14 +3051,82 @@@ if test "${HAVE_X11}" = "yes"; the
  fi
  AC_SUBST(LIBXSM)
  
 +### Use XRandr (-lXrandr) if available
 +HAVE_XRANDR=no
 +if test "${HAVE_X11}" = "yes"; then
 +  XRANDR_REQUIRED=1.2.2
 +  XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
 +  PKG_CHECK_MODULES(XRANDR, $XRANDR_MODULES, HAVE_XRANDR=yes, HAVE_XRANDR=no)
 +  if test $HAVE_XRANDR = no; then
 +    # Test old way in case pkg-config doesn't have it (older machines).
 +    AC_CHECK_HEADER(X11/extensions/Xrandr.h,
 +      [AC_CHECK_LIB(Xrandr, XRRGetScreenResources, HAVE_XRANDR=yes)])
 +    if test $HAVE_XRANDR = yes; then
 +      XRANDR_LIBS=-lXrandr
 +      AC_SUBST(XRANDR_LIBS)
 +    fi
 +  fi
 +  if test $HAVE_XRANDR = yes; then
 +    SAVE_CFLAGS="$CFLAGS"
 +    SAVE_LIBS="$LIBS"
 +    CFLAGS="$XRANDR_CFLAGS $CFLAGS"
 +    LIBS="$XRANDR_LIBS $LIBS"
 +    AC_CHECK_FUNCS(XRRGetOutputPrimary XRRGetScreenResourcesCurrent)
 +    CFLAGS="$SAVE_CFLAGS"
 +    LIBS="$SAVE_LIBS"
 +
 +    AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.])
 +  fi
 +fi
 +
 +### Use Xinerama (-lXinerama) if available
 +HAVE_XINERAMA=no
 +if test "${HAVE_X11}" = "yes"; then
 +  XINERAMA_REQUIRED=1.0.2
 +  XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
 +  PKG_CHECK_MODULES(XINERAMA, $XINERAMA_MODULES, HAVE_XINERAMA=yes,
 +                    HAVE_XINERAMA=no)
 +  if test $HAVE_XINERAMA = no; then
 +    # Test old way in case pkg-config doesn't have it (older machines).
 +    AC_CHECK_HEADER(X11/extensions/Xinerama.h,
 +      [AC_CHECK_LIB(Xinerama, XineramaQueryExtension, HAVE_XINERAMA=yes)])
 +    if test $HAVE_XINERAMA = yes; then
 +      XINERAMA_LIBS=-lXinerama
 +      AC_SUBST(XINERAMA_LIBS)
 +    fi
 +  fi
 +  if test $HAVE_XINERAMA = yes; then
 +    AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if you have the Xinerama extension.])
 +  fi
 +fi
 +
 +
  ### Use libxml (-lxml2) if available
 +### mingw32 doesn't use -lxml2, since it loads the library dynamically.
  HAVE_LIBXML2=no
  if test "${with_xml2}" != "no"; then
    ### I'm not sure what the version number should be, so I just guessed.
    PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.6.17, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
 +  # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
 +  if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
 +    SAVE_CPPFLAGS="$CPPFLAGS"
 +    CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
 +    AC_CHECK_HEADER(libxml/HTMLparser.h,
 +      [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
 +                           [#include <libxml/HTMLparser.h>])])
 +    CPPFLAGS="$SAVE_CPPFLAGS"
 +    if test "${HAVE_LIBXML2}" = "yes"; then
 +      LIBXML2_LIBS="-lxml2"
 +      LIBXML2_CFLAGS="-I/usr/include/libxml2"
 +    fi
 +  fi
    if test "${HAVE_LIBXML2}" = "yes"; then
 -    LIBS="$LIBXML2_LIBS $LIBS"
 -    AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
 +    if test "${opsys}" != "mingw32"; then
 +      LIBS="$LIBXML2_LIBS $LIBS"
 +      AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
 +    else
 +      LIBXML2_LIBS=""
 +    fi
      if test "${HAVE_LIBXML2}" = "yes"; then
        AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).])
      else
@@@ -3138,10 -2782,6 +3139,10 @@@ AC_SUBST(LIBXML2_LIBS
  AC_SUBST(LIBXML2_CFLAGS)
  
  # If netdb.h doesn't declare h_errno, we must declare it by hand.
 +# On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
 +if test "${opsys}" = "mingw32"; then
 +  emacs_cv_netdb_declares_h_errno=yes
 +fi
  AC_CACHE_CHECK(whether netdb declares h_errno,
               emacs_cv_netdb_declares_h_errno,
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
@@@ -3152,10 -2792,8 +3153,10 @@@ if test $emacs_cv_netdb_declares_h_errn
  fi
  
  # sqrt and other floating-point functions such as fmod and frexp
 -# are found in -lm on most systems.
 -AC_CHECK_LIB(m, sqrt)
 +# are found in -lm on most systems, but mingw32 doesn't use -lm.
 +if test "${opsys}" != "mingw32"; then
 +  AC_CHECK_LIB(m, sqrt)
 +fi
  
  # Check for mail-locking functions in a "mail" library.  Probably this should
  # have the same check as for liblockfile below.
@@@ -3197,7 -2835,7 +3198,7 @@@ mail_lock=n
  case "$opsys" in
    aix4-2) mail_lock="lockf" ;;
  
 -  gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
 +  gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
  
    ## On GNU/Linux systems, both methods are used by various mail programs.
    ## I assume most people are using newer mailers that have heard of flock.
        test $ac_cv_header_maillock_h = yes && mail_lock=no
      fi
      ;;
 +
 +  mingw32)
 +    mail_lock="none-needed" ;;
  esac
  
  BLESSMAIL_TARGET=
@@@ -3230,25 -2865,31 +3231,25 @@@ case "$mail_lock" i
  
    lockf) AC_DEFINE(MAIL_USE_LOCKF, 1, [Define if the mailer uses lockf to interlock the mail spool.]) ;;
  
 +  none-needed) ;;
 +
    *) BLESSMAIL_TARGET="need-blessmail" ;;
  esac
  AC_SUBST(BLESSMAIL_TARGET)
  
  
  AC_CHECK_FUNCS(gethostname \
 -closedir getrusage get_current_dir_name \
 -lrand48 setsid \
 -fpathconf select euidaccess getpagesize setlocale \
 -utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
 -__fpending strsignal setitimer \
 +getrusage get_current_dir_name \
 +lrand48 \
 +select getpagesize setlocale \
 +utimes getrlimit setrlimit shutdown getaddrinfo \
 +strsignal setitimer \
  sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
 -gai_strerror mkstemp getline getdelim fsync sync \
 +gai_strerror mkstemp getline getdelim sync \
  difftime posix_memalign \
  getpwent endpwent getgrent endgrent \
  touchlock \
 -cfmakeraw cfsetspeed copysign __executable_start)
 -
 -dnl getwd appears to be buggy on SVR4.2, so we don't use it.
 -if test $opsys = unixware; then
 -  dnl In case some other test ends up checking for getwd.
 -  AC_DEFINE(BROKEN_GETWD, 1, [Define if getwd should not be used.])
 -else
 -  AC_CHECK_FUNCS(getwd)
 -fi
 +cfmakeraw cfsetspeed copysign __executable_start log2)
  
  ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
  ## has a broken `rint' in some library versions including math library
@@@ -3276,6 -2917,8 +3277,6 @@@ AC_CHECK_HEADERS_ONCE(sys/un.h
  
  AC_FUNC_FSEEKO
  
 -AC_FUNC_GETPGRP
 -
  # UNIX98 PTYs.
  AC_CHECK_FUNCS(grantpt)
  
@@@ -3303,29 -2946,25 +3304,29 @@@ AC_DEFUN([tputs_link_source], 
          return 0;
         }]])
  ])
 -# Maybe curses should be tried earlier?
 -# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
 -for tputs_library in '' tinfo ncurses terminfo termcap curses; do
 -  OLIBS=$LIBS
 -  if test -z "$tputs_library"; then
 -    LIBS_TERMCAP=
 -    msg='none required'
 -  else
 -    LIBS_TERMCAP=-l$tputs_library
 -    msg=$LIBS_TERMCAP
 -    LIBS="$LIBS_TERMCAP $LIBS"
 -  fi
 -  AC_RUN_IFELSE([tputs_link_source], [], [msg=no],
 -    [AC_LINK_IFELSE([tputs_link_source], [], [msg=no])])
 -  LIBS=$OLIBS
 -  if test "X$msg" != Xno; then
 -    break
 -  fi
 -done
 +if test "${opsys}" = "mingw32"; then
 +  msg='none required'
 +else
 +  # Maybe curses should be tried earlier?
 +  # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
 +  for tputs_library in '' tinfo ncurses terminfo termcap curses; do
 +    OLIBS=$LIBS
 +    if test -z "$tputs_library"; then
 +      LIBS_TERMCAP=
 +      msg='none required'
 +    else
 +      LIBS_TERMCAP=-l$tputs_library
 +      msg=$LIBS_TERMCAP
 +      LIBS="$LIBS_TERMCAP $LIBS"
 +    fi
 +    AC_RUN_IFELSE([tputs_link_source], [], [msg=no],
 +      [AC_LINK_IFELSE([tputs_link_source], [], [msg=no])])
 +    LIBS=$OLIBS
 +    if test "X$msg" != Xno; then
 +      break
 +    fi
 +  done
 +fi
  AC_MSG_RESULT([$msg])
  if test "X$msg" = Xno; then
    AC_MSG_ERROR([The required function `tputs' was not found in any library.
@@@ -3371,11 -3010,6 +3372,11 @@@ fail
      fi
      ;;
  
 +  mingw32)
 +    TERMINFO=no
 +    LIBS_TERMCAP=
 +    ;;
 +
    netbsd)
      if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
        TERMINFO=no
      fi
      ;;
  
 -  openbsd) LIBS_TERMCAP="-lncurses" ;;
 +  openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
  
    ## hpux: Make sure we get select from libc rather than from libcurses
    ##  because libcurses on HPUX 10.10 has a broken version of select.
@@@ -3630,25 -3264,6 +3631,25 @@@ AC_FUNC_FOR
  
  AC_CHECK_FUNCS(snprintf)
  
 +dnl Check this late.  It depends on what other libraries (lrsvg, Gtk+ etc)
 +dnl Emacs uses.
 +XGSELOBJ=
 +AC_MSG_CHECKING([whether GLib is linked in])
 +AC_LINK_IFELSE([AC_LANG_PROGRAM(
 +      [[#include <glib.h>
 +      ]],
 +      [[g_print ("Hello world");]])],
 +     [links_glib=yes],
 +     [links_glib=no])
 +AC_MSG_RESULT([$links_glib])
 +if test "${links_glib}" = "yes"; then
 +  AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if GLib is linked in.])
 +  if test "$HAVE_NS" = no;then
 +    XGSELOBJ=xgselect.o
 +  fi
 +fi
 +AC_SUBST(XGSELOBJ)
 +
  dnl Adapted from Haible's version.
  AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset,
    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
@@@ -3684,14 -3299,11 +3685,14 @@@ dnl    AC_DEFINE(HAVE_TCATTR, 1, [Defin
  dnl fi
  
  dnl Turned on June 1996 supposing nobody will mind it.
 -AC_DEFINE(AMPERSAND_FULL_NAME, 1, [Define to use the convention that &
 -  in the full name stands for the login id.])
 +dnl MinGW emulates passwd database, so this feature doesn't make sense there.
 +if test "${opsys}" != "mingw32"; then
 +   AC_DEFINE(AMPERSAND_FULL_NAME, 1, [Define to use the convention that &
 +     in the full name stands for the login id.])
 +fi
  
 -dnl Every platform that uses configure (ie every non-MS platform)
 -dnl supports this.  There is a create-lockfiles option you can
 +dnl Every platform that uses configure supports this.
 +dnl There is a create-lockfiles option you can
  dnl customize if you do not want the lock files to be written.
  dnl So it is not clear that this #define still needs to exist.
  AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written,
  dnl Everybody supports this, except MS.
  dnl Seems like the kind of thing we should be testing for, though.
  ## Note: PTYs are broken on darwin <6.  Use at your own risk.
 -AC_DEFINE(HAVE_PTYS, 1, [Define if the system supports pty devices.])
 +if test "${opsys}" != "mingw32"; then
 +  AC_DEFINE(HAVE_PTYS, 1, [Define if the system supports pty devices.])
 +fi
  
  dnl Everybody supports this, except MS-DOS.
  dnl Seems like the kind of thing we should be testing for, though.
@@@ -3713,20 -3323,10 +3714,20 @@@ AC_DEFINE(HAVE_SOCKETS, 1, [Define if t
  
  AH_TEMPLATE(INTERNAL_TERMINAL, [This is substituted when $TERM is "internal".])
  
 -AC_DEFINE(NULL_DEVICE, ["/dev/null"], [Name of the file to open to get
 +AH_TEMPLATE(NULL_DEVICE, [Name of the file to open to get
    a null file, or a data sink.])
 +if test "${opsys}" = "mingw32"; then
 +  AC_DEFINE(NULL_DEVICE, ["NUL:"])
 +else
 +  AC_DEFINE(NULL_DEVICE, ["/dev/null"])
 +fi
  
 -AC_DEFINE(SEPCHAR, [':'], [Character that separates PATH elements.])
 +AH_TEMPLATE(SEPCHAR, [Character that separates PATH elements.])
 +if test "${opsys}" = "mingw32"; then
 +  AC_DEFINE(SEPCHAR, [';'])
 +else
 +  AC_DEFINE(SEPCHAR, [':'])
 +fi
  
  dnl Everybody supports this, except MS-DOS.
  AC_DEFINE(subprocesses, 1, [Define to enable asynchronous subprocesses.])
@@@ -3737,28 -3337,19 +3738,28 @@@ AC_DEFINE(USER_FULL_NAME, [pw->pw_gecos
  AC_DEFINE(DIRECTORY_SEP, ['/'],
    [Character that separates directories in a file name.])
  
 -dnl Only used on MS platforms.
  AH_TEMPLATE(DEVICE_SEP, [Character that separates a device in a file name.])
 +if test "${opsys}" = "mingw32"; then
 +  dnl Only used on MS platforms.
 +  AC_DEFINE(DEVICE_SEP, ':')
 +  AC_DEFINE(IS_DEVICE_SEP(_c_), [((_c_) == DEVICE_SEP)],
 +    [Returns true if character is a device separator.])
  
 -AC_DEFINE(IS_DEVICE_SEP(_c_), 0,
 -  [Returns true if character is a device separator.])
 +  AC_DEFINE(IS_DIRECTORY_SEP(_c_), [((_c_) == '/' || (_c_) == '\\')],
 +    [Returns true if character is a directory separator.])
  
 -AC_DEFINE(IS_DIRECTORY_SEP(_c_), [((_c_) == DIRECTORY_SEP)],
 -  [Returns true if character is a directory separator.])
 +  AC_DEFINE(IS_ANY_SEP(_c_), [(IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))],
 +    [Returns true if character is any form of separator.])
 +else
 +  AC_DEFINE(IS_DEVICE_SEP(_c_), 0,
 +    [Returns true if character is a device separator.])
  
 -dnl On MS, this also accepts IS_DEVICE_SEP.
 -AC_DEFINE(IS_ANY_SEP(_c_), [(IS_DIRECTORY_SEP (_c_))],
 -  [Returns true if character is any form of separator.])
 +  AC_DEFINE(IS_DIRECTORY_SEP(_c_), [((_c_) == DIRECTORY_SEP)],
 +    [Returns true if character is a directory separator.])
  
 +  AC_DEFINE(IS_ANY_SEP(_c_), [(IS_DIRECTORY_SEP (_c_))],
 +    [Returns true if character is any form of separator.])
 +fi
  
  AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.])
  
@@@ -3849,7 -3440,7 +3850,7 @@@ case $opsys i
  esac
  
  case $opsys in
 -  darwin | freebsd | netbsd | openbsd )
 +  darwin | dragonfly | freebsd | netbsd | openbsd )
      AC_DEFINE(DONT_REOPEN_PTY, 1, [Define if process.c does not need to
        close a pty to make it a controlling terminal (it is already a
        controlling terminal of the subprocess, because we did ioctl TIOCSCTTY).])
@@@ -3955,7 -3546,7 +3956,7 @@@ case $opsys i
      AC_DEFINE(FIRST_PTY_LETTER, ['p'])
      ;;
  
 -  gnu-linux | gnu-kfreebsd | freebsd | netbsd )
 +  gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
      dnl if HAVE_GRANTPT
      if test "x$ac_cv_func_grantpt" = xyes; then
        AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
      AC_DEFINE(PTY_ITERATION, [])
      dnl Not used, because PTY_ITERATION is defined.
      AC_DEFINE(FIRST_PTY_LETTER, ['q'])
 -    AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }])
 +    AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCHLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCHLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }])
      dnl No need to get the pty name at all.
      AC_DEFINE(PTY_NAME_SPRINTF, [])
      dnl No need to use sprintf to get the tty name--we get that from _getpty.
      dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler()
      dnl from intercepting that death.  If any child but grantpt's should die
      dnl within, it should be caught after sigrelse(2).
 -    AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
 +    AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
      ;;
  
    unixware )
      dnl Comments are as per sol2*.
 -    AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
 +    AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
      ;;
  esac
  
@@@ -4038,7 -3629,7 +4039,7 @@@ AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Ma
  case $opsys in
    dnl Perry Smith <pedz@ddivt1.austin.ibm.com> says this is correct for AIX.
    dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX.
 -  aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
 +  aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
      AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1)
      ;;
  
  esac
  
  
 -dnl Used in dispnew.c
 -AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the
 -  buffer of a stdio stream.])
 -
 -AC_MSG_CHECKING([whether we are using the GNU C library])
 -AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 -#include <features.h>
 -#ifndef __GNU_LIBRARY__
 -# error "this is not the GNU C library"
 -#endif
 -  ]], [[]])], emacs_glibc=yes, emacs_glibc=no)
 -AC_MSG_RESULT([$emacs_glibc])
 -
 -if test $emacs_glibc = yes; then
 -
 -  emacs_pending_output=unknown
 -
 -  case $opsys in
 -    gnu | gnu-linux | gnu-kfreebsd )
 -      AC_MSG_CHECKING([for style of pending output formalism])
 -      dnl In autoconf 2.67 and later, we could use a single test
 -      dnl since the preprocessed output is accessible in "conftest.i".
 -      AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 -#include <stdio.h>
 -#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
 -# error "stdio definitions not found"
 -#endif
 -        ]], [[]])], emacs_pending_output=new, [])
 -
 -      if test $emacs_pending_output = unknown; then
 -        case $opsys in
 -          gnu-linux | gnu-kfreebsd)
 -            AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 -#include <stdio.h>
 -#ifndef __UCLIBC__
 -# error "not using uclibc"
 -#endif
 -            ]], [[]])], emacs_pending_output=uclibc, emacs_pending_output=old)
 -            ;;
 -        esac
 -      fi
 -
 -      AC_MSG_RESULT([$emacs_pending_output])
 -
 -      case $emacs_pending_output in
 -        new)
 -          dnl New C libio names.
 -          AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
 -            [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)])
 -          ;;
 -        uclibc)
 -          dnl Using the uClibc library.
 -          AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
 -            [((FILE)->__bufpos - (FILE)->__bufstart)])
 -          ;;
 -        old)
 -          dnl Old C++ iostream names.
 -          AC_DEFINE(PENDING_OUTPUT_COUNT(FILE),
 -            [((FILE)->_pptr - (FILE)->_pbase)])
 -          ;;
 -      esac
 -    ;;
 -  esac                          dnl opsys
 -
 -  if test $emacs_pending_output = unknown; then
 -    AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__bufp - (FILE)->__buffer)])
 -  fi
 -
 -else                            dnl !emacs_glibc
 -
 -  case $opsys in
 -    cygwin | darwin | freebsd | netbsd | openbsd )
 -      AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)])
 -      ;;
 -
 -    unixware)
 -      AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)])
 -      ;;
 -
 -    *)
 -      dnl HAVE_STDIO_EXT_H && HAVE___FPENDING
 -      if test x$ac_cv_header_stdio_ext_h = xyes && \
 -        test x$ac_cv_func___fpending = xyes; then
 -        AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [__fpending (FILE)])
 -        AC_DEFINE(DISPNEW_NEEDS_STDIO_EXT, 1,
 -          [Define if dispnew.c should include stdio_ext.h.])
 -      else
 -        AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_ptr - (FILE)->_base)])
 -      fi
 -      ;;
 -  esac
 -fi                              dnl emacs_glibc
 -
 -
 -dnl Used in vm-limit.c
 -AH_TEMPLATE(DATA_START, [Address of the start of the data segment.])
 -dnl Used in lisp.h, emacs.c, mem-limits.h
 +dnl Used in lisp.h, emacs.c, vm-limit.c
  dnl NEWS.18 describes this as "a number which contains
  dnl the high bits to be inclusive or'ed with pointers that are unpacked."
  AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers
@@@ -4068,31 -3755,48 +4069,31 @@@ stored in a Lisp_Object.]
  dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT.
  
  case $opsys in
 -  gnu)
 -    dnl libc defines data_start.
 -    AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })])
 -    ;;
 -
    aix*)
      dnl This works with 32-bit executables; Emacs doesn't support 64-bit.
 -    AC_DEFINE(DATA_START, [0x20000000])
      AC_DEFINE(DATA_SEG_BITS, [0x20000000])
      ;;
    hpux*)
      dnl The data segment on this machine always starts at address 0x40000000.
 -    AC_DEFINE(DATA_START, [0x40000000])
      AC_DEFINE(DATA_SEG_BITS, [0x40000000])
      ;;
    irix6-5)
 -    AC_DEFINE(DATA_START, [0x10000000])
      AC_DEFINE(DATA_SEG_BITS, [0x10000000])
      ;;
  esac
  
  
 -AH_TEMPLATE(ULIMIT_BREAK_VALUE, [Undocumented.])
  AH_TEMPLATE(TAB3, [Undocumented.])
  
  case $opsys in
    darwin) AC_DEFINE(TAB3, OXTABS) ;;
  
 -  gnu | freebsd | netbsd | openbsd )
 +  gnu | dragonfly | freebsd | netbsd | openbsd )
      AC_DEFINE(TABDLY, OXTABS, [Undocumented.])
      AC_DEFINE(TAB3, OXTABS)
      ;;
  
    gnu-linux | gnu-kfreebsd )
 -    dnl libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared
 -    dnl library, we cannot get the maximum address for brk.
 -    AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 -#ifndef __i386__
 -# error "not i386"
 -#endif
 -      ]], [[]])], AC_DEFINE(ULIMIT_BREAK_VALUE, [(32*1024*1024)]), [])
 -
      AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
  #ifndef __ia64__
  # error "not ia64"
      AC_DEFINE(RUN_TIME_REMAP, 1, [Define if emacs.c needs to call
        run_time_remap; for HPUX.])
      ;;
 -
 -  irix6-5)
 -    dnl Ulimit(UL_GMEMLIM) is busted...
 -    AC_DEFINE(ULIMIT_BREAK_VALUE, [0x14000000])
 -    ;;
  esac
  
  
 -dnl These won't be used automatically yet.  We also need to know, at least,
 +dnl This won't be used automatically yet.  We also need to know, at least,
  dnl that the stack is continuous.
  AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
    registers relevant for conservative garbage collection in the jmp_buf.])
  
 -AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
 -  conservative garbage collection is not known to work.])
 -
  
  case $opsys in
 -  hpux* | unixware)
 -    dnl Conservative garbage collection has not been tested, so for now
 -    dnl play it safe and stick with the old-fashioned way of marking.
 -    AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
 -    ;;
 -
    dnl Not all the architectures are tested, but there are Debian packages
    dnl for SCM and/or Guile on them, so the technique must work.  See also
    dnl comments in alloc.c concerning setjmp and gcc.
  #else
  # error "setjmp not known to work on this arch"
  #endif
 -    ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
 -      AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
 +    ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1))
      ;;
  esac
  
@@@ -4141,20 -3860,16 +4142,20 @@@ if test x$GCC = xyes; the
  else
    case $opsys in
      dnl irix: Tested on Irix 6.5.  SCM worked on earlier versions.
 -    freebsd | netbsd | openbsd | irix6-5 | sol2* )
 +    dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
        AC_DEFINE(GC_SETJMP_WORKS, 1)
        ;;
    esac
  fi                              dnl GCC?
  
 +dnl In a weird quirk, MS runtime uses _setjmp and longjmp.
  AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
    [AC_LINK_IFELSE(
       [AC_LANG_PROGRAM(
         [[#include <setjmp.h>
 +         #ifdef __MINGW32__
 +         # define _longjmp longjmp
 +         #endif
         ]],
         [[jmp_buf j;
         if (! _setjmp (j))
@@@ -4202,6 -3917,8 +4203,6 @@@ esa
  
  dnl Define symbols to identify the version of Unix this is.
  dnl Define all the symbols that apply correctly.
 -AH_TEMPLATE(BSD4_2, [Define if the system is compatible with BSD 4.2.])
 -AH_TEMPLATE(BSD_SYSTEM, [Define if the system is compatible with BSD 4.2.])
  AH_TEMPLATE(DOS_NT, [Define if the system is MS DOS or MS Windows.])
  AH_TEMPLATE(MSDOS, [Define if the system is MS DOS.])
  AH_TEMPLATE(USG, [Define if the system is compatible with System III.])
@@@ -4225,12 -3942,33 +4226,12 @@@ case $opsys i
      ;;
  
    darwin)
 -    dnl BSD4_3 and BSD4_4 are already defined in sys/param.h.
 -    AC_DEFINE(BSD4_2, [])
 -    AC_DEFINE(BSD_SYSTEM, [])
 -    dnl More specific than the above two.  We cannot use __APPLE__ as this
 -    dnl may not be defined on non-OSX Darwin, and we cannot define DARWIN
 -    dnl here because Panther and lower CoreFoundation.h uses DARWIN to
 +    dnl Not __APPLE__, as this may not be defined on non-OSX Darwin.
 +    dnl Not DARWIN, because Panther and lower CoreFoundation.h use DARWIN to
      dnl distinguish OS X from pure Darwin.
      AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.])
      ;;
  
 -  freebsd)
 -    AC_DEFINE(BSD4_2, [])
 -    dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times.
 -    dnl Would not be needed with autoconf >= 2.67, where the
 -    dnl preprocessed output is accessible in "conftest.i".
 -    AC_DEFINE(BSD_SYSTEM_AHB, 1, [Define if AH_BOTTOM should change BSD_SYSTEM.])
 -    ;;
 -
 -  gnu | netbsd | openbsd )
 -    AC_DEFINE(BSD4_2, [])
 -    AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
 -#ifndef BSD_SYSTEM
 -# error "BSD_SYSTEM not defined"
 -#endif
 -    ]], [[]])], [], AC_DEFINE(BSD_SYSTEM, 43) )
 -    ;;
 -
    gnu-linux | gnu-kfreebsd )
      AC_DEFINE(USG, [])
      AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with GNU/Linux.])
      AC_DEFINE(IRIX6_5, [], [Define if the system is IRIX.])
      ;;
  
 +  mingw32)
 +    AC_DEFINE(DOS_NT, [])
 +    AC_DEFINE(WINDOWSNT, 1, [Define if compiling for native MS Windows.])
 +    if test "x$ac_enable_checking" != "x" ; then
 +      AC_DEFINE(EMACSDEBUG, 1, [Define to 1 to enable w32 debug facilities.])
 +    fi
 +    ;;
 +
    sol2*)
      AC_DEFINE(USG, [])
      AC_DEFINE(USG5, [])
@@@ -4278,10 -4008,6 +4279,10 @@@ AC_CACHE_CHECK([for usable FIONREAD], [
         emacs_cv_usable_FIONREAD=no
         ;;
  
 +     mingw32)
 +       emacs_cv_usable_FIONREAD=yes
 +       ;;
 +
       *)
         AC_COMPILE_IFELSE(
         [AC_LANG_PROGRAM([[#include <sys/types.h>
@@@ -4338,6 -4064,8 +4339,6 @@@ case $opsys i
    irix6-5)
      AC_DEFINE(PREFER_VSUSP, 1, [Define if process_send_signal should
        use VSUSP instead of VSWTCH.])
 -    AC_DEFINE(SETPGRP_RELEASES_CTTY, 1, [Define if process.c:child_setup
 -      should not call setpgrp.])
      ;;
  
    sol2-10)
  
  AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
                   [Define to the canonical Emacs configuration name.])
 -AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
 +dnl Replace any embedded " characters (bug#13274).
 +emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
 +AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}",
                   [Define to the options passed to configure.])
  AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
    define this to include extra configuration information.])
  
 +case $opsys in
 +  mingw32)
 +    AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
 +    ;;
 +esac
 +
  XMENU_OBJ=
  XOBJ=
  FONT_OBJ=
@@@ -4435,7 -4155,7 +4436,7 @@@ if test "${HAVE_X_WINDOWS}" = "yes" ; t
    AC_DEFINE(HAVE_X_WINDOWS, 1,
            [Define to 1 if you want to use the X window system.])
    XMENU_OBJ=xmenu.o
 -  XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
 +  XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
    FONT_OBJ=xfont.o
    if test "$HAVE_XFT" = "yes"; then
      FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
@@@ -4488,14 -4208,12 +4489,14 @@@ case "$USE_X_TOOLKIT" i
  esac
  AC_SUBST(TOOLKIT_LIBW)
  
 -if test "$USE_X_TOOLKIT" = "none"; then
 -  LIBXT_OTHER="\$(LIBXSM)"
 -  OLDXMENU_TARGET="really-oldXMenu"
 -else
 -  LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
 -  OLDXMENU_TARGET="really-lwlib"
 +if test "${opsys}" != "mingw32"; then
 +  if test "$USE_X_TOOLKIT" = "none"; then
 +    LIBXT_OTHER="\$(LIBXSM)"
 +    OLDXMENU_TARGET="really-oldXMenu"
 +  else
 +    LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
 +    OLDXMENU_TARGET="really-lwlib"
 +  fi
  fi
  AC_SUBST(LIBXT_OTHER)
  
@@@ -4569,10 -4287,6 +4570,10 @@@ if test "$opsys" = "cygwin"; the
    ## Cygwin differs because of its unexec().
    PRE_ALLOC_OBJ=
    POST_ALLOC_OBJ=lastfile.o
 +elif test "$opsys" = "mingw32"; then
 +  CYGWIN_OBJ=
 +  PRE_ALLOC_OBJ=
 +  POST_ALLOC_OBJ=lastfile.o
  else
    CYGWIN_OBJ=
    PRE_ALLOC_OBJ=lastfile.o
@@@ -4600,12 -4314,6 +4601,12 @@@ gl_INI
  CFLAGS=$SAVE_CFLAGS
  LIBS=$SAVE_LIBS
  
 +if test "${opsys}" = "mingw32"; then
 +  CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
 +  # Remove unneeded switches from the value of CC that goes to Makefiles
 +  CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
 +fi
 +
  case "$opsys" in
    aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
  
     ## each); under Cocoa 31 commands are required.
     if test "$HAVE_NS" = "yes"; then
       libs_nsgui="-framework AppKit"
 +     if test "$NS_IMPL_COCOA" = "yes"; then
 +        libs_nsgui="$libs_nsgui -framework IOKit"
 +     fi
       headerpad_extra=6C8
     else
       libs_nsgui=
     LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
  
     ## This is here because src/Makefile.in did some extra fiddling around
 -   ## with LD_SWITCH_SYSTEM.  The cpp logic was:
 -   ##   #ifndef LD_SWITCH_SYSTEM
 -   ##   #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
 -   ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
 -   ## not using gcc, darwin.
 -   ## Because this was done in src/Makefile.in, the resulting part of
 -   ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
 -   ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
 -   ## rather than LD_SWITCH_SYSTEM.
 +   ## with LD_SWITCH_SYSTEM.  It seems cleaner to put this in
 +   ## LD_SWITCH_SYSTEM_TEMACS instead,
     test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
       LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
     ;;
    ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
    gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
  
 -  *) LD_SWITCH_SYSTEM_TEMACS= ;;
 -esac
 -
 -AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 +  mingw32)
 +   ## MinGW64 does not prepend an underscore to symbols, so we must
 +   ## pass a different -entry switch to linker.  FIXME: It is better
 +   ## to make the entry points the same by changing unexw32.c.
 +   case "$canonical" in
 +     x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
 +     *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
 +   esac
 +   ;;
  
 +  openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
  
 -LD_FIRSTFLAG=
 -ORDINARY_LINK=
 -case "$opsys" in
 -  ## gnu: GNU needs its own crt0.
 -  aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
 -
 -  ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
 -  ## library search parth, i.e. it won't search /usr/lib for libc and
 -  ## friends.  Using -nostartfiles instead avoids this problem, and
 -  ## will also work on earlier NetBSD releases.
 -  netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
 -
 -  ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
 -  ##   MkLinux/LinuxPPC needs this.
 -  ## s390x-* only supports opsys = gnu-linux so it can be added here.
 -  gnu-*)
 -    case "$canonical" in
 -      powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
 -    esac
 -    ;;
 +  *) LD_SWITCH_SYSTEM_TEMACS= ;;
  esac
  
 -
 -if test "x$ORDINARY_LINK" = "xyes"; then
 -
 -  LD_FIRSTFLAG=""
 -  AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.])
 -
 -## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
 -## freebsd, gnu-* not on powerpc*|s390x*.
 -elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
 -
 -  ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
 -  ## places that are difficult to figure out at make time.  Fortunately,
 -  ## these same versions allow you to pass arbitrary flags on to the
 -  ## linker, so there is no reason not to use it as a linker.
 -  ##
 -  ## Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
 -  ## searching for libraries in its internal directories, so we have to
 -  ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
 -  LD_FIRSTFLAG="-nostdlib"
 +if test x$ac_enable_profiling != x ; then
 +  case $opsys in
 +    *freebsd | gnu-linux) ;;
 +    *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
 +  esac
  fi
  
 -## FIXME? What setting of EDIT_LDFLAGS should this have?
 -test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
 -
 -AC_SUBST(LD_FIRSTFLAG)
 -
 -
 -## FIXME? The logic here is not precisely the same as that above.
 -## There is no check here for a pre-defined LD_FIRSTFLAG.
 -## Should we only be setting LIB_GCC if LD ~ -nostdlib?
 -LIB_GCC=
 -if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
 -
 -  case "$opsys" in
 -    freebsd|netbsd|openbsd) LIB_GCC= ;;
 -
 -    gnu-*)
 -      ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
 -      ## build on ARM EABI under GNU/Linux.  (Bug#5518)
 -      case $host_cpu in
 -      arm*)
 -        LIB_GCC="-lgcc_s"
 -      ;;
 -      *)
 -        ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
 -        ## immediately undefine it again and redefine it to empty.
 -        ## Was the C_SWITCH_X_SITE part really necessary?
 -##      LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
 -        LIB_GCC=
 -      ;;
 -      esac
 -      ;;
 +AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
  
 -    ## Ask GCC where to find libgcc.a.
 -    *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
 +## MinGW-specific post-link processing of temacs.
 +TEMACS_POST_LINK=":"
 +ADDSECTION=
 +EMACS_HEAPSIZE=
 +if test "${opsys}" = "mingw32"; then
 +  TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
 +  ADDSECTION="../nt/addsection\$(EXEEXT)"
 +  ## Preload heap size of temacs.exe in MB.
 +  case "$canonical" in
 +    x86_64-*-*) EMACS_HEAPSIZE=42 ;;
 +    *) EMACS_HEAPSIZE=27 ;;
    esac
 -fi                              dnl if $GCC
 -AC_SUBST(LIB_GCC)
 +fi
 +
 +AC_SUBST(ADDSECTION)
 +AC_SUBST(TEMACS_POST_LINK)
 +AC_SUBST(EMACS_HEAPSIZE)
  
  ## Common for all window systems
  if test "$window_system" != "none"; then
    AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
 -  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
    WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
  fi
  
@@@ -4739,12 -4497,6 +4740,12 @@@ if test "${HAVE_GTK}" = "yes"; the
    USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
  fi
  
 +if test $USE_ACL -ne 0; then
 +  acl_summary="yes $LIB_ACL"
 +else
 +  acl_summary=no
 +fi
 +
  echo "
  Configured for \`${canonical}'.
  
@@@ -4780,8 -4532,6 +4781,8 @@@ echo "  Does Emacs use -lgpm
  echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
  echo "  Does Emacs use -lgconf?                                 ${HAVE_GCONF}"
  echo "  Does Emacs use GSettings?                               ${HAVE_GSETTINGS}"
 +echo "  Does Emacs use a file notification library?             ${NOTIFY_SUMMARY}"
 +echo "  Does Emacs use access control lists?                    ${acl_summary}"
  echo "  Does Emacs use -lselinux?                               ${HAVE_LIBSELINUX}"
  echo "  Does Emacs use -lgnutls?                                ${HAVE_GNUTLS}"
  echo "  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}"
@@@ -4850,17 -4600,17 +4851,17 @@@ dnl This will work, but you get a confi
  dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html).
  dnl That doesn't have any obvious consequences for Emacs, but on the whole
  dnl it seems better to just live with the duplication.
 -SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile"
 +SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
  
  AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
         doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
         doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \
 -       leim/Makefile nextstep/Makefile])
 +       leim/Makefile nextstep/Makefile nt/Makefile])
  
  dnl test/ is not present in release tarfiles.
  opt_makefile=test/automated/Makefile
  
 -if test -f $srcdir/${opt_makefile}.in; then
 +if test -f "$srcdir/$opt_makefile.in"; then
    SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
    dnl Again, it's best not to use a variable.  Though you can add
    dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
  dnl admin/ may or may not be present.
  opt_makefile=admin/unidata/Makefile
  
 -if test -f $srcdir/${opt_makefile}.in; then
 +if test -f "$srcdir/$opt_makefile.in"; then
    SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
    AC_CONFIG_FILES([admin/unidata/Makefile])
  fi
@@@ -4898,17 -4648,13 +4899,17 @@@ dnl by configure.  This also explains t
  dnl the use of force in the `epaths-force' rule in Makefile.in.
  AC_CONFIG_COMMANDS([epaths], [
  echo creating src/epaths.h
 -${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
 -], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"])
 +if test "${opsys}" = "mingw32"; then
 +  ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
 +else
 +  ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
 +fi
 +], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
  
  AC_CONFIG_COMMANDS([gdbinit], [
 -if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
 +if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
    echo creating src/.gdbinit
 -  echo source $srcdir/src/.gdbinit > src/.gdbinit
 +  echo "source $srcdir/src/.gdbinit" > src/.gdbinit
  fi
  ])
  
diff --combined doc/emacs/files.texi
@@@ -705,27 -705,13 +705,27 @@@ setting the latter variable, you can co
  final newlines.
  
  @vindex write-region-inhibit-fsync
 -  When Emacs saves a file, it invokes the @code{fsync} system call to
 -force the data immediately out to disk.  This is important for safety
 -if the system crashes or in case of power outage.  However, it can be
 -disruptive on laptops using power saving, as it may force a disk
 -spin-up each time you save a file.  If you accept an increased risk of
 -data loss, you can set @code{write-region-inhibit-fsync} to a
 -non-@code{nil} value to disable the synchronization.
 +  Normally, when a program writes a file, the operating system briefly
 +caches the file's data in main memory before committing the data to
 +disk.  This can greatly improve performance; for example, when running
 +on laptops, it can avoid a disk spin-up each time a file is written.
 +However, it risks data loss if the operating system crashes before
 +committing the cache to disk.
 +
 +  To lessen this risk, Emacs can invoke the @code{fsync} system call
 +after saving a file.  Using @code{fsync} does not eliminate the risk
 +of data loss, partly because many systems do not implement
 +@code{fsync} properly, and partly because Emacs's file-saving
 +procedure typically relies also on directory updates that might not
 +survive a crash even if @code{fsync} works properly.
 +
 +  The @code{write-region-inhibit-fsync} variable controls whether
 +Emacs invokes @code{fsync} after saving a file.  The variable's
 +default value is @code{nil} when Emacs is interactive, and @code{t}
 +when Emacs runs in batch mode.
 +
 +  Emacs never uses @code{fsync} when writing auto-save files, as these
 +files might lose data anyway.
  
  @node Interlocking
  @subsection Protection against Simultaneous Editing
@@@ -748,10 -734,10 +748,10 @@@ file
  @cindex locking files
    When you make the first modification in an Emacs buffer that is
  visiting a file, Emacs records that the file is @dfn{locked} by you.
 -(It does this by creating a specially-named symbolic link in the same
 -directory.)  Emacs removes the lock when you save the changes.  The
 -idea is that the file is locked whenever an Emacs buffer visiting it
 -has unsaved changes.
 +(It does this by creating a specially-named symbolic link or regular
 +file with special contents in the same directory.)  Emacs removes the
 +lock when you save the changes.  The idea is that the file is locked
 +whenever an Emacs buffer visiting it has unsaved changes.
  
  @vindex create-lockfiles
    You can prevent the creation of lock files by setting the variable
@@@ -788,14 -774,14 +788,14 @@@ multiple names, Emacs does not prevent 
  simultaneously under different names.
  
    A lock file cannot be written in some circumstances, e.g., if Emacs
 -lacks the system permissions or the system does not support symbolic
 -links.  In these cases, Emacs can still detect the collision when you
 -try to save a file, by checking the file's last-modification date.  If
 -the file has changed since the last time Emacs visited or saved it,
 -that implies that changes have been made in some other way, and will
 -be lost if Emacs proceeds with saving.  Emacs then displays a warning
 -message and asks for confirmation before saving; answer @kbd{yes} to
 -save, and @kbd{no} or @kbd{C-g} cancel the save.
 +lacks the system permissions or cannot create lock files for some
 +other reason.  In these cases, Emacs can still detect the collision
 +when you try to save a file, by checking the file's last-modification
 +date.  If the file has changed since the last time Emacs visited or
 +saved it, that implies that changes have been made in some other way,
 +and will be lost if Emacs proceeds with saving.  Emacs then displays a
 +warning message and asks for confirmation before saving; answer
 +@kbd{yes} to save, and @kbd{no} or @kbd{C-g} cancel the save.
  
    If you are notified that simultaneous editing has already taken
  place, one way to compare the buffer to its file is the @kbd{M-x
@@@ -1267,9 -1253,12 +1267,12 @@@ minibuffer, and displays the difference
  buffer named @file{*diff*}.  This works by running the @command{diff}
  program, using options taken from the variable @code{diff-switches}.
  The value of @code{diff-switches} should be a string; the default is
- @code{"-c"} to specify a context diff.  @xref{Top,, Diff, diff,
- Comparing and Merging Files}, for more information about the
- @command{diff} program.
+ @code{"-c"} to specify a context diff.
+ @c Note that the actual name of the info file is diffutils.info,
+ @c but it adds a dir entry for diff too.
+ @c On older systems, only "info diff" works, not "info diffutils".
+ @xref{Top,, Diff, diff, Comparing and Merging Files}, for more
+ information about the @command{diff} program.
  
    The output of the @code{diff} command is shown using a major mode
  called Diff mode.  @xref{Diff Mode}.
@@@ -1951,7 -1940,8 +1954,7 @@@ or taller than the frame, the usual poi
  displayed.  If the image can be animated, the command @kbd{RET}
  (@code{image-toggle-animation}) starts or stops the animation.
  Animation plays once, unless the option @code{image-animate-loop} is
 -non-@code{nil}.  Currently, Emacs only supports animation in GIF
 -files.
 +non-@code{nil}.
  
  @cindex ImageMagick support
  @vindex imagemagick-enabled-types
diff --combined doc/lispref/ChangeLog
 -2013-06-19  Glenn Morris  <rgm@gnu.org>
++2013-06-24  Glenn Morris  <rgm@gnu.org>
+       * loading.texi (Autoload): Fix typo.
 -2013-06-12  Glenn Morris  <rgm@gnu.org>
 -
+       * variables.texi (Lexical Binding): Fix typo.
+       * functions.texi (Anonymous Functions): Put back ' removed 2012-10-23.
 -2013-03-12  Glenn Morris  <rgm@gnu.org>
 +2013-06-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * display.texi (ImageMagick Images): Mention :max-width and
 +      :max-height.
 +
 +2013-06-20  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * numbers.texi (Math Functions): Remove obsolete function log10.
 +
 +2013-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * modes.texi (Mode Line Data, Properties in Mode): Advertise `keymap'
 +      rather than `local-map'.
 +
 +      * keymaps.texi (Active Keymaps): Fix documentation of
 +      set-temporary-overlay-map and overriding-terminal-local-map.
 +
 +2013-06-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (dist): Edit more configure variables.
 +      Try to check that we do not miss any in future.
 +
 +2013-06-17  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * text.texi (Undo, Changing Properties): Fix typos.
 +
 +2013-06-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * text.texi (Changing Properties): Document `add-face-text-property'.
 +
 +2013-06-17  Kenichi Handa  <handa@gnu.org>
 +
 +      * display.texi (Face Attributes): Refer to "Low-Level font" (not
 +      "Font Selection") in the explanation of :font attribute (bug#14629).
 +
 +2013-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * loading.texi (Hooks for Loading): Don't document after-load-alist.
 +      Document with-eval-after-load instead of eval-after-load.
 +
 +2013-06-11  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * files.texi (File Name Expansion): Make the example more
 +      intuitive.
 +
 +2013-06-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Documentation fix for 'ls' and hard links.
 +      * compile.texi (Compilation Functions):
 +      * files.texi (File Attributes, Changing Files):
 +      Use current format for GNU 'ls' output.
 +      (File Attributes): Fix problem introduced in previous change:
 +      the link count is the number of hard links, not the number
 +      of hard links + 1.
 +
 +2013-06-10  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * files.texi (File Attributes): Fix typo.
 +
 +2013-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * functions.texi (Lambda Expressions): Lambda expressions don't
 +      evaluate to themselves in general (bug#11782).
 +
 +2013-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * loading.texi (Autoload):
 +      * help.texi (Documentation Basics, Accessing Documentation)
 +      (Accessing Documentation, Accessing Documentation): DOC-* is now DOC.
 +
 +2013-04-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * internals.texi (Writing Emacs Primitives): Remove obvious example.
 +      Tweak other to avoid overly long line.
 +
 +2013-04-21  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * internals.texi (Writing Emacs Primitives): Remove unnecessary
 +      references to the sources. (Bug#13800)
 +
 +      * searching.texi (Regexp Backslash): Doc fix for backslash
 +      constructs in regular expressions.
 +
 +2013-04-15  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * tips.texi (Coding Conventions): Mention separation of package
 +      descriptor and name of internal symbols by two hyphens.
 +
 +2013-04-13  Stephen Berman  <stephen.berman@gmx.net>
 +
 +      * windows.texi (Splitting Windows): Change category of
 +      split-window from a command to a function.
 +
 +2013-04-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * display.texi (Faces): Minor clarifications.
 +      (Defining Faces): Clarify default vs custom face specs.
 +      Document face-spec-set.
 +
 +      * display.texi (Overlay Properties):
 +      * text.texi (Special Properties): Use the "anonymous face"
 +      terminology.  Describe foreground-color and background-color forms
 +      as compatibility-only.
 +
 +2013-03-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * compile.texi (Byte-Code Objects): Add index entry.
 +      (Disassembly): Add cross-references.
 +
 +2013-03-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * frames.texi (Size Parameters): More accurate description of the
 +      difference between 'fullboth' and 'maximized'.  (Bug#13935)
 +
 +2013-03-17  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * symbols.texi (Standard Properties): Document pure.  (Bug#13823)
 +
 +2013-03-16  Glenn Morris  <rgm@gnu.org>
  
        * elisp.texi: Add some stuff specific to www.gnu.org.
  
 -2013-03-11  Glenn Morris  <rgm@gnu.org>
 +2013-03-11  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * control.texi (Pattern matching case statement): Fix typo.
 +
 +2013-03-04  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * Version 24.3 released.
 +      * elisp.texi, intro.texi: Switch from Latin-1 to UTF-8.
  
  2013-03-03  Glenn Morris  <rgm@gnu.org>
  
        * objects.texi (Symbol Type): Fix typo.
  
 -2013-02-27  Bastien Guerry  <bzg@gnu.org>
 +2013-02-28  Bastien Guerry  <bzg@gnu.org>
  
        * variables.texi (File Local Variables): Fix reference.
  
 -2013-02-23  Eli Zaretskii  <eliz@gnu.org>
 +2013-02-24  Eli Zaretskii  <eliz@gnu.org>
  
        * files.texi (Magic File Names): Improve wording and indexing.
  
 +2013-02-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * display.texi (Multi-Frame Images): Minor rephrasing.
 +
 +2013-02-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * display.texi (GIF Images, TIFF Images): Delete these nodes.
 +      (ImageMagick Images): For :index, use an xref rather than duplicating.
 +      (Other Image Types): Add GIF, adjust formatting.
 +      (Multi-Frame Images): Rename from Animated Images.  Expand section.
 +      * elisp.texi (Top): Update menu for these changes.
 +
  2013-02-19  Glenn Morris  <rgm@gnu.org>
  
        * text.texi (Change Hooks): Fix typo.
  
 -2013-02-14  Glenn Morris  <rgm@gnu.org>
 +2013-02-15  Glenn Morris  <rgm@gnu.org>
  
        * modes.texi (Basic Major Modes): 'z' no longer bound in special-mode.
  
  
        * modes.texi (Minor Mode Conventions): Fix typo.
  
 -2013-02-12  Glenn Morris  <rgm@gnu.org>
 -
        * keymaps.texi (Scanning Keymaps): Remove obsolete sentence about
        meta characters; this changed in 22.1.  (Bug#13684)
  
 -2013-02-11  Glenn Morris  <rgm@gnu.org>
 -
        * objects.texi (Char-Table Type): Add cindex.
  
        * keymaps.texi (Key Binding Commands): Trivial rephrasing.
  
 -2013-02-09  Glenn Morris  <rgm@gnu.org>
 +2013-02-10  Glenn Morris  <rgm@gnu.org>
  
        * keymaps.texi (Creating Keymaps): Update make-keymap result.
  
 +2013-02-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * modes.texi (%-Constructs): Remove the description of %t.
 +
 +      * nonascii.texi (MS-DOS File Types): Delete node.
 +
  2013-02-08  Glenn Morris  <rgm@gnu.org>
  
        * keymaps.texi (Active Keymaps, Searching Keymaps):
        Remove confusing mention of "symbolic prefix".  (Bug#13643)
  
 -2013-01-16  Glenn Morris  <rgm@gnu.org>
 +2013-01-19  Glenn Morris  <rgm@gnu.org>
  
        * macros.texi (Indenting Macros): Fix order of an indent
        symbol's arguments.  (Bug#13450)
  
 +2013-01-19  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Allow floating-point file offsets.
 +      * files.texi (Reading from Files, Writing to Files):
 +      Say that file offsets can be numbers, not just integers.
 +
  2013-01-09  Glenn Morris  <rgm@gnu.org>
  
        * commands.texi (Interactive Codes):
        * keymaps.texi (Key Sequences): Remove obsolete sentence
        (Bug#13356).
  
 -2013-01-03  Ari Roponen  <ari.roponen@gmail.com>  (tiny change)
 +2013-01-04  Ari Roponen  <ari.roponen@gmail.com>  (tiny change)
  
        * hash.texi (Defining Hash): Fix typo.  (Bug#13345)
  
 +2013-01-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.texi (File Attributes): Undocument return format of file-acl.
 +
  2013-01-03  Glenn Morris  <rgm@gnu.org>
  
        * processes.texi (System Processes):
  
        * elisp.texi (DATE): Bump to Jan 2013.
  
 -2012-12-31  Glenn Morris  <rgm@gnu.org>
 +2013-01-02  Glenn Morris  <rgm@gnu.org>
  
        * customize.texi (Common Keywords, Type Keywords):
        Replace "active field" with "button".  (Bug#13310)
        * customize.texi (Common Keywords): Add xref.  (Bug#13311)
        * tips.texi (Library Headers): Add cindex.
  
 -2012-12-29  Wolfgang Jenkner  <wjenkner@inode.at>
 +2012-12-30  Wolfgang Jenkner  <wjenkner@inode.at>
  
        * functions.texi (Declare Form):
        * intro.texi (A Sample Function Description):
        * variables.texi (Using Lexical Binding): Don't use @var or CAPS
        in @def.. commands.  (Bug#13292)
  
 +2012-12-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.texi (Changing Files): Document the return values of
 +      set-file-selinux-context and set-file-acl.
 +
  2012-12-27  Glenn Morris  <rgm@gnu.org>
  
        * files.texi (File Names): Mention Cygwin conversion functions.
        * windows.texi (Selecting Windows): Reword description of
        select-window (Bug#13248).
  
 +2012-12-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.texi (File Attributes, Changing Files): Remove the details
 +      about the text returned by file-acl.  Instead, just document that
 +      it is an opaque string meant to be used by set-file-acl.
 +
  2012-12-21  Chong Yidong  <cyd@gnu.org>
  
        * modes.texi (Auto Major Mode): Fix typo (Bug#13230).
        * customize.texi (Simple Types): Document key-sequence type
        (Bug#13048).
  
 -2012-12-15  Chong Yidong  <cyd@gnu.org>
 -
        * strings.texi (Text Comparison): Doc fix for compare-strings.
  
 -2012-12-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-12-19  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * control.texi (Pattern matching case statement): New node.
 +      * files.texi (Magic File Names): Add `file-acl',
 +      `file-selinux-context', `set-file-acl' and
 +      `set-file-selinux-context'.  Make the list consistent.
 +
 +2012-12-19  Jonas Bernoulli  <jonas@bernoul.li>
 +
 +      * tips.texi (Library Headers): New header keyword `Homepage'.
 +      Make continuation lines syntax more precise.
 +
 +2012-12-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.texi (File Attributes, Changing Files): Update to include
 +      MS-Windows support for ACLs.
 +
 +2012-12-16  Romain Francoise  <romain@orebokech.com>
  
 -2012-12-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * files.texi (File Attributes): Document ACL support and new
 +      `file-acl' function.
 +      (Changing Files): Mention argument name change of `copy-file' and
 +      document new function `set-file-acl'.
 +
 +2012-12-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix permissions bugs with setgid directories etc. (Bug#13125)
 +      * files.texi (Testing Accessibility): Document GROUP arg
 +      of file-ownership-preserved-p.
 +      (File Attributes): Document that 9th element is now
 +      just a placeholder.
 +      * os.texi (User Identification): Document new functions group-gid,
 +      group-real-gid.
 +
 +2012-12-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * internals.texi (C Integer Types): New section.
 +      This follows up and records an email in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00496.html>.
 +
 +2012-12-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * control.texi (Pattern matching case statement): New node.
  
        * customize.texi (Variable Definitions): Mention the default :group
        for defcustoms (bug#13093).
  
 -2012-12-05  Chong Yidong  <cyd@gnu.org>
 +2012-12-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * customize.texi (Variable Definitions): Mention eval-defun
 +      on a defcustom calls the :set function when appropriate.
 +
 +2012-12-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doclicense.texi, gpl.texi: Update to latest version from FSF.
 +      These are just minor editorial changes.
 +
 +2012-12-06  Chong Yidong  <cyd@gnu.org>
  
        * lists.texi (Plist Access): Move put example to Symbol Plists.
  
        * symbols.texi (Standard Properties): Fix typo.
  
 -2012-12-02  Chong Yidong  <cyd@gnu.org>
 +2012-12-03  Chong Yidong  <cyd@gnu.org>
  
        * symbols.texi (Symbol Properties): New node.
        (Symbol Plists): Make it a subsection under Symbol Properties.
  
        * commands.texi (Using Interactive): Fix index entry.
  
 -2012-11-23  Martin Rudalics  <rudalics@gmx.at>
 +2012-11-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doclicense.texi: Update to latest version from FSF.
 +      These are just minor editorial changes.
 +      * elisp.texi (GNU Free Documentation License)
 +      (GNU General Public Licens):
 +      Provide sectioning, since doclicense.texi no longer does that.
 +
 +      * loading.texi (Named Features): @ -> @@ to fix typo.
 +
 +2012-11-24  Martin Rudalics  <rudalics@gmx.at>
  
        * windows.texi (Basic Windows): Fix typo.
        (Windows and Frames): Fix example.  Move description of
        dedicatedness affects functions removing buffers or windows.
        * buffers.texi (The Buffer List): Fix description of bury-buffer.
  
 -2012-11-23  Chong Yidong  <cyd@gnu.org>
 +2012-11-24  Chong Yidong  <cyd@gnu.org>
  
        * modes.texi (%-Constructs): Fix statement about mode construct
        padding (Bug#12866).
  
 -2012-11-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * debugging.texi (Profiling): Make it more clear
        that --enable-profiling is about profiling the C code.
  
  2012-11-21  Glenn Morris  <rgm@gnu.org>
  
 -      * debugging.texi (Profiling): Mention --enable-profiling (if !tex).
 -      Add some basic information about the profile report buffer.
 -      (Debugging): Mention profiling in the introduction.
 -
 -2012-11-20  Glenn Morris  <rgm@gnu.org>
 +      * display.texi (Attribute Functions):
 +      Update for set-face-* name changes.
 +      Add new "inherit" argument for face-bold-p etc.
 +      Move description of this argument to a common section, like "frame".
  
 -      * debugging.texi (Profiling): New section, in progress.
 +      * debugging.texi (Profiling): New section.
 +      (Debugging): Mention profiling in the introduction.
        * tips.texi (Compilation Tips): Move profiling to separate section.
        * elisp.texi: Add Profiling to detailed menu.
  
 -2012-11-18  Martin Rudalics  <rudalics@gmx.at>
 +2012-11-21  Martin Rudalics  <rudalics@gmx.at>
  
        * windows.texi (Display Action Functions): Fix recently added
        example.  Suggested by Michael Heerdegen.
  
 -2012-11-18  Paul Eggert  <eggert@cs.ucla.edu>
 +2012-11-21  Paul Eggert  <eggert@cs.ucla.edu>
  
        Minor cleanup for times as lists of four integers.
        * os.texi (Time Parsing): Time values can now be four integers.
        * loading.texi (How Programs Do Loading): Add eager macro expansion.
        * macros.texi (Expansion): Mention eager macro expansion.
  
 -2012-11-17  Glenn Morris  <rgm@gnu.org>
 -
        * minibuf.texi (Basic Completion): Mention misc completion-table funcs.
  
 -2012-11-17  Leo Liu  <sdl.web@gmail.com>
 +2012-11-18  Leo Liu  <sdl.web@gmail.com>
  
        * minibuf.texi (Programmed Completion): Doc fix for metadata
        request (Bug#12850).
  
 -2012-11-17  Glenn Morris  <rgm@gnu.org>
 +2012-11-18  Glenn Morris  <rgm@gnu.org>
  
        * display.texi (Temporary Displays): Document with-temp-buffer-window.
  
        Fix description of display-buffer-below-selected.  Reorder actions.
        Add example (Bug#12848).
  
 -2012-11-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 -
 -      * keymaps.texi (Translation Keymaps): Add a subsection "Interaction
 -      with normal keymaps" (bug#12868).
 -
 -2012-11-15  Glenn Morris  <rgm@gnu.org>
 +2012-11-16  Glenn Morris  <rgm@gnu.org>
  
        * display.texi (Face Attributes): Fix :underline COLOR description.
        (Attribute Functions): Update for set-face-underline rename.
        Tweak descriptions of face-underline-p, face-inverse-video-p.
  
 -2012-11-14  Glenn Morris  <rgm@gnu.org>
 -
        * keymaps.texi (Searching Keymaps, Tool Bar): Untabify examples,
        so they align better in info.
        (Active Keymaps, Searching Keymaps, Controlling Active Maps):
        Document set-temporary-overlay-map.
  
 -2012-11-12  Glenn Morris  <rgm@gnu.org>
 +2012-11-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keymaps.texi (Translation Keymaps): Add a subsection "Interaction
 +      with normal keymaps".
 +
 +2012-11-15  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * internals.texi (Garbage Collection): Update descriptions
 +      of vectorlike_header, garbage-collect and gc-cons-threshold.
 +      (Object Internals): Explain Lisp_Object layout and the basics
 +      of an internal type system.
 +      (Buffer Internals): Update description of struct buffer.
 +
 +2012-11-13  Glenn Morris  <rgm@gnu.org>
  
        * variables.texi (Adding Generalized Variables):
        At least mention gv-define-expander and gv-letplace.
  
 -2012-11-11  Glenn Morris  <rgm@gnu.org>
 -
        * debugging.texi (Error Debugging): Mention debug-on-message.
        (Using Debugger): Mention debugger-bury-or-kill.
  
        * variables.texi (Adding Generalized Variables):
        Use standard formatting for common lisp note about setf functions.
  
 -2012-11-07  Martin Rudalics  <rudalics@gmx.at>
 +2012-11-10  Martin Rudalics  <rudalics@gmx.at>
  
        * elisp.texi (Top): Add Recombining Windows to menu.
        * windows.texi (Recombining Windows): New subsection.
        (Splitting Windows): Rewrite text on handling of window
        combinations and move it to new subsection.
  
 -2012-11-07  Chong Yidong  <cyd@gnu.org>
 +2012-11-10  Chong Yidong  <cyd@gnu.org>
  
        * searching.texi (Replacing Match): Document \? in replace-match.
  
  
        * edebug.texi (Specification List): setf is no longer CL-only.
  
 -2012-11-07  Glenn Morris  <rgm@gnu.org>
 +2012-11-10  Glenn Morris  <rgm@gnu.org>
  
        * variables.texi (Adding Generalized Variables):
        Update description of FIX-RETURN expansion.
  
 -2012-11-06  Glenn Morris  <rgm@gnu.org>
 -
        * variables.texi (Setting Generalized Variables):
        Split most of previous contents into this subsection.
        (Adding Generalized Variables): New subsection.
  
        * elisp.texi: Add Generalized Variables subsections to detailed menu.
  
 -2012-11-05  Chong Yidong  <cyd@gnu.org>
 +2012-11-10  Chong Yidong  <cyd@gnu.org>
  
        * frames.texi (Initial Parameters): Doc fix (Bug#12144).
  
 +2012-11-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * os.texi (Notifications): Update descriptions of
 +      notifications-notify, notifications-close-notification and
 +      notifications-get-capabilities according to latest code changes.
 +      Add notifications-get-server-information.
 +
  2012-11-03  Chong Yidong  <cyd@gnu.org>
  
        * objects.texi (General Escape Syntax): Clarify the explanation of
  
  2012-02-04  Chong Yidong  <cyd@gnu.org>
  
 -      * functions.texi (What Is a Function): Add closures.  Mention
 -      "return value" terminology.  Add xref for command-execute.
 +      * functions.texi (What Is a Function): Add closures.
 +      Mention "return value" terminology.  Add xref for command-execute.
        Remove unused "keystroke command" terminology.
        (Lambda Expressions): Give a different example than in the
        following subsection.  Add xref to Anonymous Functions.
  
  2002-05-13  Kim F. Storm  <storm@cua.dk>
  
 -      * variables.texi (Intro to Buffer-Local): Updated warning and
 +      * variables.texi (Intro to Buffer-Local): Update warning and
        example relating to changing buffer inside let.
  
  2002-03-10  Jan Djärv  <jan.h.d@swipnet.se>
@@@ -196,8 -196,9 +196,8 @@@ an example
  @end example
  
  @noindent
 -In Emacs Lisp, such a list is valid as an expression---it evaluates to
 -itself.  But its main use is not to be evaluated as an expression, but
 -to be called as a function.
 +In Emacs Lisp, such a list is a valid expression which evaluates to
 +a function object.
  
    A lambda expression, by itself, has no name; it is an @dfn{anonymous
  function}.  Although lambda expressions can be used this way
@@@ -974,10 -975,11 +974,11 @@@ Note that we do not quote the @code{lam
  compiled.  This would not happen if, say, you had constructed the
  anonymous function by quoting it as a list:
  
+ @c Do not unquote this lambda!
  @example
  @group
  (defun double-property (symbol prop)
-   (change-property symbol prop (lambda (x) (* 2 x))))
+   (change-property symbol prop '(lambda (x) (* 2 x))))
  @end group
  @end example
  
diff --combined doc/lispref/loading.texi
@@@ -461,7 -461,7 +461,7 @@@ and calls @code{define-key}; not even i
  symbol @var{function}.
  
  @cindex function cell in autoload
if @var{function} already has non-void function definition that is not
If @var{function} already has a non-void function definition that is not
  an autoload object, this function does nothing and returns @code{nil}.
  Otherwise, it constructs an autoload object (@pxref{Autoload Type}),
  and stores it as the function definition for @var{function}.  The
@@@ -483,7 -483,7 +483,7 @@@ For example
  @noindent
  In this case, @code{"prolog"} is the name of the file to load, 169681
  refers to the documentation string in the
 -@file{emacs/etc/DOC-@var{version}} file (@pxref{Documentation Basics}),
 +@file{emacs/etc/DOC} file (@pxref{Documentation Basics}),
  @code{t} means the function is interactive, and @code{nil} that it is
  not a macro or a keymap.
  @end defun
@@@ -729,7 -729,7 +729,7 @@@ file should call @code{provide} at the 
  (defun idlwave-complete-filename ()
    "Use the comint stuff to complete a file name."
     (require 'comint)
 -   (let* ((comint-file-name-chars "~/A-Za-z0-9+@:_.$#%=@{@}\\-")
 +   (let* ((comint-file-name-chars "~/A-Za-z0-9+@@:_.$#%=@{@}\\-")
            (comint-completion-addsuffix nil)
            ...)
         (comint-dynamic-complete-filename)))
@@@ -990,18 -990,19 +990,18 @@@ file that was just loaded
  @end defvar
  
  If you want code to be executed when a @emph{particular} library is
 -loaded, use the function @code{eval-after-load}:
 +loaded, use the macro @code{with-eval-after-load}:
  
 -@defun eval-after-load library form
 -This function arranges to evaluate @var{form} at the end of loading
 +@defmac with-eval-after-load library body@dots{}
 +This macro arranges to evaluate @var{body} at the end of loading
  the file @var{library}, each time @var{library} is loaded.  If
 -@var{library} is already loaded, it evaluates @var{form} right away.
 -Don't forget to quote @var{form}!
 +@var{library} is already loaded, it evaluates @var{body} right away.
  
  You don't need to give a directory or extension in the file name
  @var{library}.  Normally, you just give a bare file name, like this:
  
  @example
 -(eval-after-load "edebug" '(def-edebug-spec c-point t))
 +(with-eval-after-load "edebug" (def-edebug-spec c-point t))
  @end example
  
  To restrict which files can trigger the evaluation, include a
@@@ -1013,16 -1014,16 +1013,16 @@@ example, @file{my_inst.elc} or @file{my
  @file{my_inst.el}:
  
  @example
 -(eval-after-load "foo/bar/my_inst.elc" @dots{})
 +(with-eval-after-load "foo/bar/my_inst.elc" @dots{})
  @end example
  
  @var{library} can also be a feature (i.e., a symbol), in which case
 -@var{form} is evaluated at the end of any file where
 +@var{body} is evaluated at the end of any file where
  @code{(provide @var{library})} is called.
  
 -An error in @var{form} does not undo the load, but does prevent
 -execution of the rest of @var{form}.
 -@end defun
 +An error in @var{body} does not undo the load, but does prevent
 +execution of the rest of @var{body}.
 +@end defmac
  
  Normally, well-designed Lisp programs should not use
  @code{eval-after-load}.  If you need to examine and set the variables
@@@ -1030,3 -1031,18 +1030,3 @@@ defined in another library (those mean
  it immediately---there is no need to wait until the library is loaded.
  If you need to call functions defined by that library, you should load
  the library, preferably with @code{require} (@pxref{Named Features}).
 -
 -@defvar after-load-alist
 -This variable stores an alist built by @code{eval-after-load},
 -containing the expressions to evaluate when certain libraries are
 -loaded.  Each element looks like this:
 -
 -@example
 -(@var{regexp-or-feature} @var{forms}@dots{})
 -@end example
 -
 -The key @var{regexp-or-feature} is either a regular expression or a
 -symbol, and the value is a list of forms.  The forms are evaluated
 -when the key matches the absolute true name or feature name of the
 -library being loaded.
 -@end defvar
diff --combined doc/misc/ChangeLog
 -2013-03-11  Glenn Morris  <rgm@gnu.org>
+ 2013-06-24  Glenn Morris  <rgm@gnu.org>
+       * eshell.texi: Fix cross-references to other manuals.
 +2013-06-23  Glenn Morris  <rgm@gnu.org>
  
 -      * Version 24.3 released.
 +      * Makefile.in (HTML_TARGETS, html, emacs-faq.html, emacs-faq):
 +      Remove; not needed now we use a standard html layout for the faq.
 +      (clean): Remove HTML_TARGETS, emacs-faq.text.
 +
 +2013-06-21  Eduard Wiebe  <usenet@pusto.de>
 +
 +      * flymake.texi (Parsing the output, Customizable variables):
 +      Add reference to `flymake-warning-predicate'.
 +
 +2013-06-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Top, Configuration): Insert section `Predefined
 +      connection information' in menu.
 +      (Predefined connection information): New section.
 +      (Android shell setup): Make a reference to `Predefined connection
 +      information'.
 +
 +2013-06-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (version): New, set by configure.
 +      (clean): Delete dist tar file.
 +      (infoclean): New, split from maintainer-clean.
 +      (maintainer-clean): Run infoclean.
 +      (dist): New rule, to make tarfile for www.gnu.org.
 +
 +2013-06-13  Albert Krewinkel  <tarleb@moltkeplatz.de>
 +
 +      * sieve.texi (Managing Sieve): Fix port in example, fix documentation
 +      for keys q and Q.
 +      (Standards): Reference RFC5804 as the defining document of the
 +      managesieve protocol.
 +
 +2013-06-10  Aidan Gauland  <aidalgol@amuri.net>
 +
 +      * eshell.texi (Input/Output): Expand to cover new visual-command
 +      options, eshell-visual-subcommands and eshell-visual-options.
 +      Divide into separate Visual Commands and Redirection sections.
 +
 +2013-06-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * epa.texi (Cryptographic operations on files): Update epa-decrypt-file.
 +
 +2013-06-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * gnus.texi (Article Date):
 +      Fix description of gnus-article-update-date-headers.
 +
 +2013-05-28  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * erc.texi (Special Features): ERC is being maintained within
 +      Emacs now.
 +
 +2013-05-25  Xue Fuqiao  <xfq.free@gmail.com>
 +
 +      * flymake.texi: Changing from one space between sentences to two.
 +
 +2013-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * cl.texi (Obsolete Macros): Describe replacements for `flet'
 +      (bug#14293).
 +
 +2013-04-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Frequently Asked Questions): Precise, how to define
 +      an own ControlPath.
 +
 +2013-04-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Frequently Asked Questions): New item for
 +      ControlPath settings.
 +
 +2013-03-31  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Basic Operations on Units): Streamline some
 +      descriptions.
 +
 +2013-03-27  Aidan Gauland  <aidalgol@no8wireless.co.nz>
 +
 +      * eshell.texi (Built-ins): Update manual to mention tramp module.
 +
 +2013-03-18  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Filename Syntax): Host names are not allowed to be
 +      any method name, unless method name is specified explicitly.
 +      Remove restriction on unibyte filenames.
 +
 +      * trampver.texi: Update release number.
 +
 +2013-03-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      doc: convert some TeX accents to UTF-8
 +      * emacs-mime.texi (Interface Functions): Use 'ï' rather than
 +      '@"{@dotless{i}}'.
 +
 +2013-03-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.2.7.
 +
 +      * trampver.texi: Update release number.
 +
 +2013-03-09  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Basic Operations on Units): Streamline some
 +      descriptions.
 +
 +2013-03-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * faq.texi (Top): Don't say this was updated @today.
 +      That's irrelevant and leads to spurious diffs.
 +
 +2013-03-08  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Basic Operations on Units):
 +      Fix cross-reference.
 +
 +2013-03-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * gnus-faq.texi (FAQ 3-11): Now Gnus supports POP3 UIDL.
 +
 +2013-03-06  Alan Mackenzie  <acm@muc.de>
 +
 +      * cc-mode.texi (Custom Line-Up): Clarify position of point on
 +      calling a line-up function.
 +
 +2013-03-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * emacs-mime.texi, htmlfontify.texi, mairix-el.texi, mh-e.texi:
 +      * ses.texi: Switch from Latin-1 to UTF-8.
 +
 +2013-03-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (External methods): Tramp does not connect Android
 +      devices by itself.
 +
 +2013-03-02  Bill Wohler  <wohler@newt.com>
 +
 +      Release MH-E manual version 8.5.
 +
 +      * mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
 +      release 8.5.
 +
 +      * mh-e.texi (Preface, Conventions, Getting Started)
 +      (Using This Manual, Folder Selection, Viewing, Aliases)
 +      (Identities, Speedbar, Menu Bar, Tool Bar, Scan Line Formats)
 +      (Bug Reports, Mailing Lists, MH FAQ and Support, Getting MH-E):
 +      Update URLs.
 +
 +2013-03-01  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Inline methods): Remove "ssh1", "ssh2", "plink1"
 +      and "plink2" entries.  "plink2" is obsolete for a long time.
 +      (External methods): Remove "scp1" and "scp2" entries.
 +      Explain user name and host name specification for "adb".
 +
 +2013-02-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (External methods): Mention `tramp-adb-program'.
  
  2013-02-28  Bastien Guerry  <bzg@gnu.org>
  
        visibility settings to be honored in any circumstances.
        (Progress logging, Checkboxes): Fix typos.
  
 -2013-02-25  Michael Albinus  <michael.albinus@gmx.de>
 +2013-02-28  Michael Albinus  <michael.albinus@gmx.de>
  
        * tramp.texi (top) [xxx, yyy, trampfn]: Provide two versions of
        the macros, for Texinfo 4.13 and 5.0.
  
  2013-02-24  Michael Albinus  <michael.albinus@gmx.de>
  
 -      Port documentation to Texinfo 5.0.
 -
 +      Port Tramp documentation to Texinfo 5.0.
        * tramp.texi (top) [xxx, yyy, trampfn]: Remove superfluous @c.
        (Filename Syntax): Do not use @trampfn{} in @item.
        (Filename completion): Use @columnfractions in @multitable.
  
        * flymake.texi (Syntax check statuses): Fix multitable continued rows.
  
 +2013-02-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * Makefile.in (html): New rule.
 +
 +2013-02-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Android shell setup): Improve.  Reported by Thierry
 +      Volpiatto <thierry.volpiatto@gmail.com>.
 +
 +2013-02-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Top, Configuration): Insert section `Android shell
 +      setup' in menu.
 +      (Android shell setup): New section.
 +      (Connection types, Default Method)
 +      (Frequently Asked Questions): Mention "scp" instead of "scpc".
 +      (External methods): Remove "scpc" and "rsyncc" entries.
 +      (Frequently Asked Questions): Remove entry about ControlPersist.
 +
 +2013-02-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * message.texi (News Headers): Don't mention yow any more.
 +
 +2013-02-09  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Basic Operations on Units):
 +      (Customizing Calc): Mention the variable `calc-allow-units-as-numbers'.
 +
  2013-02-08  Aidan Gauland  <aidalgol@no8wireless.co.nz>
  
        * eshell.texi: Fill most of the missing sections.
        (Org-Plot): Fix link.
        (Checkboxes, Radio lists): Fix typos.
  
 -2013-02-06  Glenn Morris  <rgm@gnu.org>
 +2013-02-07  Glenn Morris  <rgm@gnu.org>
  
        * cl.texi (Equality Predicates): Mention memql.
  
 -2013-02-03  Eric Ludlam  <zappo@gnu.org>
 +2013-02-07  Eric Ludlam  <zappo@gnu.org>
  
        * doc/misc/ede.texi (Creating a project): Make ede-new doc less
        specific, and only about items it supports, indicating that there
        Add ede-generic-project link.
        (ede-generic-project): New node (bug#11441).
  
 -2013-02-03  Glenn Morris  <rgm@gnu.org>
 +2013-02-07  Glenn Morris  <rgm@gnu.org>
  
        * cl.texi (Equality Predicates): Fix eq/eql pedantry.
  
 +2013-02-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * calc.texi (Help Commands): Update calc-view-news description.
 +      Mention etc/CALC-NEWS.
 +
 +2013-01-24  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Filename Syntax): Filenames must be unibyte strings.
 +
  2013-01-13  Bastien Guerry  <bzg@gnu.org>
  
        * org.texi (Installation): Simplify.
        variable `org-id-link-to-org-use-id'.  Mention the need to load
        the org-id library.
  
 -2013-01-08  Bastien Guerry  <bzg@gnu.org>
 +2013-01-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (Default Host): Introduce `tramp-default-host-alist'.
 +
 +2013-01-09  Bastien Guerry  <bzg@gnu.org>
  
        * org.texi (Pushing to MobileOrg): Add footnote about using
        symbolic links in `org-directory'.
        `org-mark-subtree'.
        (Tag inheritance): Document `org-agenda-use-tag-inheritance'.
  
 +2013-01-08  Juri Linkov  <juri@jurta.org>
 +
 +      * info.texi (Go to node): Mention the abbreviated format
 +      `(FILENAME)' equal to `(FILENAME)Top'.  (Bug#13365)
 +
  2013-01-06  Andreas Schwab  <schwab@linux-m68k.org>
  
        * autotype.texi: Remove undefined command @subtitlefont.
        * ede.texi (Top): Rename from top, all uses changed.
        * eshell.texi: Add missing argument to @sp.
        * forms.texi (Top): Reorder menu to match structure.
 -      * htmlfontify.texi (Customisation): Add missing @item in @enumerate.
 +      * htmlfontify.texi (Customisation): Add missing @item in
 +      @enumerate.
        * org.texi (Advanced features): Add missing argument for @item.
        (Property searches): Use @backslashchar{} in macro argument.
        * pcl-cvs.texi: Add missing argument to @sp.
  
        * htmlfontify.texi: New file.
  
 -2012-12-22  Glenn Morris  <rgm@gnu.org>
 +2013-01-02  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Free-Form Dates): Expand on the date reading
 +      algorithm.
 +
 +2012-12-27  Glenn Morris  <rgm@gnu.org>
  
        * viper.texi (Rudimentary Changes, Key Bindings, Key Bindings):
        Avoid some overfull lines.
        * Makefile.in (gfdl): New variable.  Use throughout where
        appropriate so that targets depend on doclicense.texi.
  
 +2012-12-25  Lars Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnus.texi (Customizing the IMAP Connection): Mention the other
 +      authenticators.
 +
 +2012-12-24  Lars Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnus.texi (Browse Foreign Server):
 +      Document `gnus-browse-delete-group'.
 +
 +2012-12-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * ada-mode.texi, ebrowse.texi, ediff.texi, ert.texi, eshell.texi:
 +      * eudc.texi, idlwave.texi, pcl-cvs.texi, rcirc.texi, reftex.texi:
 +      * remember.texi, ses.texi, speedbar.texi, vip.texi, viper.texi:
 +      * widget.texi, wisent.texi: Nuke hand-written node pointers.
 +
 +      * Makefile.in (gfdl): New variable.  Use throughout where
 +      appropriate so that targets depend on doclicense.texi.
 +
  2012-12-22  Eli Zaretskii  <eliz@gnu.org>
  
        * makefile.w32-in ($(INFO_TARGETS), $(DVI_TARGETS)): Depend on
        doclicense.texi.  Remove doclicense.texi from all targets that
        mentioned it explicitly.
 +      ($(infodir)/woman$(INFO_EXT), woman.dvi): Depend on
 +      $(emacsdir)/emacsver.texi.
 +      ($(infodir)/erc$(INFO_EXT), erc.dvi): Don't depend on gpl.texi.
  
  2012-12-21  Glenn Morris  <rgm@gnu.org>
  
 +      * woman.texi (UPDATED, VERSION): Remove in favor of EMACSVER.
 +      Include emacsver.texi.  Nuke hand-written node pointers.
 +      * Makefile.in ($(buildinfodir)/woman$(INFO_EXT), woman.dvi, woman.pdf):
 +      Depend on emacsver.texi.
 +
        * auth.texi, emacs-gnutls.texi, epa.texi, ert.texi:
        * gnus-coding.texi, info.texi, nxml-mode.texi, sasl.texi:
        May as well just include doclicense.texi in everything.
  
        * erc.texi: No need to include gpl in this small manual.
  
 -2012-12-14  Glenn Morris  <rgm@gnu.org>
 -
        * org.texi (copying): Include a copy of the GFDL.
        (GNU Free Documentation License): New section.
  
 -2012-12-13  Bastien Guerry  <bzg@gnu.org>
 +2012-12-21  Bastien Guerry  <bzg@gnu.org>
  
        * org.texi: Fix typos.
  
 +2012-12-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * calc.texi (ISO 8601): Rename from ISO-8601,
 +      as it's typically spelled without a hyphen.
 +
 +2012-12-16  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (ISO-8601): New section.
 +      (Date Formatting Codes): Mention new codes.
 +      (Standard Date Formats): Mention new formats.
 +
 +2012-12-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (External methods): Move `adb' method here.
 +
  2012-12-13  Glenn Morris  <rgm@gnu.org>
  
 +      * cl.texi (Modify Macros, Obsolete Macros): Now letf == cl-letf.
 +
        * wisent.texi: Small edits.  Set copyright to FSF, update license to
        GFDL 1.3+.
        * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add wisent.
  
        * bovine.texi, wisent.texi: New files, imported from CEDET trunk.
  
 -2012-12-12  Glenn Morris  <rgm@gnu.org>
 +2012-12-13  Glenn Morris  <rgm@gnu.org>
  
        * flymake.texi (Customizable variables, Locating the buildfile):
        Remove refs to flymake-buildfile-dirs, removed 2007-07-20.  (Bug#13148)
        * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add srecode.
        ($(infodir)/srecode$(INFO_EXT), srecode.dvi): New targets.
  
 -2012-12-12  Eric Ludlam  <zappo@gnu.org>
 +2012-12-13  Eric Ludlam  <zappo@gnu.org>
  
        * srecode.texi: New file, imported from CEDET trunk.
  
 -2012-12-12  Bastien Guerry  <bzg@gnu.org>
 +2012-12-13  Bastien Guerry  <bzg@gnu.org>
  
        * org.texi (Summary, Code block specific header arguments)
        (Code block specific header arguments)
  
        * org.texi (System-wide header arguments)
        (Header arguments in Org mode properties, Conflicts)
 -      (Dynamic blocks, Using the mapping API): Fix indendation of
 -      Elisp code examples.
 +      (Dynamic blocks, Using the mapping API):
 +      Fix indentation of Elisp code examples.
  
        * org.texi (Comment lines): Fix description of the comment syntax.
  
        * org.texi (Installation): Mention "make test" in the correct section.
  
 -2012-12-02  Michael Albinus  <michael.albinus@gmx.de>
 +2012-12-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doclicense.texi, gpl.texi: Update to latest version from FSF.
 +      These are just minor editorial changes.
 +
 +2012-12-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * tramp.texi (History): Mention ADB.
 +      (Inline methods): Add `adb' method.
 +
 +2012-12-03  Michael Albinus  <michael.albinus@gmx.de>
  
        * tramp.texi (Top, Obtaining Tramp): Replace CVS by Git.
        (External methods): Fix typo.
  
 -2012-11-30  Glenn Morris  <rgm@gnu.org>
 +2012-12-03  Glenn Morris  <rgm@gnu.org>
  
        * rcirc.texi (Notices): Fix typo.
  
 -2012-11-20  Michael Albinus  <michael.albinus@gmx.de>
 +2012-11-25  Bill Wohler  <wohler@newt.com>
 +
 +      Release MH-E manual version 8.4.
 +
 +      * mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH, Preface):
 +      Update for release 8.4.
 +
 +      * mh-e.texi (Sequences): Add mh-whitelist-preserves-sequences-flag.
 +      (Junk): Add mh-whitelist-preserves-sequences-flag,
 +      mh-blacklist-msg-hook, mh-whitelist-msg-hook,
 +      mh-folder-blacklisted, mh-folder-whitelisted (closes SF #2945712).
 +
 +2012-11-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * mh-e.texi (Procmail): Fix two @ typos.
 +
 +2012-11-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doclicense.texi, gpl.texi: Update to latest version from FSF.
 +      These are just minor editorial changes.
 +
 +2012-11-23  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.texi (Date Formatting Codes): Mention the new beginning of
 +      the date numbering system.
 +
 +2012-11-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * calc.texi: Fix TeX issues with capitals followed by ".", "?", "!".
 +      (Date Forms): Correct off-by-one error in explanation of
 +      Julian day numbers.  Give Gregorian equivalent of its origin.
 +
 +2012-11-22  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * doc/misc/calc.texi (Date Forms): Mention the customizable
 +      Gregorian-Julian switch.
 +      (Customizing Calc): Mention the variable `calc-gregorian-switch'.
 +
 +2012-11-17  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * trampver.texi: Downgrade version to 2.2.6-24.3, in order to
 -      distinguish from trunk.
 +      Calc now uses the Gregorian calendar for all dates (Bug#12633).
 +      It also uses January 1, 1 AD as its day number 1.
 +      * calc.texi (Date Forms): Document this.
  
  2012-11-16  Glenn Morris  <rgm@gnu.org>
  
        * cl.texi (Function Bindings): Clarify that cl-flet is lexical.
        (Obsolete Macros): Move example here from Function Bindings.
  
 -2012-11-13  Glenn Morris  <rgm@gnu.org>
 -
        * erc.texi: Use @code{nil} rather than just "nil".
        (Modules): Undocument obsolete "hecomplete".
        Add "notifications".
        (Connecting): Add brief section on passwords.
        (Options): Make a start by adding erc-hide-list, erc-lurker-hide-list.
  
 -2012-11-12  Glenn Morris  <rgm@gnu.org>
 +2012-11-13  Glenn Morris  <rgm@gnu.org>
  
        * flymake.texi (Customizable variables)
        (Highlighting erroneous lines): Mention flymake-error-bitmap,
        flymake-warning-bitmap, and flymake-fringe-indicator-position.
  
 -2012-11-09  Chong Yidong  <cyd@gnu.org>
 +2012-11-12  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 +
 +      * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range.
 +      In all file place SES into @acronym{...}.
 +      (Advanced Features): Add key index and function index for
 +      ses-set-header-row.  Add description for function
 +      ses-rename-cell.  Add description for function
 +      ses-repair-cell-reference-all.
 +      (Ranges in formulas): Add description for ses-range flags.
 +
 +2012-11-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * texinfo.tex: Merge from gnulib.
 +
 +2012-11-10  Chong Yidong  <cyd@gnu.org>
  
        * url.texi (Introduction): Move url-configuration-directory to
        Customization node.
        Improve docs for url-queue-*.
        (Supported URL Types): Copyedits.  Delete empty subnodes.
  
 -2012-11-08  Chong Yidong  <cyd@gnu.org>
 -
        * url.texi (Introduction): Rename from Getting Started.
        Rewrite the introduction.
        (URI Parsing): Rewrite.  Omit the obsolete attributes slot.
  
 -2012-11-07  Glenn Morris  <rgm@gnu.org>
 +2012-11-10  Glenn Morris  <rgm@gnu.org>
  
        * cl.texi (Obsolete Setf Customization):
        Revert defsetf example to the more correct let rather than prog1.
        Give define-modify-macro, defsetf, and define-setf-method
        gv.el replacements.
  
 -2012-11-06  Glenn Morris  <rgm@gnu.org>
 -
        * cl.texi (Overview): Mention EIEIO here, as well as the appendix.
        (Setf Extensions): Remove obsolete reference.
        (Obsolete Setf Customization):
        (Compiler Optimizations): Rename from "Optimizing Compiler"; reword.
        (Creating Symbols, Random Numbers): De-emphasize internal
        variables cl--gensym-counter and cl--random-state.  (Bug#12788)
 +      (Naming Conventions, Type Predicates, Macros)
 +      (Predicates on Numbers): No longer mention cl-floatp-safe.
  
 -2012-11-02  Glenn Morris  <rgm@gnu.org>
 +2012-11-02  Katsumi Yamaoka  <yamaoka@jpl.org>
  
 -      * cl.texi (Naming Conventions, Type Predicates, Macros)
 -      (Predicates on Numbers): No longer mention cl-floatp-safe.
 +      * gnus.texi (Mail Source Specifiers):
 +      Document :leave keyword used for pop mail source.
  
  2012-11-01  Glenn Morris  <rgm@gnu.org>
  
        (Imprint): Mention Wolfgang in list of contributors.
        (Creating Citations): Give a hint about how to
        auto-revert the BibTeX database file when using external editors.
 -      (Referencing Labels): Simplify section about reference macro cycling.
 +      (Referencing Labels): Simplify section about reference macro
 +      cycling.
        (Options (Referencing Labels)): Adapt to new structure of
        `reftex-ref-style-alist'.
        (Referencing Labels, Reference Styles): Document changes in the
  
        * org.texi (History and Acknowledgments): Fix typo.
  
 -      * org.texi (History and Acknowledgments): Add my own acknowledgments.
 +      * org.texi (History and Acknowledgments): Add my own
 +      acknowledgments.
  
        * org.texi (Agenda commands): Document the new command and the new
        option.
  
        * org.texi (Agenda commands): Delete `org-agenda-action' section.
 -      (Agenda commands): Reorder.  Document `*' to toggle persistent marks.
 +      (Agenda commands): Reorder.  Document `*' to toggle persistent
 +      marks.
  
        * org.texi (Agenda dispatcher):
        Mention `org-toggle-agenda-sticky'.
        * org.texi (Formula syntax for Lisp): Reformat.
  
        * org.texi (Special properties, Column attributes)
 -      (Agenda column view): Document the new special property CLOCKSUM_T.
 +      (Agenda column view): Document the new special property
 +      CLOCKSUM_T.
  
        * org.texi (Template expansion): Document the new %l template.
  
  
        * org.texi: The sections in the Exporting section of the manual
        left out articles in the description of the org-export-as-*
 -      commands, among other places. This patch adds them, adds a few
 +      commands, among other places.  This patch adds them, adds a few
        missing prepositions, and switches instances of "an HTML" to "a
        html" for internal consistency.
  
  2012-09-30  Nicolas Goaziou  <n.goaziou@gmail.com>
  
        * org.texi (Literal examples): Remove reference to unknown
 -      `org-export-latex-minted' variable. Also simplify footnote since
 +      `org-export-latex-minted' variable.  Also simplify footnote since
        `org-export-latex-listings' documentation is exhaustive already.
  
        * org.texi (Plain lists): Remove reference to now hard-coded
        simplifications.
        (Basic Simplifications): Rename from "Limited Simplifications"
        Replace "limited" by "basic" throughout.
 -      (Algebraic Simplifications):  Indicate that the algebraic
 +      (Algebraic Simplifications): Indicate that the algebraic
        simplifications are done by default.
 -      (Unsafe Simplifications):  Mention `m E'.
 +      (Unsafe Simplifications): Mention `m E'.
        (Simplification of Units): Mention `m U'.
        (Trigonometric/Hyperbolic Functions, Reducing and Mapping)
        (Kinds of Declarations, Functions for Declarations):
  2012-04-01  Carsten Dominik  <carsten.dominik@gmail.com>
  
        * org.texi (MobileOrg): Change the wording to reflect that the
 -      Android Version is no longer just the little brother of the iOS version.
 +      Android Version is no longer just the little brother of the iOS
 +      version.
  
  2012-04-01  Eric Schulte  <eric.schulte@gmx.com>
  
  2012-01-03  Eric Schulte  <eric.schulte@gmx.com>
  
        * org.texi (Noweb reference syntax): Adding documentation of
 -      the `*org-babel-use-quick-and-dirty-noweb-expansion*' variable.
 +      the `*org-babel-use-quick-and-dirty-noweb-expansion*'
 +      variable.
  
  2012-01-03  Bastien Guerry  <bzg@gnu.org>
  
  
  2012-01-03  Thomas Dye  <dk@poto.local>
  
 -      * org.texi: Changed DATA to NAME in Working With Source Code section.
 +      * org.texi: Changed DATA to NAME in Working With Source Code
 +      section.
  
  2012-01-03  Tom Dye  <tsd@tsdye.com>
  
  
  2012-01-03  Tom Dye  <tsd@tsdye.com>
  
 -      * org.texi: Added a line to specify that header arguments are lowercase.
 +      * org.texi: Added a line to specify that header arguments are
 +      lowercase.
  
  2012-01-03  Tom Dye  <tsd@tsdye.com>
  
  
  2012-01-03  David Maus  <dmaus@ictsoc.de>
  
 -      * org.texi (Exporting Agenda Views, Extracting agenda information):
 -      Fix command line syntax, quote symbol parameter values.
 +      * org.texi (Exporting Agenda Views, Extracting agenda
 +      information): Fix command line syntax, quote symbol parameter
 +      values.
  
  2012-01-03  David Maus  <dmaus@ictsoc.de>
  
  
  2011-08-15  Bastien Guerry  <bzg@gnu.org>
  
 -      * org.texi (Languages): Add Lilypond and Awk as supported languages.
 +      * org.texi (Languages): Add Lilypond and Awk as supported
 +      languages.
  
  2011-08-15  Achim Gratz  <stromeko@nexgo.de>
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
        * org.texi (Results of evaluation): More explicit about the
 -      mechanism through which interactive evaluation of code is performed.
 +      mechanism through which interactive evaluation of code is
 +      performed.
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
  
  2011-08-15  Puneeth Chaganti  <punchagan@gmail.com>
  
 -      * org.texi (Agenda commands): Doc for function option to bulk action.
 +      * org.texi (Agenda commands): Doc for function option to bulk
 +      action.
  
  2011-08-15  Carsten Dominik  <carsten.dominik@gmail.com>
  
 -      * org.texi (Template expansion): Document new %<...> template escape.
 +      * org.texi (Template expansion): Document new %<...> template
 +      escape.
  
  2011-08-15  Carsten Dominik  <carsten.dominik@gmail.com>
  
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
 -      * org.texi (padline): Documentation of the new padline header argument.
 +      * org.texi (padline): Documentation of the new padline header
 +      argument.
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
 -      * org.texi (var): Clarification of indexing into tabular variables.
 +      * org.texi (var): Clarification of indexing into tabular
 +      variables.
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
 -      * org.texi (Code evaluation security): Add example for using a function.
 +      * org.texi (Code evaluation security): Add example for using a
 +      function.
  
  2011-08-15  Eric Schulte  <schulte.eric@gmail.com>
  
  2011-07-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
        * widget.texi (Setting Up the Buffer): Remove mention of the
 -      global keymap parent, which doesn't seem to be accurate (bug#7045).
 +      global keymap parent, which doesn't seem to be accurate
 +      (bug#7045).
  
  2011-07-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
  
  2011-03-06  Jay Belanger  <jay.p.belanger@gmail.com>
  
 -      * calc.texi (Logarithmic Units): Rename calc-logunits-dblevel and
 -      calc-logunits-nplevel to calc-dblevel and calc-nplevel, respectively.
 +      * calc.texi (Logarithmic Units): Rename calc-logunits-dblevel
 +      and calc-logunits-nplevel to calc-dblevel and calc-nplevel,
 +      respectively.
        (Musical Notes): New section.
        (Customizing Calc): Mention the customizable variable
        calc-note-threshold.
        dired-add-entry, dired-initial-position, dired-clean-up-after-deletion,
        dired-read-shell-command, or dired-find-buffer-nocreate.
  
 +2013-02-18  Aidan Gauland  <aidalgol@no8wireless.co.nz>
 +
 +      * eshell.texi (Input/Output): Document insert output redirection operator, >>>.
 +
  2011-02-18  Glenn Morris  <rgm@gnu.org>
  
        * dired-x.texi (Optional Installation File At Point): Simplify.
diff --combined doc/misc/eshell.texi
@@@ -58,7 -58,7 +58,7 @@@ modify this GNU manual.'
  @c ================================================================
  
  @ifnottex
 -@node Top, What is Eshell?, (dir), (dir)
 +@node Top
  @top Eshell
  
  Eshell is a shell-like command interpreter
@@@ -378,12 -378,13 +378,13 @@@ Similar to, but slightly different from
  
  @item define
  @cmindex define
- Define a varalias.  @xref{Variable Aliases, , , elisp}.
+ Define a varalias.
+ @xref{Variable Aliases, , , elisp, The Emacs Lisp Reference Manual}.
  
  @item diff
  @cmindex diff
  Use Emacs's internal @code{diff} (not to be confused with
- @code{ediff}).  @xref{Comparing Files, , , elisp}.
+ @code{ediff}).  @xref{Comparing Files, , , emacs, The GNU Emacs Manual}.
  
  @item grep
  @cmindex grep
@@@ -422,15 -423,18 +423,18 @@@ and @code{("foo" "bar")} both evaluate 
  @item locate
  @cmindex locate
  Alias to Emacs's @code{locate} function, which simply runs the external
- @command{locate} command and parses the results.  @xref{Dired and `find', , , elisp}.
+ @command{locate} command and parses the results.
+ @xref{Dired and Find, , , emacs, The GNU Emacs Manual}.
  
  @item make
  @cmindex make
- Run @command{make} through @code{compile}.  @xref{Running Compilations under Emacs, , , elisp}.
+ Run @command{make} through @code{compile}.
+ @xref{Compilation, , , emacs, The GNU Emacs Manual}.
  
  @item occur
  @cmindex occur
- Alias to Emacs's @code{occur}.  @xref{Other Search-and-Loop Commands, , , elisp}.
+ Alias to Emacs's @code{occur}.
+ @xref{Other Repeating Search, , , emacs, The GNU Emacs Manual}.
  
  @item printnl
  @cmindex printnl
@@@ -460,9 -464,8 +464,9 @@@ With @samp{cd -42}, you can access the 
  @cmindex su
  @itemx sudo
  @cmindex sudo
 -Uses TRAMP's @command{su} or @command{sudo} method to run a command via
 -@command{su} or @command{sudo}.
 +Uses TRAMP's @command{su} or @command{sudo} method @pxref{Inline methods, , , tramp}
 +to run a command via @command{su} or @command{sudo}.  These commands
 +are in the eshell-tramp module, which is disabled by default.
  
  @end table
  
@@@ -648,7 -651,8 +652,8 @@@ variables in command invocations
  
  @item $#var
  Expands to the length of the value bound to @code{var}.  Raises an error
- if the value is not a sequence (@pxref{Sequences Arrays and Vectors, Sequences, , elisp}).
+ if the value is not a sequence
+ (@pxref{Sequences Arrays Vectors, Sequences, , elisp, The Emacs Lisp Reference Manual}).
  
  @item $(lisp)
  Expands to the result of evaluating the S-expression @code{(lisp)}.  On
@@@ -680,7 -684,8 +685,8 @@@ any regular expression.  So to split o
  
  @item $var[hello]
  Calls @code{assoc} on @code{var} with @code{"hello"}, expecting it to be
- an alist (@pxref{Association List Type, Association Lists, , elisp}).
+ an alist (@pxref{Association List Type, Association Lists, , elisp,
+ The Emacs Lisp Reference Manual}).
  
  @item $#var[hello]
  Returns the length of the cdr of the element of @code{var} who car is equal
@@@ -693,45 -698,30 +699,47 @@@ to @code{"hello"}
  Eshell's globbing syntax is very similar to that of Zsh.  Users coming
  from Bash can still use Bash-style globbing, as there are no
  incompatibilities.  Most globbing is pattern-based expansion, but there
- is also predicate-based expansion.  See @ref{Filename Generation, , , zsh}
+ is also predicate-based expansion.  See
+ @ref{Filename Generation, , , zsh, The Z Shell Manual}
  for full syntax.  To customize the syntax and behaviour of globbing in
- Eshell see the Customize@footnote{@xref{Customization Settings, Customize, , elisp}.}
+ Eshell see the Customize@footnote{@xref{Easy Customization, , , emacs,
+ The GNU Emacs Manual}.}
  groups ``eshell-glob'' and ``eshell-pred''.
  
  @node Input/Output
  @chapter Input/Output
  Since Eshell does not communicate with a terminal like most command
 -shells, IO is a little different.  If you try to run programs from
 -within Eshell that are not line-oriented, such as programs that use
 -ncurses, you will just get garbage output, since the Eshell buffer is
 -not a terminal emulator.  Eshell solves this problem by running
 -specified commands in Emacs's terminal emulator; to let Eshell know
 -which commands need to be run in a terminal, add them to the list
 -@var{eshell-visual-commands}.
 -
 +shells, IO is a little different.
 +
 +@section Visual Commands
 +If you try to run programs from within Eshell that are not
 +line-oriented, such as programs that use ncurses, you will just get
 +garbage output, since the Eshell buffer is not a terminal emulator.
 +Eshell solves this problem by running such programs in Emacs's
 +terminal emulator.
 +
 +Programs that need a terminal to display output properly are referred
 +to in this manual as ``visual commands,'' because they are not simply
 +line-oriented.  You must tell Eshell which commands are visual, by
 +adding them to @var{eshell-visual-commands}; for commands that are
 +visual for only certain @emph{sub}-commands -- e.g. @samp{git log} but
 +not @samp{git status} -- use @var{eshell-visual-subcommands}; and for
 +commands that are visual only when passed certain options, use
 +@var{eshell-visual-options}.
 +
 +@section Redirection
  Redirection is mostly the same in Eshell as it is in other command
 -shells.  The output redirection operators @code{>} and @code{>>} as well
 -as pipes are supported, but there is not yet any support for input
 -redirection.  Output can also be redirected to Elisp functions, using
 +shells.  The output redirection operators @code{>} and @code{>>} as
 +well as pipes are supported, but there is not yet any support for
 +input redirection.  Output can also be redirected to buffers, using
 +the @code{>>>} redirection operator, and Elisp functions, using
  virtual devices.
  
 +The buffer redirection operator, @code{>>>}, expects a buffer object
 +on the right-hand side, into which it inserts the output of the
 +left-hand side.  e.g., @samp{echo hello >>> #<buffer *scratch*>}
 +inserts the string @code{"hello"} into the @code{*scratch*} buffer.
 +
  @var{eshell-virtual-targets} is a list of mappings of virtual device
  names to functions.  Eshell comes with two virtual devices:
  @file{/dev/kill}, which sends the text to the kill ring, and
@@@ -743,9 -733,8 +751,9 @@@ by adding a list of the form @code{("/d
  @code{function} may be either a lambda or a function name.  If
  @code{mode} is nil, then the function is the output function; if it is
  non-nil, then the function is passed the redirection mode as a
 -symbol--@code{overwrite}, @code{append}, or @code{insert}--and the
 -function is expected to return the output function.
 +symbol--@code{overwrite} for @code{>}, @code{append} for @code{>>}, or
 +@code{insert} for @code{>>>}--and the function is expected to return
 +the output function.
  
  The output function is called once on each line of output until
  @code{nil} is passed, indicating end of output.
@@@ -757,7 -746,8 +765,8 @@@ can be disabled and enabled without hav
  and to provide a common parent Customize group for the
  modules.@footnote{ERC provides a similar module facility.}  An Eshell
  module is defined the same as any other library but one requirement: the
- module must define a Customize@footnote{@xref{Customization Settings, Customize, , elisp}.}
+ module must define a Customize@footnote{@xref{Customization, , ,
+ elisp, The Emacs Lisp Reference Manual}.}
  group using @code{eshell-defgroup} (in place of @code{defgroup}) with
  @code{eshell-module} as the parent group.@footnote{If the module has
  no user-customizable options, then there is no need to define it as an