]> code.delx.au - gnu-emacs/commitdiff
merge upstream
authorJoakim Verona <joakim@verona.se>
Tue, 10 Sep 2013 21:52:26 +0000 (23:52 +0200)
committerJoakim Verona <joakim@verona.se>
Tue, 10 Sep 2013 21:52:26 +0000 (23:52 +0200)
223 files changed:
ChangeLog
Makefile.in
admin/ChangeLog
admin/notes/bzr
admin/notes/elpa
admin/notes/hydra
admin/nt/README-ftp-server
admin/unidata/Makefile.in
autogen/Makefile.in
autogen/configure
configure.ac
doc/emacs/ChangeLog
doc/emacs/Makefile.in
doc/emacs/emacs.texi
doc/emacs/maintaining.texi
doc/emacs/xresources.texi
doc/lispintro/ChangeLog
doc/lispintro/Makefile.in
doc/lispintro/emacs-lisp-intro.texi
doc/lispref/ChangeLog
doc/lispref/Makefile.in
doc/lispref/macros.texi
doc/man/ChangeLog
doc/man/emacs.1
doc/misc/ChangeLog
doc/misc/Makefile.in
doc/misc/efaq.texi
doc/misc/emacs-gnutls.texi
doc/misc/tramp.texi
etc/ChangeLog
etc/NEWS
etc/PROBLEMS
etc/refcards/Makefile
etc/spook.lines
info/dir
leim/ChangeLog
leim/Makefile.in
leim/quail/latin-alt.el
leim/quail/latin-post.el
leim/quail/latin-pre.el
lib-src/ChangeLog
lib-src/Makefile.in
lisp/ChangeLog
lisp/ChangeLog.12
lisp/Makefile.in
lisp/abbrev.el
lisp/arc-mode.el
lisp/autorevert.el
lisp/avoid.el
lisp/calculator.el
lisp/calendar/cal-china.el
lisp/cedet/ChangeLog
lisp/cedet/semantic/fw.el
lisp/comint.el
lisp/cus-edit.el
lisp/descr-text.el
lisp/dframe.el
lisp/dired-x.el
lisp/dired.el
lisp/emacs-lisp/advice.el
lisp/emacs-lisp/byte-opt.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cconv.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/crm.el
lisp/emacs-lisp/eldoc.el
lisp/emacs-lisp/gv.el
lisp/emacs-lisp/lisp.el
lisp/emacs-lisp/package.el
lisp/epa.el
lisp/epg.el
lisp/files.el
lisp/finder.el
lisp/frame.el
lisp/generic-x.el
lisp/gnus/ChangeLog
lisp/gnus/mm-decode.el
lisp/icomplete.el
lisp/info.el
lisp/international/characters.el
lisp/international/mule-cmds.el
lisp/isearch.el
lisp/ldefs-boot.el
lisp/minibuffer.el
lisp/net/ange-ftp.el
lisp/net/browse-url.el
lisp/net/dbus.el
lisp/net/eudc.el
lisp/net/eudcb-ldap.el
lisp/net/eww.el
lisp/net/imap.el
lisp/net/tramp-adb.el
lisp/net/tramp-cache.el
lisp/net/tramp-cmds.el
lisp/net/tramp-compat.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-gw.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp.el
lisp/nxml/nxml-util.el
lisp/printing.el
lisp/progmodes/ada-xref.el
lisp/progmodes/antlr-mode.el
lisp/progmodes/bat-mode.el
lisp/progmodes/cc-awk.el
lisp/progmodes/cc-bytecomp.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el
lisp/progmodes/cperl-mode.el
lisp/progmodes/python.el
lisp/progmodes/ruby-mode.el
lisp/progmodes/sh-script.el
lisp/replace.el
lisp/saveplace.el
lisp/simple.el
lisp/speedbar.el
lisp/subr.el
lisp/textmodes/bibtex.el
lisp/textmodes/css-mode.el
lisp/vc/ediff-diff.el
lisp/vc/ediff-init.el
lisp/vc/ediff-merg.el
lisp/vc/ediff-mult.el
lisp/vc/ediff-util.el
lisp/vc/ediff-wind.el
lisp/vc/ediff.el
lisp/vc/emerge.el
lisp/vc/pcvs.el
lisp/vc/smerge-mode.el
lisp/vc/vc-annotate.el
lisp/vc/vc-arch.el
lisp/vc/vc-bzr.el
lisp/vc/vc-cvs.el
lisp/vc/vc-dispatcher.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-mtn.el
lisp/vc/vc-rcs.el
lisp/vc/vc-sccs.el
lisp/vc/vc-svn.el
lisp/vc/vc.el
lwlib/ChangeLog
lwlib/Makefile.in
make-dist
nextstep/ChangeLog
nextstep/Makefile.in
nt/ChangeLog
nt/INSTALL
nt/INSTALL.MSYS [deleted file]
nt/INSTALL.OLD [new file with mode: 0644]
nt/README
nt/README.W32
nt/configure.bat
oldXMenu/ChangeLog
oldXMenu/Makefile.in
src/ChangeLog
src/Makefile.in
src/alloc.c
src/buffer.c
src/buffer.h
src/callint.c
src/cmds.c
src/coding.h
src/composite.h
src/dispextern.h
src/dispnew.c
src/editfns.c
src/emacsgtkfixed.c
src/eval.c
src/fileio.c
src/font.c
src/font.h
src/fontset.c
src/fontset.h
src/frame.c
src/frame.h
src/gfilenotify.c
src/gtkutil.c
src/gtkutil.h
src/image.c
src/indent.c
src/intervals.c
src/keyboard.c
src/keyboard.h
src/lisp.h
src/minibuf.c
src/msdos.c
src/nsfns.m
src/nsfont.m
src/nsterm.m
src/print.c
src/process.c
src/regex.c
src/search.c
src/sysdep.c
src/sysselect.h
src/term.c
src/termhooks.h
src/w32.c
src/w32.h
src/w32console.c
src/w32fns.c
src/w32proc.c
src/w32term.c
src/w32term.h
src/w32xfns.c
src/window.c
src/window.h
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xgselect.c
src/xgselect.h
src/xmenu.c
src/xterm.c
src/xterm.h
test/ChangeLog
test/automated/Makefile.in
test/automated/eieio-test-methodinvoke.el
test/automated/eieio-tests.el
test/indent/ruby.rb

index e8504062dc373830e0db9431ef3b065dc7e7146a..4fc4e065e9275223ad79faa076458d68aac541ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
+2013-09-09  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
+       (LDFLAGS): Move nocombreloc option from here...
+       (LD_SWITCH_SYSTEM_TEMACS): ... to here.
+
+2013-09-08  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (--without-compress-install):
+       Rename from --without-compress-info.  (Bug#9789)
+       (GZIP_INFO): Remove.
+       (GZIP_PROG): Allow --without-compress-install to disable it.
+       * Makefile.in (GZIP_INFO): Remove all references.
+
+       * info/dir: Tweak emacs-gnutls entry.
+
+2013-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port --without-x --enable-gcc-warnings to Fedora 19.
+       * configure.ac (WERROR_CFLAGS): Omit redundant use of
+       -Wmissing-field-initializers, -Wswitch, -Wtype-limits,
+       -Wunused-parameter.  If there is no window system, also omit
+       -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn; this
+       is needed for Fedora 19.
+
+2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Make --without-x compatible with --enable-gcc-warnings.
+       * configure.ac: If both --without-x and --enable-gcc-warnings are
+       specified, use -Wno-unused-variable, -Wno-unused-but-set-variable
+       and -Wno-unused-but-set-parameter.
+
+2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Makefile improvements.
+       * Makefile.in (lib): Depend on am--refresh, to avoid a race.
+       (src): Remove duplicate dependency on FRC.
+       Invoke just one submake, not two.  Avoid the need for 'pwd'.
+
+2013-09-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Add ns_check_file.
+
+2013-08-31  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (--with-sound): Rename ossaudio to bsd-ossaudio,
+       and voxware to oss.
+
+2013-08-31  Ulrich Müller  <ulm@gentoo.org>
+
+       * configure.ac: Allow for --with-sound=voxware that will enable
+       sound but otherwise disable ALSA.  This will use the OSS device,
+       typically /dev/dsp, for sound output.  (Bug#15067)
+
+2013-08-31  Glenn Morris  <rgm@gnu.org>
+
+       * make-dist: Update for nt/INSTALL* changes.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
+2013-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32.
+
 2013-08-27  Paul Eggert  <eggert@cs.ucla.edu>
 
        Simplify EMACS_TIME-related code.
index d5cd6bd8d208433973d1689f049d1ce9f9ec007e..c6254fd6098969aa98318dda3b68ca3e62a690ce 100644 (file)
@@ -56,7 +56,7 @@
 # make docs
 #      Make Emacs documentation files from their sources; requires makeinfo.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # This may not work with certain non-GNU make's.  It only matters when
 # inheriting a CDPATH not starting with the current directory.
@@ -259,8 +259,6 @@ LN_S_FILEONLY = @LN_S_FILEONLY@
 
 # We use gzip to compress installed .el files.
 GZIP_PROG = @GZIP_PROG@
-# If non-nil, gzip the installed Info and man pages.
-GZIP_INFO = @GZIP_INFO@
 
 # ============================= Targets ==============================
 
@@ -352,9 +350,13 @@ epaths-force-w32: FRC
          -e "/^.*#/s|@SRC@|$${w32srcdir}|g") &&                \
        ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
 
+# If lib/Makefile would build files in '.', then build them before
+# building 'lib', to avoid races with parallel makes.
+lib: am--refresh
+
 lib-src src: $(NTDIR) lib
 
-src:   lib-src FRC
+src: lib-src
 
 # We need to build `emacs' in `src' to compile the *.elc files in `lisp'
 # and `leim'.
@@ -376,18 +378,15 @@ lib lib-src lisp leim nt: Makefile FRC
 # all preloaded elisp files, and only then dump the actual src/emacs, which
 # is not wrong, but is overkill in 99.99% of the cases.
 src: Makefile FRC
-       boot=bootstrap-emacs$(EXEEXT);                         \
-       if [ ! -x "src/$$boot" ]; then                                     \
-           cd $@; $(MAKE) all $(MFLAGS)                                   \
-             CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}'         \
-             LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \
-       fi;
-       if [ -r .bzr/checkout/dirstate ]; then                  \
-           vcswitness="`pwd`/.bzr/checkout/dirstate";  \
-       fi;                                                     \
-       cd $@; $(MAKE) all $(MFLAGS)                           \
-         CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
-         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
+       dirstate='.bzr/checkout/dirstate';                              \
+       vcswitness='$$(srcdir)/../'$$dirstate;                          \
+       [ -r "$(srcdir)/$$dirstate" ] || vcswitness='';                 \
+       cd $@ || exit;                                                  \
+       boot=bootstrap-emacs$(EXEEXT);                                  \
+       [ ! -x "$$boot" ] || boot='';                                   \
+       $(MAKE) all $(MFLAGS)                                           \
+         CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}'          \
+         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"   \
          VCSWITNESS="$$vcswitness"
 
 blessmail: Makefile src FRC
@@ -661,7 +660,7 @@ install-info: info
              for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
               (cd $${thisdir}; \
                ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
-               ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+               [ -n "${GZIP_PROG}" ] || continue ; \
                rm -f $(DESTDIR)${infodir}/$$f.gz; \
                ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
              done; \
@@ -683,7 +682,7 @@ install-man:
          dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
          (cd $${thisdir}; \
           ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
-         ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+         [ -n "${GZIP_PROG}" ] || continue ; \
          rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
          ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \
        done
@@ -753,12 +752,12 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
           for elt in ${INFO_NONMISC} $${info_misc}; do \
             (cd $${thisdir}; \
              $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
-            if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+            if [ -n "${GZIP_PROG}" ]; then \
                ext=.gz; else ext=; fi; \
             rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
           done; \
         fi)
-       (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+       (if [ -n "${GZIP_PROG}" ]; then \
            ext=.gz; else ext=; fi; \
         if cd ${mansrcdir}; then \
           for page in *.1; do \
index 245c809ec815ab9b9dd41f8dc123a08927c841fe..29118deba7f3b0df16d993fee8b4f2dfc2ae4c2b 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * unidata/Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-27  Glenn Morris  <rgm@gnu.org>
 
        * admin.el (manual-misc-manuals): Use INFO_COMMON rather than
index 8f7d0d94fa8411f7cef35e7a00e06443f0d1cf82..d3886abfd695bdc67ae585a14afca0c65fe9a0c2 100644 (file)
@@ -347,6 +347,9 @@ Runs on commit.  Projects can enable it themselves by using `bzr
 config' to set post_commit_to option for a branch.  See `bzr help email'
 (if you have the plugin installed) for other options.
 
+The From: address will be that of your Savannah account, rather than
+your `bzr whoami' information.
+
 Note: if you have the bzr-email plugin installed locally, then when
 you commit to the Emacs repository it will also try to send a commit
 email from your local machine.  If your machine is not configured to
index db14456fe32df7727a40a27b7eb690a1a70d3d95..469a0ca8bd195624086351c84d12ef0c3d209de8 100644 (file)
@@ -1,24 +1,21 @@
 NOTES ON THE EMACS PACKAGE ARCHIVE
 
-The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr
-branch named "elpa", hosted on Savannah.  To check it out:
+The GNU Emacs package archive, at elpa.gnu.org, is managed using a Git
+repository named "elpa", hosted on Savannah.  To check it out:
 
-  bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa
+  git clone git://bzr.sv.gnu.org/emacs/elpa
   cd elpa
-  echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf
-  bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
+  git remote set-url --push origin git+ssh://bzr.sv.gnu.org/srv/git/emacs/elpa
   [create task branch for edits, etc.]
 
-Changes to this branch propagate to elpa.gnu.org in a semi-manual way.
-There exists a copy of the elpa branch on that machine.  Someone with
-access logs in, pulls the latest changes from Savannah, and runs a
-"deployment" script.  This script (which is itself kept in the Bzr
-branch) generates the content visible at http://elpa.gnu.org/packages.
+Changes to this branch propagate to elpa.gnu.org via a "deployment" script run
+daily.  This script (which is kept in elpa/admin/update-archive.sh) generates
+the content visible at http://elpa.gnu.org/packages.
 
-The reason we set things up this way, instead of using the package
-upload commands in package-x.el, is to let Emacs hackers conveniently
-edit the contents of the "elpa" branch.  (In particular, multi-file
-packages are stored on the branch in source form, not as tarfiles.)
+A new package is released as soon as the "version number" of that package is
+changed.  So you can use `elpa' to work on a package without fear of releasing
+those changes prematurely.  And once the code is ready, just bump the
+version number to make a new release of the package.
 
 It is easy to use the elpa branch to deploy a "local" copy of the
 package archive.  For details, see the README file in the elpa branch.
index 068bc70ee9c709a743032de1c248a0981e495d0e..71e35d092c8c98a5e89825142752b07ccaf109e1 100644 (file)
@@ -5,15 +5,14 @@ See the end of the file for license conditions.
 
 NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA
 
-A continuous build for Emacs trunk can be found at
+A continuous build for Emacs can be found at
 http://hydra.nixos.org/jobset/gnu/emacs-trunk
+http://hydra.nixos.org/jobset/gnu/emacs-24
 
-* It builds (and runs ERT tests) on these platforms:
-i686-cygwin
-i686-freebsd
-i686-linux
-x86_64-darwin
-x86_64-linux
+* It builds Emacs on various platforms.
+Sometimes jobs fail due to hydra problems rather than Emacs problems.
+Eg it seems like the cygwin build will never work again.
+http://lists.gnu.org/archive/html/hydra-users/2013-08/msg00000.html
 
 * Mail notifications
 In addition to the web interface, Hydra can send notifications by
@@ -27,15 +26,15 @@ http://lists.gnu.org/mailman/listinfo/emacs-buildstatus
 * The Emacs jobset consists of the following jobs:
 
 ** The `tarball' job
-which gets the source tree as input, and is just a `make dist' after
-some autoconf/-make or bootstrap script.
+which gets a checkout from bzr, and does a bootstrap followed
+by running make-dist to create a tarball.  If this job fails, all the
+others will too (because they use the tarball as input).
 
 ** The `build' job
-which gets the result of the tarball job as input, together with
-system identifier, this job basically does a normal make and make install.
+which starts from the tarball and does a normal build
 
 ** The 'coverage' job
-is now running `make check'.
+does a gcov build and then runs `make check'.  Fails if any test fails.
 
 * Nix expressions
 The recipe for GNU Emacs are available via Git:
index 3a21733747d444d839f70d436bd58743b4bc3734..304251f3ce40b0e4217bfc16e3e41caecf2a4264 100644 (file)
@@ -16,12 +16,6 @@ See the end of the file for license conditions.
   accustomed to compiling programs themselves.  Corresponding source
   can be found in the parent directory in emacs-24.3.tar.gz.
 
-  If you have access to the World Wide Web, I would recommend pointing
-  your favorite web browser to the following document (if you haven't
-  already):
-
-       http://www.gnu.org/software/emacs/windows/ntemacs.html
-
 * IMPORTANT LEGAL REMINDER
 
   If you want to redistribute any of the precompiled distributions of
@@ -230,16 +224,10 @@ See the end of the file for license conditions.
 
 * Further information
 
-  If you have access to the World Wide Web, I would recommend pointing
-  your favorite web browser to following the document (if you haven't
-  already):
-
-       http://www.gnu.org/software/emacs/windows/ntemacs.html
+  The Emacs on MS Windows FAQ is distributed with Emacs (info
+  manual "efaq-w32"), and at
 
-  This document serves as an FAQ and a source for further information
-  about the Windows port and related software packages. Note that as
-  most of the information in that FAQ is for earlier versions, so some
-  information may not be relevant to Emacs-24.3.
+       http://www.gnu.org/software/emacs/manual/efaq-w32.html
 
   In addition to the FAQ, there is a mailing list for discussing issues
   related to the Windows port of Emacs.  For information about the
index c759079a49a15d7737ccaf6feb6aa8957249a32b..df225cc8cbfb63d85cba5990ee3b2e7470165438 100644 (file)
@@ -21,7 +21,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 srcdir = @srcdir@
 abs_builddir = @abs_builddir@
index 4ea9aeb356156276aa61cbceb020bd07632d813e..19904e8631eba550b856055518fe0e5659b19834 100644 (file)
@@ -423,11 +423,7 @@ DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DEPFLAGS = @DEPFLAGS@
 DESLIB = @DESLIB@
-DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@
-DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
-DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
-DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
-DOCMISC_PS_W32 = @DOCMISC_PS_W32@
+DOCMISC_W32 = @DOCMISC_W32@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
@@ -681,7 +677,6 @@ GSETTINGS_LIBS = @GSETTINGS_LIBS@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 GTK_OBJ = @GTK_OBJ@
-GZIP_INFO = @GZIP_INFO@
 GZIP_PROG = @GZIP_PROG@
 HAVE_ALPHASORT = @HAVE_ALPHASORT@
 HAVE_ATOLL = @HAVE_ATOLL@
@@ -1224,6 +1219,7 @@ ns_appbindir = @ns_appbindir@
 ns_appdir = @ns_appdir@
 ns_appresdir = @ns_appresdir@
 ns_appsrc = @ns_appsrc@
+ns_check_file = @ns_check_file@
 ns_self_contained = @ns_self_contained@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
index 28c57222a1dc4655ad68dcfba06d67de1f3e5bdf..a0f302b4ac08789a4d921bd5f15f6d07629380d1 100755 (executable)
@@ -604,6 +604,7 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 SUBDIR_MAKEFILES_IN
+ns_check_file
 WINDOW_SYSTEM_OBJ
 EMACS_HEAPSIZE
 TEMACS_POST_LINK
@@ -1397,11 +1398,7 @@ UNEXEC_OBJ
 C_SWITCH_MACHINE
 LD_SWITCH_SYSTEM
 CANNOT_DUMP
-DOCMISC_PS_W32
-DOCMISC_PDF_W32
-DOCMISC_INFO_W32
-DOCMISC_HTML_W32
-DOCMISC_DVI_W32
+DOCMISC_W32
 INFO_OPTS
 INFO_EXT
 HAVE_MAKEINFO
@@ -1445,7 +1442,6 @@ build_vendor
 build_cpu
 build
 PROFILING_CFLAGS
-GZIP_INFO
 cache_file
 am__untar
 am__tar
@@ -1548,7 +1544,7 @@ with_gnutls
 with_zlib
 with_file_notification
 with_makeinfo
-with_compress_info
+with_compress_install
 with_pkg_config_prog
 with_gameuser
 with_gnustep_conf
@@ -2246,8 +2242,8 @@ Optional Packages:
   --with-mail-unlink      unlink, rather than empty, mail spool after reading
   --with-mailhost=HOSTNAME
                           string giving default POP mail host
-  --with-sound=VALUE      compile with sound support (VALUE one of: yes,
-                          ossaudio, alsa, no; default yes). Only for
+  --with-sound=VALUE      compile with sound support (VALUE one of: yes, alsa,
+                          oss, bsd-ossaudio, no; default yes). Only for
                           GNU/Linux, FreeBSD, NetBSD, MinGW.
   --with-x-toolkit=KIT    use an X toolkit (KIT one of: yes or gtk, gtk2,
                           gtk3, lucid or athena, motif, no)
@@ -2281,7 +2277,9 @@ Optional Packages:
                           use a file notification library (LIB one of: yes,
                           gfile, inotify, w32, no)
   --without-makeinfo      don't require makeinfo for building manuals
-  --without-compress-info don't compress the installed Info pages
+  --without-compress-install
+                          don't compress some files (.el, .info, etc.) when
+                          installing. Equivalent to: make GZIP_PROG= install
   --with-pkg-config-prog=FILENAME
                           file name of pkg-config for finding GTK and librsvg
   --with-gameuser=USER    user for shared game score files
@@ -4155,9 +4153,9 @@ fi
 # Check whether --with-sound was given.
 if test "${with_sound+set}" = set; then :
   withval=$with_sound;  case "${withval}" in
-      yes|no|ossaudio|alsa) val=$withval ;;
+      yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
       *) as_fn_error "\`--with-sound=$withval' is invalid;
-this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5
+this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
       ;;
     esac
     with_sound=$val
@@ -4432,17 +4430,11 @@ fi
 ## This is an option because I do not know if all info/man support
 ## compressed files, nor how to test if they do so.
 
-# Check whether --with-compress-info was given.
-if test "${with_compress_info+set}" = set; then :
-  withval=$with_compress_info;
+# Check whether --with-compress-install was given.
+if test "${with_compress_install+set}" = set; then :
+  withval=$with_compress_install;
 else
-     with_compress_info=$with_features
-fi
-
-if test $with_compress_info = yes; then
-   GZIP_INFO=yes
-else
-   GZIP_INFO=
+     with_compress_install=$with_features
 fi
 
 
@@ -7659,6 +7651,13 @@ fi
   # The following line should be removable at some point.
   nw="$nw -Wsuggest-attribute=pure"
 
+  # This part is merely for shortening the command line,
+  # since -Wno-FOO needs to be added below regardless.
+  nw="$nw -Wmissing-field-initializers"
+  nw="$nw -Wswitch"
+  nw="$nw -Wtype-limits"
+  nw="$nw -Wunused-parameter"
+
   # clang is unduly picky about some things.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
 $as_echo_n "checking whether the compiler is clang... " >&6; }
@@ -8614,6 +8613,9 @@ fi
 
 
 
+test $with_compress_install != yes && test -n "$GZIP_PROG" && \
+   GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
+
 if test $opsys = gnu-linux; then
   # Extract the first word of "paxctl", so it can be a program name with args.
 set dummy paxctl; ac_word=$2
@@ -8761,25 +8763,13 @@ INFO_OPTS=--no-split
 
 
 if test $opsys = mingw32; then
-   DOCMISC_DVI_W32=efaq-w32.dvi
-   DOCMISC_HTML_W32=efaq-w32.html
-   DOCMISC_INFO_W32=efaq-w32.info
-   DOCMISC_PDF_W32=efaq-w32.pdf
-   DOCMISC_PS_W32=efaq-w32.ps
+   DOCMISC_W32=efaq-w32
 else
-   DOCMISC_DVI_W32=
-   DOCMISC_HTML_W32=
-   DOCMISC_INFO_W32=
-   DOCMISC_PDF_W32=
-   DOCMISC_PS_W32=
+   DOCMISC_W32=
 fi
 
 
 
-
-
-
-
 if test x$GCC = xyes; then
   test "x$GCC_LINK_TEST_OPTIONS" != x && \
     ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
@@ -8789,13 +8779,15 @@ else
 fi
 
 
-late_LDFLAGS=$LDFLAGS
+late_LDFLAGS="$LDFLAGS"
 if test x$GCC = xyes; then
-  LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
 else
-  LDFLAGS="$LDFLAGS -znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-znocombreloc"
 fi
 
+LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
 $as_echo_n "checking for -znocombreloc... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8813,13 +8805,14 @@ if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  LDFLAGS=$late_LDFLAGS
+  LDFLAGS_NOCOMBRELOC=
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
+LDFLAGS="$late_LDFLAGS"
 
 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
 case "$opsys" in
@@ -9097,7 +9090,10 @@ fi
 
 done
 
-  if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then
+  test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
+    as_fn_error "OSS sound support requested but not found." "$LINENO" 5
+
+  if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
     # Emulation library used on NetBSD.
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
@@ -9141,8 +9137,8 @@ else
   LIBSOUND=
 fi
 
-    test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \
-      as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5
+    test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
+      as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
           fi
 
 
 ## $window_system is now set to the window system we will
 ## ultimately use.
 
+if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
+   # Too many warnings for now.
+   nw=
+   nw="$nw -Wsuggest-attribute=const"
+   nw="$nw -Wsuggest-attribute=noreturn"
+
+  gl_warn_set=
+  set x $WARN_CFLAGS; shift
+  for gl_warn_item
+  do
+    case " $nw " in
+      *" $gl_warn_item "*)
+        ;;
+      *)
+        gl_warn_set="$gl_warn_set $gl_warn_item"
+        ;;
+    esac
+  done
+  WARN_CFLAGS=$gl_warn_set
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  gl_save_compiler_FLAGS="$CFLAGS"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_warn_c__Wno_unused_variable=yes
+else
+  gl_cv_warn_c__Wno_unused_variable=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
+  as_fn_append WARN_CFLAGS " -Wno-unused-variable"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  gl_save_compiler_FLAGS="$CFLAGS"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_warn_c__Wno_unused_but_set_variable=yes
+else
+  gl_cv_warn_c__Wno_unused_but_set_variable=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
+  as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  gl_save_compiler_FLAGS="$CFLAGS"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_warn_c__Wno_unused_but_set_parameter=yes
+else
+  gl_cv_warn_c__Wno_unused_but_set_parameter=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
+  as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
+fi
+
+
+fi
+
 term_header=
 HAVE_X_WINDOWS=no
 HAVE_X11=no
@@ -28925,6 +29052,8 @@ if test x$ac_enable_profiling != x ; then
   esac
 fi
 
+LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
+
 
 
 ## MinGW-specific post-link processing of temacs.
@@ -29066,10 +29195,13 @@ if test "$HAVE_NS" = "yes"; then
   if test "$NS_IMPL_GNUSTEP" = yes; then
     ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in"
 
+    ns_check_file=Resources/Info-gnustep.plist
   else
     ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in"
 
+    ns_check_file=Contents/Info.plist
   fi
+
 fi
 
 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"
index 3c0ac24587f046becfdd5dddff1dec939858ca12..55e8a69b542040b5cd27ca47e5ca128b3d7f948b 100644 (file)
@@ -167,12 +167,12 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME],
     AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.]))
 
 AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE],
-  [compile with sound support (VALUE one of: yes, ossaudio, alsa, no;
+  [compile with sound support (VALUE one of: yes, alsa, oss, bsd-ossaudio, no;
 default yes).  Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])],
   [ case "${withval}" in
-      yes|no|ossaudio|alsa) val=$withval ;;
+      yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
       *) AC_MSG_ERROR([`--with-sound=$withval' is invalid;
-this option's value should be `yes', `no', `ossaudio', or `alsa'.])
+this option's value should be `yes', `no', `alsa', `oss', or `bsd-ossaudio'.])
       ;;
     esac
     with_sound=$val
@@ -268,13 +268,9 @@ AC_SUBST(cache_file)
 
 ## This is an option because I do not know if all info/man support
 ## compressed files, nor how to test if they do so.
-OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
-if test $with_compress_info = yes; then
-   GZIP_INFO=yes
-else
-   GZIP_INFO=
-fi
-AC_SUBST(GZIP_INFO)
+OPTION_DEFAULT_ON([compress-install],
+  [don't compress some files (.el, .info, etc.) when installing.  Equivalent to:
+make GZIP_PROG= install])
 
 AC_ARG_WITH([pkg-config-prog],dnl
 [AS_HELP_STRING([--with-pkg-config-prog=FILENAME],
@@ -828,6 +824,13 @@ else
   # The following line should be removable at some point.
   nw="$nw -Wsuggest-attribute=pure"
 
+  # This part is merely for shortening the command line,
+  # since -Wno-FOO needs to be added below regardless.
+  nw="$nw -Wmissing-field-initializers"
+  nw="$nw -Wswitch"
+  nw="$nw -Wtype-limits"
+  nw="$nw -Wunused-parameter"
+
   # clang is unduly picky about some things.
   AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
     [AC_COMPILE_IFELSE(
@@ -945,6 +948,9 @@ AC_PATH_PROG(INSTALL_INFO, install-info, :,
 dnl Don't use GZIP, which is used by gzip for additional parameters.
 AC_PATH_PROG(GZIP_PROG, gzip)
 
+test $with_compress_install != yes && test -n "$GZIP_PROG" && \
+   GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
+
 if test $opsys = gnu-linux; then
   AC_PATH_PROG(PAXCTL, paxctl,,
     [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
@@ -1000,23 +1006,11 @@ AC_SUBST(INFO_EXT)
 AC_SUBST(INFO_OPTS)
 
 if test $opsys = mingw32; then
-   DOCMISC_DVI_W32=efaq-w32.dvi
-   DOCMISC_HTML_W32=efaq-w32.html
-   DOCMISC_INFO_W32=efaq-w32
-   DOCMISC_PDF_W32=efaq-w32.pdf
-   DOCMISC_PS_W32=efaq-w32.ps
+   DOCMISC_W32=efaq-w32
 else
-   DOCMISC_DVI_W32=
-   DOCMISC_HTML_W32=
-   DOCMISC_INFO_W32=
-   DOCMISC_PDF_W32=
-   DOCMISC_PS_W32=
-fi
-AC_SUBST(DOCMISC_DVI_W32)
-AC_SUBST(DOCMISC_HTML_W32)
-AC_SUBST(DOCMISC_INFO_W32)
-AC_SUBST(DOCMISC_PDF_W32)
-AC_SUBST(DOCMISC_PS_W32)
+   DOCMISC_W32=
+fi
+AC_SUBST(DOCMISC_W32)
 
 dnl Add our options to ac_link now, after it is set up.
 
@@ -1034,19 +1028,30 @@ dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.)
 dnl Treat GCC specially since it just gives a non-fatal `unrecognized option'
 dnl if not built to support GNU ld.
 
-late_LDFLAGS=$LDFLAGS
+dnl For a long time, -znocombreloc was added to LDFLAGS rather than
+dnl LD_SWITCH_SYSTEM_TEMACS.  That is:
+dnl * inappropriate, as LDFLAGS is a user option but this is essential.
+dnl   Eg "make LDFLAGS=... all" could run into problems,
+dnl   http://bugs.debian.org/684788
+dnl * unnecessary, since temacs is the only thing that actually needs it.
+dnl   Indeed this is where it was originally, prior to:
+dnl   http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
+late_LDFLAGS="$LDFLAGS"
 if test x$GCC = xyes; then
-  LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
 else
-  LDFLAGS="$LDFLAGS -znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-znocombreloc"
 fi
 
+LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+
 AC_MSG_CHECKING([for -znocombreloc])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
   [AC_MSG_RESULT(yes)],
-  LDFLAGS=$late_LDFLAGS
+  LDFLAGS_NOCOMBRELOC=
   [AC_MSG_RESULT(no)])
 
+LDFLAGS="$late_LDFLAGS"
 
 dnl The function dump-emacs will not be defined and temacs will do
 dnl (load "loadup") automatically unless told otherwise.
@@ -1321,12 +1326,15 @@ if test "${with_sound}" != "no"; then
     #include <windows.h>
     #endif
     ])
-  if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then
+  test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
+    AC_MSG_ERROR([OSS sound support requested but not found.])
+
+  if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
     # Emulation library used on NetBSD.
     AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
-    test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \
-      AC_MSG_ERROR([ossaudio sound support requested but not found.])
-    dnl FIXME?  If we did find ossaudio, should we set with_sound=ossaudio?
+    test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
+      AC_MSG_ERROR([bsd-ossaudio sound support requested but not found.])
+    dnl FIXME?  If we did find ossaudio, should we set with_sound=bsd-ossaudio?
     dnl Traditionally, we go on to check for alsa too.  Does that make sense?
   fi
   AC_SUBST(LIBSOUND)
@@ -1786,6 +1794,18 @@ fi
 ## $window_system is now set to the window system we will
 ## ultimately use.
 
+if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
+   # Too many warnings for now.
+   nw=
+   nw="$nw -Wsuggest-attribute=const"
+   nw="$nw -Wsuggest-attribute=noreturn"
+   gl_MANYWARN_COMPLEMENT([WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
+
+   gl_WARN_ADD([-Wno-unused-variable])
+   gl_WARN_ADD([-Wno-unused-but-set-variable])
+   gl_WARN_ADD([-Wno-unused-but-set-parameter])
+fi
+
 term_header=
 HAVE_X_WINDOWS=no
 HAVE_X11=no
@@ -4770,6 +4790,8 @@ if test x$ac_enable_profiling != x ; then
   esac
 fi
 
+LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
+
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
 ## MinGW-specific post-link processing of temacs.
@@ -4949,10 +4971,13 @@ if test "$HAVE_NS" = "yes"; then
   if test "$NS_IMPL_GNUSTEP" = yes; then
     AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \
       nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in])
+    ns_check_file=Resources/Info-gnustep.plist
   else
     AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \
       nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in])
+    ns_check_file=Contents/Info.plist
   fi
+  AC_SUBST(ns_check_file)
 fi
 
 dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
index f94db60f25fa6a068abf8d56cb6794c7dd3ac6be..7ff13a707187c39d00de28a44c54dff655738d71 100644 (file)
@@ -1,3 +1,18 @@
+2013-09-04  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument.
+
+2013-08-31  Ulrich Müller  <ulm@gentoo.org>
+
+       * xresources.texi (Motif Resources):
+       Rename from LessTif Resources.  Update xrefs.  (Bug#15145)
+       * emacs.texi: Update menu.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-17  Xue Fuqiao  <xfq.free@gmail.com>
 
        * text.texi (Enriched Justification): Minor fixes.
index 7aeead4e2f6062aadbf8e790eef3dee9bc66d769..bf9f8152ad467d2bd3d3965bdd8f9fe1af303666 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # NB If you add any more configure variables,
 # update the sed rules in the dist target below.
index 8a518b82abbc7f7351bb4a187b99a1781964395f..985466810f2d81957abf3a4de308dc79f73cdd99 100644 (file)
@@ -1189,7 +1189,7 @@ X Options and Resources
 * Resources::           Using X resources with Emacs (in general).
 * Table of Resources::  Table of specific X resources that affect Emacs.
 * Lucid Resources::     X resources for Lucid menus.
-* LessTif Resources::   X resources for LessTif and Motif menus.
+* Motif Resources::     X resources for Motif and LessTif menus.
 * GTK resources::       Resources for GTK widgets.
 
 GTK resources
index 553375442d57c85db1c637ae37920dbc6b2227c4..4a61db5509b5e79dacf3cedb8b0496f9784dace9 100644 (file)
@@ -1043,12 +1043,14 @@ Ignore a file under current version control system.  (@code{vc-ignore}).
 
 @kindex C-x v G
 @findex vc-ignore
-  Many source trees contain some files that do not need to be versioned,
-such as editor backups, object or bytecode files, and built programs.
-You can simply not add them, but then they’ll always crop up as
-unknown files.  You can also tell the version control system to ignore
-these files by adding them to the ignore file at the top of the tree.
-@kbd{C-x v G} (@code{vc-ignore}) can help you do this.
+  Many source trees contain some files that do not need to be
+versioned, such as editor backups, object or bytecode files, and built
+programs.  You can simply not add them, but then they’ll always crop
+up as unknown files.  You can also tell the version control system to
+ignore these files by adding them to the ignore file at the top of the
+tree.  @kbd{C-x v G} (@code{vc-ignore}) can help you do this.  When
+called with a prefix argument, you can remove a file from the ignored
+file list.
 
 @node VC Directory Mode
 @subsection VC Directory Mode
index 3723c8e5e1db24df088d7a0b8f59fe590f19b11f..b2ebf634ba0ee616738223cc3072a8b006c7c917 100644 (file)
@@ -27,7 +27,7 @@ system registry (@pxref{MS-Windows Registry}).
 * Resources::           Using X resources with Emacs (in general).
 * Table of Resources::  Table of specific X resources that affect Emacs.
 * Lucid Resources::     X resources for Lucid menus.
-* LessTif Resources::   X resources for LessTif and Motif menus.
+* Motif Resources::     X resources for Motif and LessTif menus.
 * GTK resources::       Resources for GTK widgets.
 @end menu
 
@@ -260,7 +260,7 @@ compiled with GTK+ support.
 @ifnottex
 @item @code{selectionFont} (class @code{SelectionFont})
 Font name for pop-up menu items, in non-toolkit versions of Emacs.  (For
-toolkit versions, see @ref{Lucid Resources}, also see @ref{LessTif
+toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif
 Resources}.)
 
 @item @code{selectionTimeout} (class @code{SelectionTimeout})
@@ -370,15 +370,15 @@ elements.  Default is 1.
 Margin of the menu bar, in characters.  Default is 1.
 @end table
 
-@node LessTif Resources
-@appendixsec LessTif Menu X Resources
-@cindex Menu X Resources (LessTif widgets)
-@cindex LessTif Widget X Resources
+@node Motif Resources
+@appendixsec Motif Menu X Resources
+@cindex Menu X Resources (Motif widgets)
+@cindex Motif Widget X Resources
 
-  If Emacs is compiled with the X toolkit support using LessTif or
-Motif widgets, you can use X resources to customize the appearance of
-the menu bar, pop-up menus, and dialog boxes.  However, the resources
-are organized differently from Lucid widgets.
+  If Emacs is compiled with the X toolkit support using Motif or
+LessTif widgets, you can use X resources to customize the appearance
+of the menu bar, pop-up menus, and dialog boxes.  However, the
+resources are organized differently from Lucid widgets.
 
   The resource names for the menu bar are in the @samp{pane.menubar}
 class, and they must be specified in this form:
index db02a257a3a8f357ff51f96225458663013b6370..ec082eecb528fe093493925b1c14c98533b521cb 100644 (file)
@@ -1,3 +1,18 @@
+2013-09-01  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp-intro.texi (beginning-of-buffer complete):
+       Put back a version of the removed paragraph about raw prefix arg.
+
+2013-09-01  Dani Moncayo  <dmoncayo@gmail.com>
+
+       * emacs-lisp-intro.texi (beginning-of-buffer complete):
+       Update function details.  (Bug#15085)
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-12  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp-intro.texi (Complete copy-region-as-kill): Fix typo.
index ad1b978f2556df231bf769bab898f2d65bf5cfc0..363e12215b3b06c71831eb02a274f98649ab0082 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # NB If you add any more configure variables,
 # update the sed rules in the dist target below.
index 18ea8e87e191b23886000725d7622b06e9359fd9..84c9d9054878ee28cf451fc3ce2e1be725de4315 100644 (file)
@@ -6323,7 +6323,7 @@ and avoids clobbering the mark."
                         (/ (+ 10 (* size (prefix-numeric-value arg)))
                            10)))
                  (point-min))))
-  (if arg (forward-line 1)))
+  (if (and arg (not (consp arg))) (forward-line 1)))
 @end group
 @end smallexample
 
@@ -6390,7 +6390,7 @@ to move point to the beginning of the next line if the command is
 invoked with an argument:
 
 @smallexample
-(if arg (forward-line 1)))
+(if (and arg (not (consp arg))) (forward-line 1))
 @end smallexample
 
 @noindent
@@ -6399,14 +6399,10 @@ appropriate tenths position in the buffer.  This is a flourish that
 means that the cursor is always located @emph{at least} the requested
 tenths of the way through the buffer, which is a nicety that is,
 perhaps, not necessary, but which, if it did not occur, would be sure
-to draw complaints.
-
-On the other hand, it also means that if you specify the command with
-a @kbd{C-u}, but without a number, that is to say, if the `raw prefix
-argument' is simply a cons cell, then the command puts you at the
-beginning of the second line @dots{}  I don't know whether this is
-intended or whether no one has dealt with the code to avoid this
-happening.
+to draw complaints.  (The @code{(not (consp arg))} portion is so that
+if you specify the command with a @kbd{C-u}, but without a number,
+that is to say, if the `raw prefix argument' is simply a cons cell,
+the command does not put you at the beginning of the second line.)
 
 @node Second Buffer Related Review
 @section Review
index d27f58c0efa45d2b64a697a0eaacf14109bb1f61..145d595b1d21752492de4d96392c6bf43a6d5c3c 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * macros.texi (Defining Macros): Prefer "function" to "lambda
+       expression" (bug#15296).
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * variables.texi (File Local Variables): Don't recommend quoting!  Ever!
index c7aa5ac1a2864e803cd7cc820eec0b09ddb2fba2..164646ac4332f96632e838c3b67e88c97a8c43b2 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # NB If you add any more configure variables,
 # update the sed rules in the dist target below.
index 5520bbbd1dfa7bffd5ea14d64fab339adb4f81e5..a2526f383aa1c9c7c3eeddf45689a4882d4601f2 100644 (file)
@@ -191,8 +191,8 @@ During Compile}).
 @section Defining Macros
 
   A Lisp macro object is a list whose @sc{car} is @code{macro}, and
-whose @sc{cdr} is a lambda expression.  Expansion of the macro works
-by applying the lambda expression (with @code{apply}) to the list of
+whose @sc{cdr} is a function.  Expansion of the macro works
+by applying the function (with @code{apply}) to the list of
 @emph{unevaluated} arguments from the macro call.
 
   It is possible to use an anonymous Lisp macro just like an anonymous
index 8b550dc4417209238e26617a923f022be22137fa..0235b5f7b9b1a37a9e6cbf0e3f07baea257c8255 100644 (file)
@@ -1,3 +1,7 @@
+2013-08-31  Ulrich Müller  <ulm@gentoo.org>
+
+       * emacs.1: Update manual links.
+
 2013-04-20  Petr Hracek  <phracek@redhat.com>  (tiny change)
 
        * emacs.1: Add some more command-line options.  (Bug#14165)
index 9149be2c52370a963930b5bb6f7b63dbbeed26bf..a306edc3ca9d4eb47f1d8633e32a54453c27a25c 100644 (file)
@@ -445,7 +445,7 @@ Gives frames menu bars if
 .IR on ;
 don't have menu bars if
 .IR off .
-See the Emacs manual, sections "Lucid Resources" and "LessTif
+See the Emacs manual, sections "Lucid Resources" and "Motif
 Resources", for how to control the appearance of the menu bar
 if you have one.
 .TP
@@ -492,7 +492,7 @@ The scroll bar width in pixels, equivalent to the frame parameter
 Font name for pop-up menu items, in non-toolkit versions of
 .IR Emacs .
 (For toolkit versions, see the Emacs manual, sections
-"Lucid Resources" and "LessTif Resources".)
+"Lucid Resources" and "Motif Resources".)
 .TP
 .BR selectionTimeout " (class " SelectionTimeout )
 Number of milliseconds to wait for a selection reply.
index ca620a15b4f5ebe214d39d8d54aa21fdd7761566..e3ad5688f22d4fb2030fa69218b97aade78dac32 100644 (file)
@@ -1,5 +1,27 @@
+2013-09-08  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-gnutls.texi: Tweak direntry.
+
+2013-09-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * tramp.texi (Alternative Syntax): Remove chapter.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
+2013-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Try to reduce redundancy in doc/misc/Makefile.in.
+       * Makefile.in (DOCMISC_W32): New var to replace DOCMISC_*_W32.
+       (TARGETS): New intermediate variable.
+       (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Use it.
+
 2013-08-27  Glenn Morris  <rgm@gnu.org>
 
+       * efaq.texi (Emacs for MS-Windows): Update location of MS FAQ.
+
        * efaq.texi: Rename from faq.texi, to match its output files.
        * Makefile.in: Update for faq.texi name change.
 
index 0ae1edf70690f7de5d735e5957e116a26aaef473..30fc495317224f5c77f99728623deeb63d87dede 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # Where to find the source code.  $(srcdir) will be the man-aux
 # subdirectory of the source tree.  This is
@@ -60,11 +60,7 @@ MAKEINFO = @MAKEINFO@
 MAKEINFO_OPTS = --force -I$(emacsdir)
 
 ## On MS Windows, efaq-w32; otherwise blank.
-DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@
-DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
-DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
-DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
-DOCMISC_PS_W32 = @DOCMISC_PS_W32@
+DOCMISC_W32 = @DOCMISC_W32@
 
 ## Info files to build and install on all platforms.
 INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
@@ -84,237 +80,15 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_INFO_W32)
 ## because the info files are pre-built in release tarfiles.
 INFO_TARGETS = $(INFO_COMMON) efaq-w32
 
-DVI_TARGETS = $(DOCMISC_DVI_W32) \
-       ada-mode.dvi \
-       auth.dvi \
-       autotype.dvi \
-       bovine.dvi \
-       calc.dvi \
-       cc-mode.dvi \
-       cl.dvi \
-       dbus.dvi \
-       dired-x.dvi \
-       ebrowse.dvi \
-       ede.dvi \
-       ediff.dvi \
-       edt.dvi \
-       efaq.dvi \
-       eieio.dvi \
-       emacs-mime.dvi \
-       epa.dvi \
-       erc.dvi \
-       ert.dvi \
-       eshell.dvi \
-       eudc.dvi \
-       flymake.dvi \
-       forms.dvi \
-       gnus.dvi \
-       emacs-gnutls.dvi \
-       htmlfontify.dvi \
-       idlwave.dvi \
-       ido.dvi \
-       info.dvi \
-       mairix-el.dvi \
-       message.dvi \
-       mh-e.dvi \
-       newsticker.dvi \
-       nxml-mode.dvi \
-       org.dvi \
-       pcl-cvs.dvi \
-       pgg.dvi \
-       rcirc.dvi \
-       reftex.dvi \
-       remember.dvi \
-       sasl.dvi \
-       sc.dvi \
-       semantic.dvi \
-       ses.dvi \
-       sieve.dvi \
-       smtpmail.dvi \
-       speedbar.dvi \
-       srecode.dvi \
-       todo-mode.dvi \
-       tramp.dvi \
-       url.dvi \
-       vip.dvi \
-       viper.dvi \
-       widget.dvi \
-       wisent.dvi \
-       woman.dvi
-
-HTML_TARGETS = $(DOCMISC_HTML_W32) \
-       ada-mode.html \
-       auth.html \
-       autotype.html \
-       bovine.html \
-       calc.html \
-       cc-mode.html \
-       cl.html \
-       dbus.html \
-       dired-x.html \
-       ebrowse.html \
-       ede.html \
-       ediff.html \
-       edt.html \
-       efaq.html \
-       eieio.html \
-       emacs-mime.html \
-       epa.html \
-       erc.html \
-       ert.html \
-       eshell.html \
-       eudc.html \
-       flymake.html \
-       forms.html \
-       gnus.html \
-       emacs-gnutls.html \
-       htmlfontify.html \
-       idlwave.html \
-       ido.html \
-       info.html \
-       mairix-el.html \
-       message.html \
-       mh-e.html \
-       newsticker.html \
-       nxml-mode.html \
-       org.html \
-       pcl-cvs.html \
-       pgg.html \
-       rcirc.html \
-       reftex.html \
-       remember.html \
-       sasl.html \
-       sc.html \
-       semantic.html \
-       ses.html \
-       sieve.html \
-       smtpmail.html \
-       speedbar.html \
-       srecode.html \
-       todo-mode.html \
-       tramp.html \
-       url.html \
-       vip.html \
-       viper.html \
-       widget.html \
-       wisent.html \
-       woman.html
-
-PDF_TARGETS = $(DOCMISC_PDF_W32) \
-       ada-mode.pdf \
-       auth.pdf \
-       autotype.pdf \
-       bovine.pdf \
-       calc.pdf \
-       cc-mode.pdf \
-       cl.pdf \
-       dbus.pdf \
-       dired-x.pdf \
-       ebrowse.pdf \
-       ede.pdf \
-       ediff.pdf \
-       edt.pdf \
-       efaq.pdf \
-       eieio.pdf \
-       emacs-mime.pdf \
-       epa.pdf \
-       erc.pdf \
-       ert.pdf \
-       eshell.pdf \
-       eudc.pdf \
-       flymake.pdf \
-       forms.pdf \
-       gnus.pdf \
-       htmlfontify.pdf \
-       emacs-gnutls.pdf \
-       idlwave.pdf \
-       ido.pdf \
-       info.pdf \
-       mairix-el.pdf \
-       message.pdf \
-       mh-e.pdf \
-       newsticker.pdf \
-       nxml-mode.pdf \
-       org.pdf \
-       pcl-cvs.pdf \
-       pgg.pdf \
-       rcirc.pdf \
-       reftex.pdf \
-       remember.pdf \
-       sasl.pdf \
-       sc.pdf \
-       semantic.pdf \
-       ses.pdf \
-       sieve.pdf \
-       smtpmail.pdf \
-       speedbar.pdf \
-       srecode.pdf \
-       todo-mode.pdf \
-       tramp.pdf \
-       url.pdf \
-       vip.pdf \
-       viper.pdf \
-       widget.pdf \
-       wisent.pdf \
-       woman.pdf
-
-PS_TARGETS = $(DOCMISC_PS_W32) \
-       ada-mode.ps \
-       auth.ps \
-       autotype.ps \
-       bovine.ps \
-       calc.ps \
-       cc-mode.ps \
-       cl.ps \
-       dbus.ps \
-       dired-x.ps \
-       ebrowse.ps \
-       ede.ps \
-       ediff.ps \
-       edt.ps \
-       efaq.ps \
-       eieio.ps \
-       emacs-mime.ps \
-       epa.ps \
-       erc.ps \
-       ert.ps \
-       eshell.ps \
-       eudc.ps \
-       flymake.ps \
-       forms.ps \
-       gnus.ps \
-       htmlfontify.ps \
-       emacs-gnutls.ps \
-       idlwave.ps \
-       ido.ps \
-       info.ps \
-       mairix-el.ps \
-       message.ps \
-       mh-e.ps \
-       newsticker.ps \
-       nxml-mode.ps \
-       org.ps \
-       pcl-cvs.ps \
-       pgg.ps \
-       rcirc.ps \
-       reftex.ps \
-       remember.ps \
-       sasl.ps \
-       sc.ps \
-       semantic.ps \
-       ses.ps \
-       sieve.ps \
-       smtpmail.ps \
-       speedbar.ps \
-       srecode.ps \
-       todo-mode.ps \
-       tramp.ps \
-       url.ps \
-       vip.ps \
-       viper.ps \
-       widget.ps \
-       wisent.ps \
-       woman.ps
+# There are some naming differences between the info targets and the other
+# targets, so let's resolve them here.
+TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
+TARGETS = $(TARGETS_1:info.info=info)
+
+DVI_TARGETS  = $(TARGETS:=.dvi)
+HTML_TARGETS = $(TARGETS:=.html)
+PDF_TARGETS  = $(TARGETS:=.pdf)
+PS_TARGETS   = $(TARGETS:=.ps)
 
 TEXI2DVI = texi2dvi
 TEXI2PDF = texi2pdf
index 1354f68cc9fdace372f2a7a18e203f3c4fce6273..54e067d65bdf973cc8c4356ed157517bac9573c5 100644 (file)
@@ -3452,8 +3452,9 @@ lack certain features, such as the Emacs Lisp extension language.
 @cindex Emacs for MS-Windows
 @cindex Microsoft Windows, Emacs for
 
-There is a @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html,
-separate FAQ} for Emacs on MS-Windows.  For MS-DOS, @pxref{Emacs for MS-DOS}.
+There is a separate FAQ for Emacs on MS-Windows,
+@pxref{Top,,,efaq-w32,FAQ for Emacs on MS Windows}.
+For MS-DOS, @pxref{Emacs for MS-DOS}.
 
 
 @node Emacs for GNUstep
index 740dfee41ed3f87bfc6bd2e343efd5a46291400e..b1c4c13c5ffaf9f8d114a46651da2a046aee2123 100644 (file)
@@ -25,7 +25,7 @@ modify this GNU manual.''
 
 @dircategory Emacs network features
 @direntry
-* GnuTLS: (emacs-gnutls).       The Emacs GnuTLS integration.
+* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
 @end direntry
 
 @titlepage
index 03c6da3b73fd9089fed3934ee33a4877fa777437..aa4cea58f047029395c37f6ea9ee1abb69ff5dc7 100644 (file)
@@ -225,7 +225,6 @@ Configuring @value{tramp} for use
 Using @value{tramp}
 
 * Filename Syntax::             @value{tramp} filename conventions.
-* Alternative Syntax::          URL-like filename syntax.
 * Filename completion::         Filename completion.
 * Ad-hoc multi-hops::           Declaring multiple hops in the file name.
 * Remote processes::            Integration with other @value{emacsname} packages.
@@ -2356,7 +2355,6 @@ minute you have already forgotten that you hit that key!
 
 @menu
 * Filename Syntax::             @value{tramp} filename conventions.
-* Alternative Syntax::          URL-like filename syntax.
 * Filename completion::         Filename completion.
 * Ad-hoc multi-hops::           Declaring multiple hops in the file name.
 * Remote processes::            Integration with other @value{emacsname} packages.
@@ -2453,46 +2451,6 @@ by adding @file{#<port>} to the host name, like in @file{@trampfn{ssh,
 daniel, melancholia#42, .emacs}}.
 
 
-@node Alternative Syntax
-@section URL-like filename syntax
-@cindex filename syntax
-@cindex filename examples
-
-Additionally to the syntax described in the previous chapter, it is
-possible to use a URL-like syntax for @value{tramp}.  This can be
-switched on by customizing the variable @code{tramp-syntax}.  Please
-note that this feature is experimental for the time being.
-
-The variable @code{tramp-syntax} must be set before requiring @value{tramp}:
-
-@lisp
-(setq tramp-syntax 'url)
-(require 'tramp)
-@end lisp
-
-Then, a @value{tramp} filename would look like this:
-@file{/@var{method}://@var{user}@@@var{machine}:@var{port}/@var{path/to.file}}.
-@file{/@var{method}://} is mandatory, all other parts are optional.
-@file{:@var{port}} is useful for methods only who support this.
-
-The last example from the previous section would look like this:
-@file{/ssh://daniel@@melancholia/.emacs}.
-
-For the time being, @code{tramp-syntax} can have the following values:
-
-@itemize @w{}
-@ifset emacs
-@item @code{ftp}---That is the default syntax
-@item @code{url}---URL-like syntax
-@end ifset
-@ifset xemacs
-@item @code{sep}---That is the default syntax
-@item @code{url}---URL-like syntax
-@item @code{ftp}---EFS-like syntax
-@end ifset
-@end itemize
-
-
 @node Filename completion
 @section Filename completion
 @cindex filename completion
index c1cb67a6a67772cc9a59cd20e77d72926ffef18e..bd5534d94468becbb20a5a49701fb68458370373 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-09  Glenn Morris  <rgm@gnu.org>
+
+       * refcards/Makefile (PS_ENGLISH, PS_CZECH, PS_FRENCH, PS_GERMAN)
+       (PS_POLISH, PS_PORTUGUESE, PS_RUSSIAN, PS_SLOVAKIAN, PS_TARGETS):
+       Use substitution refs.
+
 2013-08-15  Glenn Morris  <rgm@gnu.org>
 
        * refcards/calccard.pdf, refcards/cs-dired-ref.pdf:
index 8bf72ddfedded202867051d137f0c75b1fb0cede..78f99dbc621d0d33c836904dfb0f094598f2793d 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -34,6 +34,10 @@ build time.  To prevent this, use the configure option
 `--with-file-notification-no'.  See below for file-notify features.
 FIXME?  This feature is not available for the Nextstep port. (?)
 
+** The configure option `without-compress-info' has been generalized,
+and renamed to `without-compress-install'.  It now prevents compression
+of _any_ files during installation.
+
 ** The configure option --with-crt-dir has been removed.
 It is no longer needed, as the crt*.o files are no longer linked
 specially.
@@ -262,8 +266,9 @@ whole tree revisions.
 *** In VC directory mode, `L' lists the change log for the current VC
 controlled tree in a window.
 
-*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a
-file under current version control system.
+*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file
+under current version control system.  When called with a prefix
+argument, you can remove a file from the ignored file list.
 
 ** cl-lib
 
@@ -331,6 +336,10 @@ This is useful to avoid a query when you have no key for that name.
 *** key bindings to navigate through and select the completions.
 *** The icomplete-separator is customizable, and its default has changed.
 *** Removed icomplete-show-key-bindings.
+*** Icomplete-mode by defaults applies to all forms of minibuffer completion.
+(setq icomplete-with-completion-tables '(internal-complete-buffer))
+will revert to the old behavior.
+
 
 ** Ido
 *** Ido has a manual now.
@@ -460,6 +469,8 @@ todo-mode.el has been made obsolete and renamed otodo-mode.el.
 
 ** Tramp
 
+*** The experimental url syntax for remote file names is withdrawn.
+
 +++
 *** New connection method "adb", which allows to access Android
 devices by the Android Debug Bridge.  The variable `tramp-adb-program'
@@ -603,9 +614,20 @@ file using `set-file-extended-attributes'.
 ** `visited-file-modtime' now returns -1 for nonexistent files.
 Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
 in the presence of files with negative time stamps.
+
+** The cars of the elements in `interpreter-mode-alist' are now treated
+as regexps rather than literal strings.  For the time being, any
+element whose car does not start with "\\" is still treated as a
+literal string, so this change should not cause any incompatibilities
+if you have code that just adds elements to the list, only if you are
+actually using interpreter-mode-alist for something.
+
 \f
 * Lisp Changes in Emacs 24.4
 
+** The second argument of `eval' can now be a lexical-environment.
+
+** `with-demoted-errors' takes an additional argument `format'.
 +++
 ** New function `define-error'.
 
@@ -753,6 +775,11 @@ used in place of the 9th element of `file-attributes'.
 `preserve-extended-attributes' as it now handles both SELinux context
 and ACL entries.
 
+** The `common-substring' argument of display-completion-list is obsolete.
+Either use `completion-all-completions' which already returns highlighted
+strings (including for partial or substring completion) or call
+`completion-hilit-commonality' to add the highlight.
+
 ** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4
 
 *** The package descriptor and name of global variables, constants,
@@ -762,12 +789,10 @@ meant to be used by other packages.
 \f
 * Changes in Emacs 24.4 on Non-Free Operating Systems
 
-** Emacs for MS-Windows can now be built by running the configure script
-using the MSYS environment and MinGW development tools.
-This is from now on the preferred method of building Emacs on
-MS-Windows.  The Windows-specific configure.bat and makefile.w32-in
-files are deprecated.  See the file nt/INSTALL.MSYS for detailed
-instructions.
+** The procedure for building Emacs on MS-Windows has changed.
+It is now built by running the same configure script as on all other
+platforms.  This requires the MSYS environment and MinGW development
+tools.  See the updated instructions in nt/INSTALL for details.
 
 Using the Posix configure script and Makefile's also means a change in
 the directory structure of the Emacs installation on Windows.  It is
index 7556c23daee00da0577ad4c53b514d0504de081f..f241655deddaa219006b7090565ac41180210265 100644 (file)
@@ -3016,9 +3016,9 @@ You can enter M-f6 by typing ESC f6.
 *** MS-Windows 95/98/ME: subprocesses do not terminate properly.
 
 This is a limitation of the Operating System, and can cause problems
-when shutting down Windows. Ensure that all subprocesses are exited
-cleanly before exiting Emacs. For more details, see the FAQ at
-http://www.gnu.org/software/emacs/windows/.
+when shutting down Windows.  Ensure that all subprocesses are exited
+cleanly before exiting Emacs.  For more details, see the Emacs on MS
+Windows FAQ (info manual "efaq-w32").
 
 *** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs.
 
index 36abf67d594f05796db3ae7a2f73226a3304acc2..0931540e4d8759665f86237fd7d6ff36009e9a3e 100644 (file)
@@ -58,42 +58,16 @@ PDF_SLOVAKIAN = \
 PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \
        $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN)
 
-PS_ENGLISH = \
-       calccard.ps \
-       dired-ref.ps \
-       gnus-booklet.ps \
-       gnus-refcard.ps \
-       orgcard.ps \
-       refcard.ps \
-       survival.ps \
-       vipcard.ps \
-       viperCard.ps
-
-PS_CZECH = \
-       cs-dired-ref.ps \
-       cs-refcard.ps \
-       cs-survival.ps
-
-PS_FRENCH = \
-       fr-dired-ref.ps \
-       fr-refcard.ps \
-       fr-survival.ps \
-
-PS_GERMAN = de-refcard.ps
-
-PS_POLISH = pl-refcard.ps
-
-PS_PORTUGUESE = pt-br-refcard.ps
-
-PS_RUSSIAN = ru-refcard.ps
-
-PS_SLOVAKIAN = \
-       sk-dired-ref.ps \
-       sk-refcard.ps \
-       sk-survival.ps
-
-PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \
-       $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN)
+PS_ENGLISH = $(PDF_ENGLISH:.pdf=.ps)
+PS_CZECH = $(PDF_CZECH:.pdf=.ps)
+PS_FRENCH = $(PDF_FRENCH:.pdf=.ps)
+PS_GERMAN = $(PDF_GERMAN:.pdf=.ps)
+PS_POLISH = $(PDF_POLISH:.pdf=.ps)
+PS_PORTUGUESE = $(PDF_PORTUGUESE:.pdf=.ps)
+PS_RUSSIAN = $(PDF_RUSSIAN:.pdf=.ps)
+PS_SLOVAKIAN = $(PDF_SLOVAKIAN:.pdf=.ps)
+
+PS_TARGETS = $(PDF_TARGETS:.pdf=.ps)
 
 
 ## For emacsver.tex.
index 2a1a0ac1cb962ef8f6fb8644f3bacfb14757e548..3a6d503cdf51f240dea3200f022b7ea784755d5b 100644 (file)
Binary files a/etc/spook.lines and b/etc/spook.lines differ
index b6ec2845c3d7a0efaec44d4e44bfa4be2b031fea..f6ccbda30ff13b8cdcc73442cb7c8f5a171aed30 100644 (file)
--- a/info/dir
+++ b/info/dir
@@ -41,7 +41,7 @@ Emacs editing modes
 Emacs network features
 * EUDC: (eudc).                 Emacs client for directory servers (LDAP, PH).
 * Gnus: (gnus).                 The newsreader Gnus.
-* GnuTLS: (emacs-gnutls).       The Emacs GnuTLS integration.
+* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
 * Mairix: (mairix-el).          Emacs interface to the Mairix mail indexer.
 * MH-E: (mh-e).                 Emacs interface to the MH mail system.
 * Message: (message).           Mail and news composition mode that
index abe0e195ff97c64173c5b20653786a3653a64e00..11186603df8f460bed4cc3e2383afb3430c3cf10 100644 (file)
@@ -1,3 +1,14 @@
+2013-09-05  Jean Haidouk  <haidouk@yandex.com>  (tiny change)
+
+       * quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"):
+       * quail/latin-pre.el ("french-prefix"):
+       * quail/latin-post.el ("french-postfix"): Add `œ' and `Œ'.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-06-21  Juanma Barranquero  <lekktu@gmail.com>
 
        * quail/croatian.el ("croatian-prefix"):
index b04eb6c2e77e45c14c7036a6f918e8aeccfd65b2..7c3f3ca47e1934c704d8559c08b712a89036c2c0 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-
-# Avoid trouble on systems where the `SHELL' variable might be
-# inherited from the environment.
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # Here are the things that we expect ../configure to edit.
 srcdir=@srcdir@
index fdfc89f4ecaa0bf69c888b6ad961e8cb79966ee2..6841947524ff5c15f79a609bc5b16a154f51415a 100644 (file)
@@ -938,7 +938,7 @@ Par exemple: a` -> à   e' -> é.
 En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
 Par exemple: e'' -> e'
 
-<e dans l'o> n'est pas disponible."
+Œ est produit par O/."
  nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -959,7 +959,9 @@ Par exemple: e'' -> e'
  ("i^" ?î)
  ("i\"" ?ï)
  ("O^" ?Ô)
+ ("O/" ?Œ)
  ("o^" ?ô)
+ ("o/" ?œ)
  ("U`" ?Ù)
  ("U^" ?Û)
  ("U\"" ?Ü)
@@ -988,7 +990,9 @@ Par exemple: e'' -> e'
  ("i^^" ["i^"])
  ("i\"\"" ["i\""])
  ("O^^" ["O^"])
+ ("O//" ["O/"])
  ("o^^" ["o^"])
+ ("o//" ["o/"])
  ("U``" ["U`"])
  ("U^^" ["U^"])
  ("U\"\"" ["U\""])
@@ -1423,6 +1427,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
  ("O'" ?Ó)
  ("O-" ?Ō)
  ("O/" ?Ø)
+ ("O/" ?Œ)
  ("O:" ?Ő)
  ("O\"" ?Ö)
  ("O^" ?Ô)
@@ -1515,6 +1520,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
  ("o'" ?ó)
  ("o-" ?ō)
  ("o/" ?ø)
+ ("o/" ?œ)
  ("o:" ?ő)
  ("o\"" ?ö)
  ("o^" ?ô)
index 67cd0648951becf053b41a2eca7c036051944669..7fa3d88e8c662deaee253e60b68279ac780bb5b8 100644 (file)
@@ -1013,7 +1013,7 @@ Par exemple: a` -> à   e' -> é.
 En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
 Par exemple: e'' -> e'
 
-<e dans l'o> n'est pas disponible."
+Œ est produit par O/."
  nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -1034,7 +1034,9 @@ Par exemple: e'' -> e'
  ("i^" ?î)
  ("i\"" ?ï)
  ("O^" ?Ô)
+ ("O/" ?Œ)
  ("o^" ?ô)
+ ("o/" ?œ)
  ("U`" ?Ù)
  ("U^" ?Û)
  ("U\"" ?Ü)
@@ -1063,7 +1065,9 @@ Par exemple: e'' -> e'
  ("i^^" ["i^"])
  ("i\"\"" ["i\""])
  ("O^^" ["O^"])
+ ("O//" ["O/"])
  ("o^^" ["o^"])
+ ("o//" ["o/"])
  ("U``" ["U`"])
  ("U^^" ["U^"])
  ("U\"\"" ["U\""])
@@ -2099,7 +2103,7 @@ of characters from a single Latin-N charset.
   dot        |    .    | z. -> ż
   stroke     |    /    | d/ -> đ
   nordic     |    /    | d/ -> ð   t/ -> þ   a/ -> å   e/ -> æ   o/ -> ø
-  others     |    /    | s/ -> ß   ?/ -> ¿   !/ -> ¡   // -> °
+  others     |    /    | s/ -> ß   ?/ -> ¿   !/ -> ¡   // -> °   o/ -> œ
              | various | << -> «   >> -> »   o_ -> º   a_ -> ª
 
 Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
index 4b4179ebf8217709ad77620cfa02554a83e25d80..c6085f3429028f7a7a466672cfa8a92535ddfa5c 100644 (file)
@@ -264,6 +264,7 @@ Key translation rules are:
   diaeresis  |   \"    | \"i -> ï
    cedilla   | ~ or , | ~c -> ç   ,c -> ç
    symbol    |   ~    | ~> -> »   ~< -> «
+    misc     |   /    | /o -> œ
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -295,6 +296,9 @@ Key translation rules are:
  ("\"e" ?ë)
  ("\"i" ?ï)
  ("\" " ?\")
+ ("/o" ?œ)
+ ("/O" ?Œ)
+ ("/ " ?/)
  ("~<" ?\«)
  ("~>" ?\»)
  ("~C" ?Ç)
index 53d66ba1e37c81e4ff2d8226aff8f39668b8f795..d2e9dd181776c7c4d90abf08d82eda5a56ed0bee 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-10  Eli Zaretskii  <eliz@gnu.org>
 
        * update-game-score.exe.manifest: New file.
index fe1900a2a403dcd52518f09b7c1074c9c6ddd799..994eb2bb266acd5c4b88b2abd6116beaf5e0ac43 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-
-# Avoid trouble on systems where the `SHELL' variable might be
-# inherited from the environment.
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # Following ../lisp/Makefile.in.
 EMACS = ../src/emacs
index b8ffbc484717748f2c0b78a2e65aa0b1ce642e9f..32ea5e72efdb9e14a07fc97435982b75381330d3 100644 (file)
@@ -1,3 +1,537 @@
+2013-09-10  Glenn Morris  <rgm@gnu.org>
+
+       * files.el (interpreter-mode-alist): Convert to regexps.
+       (set-auto-mode): Adapt for this.  (Bug#15306)
+       * progmodes/cperl-mode.el (cperl-clobber-mode-lists):
+       Comment out unused variable.
+       * progmodes/cc-mode.el (interpreter-mode-alist):
+       * progmodes/python.el (interpreter-mode-alist):
+       * progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps.
+       * progmodes/sh-script.el (sh-set-shell):
+       No longer use interpreter-mode-alist to get list of shells.
+
+       * progmodes/cc-mode.el (awk-mode): Remove duplicate autoload.
+
+2013-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el: Use set-temporary-overlay-map for universal-argument.
+       (universal-argument-map): Don't use default-bindings.
+       Bind switch-frame explicitly.  Replace universal-argument-minus with
+       a conditional binding.
+       (universal-argument-num-events, saved-overriding-map): Remove.
+       (restore-overriding-map): Remove.
+       (universal-argument--mode): Rename from save&set-overriding-map,
+       and rewrite.
+       (universal-argument, universal-argument-more, negative-argument)
+       (digit-argument): Adjust accordingly.
+       (universal-argument-minus): Remove.
+       (universal-argument-other-key): Remove.
+
+       * subr.el (with-demoted-errors): Add `format' argument.
+
+2013-09-10  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-cleanup): Remove.  Functionality added to
+       `tramp-cleanup-connection'.
+
+       * net/tramp-cmds.el (tramp-cleanup-connection): Add optional
+       parameters KEEP-DEBUG and KEEP-PASSWORD.
+
+       * net/tramp.el (tramp-file-name-handler):
+       * net/tramp-adb.el (tramp-adb-maybe-open-connection):
+       * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell)
+       (tramp-maybe-open-connection):
+       * net/tramp-smb.el (tramp-smb-maybe-open-connection):
+       Use `tramp-cleanup-connection'.
+
+       * net/tramp-sh.el (tramp-maybe-open-connection):
+       Catch 'uname-changed inside the progress reporter.
+
+2013-09-10  Glenn Morris  <rgm@gnu.org>
+
+       * simple.el (read-minibuffer): Unbreak it.  (Bug#15318)
+
+       * dired-x.el (dired-mark-sexp): Unbreak for systems where ls
+       returns "alternate access method" in mode (eg "-rw-r--r--.").
+
+2013-09-08  Glenn Morris  <rgm@gnu.org>
+
+       * saveplace.el (load-save-place-alist-from-file):
+       Demote errors.  (Bug#15305)
+
+2013-09-08  Michael Albinus  <michael.albinus@gmx.de>
+
+       Improve compatibility with older Emacsen, and XEmacs.
+
+       * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
+       only if it is bound.  It isn't for XEmacs.
+       (with-tramp-progress-reporter): Do not let-bind `result'.
+       This yields to scoping errors in XEmacs.
+       (tramp-handle-make-auto-save-file-name): New function, moved from
+       tramp-sh.el.
+
+       * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
+       for `make-auto-save-file-name'.
+       (tramp-adb--gnu-switches-to-ash):
+       Use `tramp-compat-replace-regexp-in-string'.
+
+       * net/tramp-cache.el (tramp-cache-print): Call
+       `substring-no-properties' only if it is bound.  It isn't for XEmacs.
+
+       * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
+       bound.  It isn't for XEmacs.
+
+       * net/tramp-compat.el (tramp-compat-copy-file):
+       Catch `wrong-number-of-arguments' error.
+       (tramp-compat-replace-regexp-in-string): New defun.
+
+       * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
+       for `make-auto-save-file-name'.
+       (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
+       `copy-file'.
+       (tramp-gvfs-file-gvfs-monitor-file-process-filter)
+       (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
+       (tramp-synce-list-devices): Use `push' instead of `pushnew'.
+
+       * net/tramp-gw.el (tramp-gw-open-network-stream):
+       Use `tramp-compat-replace-regexp-in-string'.
+
+       * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
+       Call `tramp-handle-make-auto-save-file-name'.
+       (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
+       (tramp-sh-file-gvfs-monitor-dir-process-filter)
+       (tramp-sh-file-inotifywait-process-filter):
+       Use `tramp-compat-replace-regexp-in-string'.
+       (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
+
+       * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
+       for `make-auto-save-file-name'.
+       (tramp-smb-handle-copy-directory):
+       Call `tramp-compat-replace-regexp-in-string'.
+       (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
+       (tramp-smb-handle-copy-file): Improve error message.
+       (tramp-smb-handle-rename-file): Rename directly only in case
+       `newname' does not exist yet.  This is a restriction of smbclient.
+       (tramp-smb-maybe-open-connection): Rerun the function only when
+       `auth-sources' is non-nil.
+
+2013-09-08  Kenichi Handa  <handa@gnu.org>
+
+       * international/characters.el: Set category "^" (Combining) for
+       more characters.
+
+2013-09-07  Alan Mackenzie  <acm@muc.de>
+
+       Correctly fontify Java class constructors.
+       * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")"
+       in Java Mode.
+       (c-recognize-typeless-decls): Set the Java value to t.
+       * progmodes/cc-engine.el (c-forward-decl-or-cast-1):
+       While handling a "(", add a check for, effectively, Java, and handle a
+       "typeless" declaration there.
+
+2013-09-07  Roland Winkler  <winkler@gnu.org>
+
+       * textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add optional
+       field subtitle for entry type book.
+
+2013-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuffer.el: Make minibuffer-complete call completion-in-region
+       rather than other way around.
+       (completion--some, completion-pcm--find-all-completions):
+       Don't delay signals when debugging.
+       (minibuffer-completion-contents): Beware fields within the
+       minibuffer contents.
+       (completion-all-sorted-completions): Use defvar-local.
+       (completion--do-completion, completion--cache-all-sorted-completions)
+       (completion-all-sorted-completions, minibuffer-force-complete):
+       Add args `beg' and `end'.
+       (completion--in-region-1): New fun, extracted from minibuffer-complete.
+       (minibuffer-complete): Use completion-in-region.
+       (completion-complete-and-exit): New fun, extracted from
+       minibuffer-complete-and-exit.
+       (minibuffer-complete-and-exit): Use it.
+       (completion--complete-and-exit): Rename from
+       minibuffer--complete-and-exit.
+       (completion-in-region--single-word): New function, extracted from
+       minibuffer-complete-word.
+       (minibuffer-complete-word): Use it.
+       (display-completion-list): Make `common-substring' argument obsolete.
+       (completion--in-region): Call completion--in-region-1 instead of
+       minibuffer-complete.
+       (completion-help-at-point): Pass boundaries to
+       minibuffer-completion-help as args rather than via an overlay.
+       (completion-pcm--string->pattern): Use `any-delim'.
+       (completion-pcm--optimize-pattern): New function.
+       (completion-pcm--pattern->regex): Handle `any-delim'.
+       * icomplete.el (icomplete-forward-completions)
+       (icomplete-backward-completions, icomplete-completions):
+       Adjust calls to completion-all-sorted-completions and
+       completion--cache-all-sorted-completions.
+       (icomplete-with-completion-tables): Default to t.
+       * emacs-lisp/crm.el (crm--current-element): Rename from
+       crm--select-current-element.  Don't put an overlay but return the
+       boundaries instead.
+       (crm--completion-command): Take two new args to bind to the boundaries.
+       (crm-completion-help): Adjust accordingly.
+       (crm-complete): Use completion-in-region.
+       (crm-complete-word): Use completion-in-region--single-word.
+       (crm-complete-and-exit): Use completion-complete-and-exit.
+
+2013-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * dired-x.el (dired-mark-sexp): Bind the vars lexically rather
+       than dynamically.
+
+2013-09-06  Juri Linkov  <juri@jurta.org>
+
+       * info.el (Info-display-images-node): When image file doesn't exist
+       display text version of the image if it's provided in the Info file.
+       Otherwise, display the location of missing image from SRC attribute.
+       Add help-echo text property from ALT attribute.  (Bug#15279)
+
+2013-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * abbrev.el (edit-abbrevs-mode-map): Rename from edit-abbrevs-map.
+       (edit-abbrevs-mode): Use define-derived-mode.
+
+       * epa.el (epa--encode-coding-string, epa--decode-coding-string)
+       (epa--select-safe-coding-system, epa--derived-mode-p): Make it obvious
+       that it's defined.
+       (epa-key-list-mode, epa-key-mode, epa-info-mode):
+       Use define-derived-mode.
+
+       * epg.el (epg-start-encrypt): Minor CSE simplification.
+
+2013-09-06  William Xu  <william.xwl@gmail.com>
+
+       * arc-mode.el: Add support for 7za (bug#15264).
+       (archive-7z-program): New var.
+       (archive-zip-extract, archive-zip-expunge, archive-zip-update)
+       (archive-zip-update-case, archive-7z-extract, archive-7z-expunge)
+       (archive-7z-update, archive-zip-extract, archive-7z-summarize): Use it.
+
+2013-09-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       Remove URL syntax.
+
+       * net/tramp.el (tramp-syntax, tramp-prefix-format)
+       (tramp-postfix-method-format, tramp-prefix-ipv6-format)
+       (tramp-postfix-ipv6-format, tramp-prefix-port-format)
+       (tramp-postfix-host-format, tramp-file-name-regexp)
+       (tramp-completion-file-name-regexp)
+       (tramp-completion-dissect-file-name)
+       (tramp-handle-substitute-in-file-name): Remove 'url case.
+       (tramp-file-name-regexp-url)
+       (tramp-completion-file-name-regexp-url): Remove constants.
+
+2013-09-06  Glenn Morris  <rgm@gnu.org>
+
+       * replace.el (replace-string): Doc fix re start/end.  (Bug#15275)
+
+2013-09-05  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish
+       keywords" below "here-doc beginnings" (Bug#15270).
+
+2013-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (pop): Use `car-safe'.
+       * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove hack
+       to detect unused `pop' return value.
+
+       * progmodes/python.el (python-nav-beginning-of-block): Remove unused
+       var `block-regexp'.
+       (python-nav--forward-sexp): Remove unused var `re-search-fn'.
+       (python-fill-string): Remove unused var `marker'.
+       (python-skeleton-add-menu-items): Remove unused var `items'.
+
+       * international/mule-cmds.el: Require CL.
+       (find-coding-systems-for-charsets): Avoid add-to-list.
+       (sanitize-coding-system-list): New function, extracted from
+       select-safe-coding-system-interactively.
+       (select-safe-coding-system-interactively): Use it.
+       (read-input-method-name): Accept symbols for `default'.
+
+       * emacs-lisp/advice.el (defadvice): Add indent rule.
+
+2013-09-05  Daniel Hackney  <dan@haxney.org>
+
+       * dired-x.el:
+       * net/ange-ftp.el:
+       * net/browse-url.el:
+       * net/dbus.el:
+       * net/eudc.el:
+       * net/eudcb-ldap.el:
+       * net/eww.el:
+       * net/imap.el:
+       * printing.el:
+       * vc/ediff-diff.el:
+       * vc/ediff-init.el:
+       * vc/ediff-merg.el:
+       * vc/ediff-mult.el:
+       * vc/ediff-util.el:
+       * vc/ediff-wind.el:
+       * vc/ediff.el:
+       * vc/emerge.el:
+       * vc/pcvs.el:
+       * vc/vc-annotate.el: Prefix unused arguments with `_' to silence
+       byte compiler.  Remove some unused let-bound variables.
+
+2013-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/cconv.el: Use `car-safe' rather than `car' to access
+       a "ref-cell", since it gets better optimized (bug#14883).
+
+2013-09-05  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/cc-awk.el (c-forward-sws): Declare.
+
+2013-09-04  Glenn Morris  <rgm@gnu.org>
+
+       * generic-x.el [rul-generic-mode]: Require cc-mode.
+       (c++-mode-syntax-table): Declare.
+       (rul-generic-mode-syntax-table): Init in the defvar.
+
+2013-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc/vc-dispatcher.el (vc-run-delayed): New macro.
+       (vc-do-command, vc-set-async-update):
+       * vc/vc-mtn.el (vc-mtn-dir-status):
+       * vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
+       (vc-hg-pull, vc-hg-merge-branch):
+       * vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
+       (vc-git-merge-branch):
+       * vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
+       (vc-cvs-dir-status-files):
+       * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
+       (vc-bzr-dir-status-files):
+       * vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
+       * vc/vc-annotate.el: Use lexical-binding.
+       (vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
+       (vc-sentinel-movepoint): Declare.
+       (vc-annotate): Don't use `goto-line'.
+       * vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
+       (vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
+       (vc-sentinel-movepoint): Declare.
+       * vc/vc-svn.el: Use lexical-binding.
+       (vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
+       * vc/vc-sccs.el:
+       * vc/vc-rcs.el: Use lexical-binding.
+
+       * autorevert.el (auto-revert-notify-handler): Explicitly ignore
+       `deleted'.  Don't drop errors silently.
+
+       * emacs-lisp/gv.el (gv-get): Warn about CL-compiled places.
+
+2013-09-04  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * vc/vc.el (vc-ignore): Rewrite.
+       (vc-default-ignore): New function.
+       (vc-default-ignore-completion-table): Use find-ignore-file.
+
+       * vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table):
+       * vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table):
+       * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table):
+       Remove.  Most code moved to vc.el.
+
+2013-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
+       * net/tramp-smb.el (tramp-smb-get-file-entries):
+       * net/tramp-sh.el (tramp-sh-handle-insert-directory)
+       (tramp-compute-multi-hops): Fix misuses of `add-to-list'.
+
+       * net/eww.el (eww-display-raw): Remove unused argument `charset'.
+       Update call to it.
+       (eww-change-select): Remove unused var `properties'.
+       (eww-make-unique-file-name): Remove unused var `base'.
+
+       * finder.el (finder-compile-keywords): Don't mess with windows.
+
+       * calculator.el (calculator-funcall): Fix typo in last change.
+
+       * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge.
+
+       * emacs-lisp/package.el (package-activate-1): Don't let a missing
+       <pkg>-autoloads.el file stop us.
+
+       * net/tramp.el (with-parsed-tramp-file-name): Silence compiler
+       warnings, and factor out common code.
+
+2013-09-03  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-calculate-indent): Consider
+       two-character operators and whether the character preceding them
+       changes their meaning (Bug#15208).
+
+2013-09-02  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Format code sent to Python shell for robustness.
+       * progmodes/python.el (python-shell-buffer-substring):
+       New function.
+       (python-shell-send-region, python-shell-send-buffer): Use it.
+
+2013-09-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-compat.el (tramp-compat-user-error): Move it ...
+       * net/tramp.el (tramp-user-error): ... here.
+       (tramp-find-method, tramp-check-proper-host)
+       (tramp-dissect-file-name, tramp-debug-message)
+       (tramp-handle-shell-command):
+       * net/tramp-adb.el (tramp-adb-handle-shell-command):
+       * net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.
+
+       * net/tramp-cache.el (tramp-cache-print): Don't print text properties.
+
+2013-09-02  Martin Rudalics  <rudalics@gmx.at>
+
+       * avoid.el (mouse-avoidance-point-position)
+       (mouse-avoidance-too-close-p): Handle case where posn-at-point
+       returns nil.
+
+2013-09-02  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * progmodes/python.el (python-shell-completion-get-completions):
+       Drop use of deleted `comint-last-prompt-overlay'.
+       (python-nav-if-name-main): New command.
+
+2013-09-01  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
+       Avoid leading space in $wins.  Otherwise the sed command used by
+       eg compile-main ends up containing "/*.el".  (Bug#15170)
+
+       * frame.el (frame-background-mode): Doc fix.  (Bug#15226)
+
+2013-08-30  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp/bytecomp.el (byte-recompile-directory):
+       Fix is-this-a-directory logic.  (Bug#15220)
+
+2013-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * textmodes/css-mode.el: Use SMIE.
+       (css-smie-grammar): New var.
+       (css-smie--forward-token, css-smie--backward-token)
+       (css-smie-rules): New functions.
+       (css-mode): Use them.
+       (css-navigation-syntax-table): Remove var.
+       (css-backward-sexp, css-forward-sexp, css-indent-calculate-virtual)
+       (css-indent-calculate, css-indent-line): Remove functions.
+
+       Misc changes to reduce use of `(lambda...); and other cleanups.
+       * cus-edit.el: Use lexical-binding.
+       (customize-push-and-save, customize-apropos)
+       (custom-buffer-create-internal): Use closures.
+       * progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings.
+       * progmodes/ada-xref.el: Use setq.
+       * net/tramp.el (with-tramp-progress-reporter): Avoid setq.
+       * dframe.el: Use lexical-binding.
+       (dframe-frame-mode): Fix calling convention for hooks.  Use a closure.
+       * speedbar.el (speedbar-frame-mode): Adjust call accordingly.
+       * descr-text.el: Use lexical-binding.
+       (describe-text-widget, describe-text-sexp, describe-property-list):
+       Use closures.
+       * comint.el (comint-history-isearch-push-state): Use a closure.
+       * calculator.el: Use lexical-binding.
+       (calculator-number-to-string): Make it work with lexical-binding.
+       (calculator-funcall): Same and use cl-letf.
+
+       * emacs-lisp/lisp.el (lisp--company-doc-buffer)
+       (lisp--company-doc-string, lisp--company-location): New functions.
+       (lisp-completion-at-point): Use them to improve Company support.
+
+       * progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal
+       params of lambda expressions.
+       (ruby-smie--implicit-semi-p): Refine rule (bug#15208).
+       (ruby-smie--opening-pipe-p): New function.
+       (ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby
+       symbols and matched |...| for formal params.
+       (ruby-smie-rules): Don't let the formal params of a "do" prevent it
+       from being treated as hanging.  Handle "rescue".
+
+2013-08-29  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/cc-engine.el (c-pull-open-brace):
+       Move definition before use.
+
+2013-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args
+       are immutable.  Don't use `unsafe' any more.
+       (cl--defsubst-expand): Don't substitute at the same time as keeping
+       a residual unused let-binding.  Don't use `unsafe' any more.
+
+2013-08-29  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/cal-china.el (calendar-chinese-year-cache):
+       Recenter on 2015.
+
+       * nxml/nxml-util.el (nxml-debug-clear-inside):
+       Use cl-loop rather than loop.
+
+       * net/eww.el (eww-mode-map): Lower-case menu bar entries look bad.
+
+       * progmodes/sh-script.el (sh-builtins) <bash>: Add some bash4-isms.
+
+2013-08-28  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/antlr-mode.el: No need to require cc-mode twice.
+
+       * progmodes/cc-bytecomp.el (cc-require): Handle uncompiled case.
+
+       * progmodes/cc-mode.el (c-define-abbrev-table): Handle NAME unbound.
+
+2013-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (repeat-complex-command--called-interactively-skip):
+       New function.
+       (repeat-complex-command): Use it (bug#14136).
+
+       * progmodes/cc-mode.el: Minor cleanup of var declarations.
+       (c-define-abbrev-table): Add `doc' argument.
+       (c-mode-abbrev-table, c++-mode-abbrev-table)
+       (objc-mode-abbrev-table, java-mode-abbrev-table)
+       (idl-mode-abbrev-table, pike-mode-abbrev-table)
+       (awk-mode-abbrev-table): Use it.
+       (c-mode-syntax-table, c-mode-map, c++-mode-syntax-table)
+       (c++-mode-map, objc-mode-syntax-table, objc-mode-map)
+       (java-mode-syntax-table, java-mode-map, idl-mode-syntax-table)
+       (idl-mode-map, pike-mode-syntax-table, pike-mode-map, awk-mode-map):
+       Move initialization into the declaration; and remove any
+       autoload cookie.
+
+       * epg.el (epg--process-filter): Use with-current-buffer, save-excursion
+       and dynamic let binding.
+
+       * vc/smerge-mode.el: Remove redundant :group args.
+
+       * emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
+       to load-path.
+
+2013-08-28  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
+       arg DONT-DOWNCASE-LAST of `read-key-sequence'.
+       (isearch-other-meta-char): Handle an undefined shifted printing
+       character by downshifting it.  (Bug#15200)
+
+2013-08-28  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-search): Change regexp error message for
+       non-regexp searches.  (Bug#15166)
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
+2013-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning.
+
 2013-08-27  Juri Linkov  <juri@jurta.org>
 
        * isearch.el (isearch-other-meta-char): Don't store kmacro commands
 2013-08-27  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-use-some-window): Add missing
-       argument in call of get-largest-window (Bug#15185).  Reported by
-       Stephen Leake.
+       argument in call of get-largest-window (Bug#15185).
+       Reported by Stephen Leake.
 
 2013-08-27  Glenn Morris  <rgm@gnu.org>
 
        * net/tramp-adb.el (tramp-adb-maybe-open-connection):
        * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
        * net/tramp-sh.el (tramp-maybe-open-connection):
-       * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply
-       `tramp-check-proper-host'.
+       * net/tramp-smb.el (tramp-smb-maybe-open-connection):
+       Apply `tramp-check-proper-host'.
 
 2013-08-26  Tassilo Horn  <tsdh@gnu.org>
 
index 6b34ef557833ea43d4afd9853f9ec4a81825cf13..7fcc4ff0caf09e8e0813551ae657d3990e42e84a 100644 (file)
 
        * calc/calc-embed.el (calc-do-embedded): Update help message.
 
-       * calc/calc-prog.el (calc-user-define-invokation): Update help message.
+       * calc/calc-prog.el (calc-user-define-invocation): Update help message.
 
 2005-11-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 066e15368da4c52bb543eeaaf91f9bddacc01f2b..4fba1053dfad61c2668a2fd9cb6299233664a646 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -118,7 +118,7 @@ emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
 setwins=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* ) ;; \
-               *) wins="$$wins $$file" ;; \
+               *) wins="$$wins$${wins:+ }$$file" ;; \
           esac; \
         done
 
@@ -126,7 +126,7 @@ setwins=subdirs=`find . -type d -print`; \
 setwins_almost=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
-               *) wins="$$wins $$file" ;; \
+               *) wins="$$wins$${wins:+ }$$file" ;; \
           esac; \
         done
 
@@ -134,7 +134,7 @@ setwins_almost=subdirs=`find . -type d -print`; \
 setwins_for_subdirs=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
-               *) wins="$$wins $$file" ;; \
+               *) wins="$$wins$${wins:+ }$$file" ;; \
           esac; \
         done
 
index d82e2eabd84e2c1c3af5339990c175a3d838bbf9..d7d4482693dbfbfb1aa9da3262ecb96f6bf792ca 100644 (file)
@@ -67,13 +67,15 @@ be replaced by its expansion."
 (put 'abbrev-mode 'safe-local-variable 'booleanp)
 
 \f
-(defvar edit-abbrevs-map
+(defvar edit-abbrevs-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\C-x\C-s" 'abbrev-edit-save-buffer)
     (define-key map "\C-x\C-w" 'abbrev-edit-save-to-file)
     (define-key map "\C-c\C-c" 'edit-abbrevs-redefine)
     map)
   "Keymap used in `edit-abbrevs'.")
+(define-obsolete-variable-alias 'edit-abbrevs-map
+  'edit-abbrevs-mode-map "24.4")
 
 (defun kill-all-abbrevs ()
   "Undefine all defined abbrevs."
@@ -144,16 +146,6 @@ Otherwise display all abbrevs."
       (set-buffer-modified-p nil)
       (current-buffer))))
 
-(defun edit-abbrevs-mode ()
-  "Major mode for editing the list of abbrev definitions.
-\\{edit-abbrevs-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'edit-abbrevs-mode)
-  (setq mode-name "Edit-Abbrevs")
-  (use-local-map edit-abbrevs-map)
-  (run-mode-hooks 'edit-abbrevs-mode-hook))
-
 (defun edit-abbrevs ()
   "Alter abbrev definitions by editing a list of them.
 Selects a buffer containing a list of abbrev definitions with
@@ -1013,6 +1005,11 @@ SORTFUN is passed to `sort' to change the default ordering."
            (sort entries (lambda (x y)
                 (funcall sortfun (nth 2 x) (nth 2 y)))))))
 
+;; Keep it after define-abbrev-table, since define-derived-mode uses
+;; define-abbrev-table.
+(define-derived-mode edit-abbrevs-mode special-mode "Edit-Abbrevs"
+  "Major mode for editing the list of abbrev definitions.")
+
 (provide 'abbrev)
 
 ;;; abbrev.el ends here
index 5f001ad977b43f177030e8d9c0904c9811236d55..a4f7015c84496cb41c0f618f573250f6812add99 100644 (file)
@@ -218,9 +218,14 @@ Archive and member name will be added."
 ;; ------------------------------
 ;; Zip archive configuration
 
+(defvar archive-7z-program (let ((7z (or (executable-find "7z")
+                                         (executable-find "7za"))))
+                             (when 7z
+                               (file-name-nondirectory 7z))))
+
 (defcustom archive-zip-extract
   (cond ((executable-find "unzip")   '("unzip" "-qq" "-c"))
-       ((executable-find "7z")      '("7z" "x" "-so"))
+       (archive-7z-program          `(,archive-7z-program "x" "-so"))
        ((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
        (t                           '("unzip" "-qq" "-c")))
   "Program and its options to run in order to extract a zip file member.
@@ -239,7 +244,7 @@ be added."
 
 (defcustom archive-zip-expunge
   (cond ((executable-find "zip")     '("zip" "-d" "-q"))
-       ((executable-find "7z")      '("7z" "d"))
+       (archive-7z-program          `(,archive-7z-program "d"))
        ((executable-find "pkzip")   '("pkzip" "-d"))
        (t                           '("zip" "-d" "-q")))
   "Program and its options to run in order to delete zip file members.
@@ -252,7 +257,7 @@ Archive and member names will be added."
 
 (defcustom archive-zip-update
   (cond ((executable-find "zip")     '("zip" "-q"))
-       ((executable-find "7z")      '("7z" "u"))
+       (archive-7z-program          `(,archive-7z-program "u"))
        ((executable-find "pkzip")   '("pkzip" "-u" "-P"))
        (t                           '("zip" "-q")))
   "Program and its options to run in order to update a zip file member.
@@ -266,7 +271,7 @@ file.  Archive and member name will be added."
 
 (defcustom archive-zip-update-case
   (cond ((executable-find "zip")     '("zip" "-q" "-k"))
-       ((executable-find "7z")      '("7z" "u"))
+       (archive-7z-program          `(,archive-7z-program "u"))
        ((executable-find "pkzip")   '("pkzip" "-u" "-P"))
        (t                           '("zip" "-q" "-k")))
   "Program and its options to run in order to update a case fiddled zip member.
@@ -321,7 +326,7 @@ Archive and member name will be added."
 ;; 7z archive configuration
 
 (defcustom archive-7z-extract
-  '("7z" "x" "-so")
+  `(,archive-7z-program "x" "-so")
   "Program and its options to run in order to extract a 7z file member.
 Extraction should happen to standard output.  Archive and member name will
 be added."
@@ -333,7 +338,7 @@ be added."
   :group 'archive-7z)
 
 (defcustom archive-7z-expunge
-  '("7z" "d")
+  `(,archive-7z-program "d")
   "Program and its options to run in order to delete 7z file members.
 Archive and member names will be added."
   :version "24.1"
@@ -344,7 +349,7 @@ Archive and member names will be added."
   :group 'archive-7z)
 
 (defcustom archive-7z-update
-  '("7z" "u")
+  `(,archive-7z-program "u")
   "Program and its options to run in order to update a 7z file member.
 Options should ensure that specified directory will be put into the 7z
 file.  Archive and member name will be added."
@@ -1864,7 +1869,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
   (cond
    ((member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip"))
     (archive-*-extract archive name archive-zip-extract))
-   ((equal (car archive-zip-extract) "7z")
+   ((equal (car archive-zip-extract) archive-7z-program)
     (let ((archive-7z-extract archive-zip-extract))
       (archive-7z-extract archive name)))
    (t
@@ -2088,7 +2093,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
        (file buffer-file-name)
        (files ()))
     (with-temp-buffer
-      (call-process "7z" nil t nil "l" "-slt" file)
+      (call-process archive-7z-program nil t nil "l" "-slt" file)
       (goto-char (point-min))
       ;; Four dashes start the meta info section that should be skipped.
       ;; Archive members start with more than four dashes.
index 978a834cb4c93a248cb743071470b5a8c612b90b..0e2b6f32cf311e0ea22d4df22d169aff3c7449ab 100644 (file)
@@ -531,7 +531,7 @@ will use an up-to-date value of `auto-revert-interval'"
 
 (defun auto-revert-notify-handler (event)
   "Handle an EVENT returned from file notification."
-  (ignore-errors
+  (with-demoted-errors
     (let* ((descriptor (car event))
           (action (nth 1 event))
           (file (nth 2 event))
@@ -541,28 +541,31 @@ will use an up-to-date value of `auto-revert-interval'"
       ;; Check, that event is meant for us.
       (cl-assert descriptor)
       ;; We do not handle `deleted', because nothing has to be refreshed.
-      (cl-assert (memq action '(attribute-changed changed created renamed)) t)
-      ;; Since we watch a directory, a file name must be returned.
-      (cl-assert (stringp file))
-      (when (eq action 'renamed) (cl-assert (stringp file1)))
-      ;; Loop over all buffers, in order to find the intended one.
-      (dolist (buffer buffers)
-       (when (buffer-live-p buffer)
-         (with-current-buffer buffer
-           (when (and (stringp buffer-file-name)
-                      (or
-                       (and (memq action '(attribute-changed changed created))
-                            (string-equal
-                             (file-name-nondirectory file)
-                             (file-name-nondirectory buffer-file-name)))
-                       (and (eq action 'renamed)
-                            (string-equal
-                             (file-name-nondirectory file1)
-                             (file-name-nondirectory buffer-file-name)))))
-             ;; Mark buffer modified.
-             (setq auto-revert-notify-modified-p t)
-             ;; No need to check other buffers.
-             (cl-return))))))))
+      (unless (eq action 'deleted)
+        (cl-assert (memq action '(attribute-changed changed created renamed))
+                   t)
+        ;; Since we watch a directory, a file name must be returned.
+        (cl-assert (stringp file))
+        (when (eq action 'renamed) (cl-assert (stringp file1)))
+        ;; Loop over all buffers, in order to find the intended one.
+        (dolist (buffer buffers)
+          (when (buffer-live-p buffer)
+            (with-current-buffer buffer
+              (when (and (stringp buffer-file-name)
+                         (or
+                          (and (memq action '(attribute-changed changed
+                                              created))
+                               (string-equal
+                                (file-name-nondirectory file)
+                                (file-name-nondirectory buffer-file-name)))
+                          (and (eq action 'renamed)
+                               (string-equal
+                                (file-name-nondirectory file1)
+                                (file-name-nondirectory buffer-file-name)))))
+                ;; Mark buffer modified.
+                (setq auto-revert-notify-modified-p t)
+                ;; No need to check other buffers.
+                (cl-return)))))))))
 
 (defun auto-revert-active-p ()
   "Check if auto-revert is active (in current buffer or globally)."
index c92d456ef0c8589990c81fa8a180b11b6e3f7375..72f90a30ff5f8a9a83bdc977dfa466dad2c08f32 100644 (file)
@@ -41,9 +41,9 @@
 ;;
 ;; (if (eq window-system 'x)
 ;;     (mouse-avoidance-set-pointer-shape
-;;          (eval (nth (random 4)
-;;                     '(x-pointer-man x-pointer-spider
-;;                       x-pointer-gobbler x-pointer-gumby)))))
+;;          (nth (random 4)
+;;               (list x-pointer-man x-pointer-spider
+;;                     x-pointer-gobbler x-pointer-gumby))))
 ;;
 ;; For completely random pointer shape, replace the setq above with:
 ;; (setq x-pointer-shape (mouse-avoidance-random-shape))
@@ -154,13 +154,15 @@ TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window."
 (defun mouse-avoidance-point-position ()
   "Return the position of point as (FRAME X . Y).
 Analogous to `mouse-position'."
-  (let ((edges (window-inside-edges))
-       (x-y (posn-x-y (posn-at-point))))
-    (cons (selected-frame)
-         (cons (+ (car edges)
-                  (/ (car x-y) (frame-char-width)))
-               (+ (car (cdr edges))
-                  (/ (cdr x-y) (frame-char-height)))))))
+  (let* ((edges (window-inside-edges))
+        (posn-at-point (posn-at-point))
+        (x-y (and posn-at-point (posn-x-y posn-at-point))))
+    (when x-y
+      (cons (selected-frame)
+           (cons (+ (car edges)
+                    (/ (car x-y) (frame-char-width)))
+                 (+ (car (cdr edges))
+                    (/ (cdr x-y) (frame-char-height))))))))
 
 ;(defun mouse-avoidance-point-position-test ()
 ;  (interactive)
@@ -185,19 +187,21 @@ MOUSE is the current mouse position as returned by `mouse-position'.
 Acceptable distance is defined by `mouse-avoidance-threshold'."
   (let* ((frame (car mouse))
         (mouse-y (cdr (cdr mouse)))
-        (tool-bar-lines (frame-parameter nil 'tool-bar-lines)))
+        (tool-bar-lines (frame-parameter nil 'tool-bar-lines))
+        point)
     (or tool-bar-lines
        (setq tool-bar-lines 0))
-    (if (and mouse-y (< mouse-y tool-bar-lines))
-       nil
-      (let ((point (mouse-avoidance-point-position))
-           (mouse-x (car (cdr mouse))))
+    (cond
+     ((and mouse-y (< mouse-y tool-bar-lines))
+      nil)
+     ((setq point (mouse-avoidance-point-position))
+      (let ((mouse-x (car (cdr mouse))))
        (and (eq frame (car point))
             (not (null mouse-x))
             (< (abs (- mouse-x (car (cdr point))))
                mouse-avoidance-threshold)
             (< (abs (- mouse-y (cdr (cdr point))))
-               mouse-avoidance-threshold))))))
+               mouse-avoidance-threshold)))))))
 
 (defun mouse-avoidance-banish-destination ()
   "The position to which Mouse Avoidance mode `banish' moves the mouse.
index c9a7305471265d121c349f440c4e1185170d9c89..c4611c12d87e6b593099d1cae3507b4781a4363e 100644 (file)
@@ -1,4 +1,4 @@
-;;; calculator.el --- a [not so] simple calculator for Emacs
+;;; calculator.el --- a [not so] simple calculator for Emacs  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc.
 
@@ -131,8 +131,8 @@ The displayer is a symbol, a string or an expression.  A symbol should
 be the name of a one-argument function, a string is used with a single
 argument and an expression will be evaluated with the variable `num'
 bound to whatever should be displayed.  If it is a function symbol, it
-should be able to handle special symbol arguments, currently 'left and
-'right which will be sent by special keys to modify display parameters
+should be able to handle special symbol arguments, currently `left' and
+`right' which will be sent by special keys to modify display parameters
 associated with the displayer function (for example to change the number
 of digits displayed).
 
@@ -241,6 +241,8 @@ Examples:
 ;;;=====================================================================
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
 ;;;---------------------------------------------------------------------
 ;;; Variables
 
@@ -1124,11 +1126,10 @@ the 'left or 'right when one of the standard modes is used."
         (format calculator-displayer num))
        ((symbolp calculator-displayer)
         (funcall calculator-displayer num))
-       ((and (consp calculator-displayer)
-             (eq 'std (car calculator-displayer)))
+       ((eq 'std (car-safe calculator-displayer))
         (calculator-standard-displayer num (cadr calculator-displayer)))
        ((listp calculator-displayer)
-        (eval calculator-displayer))
+        (eval calculator-displayer `((num. ,num))))
        (t (prin1-to-string num t))))
     ;; operators are printed here
     (t (prin1-to-string (nth 1 num) t))))
@@ -1273,29 +1274,24 @@ arguments."
       ;; smaller than calculator-epsilon (1e-15).  I don't think this is
       ;; necessary now.
       (if (symbolp f)
-        (cond ((and X Y) (funcall f X Y))
-              (X         (funcall f X))
-              (t         (funcall f)))
+          (cond ((and X Y) (funcall f X Y))
+                (X         (funcall f X))
+                (t         (funcall f)))
         ;; f is an expression
-        (let* ((__f__ f) ; so we can get this value below...
-               (TX (calculator-truncate X))
+        (let* ((TX (calculator-truncate X))
                (TY (and Y (calculator-truncate Y)))
                (DX (if calculator-deg (/ (* X pi) 180) X))
-               (L  calculator-saved-list)
-               (Fbound (fboundp 'F))
-               (Fsave  (and Fbound (symbol-function 'F)))
-               (Dbound (fboundp 'D))
-               (Dsave  (and Dbound (symbol-function 'D))))
-          ;; a shortened version of flet
-          (fset 'F (function
-                    (lambda (&optional x y)
-                      (calculator-funcall __f__ x y))))
-          (fset 'D (function
-                    (lambda (x)
-                      (if calculator-deg (/ (* x 180) float-pi) x))))
-          (unwind-protect (eval f)
-            (if Fbound (fset 'F Fsave) (fmakunbound 'F))
-            (if Dbound (fset 'D Dsave) (fmakunbound 'D)))))
+               (L  calculator-saved-list))
+          (cl-letf (((symbol-function 'F)
+                     (lambda (&optional x y) (calculator-funcall f x y)))
+                    ((symbol-function 'D)
+                     (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x))))
+            (eval f `((X . ,X)
+                      (Y . ,Y)
+                      (TX . ,TX)
+                      (TY . ,TY)
+                      (DX . ,DX)
+                      (L . ,L))))))
     (error 0)))
 
 ;;;---------------------------------------------------------------------
index 86e6efa9696d1ceebeb0c34d6550f5f0d724f243..ca9af673cc2dfe328008f492ded34f1caa98db62 100644 (file)
@@ -327,19 +327,7 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
 (defvar calendar-chinese-year-cache
   ;; Maintainers: delete existing value, position point at start of
   ;; empty line, then call  M-: (calendar-chinese-year-cache-init N)
-  '((2000 (12 730126) (1 730155) (2 730185) (3 730215) (4 730244) (5 730273)
-          (6 730303) (7 730332) (8 730361) (9 730391) (10 730420) (11 730450))
-    (2001 (12 730480) (1 730509) (2 730539) (3 730569) (4 730598) (4.5 730628)
-          (5 730657) (6 730687) (7 730716) (8 730745) (9 730775) (10 730804)
-          (11 730834))
-    (2002 (12 730863) (1 730893) (2 730923) (3 730953) (4 730982) (5 731012)
-          (6 731041) (7 731071) (8 731100) (9 731129) (10 731159) (11 731188))
-    (2003 (12 731218) (1 731247) (2 731277) (3 731307) (4 731336) (5 731366)
-          (6 731396) (7 731425) (8 731455) (9 731484) (10 731513) (11 731543))
-    (2004 (12 731572) (1 731602) (2 731631) (2.5 731661) (3 731690) (4 731720)
-          (5 731750) (6 731779) (7 731809) (8 731838) (9 731868) (10 731897)
-          (11 731927))
-    (2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
+  '((2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
           (6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281))
     (2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458)
           (6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636)
@@ -376,7 +364,19 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
           (6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389))
     (2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568)
           (5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744)
-          (11 737774)))
+          (11 737774))
+    (2021 (12 737803) (1 737833) (2 737862) (3 737892) (4 737922) (5 737951)
+          (6 737981) (7 738010) (8 738040) (9 738069) (10 738099) (11 738128))
+    (2022 (12 738158) (1 738187) (2 738217) (3 738246) (4 738276) (5 738305)
+          (6 738335) (7 738365) (8 738394) (9 738424) (10 738453) (11 738483))
+    (2023 (12 738512) (1 738542) (2 738571) (2.5 738601) (3 738630) (4 738659)
+          (5 738689) (6 738719) (7 738748) (8 738778) (9 738808) (10 738837)
+          (11 738867))
+    (2024 (12 738896) (1 738926) (2 738955) (3 738985) (4 739014) (5 739043)
+          (6 739073) (7 739102) (8 739132) (9 739162) (10 739191) (11 739221))
+    (2025 (12 739251) (1 739280) (2 739310) (3 739339) (4 739369) (5 739398)
+          (6 739427) (6.5 739457) (7 739486) (8 739516) (9 739545) (10 739575)
+          (11 739605)))
   "Alist of Chinese year structures as determined by `chinese-year'.
 The default can be nil, but some values are precomputed for efficiency.")
 
index c39a8a700ef206e95c77d14bb6922d57b45e323d..50467fa6e3750e70222cee741ee939f63491d9c8 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-05  Glenn Morris  <rgm@gnu.org>
+
+       * semantic/fw.el (semantic-make-local-hook):
+       Simplify by dropping Emacs <= 20.
+
 2013-07-29  David Engster <deng@randomsample.de>
 
        * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its
index dadf181ce216ad55013791f0ac5341c40d652f45..7850e0462b2a202f2bf222bdac8e9c7f28a98761 100644 (file)
 
 
   (defalias 'semantic-make-local-hook
-    (if (and (not (featurep 'xemacs))
-             (>= emacs-major-version 21))
+    (if (featurep 'emacs)
         #'identity  #'make-local-hook))
 
   (defalias 'semantic-mode-line-update
index 4517e9c65a015d89a88249fa2e8cbce91026cafe..0ce7053c0319bea3707518c3f974e0b75df98478 100644 (file)
@@ -1562,8 +1562,9 @@ or to the last history element for a backward search."
   "Save a function restoring the state of input history search.
 Save `comint-input-ring-index' to the additional state parameter
 in the search status stack."
-  `(lambda (cmd)
-     (comint-history-isearch-pop-state cmd ,comint-input-ring-index)))
+  (let ((index comint-input-ring-index))
+    (lambda (cmd)
+      (comint-history-isearch-pop-state cmd index))))
 
 (defun comint-history-isearch-pop-state (_cmd hist-pos)
   "Restore the input history search state.
index b50c1a5155b63d167dde8d35f73c53526b1eefb0..176440f91bbdfbf02de94ccdc6082257e94cbefa 100644 (file)
@@ -1,4 +1,4 @@
-;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
+;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*- lexical-binding:t -*-
 ;;
 ;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc.
 ;;
@@ -1057,8 +1057,8 @@ the resulting list value now.  Otherwise, add an entry to
       (let ((coding-system-for-read nil))
        (customize-save-variable list-var (eval list-var)))
     (add-hook 'after-init-hook
-             `(lambda ()
-                (customize-push-and-save ',list-var ',elts)))))
+             (lambda ()
+                (customize-push-and-save list-var elts)))))
 
 ;;;###autoload
 (defun customize ()
@@ -1415,6 +1415,7 @@ suggest to customize that face, if it's customizable."
                            "*Customize Saved*"))))
 
 (declare-function apropos-parse-pattern "apropos" (pattern))
+(defvar apropos-regexp)
 
 ;;;###autoload
 (defun customize-apropos (pattern &optional type)
@@ -1431,23 +1432,23 @@ If TYPE is `groups', include only groups."
   (require 'apropos)
   (unless (memq type '(nil options faces groups))
     (error "Invalid setting type %s" (symbol-name type)))
-  (apropos-parse-pattern pattern)
+  (apropos-parse-pattern pattern)    ;Sets apropos-regexp by side-effect: Yuck!
   (let (found)
     (mapatoms
-     `(lambda (symbol)
-       (when (string-match-p apropos-regexp (symbol-name symbol))
-         ,(if (memq type '(nil groups))
-              '(if (get symbol 'custom-group)
-                   (push (list symbol 'custom-group) found)))
-         ,(if (memq type '(nil faces))
-              '(if (custom-facep symbol)
-                   (push (list symbol 'custom-face) found)))
-         ,(if (memq type '(nil options))
-              `(if (and (boundp symbol)
-                        (eq (indirect-variable symbol) symbol)
-                        (or (get symbol 'saved-value)
-                            (custom-variable-p symbol)))
-                   (push (list symbol 'custom-variable) found))))))
+     (lambda (symbol)
+       (when (string-match-p apropos-regexp (symbol-name symbol))
+         (if (memq type '(nil groups))
+             (if (get symbol 'custom-group)
+                 (push (list symbol 'custom-group) found)))
+         (if (memq type '(nil faces))
+             (if (custom-facep symbol)
+                 (push (list symbol 'custom-face) found)))
+         (if (memq type '(nil options))
+             (if (and (boundp symbol)
+                      (eq (indirect-variable symbol) symbol)
+                      (or (get symbol 'saved-value)
+                          (custom-variable-p symbol)))
+                 (push (list symbol 'custom-variable) found))))))
     (unless found
       (error "No customizable %s matching %s" (symbol-name type) pattern))
     (custom-buffer-create
@@ -1621,8 +1622,8 @@ or a regular expression.")
              (widget-create
               'editable-field
               :size 40 :help-echo echo
-              :action `(lambda (widget &optional event)
-                         (customize-apropos (split-string (widget-value widget)))))))
+              :action (lambda (widget &optional _event)
+                         (customize-apropos (split-string (widget-value widget)))))))
        (widget-insert " ")
        (widget-create-child-and-convert
         search-widget 'push-button
index 774ee92a1460564e00c5c3e04d2c205f3cf3126c..134dbdfb33b9fc32b82def33146966968f3dc20d 100644 (file)
@@ -1,4 +1,4 @@
-;;; descr-text.el --- describe text mode
+;;; descr-text.el --- describe text mode  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc.
 
@@ -23,7 +23,7 @@
 
 ;;; Commentary:
 
-;;; Describe-Text Mode.
+;; Describe-Text Mode.
 
 ;;; Code:
 
@@ -36,8 +36,7 @@
   "Insert text to describe WIDGET in the current buffer."
   (insert-text-button
    (symbol-name (if (symbolp widget) widget (car widget)))
-   'action `(lambda (&rest ignore)
-             (widget-browse ',widget))
+   'action (lambda (&rest _ignore) (widget-browse widget))
    'help-echo "mouse-2, RET: browse this widget")
   (insert " ")
   (insert-text-button
             (<= (length pp) (- (window-width) (current-column))))
        (insert pp)
       (insert-text-button
-       "[Show]" 'action `(lambda (&rest ignore)
-                          (with-output-to-temp-buffer
-                              "*Pp Eval Output*"
-                            (princ ',pp)))
+       "[Show]" 'action (lambda (&rest _ignore)
+                          (with-output-to-temp-buffer
+                              "*Pp Eval Output*"
+                            (princ pp)))
        'help-echo "mouse-2, RET: pretty print value in another buffer"))))
 
 (defun describe-property-list (properties)
@@ -81,8 +80,8 @@ into help buttons that call `describe-text-category' or
       (cond ((eq key 'category)
             (insert-text-button
              (symbol-name value)
-             'action `(lambda (&rest ignore)
-                        (describe-text-category ',value))
+             'action (lambda (&rest _ignore)
+                        (describe-text-category value))
              'follow-link t
              'help-echo "mouse-2, RET: describe this category"))
             ((memq key '(face font-lock-face mouse-face))
@@ -663,7 +662,7 @@ relevant to POS."
                             ((and (< char 32) (not (memq char '(9 10))))
                              'escape-glyph)))))
                   (if face (list (list "hardcoded face"
-                                       `(insert-text-button
+                                       `(insert-text-button ;FIXME: Wrap in lambda!
                                          ,(symbol-name face)
                                          'type 'help-face
                                          'help-args '(,face))))))
index 21b508512d37d8570e9ff7660c505b1ab5e8d86d..66967075e342ac2f95a905bd73a4185e9f287a94 100644 (file)
@@ -1,4 +1,4 @@
-;;; dframe --- dedicate frame support modes
+;;; dframe --- dedicate frame support modes  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
@@ -259,9 +259,15 @@ This buffer will have `dframe-frame-mode' run on it.
 FRAME-NAME is the name of the frame to create.
 LOCAL-MODE-FN is the function used to call this one.
 PARAMETERS are frame parameters to apply to this dframe.
-DELETE-HOOK are hooks to run when deleting a frame.
-POPUP-HOOK are hooks to run before showing a frame.
-CREATE-HOOK are hooks to run after creating a frame."
+DELETE-HOOK is a hook to run when deleting a frame.
+POPUP-HOOK is a hook to run before showing a frame.
+CREATE-HOOK is a hook to run after creating a frame."
+  (let ((conv-hook (lambda (val)
+                     (let ((sym (make-symbol "hook")))
+                       (set sym val) sym))))
+    (if (consp delete-hook) (setq delete-hook (funcall conv-hook delete-hook)))
+    (if (consp create-hook) (setq create-hook (funcall conv-hook create-hook)))
+    (if (consp popup-hook)  (setq popup-hook  (funcall conv-hook popup-hook))))
   ;; toggle frame on and off.
   (if (not arg) (if (dframe-live-p (symbol-value frame-var))
                    (setq arg -1) (setq arg 1)))
@@ -270,7 +276,7 @@ CREATE-HOOK are hooks to run after creating a frame."
   ;; turn the frame off on neg number
   (if (and (numberp arg) (< arg 0))
       (progn
-       (run-hooks 'delete-hook)
+       (run-hooks delete-hook)
        (if (and (symbol-value frame-var)
                 (frame-live-p (symbol-value frame-var)))
            (progn
@@ -279,7 +285,7 @@ CREATE-HOOK are hooks to run after creating a frame."
        (set frame-var nil))
     ;; Set this as our currently attached frame
     (setq dframe-attached-frame (selected-frame))
-    (run-hooks 'popup-hook)
+    (run-hooks popup-hook)
     ;; Updated the buffer passed in to contain all the hacks needed
     ;; to make it work well in a dedicated window.
     (with-current-buffer (symbol-value buffer-var)
@@ -331,15 +337,15 @@ CREATE-HOOK are hooks to run after creating a frame."
       (setq temp-buffer-show-function 'dframe-temp-buffer-show-function)
       ;; If this buffer is killed, we must make sure that we destroy
       ;; the frame the dedicated window is in.
-      (add-hook 'kill-buffer-hook `(lambda ()
-                                    (let ((skilling (boundp 'skilling)))
-                                      (if skilling
-                                          nil
-                                        (if dframe-controlled
-                                            (progn
-                                              (funcall dframe-controlled -1)
-                                              (setq ,buffer-var nil)
-                                              )))))
+      (add-hook 'kill-buffer-hook (lambda ()
+                                    (let ((skilling (boundp 'skilling)))
+                                      (if skilling
+                                          nil
+                                        (if dframe-controlled
+                                            (progn
+                                              (funcall dframe-controlled -1)
+                                              (set buffer-var nil)
+                                              )))))
                t t)
       )
     ;; Get the frame to work in
@@ -396,7 +402,7 @@ CREATE-HOOK are hooks to run after creating a frame."
          (switch-to-buffer (symbol-value buffer-var))
          (set-window-dedicated-p (selected-window) t))
        ;; Run hooks (like reposition)
-       (run-hooks 'create-hook)
+       (run-hooks create-hook)
        ;; Frame name
        (if (and (or (null window-system) (eq window-system 'pc))
                 (fboundp 'set-frame-name))
@@ -602,7 +608,7 @@ Argument E is the event deleting the frame."
 If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
 frame is selected.  If the FRAME-VAR is active, then select the
 attached frame.  If FRAME-VAR is nil, ACTIVATOR is called to
-created it.  HOOK is an optional argument of hooks to run when
+created it.  HOOK is an optional hook to run when
 selecting FRAME-VAR."
   (interactive)
   (if (eq (selected-frame) (symbol-value frame-var))
@@ -616,7 +622,7 @@ selecting FRAME-VAR."
     )
   (other-frame 0)
   ;; If updates are off, then refresh the frame (they want it now...)
-  (run-hooks 'hook))
+  (run-hooks hook))
 
 
 (defun dframe-close-frame ()
index 0c432593909049f7d8aee1d4ea9f5b96744450c6..c15f3b5b121301b73ccc463acbb047f44250911f 100644 (file)
@@ -1,4 +1,4 @@
-;;; dired-x.el --- extra Dired functionality
+;;; dired-x.el --- extra Dired functionality  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation,
 ;; Inc.
@@ -1185,7 +1185,7 @@ results in
           (setq count (1+ count)
                 start (1+ start)))
         ;; ... and prepend a "../" for each slash found:
-        (dotimes (_n count)
+        (dotimes (_ count)
           (setq name1 (concat "../" name1)))))
     (make-symbolic-link
      (directory-file-name name1)        ; must not link to foo/
@@ -1397,22 +1397,6 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
 ;; Does anyone use this? - lrd 6/29/93.
 ;; Apparently people do use it. - lrd 12/22/97.
 
-(with-no-warnings
-  ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
-  ;; This is unbearably ugly, but not more than having global variables
-  ;; named size, time, name or s, however practical it can be while writing
-  ;; `dired-mark-sexp' predicates.
-  (defvar inode)
-  (defvar s)
-  (defvar mode)
-  (defvar nlink)
-  (defvar uid)
-  (defvar gid)
-  (defvar size)
-  (defvar time)
-  (defvar name)
-  (defvar sym))
-
 (defun dired-mark-sexp (predicate &optional unflag-p)
   "Mark files for which PREDICATE returns non-nil.
 With a prefix arg, unmark or unflag those files instead.
@@ -1475,6 +1459,9 @@ to mark all zero length files."
                   s nil))
           (setq mode (buffer-substring (point) (+ mode-len (point))))
           (forward-char mode-len)
+          ;; Skip any extended attributes marker ("." or "+").
+          (or (looking-at " ")
+              (forward-char 1))
           (setq nlink (read (current-buffer)))
           ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
           (setq uid (buffer-substring (1+ (point))
@@ -1505,7 +1492,17 @@ to mark all zero length files."
                                           (line-end-position))
                       ""))
           t)
-        (eval predicate)))
+        (eval predicate
+              `((inode . ,inode)
+                (s . ,s)
+                (mode . ,mode)
+                (nlink . ,nlink)
+                (uid . ,uid)
+                (gid . ,gid)
+                (size . ,size)
+                (time . ,time)
+                (name . ,name)
+                (sym . ,sym)))))
      (format "'%s file" predicate))))
 
 \f
index f830623a25504934c2f329c8f183d3653d7bb821..345e8d57113b68cfddbb9839072fba7f60766039 100644 (file)
@@ -4352,7 +4352,7 @@ instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c")
+;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\
index 861054e777fbb5aaeeff15599272356211e25212..7996f9a2263a6d1b5eaa930b5866eaca6747f90f 100644 (file)
@@ -3190,7 +3190,7 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation.
 usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
           [DOCSTRING] [INTERACTIVE-FORM]
           BODY...)"
-  (declare (doc-string 3)
+  (declare (doc-string 3) (indent 2)
            (debug (&define name  ;; thing being advised.
                            (name ;; class is [&or "before" "around" "after"
                                  ;;               "activation" "deactivation"]
index 7214501362dc56bd23203dece5a21d6b955ff4b4..9da1a4d1f383c061866727605a224d3c1239ae06 100644 (file)
          ((and for-effect (setq tmp (get fn 'side-effect-free))
                (or byte-compile-delete-errors
                    (eq tmp 'error-free)
-                   ;; Detect the expansion of (pop foo).
-                   ;; There is no need to compile the call to `car' there.
-                   (and (eq fn 'car)
-                        (eq (car-safe (cadr form)) 'prog1)
-                        (let ((var (cadr (cadr form)))
-                              (last (nth 2 (cadr form))))
-                          (and (symbolp var)
-                               (null (nthcdr 3 (cadr form)))
-                               (eq (car-safe last) 'setq)
-                               (eq (cadr last) var)
-                               (eq (car-safe (nth 2 last)) 'cdr)
-                               (eq (cadr (nth 2 last)) var))))
                    (progn
                      (byte-compile-warn "value returned from %s is unused"
                                         (prin1-to-string form))
index c6612024fa6a4ee558dcd6cc42ba0a4a0743ca2e..164cdb129529b7f4f0bee737b7a0f7dab3f35e7f 100644 (file)
@@ -1,7 +1,7 @@
 ;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013
+;;   Free Software Foundation, Inc.
 
 ;; Author: Jamie Zawinski <jwz@lucid.com>
 ;;     Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -1593,14 +1593,14 @@ that already has a `.elc' file."
         (message "Checking %s..." directory)
          (dolist (file (directory-files directory))
            (let ((source (expand-file-name file directory)))
-             (if (and (not (member file '("RCS" "CVS")))
-                      (not (eq ?\. (aref file 0)))
-                      (file-directory-p source)
-                      (not (file-symlink-p source)))
-                 ;; This file is a subdirectory.  Handle them differently.
-                 (when (or (null arg) (eq 0 arg)
-                           (y-or-n-p (concat "Check " source "? ")))
-                   (setq directories (nconc directories (list source))))
+            (if (file-directory-p source)
+                (and (not (member file '("RCS" "CVS")))
+                     (not (eq ?\. (aref file 0)))
+                     (not (file-symlink-p source))
+                     ;; This file is a subdirectory.  Handle them differently.
+                     (or (null arg) (eq 0 arg)
+                         (y-or-n-p (concat "Check " source "? ")))
+                     (setq directories (nconc directories (list source))))
                ;; It is an ordinary file.  Decide whether to compile it.
                (if (and (string-match emacs-lisp-file-regexp source)
                        ;; The next 2 tests avoid compiling lock files
index 70fa71a0da487ebd05ba51746baa0eae5486a39b..c655c2fff84f9ab877dbc0923e24e5c83d124a6c 100644 (file)
@@ -55,7 +55,7 @@
 ;;
 ;; If a variable is mutated (updated by setq), and it is used in a closure
 ;; we wrap its definition with list: (list val) and we also replace
-;; var => (car var) wherever this variable is used, and also
+;; var => (car-safe var) wherever this variable is used, and also
 ;; (setq var value) => (setcar var value) where it is updated.
 ;;
 ;; If defun argument is closure mutable, we letbind it and wrap it's
@@ -211,9 +211,9 @@ Returns a form where all lambdas don't have any free variables."
           ;; If `fv' is a variable that's wrapped in a cons-cell,
           ;; we want to put the cons-cell itself in the closure,
           ;; rather than just a copy of its current content.
-          (`(car ,iexp . ,_)
+          (`(car-safe ,iexp . ,_)
            (push iexp envector)
-           (push `(,fv . (car (internal-get-closed-var ,i))) new-env))
+           (push `(,fv . (car-safe (internal-get-closed-var ,i))) new-env))
           (_
            (push exp envector)
            (push `(,fv . (internal-get-closed-var ,i)) new-env))))
@@ -224,7 +224,7 @@ Returns a form where all lambdas don't have any free variables."
     (dolist (arg args)
       (if (not (member (cons (list arg) parentform) cconv-captured+mutated))
           (if (assq arg new-env) (push `(,arg) new-env))
-        (push `(,arg . (car ,arg)) new-env)
+        (push `(,arg . (car-safe ,arg)) new-env)
         (push `(,arg (list ,arg)) letbind)))
 
     (setq body-new (mapcar (lambda (form)
@@ -254,7 +254,7 @@ ENV is a lexical environment mapping variables to the expression
 used to get its value.  This is used for variables that are copied into
 closures, moved into cons cells, ...
 ENV is a list where each entry takes the shape either:
- (VAR . (car EXP)): VAR has been moved into the car of a cons-cell, and EXP
+ (VAR . (car-safe EXP)): VAR has been moved into the car of a cons-cell, and EXP
     is an expression that evaluates to this cons-cell.
  (VAR . (internal-get-closed-var N)): VAR has been copied into the closure
     environment's Nth slot.
@@ -320,9 +320,9 @@ places where they originally did not directly appear."
                      (push `(,var . (apply-partially ,var . ,fvs)) new-env)
                      (dolist (fv fvs)
                        (cl-pushnew fv new-extend)
-                       (if (and (eq 'car (car-safe (cdr (assq fv env))))
+                       (if (and (eq 'car-safe (car-safe (cdr (assq fv env))))
                                 (not (memq fv funargs)))
-                           (push `(,fv . (car ,fv)) funcbody-env)))
+                           (push `(,fv . (car-safe ,fv)) funcbody-env)))
                      `(function (lambda ,funcvars .
                                   ,(mapcar (lambda (form)
                                              (cconv-convert
@@ -332,7 +332,7 @@ places where they originally did not directly appear."
                   ;; Check if it needs to be turned into a "ref-cell".
                   ((member (cons binder form) cconv-captured+mutated)
                    ;; Declared variable is mutated and captured.
-                   (push `(,var . (car ,var)) new-env)
+                   (push `(,var . (car-safe ,var)) new-env)
                    `(list ,(cconv-convert value env extend)))
 
                   ;; Normal default case.
@@ -448,7 +448,7 @@ places where they originally did not directly appear."
                 (value (cconv-convert (pop forms) env extend)))
            (push (pcase sym-new
                    ((pred symbolp) `(setq ,sym-new ,value))
-                   (`(car ,iexp) `(setcar ,iexp ,value))
+                   (`(car-safe ,iexp) `(setcar ,iexp ,value))
                    ;; This "should never happen", but for variables which are
                    ;; mutated+captured+unused, we may end up trying to `setq'
                    ;; on a closed-over variable, so just drop the setq.
@@ -472,7 +472,7 @@ places where they originally did not directly appear."
                      ,@(mapcar (lambda (fv)
                                  (let ((exp (or (cdr (assq fv env)) fv)))
                                    (pcase exp
-                                     (`(car ,iexp . ,_) iexp)
+                                     (`(car-safe ,iexp . ,_) iexp)
                                      (_ exp))))
                                fvs)
                      ,@(mapcar (lambda (arg)
@@ -552,7 +552,8 @@ FORM is the parent form that binds this var."
       (cond
        ((byte-compile-not-lexical-var-p arg)
         (byte-compile-log-warning
-         (format "Argument %S is not a lexical variable" arg)))
+         (format "Lexical argument shadows the dynamic variable %S"
+                 arg)))
        ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ...
        (t (let ((varstruct (list arg nil nil nil nil)))
             (cl-pushnew arg byte-compile-lexical-variables)
index d9d6658811fa57948728eded156b42195068944c..af7c41d5c4cf41c902f042f87d2a670b2c63a6f4 100644 (file)
@@ -2693,15 +2693,16 @@ macro that returns its `&whole' argument."
 ;;;###autoload
 (defmacro cl-defsubst (name args &rest body)
   "Define NAME as a function.
-Like `defun', except the function is automatically declared `inline',
+Like `defun', except the function is automatically declared `inline' and
+the arguments are immutable.
 ARGLIST allows full Common Lisp conventions, and BODY is implicitly
 surrounded by (cl-block NAME ...).
+The function's arguments should be treated as immutable.
 
 \(fn NAME ARGLIST [DOCSTRING] BODY...)"
   (declare (debug cl-defun) (indent 2))
   (let* ((argns (cl--arglist-args args)) (p argns)
-        (pbody (cons 'progn body))
-        (unsafe (not (cl--safe-expr-p pbody))))
+        (pbody (cons 'progn body)))
     (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p))
     `(progn
        ,(if p nil   ; give up if defaults refer to earlier args
@@ -2717,10 +2718,10 @@ surrounded by (cl-block NAME ...).
               ;; does not pay attention to the argvs (and
               ;; cl-expr-access-order itself is also too naive).
               nil
-              ,(and (memq '&key args) 'cl-whole) ,unsafe ,@argns)))
+              ,(and (memq '&key args) 'cl-whole) nil ,@argns)))
        (cl-defun ,name ,args ,@body))))
 
-(defun cl--defsubst-expand (argns body simple whole unsafe &rest argvs)
+(defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs)
   (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole
     (if (cl--simple-exprs-p argvs) (setq simple t))
     (let* ((substs ())
@@ -2728,7 +2729,7 @@ surrounded by (cl-block NAME ...).
                        (cl-mapcar (lambda (argn argv)
                                     (if (or simple (macroexp-const-p argv))
                                         (progn (push (cons argn argv) substs)
-                                               (and unsafe (list argn argv)))
+                                               nil)
                                       (list argn argv)))
                                   argns argvs))))
       ;; FIXME: `sublis/subst' will happily substitute the symbol
index b8e327625e7fb6ee86d45314f9f317951945696e..750e0709591c6536655d768140c696eb07d615af 100644 (file)
@@ -157,33 +157,32 @@ Functions'."
                                    predicate
                                    flag)))
 
-(defun crm--select-current-element ()
+(defun crm--current-element ()
   "Parse the minibuffer to find the current element.
-Place an overlay on the element, with a `field' property, and return it."
-  (let* ((bob (minibuffer-prompt-end))
-         (start (save-excursion
+Return the element's boundaries as (START . END)."
+  (let ((bob (minibuffer-prompt-end)))
+    (cons (save-excursion
                   (if (re-search-backward crm-separator bob t)
                       (match-end 0)
-                    bob)))
-         (end (save-excursion
+              bob))
+          (save-excursion
                 (if (re-search-forward crm-separator nil t)
                     (match-beginning 0)
-                  (point-max))))
-         (ol (make-overlay start end nil nil t)))
-    (overlay-put ol 'field (make-symbol "crm"))
-    ol))
-
-(defmacro crm--completion-command (command)
-  "Make COMMAND a completion command for `completing-read-multiple'."
-  `(let ((ol (crm--select-current-element)))
-     (unwind-protect
-         ,command
-       (delete-overlay ol))))
+              (point-max))))))
+
+(defmacro crm--completion-command (beg end &rest body)
+  "Run BODY with BEG and END bound to the current element's boundaries."
+  (declare (indent 2) (debug (sexp sexp &rest body)))
+  `(let* ((crm--boundaries (crm--current-element))
+          (,beg (car crm--boundaries))
+          (,end (cdr crm--boundaries)))
+     ,@body))
 
 (defun crm-completion-help ()
   "Display a list of possible completions of the current minibuffer element."
   (interactive)
-  (crm--completion-command (minibuffer-completion-help))
+  (crm--completion-command beg end
+    (minibuffer-completion-help beg end))
   nil)
 
 (defun crm-complete ()
@@ -192,13 +191,18 @@ If no characters can be completed, display a list of possible completions.
 
 Return t if the current element is now a valid match; otherwise return nil."
   (interactive)
-  (crm--completion-command (minibuffer-complete)))
+  (crm--completion-command beg end
+    (completion-in-region beg end
+                          minibuffer-completion-table
+                          minibuffer-completion-predicate)))
 
 (defun crm-complete-word ()
   "Complete the current element at most a single word.
 Like `minibuffer-complete-word' but for `completing-read-multiple'."
   (interactive)
-  (crm--completion-command (minibuffer-complete-word)))
+  (crm--completion-command beg end
+    (completion-in-region--single-word
+     beg end minibuffer-completion-table minibuffer-completion-predicate)))
 
 (defun crm-complete-and-exit ()
   "If all of the minibuffer elements are valid completions then exit.
@@ -211,16 +215,14 @@ This function is modeled after `minibuffer-complete-and-exit'."
     (goto-char (minibuffer-prompt-end))
     (while
         (and doexit
-             (let ((ol (crm--select-current-element)))
-               (goto-char (overlay-end ol))
-               (unwind-protect
-                   (catch 'exit
-                     (minibuffer-complete-and-exit)
-                     ;; This did not throw `exit', so there was a problem.
-                     (setq doexit nil))
-                 (goto-char (overlay-end ol))
-                 (delete-overlay ol))
-               (not (eobp)))
+             (crm--completion-command beg end
+               (let ((end (copy-marker end t)))
+                 (goto-char end)
+                 (setq doexit nil)
+                 (completion-complete-and-exit beg end
+                                               (lambda () (setq doexit t)))
+                 (goto-char end)
+                 (not (eobp))))
              (looking-at crm-separator))
       ;; Skip to the next element.
       (goto-char (match-end 0)))
index 4efbdcb22cbb6fff42640f1670b2e055f02169e4..9b9fd32594115e65ba1510bb57b2baa86b65b8a7 100644 (file)
@@ -185,6 +185,7 @@ expression point is on."
        (add-hook 'post-self-insert-hook prn-info nil t)
       (remove-hook 'post-self-insert-hook prn-info t))))
 
+;; FIXME: This changes Emacs's behavior when the file is loaded!
 (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode)
 
 ;;;###autoload
@@ -487,11 +488,11 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
 (defun eldoc-beginning-of-sexp ()
   (let ((parse-sexp-ignore-comments t)
        (num-skipped-sexps 0))
-    (condition-case err
+    (condition-case _
        (progn
          ;; First account for the case the point is directly over a
          ;; beginning of a nested sexp.
-         (condition-case err
+         (condition-case _
              (let ((p (point)))
                (forward-sexp -1)
                (forward-sexp 1)
@@ -518,7 +519,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
   (let ((defn (and (fboundp fsym)
                    (symbol-function fsym))))
     (and (symbolp defn)
-         (condition-case err
+         (condition-case _
              (setq defn (indirect-function fsym))
            (error (setq defn nil))))
     defn))
index 279ae582a059f97882a4748afd956d88b248de4e..8a5841a5fadff2a23f74afbd2dd6c10ecc9aa9c9 100644 (file)
@@ -102,7 +102,9 @@ DO must return an Elisp expression."
               ;; Follow aliases.
               (setq me (cons (symbol-function head) (cdr place))))
           (if (eq me place)
-              (error "%S is not a valid place expression" place)
+              (if (and (symbolp head) (get head 'setf-method))
+                  (error "Incompatible place needs recompilation: %S" head)
+                (error "%S is not a valid place expression" place))
             (gv-get me do)))))))
 
 ;;;###autoload
index b37a811b8d57477a0a8b03f5dd827f33845c90ac..118916792022ca3d247a2feef41774ef9780f9bf 100644 (file)
@@ -752,6 +752,57 @@ considered."
                      (mapcar #'symbol-name (lisp--local-variables))))))
          lastvars)))))
 
+;; FIXME: Support for Company brings in features which straddle eldoc.
+;; We should consolidate this, so that major modes can provide all that
+;; data all at once:
+;; - a function to extract "the reference at point" (may be more complex
+;;     than a mere string, to distinguish various namespaces).
+;; - a function to jump to such a reference.
+;; - a function to show the signature/interface of such a reference.
+;; - a function to build a help-buffer about that reference.
+;; FIXME: Those functions should also be used by the normal completion code in
+;; the *Completions* buffer.
+
+(defun lisp--company-doc-buffer (str)
+  (let ((symbol (intern-soft str)))
+    ;; FIXME: we really don't want to "display-buffer and then undo it".
+    (save-window-excursion
+      ;; Make sure we don't display it in another frame, otherwise
+      ;; save-window-excursion won't be able to undo it.
+      (let ((display-buffer-overriding-action
+             '(nil . ((inhibit-switch-frame . t)))))
+        (ignore-errors
+          (cond
+           ((fboundp symbol) (describe-function symbol))
+           ((boundp symbol) (describe-variable symbol))
+           ((featurep symbol) (describe-package symbol))
+           ((facep symbol) (describe-face symbol))
+           (t (signal 'user-error nil)))
+          (help-buffer))))))
+
+(defun lisp--company-doc-string (str)
+  (let* ((symbol (intern-soft str))
+         (doc (if (fboundp symbol)
+                  (documentation symbol t)
+                (documentation-property symbol 'variable-documentation t))))
+    (and (stringp doc)
+         (string-match ".*$" doc)
+         (match-string 0 doc))))
+
+(declare-function find-library-name "find-func" (library))
+
+(defun lisp--company-location (str)
+  (let ((sym (intern-soft str)))
+    (cond
+     ((fboundp sym) (find-definition-noselect sym nil))
+     ((boundp sym) (find-definition-noselect sym 'defvar))
+     ((featurep sym)
+      (require 'find-func)
+      (cons (find-file-noselect (find-library-name
+                                 (symbol-name sym)))
+            0))
+     ((facep sym) (find-definition-noselect sym 'defface)))))
+
 (defun lisp-completion-at-point (&optional _predicate)
   "Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
   (with-syntax-table emacs-lisp-mode-syntax-table
@@ -783,7 +834,10 @@ considered."
                            lisp--local-variables-completion-table
                            obarray)       ;Could be anything.
                       :annotation-function
-                      (lambda (str) (if (fboundp (intern-soft str)) " <f>")))
+                      (lambda (str) (if (fboundp (intern-soft str)) " <f>"))
+                      :company-doc-buffer #'lisp--company-doc-buffer
+                      :company-docsig #'lisp--company-doc-string
+                      :company-location #'lisp--company-location)
               ;; Looks like a funcall position.  Let's double check.
               (save-excursion
                 (goto-char (1- beg))
@@ -800,10 +854,12 @@ considered."
                     ;; we should use something like a symbol-property.
                     (`declare
                      (list t (mapcar (lambda (x) (symbol-name (car x)))
-                                   (delete-dups
-                                    (append
-                                     macro-declarations-alist
-                                     defun-declarations-alist)))))
+                                     (delete-dups
+                                      ;; FIXME: We should include some
+                                      ;; docstring with each entry.
+                                      (append
+                                       macro-declarations-alist
+                                       defun-declarations-alist)))))
                     ((and (or `condition-case `condition-case-unless-debug)
                           (guard (save-excursion
                                    (ignore-errors
@@ -811,7 +867,12 @@ considered."
                                      (< (point) beg)))))
                      (list t obarray
                            :predicate (lambda (sym) (get sym 'error-conditions))))
-                    (_ (list nil obarray #'fboundp))))))))
+                    (_ (list nil obarray
+                             :predicate #'fboundp
+                             :company-doc-buffer #'lisp--company-doc-buffer
+                             :company-docsig #'lisp--company-doc-string
+                             :company-location #'lisp--company-location
+                             ))))))))
       (when end
         (let ((tail (if (null (car table-etc))
                         (cdr table-etc)
index 0085074e5beaa5d10c18b9e1be057fdad455b416..7799ee23d62f38a1d4f6693b911ccfd44bdd7480 100644 (file)
@@ -457,19 +457,27 @@ Return the max version (as a string) if the package is held at a lower version."
 
 (defun package-activate-1 (pkg-desc)
   (let* ((name (package-desc-name pkg-desc))
-        (pkg-dir (package-desc-dir pkg-desc)))
+        (pkg-dir (package-desc-dir pkg-desc))
+         (pkg-dir-dir (file-name-as-directory pkg-dir)))
     (unless pkg-dir
       (error "Internal error: unable to find directory for `%s'"
             (package-desc-full-name pkg-desc)))
+    ;; Add to load path, add autoloads, and activate the package.
+    (let ((old-lp load-path))
+      (with-demoted-errors
+        (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t))
+      (when (and (eq old-lp load-path)
+                 (not (or (member pkg-dir load-path)
+                          (member pkg-dir-dir load-path))))
+        ;; Old packages don't add themselves to the `load-path', so we have to
+        ;; do it ourselves.
+        (push pkg-dir load-path)))
     ;; Add info node.
     (when (file-exists-p (expand-file-name "dir" pkg-dir))
       ;; FIXME: not the friendliest, but simple.
       (require 'info)
       (info-initialize)
       (push pkg-dir Info-directory-list))
-    ;; Add to load path, add autoloads, and activate the package.
-    (push pkg-dir load-path)
-    (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)
     (push name package-activated-list)
     ;; Don't return nil.
     t))
index a99fb9230e14ccffe77bb81b72e8f9d39228841e..1b06e6ca3bfcfb9d0739f8cc4b23a1f6f85d0a69 100644 (file)
@@ -268,62 +268,40 @@ You should bind this variable with `let', but do not set it globally.")
          (epg-sub-key-id (car (epg-key-sub-key-list
                                (widget-get widget :value))))))
 
-(eval-and-compile
-  (if (fboundp 'encode-coding-string)
-      (defalias 'epa--encode-coding-string 'encode-coding-string)
-    (defalias 'epa--encode-coding-string 'identity)))
+(defalias 'epa--encode-coding-string
+  (if (fboundp 'encode-coding-string) #'encode-coding-string #'identity))
 
-(eval-and-compile
-  (if (fboundp 'decode-coding-string)
-      (defalias 'epa--decode-coding-string 'decode-coding-string)
-    (defalias 'epa--decode-coding-string 'identity)))
+(defalias 'epa--decode-coding-string
+  (if (fboundp 'decode-coding-string) #'decode-coding-string #'identity))
 
-(defun epa-key-list-mode ()
+(define-derived-mode epa-key-list-mode special-mode "Keys"
   "Major mode for `epa-list-keys'."
-  (kill-all-local-variables)
   (buffer-disable-undo)
-  (setq major-mode 'epa-key-list-mode
-       mode-name "Keys"
-       truncate-lines t
+  (setq truncate-lines t
        buffer-read-only t)
-  (use-local-map epa-key-list-mode-map)
-  (make-local-variable 'font-lock-defaults)
-  (setq font-lock-defaults '(epa-font-lock-keywords t))
+  (setq-local font-lock-defaults '(epa-font-lock-keywords t))
   ;; In XEmacs, auto-initialization of font-lock is not effective
   ;; if buffer-file-name is not set.
   (font-lock-set-defaults)
   (make-local-variable 'epa-exit-buffer-function)
-  (make-local-variable 'revert-buffer-function)
-  (setq revert-buffer-function 'epa--key-list-revert-buffer)
-  (run-mode-hooks 'epa-key-list-mode-hook))
+  (setq-local revert-buffer-function #'epa--key-list-revert-buffer))
 
-(defun epa-key-mode ()
+(define-derived-mode epa-key-mode special-mode "Key"
   "Major mode for a key description."
-  (kill-all-local-variables)
   (buffer-disable-undo)
-  (setq major-mode 'epa-key-mode
-       mode-name "Key"
-       truncate-lines t
+  (setq truncate-lines t
        buffer-read-only t)
-  (use-local-map epa-key-mode-map)
-  (make-local-variable 'font-lock-defaults)
-  (setq font-lock-defaults '(epa-font-lock-keywords t))
+  (setq-local font-lock-defaults '(epa-font-lock-keywords t))
   ;; In XEmacs, auto-initialization of font-lock is not effective
   ;; if buffer-file-name is not set.
   (font-lock-set-defaults)
-  (make-local-variable 'epa-exit-buffer-function)
-  (run-mode-hooks 'epa-key-mode-hook))
+  (make-local-variable 'epa-exit-buffer-function))
 
-(defun epa-info-mode ()
+(define-derived-mode epa-info-mode special-mode "Info"
   "Major mode for `epa-info-buffer'."
-  (kill-all-local-variables)
   (buffer-disable-undo)
-  (setq major-mode 'epa-info-mode
-       mode-name "Info"
-       truncate-lines t
-       buffer-read-only t)
-  (use-local-map epa-info-mode-map)
-  (run-mode-hooks 'epa-info-mode-hook))
+  (setq truncate-lines t
+       buffer-read-only t))
 
 (defun epa-mark-key (&optional arg)
   "Mark a key on the current line.
@@ -951,10 +929,10 @@ See the reason described in the `epa-verify-region' documentation."
            (error "No cleartext tail"))
          (epa-verify-region cleartext-start cleartext-end))))))
 
-(eval-and-compile
+(defalias 'epa--select-safe-coding-system
   (if (fboundp 'select-safe-coding-system)
-      (defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
-    (defun epa--select-safe-coding-system (_from _to)
+      #'select-safe-coding-system
+    (lambda (_from _to)
       buffer-file-coding-system)))
 
 ;;;###autoload
@@ -1026,16 +1004,16 @@ If no one is selected, default secret key is used.  "
                                 'start-open t
                                 'end-open t)))))
 
-(eval-and-compile
+(defalias 'epa--derived-mode-p
   (if (fboundp 'derived-mode-p)
-      (defalias 'epa--derived-mode-p 'derived-mode-p)
-    (defun epa--derived-mode-p (&rest modes)
+      #'derived-mode-p
+    (lambda (&rest modes)
       "Non-nil if the current major mode is derived from one of MODES.
 Uses the `derived-mode-parent' property of the symbol to trace backwards."
       (let ((parent major-mode))
-       (while (and (not (memq parent modes))
-                   (setq parent (get parent 'derived-mode-parent))))
-       parent))))
+        (while (and (not (memq parent modes))
+                    (setq parent (get parent 'derived-mode-parent))))
+        parent))))
 
 ;;;###autoload
 (defun epa-encrypt-region (start end recipients sign signers)
@@ -1138,6 +1116,7 @@ If no one is selected, symmetric encryption will be performed.  ")
     (if (epg-context-result-for context 'import)
        (epa-display-info (epg-import-result-to-string
                           (epg-context-result-for context 'import))))
+    ;; FIXME: Why not use the (otherwise unused) epa--derived-mode-p?
     (if (eq major-mode 'epa-key-list-mode)
        (apply #'epa--list-keys epa-list-keys-arguments))))
 
index 33c0443dd91d07a828bbe27da5b8a74aa9edbf22..c733a273988db2a90ad4d490db3366d504f45e23 100644 (file)
@@ -1278,37 +1278,34 @@ This function is for internal use only."
 
 (defun epg--process-filter (process input)
   (if epg-debug
-      (save-excursion
-       (unless epg-debug-buffer
-         (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
-       (set-buffer epg-debug-buffer)
+      (with-current-buffer
+          (or epg-debug-buffer
+              (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
        (goto-char (point-max))
        (insert input)))
   (if (buffer-live-p (process-buffer process))
       (with-current-buffer (process-buffer process)
-       (goto-char (point-max))
-       (insert input)
-       (unless epg-process-filter-running
-         (unwind-protect
-             (progn
-               (setq epg-process-filter-running t)
-               (goto-char epg-read-point)
-               (beginning-of-line)
-               (while (looking-at ".*\n") ;the input line finished
-                 (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
-                     (let* ((status (match-string 1))
-                            (string (match-string 2))
-                            (symbol (intern-soft (concat "epg--status-"
-                                                         status))))
-                       (if (member status epg-pending-status-list)
-                           (setq epg-pending-status-list nil))
-                       (if (and symbol
-                                (fboundp symbol))
-                           (funcall symbol epg-context string))
-                       (setq epg-last-status (cons status string))))
-                 (forward-line)
-                 (setq epg-read-point (point))))
-           (setq epg-process-filter-running nil))))))
+        (save-excursion
+          (goto-char (point-max))
+          (insert input)
+          (unless epg-process-filter-running
+            (let ((epg-process-filter-running t))
+              (goto-char epg-read-point)
+              (beginning-of-line)
+              (while (looking-at ".*\n") ;the input line finished
+                (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
+                    (let* ((status (match-string 1))
+                           (string (match-string 2))
+                           (symbol (intern-soft (concat "epg--status-"
+                                                        status))))
+                      (if (member status epg-pending-status-list)
+                          (setq epg-pending-status-list nil))
+                      (if (and symbol
+                               (fboundp symbol))
+                          (funcall symbol epg-context string))
+                      (setq epg-last-status (cons status string))))
+                (forward-line)
+                (setq epg-read-point (point)))))))))
 
 (defun epg-read-output (context)
   "Read the output file CONTEXT and return the content as a string."
@@ -2418,9 +2415,8 @@ If you are unsure, use synchronous version of this function
                         (list "--" (epg-data-file plain)))))
   ;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
   (unless (eq (epg-context-protocol context) 'CMS)
-    (if sign
-       (epg-wait-for-status context '("BEGIN_SIGNING"))
-      (epg-wait-for-status context '("BEGIN_ENCRYPTION"))))
+    (epg-wait-for-status context
+                         (if sign '("BEGIN_SIGNING") '("BEGIN_ENCRYPTION"))))
   (when (epg-data-string plain)
     (if (eq (process-status (epg-context-process context)) 'run)
        (process-send-string (epg-context-process context)
index f9ff3c936bd13e12439580dda25a02931bbf8f33..2315448c549f7df4af1df6b0281e900f48bdfeb9 100644 (file)
@@ -2447,48 +2447,43 @@ and `magic-mode-alist', which determines modes based on file contents.")
   (mapcar
    (lambda (l)
      (cons (purecopy (car l)) (cdr l)))
-   '(("perl" . perl-mode)
-     ("perl5" . perl-mode)
-     ("miniperl" . perl-mode)
-     ("wish" . tcl-mode)
-     ("wishx" . tcl-mode)
-     ("tcl" . tcl-mode)
-     ("tclsh" . tcl-mode)
-     ("expect" . tcl-mode)
-     ("scm" . scheme-mode)
-     ("ash" . sh-mode)
-     ("bash" . sh-mode)
-     ("bash2" . sh-mode)
-     ("csh" . sh-mode)
-     ("dtksh" . sh-mode)
-     ("es" . sh-mode)
-     ("itcsh" . sh-mode)
-     ("jsh" . sh-mode)
-     ("ksh" . sh-mode)
-     ("oash" . sh-mode)
-     ("pdksh" . sh-mode)
-     ("rbash" . sh-mode)
-     ("rc" . sh-mode)
-     ("rpm" . sh-mode)
-     ("sh" . sh-mode)
-     ("sh5" . sh-mode)
-     ("tcsh" . sh-mode)
-     ("wksh" . sh-mode)
-     ("wsh" . sh-mode)
-     ("zsh" . sh-mode)
-     ("tail" . text-mode)
-     ("more" . text-mode)
-     ("less" . text-mode)
-     ("pg" . text-mode)
-     ("make" . makefile-gmake-mode)            ; Debian uses this
-     ("guile" . scheme-mode)
-     ("clisp" . lisp-mode)
-     ("emacs" . emacs-lisp-mode)))
+   '(("\\`\\(mini\\)?perl5?\\'" . perl-mode)
+     ("\\`wishx?\\'" . tcl-mode)
+     ("\\`tcl\\(sh\\)?\\'" . tcl-mode)
+     ("\\`expect\\'" . tcl-mode)
+     ("\\`scm\\'" . scheme-mode)
+     ("\\`[acjkwz]sh\\'" . sh-mode)
+     ("\\`bash2?\\'" . sh-mode)
+     ("\\`dtksh\\'" . sh-mode)
+     ("\\`es\\'" . sh-mode)
+     ("\\`itcsh\\'" . sh-mode)
+     ("\\`oash\\'" . sh-mode)
+     ("\\`pdksh\\'" . sh-mode)
+     ("\\`rbash\\'" . sh-mode)
+     ("\\`rc\\'" . sh-mode)
+     ("\\`rpm\\'" . sh-mode)
+     ("\\`sh5?\\'" . sh-mode)
+     ("\\`tcsh\\'" . sh-mode)
+     ("\\`wksh\\'" . sh-mode)
+     ("\\`tail\\'" . text-mode)
+     ("\\`more\\'" . text-mode)
+     ("\\`less\\'" . text-mode)
+     ("\\`pg\\'" . text-mode)
+     ("\\`make\\'" . makefile-gmake-mode)              ; Debian uses this
+     ("\\`guile\\'" . scheme-mode)
+     ("\\`clisp\\'" . lisp-mode)
+     ("\\`emacs\\'" . emacs-lisp-mode)))
   "Alist mapping interpreter names to major modes.
 This is used for files whose first lines match `auto-mode-interpreter-regexp'.
-Each element looks like (INTERPRETER . MODE).
-If INTERPRETER matches the name of the interpreter specified in the first line
-of a script, mode MODE is enabled.
+Each element looks like (REGEXP . MODE).
+If REGEXP matches the name (minus any directory part) of the interpreter
+specified in the first line of a script, enable major mode MODE.
+
+Emacs versions earlier than 24.4 treat the car of each element as a
+literal string that must match the entire name, rather than a regexp.
+For backwards compatibility, any REGEXP that does not begin with \"\\\\\"
+continues to be treated in this way.  This behavior may be removed in
+future and should not be relied upon.
 
 See also `auto-mode-alist'.")
 
@@ -2683,19 +2678,27 @@ we don't actually set it to the same mode the buffer already has."
     ;; If we didn't, look for an interpreter specified in the first line.
     ;; As a special case, allow for things like "#!/bin/env perl", which
     ;; finds the interpreter anywhere in $PATH.
-    (unless done
-      (setq mode (save-excursion
-                  (goto-char (point-min))
-                  (if (looking-at auto-mode-interpreter-regexp)
-                      (match-string 2)
-                    ""))
-           ;; Map interpreter name to a mode, signaling we're done at the
-           ;; same time.
-           done (assoc (file-name-nondirectory mode)
-                       interpreter-mode-alist))
-      ;; If we found an interpreter mode to use, invoke it now.
-      (if done
-         (set-auto-mode-0 (cdr done) keep-mode-if-same)))
+    (and (not done)
+        (setq mode (save-excursion
+                     (goto-char (point-min))
+                     (if (looking-at auto-mode-interpreter-regexp)
+                         (match-string 2))))
+        ;; Map interpreter name to a mode, signaling we're done at the
+        ;; same time.
+        (setq done (assoc-default
+                    (file-name-nondirectory mode)
+                    ;; Backwards compat: if car of i-m-alist does not start
+                    ;; with "\\", treat as literal string.
+                    (mapcar (lambda (e)
+                              (if (string-match-p "\\`\\\\" (car e))
+                                  e
+                                (cons
+                                 (format "\\`%s\\'" (regexp-quote (car e)))
+                                 (cdr e))))
+                            interpreter-mode-alist)
+                    #'string-match-p))
+        ;; If we found an interpreter mode to use, invoke it now.
+        (set-auto-mode-0 done keep-mode-if-same))
     ;; Next try matching the buffer beginning against magic-mode-alist.
     (unless done
       (if (setq done (save-excursion
index e07c6a241ab7e777f5d1f8daef1004553aecae74..c06c01c2c976b13da4801f9624c9c99bcb5e20eb 100644 (file)
@@ -225,8 +225,8 @@ from; the default is `load-path'."
              (lambda (a b) (string< (symbol-name (car a))
                                     (symbol-name (car b))))))
 
-  (save-excursion
-    (find-file generated-finder-keywords-file)
+  (with-current-buffer
+      (find-file-noselect generated-finder-keywords-file)
     (setq buffer-undo-list t)
     (erase-buffer)
     (insert (autoload-rubric generated-finder-keywords-file
index 79394bd305beabcf8eef219f4b3dd51138d1d38a..3668f24ba01a6464ff763621182d602caa588df4 100644 (file)
@@ -872,8 +872,11 @@ If there is no frame by that name, signal an error."
   "The brightness of the background.
 Set this to the symbol `dark' if your background color is dark,
 `light' if your background is light, or nil (automatic by default)
-if you want Emacs to examine the brightness for you.  Don't set this
-variable with `setq'; this won't have the expected effect."
+if you want Emacs to examine the brightness for you.
+
+If you change this without using customize, you should use
+`frame-set-background-mode' to update existing frames;
+e.g. (mapc 'frame-set-background-mode (frame-list))."
   :group 'faces
   :set #'(lambda (var value)
           (set-default var value)
index c964b53952e48373a6dcda555d23f68a5fc1625b..e722333d49b37afac201c601d402eee171a71fd1 100644 (file)
@@ -1283,18 +1283,22 @@ like an INI file.  You can add this hook to `find-file-hook'."
     "WIN32SMINOR")
   "Function argument constants used in InstallShield 3 and 5."))
 
-(defvar rul-generic-mode-syntax-table nil
+;; c++-mode-syntax-table used to be autoloaded, with an initial nil value.
+;; This file did not load cc-mode, and therefore rul-generic-mode-syntax-table
+;; would have different values according to whether or not cc-mode
+;; happened to be loaded before this file was.
+(require 'cc-mode)
+(defvar c++-mode-syntax-table)
+
+(defvar rul-generic-mode-syntax-table
+  (let ((table (make-syntax-table c++-mode-syntax-table)))
+    (modify-syntax-entry ?\r "> b" table)
+    (modify-syntax-entry ?\n "> b" table)
+    (modify-syntax-entry ?/  ". 124b" table)
+    (modify-syntax-entry ?*  ". 23" table)
+    table)
   "Syntax table to use in `rul-generic-mode' buffers.")
 
-(setq rul-generic-mode-syntax-table
-      (make-syntax-table c++-mode-syntax-table))
-
-(modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
-
-(modify-syntax-entry ?/  ". 124b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?*  ". 23"   rul-generic-mode-syntax-table)
-
 ;; here manually instead
 (defun generic-rul-mode-setup-function ()
   (make-local-variable 'parse-sexp-ignore-comments)
index 950b73666e2d1f35ff2a0adbdb1f928f4522c305..c75588536a4715455928963fe198113646c9de91 100644 (file)
@@ -1,3 +1,7 @@
+2013-08-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
+
 2013-08-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
index dbbf0befe608dacc3ed15db26cc555273731f39e..28d930b55f7f57e950f9dead989c384021382a76 100644 (file)
@@ -607,19 +607,19 @@ files left at the next time."
                    (split-string (buffer-string) "\n" t))))
         fails)
     (dolist (temp (append cache mm-temp-files-to-be-deleted))
-      (unless (and (file-exists-p temp)
-                  (if (file-directory-p temp)
-                      ;; A parent directory left at the previous time.
+      (when (and (file-exists-p temp)
+                (if (file-directory-p temp)
+                    ;; A parent directory left at the previous time.
+                    (progn
+                      (ignore-errors (delete-directory temp))
+                      (file-exists-p temp))
+                  ;; Delete a temporary file and its parent directory.
+                  (ignore-errors (delete-file temp))
+                  (or (file-exists-p temp)
                       (progn
+                        (setq temp (file-name-directory temp))
                         (ignore-errors (delete-directory temp))
-                        (not (file-exists-p temp)))
-                    ;; Delete a temporary file and its parent directory.
-                    (ignore-errors (delete-file temp))
-                    (and (not (file-exists-p temp))
-                         (progn
-                           (setq temp (file-name-directory temp))
-                           (ignore-errors (delete-directory temp))
-                           (not (file-exists-p temp))))))
+                        (file-exists-p temp)))))
        (push temp fails)))
     (if fails
        ;; Schedule the deletion of the files left at the next time.
index 104e33638313e78804c5b9ce93644b80d0d65f01..9aec829cd974974f225bb9f33f312c72533a4775 100644 (file)
@@ -158,11 +158,13 @@ minibuffer completion.")
 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
 
 ;;;_  = icomplete-with-completion-tables
-(defvar icomplete-with-completion-tables '(internal-complete-buffer)
+(defcustom icomplete-with-completion-tables t
   "Specialized completion tables with which icomplete should operate.
 
 Icomplete does not operate with any specialized completion tables
-except those on this list.")
+except those on this list."
+  :type '(choice (const :tag "All" t)
+          (repeat function)))
 
 (defvar icomplete-minibuffer-map
   (let ((map (make-sparse-keymap)))
@@ -177,24 +179,28 @@ except those on this list.")
 Second entry becomes the first and can be selected with
 `minibuffer-force-complete-and-exit'."
   (interactive)
-  (let* ((comps (completion-all-sorted-completions))
+  (let* ((beg (minibuffer-prompt-end))
+         (end (point-max))
+         (comps (completion-all-sorted-completions beg end))
         (last (last comps)))
     (when comps
       (setcdr last (cons (car comps) (cdr last)))
-      (completion--cache-all-sorted-completions (cdr comps)))))
+      (completion--cache-all-sorted-completions beg end (cdr comps)))))
 
 (defun icomplete-backward-completions ()
   "Step backward completions by one entry.
 Last entry becomes the first and can be selected with
 `minibuffer-force-complete-and-exit'."
   (interactive)
-  (let* ((comps (completion-all-sorted-completions))
+  (let* ((beg (minibuffer-prompt-end))
+         (end (point-max))
+         (comps (completion-all-sorted-completions beg end))
         (last-but-one (last comps 2))
         (last (cdr last-but-one)))
     (when (consp last)               ; At least two elements in comps
       (setcdr last-but-one (cdr last))
       (push (car last) comps)
-      (completion--cache-all-sorted-completions comps))))
+      (completion--cache-all-sorted-completions beg end comps))))
 
 ;;;_ > icomplete-mode (&optional prefix)
 ;;;###autoload
@@ -263,7 +269,8 @@ and `minibuffer-setup-hook'."
   "Insert icomplete completions display.
 Should be run via minibuffer `post-command-hook'.  See `icomplete-mode'
 and `minibuffer-setup-hook'."
-  (when (and icomplete-mode (icomplete-simple-completing-p))
+  (when (and icomplete-mode
+             (icomplete-simple-completing-p)) ;Shouldn't be necessary.
     (save-excursion
       (goto-char (point-max))
                                         ; Insert the match-status information:
@@ -319,7 +326,8 @@ matches exist.  \(Keybindings for uniquely matched commands
 are exhibited within the square braces.)"
 
   (let* ((md (completion--field-metadata (field-beginning)))
-        (comps (completion-all-sorted-completions))
+        (comps (completion-all-sorted-completions
+                 (minibuffer-prompt-end) (point-max)))
          (last (if (consp comps) (last comps)))
          (base-size (cdr last))
          (open-bracket (if require-match "(" "["))
index 182ad8563aaa62223641dc2e33fa1e7826b2a286..65cd7eddcfd06dc85bb637cf13928c759fd6ce38 100644 (file)
@@ -1595,17 +1595,20 @@ escaped (\\\",\\\\)."
                                    ""))
                      (image (if (file-exists-p image-file)
                                 (create-image image-file)
-                              "[broken image]")))
+                              (or (cdr (assoc-string "text" parameter-alist))
+                                 (and src (concat "[broken image:" src "]"))
+                                 "[broken image]"))))
                 (if (not (get-text-property start 'display))
                     (add-text-properties
-                     start (point) `(display ,image rear-nonsticky (display)))))
+                     start (point)
+                    `(display ,image rear-nonsticky (display)
+                      help-echo ,(cdr (assoc-string "alt" parameter-alist))))))
             ;; text-only display, show alternative text if provided, or
             ;; otherwise a clue that there's meant to be a picture
             (delete-region start (point))
             (insert (or (cdr (assoc-string "text" parameter-alist))
                         (cdr (assoc-string "alt" parameter-alist))
-                        (and src
-                             (concat "[image:" src "]"))
+                        (and src (concat "[image:" src "]"))
                         "[image]"))))))
     (set-buffer-modified-p nil)))
 
index ce6256c1e47afd6f7bc638220a1e6a87a9fbf13a..ab83ff0034a76abc7b017e4c0774d1078de3ca42 100644 (file)
@@ -792,7 +792,7 @@ with L, LRE, or LRO Unicode bidi character type.")
   ;; Combining diacritics
   (modify-category-entry '(#x300 . #x362) ?^)
   ;; Combining marks
-  (modify-category-entry '(#x20d0 . #x20e3) ?^)
+  (modify-category-entry '(#x20d0 . #x20ff) ?^)
 
   ;; Fixme: syntax for symbols &c
   )
index 34b1576d23e2ac3c90d69b2b6ef99ba146eb0e04..588460b657b531a8681969945cf524f155250972 100644 (file)
@@ -30,6 +30,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
 (defvar dos-codepage)
 (autoload 'widget-value "wid-edit")
 
@@ -548,7 +550,7 @@ Emacs, but is unlikely to be what you really want now."
                                     (coding-system-charset-list cs)))
                   (charsets charsets))
               (if (coding-system-get cs :ascii-compatible-p)
-                  (add-to-list 'cs-charsets 'ascii))
+                  (cl-pushnew 'ascii cs-charsets))
               (if (catch 'ok
                     (when cs-charsets
                       (while charsets
@@ -636,6 +638,36 @@ The meaning is the same as the argument ACCEPT-DEFAULT-P of the
 function `select-safe-coding-system' (which see).  This variable
 overrides that argument.")
 
+(defun sanitize-coding-system-list (codings)
+  "Return a list of coding systems presumably more user-friendly than CODINGS."
+  ;; Change each safe coding system to the corresponding
+  ;; mime-charset name if it is also a coding system.  Such a name
+  ;; is more friendly to users.
+  (setq codings
+        (mapcar (lambda (cs)
+                  (let ((mime-charset (coding-system-get cs 'mime-charset)))
+                    (if (and mime-charset (coding-system-p mime-charset)
+                             (coding-system-equal cs mime-charset))
+                        mime-charset cs)))
+                codings))
+
+  ;; Don't offer variations with locking shift, which you
+  ;; basically never want.
+  (let (l)
+    (dolist (elt codings (setq codings (nreverse l)))
+      (unless (or (eq 'coding-category-iso-7-else
+                     (coding-system-category elt))
+                 (eq 'coding-category-iso-8-else
+                     (coding-system-category elt)))
+       (push elt l))))
+
+  ;; Remove raw-text, emacs-mule and no-conversion unless nothing
+  ;; else is available.
+  (or (delq 'raw-text
+            (delq 'emacs-mule
+                  (delq 'no-conversion (copy-sequence codings))))
+      codings))
+
 (defun select-safe-coding-system-interactively (from to codings unsafe
                                                &optional rejected default)
   "Select interactively a coding system for the region FROM ... TO.
@@ -667,35 +699,7 @@ DEFAULT is the coding system to use by default in the query."
                                         from to coding 11)))))
                    unsafe)))
 
-  ;; Change each safe coding system to the corresponding
-  ;; mime-charset name if it is also a coding system.  Such a name
-  ;; is more friendly to users.
-  (let ((l codings)
-       mime-charset)
-    (while l
-      (setq mime-charset (coding-system-get (car l) :mime-charset))
-      (if (and mime-charset (coding-system-p mime-charset)
-              (coding-system-equal (car l) mime-charset))
-         (setcar l mime-charset))
-      (setq l (cdr l))))
-
-  ;; Don't offer variations with locking shift, which you
-  ;; basically never want.
-  (let (l)
-    (dolist (elt codings (setq codings (nreverse l)))
-      (unless (or (eq 'coding-category-iso-7-else
-                     (coding-system-category elt))
-                 (eq 'coding-category-iso-8-else
-                     (coding-system-category elt)))
-       (push elt l))))
-
-  ;; Remove raw-text, emacs-mule and no-conversion unless nothing
-  ;; else is available.
-  (setq codings
-       (or (delq 'raw-text
-                 (delq 'emacs-mule
-                       (delq 'no-conversion codings)))
-           '(raw-text emacs-mule no-conversion)))
+  (setq codings (sanitize-coding-system-list codings))
 
   (let ((window-configuration (current-window-configuration))
        (bufname (buffer-name))
@@ -1421,7 +1425,9 @@ The return value is a string."
         ;; buffer local.
         (input-method (completing-read prompt input-method-alist
                                        nil t nil 'input-method-history
-                                       default)))
+                                       (if (and default (symbolp default))
+                                            (symbol-name default)
+                                          default))))
     (if (and input-method (symbolp input-method))
        (setq input-method (symbol-name input-method)))
     (if (> (length input-method) 0)
index 32de931954f6e5e73154729d7e15f02a20b1a63c..131ab5893d4442245c17e93559cca203255b6552 100644 (file)
@@ -2249,7 +2249,9 @@ the bottom."
 Return the key sequence as a string/vector."
   (isearch-unread-key-sequence keylist)
   (let (overriding-terminal-local-map)
-    (read-key-sequence nil)))  ; This will go through function-key-map, if nec.
+    ;; This will go through function-key-map, if nec.
+    ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation.
+    (read-key-sequence nil nil t)))
 
 (defun isearch-lookup-scroll-key (key-seq)
   "If KEY-SEQ is bound to a scrolling command, return it as a symbol.
@@ -2307,6 +2309,16 @@ Isearch mode."
                    (lookup-key local-function-key-map key)))
             (while keylist
               (setq key (car keylist))
+              ;; Handle an undefined shifted printing character
+              ;; by downshifting it if that makes it printing.
+              ;; (As read-key-sequence would normally do,
+              ;; if we didn't have a default definition.)
+              (if (and (integerp key)
+                       (memq 'shift (event-modifiers key))
+                       (>= key (+ ?\s (- ?\S-a ?a)))
+                       (/= key (+ 127 (- ?\S-a ?a)))
+                       (<  key (+ 256 (- ?\S-a ?a))))
+                  (setq key (- key (- ?\S-a ?a))))
               ;; If KEY is a printing char, we handle it here
               ;; directly to avoid the input method and keyboard
               ;; coding system translating it.
@@ -2784,10 +2796,18 @@ update the match data, and return point."
 
     (invalid-regexp
      (setq isearch-error (car (cdr lossage)))
-     (if (string-match
-         "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
-         isearch-error)
-        (setq isearch-error "incomplete input")))
+     (cond
+      ((string-match
+       "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
+       isearch-error)
+       (setq isearch-error "incomplete input"))
+      ((and (not isearch-regexp)
+           (string-match "\\`Regular expression too big" isearch-error))
+       (cond
+       (isearch-word
+        (setq isearch-error "Too many words"))
+       ((and isearch-lax-whitespace search-whitespace-regexp)
+        (setq isearch-error "Too many spaces for whitespace matching"))))))
 
     (search-failed
      (setq isearch-success nil)
index 2c99f2bde2e9514b58d7684a4079a92a7c0e71c4..26268f5924c60e01d70c6564eab7b53b634e2ea5 100644 (file)
@@ -65,8 +65,8 @@ should return a grid vector array that is the new solution.
 
 ;;;***
 \f
-;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20874 62962
-;;;;;;  290468 0))
+;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20998 4934
+;;;;;;  952905 0))
 ;;; Generated autoloads from progmodes/ada-mode.el
 
 (autoload 'ada-add-extensions "ada-mode" "\
@@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file.
 
 ;;;***
 \f
-;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21024 28968
+;;;;;;  738399 0))
 ;;; Generated autoloads from progmodes/ada-xref.el
 
 (autoload 'ada-find-file "ada-xref" "\
@@ -108,7 +108,7 @@ Completion is available.
 
 ;;;***
 \f
-;;;### (autoloads nil "add-log" "vc/add-log.el" (20709 26818 907104
+;;;### (autoloads nil "add-log" "vc/add-log.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from vc/add-log.el
 
@@ -238,8 +238,8 @@ old-style time formats for entries are supported.
 
 ;;;***
 \f
-;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20725 15032
-;;;;;;  264919 0))
+;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20991 31656
+;;;;;;  363459 0))
 ;;; Generated autoloads from emacs-lisp/advice.el
 
 (defvar ad-redefinition-action 'warn "\
@@ -375,7 +375,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
 
 ;;;***
 \f
-;;;### (autoloads nil "align" "align.el" (20709 26818 907104 0))
+;;;### (autoloads nil "align" "align.el" (21012 37798 962028 0))
 ;;; Generated autoloads from align.el
 
 (autoload 'align "align" "\
@@ -399,15 +399,8 @@ on the format of these lists.
 
 (autoload 'align-regexp "align" "\
 Align the current region using an ad-hoc rule read from the minibuffer.
-BEG and END mark the limits of the region.  This function will prompt
-for the REGEXP to align with.  If no prefix arg was specified, you
-only need to supply the characters to be lined up and any preceding
-whitespace is replaced.  If a prefix arg was specified, the full
-regexp with parenthesized whitespace should be supplied; it will also
-prompt for which parenthesis GROUP within REGEXP to modify, the amount
-of SPACING to use, and whether or not to REPEAT the rule throughout
-the line.  See `align-rules-list' for more information about these
-options.
+BEG and END mark the limits of the region.  Interactively, this function
+prompts for the regular expression REGEXP to align with.
 
 For example, let's say you had a list of phone numbers, and wanted to
 align them so that the opening parentheses would line up:
@@ -418,8 +411,29 @@ align them so that the opening parentheses would line up:
     Joe (123) 456-7890
 
 There is no predefined rule to handle this, but you could easily do it
-using a REGEXP like \"(\".  All you would have to do is to mark the
-region, call `align-regexp' and type in that regular expression.
+using a REGEXP like \"(\".  Interactively, all you would have to do is
+to mark the region, call `align-regexp' and enter that regular expression.
+
+REGEXP must contain at least one parenthesized subexpression, typically
+whitespace of the form \"\\\\(\\\\s-*\\\\)\".  In normal interactive use,
+this is automatically added to the start of your regular expression after
+you enter it.  You only need to supply the characters to be lined up, and
+any preceding whitespace is replaced.
+
+If you specify a prefix argument (or use this function non-interactively),
+you must enter the full regular expression, including the subexpression.
+The function also then prompts for which subexpression parenthesis GROUP
+\(default 1) within REGEXP to modify, the amount of SPACING (default
+`align-default-spacing') to use, and whether or not to REPEAT the rule
+throughout the line.
+
+See `align-rules-list' for more information about these options.
+
+The non-interactive form of the previous example would look something like:
+  (align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
+
+This function is a nothing more than a small wrapper that helps you
+construct a rule to pass to `align-region', which does the real work.
 
 \(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil)
 
@@ -464,9 +478,9 @@ A replacement function for `newline-and-indent', aligning as it goes.
 
 ;;;***
 \f
-;;;### (autoloads nil "allout" "allout.el" (20932 10282 564846 0))
+;;;### (autoloads nil "allout" "allout.el" (20996 49577 892030 0))
 ;;; Generated autoloads from allout.el
-(push (purecopy (quote (allout 2 3))) package--builtin-versions)
+(push (purecopy '(allout 2 3)) package--builtin-versions)
 (autoload 'allout-auto-activation-helper "allout" "\
 Institute `allout-auto-activation'.
 
@@ -823,10 +837,10 @@ for details on preparing Emacs for automatic allout activation.
 
 ;;;***
 \f
-;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20932
-;;;;;;  61699 522706 0))
+;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20996
+;;;;;;  49577 892030 0))
 ;;; Generated autoloads from allout-widgets.el
-(push (purecopy (quote (allout-widgets 1 0))) package--builtin-versions)
+(push (purecopy '(allout-widgets 1 0)) package--builtin-versions)
 (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
 
 (autoload 'allout-widgets-setup "allout-widgets" "\
@@ -883,7 +897,7 @@ outline hot-spot navigation (see `allout-mode').
 
 ;;;***
 \f
-;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (20843 54187 671468
+;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21005 64551 555603
 ;;;;;;  0))
 ;;; Generated autoloads from net/ange-ftp.el
 
@@ -938,10 +952,10 @@ the buffer *Birthday-Present-for-Name*.
 
 ;;;***
 \f
-;;;### (autoloads nil "ansi-color" "ansi-color.el" (20930 54950 26050
+;;;### (autoloads nil "ansi-color" "ansi-color.el" (20975 43430 521692
 ;;;;;;  0))
 ;;; Generated autoloads from ansi-color.el
-(push (purecopy (quote (ansi-color 3 4 2))) package--builtin-versions)
+(push (purecopy '(ansi-color 3 4 2)) package--builtin-versions)
 (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\
 Set `ansi-color-for-comint-mode' to t.
 
@@ -964,10 +978,10 @@ This is a good function to put in `comint-output-filter-functions'.
 
 ;;;***
 \f
-;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (20709
-;;;;;;  26818 907104 0))
+;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21022
+;;;;;;  34805 522289 827000))
 ;;; Generated autoloads from progmodes/antlr-mode.el
-(push (purecopy (quote (antlr-mode 2 2 3))) package--builtin-versions)
+(push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions)
 (autoload 'antlr-show-makefile-rules "antlr-mode" "\
 Show Makefile rules for all grammar files in the current directory.
 If the `major-mode' of the current buffer has the value `makefile-mode',
@@ -1000,7 +1014,7 @@ Used in `antlr-mode'.  Also a useful function in `java-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "appt" "calendar/appt.el" (20709 26818 907104
+;;;### (autoloads nil "appt" "calendar/appt.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from calendar/appt.el
 
@@ -1022,7 +1036,8 @@ ARG is positive, otherwise off.
 
 ;;;***
 \f
-;;;### (autoloads nil "apropos" "apropos.el" (20716 56 356960 0))
+;;;### (autoloads nil "apropos" "apropos.el" (20991 31656 363459
+;;;;;;  0))
 ;;; Generated autoloads from apropos.el
 
 (autoload 'apropos-read-pattern "apropos" "\
@@ -1232,7 +1247,7 @@ Entering array mode calls the function `array-mode-hook'.
 ;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859
 ;;;;;;  893295 0))
 ;;; Generated autoloads from textmodes/artist.el
-(push (purecopy (quote (artist 1 2 6))) package--builtin-versions)
+(push (purecopy '(artist 1 2 6)) package--builtin-versions)
 (autoload 'artist-mode "artist" "\
 Toggle Artist mode.
 With argument ARG, turn Artist mode on if ARG is positive.
@@ -1463,8 +1478,8 @@ Special commands:
 
 ;;;***
 \f
-;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20929
-;;;;;;  34089 117790 0))
+;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20953
+;;;;;;  16424 151515 0))
 ;;; Generated autoloads from gnus/auth-source.el
 
 (defvar auth-source-cache-expiry 7200 "\
@@ -1548,7 +1563,7 @@ Major mode for editing Autoconf configure.ac files.
 
 ;;;***
 \f
-;;;### (autoloads nil "autoinsert" "autoinsert.el" (20709 26818 907104
+;;;### (autoloads nil "autoinsert" "autoinsert.el" (20950 40231 187426
 ;;;;;;  0))
 ;;; Generated autoloads from autoinsert.el
 
@@ -1587,8 +1602,8 @@ insert a template for the file depending on the mode of the buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20925
-;;;;;;  37032 237257 0))
+;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20974
+;;;;;;  22577 548213 0))
 ;;; Generated autoloads from emacs-lisp/autoload.el
 
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -1637,7 +1652,7 @@ should be non-nil).
 
 ;;;***
 \f
-;;;### (autoloads nil "autorevert" "autorevert.el" (20912 25000 802412
+;;;### (autoloads nil "autorevert" "autorevert.el" (20987 34598 970563
 ;;;;;;  0))
 ;;; Generated autoloads from autorevert.el
 
@@ -1726,7 +1741,7 @@ specifies in the mode line.
 
 ;;;***
 \f
-;;;### (autoloads nil "avoid" "avoid.el" (20709 26818 907104 0))
+;;;### (autoloads nil "avoid" "avoid.el" (21024 28968 738399 0))
 ;;; Generated autoloads from avoid.el
 
 (defvar mouse-avoidance-mode nil "\
@@ -1764,6 +1779,25 @@ definition of \"random distance\".)
 
 \(fn &optional MODE)" t nil)
 
+;;;***
+\f
+;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21024 28968
+;;;;;;  738399 0))
+;;; Generated autoloads from progmodes/bat-mode.el
+
+(add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode))
+
+(autoload 'bat-mode "bat-mode" "\
+Major mode for editing DOS/Windows batch files.
+
+Start a new script from `bat-template'.  Read help pages for DOS commands
+with `bat-cmd-help'.  Navigate between sections using `imenu'.
+Run script using `bat-run' and `bat-run-args'.
+
+\\{bat-mode-map}
+
+\(fn)" t nil)
+
 ;;;***
 \f
 ;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0))
@@ -2086,8 +2120,8 @@ a reflection.
 
 ;;;***
 \f
-;;;### (autoloads nil "bookmark" "bookmark.el" (20874 65006 176325
-;;;;;;  548000))
+;;;### (autoloads nil "bookmark" "bookmark.el" (20998 4934 952905
+;;;;;;  0))
 ;;; Generated autoloads from bookmark.el
  (define-key ctl-x-r-map "b" 'bookmark-jump)
  (define-key ctl-x-r-map "m" 'bookmark-set)
@@ -2280,8 +2314,8 @@ Incremental search of bookmarks, hiding the non-matches as we go.
 
 ;;;***
 \f
-;;;### (autoloads nil "browse-url" "net/browse-url.el" (20929 34089
-;;;;;;  117790 0))
+;;;### (autoloads nil "browse-url" "net/browse-url.el" (20984 58408
+;;;;;;  354075 0))
 ;;; Generated autoloads from net/browse-url.el
 
 (defvar browse-url-browser-function 'browse-url-default-browser "\
@@ -2596,9 +2630,9 @@ from `browse-url-elinks-wrapper'.
 
 ;;;***
 \f
-;;;### (autoloads nil "bs" "bs.el" (20933 31141 450159 0))
+;;;### (autoloads nil "bs" "bs.el" (20992 52525 458637 0))
 ;;; Generated autoloads from bs.el
-(push (purecopy (quote (bs 1 17))) package--builtin-versions)
+(push (purecopy '(bs 1 17)) package--builtin-versions)
 (autoload 'bs-cycle-next "bs" "\
 Select next buffer defined by buffer cycling.
 The buffers taking part in buffer cycling are defined
@@ -2679,8 +2713,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
 
 ;;;***
 \f
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (20929
-;;;;;;  34089 117790 0))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21024
+;;;;;;  55496 462544 366000))
 ;;; Generated autoloads from emacs-lisp/bytecomp.el
 (put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
 (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -2800,8 +2834,8 @@ and corresponding effects.
 
 ;;;***
 \f
-;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20709
-;;;;;;  26818 907104 0))
+;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21023
+;;;;;;  8104 618865 0))
 ;;; Generated autoloads from calendar/cal-china.el
 
 (put 'calendar-chinese-time-zone 'risky-local-variable t)
@@ -2837,7 +2871,7 @@ from the cursor position.
 
 ;;;***
 \f
-;;;### (autoloads nil "calc" "calc/calc.el" (20932 10282 564846 0))
+;;;### (autoloads nil "calc" "calc/calc.el" (20998 4934 952905 0))
 ;;; Generated autoloads from calc/calc.el
  (define-key ctl-x-map "*" 'calc-dispatch)
 
@@ -2932,7 +2966,7 @@ See Info node `(calc)Defining Functions'.
 
 ;;;***
 \f
-;;;### (autoloads nil "calculator" "calculator.el" (20891 18859 893295
+;;;### (autoloads nil "calculator" "calculator.el" (21024 28968 738399
 ;;;;;;  0))
 ;;; Generated autoloads from calculator.el
 
@@ -2944,8 +2978,8 @@ See the documentation for `calculator-mode' for more information.
 
 ;;;***
 \f
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (20762 9398
-;;;;;;  526093 0))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (20993 36675
+;;;;;;  840108 928000))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3053,8 +3087,8 @@ Obsoletes `c-forward-into-nomenclature'.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (20911
-;;;;;;  4138 279475 0))
+;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21023
+;;;;;;  33771 640838 743000))
 ;;; Generated autoloads from progmodes/cc-engine.el
 
 (autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3163,8 +3197,8 @@ the absolute file name of the file if STYLE-NAME is nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (20907 7082
-;;;;;;  901087 0))
+;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21022 34805
+;;;;;;  23711 194000))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3176,9 +3210,6 @@ only some basic setup is done, and a call to `c-init-language-vars' or
 control).  See \"cc-mode.el\" for more info.
 
 \(fn &optional NEW-STYLE-INIT)" nil nil)
-
-(defvar c-mode-syntax-table nil "\
-Syntax table used in c-mode buffers.")
  (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode))
  (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode))
  (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode))
@@ -3205,9 +3236,6 @@ Key bindings:
 
 \(fn)" t nil)
 
-(defvar c++-mode-syntax-table nil "\
-Syntax table used in c++-mode buffers.")
-
 (autoload 'c++-mode "cc-mode" "\
 Major mode for editing C++ code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from a
@@ -3225,9 +3253,6 @@ Key bindings:
 \\{c++-mode-map}
 
 \(fn)" t nil)
-
-(defvar objc-mode-syntax-table nil "\
-Syntax table used in objc-mode buffers.")
  (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
 
 (autoload 'objc-mode "cc-mode" "\
@@ -3247,9 +3272,6 @@ Key bindings:
 \\{objc-mode-map}
 
 \(fn)" t nil)
-
-(defvar java-mode-syntax-table nil "\
-Syntax table used in java-mode buffers.")
  (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))
 
 (autoload 'java-mode "cc-mode" "\
@@ -3269,9 +3291,6 @@ Key bindings:
 \\{java-mode-map}
 
 \(fn)" t nil)
-
-(defvar idl-mode-syntax-table nil "\
-Syntax table used in idl-mode buffers.")
  (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))
 
 (autoload 'idl-mode "cc-mode" "\
@@ -3291,9 +3310,6 @@ Key bindings:
 \\{idl-mode-map}
 
 \(fn)" t nil)
-
-(defvar pike-mode-syntax-table nil "\
-Syntax table used in pike-mode buffers.")
  (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
  (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
 
@@ -3662,8 +3678,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program.
 
 ;;;***
 \f
-;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (20922 60838
-;;;;;;  997229 0))
+;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21021 52778
+;;;;;;  175609 0))
 ;;; Generated autoloads from emacs-lisp/cconv.el
 
 (autoload 'cconv-closure-convert "cconv" "\
@@ -3682,16 +3698,16 @@ Add the warnings that closure conversion would encounter.
 
 ;;;***
 \f
-;;;### (autoloads nil "cedet" "cedet/cedet.el" (20748 62911 684442
+;;;### (autoloads nil "cedet" "cedet/cedet.el" (20983 37555 279226
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/cedet.el
-(push (purecopy (quote (cedet 2 0))) package--builtin-versions)
+(push (purecopy '(cedet 2 0)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20929 34089
-;;;;;;  117790 0))
+;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20958 34345
+;;;;;;  952538 0))
 ;;; Generated autoloads from progmodes/cfengine.el
-(push (purecopy (quote (cfengine 1 2))) package--builtin-versions)
+(push (purecopy '(cfengine 1 2)) package--builtin-versions)
 (autoload 'cfengine3-mode "cfengine" "\
 Major mode for editing CFEngine3 input.
 There are no special keybindings by default.
@@ -3721,7 +3737,7 @@ on the buffer contents
 ;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912
 ;;;;;;  444844 0))
 ;;; Generated autoloads from emacs-lisp/chart.el
-(push (purecopy (quote (chart 0 2))) package--builtin-versions)
+(push (purecopy '(chart 0 2)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
@@ -3742,19 +3758,24 @@ Returns non-nil if any false statements are found.
 
 ;;;***
 \f
-;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20893
-;;;;;;  60586 188550 0))
+;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20996
+;;;;;;  49577 892030 0))
 ;;; Generated autoloads from emacs-lisp/checkdoc.el
-(push (purecopy (quote (checkdoc 0 6 2))) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p)
+(push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p)
+(put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p)
 
 (autoload 'checkdoc-list-of-strings-p "checkdoc" "\
 
 
 \(fn OBJ)" nil nil)
+(put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp)
+(put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp)
 
 (autoload 'checkdoc "checkdoc" "\
 Interactively check the entire buffer for style errors.
@@ -3861,65 +3882,65 @@ space at the end of each line.
 (autoload 'checkdoc-ispell "checkdoc" "\
 Check the style and spelling of everything interactively.
 Calls `checkdoc' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc'
+Prefix argument is the same as for `checkdoc'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-current-buffer "checkdoc" "\
 Check the style and spelling of the current buffer.
 Calls `checkdoc-current-buffer' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer'
+Prefix argument is the same as for `checkdoc-current-buffer'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-interactive "checkdoc" "\
 Check the style and spelling of the current buffer interactively.
 Calls `checkdoc-interactive' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive'
+Prefix argument is the same as for `checkdoc-interactive'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-message-interactive "checkdoc" "\
 Check the style and spelling of message text interactively.
 Calls `checkdoc-message-interactive' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive'
+Prefix argument is the same as for `checkdoc-message-interactive'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-message-text "checkdoc" "\
 Check the style and spelling of message text interactively.
 Calls `checkdoc-message-text' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text'
+Prefix argument is the same as for `checkdoc-message-text'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-start "checkdoc" "\
 Check the style and spelling of the current buffer.
 Calls `checkdoc-start' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-start'
+Prefix argument is the same as for `checkdoc-start'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-continue "checkdoc" "\
 Check the style and spelling of the current buffer after point.
 Calls `checkdoc-continue' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-continue'
+Prefix argument is the same as for `checkdoc-continue'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-comments "checkdoc" "\
 Check the style and spelling of the current buffer's comments.
 Calls `checkdoc-comments' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-comments'
+Prefix argument is the same as for `checkdoc-comments'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-ispell-defun "checkdoc" "\
 Check the style and spelling of the current defun with Ispell.
 Calls `checkdoc-defun' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-defun'
+Prefix argument is the same as for `checkdoc-defun'
 
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
 
 (autoload 'checkdoc-minor-mode "checkdoc" "\
 Toggle automatic docstring checking (Checkdoc minor mode).
@@ -4094,10 +4115,10 @@ For example, the function `case' has an indent property
 
 ;;;***
 \f
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20932 10282
-;;;;;;  564846 0))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20998 4934
+;;;;;;  952905 0))
 ;;; Generated autoloads from emacs-lisp/cl-lib.el
-(push (purecopy (quote (cl-lib 1 0))) package--builtin-versions)
+(push (purecopy '(cl-lib 1 0)) package--builtin-versions)
 (define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3")
 
 (defvar cl-custom-print-functions nil "\
@@ -4110,6 +4131,8 @@ printer proceeds to the next function on the list.
 This variable is not used at present, but it is defined in hopes that
 a future Emacs interpreter will be able to use it.")
 
+(define-error 'cl-assertion-failed (purecopy "Assertion failed"))
+
 (autoload 'cl--defsubst-expand "cl-macs")
 
 (put 'cl-defun 'doc-string-elt 3)
@@ -4183,7 +4206,7 @@ If FRAME cannot display COLOR, return nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "comint" "comint.el" (20932 10282 564846 0))
+;;;### (autoloads nil "comint" "comint.el" (21024 28968 738399 0))
 ;;; Generated autoloads from comint.el
 
 (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4282,8 +4305,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use.
 
 ;;;***
 \f
-;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20871 33574
-;;;;;;  214287 0))
+;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from vc/compare-w.el
 
 (autoload 'compare-windows "compare-w" "\
@@ -4316,8 +4339,8 @@ on third call it again advances points to the next difference and so on.
 
 ;;;***
 \f
-;;;### (autoloads nil "compile" "progmodes/compile.el" (20911 4138
-;;;;;;  279475 0))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (21002 1963
+;;;;;;  769129 0))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -4385,7 +4408,9 @@ You might also use mode hooks to specify it in certain modes, like this:
                     (file-exists-p \"Makefile\"))
           (set (make-local-variable 'compile-command)
                (concat \"make -k \"
-                       (file-name-sans-extension buffer-file-name))))))")
+                       (if buffer-file-name
+                         (shell-quote-argument
+                           (file-name-sans-extension buffer-file-name))))))))")
 
 (custom-autoload 'compile-command "compile" t)
 (put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command))))
@@ -4496,8 +4521,8 @@ This is the value of `next-error-function' in Compilation buffers.
 
 ;;;***
 \f
-;;;### (autoloads nil "completion" "completion.el" (20884 7264 412929
-;;;;;;  442000))
+;;;### (autoloads nil "completion" "completion.el" (20999 25770 522517
+;;;;;;  0))
 ;;; Generated autoloads from completion.el
 
 (defvar dynamic-completion-mode nil "\
@@ -5024,8 +5049,8 @@ INHERIT-INPUT-METHOD.
 
 ;;;***
 \f
-;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21024 28968
+;;;;;;  738399 0))
 ;;; Generated autoloads from textmodes/css-mode.el
 
 (autoload 'css-mode "css-mode" "\
@@ -5035,8 +5060,8 @@ Major mode to edit Cascading Style Sheets.
 
 ;;;***
 \f
-;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from emulation/cua-base.el
 
 (defvar cua-mode nil "\
@@ -5086,7 +5111,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
 
 ;;;***
 \f
-;;;### (autoloads nil "cus-edit" "cus-edit.el" (20932 10282 564846
+;;;### (autoloads nil "cus-edit" "cus-edit.el" (21024 28968 738399
 ;;;;;;  0))
 ;;; Generated autoloads from cus-edit.el
 
@@ -5446,7 +5471,7 @@ Mode used for cvs status output.
 ;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/cwarn.el
-(push (purecopy (quote (cwarn 1 3 1))) package--builtin-versions)
+(push (purecopy '(cwarn 1 3 1)) package--builtin-versions)
 (autoload 'cwarn-mode "cwarn" "\
 Minor mode that highlights suspicious C and C++ constructions.
 
@@ -5516,7 +5541,7 @@ If the argument is nil, we return the display table to its standard state.
 
 ;;;***
 \f
-;;;### (autoloads nil "dabbrev" "dabbrev.el" (20709 26818 907104
+;;;### (autoloads nil "dabbrev" "dabbrev.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from dabbrev.el
 (put 'dabbrev-case-fold-search 'risky-local-variable t)
@@ -5714,8 +5739,8 @@ There is some minimal font-lock support (see vars
 
 ;;;***
 \f
-;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21005 64551
+;;;;;;  555603 0))
 ;;; Generated autoloads from emacs-lisp/debug.el
 
 (setq debugger 'debug)
@@ -5790,7 +5815,7 @@ The most useful commands are:
 ;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from delim-col.el
-(push (purecopy (quote (delim-col 2 1))) package--builtin-versions)
+(push (purecopy '(delim-col 2 1)) package--builtin-versions)
 (autoload 'delimit-columns-customize "delim-col" "\
 Customization of `columns' group.
 
@@ -5908,7 +5933,7 @@ the first time the mode is used.
 
 ;;;***
 \f
-;;;### (autoloads nil "descr-text" "descr-text.el" (20875 30633 412173
+;;;### (autoloads nil "descr-text" "descr-text.el" (21024 28968 738399
 ;;;;;;  0))
 ;;; Generated autoloads from descr-text.el
 
@@ -5943,7 +5968,8 @@ relevant to POS.
 
 ;;;***
 \f
-;;;### (autoloads nil "desktop" "desktop.el" (20945 22315 8369 0))
+;;;### (autoloads nil "desktop" "desktop.el" (21005 64551 555603
+;;;;;;  0))
 ;;; Generated autoloads from desktop.el
 
 (defvar desktop-save-mode nil "\
@@ -5971,9 +5997,8 @@ modes are restored automatically; they should not be listed here.")
 
 (custom-autoload 'desktop-locals-to-save "desktop" t)
 
-(defvar desktop-save-buffer nil "\
+(defvar-local desktop-save-buffer nil "\
 When non-nil, save buffer status in desktop file.
-This variable becomes buffer local when set.
 
 If the value is a function, it is called by `desktop-save' with argument
 DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop
@@ -6074,6 +6099,9 @@ Empty the Desktop.
 This kills all buffers except for internal ones and those with names matched by
 a regular expression in the list `desktop-clear-preserve-buffers'.
 Furthermore, it clears the variables listed in `desktop-globals-to-clear'.
+When called interactively and `desktop-restore-frames' is non-nil, it also
+deletes all frames except the selected one (and its minibuffer frame,
+if different).
 
 \(fn)" t nil)
 
@@ -6164,8 +6192,8 @@ Deuglify broken Outlook (Express) articles and redisplay.
 
 ;;;***
 \f
-;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20932
-;;;;;;  61699 522706 0))
+;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20992
+;;;;;;  52525 458637 0))
 ;;; Generated autoloads from calendar/diary-lib.el
 
 (autoload 'diary "diary-lib" "\
@@ -6299,7 +6327,7 @@ Optional arguments are passed to `dig-invoke'.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired" "dired.el" (20932 61699 522706 0))
+;;;### (autoloads nil "dired" "dired.el" (20999 25770 522517 0))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6470,7 +6498,7 @@ redefine OBJECT if it is a symbol.
 
 ;;;***
 \f
-;;;### (autoloads nil "disp-table" "disp-table.el" (20709 26818 907104
+;;;### (autoloads nil "disp-table" "disp-table.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from disp-table.el
 
@@ -6653,7 +6681,7 @@ Locate SOA record and increment the serial field.
 
 ;;;***
 \f
-;;;### (autoloads nil "doc-view" "doc-view.el" (20899 12965 791908
+;;;### (autoloads nil "doc-view" "doc-view.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from doc-view.el
 
@@ -6730,7 +6758,7 @@ strings when pressed twice.  See `double-map' for details.
 ;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219
 ;;;;;;  0))
 ;;; Generated autoloads from play/dunnet.el
-(push (purecopy (quote (dunnet 2 1))) package--builtin-versions)
+(push (purecopy '(dunnet 2 1)) package--builtin-versions)
 (autoload 'dunnet "dunnet" "\
 Switch to *dungeon* buffer and start game.
 
@@ -6738,8 +6766,8 @@ Switch to *dungeon* buffer and start game.
 
 ;;;***
 \f
-;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20900
-;;;;;;  33838 319219 0))
+;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20992
+;;;;;;  52525 458637 0))
 ;;; Generated autoloads from emacs-lisp/easy-mmode.el
 
 (defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
@@ -7020,7 +7048,7 @@ To implement dynamic menus, either call this from
 ;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from progmodes/ebnf2ps.el
-(push (purecopy (quote (ebnf2ps 4 4))) package--builtin-versions)
+(push (purecopy '(ebnf2ps 4 4)) package--builtin-versions)
 (autoload 'ebnf-customize "ebnf2ps" "\
 Customization for ebnf group.
 
@@ -7282,8 +7310,8 @@ See `ebnf-style-database' documentation.
 
 ;;;***
 \f
-;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from progmodes/ebrowse.el
 
 (autoload 'ebrowse-tree-mode "ebrowse" "\
@@ -7431,7 +7459,7 @@ Display statistics for a class tree.
 
 ;;;***
 \f
-;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20709 26818 907104
+;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from ebuff-menu.el
 
@@ -7489,7 +7517,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
 \f
 ;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0))
 ;;; Generated autoloads from cedet/ede.el
-(push (purecopy (quote (ede 1 2))) package--builtin-versions)
+(push (purecopy '(ede 1 2)) package--builtin-versions)
 (defvar global-ede-mode nil "\
 Non-nil if Global-Ede mode is enabled.
 See the command `global-ede-mode' for a description of this minor mode.
@@ -7515,17 +7543,17 @@ an EDE controlled project.
 ;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from cedet/ede/dired.el
-(push (purecopy (quote (dired 0 4))) package--builtin-versions)
+(push (purecopy '(dired 0 4)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el"
 ;;;;;;  (20881 10343 547564 552000))
 ;;; Generated autoloads from cedet/ede/project-am.el
-(push (purecopy (quote (project-am 0 0 3))) package--builtin-versions)
+(push (purecopy '(project-am 0 0 3)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20912 25000
-;;;;;;  802412 0))
+;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20996 49577
+;;;;;;  892030 0))
 ;;; Generated autoloads from emacs-lisp/edebug.el
 
 (defvar edebug-all-defs nil "\
@@ -7589,9 +7617,9 @@ Toggle edebugging of all forms.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff" "vc/ediff.el" (20893 60586 188550 0))
+;;;### (autoloads nil "ediff" "vc/ediff.el" (20992 52525 458637 0))
 ;;; Generated autoloads from vc/ediff.el
-(push (purecopy (quote (ediff 2 81 4))) package--builtin-versions)
+(push (purecopy '(ediff 2 81 4)) package--builtin-versions)
 (autoload 'ediff-files "ediff" "\
 Run Ediff on a pair of files, FILE-A and FILE-B.
 
@@ -7818,10 +7846,50 @@ With optional NODE, goes to that node.
 
 \(fn &optional NODE)" t nil)
 
+(autoload 'ediff-files-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff3-files-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-with-ancestor-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-directories-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-directories3-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-directories-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-directories-with-ancestor-command "ediff" "\
+
+
+\(fn)" nil nil)
+
 ;;;***
 \f
-;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from vc/ediff-help.el
 
 (autoload 'ediff-customize "ediff-help" "\
@@ -7844,8 +7912,8 @@ Display Ediff's registry.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20893 60586
-;;;;;;  188550 0))
+;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from vc/ediff-util.el
 
 (autoload 'ediff-toggle-multiframe "ediff-util" "\
@@ -7864,10 +7932,10 @@ To change the default, set the variable `ediff-use-toolbar-p', which see.
 
 ;;;***
 \f
-;;;### (autoloads nil "edmacro" "edmacro.el" (20709 26818 907104
-;;;;;;  0))
+;;;### (autoloads nil "edmacro" "edmacro.el" (20964 20753 310858
+;;;;;;  446000))
 ;;; Generated autoloads from edmacro.el
-(push (purecopy (quote (edmacro 2 1))) package--builtin-versions)
+(push (purecopy '(edmacro 2 1)) package--builtin-versions)
 (autoload 'edit-kbd-macro "edmacro" "\
 Edit a keyboard macro.
 At the prompt, type any key sequence which is bound to a keyboard macro.
@@ -7931,7 +7999,7 @@ Turn on EDT Emulation.
 
 ;;;***
 \f
-;;;### (autoloads nil "ehelp" "ehelp.el" (20762 9398 526093 0))
+;;;### (autoloads nil "ehelp" "ehelp.el" (20992 52525 458637 0))
 ;;; Generated autoloads from ehelp.el
 
 (autoload 'with-electric-help "ehelp" "\
@@ -7970,13 +8038,13 @@ BUFFER is put back into its original major mode.
 ;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575
 ;;;;;;  701000))
 ;;; Generated autoloads from emacs-lisp/eieio.el
-(push (purecopy (quote (eieio 1 4))) package--builtin-versions)
+(push (purecopy '(eieio 1 4)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908
 ;;;;;;  27948 216644 0))
 ;;; Generated autoloads from emacs-lisp/eieio-core.el
-(push (purecopy (quote (eieio-core 1 4))) package--builtin-versions)
+(push (purecopy '(eieio-core 1 4)) package--builtin-versions)
 (autoload 'eieio-defclass-autoload "eieio-core" "\
 Create autoload symbols for the EIEIO class CNAME.
 SUPERCLASSES are the superclasses that CNAME inherits from.
@@ -8035,8 +8103,8 @@ Also extracts information about all methods specific to this generic.
 
 ;;;***
 \f
-;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (20806 59818
-;;;;;;  347907 0))
+;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21024 28968
+;;;;;;  738399 0))
 ;;; Generated autoloads from emacs-lisp/eldoc.el
 
 (defvar eldoc-minor-mode-string (purecopy " ElDoc") "\
@@ -8289,7 +8357,7 @@ Prompts for bug subject.  Leaves you in a mail buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "emerge" "vc/emerge.el" (20576 42138 697312
+;;;### (autoloads nil "emerge" "vc/emerge.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from vc/emerge.el
 
@@ -8386,7 +8454,7 @@ Commands:
 
 ;;;***
 \f
-;;;### (autoloads nil "epa" "epa.el" (20917 42917 611340 0))
+;;;### (autoloads nil "epa" "epa.el" (20978 19624 657047 0))
 ;;; Generated autoloads from epa.el
 
 (autoload 'epa-list-keys "epa" "\
@@ -8611,7 +8679,7 @@ Encrypt marked files.
 
 ;;;***
 \f
-;;;### (autoloads nil "epa-mail" "epa-mail.el" (20709 26818 907104
+;;;### (autoloads nil "epa-mail" "epa-mail.el" (20978 19624 657047
 ;;;;;;  0))
 ;;; Generated autoloads from epa-mail.el
 
@@ -8648,12 +8716,19 @@ Don't use this command in Lisp programs!
 \(fn START END SIGNERS MODE)" t nil)
 
 (autoload 'epa-mail-encrypt "epa-mail" "\
-Encrypt the current buffer.
-The buffer is expected to contain a mail message.
+Encrypt the outgoing mail message in the current buffer.
+Takes the recipients from the text in the header in the buffer
+and translates them through `epa-mail-aliases'.
+With prefix argument, asks you to select among them interactively
+and also whether and how to sign.
 
-Don't use this command in Lisp programs!
+Called from Lisp, the optional argument RECIPIENTS is a list
+of recipient addresses, t to perform symmetric encryption,
+or nil meaning use the defaults.
 
-\(fn START END RECIPIENTS SIGN SIGNERS)" t nil)
+SIGNERS is a list of keys to sign the message with.
+
+\(fn &optional RECIPIENTS SIGNERS)" t nil)
 
 (autoload 'epa-mail-import-keys "epa-mail" "\
 Import keys in the OpenPGP armor format in the current buffer.
@@ -8682,9 +8757,9 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "epg" "epg.el" (20936 7342 261759 0))
+;;;### (autoloads nil "epg" "epg.el" (21022 27213 317995 0))
 ;;; Generated autoloads from epg.el
-(push (purecopy (quote (epg 1 0 0))) package--builtin-versions)
+(push (purecopy '(epg 1 0 0)) package--builtin-versions)
 (autoload 'epg-make-context "epg" "\
 Return a context object.
 
@@ -8713,9 +8788,9 @@ Look at CONFIG and try to expand GROUP.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc" "erc/erc.el" (20891 18859 893295 0))
+;;;### (autoloads nil "erc" "erc/erc.el" (21013 58662 278539 0))
 ;;; Generated autoloads from erc/erc.el
-(push (purecopy (quote (erc 5 3))) package--builtin-versions)
+(push (purecopy '(erc 5 3)) package--builtin-versions)
 (autoload 'erc-select-read-args "erc" "\
 Prompt the user for values of nick, server, port, and password.
 
@@ -8768,8 +8843,8 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21013 58662
+;;;;;;  278539 0))
 ;;; Generated autoloads from erc/erc-button.el
  (autoload 'erc-button-mode "erc-button" nil t)
 
@@ -8945,13 +9020,13 @@ system.
 ;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-lang.el
-(push (purecopy (quote (erc-lang 1 0 0))) package--builtin-versions)
+(push (purecopy '(erc-lang 1 0 0)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20884 7264 412929
-;;;;;;  442000))
+;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21013 58662 278539
+;;;;;;  0))
 ;;; Generated autoloads from erc/erc-list.el
-(push (purecopy (quote (erc-list 0 1))) package--builtin-versions) (autoload 'erc-list-mode "erc-list")
+(push (purecopy '(erc-list 0 1)) package--builtin-versions) (autoload 'erc-list-mode "erc-list")
 
 ;;;***
 \f
@@ -9069,8 +9144,8 @@ Interactively select a server to connect to using `erc-server-alist'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (20891 18859
-;;;;;;  893295 0))
+;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21013 58662
+;;;;;;  278539 0))
 ;;; Generated autoloads from erc/erc-notify.el
  (autoload 'erc-notify-mode "erc-notify" nil t)
 
@@ -9167,8 +9242,8 @@ This will add a speedbar major display mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-track" "erc/erc-track.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21013 58662
+;;;;;;  278539 0))
 ;;; Generated autoloads from erc/erc-track.el
 
 (defvar erc-track-minor-mode nil "\
@@ -9225,7 +9300,7 @@ Add a file to `erc-xdcc-files'.
 
 ;;;***
 \f
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20834 39208 838628
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/ert.el
 
@@ -9304,8 +9379,8 @@ Kill all test buffers that are still live.
 
 ;;;***
 \f
-;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20911 4138
-;;;;;;  279475 0))
+;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from eshell/esh-mode.el
 
 (autoload 'eshell-mode "esh-mode" "\
@@ -9320,7 +9395,7 @@ Emacs shell interactive mode.
 ;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550
 ;;;;;;  0))
 ;;; Generated autoloads from eshell/eshell.el
-(push (purecopy (quote (eshell 2 4 2))) package--builtin-versions)
+(push (purecopy '(eshell 2 4 2)) package--builtin-versions)
 (autoload 'eshell "eshell" "\
 Create an interactive Eshell buffer.
 The buffer used for Eshell sessions is determined by the value of
@@ -9352,7 +9427,7 @@ corresponding to a successful execution.
 
 ;;;***
 \f
-;;;### (autoloads nil "etags" "progmodes/etags.el" (20731 53823 676680
+;;;### (autoloads nil "etags" "progmodes/etags.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/etags.el
 
@@ -9975,7 +10050,7 @@ fourth arg NOSEP non-nil inhibits this.
 
 ;;;***
 \f
-;;;### (autoloads nil "eww" "net/eww.el" (20941 25255 50698 0))
+;;;### (autoloads nil "eww" "net/eww.el" (21022 41153 91581 355000))
 ;;; Generated autoloads from net/eww.el
 
 (autoload 'eww "eww" "\
@@ -10088,7 +10163,7 @@ This is used only in conjunction with `expand-add-abbrevs'.
 
 ;;;***
 \f
-;;;### (autoloads nil "f90" "progmodes/f90.el" (20886 939 575794
+;;;### (autoloads nil "f90" "progmodes/f90.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/f90.el
 
@@ -10318,10 +10393,10 @@ Besides the choice of face, it is the same as `buffer-face-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "feedmail" "mail/feedmail.el" (20891 18859
-;;;;;;  893295 0))
+;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21002 1963 769129
+;;;;;;  0))
 ;;; Generated autoloads from mail/feedmail.el
-(push (purecopy (quote (feedmail 11))) package--builtin-versions)
+(push (purecopy '(feedmail 11)) package--builtin-versions)
 (autoload 'feedmail-send-it "feedmail" "\
 Send the current mail buffer using the Feedmail package.
 This is a suitable value for `send-mail-function'.  It can be used
@@ -10372,7 +10447,7 @@ you can set `feedmail-queue-reminder-alist' to nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "ffap" "ffap.el" (20752 26669 524456 0))
+;;;### (autoloads nil "ffap" "ffap.el" (20998 4934 952905 0))
 ;;; Generated autoloads from ffap.el
 
 (autoload 'ffap-next "ffap" "\
@@ -10435,7 +10510,7 @@ Evaluate the forms in variable `ffap-bindings'.
 
 ;;;***
 \f
-;;;### (autoloads nil "filecache" "filecache.el" (20709 26818 907104
+;;;### (autoloads nil "filecache" "filecache.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from filecache.el
 
@@ -10491,6 +10566,19 @@ the name is considered already unique; only the second substitution
 
 \(fn ARG)" t nil)
 
+;;;***
+\f
+;;;### (autoloads nil "filenotify" "filenotify.el" (20999 25770 522517
+;;;;;;  0))
+;;; Generated autoloads from filenotify.el
+
+(autoload 'file-notify-handle-event "filenotify" "\
+Handle file system monitoring event.
+If EVENT is a filewatch event, call its callback.
+Otherwise, signal a `file-notify-error'.
+
+\(fn EVENT)" t nil)
+
 ;;;***
 \f
 ;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398
@@ -10559,7 +10647,7 @@ Copy directory-local variables to the -*- line.
 
 ;;;***
 \f
-;;;### (autoloads nil "filesets" "filesets.el" (20791 9657 561026
+;;;### (autoloads nil "filesets" "filesets.el" (20999 25770 522517
 ;;;;;;  0))
 ;;; Generated autoloads from filesets.el
 
@@ -10574,7 +10662,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
 ;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from find-cmd.el
-(push (purecopy (quote (find-cmd 0 6))) package--builtin-versions)
+(push (purecopy '(find-cmd 0 6)) package--builtin-versions)
 (autoload 'find-cmd "find-cmd" "\
 Initiate the building of a find command.
 For example:
@@ -10630,7 +10718,7 @@ use in place of \"-ls\" as the final argument.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-file" "find-file.el" (20872 54440 171355
+;;;### (autoloads nil "find-file" "find-file.el" (20999 25770 522517
 ;;;;;;  0))
 ;;; Generated autoloads from find-file.el
 
@@ -10880,7 +10968,7 @@ Define some key bindings for the find-function family of functions.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-lisp" "find-lisp.el" (20709 26818 907104
+;;;### (autoloads nil "find-lisp" "find-lisp.el" (20993 35788 926781
 ;;;;;;  0))
 ;;; Generated autoloads from find-lisp.el
 
@@ -10895,7 +10983,7 @@ Find all subdirectories of DIR.
 \(fn DIR)" t nil)
 
 (autoload 'find-lisp-find-dired-filter "find-lisp" "\
-Change the filter on a find-lisp-find-dired buffer to REGEXP.
+Change the filter on a `find-lisp-find-dired' buffer to REGEXP.
 
 \(fn REGEXP)" t nil)
 
@@ -10903,7 +10991,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP.
 \f
 ;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0))
 ;;; Generated autoloads from finder.el
-(push (purecopy (quote (finder 1 0))) package--builtin-versions)
+(push (purecopy '(finder 1 0)) package--builtin-versions)
 (autoload 'finder-list-keywords "finder" "\
 Display descriptions of the keywords in the Finder buffer.
 
@@ -10960,10 +11048,10 @@ to get the effect of a C-q.
 
 ;;;***
 \f
-;;;### (autoloads nil "flymake" "progmodes/flymake.el" (20932 61699
-;;;;;;  522706 0))
+;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21019 11047
+;;;;;;  84796 0))
 ;;; Generated autoloads from progmodes/flymake.el
-(push (purecopy (quote (flymake 0 3))) package--builtin-versions)
+(push (purecopy '(flymake 0 3)) package--builtin-versions)
 (autoload 'flymake-mode "flymake" "\
 Toggle on-the-fly syntax checking.
 With a prefix argument ARG, enable the mode if ARG is positive,
@@ -11063,10 +11151,10 @@ Flyspell whole buffer.
 ;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from foldout.el
-(push (purecopy (quote (foldout 1 10))) package--builtin-versions)
+(push (purecopy '(foldout 1 10)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "follow" "follow.el" (20709 26818 907104 0))
+;;;### (autoloads nil "follow" "follow.el" (21005 64551 555603 0))
 ;;; Generated autoloads from follow.el
 
 (autoload 'turn-on-follow-mode "follow" "\
@@ -11137,7 +11225,7 @@ selected if the original window is the first one in the frame.
 ;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from mail/footnote.el
-(push (purecopy (quote (footnote 0 19))) package--builtin-versions)
+(push (purecopy '(footnote 0 19)) package--builtin-versions)
 (autoload 'footnote-mode "footnote" "\
 Toggle Footnote mode.
 With a prefix argument ARG, enable Footnote mode if ARG is
@@ -11153,7 +11241,7 @@ play around with the following keys:
 
 ;;;***
 \f
-;;;### (autoloads nil "forms" "forms.el" (20709 26818 907104 0))
+;;;### (autoloads nil "forms" "forms.el" (20999 25770 522517 0))
 ;;; Generated autoloads from forms.el
 
 (autoload 'forms-mode "forms" "\
@@ -11189,8 +11277,8 @@ Visit a file in Forms mode in other window.
 
 ;;;***
 \f
-;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from progmodes/fortran.el
 
 (autoload 'fortran-mode "fortran" "\
@@ -11314,16 +11402,177 @@ and choose the directory as the fortune-file.
 
 \(fn &optional FILE)" t nil)
 
+;;;***
+\f
+;;;### (autoloads nil "frameset" "frameset.el" (21005 64551 555603
+;;;;;;  0))
+;;; Generated autoloads from frameset.el
+
+(defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\
+Minimum set of parameters to filter for live (on-session) framesets.
+DO NOT MODIFY.  See `frameset-filter-alist' for a full description.")
+
+(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (font . frameset-filter-shelve-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-id . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\
+Parameters to filter for persistent framesets.
+DO NOT MODIFY.  See `frameset-filter-alist' for a full description.")
+
+(defvar frameset-filter-alist frameset-persistent-filter-alist "\
+Alist of frame parameters and filtering functions.
+
+This alist is the default value of the FILTERS argument of
+`frameset-save' and `frameset-restore' (which see).
+
+Initially, `frameset-filter-alist' is set to, and shares the value of,
+`frameset-persistent-filter-alist'.  You can override any item in
+this alist by `push'ing a new item onto it.  If, for some reason, you
+intend to modify existing values, do
+
+  (setq frameset-filter-alist (copy-tree frameset-filter-alist))
+
+before changing anything.
+
+On saving, PARAMETERS is the parameter alist of each frame processed,
+and FILTERED is the parameter alist that gets saved to the frameset.
+
+On restoring, PARAMETERS is the parameter alist extracted from the
+frameset, and FILTERED is the resulting frame parameter alist used
+to restore the frame.
+
+Elements of `frameset-filter-alist' are conses (PARAM . ACTION),
+where PARAM is a parameter name (a symbol identifying a frame
+parameter), and ACTION can be:
+
+ nil       The parameter is copied to FILTERED.
+ :never    The parameter is never copied to FILTERED.
+ :save     The parameter is copied only when saving the frame.
+ :restore  The parameter is copied only when restoring the frame.
+ FILTER    A filter function.
+
+FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...).
+FILTER-FUN is invoked with
+
+  (apply FILTER-FUN CURRENT FILTERED PARAMETERS SAVING ARGS)
+
+where
+
+ CURRENT     A cons (PARAM . VALUE), where PARAM is the one being
+            filtered and VALUE is its current value.
+ FILTERED    The resulting alist (so far).
+ PARAMETERS  The complete alist of parameters being filtered,
+ SAVING      Non-nil if filtering before saving state, nil if filtering
+              before restoring it.
+ ARGS        Any additional arguments specified in the ACTION.
+
+FILTER-FUN is allowed to modify items in FILTERED, but no other arguments.
+It must return:
+ nil                      Skip CURRENT (do not add it to FILTERED).
+ t                        Add CURRENT to FILTERED as is.
+ (NEW-PARAM . NEW-VALUE)  Add this to FILTERED instead of CURRENT.
+
+Frame parameters not on this alist are passed intact, as if they were
+defined with ACTION = nil.")
+
+(autoload 'frameset-frame-id "frameset" "\
+Return the frame id of FRAME, if it has one; else, return nil.
+A frame id is a string that uniquely identifies a frame.
+It is persistent across `frameset-save' / `frameset-restore'
+invocations, and once assigned is never changed unless the same
+frame is duplicated (via `frameset-restore'), in which case the
+newest frame keeps the id and the old frame's is set to nil.
+
+\(fn FRAME)" nil nil)
+
+(autoload 'frameset-frame-id-equal-p "frameset" "\
+Return non-nil if FRAME's id matches ID.
+
+\(fn FRAME ID)" nil nil)
+
+(autoload 'frameset-frame-with-id "frameset" "\
+Return the live frame with id ID, if exists; else nil.
+If FRAME-LIST is a list of frames, check these frames only.
+If nil, check all live frames.
+
+\(fn ID &optional FRAME-LIST)" nil nil)
+
+(autoload 'frameset-save "frameset" "\
+Return a frameset for FRAME-LIST, a list of frames.
+Dead frames and non-frame objects are silently removed from the list.
+If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames).
+APP, NAME and DESCRIPTION are optional data; see the docstring of the
+`frameset' defstruct for details.
+FILTERS is an alist of parameter filters; if nil, the value of the variable
+`frameset-filter-alist' is used instead.
+PREDICATE is a predicate function, which must return non-nil for frames that
+should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved.
+PROPERTIES is a user-defined property list to add to the frameset.
+
+\(fn FRAME-LIST &key APP NAME DESCRIPTION FILTERS PREDICATE PROPERTIES)" nil nil)
+
+(autoload 'frameset-restore "frameset" "\
+Restore a FRAMESET into the current display(s).
+
+PREDICATE is a function called with two arguments, the parameter alist
+and the window-state of the frame being restored, in that order (see
+the docstring of the `frameset' defstruct for additional details).
+If PREDICATE returns nil, the frame described by that parameter alist
+and window-state is not restored.
+
+FILTERS is an alist of parameter filters; if nil, the value of
+`frameset-filter-alist' is used instead.
+
+REUSE-FRAMES selects the policy to use to reuse frames when restoring:
+  t        Reuse existing frames if possible, and delete those not reused.
+  nil      Restore frameset in new frames and delete existing frames.
+  :keep    Restore frameset in new frames and keep the existing ones.
+  LIST     A list of frames to reuse; only these are reused (if possible).
+            Remaining frames in this list are deleted; other frames not
+            included on the list are left untouched.
+
+FORCE-DISPLAY can be:
+  t        Frames are restored in the current display.
+  nil      Frames are restored, if possible, in their original displays.
+  :delete  Frames in other displays are deleted instead of restored.
+  PRED     A function called with two arguments, the parameter alist and
+            the window state (in that order).  It must return t, nil or
+            `:delete', as above but affecting only the frame that will
+            be created from that parameter alist.
+
+FORCE-ONSCREEN can be:
+  t        Force onscreen only those frames that are fully offscreen.
+  nil      Do not force any frame back onscreen.
+  :all     Force onscreen any frame fully or partially offscreen.
+  PRED     A function called with three arguments,
+          - the live frame just restored,
+          - a list (LEFT TOP WIDTH HEIGHT), describing the frame,
+          - a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
+          It must return non-nil to force the frame onscreen, nil otherwise.
+
+Note the timing and scope of the operations described above: REUSE-FRAMES
+affects existing frames; PREDICATE, FILTERS and FORCE-DISPLAY affect the frame
+being restored before that happens; and FORCE-ONSCREEN affects the frame once
+it has been restored.
+
+All keyword parameters default to nil.
+
+\(fn FRAMESET &key PREDICATE FILTERS REUSE-FRAMES FORCE-DISPLAY FORCE-ONSCREEN)" nil nil)
+
+(autoload 'frameset-to-register "frameset" "\
+Store the current frameset in register REGISTER.
+Use \\[jump-to-register] to restore the frameset.
+Argument is a character, naming the register.
+
+\(fn REGISTER &optional ARG)" t nil)
+
 ;;;***
 \f
 ;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925
 ;;;;;;  124734 677000))
 ;;; Generated autoloads from play/gamegrid.el
-(push (purecopy (quote (gamegrid 1 2))) package--builtin-versions)
+(push (purecopy '(gamegrid 1 2)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20932 61687
-;;;;;;  205708 148000))
+;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from progmodes/gdb-mi.el
 
 (defvar gdb-enable-debug nil "\
@@ -11551,9 +11800,9 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus" "gnus/gnus.el" (20901 54695 989166 0))
+;;;### (autoloads nil "gnus" "gnus/gnus.el" (21002 1963 769129 0))
 ;;; Generated autoloads from gnus/gnus.el
-(push (purecopy (quote (gnus 5 13))) package--builtin-versions)(when (fboundp 'custom-autoload)
+(push (purecopy '(gnus 5 13)) package--builtin-versions)(when (fboundp 'custom-autoload)
  (custom-autoload 'gnus-select-method "gnus"))
 
 (autoload 'gnus-slave-no-server "gnus" "\
@@ -11691,8 +11940,8 @@ If CLEAN, obsolete (ignore).
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20941 25255
-;;;;;;  50698 0))
+;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20977 54298
+;;;;;;  858063 0))
 ;;; Generated autoloads from gnus/gnus-art.el
 
 (autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -11768,8 +12017,8 @@ supported.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20791 9657
-;;;;;;  561026 0))
+;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20988 22031
+;;;;;;  837044 0))
 ;;; Generated autoloads from gnus/gnus-delay.el
 
 (autoload 'gnus-delay-article "gnus-delay" "\
@@ -11905,8 +12154,8 @@ If gravatars are already displayed, remove them.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20929 34089
-;;;;;;  117790 0))
+;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20988 22031
+;;;;;;  837044 0))
 ;;; Generated autoloads from gnus/gnus-group.el
 
 (autoload 'gnus-fetch-group "gnus-group" "\
@@ -12078,8 +12327,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20858 21542
-;;;;;;  723007 0))
+;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20974 22577
+;;;;;;  548213 0))
 ;;; Generated autoloads from gnus/gnus-msg.el
 
 (autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12214,8 +12463,8 @@ Add NUM into sorted LIST by side effect.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20779
-;;;;;;  18487 859617 0))
+;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20955
+;;;;;;  58152 201869 0))
 ;;; Generated autoloads from gnus/gnus-registry.el
 
 (autoload 'gnus-registry-initialize "gnus-registry" "\
@@ -12269,8 +12518,8 @@ Update the format specification near point.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20763 30266
-;;;;;;  231060 0))
+;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20986 60038
+;;;;;;  720063 0))
 ;;; Generated autoloads from gnus/gnus-start.el
 
 (autoload 'gnus-declare-backend "gnus-start" "\
@@ -12280,8 +12529,8 @@ Declare back end NAME with ABILITIES as a Gnus back end.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20901 54695
-;;;;;;  989166 0))
+;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20984 58408
+;;;;;;  354075 0))
 ;;; Generated autoloads from gnus/gnus-sum.el
 
 (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12319,7 +12568,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnutls" "net/gnutls.el" (20709 26818 907104
+;;;### (autoloads nil "gnutls" "net/gnutls.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from net/gnutls.el
 
@@ -12336,7 +12585,7 @@ A value of nil says to use the default GnuTLS value.")
 
 ;;;***
 \f
-;;;### (autoloads nil "gomoku" "play/gomoku.el" (20709 26818 907104
+;;;### (autoloads nil "gomoku" "play/gomoku.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from play/gomoku.el
 
@@ -12688,7 +12937,7 @@ it if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (20709 26818 907104
+;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21002 1963 769129
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/gv.el
 
@@ -13085,7 +13334,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file.
 
 ;;;***
 \f
-;;;### (autoloads nil "help-macro" "help-macro.el" (20709 26818 907104
+;;;### (autoloads nil "help-macro" "help-macro.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from help-macro.el
 
@@ -13100,7 +13349,7 @@ gives the window that lists the options.")
 
 ;;;***
 \f
-;;;### (autoloads nil "help-mode" "help-mode.el" (20920 19111 869400
+;;;### (autoloads nil "help-mode" "help-mode.el" (20999 25770 522517
 ;;;;;;  0))
 ;;; Generated autoloads from help-mode.el
 
@@ -13200,8 +13449,8 @@ BOOKMARK is a bookmark name or a bookmark record.
 
 ;;;***
 \f
-;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from emacs-lisp/helper.el
 
 (autoload 'Helper-describe-bindings "helper" "\
@@ -13588,7 +13837,7 @@ Unconditionally turn off `hs-minor-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20709 26818 907104
+;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from hilit-chg.el
 
@@ -13720,10 +13969,10 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20709 26818 907104
+;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from hippie-exp.el
-(push (purecopy (quote (hippie-exp 1 6))) package--builtin-versions)
+(push (purecopy '(hippie-exp 1 6)) package--builtin-versions)
 (defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\
 The list of expansion functions tried in order by `hippie-expand'.
 To change the behavior of `hippie-expand', remove, change the order of,
@@ -13752,7 +14001,7 @@ argument VERBOSE non-nil makes the function verbose.
 
 ;;;***
 \f
-;;;### (autoloads nil "hl-line" "hl-line.el" (20709 26818 907104
+;;;### (autoloads nil "hl-line" "hl-line.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from hl-line.el
 
@@ -13965,7 +14214,7 @@ Convert HTML to plain text in the current buffer.
 ;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065
 ;;;;;;  383398 0))
 ;;; Generated autoloads from htmlfontify.el
-(push (purecopy (quote (htmlfontify 0 21))) package--builtin-versions)
+(push (purecopy '(htmlfontify 0 21)) package--builtin-versions)
 (autoload 'htmlfontify-buffer "htmlfontify" "\
 Create a new buffer, named for the current buffer + a .html extension,
 containing an inline CSS-stylesheet and formatted CSS-markup HTML
@@ -14084,8 +14333,8 @@ bound to the current value of the filter.
 
 ;;;***
 \f
-;;;### (autoloads nil "ibuffer" "ibuffer.el" (20921 40206 193565
-;;;;;;  167000))
+;;;### (autoloads nil "ibuffer" "ibuffer.el" (20999 25770 522517
+;;;;;;  0))
 ;;; Generated autoloads from ibuffer.el
 
 (autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14127,7 +14376,7 @@ FORMATS is the value to use for `ibuffer-formats'.
 ;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709
 ;;;;;;  26818 907104 0))
 ;;; Generated autoloads from calendar/icalendar.el
-(push (purecopy (quote (icalendar 0 19))) package--builtin-versions)
+(push (purecopy '(icalendar 0 19)) package--builtin-versions)
 (autoload 'icalendar-export-file "icalendar" "\
 Export diary file to iCalendar format.
 All diary entries in the file DIARY-FILENAME are converted to iCalendar
@@ -14177,7 +14426,7 @@ buffer `*icalendar-errors*'.
 
 ;;;***
 \f
-;;;### (autoloads nil "icomplete" "icomplete.el" (20766 59066 666084
+;;;### (autoloads nil "icomplete" "icomplete.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from icomplete.el
 
@@ -14270,7 +14519,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
 ;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089
 ;;;;;;  117790 0))
 ;;; Generated autoloads from progmodes/idlwave.el
-(push (purecopy (quote (idlwave 6 1 22))) package--builtin-versions)
+(push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
 (autoload 'idlwave-mode "idlwave" "\
 Major mode for editing IDL source files (version 6.1_em22).
 
@@ -14395,17 +14644,17 @@ The main features of this mode are
 
 ;;;***
 \f
-;;;### (autoloads nil "ido" "ido.el" (20937 28198 475168 0))
+;;;### (autoloads nil "ido" "ido.el" (20996 49577 892030 0))
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
-Determines for which functional group (buffer and files) ido behavior
-should be enabled.  The following values are possible:
+Determines for which buffer/file Ido should be enabled.
+The following values are possible:
 - `buffer': Turn only on ido buffer behavior (switching, killing,
   displaying...)
 - `file': Turn only on ido file behavior (finding, writing, inserting...)
 - `both': Turn on ido buffer and file behavior.
-- `nil': Turn off any ido switching.
+-  nil: Turn off any ido switching.
 
 Setting this variable directly does not take effect;
 use either \\[customize] or the function `ido-mode'.")
@@ -14681,7 +14930,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
 
 ;;;***
 \f
-;;;### (autoloads nil "image" "image.el" (20903 10024 645978 0))
+;;;### (autoloads nil "image" "image.el" (21005 64551 555603 0))
 ;;; Generated autoloads from image.el
 
 (autoload 'image-type-from-data "image" "\
@@ -14874,10 +15123,10 @@ If Emacs is compiled without ImageMagick support, this does nothing.
 
 ;;;***
 \f
-;;;### (autoloads nil "image-dired" "image-dired.el" (20921 39978
-;;;;;;  248467 0))
+;;;### (autoloads nil "image-dired" "image-dired.el" (20971 46377
+;;;;;;  737658 0))
 ;;; Generated autoloads from image-dired.el
-(push (purecopy (quote (image-dired 0 4 11))) package--builtin-versions)
+(push (purecopy '(image-dired 0 4 11)) package--builtin-versions)
 (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\
 Toggle thumbnails in front of file names in the dired buffer.
 If no marked file could be found, insert or hide thumbnails on the
@@ -15074,7 +15323,7 @@ An image file is one whose name has an extension in
 
 ;;;***
 \f
-;;;### (autoloads nil "image-mode" "image-mode.el" (20899 12965 791908
+;;;### (autoloads nil "image-mode" "image-mode.el" (21005 64551 555603
 ;;;;;;  0))
 ;;; Generated autoloads from image-mode.el
 
@@ -15083,6 +15332,9 @@ Major mode for image files.
 You can use \\<image-mode-map>\\[image-toggle-display]
 to toggle between display as an image and display as text.
 
+Key bindings:
+\\{image-mode-map}
+
 \(fn)" t nil)
 
 (autoload 'image-minor-mode "image-mode" "\
@@ -15307,7 +15559,7 @@ of `inferior-lisp-program').  Runs the hooks from
 
 ;;;***
 \f
-;;;### (autoloads nil "info" "info.el" (20940 4391 641153 0))
+;;;### (autoloads nil "info" "info.el" (20992 52525 458637 0))
 ;;; Generated autoloads from info.el
 
 (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\
@@ -15566,10 +15818,10 @@ Perform completion on file preceding point.
 
 ;;;***
 \f
-;;;### (autoloads nil "info-xref" "info-xref.el" (20938 49065 383398
+;;;### (autoloads nil "info-xref" "info-xref.el" (20947 64044 876888
 ;;;;;;  0))
 ;;; Generated autoloads from info-xref.el
-(push (purecopy (quote (info-xref 3))) package--builtin-versions)
+(push (purecopy '(info-xref 3)) package--builtin-versions)
 (autoload 'info-xref-check "info-xref" "\
 Check external references in FILENAME, an info document.
 Interactively from an `Info-mode' or `texinfo-mode' buffer the
@@ -15698,7 +15950,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"
 ;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310
 ;;;;;;  425822 0))
 ;;; Generated autoloads from cedet/inversion.el
-(push (purecopy (quote (inversion 1 3))) package--builtin-versions)
+(push (purecopy '(inversion 1 3)) package--builtin-versions)
 (autoload 'inversion-require-emacs "inversion" "\
 Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver.
 Only checks one based on which kind of Emacs is being run.
@@ -15731,7 +15983,7 @@ Toggle input method in interactive search.
 ;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from isearchb.el
-(push (purecopy (quote (isearchb 1 5))) package--builtin-versions)
+(push (purecopy '(isearchb 1 5)) package--builtin-versions)
 (autoload 'isearchb-activate "isearchb" "\
 Active isearchb mode for subsequent alphanumeric keystrokes.
 Executing this command again will terminate the search; or, if
@@ -15841,8 +16093,8 @@ Add submenus to the File menu, to convert to and from various formats.
 
 ;;;***
 \f
-;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20847 51240
-;;;;;;  240216 0))
+;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from textmodes/ispell.el
 
 (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
@@ -16179,7 +16431,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
 
 ;;;***
 \f
-;;;### (autoloads nil "jka-compr" "jka-compr.el" (20759 33211 414988
+;;;### (autoloads nil "jka-compr" "jka-compr.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from jka-compr.el
 
@@ -16203,10 +16455,9 @@ by `jka-compr-installed'.
 
 ;;;***
 \f
-;;;### (autoloads nil "js" "progmodes/js.el" (20895 15912 444844
-;;;;;;  0))
+;;;### (autoloads nil "js" "progmodes/js.el" (20998 4934 952905 0))
 ;;; Generated autoloads from progmodes/js.el
-(push (purecopy (quote (js 9))) package--builtin-versions)
+(push (purecopy '(js 9)) package--builtin-versions)
 (autoload 'js-mode "js" "\
 Major mode for editing JavaScript.
 
@@ -16215,9 +16466,9 @@ Major mode for editing JavaScript.
 
 ;;;***
 \f
-;;;### (autoloads nil "json" "json.el" (20709 26818 907104 0))
+;;;### (autoloads nil "json" "json.el" (20998 4934 952905 0))
 ;;; Generated autoloads from json.el
-(push (purecopy (quote (json 1 4))) package--builtin-versions)
+(push (purecopy '(json 1 4)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818
@@ -16298,7 +16549,7 @@ the context of text formatting.
 
 ;;;***
 \f
-;;;### (autoloads nil "kkc" "international/kkc.el" (20799 169 640767
+;;;### (autoloads nil "kkc" "international/kkc.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from international/kkc.el
 
@@ -16447,8 +16698,8 @@ The kind of Korean keyboard for Korean input method.
 
 ;;;***
 \f
-;;;### (autoloads nil "landmark" "play/landmark.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "landmark" "play/landmark.el" (20992 52525
+;;;;;;  458637 0))
 ;;; Generated autoloads from play/landmark.el
 
 (defalias 'landmark-repeat 'landmark-test-run)
@@ -16601,7 +16852,7 @@ A major mode to edit GNU ld script files
 
 ;;;***
 \f
-;;;### (autoloads nil "life" "play/life.el" (20709 26818 907104 0))
+;;;### (autoloads nil "life" "play/life.el" (20998 4934 952905 0))
 ;;; Generated autoloads from play/life.el
 
 (autoload 'life "life" "\
@@ -16616,7 +16867,7 @@ generations (this defaults to 1).
 \f
 ;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0))
 ;;; Generated autoloads from linum.el
-(push (purecopy (quote (linum 0 9 24))) package--builtin-versions)
+(push (purecopy '(linum 0 9 24)) package--builtin-versions)
 (autoload 'linum-mode "linum" "\
 Toggle display of line numbers in the left margin (Linum mode).
 With a prefix argument ARG, enable Linum mode if ARG is positive,
@@ -16766,7 +17017,7 @@ done.  Otherwise, it uses the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "log-view" "vc/log-view.el" (20918 63784 852859
+;;;### (autoloads nil "log-view" "vc/log-view.el" (20986 13739 89657
 ;;;;;;  0))
 ;;; Generated autoloads from vc/log-view.el
 
@@ -16777,7 +17028,7 @@ Major mode for browsing CVS log output.
 
 ;;;***
 \f
-;;;### (autoloads nil "lpr" "lpr.el" (20878 6823 881439 0))
+;;;### (autoloads nil "lpr" "lpr.el" (20975 43430 521692 0))
 ;;; Generated autoloads from lpr.el
 
 (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\
@@ -17184,8 +17435,8 @@ double-quotes.
 
 ;;;***
 \f
-;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20970 25513
+;;;;;;  362767 0))
 ;;; Generated autoloads from mail/mailalias.el
 
 (defvar mail-complete-style 'angles "\
@@ -17437,7 +17688,7 @@ Default bookmark handler for Man buffers.
 \f
 ;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000))
 ;;; Generated autoloads from master.el
-(push (purecopy (quote (master 1 0 2))) package--builtin-versions)
+(push (purecopy '(master 1 0 2)) package--builtin-versions)
 (autoload 'master-mode "master" "\
 Toggle Master mode.
 With a prefix argument ARG, enable Master mode if ARG is
@@ -17487,10 +17738,10 @@ recursion depth in the minibuffer prompt.  This is only useful if
 \f
 ;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0))
 ;;; Generated autoloads from md4.el
-(push (purecopy (quote (md4 1 0))) package--builtin-versions)
+(push (purecopy '(md4 1 0)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "message" "gnus/message.el" (20889 63525 775294
+;;;### (autoloads nil "message" "gnus/message.el" (20986 60038 720063
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/message.el
 
@@ -17659,7 +17910,7 @@ which specify the range to operate on.
 ;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874
 ;;;;;;  62962 290468 0))
 ;;; Generated autoloads from progmodes/meta-mode.el
-(push (purecopy (quote (meta-mode 1 0))) package--builtin-versions)
+(push (purecopy '(meta-mode 1 0)) package--builtin-versions)
 (autoload 'metafont-mode "meta-mode" "\
 Major mode for editing Metafont sources.
 
@@ -17807,9 +18058,9 @@ delete the draft message.
 
 ;;;***
 \f
-;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20874 65006 672942 217000))
+;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20987 34598 970563 0))
 ;;; Generated autoloads from mh-e/mh-e.el
-(push (purecopy (quote (mh-e 8 5))) package--builtin-versions)
+(push (purecopy '(mh-e 8 5)) package--builtin-versions)
 (put 'mh-progs 'risky-local-variable t)
 
 (put 'mh-lib 'risky-local-variable t)
@@ -18072,10 +18323,10 @@ whose file names match the specified wildcard.
 
 ;;;***
 \f
-;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (20709
-;;;;;;  26818 907104 0))
+;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21002
+;;;;;;  1963 769129 0))
 ;;; Generated autoloads from progmodes/mixal-mode.el
-(push (purecopy (quote (mixal-mode 0 1))) package--builtin-versions)
+(push (purecopy '(mixal-mode 0 1)) package--builtin-versions)
 (autoload 'mixal-mode "mixal-mode" "\
 Major mode for the mixal asm language.
 
@@ -18205,7 +18456,7 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 \f
-;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20922 60838 997229
+;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20986 60038 720063
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/mml2015.el
 
@@ -18314,7 +18565,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text.
 
 ;;;***
 \f
-;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20709 26818 907104
+;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from mouse-drag.el
 
@@ -18362,7 +18613,7 @@ To test this function, evaluate:
 
 ;;;***
 \f
-;;;### (autoloads nil "mpc" "mpc.el" (20838 36262 626321 0))
+;;;### (autoloads nil "mpc" "mpc.el" (20998 4934 952905 0))
 ;;; Generated autoloads from mpc.el
 
 (autoload 'mpc "mpc" "\
@@ -18382,7 +18633,7 @@ Multiplication puzzle with GNU Emacs.
 
 ;;;***
 \f
-;;;### (autoloads nil "msb" "msb.el" (20709 26818 907104 0))
+;;;### (autoloads nil "msb" "msb.el" (20999 25770 522517 0))
 ;;; Generated autoloads from msb.el
 
 (defvar msb-mode nil "\
@@ -18540,8 +18791,8 @@ The default is 20.  If LIMIT is negative, do not limit the listing.
 
 ;;;***
 \f
-;;;### (autoloads nil "mule-util" "international/mule-util.el" (20826
-;;;;;;  45095 436233 0))
+;;;### (autoloads nil "mule-util" "international/mule-util.el" (20991
+;;;;;;  31656 363459 0))
 ;;; Generated autoloads from international/mule-util.el
 
 (defsubst string-to-list (string) "\
@@ -18670,92 +18921,6 @@ per-character basis, this may not be accurate.
 
 \(fn CHAR)" nil nil)
 
-;;;***
-\f
-;;;### (autoloads nil "nadvice" "emacs-lisp/nadvice.el" (20940 4391
-;;;;;;  641153 0))
-;;; Generated autoloads from emacs-lisp/nadvice.el
-
-(autoload 'advice--remove-function "nadvice" "\
-
-
-\(fn FLIST FUNCTION)" nil nil)
-
-(autoload 'advice--buffer-local "nadvice" "\
-Buffer-local value of VAR, presumed to contain a function.
-
-\(fn VAR)" nil nil)
-
-(autoload 'add-function "nadvice" "\
-Add a piece of advice on the function stored at PLACE.
-FUNCTION describes the code to add.  WHERE describes where to add it.
-WHERE can be explained by showing the resulting new function, as the
-result of combining FUNCTION and the previous value of PLACE, which we
-call OLDFUN here:
-`:before'      (lambda (&rest r) (apply FUNCTION r) (apply OLDFUN r))
-`:after'       (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r)))
-`:around'      (lambda (&rest r) (apply FUNCTION OLDFUN r))
-`:override'    (lambda (&rest r) (apply FUNCTION r))
-`:before-while'        (lambda (&rest r) (and (apply FUNCTION r) (apply OLDFUN r)))
-`:before-until'        (lambda (&rest r) (or  (apply FUNCTION r) (apply OLDFUN r)))
-`:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r)))
-`:after-until' (lambda (&rest r) (or  (apply OLDFUN r) (apply FUNCTION r)))
-`:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r)))
-`:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r)))
-If FUNCTION was already added, do nothing.
-PROPS is an alist of additional properties, among which the following have
-a special meaning:
-- `name': a string or symbol.  It can be used to refer to this piece of advice.
-
-If PLACE is a simple variable, only its global value will be affected.
-Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally.
-
-If one of FUNCTION or OLDFUN is interactive, then the resulting function
-is also interactive.  There are 3 cases:
-- FUNCTION is not interactive: the interactive spec of OLDFUN is used.
-- The interactive spec of FUNCTION is itself a function: it should take one
-  argument (the interactive spec of OLDFUN, which it can pass to
-  `advice-eval-interactive-spec') and return the list of arguments to use.
-- Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN.
-
-\(fn WHERE PLACE FUNCTION &optional PROPS)" nil t)
-
-(autoload 'advice--add-function "nadvice" "\
-
-
-\(fn WHERE REF FUNCTION PROPS)" nil nil)
-
-(autoload 'remove-function "nadvice" "\
-Remove the FUNCTION piece of advice from PLACE.
-If FUNCTION was not added to PLACE, do nothing.
-Instead of FUNCTION being the actual function, it can also be the `name'
-of the piece of advice.
-
-\(fn PLACE FUNCTION)" nil t)
-
-(autoload 'advice-add "nadvice" "\
-Like `add-function' but for the function named SYMBOL.
-Contrary to `add-function', this will properly handle the cases where SYMBOL
-is defined as a macro, alias, command, ...
-
-\(fn SYMBOL WHERE FUNCTION &optional PROPS)" nil nil)
-
-(autoload 'advice-remove "nadvice" "\
-Like `remove-function' but for the function named SYMBOL.
-Contrary to `remove-function', this also works when SYMBOL is a macro
-or an autoload and it preserves `fboundp'.
-Instead of the actual function to remove, FUNCTION can also be the `name'
-of the piece of advice.
-
-\(fn SYMBOL FUNCTION)" nil nil)
-
-(autoload 'advice-member-p "nadvice" "\
-Return non-nil if ADVICE has been added to FUNCTION-NAME.
-Instead of ADVICE being the actual function, it can also be the `name'
-of the piece of advice.
-
-\(fn ADVICE FUNCTION-NAME)" nil nil)
-
 ;;;***
 \f
 ;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024
@@ -18866,8 +19031,8 @@ listed in the PORTS list.
 
 ;;;***
 \f
-;;;### (autoloads nil "network-stream" "net/network-stream.el" (20770
-;;;;;;  3512 176098 0))
+;;;### (autoloads nil "network-stream" "net/network-stream.el" (20984
+;;;;;;  58408 354075 0))
 ;;; Generated autoloads from net/network-stream.el
 
 (autoload 'open-network-stream "network-stream" "\
@@ -18948,6 +19113,9 @@ values:
 :use-starttls-if-possible is a boolean that says to do opportunistic
 STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
 
+:nogreeting is a boolean that can be used to inhibit waiting for
+a greeting from the server.
+
 :nowait is a boolean that says the connection should be made
   asynchronously, if possible.
 
@@ -18980,7 +19148,7 @@ Run `newsticker-start-hook' if newsticker was not running already.
 ;;;***
 \f
 ;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el"
-;;;;;;  (20762 9398 526093 0))
+;;;;;;  (20992 52525 458637 0))
 ;;; Generated autoloads from net/newst-plainview.el
 
 (autoload 'newsticker-plainview "newst-plainview" "\
@@ -19036,7 +19204,7 @@ Start newsticker treeview.
 ;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from net/newsticker.el
-(push (purecopy (quote (newsticker 1 99))) package--builtin-versions)
+(push (purecopy '(newsticker 1 99)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104
@@ -19080,10 +19248,10 @@ This command does not work if you use short group names.
 ;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from gnus/nnmairix.el
-(push (purecopy (quote (nnmairix 0 6))) package--builtin-versions)
+(push (purecopy '(nnmairix 0 6)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "nnml" "gnus/nnml.el" (20709 26818 907104 0))
+;;;### (autoloads nil "nnml" "gnus/nnml.el" (20955 58152 201869 0))
 ;;; Generated autoloads from gnus/nnml.el
 
 (autoload 'nnml-generate-nov-databases "nnml" "\
@@ -19142,7 +19310,7 @@ closing requests for requests that are used in matched pairs.
 \f
 ;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0))
 ;;; Generated autoloads from net/ntlm.el
-(push (purecopy (quote (ntlm 1 0))) package--builtin-versions)
+(push (purecopy '(ntlm 1 0)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818
@@ -19987,10 +20155,10 @@ See the command `outline-mode' for more information on this mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (20938 49065
-;;;;;;  383398 0))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (21022 27213
+;;;;;;  317995 0))
 ;;; Generated autoloads from emacs-lisp/package.el
-(push (purecopy (quote (package 1 0 1))) package--builtin-versions)
+(push (purecopy '(package 1 0 1)) package--builtin-versions)
 (defvar package-enable-at-startup t "\
 Whether to activate installed packages when Emacs starts.
 If non-nil, packages are activated after reading the init file
@@ -20169,8 +20337,8 @@ Check if KEY is in the cache.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20717 20920
-;;;;;;  410005 0))
+;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20991 31656
+;;;;;;  363459 0))
 ;;; Generated autoloads from emacs-lisp/pcase.el
 
 (autoload 'pcase "pcase" "\
@@ -20436,7 +20604,7 @@ Setup `shell-mode' to use pcomplete.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20717 20920 410005 0))
+;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20983 37555 279226 0))
 ;;; Generated autoloads from vc/pcvs.el
 
 (autoload 'cvs-checkout "pcvs" "\
@@ -20717,7 +20885,7 @@ Use streaming commands.
 
 ;;;***
 \f
-;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (20709 26818 907104
+;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21013 58662 278539
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/pp.el
 
@@ -20768,10 +20936,10 @@ Ignores leading comment characters.
 
 ;;;***
 \f
-;;;### (autoloads nil "printing" "printing.el" (20891 44219 680764
+;;;### (autoloads nil "printing" "printing.el" (20975 43430 521692
 ;;;;;;  0))
 ;;; Generated autoloads from printing.el
-(push (purecopy (quote (printing 6 9 3))) package--builtin-versions)
+(push (purecopy '(printing 6 9 3)) package--builtin-versions)
 (autoload 'pr-interface "printing" "\
 Activate the printing interface buffer.
 
@@ -21453,7 +21621,7 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").")
 ;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161
 ;;;;;;  848428 0))
 ;;; Generated autoloads from progmodes/ps-mode.el
-(push (purecopy (quote (ps-mode 1 1 9))) package--builtin-versions)
+(push (purecopy '(ps-mode 1 1 9)) package--builtin-versions)
 (autoload 'ps-mode "ps-mode" "\
 Major mode for editing PostScript with GNU Emacs.
 
@@ -21497,10 +21665,10 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
 
 ;;;***
 \f
-;;;### (autoloads nil "ps-print" "ps-print.el" (20874 65006 672942
-;;;;;;  217000))
+;;;### (autoloads nil "ps-print" "ps-print.el" (20975 43430 521692
+;;;;;;  0))
 ;;; Generated autoloads from ps-print.el
-(push (purecopy (quote (ps-print 7 3 5))) package--builtin-versions)
+(push (purecopy '(ps-print 7 3 5)) package--builtin-versions)
 (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\
 List associating a symbolic paper type to its width, height and doc media.
 See `ps-paper-type'.")
@@ -21697,13 +21865,13 @@ If EXTENSION is any other symbol, it is ignored.
 ;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/pulse.el
-(push (purecopy (quote (pulse 1 0))) package--builtin-versions)
+(push (purecopy '(pulse 1 0)) package--builtin-versions)
 ;;;***
 \f
-;;;### (autoloads nil "python" "progmodes/python.el" (20928 13222
-;;;;;;  500272 0))
+;;;### (autoloads nil "python" "progmodes/python.el" (21020 31917
+;;;;;;  145164 0))
 ;;; Generated autoloads from progmodes/python.el
-(push (purecopy (quote (python 0 24 2))) package--builtin-versions)
+(push (purecopy '(python 0 24 2)) package--builtin-versions)
 (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
 
 (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
@@ -21755,8 +21923,8 @@ them into characters should be done separately.
 
 ;;;***
 \f
-;;;### (autoloads nil "quail" "international/quail.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "quail" "international/quail.el" (20998 4934
+;;;;;;  952905 0))
 ;;; Generated autoloads from international/quail.el
 
 (autoload 'quail-title "quail" "\
@@ -22057,7 +22225,8 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "rcirc" "net/rcirc.el" (20770 3512 176098 0))
+;;;### (autoloads nil "rcirc" "net/rcirc.el" (20992 52525 458637
+;;;;;;  0))
 ;;; Generated autoloads from net/rcirc.el
 
 (autoload 'rcirc "rcirc" "\
@@ -22107,8 +22276,8 @@ See \\[compile].
 
 ;;;***
 \f
-;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20709
-;;;;;;  26818 907104 0))
+;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20984
+;;;;;;  58408 354075 0))
 ;;; Generated autoloads from emacs-lisp/re-builder.el
 
 (defalias 'regexp-builder 're-builder)
@@ -22494,13 +22663,13 @@ This means the number of non-shy regexp grouping constructs
 ;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/regi.el
-(push (purecopy (quote (regi 1 8))) package--builtin-versions)
+(push (purecopy '(regi 1 8)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315
 ;;;;;;  8369 0))
 ;;; Generated autoloads from textmodes/remember.el
-(push (purecopy (quote (remember 2 0))) package--builtin-versions)
+(push (purecopy '(remember 2 0)) package--builtin-versions)
 (autoload 'remember "remember" "\
 Remember an arbitrary piece of data.
 INITIAL is the text to initially place in the *Remember* buffer,
@@ -22557,7 +22726,7 @@ preserve across Emacs restarts.  The notes will be stored in the
 \f
 ;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0))
 ;;; Generated autoloads from repeat.el
-(push (purecopy (quote (repeat 0 51))) package--builtin-versions)
+(push (purecopy '(repeat 0 51)) package--builtin-versions)
 (autoload 'repeat "repeat" "\
 Repeat most recently executed command.
 If REPEAT-ARG is non-nil (interactively, with a prefix argument),
@@ -22609,7 +22778,7 @@ mail-sending package is used for editing and sending the message.
 
 ;;;***
 \f
-;;;### (autoloads nil "reposition" "reposition.el" (20709 26818 907104
+;;;### (autoloads nil "reposition" "reposition.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from reposition.el
 
@@ -22732,7 +22901,7 @@ variable.
 
 ;;;***
 \f
-;;;### (autoloads nil "rmail" "mail/rmail.el" (20892 39729 858825
+;;;### (autoloads nil "rmail" "mail/rmail.el" (20992 52525 458637
 ;;;;;;  0))
 ;;; Generated autoloads from mail/rmail.el
 
@@ -22995,8 +23164,8 @@ than appending to it.  Deletes the message after writing if
 
 ;;;***
 \f
-;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20998 4934
+;;;;;;  952905 0))
 ;;; Generated autoloads from nxml/rng-cmpct.el
 
 (autoload 'rng-c-load-schema "rng-cmpct" "\
@@ -23112,7 +23281,7 @@ Start using robin package NAME, which is a string.
 
 ;;;***
 \f
-;;;### (autoloads nil "rot13" "rot13.el" (20709 26818 907104 0))
+;;;### (autoloads nil "rot13" "rot13.el" (20992 52525 458637 0))
 ;;; Generated autoloads from rot13.el
 
 (autoload 'rot13 "rot13" "\
@@ -23180,10 +23349,10 @@ for modes derived from Text mode, like Mail mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (20944
-;;;;;;  1446 914400 0))
+;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21024
+;;;;;;  28968 738399 0))
 ;;; Generated autoloads from progmodes/ruby-mode.el
-(push (purecopy (quote (ruby-mode 1 2))) package--builtin-versions)
+(push (purecopy '(ruby-mode 1 2)) package--builtin-versions)
 (autoload 'ruby-mode "ruby-mode" "\
 Major mode for editing Ruby scripts.
 \\[ruby-indent-line] properly indents subexpressions of multi-line
@@ -23205,7 +23374,7 @@ The variable `ruby-indent-level' controls the amount of indentation.
 ;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026
 ;;;;;;  0))
 ;;; Generated autoloads from ruler-mode.el
-(push (purecopy (quote (ruler-mode 1 6))) package--builtin-versions)
+(push (purecopy '(ruler-mode 1 6)) package--builtin-versions)
 (defvar ruler-mode nil "\
 Non-nil if Ruler mode is enabled.
 Use the command `ruler-mode' to change this variable.")
@@ -23535,13 +23704,13 @@ enclosed in `(and ...)'.
 ;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from net/sasl-ntlm.el
-(push (purecopy (quote (sasl 1 0))) package--builtin-versions)
+(push (purecopy '(sasl 1 0)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104
 ;;;;;;  0))
 ;;; Generated autoloads from savehist.el
-(push (purecopy (quote (savehist 24))) package--builtin-versions)
+(push (purecopy '(savehist 24)) package--builtin-versions)
 (defvar savehist-mode nil "\
 Non-nil if Savehist mode is enabled.
 See the command `savehist-mode' for a description of this minor mode.
@@ -23680,7 +23849,7 @@ vertically fixed relative to window boundaries during scrolling.
 ;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948
 ;;;;;;  216644 0))
 ;;; Generated autoloads from cedet/semantic.el
-(push (purecopy (quote (semantic 2 2))) package--builtin-versions)
+(push (purecopy '(semantic 2 2)) package--builtin-versions)
 (defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\
 List of auxiliary Semantic minor modes enabled by `semantic-mode'.
 The possible elements of this list include the following:
@@ -23756,8 +23925,8 @@ Major mode for editing Wisent grammars.
 
 ;;;***
 \f
-;;;### (autoloads nil "sendmail" "mail/sendmail.el" (20723 59703
-;;;;;;  12265 0))
+;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21002 1963 769129
+;;;;;;  0))
 ;;; Generated autoloads from mail/sendmail.el
 
 (defvar mail-from-style 'default "\
@@ -24038,7 +24207,7 @@ Like `mail' command, but display mail buffer in another frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "server" "server.el" (20763 30266 231060 0))
+;;;### (autoloads nil "server" "server.el" (20992 52525 458637 0))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -24105,7 +24274,7 @@ only these files will be asked to be saved.
 
 ;;;***
 \f
-;;;### (autoloads nil "ses" "ses.el" (20709 26818 907104 0))
+;;;### (autoloads nil "ses" "ses.el" (20999 25770 522517 0))
 ;;; Generated autoloads from ses.el
 
 (autoload 'ses-mode "ses" "\
@@ -24189,10 +24358,10 @@ To work around that, do:
 
 ;;;***
 \f
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (20850
-;;;;;;  27430 515630 0))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21022
+;;;;;;  40320 762131 34000))
 ;;; Generated autoloads from progmodes/sh-script.el
-(push (purecopy (quote (sh-script 2 0 6))) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp)
+(push (purecopy '(sh-script 2 0 6)) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp)
 
 (autoload 'sh-mode "sh-script" "\
 Major mode for editing shell scripts.
@@ -24303,7 +24472,7 @@ function, `load-path-shadows-find'.
 
 ;;;***
 \f
-;;;### (autoloads nil "shadowfile" "shadowfile.el" (20799 169 640767
+;;;### (autoloads nil "shadowfile" "shadowfile.el" (20959 55207 940876
 ;;;;;;  0))
 ;;; Generated autoloads from shadowfile.el
 
@@ -24342,7 +24511,7 @@ Set up file shadowing.
 
 ;;;***
 \f
-;;;### (autoloads nil "shell" "shell.el" (20884 7264 912957 506000))
+;;;### (autoloads nil "shell" "shell.el" (20992 52525 458637 0))
 ;;; Generated autoloads from shell.el
 
 (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
@@ -24390,7 +24559,7 @@ Otherwise, one argument `-i' is passed to the shell.
 
 ;;;***
 \f
-;;;### (autoloads nil "shr" "net/shr.el" (20944 31824 211965 0))
+;;;### (autoloads nil "shr" "net/shr.el" (21007 19880 17663 0))
 ;;; Generated autoloads from net/shr.el
 
 (autoload 'shr-insert-document "shr" "\
@@ -24605,8 +24774,8 @@ symmetrical ones, and the same character twice for the others.
 
 ;;;***
 \f
-;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21022 27213
+;;;;;;  317995 0))
 ;;; Generated autoloads from vc/smerge-mode.el
 
 (autoload 'smerge-ediff "smerge-mode" "\
@@ -25047,7 +25216,7 @@ Spam reports will be queued with the method used when
 
 ;;;***
 \f
-;;;### (autoloads nil "speedbar" "speedbar.el" (20892 39729 858825
+;;;### (autoloads nil "speedbar" "speedbar.el" (21024 28968 738399
 ;;;;;;  0))
 ;;; Generated autoloads from speedbar.el
 
@@ -25088,10 +25257,10 @@ Return a vector containing the lines from `spook-phrases-file'.
 
 ;;;***
 \f
-;;;### (autoloads nil "sql" "progmodes/sql.el" (20878 6823 881439
+;;;### (autoloads nil "sql" "progmodes/sql.el" (20975 10147 44538
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/sql.el
-(push (purecopy (quote (sql 3 2))) package--builtin-versions)
+(push (purecopy '(sql 3 3)) package--builtin-versions)
 (autoload 'sql-add-product-keywords "sql" "\
 Add highlighting KEYWORDS for SQL PRODUCT.
 
@@ -25554,7 +25723,7 @@ buffer.
 ;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/srecode.el
-(push (purecopy (quote (srecode 1 2))) package--builtin-versions)
+(push (purecopy '(srecode 1 2)) package--builtin-versions)
 ;;;***
 \f
 ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el"
@@ -25728,8 +25897,8 @@ Studlify-case the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "subword" "progmodes/subword.el" (20886 47777
-;;;;;;  83668 440000))
+;;;### (autoloads nil "subword" "progmodes/subword.el" (20974 22577
+;;;;;;  548213 0))
 ;;; Generated autoloads from progmodes/subword.el
 
 (autoload 'subword-mode "subword" "\
@@ -25885,7 +26054,7 @@ It relies on the `gpm' daemon being activated.
 
 ;;;***
 \f
-;;;### (autoloads nil "tabify" "tabify.el" (20928 13222 500272 0))
+;;;### (autoloads nil "tabify" "tabify.el" (20999 25770 522517 0))
 ;;; Generated autoloads from tabify.el
 
 (autoload 'untabify "tabify" "\
@@ -26507,7 +26676,7 @@ converts a table into plain text without frames.  It is a companion to
 
 ;;;***
 \f
-;;;### (autoloads nil "talk" "talk.el" (20709 26818 907104 0))
+;;;### (autoloads nil "talk" "talk.el" (20992 52525 458637 0))
 ;;; Generated autoloads from talk.el
 
 (autoload 'talk-connect "talk" "\
@@ -26677,7 +26846,7 @@ Start coverage on function under point.
 ;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942
 ;;;;;;  217000))
 ;;; Generated autoloads from play/tetris.el
-(push (purecopy (quote (tetris 2 1))) package--builtin-versions)
+(push (purecopy '(tetris 2 1)) package--builtin-versions)
 (autoload 'tetris "tetris" "\
 Play the Tetris game.
 Shapes drop from the top of the screen, and the user has to move and
@@ -27154,7 +27323,7 @@ Compose Thai characters in the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "thingatpt" "thingatpt.el" (20874 62962 290468
+;;;### (autoloads nil "thingatpt" "thingatpt.el" (20999 25770 522517
 ;;;;;;  0))
 ;;; Generated autoloads from thingatpt.el
 
@@ -27219,7 +27388,7 @@ Return the Lisp list at point, or nil if none is found.
 
 ;;;***
 \f
-;;;### (autoloads nil "thumbs" "thumbs.el" (20709 26818 907104 0))
+;;;### (autoloads nil "thumbs" "thumbs.el" (20958 59019 473587 89000))
 ;;; Generated autoloads from thumbs.el
 
 (autoload 'thumbs-find-thumb "thumbs" "\
@@ -27330,7 +27499,7 @@ See also docstring of the function tibetan-compose-region.
 ;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657
 ;;;;;;  561026 0))
 ;;; Generated autoloads from textmodes/tildify.el
-(push (purecopy (quote (tildify 4 5))) package--builtin-versions)
+(push (purecopy '(tildify 4 5)) package--builtin-versions)
 (autoload 'tildify-region "tildify" "\
 Add hard spaces in the region between BEG and END.
 See variables `tildify-pattern-alist', `tildify-string-alist', and
@@ -27351,7 +27520,7 @@ This function performs no refilling of the changed text.
 
 ;;;***
 \f
-;;;### (autoloads nil "time" "time.el" (20709 26818 907104 0))
+;;;### (autoloads nil "time" "time.el" (20998 4934 952905 0))
 ;;; Generated autoloads from time.el
 
 (defvar display-time-day-and-date nil "\
@@ -27566,10 +27735,19 @@ With ARG, turn time stamping on if and only if arg is positive.
 
 ;;;***
 \f
-;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (20799
-;;;;;;  169 640767 0))
+;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21013
+;;;;;;  58662 278539 0))
 ;;; Generated autoloads from calendar/timeclock.el
-(push (purecopy (quote (timeclock 2 6 1))) package--builtin-versions)
+(push (purecopy '(timeclock 2 6 1)) package--builtin-versions)
+(defvar timeclock-mode-line-display nil "\
+Non-nil if Timeclock-Mode-Line-Display mode is enabled.
+See the command `timeclock-mode-line-display' for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `timeclock-mode-line-display'.")
+
+(custom-autoload 'timeclock-mode-line-display "timeclock" nil)
+
 (autoload 'timeclock-mode-line-display "timeclock" "\
 Toggle display of the amount of time left today in the mode line.
 If `timeclock-use-display-time' is non-nil (the default), then
@@ -27727,8 +27905,8 @@ Its value should be an event that has a binding in MENU.
 
 ;;;***
 \f
-;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20944
-;;;;;;  31824 211965 0))
+;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20982
+;;;;;;  16679 447285 0))
 ;;; Generated autoloads from calendar/todo-mode.el
 
 (autoload 'todo-show "todo-mode" "\
@@ -27770,7 +27948,7 @@ and done items are always shown on visiting a category.
 Invoking this command in Todo Archive mode visits the
 corresponding todo file, displaying the corresponding category.
 
-\(fn &optional SOLICIT-FILE)" t nil)
+\(fn &optional SOLICIT-FILE INTERACTIVE)" t nil)
 
 ;;;***
 \f
@@ -27848,7 +28026,7 @@ holds a keymap.
 ;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264
 ;;;;;;  412929 442000))
 ;;; Generated autoloads from emulation/tpu-edt.el
-(push (purecopy (quote (tpu-edt 4 5))) package--builtin-versions)
+(push (purecopy '(tpu-edt 4 5)) package--builtin-versions)
 (defvar tpu-edt-mode nil "\
 Non-nil if Tpu-Edt mode is enabled.
 See the command `tpu-edt-mode' for a description of this minor mode.
@@ -27963,7 +28141,7 @@ changing the window configuration.
 
 ;;;***
 \f
-;;;### (autoloads nil "tramp" "net/tramp.el" (20854 24486 190633
+;;;### (autoloads nil "tramp" "net/tramp.el" (21024 28968 738399
 ;;;;;;  0))
 ;;; Generated autoloads from net/tramp.el
 
@@ -28096,8 +28274,8 @@ Discard Tramp from loading remote files.
 
 ;;;***
 \f
-;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (20709 26818
-;;;;;;  907104 0))
+;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21008 40741
+;;;;;;  120196 0))
 ;;; Generated autoloads from net/tramp-ftp.el
 
 (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\
@@ -28107,7 +28285,7 @@ Discard Tramp from loading remote files.
 
 ;;;***
 \f
-;;;### (autoloads nil "tutorial" "tutorial.el" (20760 54070 584283
+;;;### (autoloads nil "tutorial" "tutorial.el" (20999 25770 522517
 ;;;;;;  0))
 ;;; Generated autoloads from tutorial.el
 
@@ -28645,8 +28823,8 @@ Might do a non-blocking connection; use `process-status' to check.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20892
-;;;;;;  39729 858825 0))
+;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20984
+;;;;;;  58408 354075 0))
 ;;; Generated autoloads from url/url-handlers.el
 
 (defvar url-handler-mode nil "\
@@ -28700,8 +28878,8 @@ accessible.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-http" "url/url-http.el" (20766 59628 334727
-;;;;;;  618000))
+;;;### (autoloads nil "url-http" "url/url-http.el" (21004 43695 993272
+;;;;;;  0))
 ;;; Generated autoloads from url/url-http.el
  (autoload 'url-default-expander "url-expand")
 
@@ -29095,7 +29273,7 @@ This uses `url-current-object', set locally to the buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "userlock" "userlock.el" (20709 26818 907104
+;;;### (autoloads nil "userlock" "userlock.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from userlock.el
 
@@ -29185,7 +29363,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc" "vc/vc.el" (20919 46844 767888 0))
+;;;### (autoloads nil "vc" "vc/vc.el" (20992 52525 458637 0))
 ;;; Generated autoloads from vc/vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -29515,7 +29693,7 @@ mode-specific menu.  `vc-annotate-color-map' and
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20900 33838 319219
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20990 10793 424093
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-bzr.el
 
@@ -29532,7 +29710,7 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20921 39978 248467
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20983 37555 279226
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-cvs.el
 (defun vc-cvs-registered (f)
@@ -29544,7 +29722,7 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20900 33838 319219
+;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20990 10793 424093
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-dir.el
 
@@ -29593,7 +29771,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20900 33838 319219
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20990 10793 424093
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-git.el
  (defun vc-git-registered (file)
@@ -29605,7 +29783,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20900 33838 319219 0))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20990 10793 424093 0))
 ;;; Generated autoloads from vc/vc-hg.el
  (defun vc-hg-registered (file)
   "Return non-nil if FILE is registered with hg."
@@ -29666,7 +29844,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20900 33838 319219
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20990 10793 424093
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-svn.el
  (defun vc-svn-registered (f)
@@ -29683,7 +29861,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
 ;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893
 ;;;;;;  60586 188550 0))
 ;;; Generated autoloads from progmodes/vera-mode.el
-(push (purecopy (quote (vera-mode 2 28))) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'")  'vera-mode))
+(push (purecopy '(vera-mode 2 28)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'")  'vera-mode))
 
 (autoload 'vera-mode "vera-mode" "\
 Major mode for editing Vera code.
@@ -29739,7 +29917,7 @@ Key bindings:
 ;;;***
 \f
 ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
-;;;;;;  (20885 2819 449152 0))
+;;;;;;  (20992 52525 458637 0))
 ;;; Generated autoloads from progmodes/verilog-mode.el
 
 (autoload 'verilog-mode "verilog-mode" "\
@@ -30530,7 +30708,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics.
 
 ;;;***
 \f
-;;;### (autoloads nil "view" "view.el" (20762 9398 526093 0))
+;;;### (autoloads nil "view" "view.el" (20999 25770 522517 0))
 ;;; Generated autoloads from view.el
 
 (defvar view-remove-frame-by-deleting t "\
@@ -30802,10 +30980,10 @@ Turn on VIP emulation of VI.
 
 ;;;***
 \f
-;;;### (autoloads nil "viper" "emulation/viper.el" (20799 169 640767
+;;;### (autoloads nil "viper" "emulation/viper.el" (20954 37295 781599
 ;;;;;;  0))
 ;;; Generated autoloads from emulation/viper.el
-(push (purecopy (quote (viper 3 14 1))) package--builtin-versions)
+(push (purecopy '(viper 3 14 1)) package--builtin-versions)
 (autoload 'toggle-viper-mode "viper" "\
 Toggle Viper on/off.
 If Viper is enabled, turn it off.  Otherwise, turn it on.
@@ -30909,9 +31087,9 @@ this is equivalent to `display-warning', using
 
 ;;;***
 \f
-;;;### (autoloads nil "wdired" "wdired.el" (20900 33838 319219 0))
+;;;### (autoloads nil "wdired" "wdired.el" (20992 52525 458637 0))
 ;;; Generated autoloads from wdired.el
-(push (purecopy (quote (wdired 2 0))) package--builtin-versions)
+(push (purecopy '(wdired 2 0)) package--builtin-versions)
 (autoload 'wdired-change-to-wdired-mode "wdired" "\
 Put a Dired buffer in Writable Dired (WDired) mode.
 \\<wdired-mode-map>
@@ -30974,10 +31152,10 @@ in certain major modes.
 
 ;;;***
 \f
-;;;### (autoloads nil "whitespace" "whitespace.el" (20874 65007 172950
-;;;;;;  7000))
+;;;### (autoloads nil "whitespace" "whitespace.el" (20986 60038 720063
+;;;;;;  0))
 ;;; Generated autoloads from whitespace.el
-(push (purecopy (quote (whitespace 13 2 2))) package--builtin-versions)
+(push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
 (autoload 'whitespace-mode "whitespace" "\
 Toggle whitespace visualization (Whitespace mode).
 With a prefix argument ARG, enable Whitespace mode if ARG is
@@ -31402,7 +31580,7 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "wid-edit" "wid-edit.el" (20945 22315 8369
+;;;### (autoloads nil "wid-edit" "wid-edit.el" (20959 55207 940876
 ;;;;;;  0))
 ;;; Generated autoloads from wid-edit.el
 
@@ -31498,7 +31676,7 @@ Default MODIFIER is 'shift.
 
 ;;;***
 \f
-;;;### (autoloads nil "winner" "winner.el" (20849 6570 598687 0))
+;;;### (autoloads nil "winner" "winner.el" (20992 52525 458637 0))
 ;;; Generated autoloads from winner.el
 
 (defvar winner-mode nil "\
@@ -31521,9 +31699,9 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
 
 ;;;***
 \f
-;;;### (autoloads nil "woman" "woman.el" (20709 26818 907104 0))
+;;;### (autoloads nil "woman" "woman.el" (20999 25770 522517 0))
 ;;; Generated autoloads from woman.el
-(push (purecopy (quote (woman 0 551))) package--builtin-versions)
+(push (purecopy '(woman 0 551)) package--builtin-versions)
 (defvar woman-locale nil "\
 String specifying a manual page locale, or nil.
 If a manual page is available in the specified locale
@@ -31572,7 +31750,7 @@ Default bookmark handler for Woman buffers.
 ;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818
 ;;;;;;  907104 0))
 ;;; Generated autoloads from emulation/ws-mode.el
-(push (purecopy (quote (ws-mode 0 7))) package--builtin-versions)
+(push (purecopy '(ws-mode 0 7)) package--builtin-versions)
 (autoload 'wordstar-mode "ws-mode" "\
 Major mode with WordStar-like key bindings.
 
@@ -31682,7 +31860,7 @@ The key bindings are:
 
 ;;;***
 \f
-;;;### (autoloads nil "xml" "xml.el" (20766 6456 368550 0))
+;;;### (autoloads nil "xml" "xml.el" (21002 1963 769129 0))
 ;;; Generated autoloads from xml.el
 
 (autoload 'xml-parse-file "xml" "\
@@ -31738,7 +31916,7 @@ Both features can be combined by providing a cons cell
 
 ;;;***
 \f
-;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20884 6711 386198
+;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20998 4934 952905
 ;;;;;;  0))
 ;;; Generated autoloads from nxml/xmltok.el
 
@@ -31802,7 +31980,7 @@ Extract file name from an yenc header.
 
 ;;;***
 \f
-;;;### (autoloads nil "zone" "play/zone.el" (20709 26818 907104 0))
+;;;### (autoloads nil "zone" "play/zone.el" (20992 52525 458637 0))
 ;;; Generated autoloads from play/zone.el
 
 (autoload 'zone "zone" "\
@@ -31818,45 +31996,44 @@ Zone out, completely.
 ;;;;;;  "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
 ;;;;;;  "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
 ;;;;;;  "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
-;;;;;;  "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el"
-;;;;;;  "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el"
-;;;;;;  "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el"
-;;;;;;  "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el"
-;;;;;;  "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el"
-;;;;;;  "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el"
-;;;;;;  "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el"
-;;;;;;  "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el"
-;;;;;;  "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el"
-;;;;;;  "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el"
-;;;;;;  "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el"
-;;;;;;  "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el"
-;;;;;;  "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el"
-;;;;;;  "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el"
-;;;;;;  "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el"
-;;;;;;  "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el"
-;;;;;;  "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
-;;;;;;  "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
-;;;;;;  "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el"
-;;;;;;  "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el"
-;;;;;;  "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el"
-;;;;;;  "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el"
-;;;;;;  "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el"
-;;;;;;  "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el"
-;;;;;;  "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el"
-;;;;;;  "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el"
-;;;;;;  "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
-;;;;;;  "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el"
-;;;;;;  "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
-;;;;;;  "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
-;;;;;;  "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el"
-;;;;;;  "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
-;;;;;;  "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
-;;;;;;  "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el"
-;;;;;;  "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el"
-;;;;;;  "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el"
-;;;;;;  "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
-;;;;;;  "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el"
-;;;;;;  "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
+;;;;;;  "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
+;;;;;;  "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
+;;;;;;  "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
+;;;;;;  "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
+;;;;;;  "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
+;;;;;;  "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
+;;;;;;  "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
+;;;;;;  "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
+;;;;;;  "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el"
+;;;;;;  "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
+;;;;;;  "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el"
+;;;;;;  "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
+;;;;;;  "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
+;;;;;;  "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
+;;;;;;  "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
+;;;;;;  "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el"
+;;;;;;  "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/emacs.el"
+;;;;;;  "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
+;;;;;;  "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el"
+;;;;;;  "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el"
+;;;;;;  "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el"
+;;;;;;  "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el"
+;;;;;;  "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el"
+;;;;;;  "cedet/ede/proj.el" "cedet/ede/shell.el" "cedet/ede/simple.el"
+;;;;;;  "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el"
+;;;;;;  "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
+;;;;;;  "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el"
+;;;;;;  "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el"
+;;;;;;  "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
+;;;;;;  "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
+;;;;;;  "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
+;;;;;;  "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
+;;;;;;  "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
+;;;;;;  "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
+;;;;;;  "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el"
+;;;;;;  "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
+;;;;;;  "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el"
+;;;;;;  "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
 ;;;;;;  "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el"
 ;;;;;;  "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
 ;;;;;;  "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el"
@@ -31864,13 +32041,13 @@ Zone out, completely.
 ;;;;;;  "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
 ;;;;;;  "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
 ;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
-;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el"
-;;;;;;  "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el"
-;;;;;;  "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el"
-;;;;;;  "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el"
-;;;;;;  "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
-;;;;;;  "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
-;;;;;;  "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
+;;;;;;  "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
+;;;;;;  "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
+;;;;;;  "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
+;;;;;;  "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;;  "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;;  "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
 ;;;;;;  "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
 ;;;;;;  "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
 ;;;;;;  "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
@@ -31882,52 +32059,51 @@ Zone out, completely.
 ;;;;;;  "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el"
 ;;;;;;  "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el"
 ;;;;;;  "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el"
-;;;;;;  "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el"
-;;;;;;  "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el"
-;;;;;;  "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el"
-;;;;;;  "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el"
-;;;;;;  "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
+;;;;;;  "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el"
+;;;;;;  "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
+;;;;;;  "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
+;;;;;;  "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el"
+;;;;;;  "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
 ;;;;;;  "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el"
-;;;;;;  "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el"
-;;;;;;  "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el"
-;;;;;;  "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-speedbar.el"
-;;;;;;  "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el"
-;;;;;;  "emacs-lisp/package-x.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el"
-;;;;;;  "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el"
-;;;;;;  "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el"
-;;;;;;  "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el"
-;;;;;;  "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el"
-;;;;;;  "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el"
-;;;;;;  "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el"
-;;;;;;  "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el"
-;;;;;;  "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el"
-;;;;;;  "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el"
-;;;;;;  "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el"
-;;;;;;  "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-tramp.el"
-;;;;;;  "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el"
-;;;;;;  "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el"
-;;;;;;  "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el"
-;;;;;;  "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el"
-;;;;;;  "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el"
-;;;;;;  "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
+;;;;;;  "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
+;;;;;;  "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-datadebug.el"
+;;;;;;  "emacs-lisp/eieio-speedbar.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el"
+;;;;;;  "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el"
+;;;;;;  "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el"
+;;;;;;  "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el"
+;;;;;;  "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el"
+;;;;;;  "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el"
+;;;;;;  "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el"
+;;;;;;  "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el"
+;;;;;;  "erc/erc-goodies.el" "erc/erc-ibuffer.el" "eshell/em-alias.el"
+;;;;;;  "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el"
+;;;;;;  "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el"
+;;;;;;  "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
+;;;;;;  "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
+;;;;;;  "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
+;;;;;;  "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
+;;;;;;  "eshell/esh-ext.el" "eshell/esh-io.el" "eshell/esh-module.el"
+;;;;;;  "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el"
+;;;;;;  "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el"
+;;;;;;  "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
 ;;;;;;  "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
 ;;;;;;  "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
-;;;;;;  "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
-;;;;;;  "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el"
-;;;;;;  "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el"
-;;;;;;  "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el"
-;;;;;;  "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el"
-;;;;;;  "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el"
-;;;;;;  "gnus/messcompat.el" "gnus/mm-archive.el" "gnus/mm-bodies.el"
-;;;;;;  "gnus/mm-decode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el"
-;;;;;;  "gnus/mml-smime.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el"
-;;;;;;  "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el"
-;;;;;;  "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el"
-;;;;;;  "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
-;;;;;;  "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
-;;;;;;  "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
-;;;;;;  "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el"
-;;;;;;  "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
+;;;;;;  "gnus/gnus-icalendar.el" "gnus/gnus-int.el" "gnus/gnus-logic.el"
+;;;;;;  "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el"
+;;;;;;  "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
+;;;;;;  "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
+;;;;;;  "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el"
+;;;;;;  "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
+;;;;;;  "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
+;;;;;;  "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
+;;;;;;  "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el"
+;;;;;;  "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
+;;;;;;  "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
+;;;;;;  "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el"
+;;;;;;  "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el"
+;;;;;;  "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el"
+;;;;;;  "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el"
+;;;;;;  "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
 ;;;;;;  "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
 ;;;;;;  "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el"
 ;;;;;;  "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el"
@@ -32018,7 +32194,7 @@ Zone out, completely.
 ;;;;;;  "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el"
 ;;;;;;  "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el"
 ;;;;;;  "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el"
-;;;;;;  "x-dnd.el") (20945 22525 596830 318000))
+;;;;;;  "x-dnd.el") (21027 5557 48411 587000))
 
 ;;;***
 \f
index e07d28a54d00b91ef9afda48fe81dcc0567e6766..c505a74c23d341f8235b4331291cbd81906555e6 100644 (file)
@@ -38,7 +38,7 @@
 
 ;;; Bugs:
 
-;; - completion-all-sorted-completions list all the completions, whereas
+;; - completion-all-sorted-completions lists all the completions, whereas
 ;;   it should only lists the ones that `try-completion' would consider.
 ;;   E.g.  it should honor completion-ignored-extensions.
 ;; - choose-completion can't automatically figure out the boundaries
@@ -145,7 +145,7 @@ Like CL's `some'."
   (let ((firsterror nil)
         res)
     (while (and (not res) xs)
-      (condition-case err
+      (condition-case-unless-debug err
           (setq res (funcall fun (pop xs)))
         (error (unless firsterror (setq firsterror err)) nil)))
     (or res
@@ -623,7 +623,8 @@ If ARGS are provided, then pass MESSAGE through `format'."
           (message nil)))
     ;; Clear out any old echo-area message to make way for our new thing.
     (message nil)
-    (setq message (if (and (null args) (string-match-p "\\` *\\[.+\\]\\'" message))
+    (setq message (if (and (null args)
+                           (string-match-p "\\` *\\[.+\\]\\'" message))
                       ;; Make sure we can put-text-property.
                       (copy-sequence message)
                     (concat " [" message "]")))
@@ -651,7 +652,7 @@ If ARGS are provided, then pass MESSAGE through `format'."
   "Return the user input in a minibuffer before point as a string.
 In Emacs-22, that was what completion commands operated on."
   (declare (obsolete nil "24.4"))
-  (buffer-substring (field-beginning) (point)))
+  (buffer-substring (minibuffer-prompt-end) (point)))
 
 (defun delete-minibuffer-contents ()
   "Delete all user input in a minibuffer.
@@ -670,8 +671,7 @@ If the value is t the *Completion* buffer is displayed whenever completion
 is requested but cannot be done.
 If the value is `lazy', the *Completions* buffer is only displayed after
 the second failed attempt to complete."
-  :type '(choice (const nil) (const t) (const lazy))
-  :group 'minibuffer)
+  :type '(choice (const nil) (const t) (const lazy)))
 
 (defconst completion-styles-alist
   '((emacs21
@@ -750,7 +750,6 @@ The available styles are listed in `completion-styles-alist'.
 Note that `completion-category-overrides' may override these
 styles for specific categories, such as files, buffers, etc."
   :type completion--styles-type
-  :group 'minibuffer
   :version "23.1")
 
 (defcustom completion-category-overrides
@@ -880,7 +879,7 @@ Moves point to the end of the new text."
 
 (defcustom completion-cycle-threshold nil
   "Number of completion candidates below which cycling is used.
-Depending on this setting `minibuffer-complete' may use cycling,
+Depending on this setting `completion-in-region' may use cycling,
 like `minibuffer-force-complete'.
 If nil, cycling is never used.
 If t, cycling is always used.
@@ -894,8 +893,7 @@ completion candidates than this number."
          (over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
     (if over (cdr over) completion-cycle-threshold)))
 
-(defvar completion-all-sorted-completions nil)
-(make-variable-buffer-local 'completion-all-sorted-completions)
+(defvar-local completion-all-sorted-completions nil)
 (defvar-local completion--all-sorted-completions-location nil)
 (defvar completion-cycling nil)
 
@@ -906,8 +904,8 @@ completion candidates than this number."
   (if completion-show-inline-help
       (minibuffer-message msg)))
 
-(defun completion--do-completion (&optional try-completion-function
-                                            expect-exact)
+(defun completion--do-completion (beg end &optional
+                                      try-completion-function expect-exact)
   "Do the completion and return a summary of what happened.
 M = completion was performed, the text was Modified.
 C = there were available Completions.
@@ -926,9 +924,7 @@ E = after completion we now have an Exact match.
 TRY-COMPLETION-FUNCTION is a function to use in place of `try-completion'.
 EXPECT-EXACT, if non-nil, means that there is no need to tell the user
 when the buffer's text is already an exact match."
-  (let* ((beg (field-beginning))
-         (end (field-end))
-         (string (buffer-substring beg end))
+  (let* ((string (buffer-substring beg end))
          (md (completion--field-metadata beg))
          (comp (funcall (or try-completion-function
                             'completion-try-completion)
@@ -963,7 +959,8 @@ when the buffer's text is already an exact match."
         (if unchanged
            (goto-char end)
           ;; Insert in minibuffer the chars we got.
-          (completion--replace beg end completion))
+          (completion--replace beg end completion)
+          (setq end (+ beg (length completion))))
        ;; Move point to its completion-mandated destination.
        (forward-char (- comp-pos (length completion)))
 
@@ -972,7 +969,8 @@ when the buffer's text is already an exact match."
             ;; whether this is a unique completion or not, so try again using
             ;; the real case (this shouldn't recurse again, because the next
             ;; time try-completion will return either t or the exact string).
-            (completion--do-completion try-completion-function expect-exact)
+            (completion--do-completion beg end
+                                       try-completion-function expect-exact)
 
           ;; It did find a match.  Do we match some possibility exactly now?
           (let* ((exact (test-completion completion
@@ -995,7 +993,7 @@ when the buffer's text is already an exact match."
                                           minibuffer-completion-predicate
                                          ""))
                                    comp-pos)))
-                   (completion-all-sorted-completions))))
+                   (completion-all-sorted-completions beg end))))
             (completion--flush-all-sorted-completions)
             (cond
              ((and (consp (cdr comps)) ;; There's something to cycle.
@@ -1006,8 +1004,8 @@ when the buffer's text is already an exact match."
               ;; Not more than completion-cycle-threshold remaining
               ;; completions: let's cycle.
               (setq completed t exact t)
-              (completion--cache-all-sorted-completions comps)
-              (minibuffer-force-complete))
+              (completion--cache-all-sorted-completions beg end comps)
+              (minibuffer-force-complete beg end))
              (completed
               ;; We could also decide to refresh the completions,
               ;; if they're displayed (and assuming there are
@@ -1024,14 +1022,14 @@ when the buffer's text is already an exact match."
              (if (pcase completion-auto-help
                     (`lazy (eq this-command last-command))
                     (_ completion-auto-help))
-                  (minibuffer-completion-help)
+                  (minibuffer-completion-help beg end)
                 (completion--message "Next char not unique")))
              ;; If the last exact completion and this one were the same, it
              ;; means we've already given a "Complete, but not unique" message
              ;; and the user's hit TAB again, so now we give him help.
              (t
               (if (and (eq this-command last-command) completion-auto-help)
-                  (minibuffer-completion-help))
+                  (minibuffer-completion-help beg end))
               (completion--done completion 'exact
                                 (unless expect-exact
                                   "Complete, but not unique"))))
@@ -1045,6 +1043,11 @@ If no characters can be completed, display a list of possible completions.
 If you repeat this command after it displayed such a list,
 scroll the window of possible completions."
   (interactive)
+  (completion-in-region (minibuffer-prompt-end) (point-max)
+                        minibuffer-completion-table
+                        minibuffer-completion-predicate))
+
+(defun completion--in-region-1 (beg end)
   ;; If the previous command was not this,
   ;; mark the completion buffer obsolete.
   (setq this-command 'completion-at-point)
@@ -1067,17 +1070,17 @@ scroll the window of possible completions."
         nil)))
    ;; If we're cycling, keep on cycling.
    ((and completion-cycling completion-all-sorted-completions)
-    (minibuffer-force-complete)
+    (minibuffer-force-complete beg end)
     t)
-   (t (pcase (completion--do-completion)
+   (t (pcase (completion--do-completion beg end)
         (#b000 nil)
         (_     t)))))
 
-(defun completion--cache-all-sorted-completions (comps)
+(defun completion--cache-all-sorted-completions (beg end comps)
   (add-hook 'after-change-functions
             'completion--flush-all-sorted-completions nil t)
   (setq completion--all-sorted-completions-location
-        (cons (copy-marker (field-beginning)) (copy-marker (field-end))))
+        (cons (copy-marker beg) (copy-marker end)))
   (setq completion-all-sorted-completions comps))
 
 (defun completion--flush-all-sorted-completions (&optional start end _len)
@@ -1097,10 +1100,10 @@ scroll the window of possible completions."
     (if (eq (car bounds) base) md-at-point
       (completion-metadata (substring string 0 base) table pred))))
 
-(defun completion-all-sorted-completions ()
+(defun completion-all-sorted-completions (start end)
   (or completion-all-sorted-completions
-      (let* ((start (field-beginning))
-             (end (field-end))
+      (let* ((start (or start (minibuffer-prompt-end)))
+             (end (or end (point-max)))
              (string (buffer-substring start end))
              (md (completion--field-metadata start))
              (all (completion-all-completions
@@ -1138,18 +1141,20 @@ scroll the window of possible completions."
           ;; Cache the result.  This is not just for speed, but also so that
           ;; repeated calls to minibuffer-force-complete can cycle through
           ;; all possibilities.
-          (completion--cache-all-sorted-completions (nconc all base-size))))))
+          (completion--cache-all-sorted-completions
+           start end (nconc all base-size))))))
 
 (defun minibuffer-force-complete-and-exit ()
   "Complete the minibuffer with first of the matches and exit."
   (interactive)
   (minibuffer-force-complete)
-  (minibuffer--complete-and-exit
+  (completion--complete-and-exit
+   (minibuffer-prompt-end) (point-max) #'exit-minibuffer
    ;; If the previous completion completed to an element which fails
    ;; test-completion, then we shouldn't exit, but that should be rare.
    (lambda () (minibuffer-message "Incomplete"))))
 
-(defun minibuffer-force-complete ()
+(defun minibuffer-force-complete (&optional start end)
   "Complete the minibuffer to an exact match.
 Repeated uses step through the possible completions."
   (interactive)
@@ -1157,10 +1162,10 @@ Repeated uses step through the possible completions."
   ;; FIXME: Need to deal with the extra-size issue here as well.
   ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to
   ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
-  (let* ((start (copy-marker (field-beginning)))
-         (end (field-end))
+  (let* ((start (copy-marker (or start (minibuffer-prompt-end))))
+         (end (or end (point-max)))
          ;; (md (completion--field-metadata start))
-         (all (completion-all-sorted-completions))
+         (all (completion-all-sorted-completions start end))
          (base (+ start (or (cdr (last all)) 0))))
     (cond
      ((not (consp all))
@@ -1173,10 +1178,11 @@ Repeated uses step through the possible completions."
                           'finished (when done "Sole completion"))))
      (t
       (completion--replace base end (car all))
+      (setq end (+ base (length (car all))))
       (completion--done (buffer-substring-no-properties start (point)) 'sole)
       ;; Set cycling after modifying the buffer since the flush hook resets it.
       (setq completion-cycling t)
-      (setq this-command 'completion-at-point) ;For minibuffer-complete.
+      (setq this-command 'completion-at-point) ;For completion-in-region.
       ;; If completing file names, (car all) may be a directory, so we'd now
       ;; have a new set of possible completions and might want to reset
       ;; completion-all-sorted-completions to nil, but we prefer not to,
@@ -1184,7 +1190,7 @@ Repeated uses step through the possible completions."
       ;; through the previous possible completions.
       (let ((last (last all)))
         (setcdr last (cons (car all) (cdr last)))
-        (completion--cache-all-sorted-completions (cdr all)))
+        (completion--cache-all-sorted-completions start end (cdr all)))
       ;; Make sure repeated uses cycle, even though completion--done might
       ;; have added a space or something that moved us outside of the field.
       ;; (bug#12221).
@@ -1223,27 +1229,32 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
  `minibuffer-confirm-exit-commands', and accept the input
  otherwise."
   (interactive)
-  (minibuffer--complete-and-exit
+  (completion-complete-and-exit (minibuffer-prompt-end) (point-max)
+                                #'exit-minibuffer))
+
+(defun completion-complete-and-exit (beg end exit-function)
+  (completion--complete-and-exit
+   beg end exit-function
    (lambda ()
      (pcase (condition-case nil
-                (completion--do-completion nil 'expect-exact)
+                (completion--do-completion beg end
+                                           nil 'expect-exact)
               (error 1))
-       ((or #b001 #b011) (exit-minibuffer))
+       ((or #b001 #b011) (funcall exit-function))
        (#b111 (if (not minibuffer-completion-confirm)
-                  (exit-minibuffer)
+                  (funcall exit-function)
                 (minibuffer-message "Confirm")
                 nil))
        (_ nil)))))
 
-(defun minibuffer--complete-and-exit (completion-function)
+(defun completion--complete-and-exit (beg end
+                                          exit-function completion-function)
   "Exit from `require-match' minibuffer.
 COMPLETION-FUNCTION is called if the current buffer's content does not
 appear to be a match."
-  (let ((beg (field-beginning))
-        (end (field-end)))
     (cond
      ;; Allow user to specify null string
-     ((= beg end) (exit-minibuffer))
+   ((= beg end) (funcall exit-function))
      ((test-completion (buffer-substring beg end)
                        minibuffer-completion-table
                        minibuffer-completion-predicate)
@@ -1269,7 +1280,7 @@ appear to be a match."
                      ;; that file.
                      (= (length string) (length compl)))
             (completion--replace beg end compl))))
-      (exit-minibuffer))
+    (funcall exit-function))
 
      ((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
       ;; The user is permitted to exit with an input that's rejected
@@ -1280,13 +1291,13 @@ appear to be a match."
               ;; catches most minibuffer typos).
               (and (eq minibuffer-completion-confirm 'confirm-after-completion)
                    (not (memq last-command minibuffer-confirm-exit-commands))))
-          (exit-minibuffer)
+        (funcall exit-function)
         (minibuffer-message "Confirm")
         nil))
 
      (t
       ;; Call do-completion, but ignore errors.
-      (funcall completion-function)))))
+    (funcall completion-function))))
 
 (defun completion--try-word-completion (string table predicate point md)
   (let ((comp (completion-try-completion string table predicate point md)))
@@ -1381,9 +1392,18 @@ After one word is completed as much as possible, a space or hyphen
 is added, provided that matches some possible completion.
 Return nil if there is no valid completion, else t."
   (interactive)
-  (pcase (completion--do-completion 'completion--try-word-completion)
+  (completion-in-region--single-word
+   (minibuffer-prompt-end) (point-max)
+   minibuffer-completion-table minibuffer-completion-predicate))
+
+(defun completion-in-region--single-word (beg end collection
+                                              &optional predicate)
+  (let ((minibuffer-completion-table collection)
+        (minibuffer-completion-predicate predicate))
+    (pcase (completion--do-completion beg end
+                                      #'completion--try-word-completion)
     (#b000 nil)
-    (_     t)))
+      (_     t))))
 
 (defface completions-annotations '((t :inherit italic))
   "Face to use for annotations in the *Completions* buffer.")
@@ -1395,7 +1415,6 @@ in columns in the *Completions* buffer.
 If the value is `horizontal', display completions sorted
 horizontally in alphabetical order, rather than down the screen."
   :type '(choice (const horizontal) (const vertical))
-  :group 'minibuffer
   :version "23.2")
 
 (defun completion--insert-strings (strings)
@@ -1504,15 +1523,13 @@ See also `display-completion-list'.")
 
 (defface completions-first-difference
   '((t (:inherit bold)))
-  "Face added on the first uncommon character in completions in *Completions* buffer."
-  :group 'completion)
+  "Face added on the first uncommon character in completions in *Completions* buffer.")
 
 (defface completions-common-part '((t nil))
   "Face added on the common prefix substring in completions in *Completions* buffer.
 The idea of `completions-common-part' is that you can use it to
 make the common parts less visible than normal, so that the rest
-of the differing parts is, by contrast, slightly highlighted."
-  :group 'completion)
+of the differing parts is, by contrast, slightly highlighted.")
 
 (defun completion-hilit-commonality (completions prefix-len base-size)
   (when completions
@@ -1555,12 +1572,8 @@ alternative, the second serves as annotation.
 The actual completion alternatives, as inserted, are given `mouse-face'
 properties of `highlight'.
 At the end, this runs the normal hook `completion-setup-hook'.
-It can find the completion buffer in `standard-output'.
-
-The obsolete optional arg COMMON-SUBSTRING, if non-nil, should be a string
-specifying a common substring for adding the faces
-`completions-first-difference' and `completions-common-part' to
-the completions buffer."
+It can find the completion buffer in `standard-output'."
+  (declare (advertised-calling-convention (completions) "24.4"))
   (if common-substring
       (setq completions (completion-hilit-commonality
                          completions (length common-substring)
@@ -1647,19 +1660,19 @@ variables.")
                (equal pre-msg (and exit-fun (current-message))))
       (completion--message message))))
 
-(defun minibuffer-completion-help ()
+(defun minibuffer-completion-help (&optional start end)
   "Display a list of possible completions of the current minibuffer contents."
   (interactive)
   (message "Making completion list...")
-  (let* ((start (field-beginning))
-         (end (field-end))
-         (string (field-string))
+  (let* ((start (or start (minibuffer-prompt-end)))
+         (end (or end (point-max)))
+         (string (buffer-substring start end))
          (md (completion--field-metadata start))
          (completions (completion-all-completions
                        string
                        minibuffer-completion-table
                        minibuffer-completion-predicate
-                       (- (point) (field-beginning))
+                       (- (point) start)
                        md)))
     (message nil)
     (if (or (null completions)
@@ -1811,7 +1824,6 @@ exit."
   (if (memq system-type '(ms-dos windows-nt darwin cygwin))
       t nil)
   "Non-nil means when reading a file name completion ignores case."
-  :group 'minibuffer
   :type 'boolean
   :version "22.1")
 
@@ -1821,22 +1833,15 @@ exit."
       ;; completions" operation as well.
       completion-in-region-functions (start end collection predicate)
     (let ((minibuffer-completion-table collection)
-          (minibuffer-completion-predicate predicate)
-          (ol (make-overlay start end nil nil t)))
-      (overlay-put ol 'field 'completion)
+          (minibuffer-completion-predicate predicate))
       ;; HACK: if the text we are completing is already in a field, we
       ;; want the completion field to take priority (e.g. Bug#6830).
-      (overlay-put ol 'priority 100)
       (when completion-in-region-mode-predicate
         (completion-in-region-mode 1)
         (setq completion-in-region--data
              (list (if (markerp start) start (copy-marker start))
                     (copy-marker end) collection)))
-      ;; FIXME: `minibuffer-complete' should call `completion-in-region' rather
-      ;; than the other way around!
-      (unwind-protect
-          (call-interactively 'minibuffer-complete)
-        (delete-overlay ol)))))
+      (completion--in-region-1 start end))))
 
 (defvar completion-in-region-mode-map
   (let ((map (make-sparse-keymap)))
@@ -2001,19 +2006,14 @@ The completion method is determined by `completion-at-point-functions'."
                (lambda ()
                  ;; We're still in the same completion field.
                  (let ((newstart (car-safe (funcall hookfun))))
-                   (and newstart (= newstart start)))))
-              (ol (make-overlay start end nil nil t)))
+                   (and newstart (= newstart start))))))
          ;; FIXME: We should somehow (ab)use completion-in-region-function or
          ;; introduce a corresponding hook (plus another for word-completion,
          ;; and another for force-completion, maybe?).
-         (overlay-put ol 'field 'completion)
-         (overlay-put ol 'priority 100)
          (completion-in-region-mode 1)
          (setq completion-in-region--data
                (list start (copy-marker end) collection))
-         (unwind-protect
-             (call-interactively 'minibuffer-completion-help)
-           (delete-overlay ol))))
+         (minibuffer-completion-help start end)))
       (`(,hookfun . ,_)
        ;; The hook function already performed completion :-(
        ;; Not much we can do at this point.
@@ -2308,7 +2308,6 @@ the minibuffer empty.
 For some commands, exiting with an empty minibuffer has a special meaning,
 such as making the current buffer visit no file in the case of
 `set-visited-file-name'."
-  :group 'minibuffer
   :type 'boolean)
 
 ;; Not always defined, but only called if next-read-file-uses-dialog-p says so.
@@ -2701,7 +2700,6 @@ expression (not containing character ranges like `a-z')."
          ;; Refresh other vars.
          (completion-pcm--prepare-delim-re value))
   :initialize 'custom-initialize-reset
-  :group 'minibuffer
   :type 'string)
 
 (defcustom completion-pcm-complete-word-inserts-delimiters nil
@@ -2734,7 +2732,8 @@ or a symbol, see `completion-pcm--merge-completions'."
                 (completion-pcm--string->pattern suffix)))
     (let* ((pattern nil)
            (p 0)
-           (p0 p))
+           (p0 p)
+           (pending nil))
 
       (while (and (setq p (string-match completion-pcm--delim-wild-regex
                                         string p))
@@ -2751,18 +2750,49 @@ or a symbol, see `completion-pcm--merge-completions'."
         ;; This is determined by the presence of a submatch-1 which delimits
         ;; the prefix.
         (if (match-end 1) (setq p (match-end 1)))
-        (push (substring string p0 p) pattern)
+        (unless (= p0 p)
+          (if pending (push pending pattern))
+          (push (substring string p0 p) pattern))
+        (setq pending nil)
         (if (eq (aref string p) ?*)
             (progn
               (push 'star pattern)
               (setq p0 (1+ p)))
           (push 'any pattern)
-          (setq p0 p))
-        (cl-incf p))
-
+          (if (match-end 1)
+              (setq p0 p)
+            (push (substring string p (match-end 0)) pattern)
+            ;; `any-delim' is used so that "a-b" also finds "array->beginning".
+            (setq pending 'any-delim)
+            (setq p0 (match-end 0))))
+        (setq p p0))
+
+      (when (> (length string) p0)
+        (if pending (push pending pattern))
+        (push (substring string p0) pattern))
       ;; An empty string might be erroneously added at the beginning.
       ;; It should be avoided properly, but it's so easy to remove it here.
-      (delete "" (nreverse (cons (substring string p0) pattern))))))
+      (delete "" (nreverse pattern)))))
+
+(defun completion-pcm--optimize-pattern (p)
+  ;; Remove empty strings in a separate phase since otherwise a ""
+  ;; might prevent some other optimization, as in '(any "" any).
+  (setq p (delete "" p))
+  (let ((n '()))
+    (while p
+      (pcase p
+        (`(,(and s1 (pred stringp)) ,(and s2 (pred stringp)) . ,rest)
+         (setq p (cons (concat s1 s2) rest)))
+        (`(,(and p1 (pred symbolp)) ,(and p2 (guard (eq p1 p2))) . ,_)
+         (setq p (cdr p)))
+        (`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest)))
+        (`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest)))
+        (`(point ,(or `any `any-delim) . ,rest) (setq p `(point . ,rest)))
+        (`(,(or `any `any-delim) point . ,rest) (setq p `(point . ,rest)))
+        (`(any ,(or `any `any-delim) . ,rest) (setq p `(any . ,rest)))
+        (`(,(pred symbolp)) (setq p nil)) ;Implicit terminating `any'.
+        (_ (push (pop p) n))))
+    (nreverse n)))
 
 (defun completion-pcm--pattern->regex (pattern &optional group)
   (let ((re
@@ -2771,8 +2801,13 @@ or a symbol, see `completion-pcm--merge-completions'."
                   (lambda (x)
                     (cond
                      ((stringp x) (regexp-quote x))
-                     ((if (consp group) (memq x group) group) "\\(.*?\\)")
-                    (t ".*?")))
+                     (t
+                      (let ((re (if (eq x 'any-delim)
+                                    (concat completion-pcm--delim-wild-regex "*?")
+                                  ".*?")))
+                        (if (if (consp group) (memq x group) group)
+                            (concat "\\(" re "\\)")
+                          re)))))
                   pattern
                   ""))))
     ;; Avoid pathological backtracking.
@@ -2846,11 +2881,11 @@ filter out additional entries (because TABLE might not obey PRED)."
     (setq string (substring string (car bounds) (+ point (cdr bounds))))
     (let* ((relpoint (- point (car bounds)))
            (pattern (completion-pcm--string->pattern string relpoint))
-           (all (condition-case err
+           (all (condition-case-unless-debug err
                     (funcall filter
                              (completion-pcm--all-completions
                               prefix pattern table pred))
-                  (error (unless firsterror (setq firsterror err)) nil))))
+                  (error (setq firsterror err) nil))))
       (when (and (null all)
                  (> (car bounds) 0)
                  (null (ignore-errors (try-completion prefix table pred))))
index 177fdaca15044767441169734f69db83252be7a1..67c74f882504f50e122fa49efc412eac5b27a364 100644 (file)
@@ -3733,7 +3733,7 @@ so return the size on the remote host exactly. See RFC 3659."
 ;; next part of copying routine.
 (defun ange-ftp-cf1 (result line
                            filename newname binary msg
-                           f-parsed f-host f-user f-name f-abbr
+                           f-parsed f-host f-user _f-name f-abbr
                            t-parsed t-host t-user t-name t-abbr
                            temp1 temp2 cont nowait)
   (if line
@@ -3835,7 +3835,7 @@ so return the size on the remote host exactly. See RFC 3659."
 
 (defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists
                                    keep-date preserve-uid-gid
-                                   preserve-selinux-context)
+                                   _preserve-selinux-context)
   (interactive "fCopy file: \nFCopy %s to file: \np")
   (ange-ftp-copy-file-internal filename
                               newname
@@ -4200,7 +4200,7 @@ directory, so that Emacs will know its current contents."
        (while (and tryfiles (not copy))
          (catch 'ftp-error
            (let ((ange-ftp-waiting-flag t))
-             (condition-case error
+             (condition-case _error
                  (setq copy (ange-ftp-file-local-copy (car tryfiles)))
                (ftp-error nil))))
          (setq tryfiles (cdr tryfiles)))
@@ -4214,7 +4214,7 @@ directory, so that Emacs will know its current contents."
     (ange-ftp-real-load file noerror nomessage nosuffix)))
 
 ;; Calculate default-unhandled-directory for a given ange-ftp buffer.
-(defun ange-ftp-unhandled-file-name-directory (filename)
+(defun ange-ftp-unhandled-file-name-directory (_filename)
   nil)
 
 \f
@@ -4605,7 +4605,6 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
 (defun ange-ftp-shell-command (command &optional output-buffer error-buffer)
   (let* ((parsed (ange-ftp-ftp-name default-directory))
         (host (nth 0 parsed))
-        (user (nth 1 parsed))
         (name (nth 2 parsed)))
     (if (not parsed)
        (ange-ftp-real-shell-command command output-buffer error-buffer)
@@ -5176,7 +5175,7 @@ Other orders of $ and _ seem to all work just fine.")
                    ;; versions left. If not, then delete the
                    ;; root entry.
                    (maphash
-                    (lambda (key val)
+                    (lambda (key _val)
                       (and (string-match regexp key)
                            (setq versions t)))
                     files)
@@ -5358,7 +5357,7 @@ Other orders of $ and _ seem to all work just fine.")
 ;; compressed files. Instead, we turn "FILE.TYPE" into
 ;; "FILE.TYPE-Z". Hope that this is a reasonable thing to do.
 
-(defun ange-ftp-vms-make-compressed-filename (name &optional reverse)
+(defun ange-ftp-vms-make-compressed-filename (name &optional _reverse)
   (cond
    ((string-match "-Z;[0-9]+\\'" name)
     (list nil (substring name 0 (match-beginning 0))))
@@ -5399,7 +5398,7 @@ Other orders of $ and _ seem to all work just fine.")
 ;;       (cons '(vms . ange-ftp-dired-vms-ls-trim)
 ;;             ange-ftp-dired-ls-trim-alist)))
 
-(defun ange-ftp-vms-sans-version (name &rest args)
+(defun ange-ftp-vms-sans-version (name &rest _args)
   (save-match-data
     (if (string-match ";[0-9]+\\'" name)
        (substring name 0 (match-beginning 0))
@@ -5920,7 +5919,7 @@ Other orders of $ and _ seem to all work just fine.")
 ;;       (cons '(cms . ange-ftp-dired-cms-move-to-end-of-filename)
 ;;             ange-ftp-dired-move-to-end-of-filename-alist)))
 
-(defun ange-ftp-cms-make-compressed-filename (name &optional reverse)
+(defun ange-ftp-cms-make-compressed-filename (name &optional _reverse)
   (if (string-match "-Z\\'" name)
       (list nil (substring name 0 -2))
     (list t (concat name "-Z"))))
index 462bf18997bdce3fb1c07969d4eebf26b175179b..ea13aa36a704f570549efd3fff7bb852d375b178 100644 (file)
@@ -877,7 +877,7 @@ to use."
 (defvar dos-windows-version)
 (declare-function w32-shell-execute "w32fns.c")    ;; Defined in C.
 
-(defun browse-url-default-windows-browser (url &optional new-window)
+(defun browse-url-default-windows-browser (url &optional _new-window)
   (interactive (browse-url-interactive-arg "URL: "))
   (cond ((eq system-type 'ms-dos)
         (if dos-windows-version
@@ -887,7 +887,7 @@ to use."
         (call-process "cygstart" nil nil nil url))
        (t (w32-shell-execute "open" url))))
 
-(defun browse-url-default-macosx-browser (url &optional new-window)
+(defun browse-url-default-macosx-browser (url &optional _new-window)
   (interactive (browse-url-interactive-arg "URL: "))
   (start-process (concat "open " url) nil "open" url))
 
@@ -942,7 +942,7 @@ used instead of `browse-url-new-window-flag'."
     ((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
     ((locate-library "w3") 'browse-url-w3)
     (t
-     (lambda (&rest ignore) (error "No usable browser found"))))
+     (lambda (&rest _ignore) (error "No usable browser found"))))
    url args))
 
 (defun browse-url-can-use-xdg-open ()
@@ -1172,7 +1172,7 @@ URL in a new window."
               (append browse-url-firefox-startup-arguments (list url))))))
 
 ;;;###autoload
-(defun browse-url-chromium (url &optional new-window)
+(defun browse-url-chromium (url &optional _new-window)
   "Ask the Chromium WWW browser to load URL.
 Default to the URL around or before point.  The strings in
 variable `browse-url-chromium-arguments' are also passed to
@@ -1281,7 +1281,7 @@ used instead of `browse-url-new-window-flag'."
 (defvar url-handler-regexp)
 
 ;;;###autoload
-(defun browse-url-emacs (url &optional new-window)
+(defun browse-url-emacs (url &optional _new-window)
   "Ask Emacs to load URL into a buffer and show it in another window."
   (interactive (browse-url-interactive-arg "URL: "))
   (require 'url-handlers)
@@ -1422,7 +1422,7 @@ used instead of `browse-url-new-window-flag'."
     (w3-fetch url)))
 
 ;;;###autoload
-(defun browse-url-w3-gnudoit (url &optional new-window)
+(defun browse-url-w3-gnudoit (url &optional _new-window)
   ;; new-window ignored
   "Ask another Emacs running gnuserv to load the URL using the W3 browser.
 The `browse-url-gnudoit-program' program is used with options given by
@@ -1437,7 +1437,7 @@ The `browse-url-gnudoit-program' program is used with options given by
 ;; --- Lynx in an xterm ---
 
 ;;;###autoload
-(defun browse-url-text-xterm (url &optional new-window)
+(defun browse-url-text-xterm (url &optional _new-window)
   ;; new-window ignored
   "Ask a text browser to load URL.
 URL defaults to the URL around or before point.
@@ -1501,7 +1501,7 @@ used instead of `browse-url-new-window-flag'."
            (get-buffer-process buf)
            ;; Don't leave around a dead one (especially because of its
            ;; munged keymap.)
-           (lambda (process event)
+           (lambda (process _event)
              (if (not (memq (process-status process) '(run stop)))
                  (let ((buf (process-buffer process)))
                    (if buf (kill-buffer buf)))))))
@@ -1574,7 +1574,7 @@ used instead of `browse-url-new-window-flag'."
 ;; --- Random browser ---
 
 ;;;###autoload
-(defun browse-url-generic (url &optional new-window)
+(defun browse-url-generic (url &optional _new-window)
   ;; new-window ignored
   "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
 Default to the URL around or before point.  A fresh copy of the
@@ -1589,7 +1589,7 @@ don't offer a form of remote control."
         (append browse-url-generic-args (list url))))
 
 ;;;###autoload
-(defun browse-url-kde (url &optional new-window)
+(defun browse-url-kde (url &optional _new-window)
   "Ask the KDE WWW browser to load URL.
 Default to the URL around or before point."
   (interactive (browse-url-interactive-arg "KDE URL: "))
index 0e9c4fc5c764ccb669fc61470249c6a2f5137816..a05452c430cce575adc5d806e5fa9d9f593f65c0 100644 (file)
@@ -1609,7 +1609,6 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
 It will be registered for all objects created by `dbus-register-method'."
   (let* ((last-input-event last-input-event)
         (bus (dbus-event-bus-name last-input-event))
-        (service (dbus-event-service-name last-input-event))
         (path (dbus-event-path-name last-input-event)))
     ;; "GetManagedObjects" returns "a{oa{sa{sv}}}".
     (let (interfaces result)
@@ -1625,8 +1624,7 @@ It will be registered for all objects created by `dbus-register-method'."
       ;; Check all registered object paths.
       (maphash
        (lambda (key val)
-        (let ((object (or (nth 2 (car-safe val)) ""))
-              (interface (nth 2 key)))
+        (let ((object (or (nth 2 (car-safe val)) "")))
           (when (and (equal (butlast key 2) (list :method bus))
                      (string-prefix-p path object))
             (dolist (interface (cons (nth 2 key) interfaces))
index ef09267f854aae067f2cabf4022db9293c011e38..c474ac9380d5b7535bc25236d3e98507bf07d7b9 100644 (file)
@@ -518,12 +518,12 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'."
           precords))
        (insert "\n")
        (widget-create 'push-button
-                      :notify (lambda (&rest ignore)
+                      :notify (lambda (&rest _ignore)
                                 (eudc-query-form))
                       "New query")
        (widget-insert " ")
        (widget-create 'push-button
-                      :notify (lambda (&rest ignore)
+                      :notify (lambda (&rest _ignore)
                                 (kill-this-buffer))
                       "Quit")
        (eudc-mode)
@@ -995,17 +995,17 @@ queries the server for the existing fields and displays a corresponding form."
          fields)
     (widget-insert "\n\n")
     (widget-create 'push-button
-                  :notify (lambda (&rest ignore)
+                  :notify (lambda (&rest _ignore)
                             (eudc-process-form))
                   "Query Server")
     (widget-insert " ")
     (widget-create 'push-button
-                  :notify (lambda (&rest ignore)
+                  :notify (lambda (&rest _ignore)
                             (eudc-query-form))
                   "Reset Form")
     (widget-insert " ")
     (widget-create 'push-button
-                  :notify (lambda (&rest ignore)
+                  :notify (lambda (&rest _ignore)
                             (kill-this-buffer))
                   "Quit")
     (goto-char pt)
index d0ba47ad753b6354245ffb44a93ecb5f7a3bb209..a678ec3ab42184a4832367603fafa6419f99d9a7 100644 (file)
@@ -136,7 +136,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to
         result))
     final-result))
 
-(defun eudc-ldap-get-field-list (dummy &optional objectclass)
+(defun eudc-ldap-get-field-list (_dummy &optional objectclass)
   "Return a list of valid attribute names for the current server.
 OBJECTCLASS is the LDAP object class for which the valid
 attribute names are returned. Default to `person'"
index 34934a03549248bd7b8d02ae1ac4cb4a404ce1ad..6cf4ff2c9bf4b21a9f03054c932dca6981c4f838 100644 (file)
@@ -159,7 +159,7 @@ word(s) will be searched for via `eww-search-prefix'."
           ((string-match "^image/" (car content-type))
            (eww-display-image))
           (t
-           (eww-display-raw charset)))
+           (eww-display-raw)))
          (setq eww-history-position 0)
          (cond
           (point
@@ -296,7 +296,7 @@ word(s) will be searched for via `eww-search-prefix'."
                                  (list :background (car new-colors))
                                  t))))))
 
-(defun eww-display-raw (charset)
+(defun eww-display-raw ()
   (let ((data (buffer-substring (point) (point-max))))
     (eww-setup-buffer)
     (let ((inhibit-read-only t))
@@ -345,7 +345,7 @@ word(s) will be searched for via `eww-search-prefix'."
     (define-key map [(meta p)] 'eww-previous-bookmark)
 
     (easy-menu-define nil map ""
-      '("eww"
+      '("Eww"
        ["Quit" eww-quit t]
        ["Reload" eww-reload t]
        ["Back to previous page" eww-back-url
@@ -381,7 +381,7 @@ word(s) will be searched for via `eww-search-prefix'."
        eww-history))
 
 ;;;###autoload
-(defun eww-browse-url (url &optional new-window)
+(defun eww-browse-url (url &optional _new-window)
   (when (and (equal major-mode 'eww-mode)
             eww-current-url)
     (eww-save-history))
@@ -756,7 +756,6 @@ appears in a <link> or <a> tag."
   "Change the value of the select drop-down menu under point."
   (interactive)
   (let* ((input (get-text-property (point) 'eww-form))
-        (properties (text-properties-at (point)))
         (completion-ignore-case t)
         (options
          (delq nil
@@ -930,8 +929,7 @@ The browser to used is specified by the `shr-external-browser' variable."
       (setq file "!"))
      ((string-match "\\`[.]" file)
       (setq file (concat "!" file))))
-    (let ((base file)
-         (count 1))
+    (let ((count 1))
       (while (file-exists-p (expand-file-name file directory))
        (setq file
              (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
index 9584ceb24d0ce05a43bae78030af127e39a3bc22..256af723861ef03111f4404283706aebf36c8f14 100644 (file)
 (eval-when-compile (require 'cl))
 (eval-and-compile
   ;; For Emacs <22.2 and XEmacs.
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))
   (autoload 'starttls-open-stream "starttls")
   (autoload 'starttls-negotiate "starttls")
   (autoload 'sasl-find-mechanism "sasl")
@@ -661,7 +661,7 @@ sure of changing the value of `foo'."
              nil)))))
     done))
 
-(defun imap-ssl-p (buffer)
+(defun imap-ssl-p (_buffer)
   nil)
 
 (defun imap-ssl-open (name buffer server port)
@@ -711,7 +711,7 @@ sure of changing the value of `foo'."
       (message "imap: Opening SSL connection with `%s'...failed" cmd)
       nil)))
 
-(defun imap-tls-p (buffer)
+(defun imap-tls-p (_buffer)
   nil)
 
 (defun imap-tls-open (name buffer server port)
@@ -738,7 +738,7 @@ sure of changing the value of `foo'."
       (when (memq (process-status process) '(open run))
        process))))
 
-(defun imap-network-p (buffer)
+(defun imap-network-p (_buffer)
   t)
 
 (defun imap-network-open (name buffer server port)
@@ -757,7 +757,7 @@ sure of changing the value of `foo'."
       (when (memq (process-status process) '(open run))
        process))))
 
-(defun imap-shell-p (buffer)
+(defun imap-shell-p (_buffer)
   nil)
 
 (defun imap-shell-open (name buffer server port)
@@ -881,10 +881,10 @@ t if it successfully authenticates, nil otherwise."
       ;;                      passwd nil))))
       ret)))
 
-(defun imap-gssapi-auth-p (buffer)
+(defun imap-gssapi-auth-p (_buffer)
   (eq imap-stream 'gssapi))
 
-(defun imap-gssapi-auth (buffer)
+(defun imap-gssapi-auth (_buffer)
   (message "imap: Authenticating using GSSAPI...%s"
           (if (eq imap-stream 'gssapi) "done" "failed"))
   (eq imap-stream 'gssapi))
@@ -893,7 +893,7 @@ t if it successfully authenticates, nil otherwise."
   (and (imap-capability 'AUTH=KERBEROS_V4 buffer)
        (eq imap-stream 'kerberos4)))
 
-(defun imap-kerberos4-auth (buffer)
+(defun imap-kerberos4-auth (_buffer)
   (message "imap: Authenticating using Kerberos 4...%s"
           (if (eq imap-stream 'kerberos4) "done" "failed"))
   (eq imap-stream 'kerberos4))
@@ -947,7 +947,7 @@ t if it successfully authenticates, nil otherwise."
                                                (imap-quote-specials passwd)
                                                "\""))))))
 
-(defun imap-anonymous-p (buffer)
+(defun imap-anonymous-p (_buffer)
   t)
 
 (defun imap-anonymous-auth (buffer)
@@ -1838,7 +1838,7 @@ See `imap-enable-exchange-bug-workaround'."
            (and (imap-fetch-safe '("*" . "*:*") "UID")
                 (list (imap-mailbox-get-1 'uidvalidity mailbox)
                       (apply 'max (imap-message-map
-                                   (lambda (uid prop) uid) 'UID))))
+                                   (lambda (uid _prop) uid) 'UID))))
          (if old-mailbox
              (imap-mailbox-select old-mailbox (eq state 'examine))
            (imap-mailbox-unselect)))))))
@@ -1884,7 +1884,7 @@ first element.  The rest of list contains the saved articles' UIDs."
            (and (imap-fetch-safe '("*" . "*:*") "UID")
                 (list (imap-mailbox-get-1 'uidvalidity mailbox)
                       (apply 'max (imap-message-map
-                                   (lambda (uid prop) uid) 'UID))))
+                                   (lambda (uid _prop) uid) 'UID))))
          (if old-mailbox
              (imap-mailbox-select old-mailbox (eq state 'examine))
            (imap-mailbox-unselect)))))))
@@ -1893,7 +1893,7 @@ first element.  The rest of list contains the saved articles' UIDs."
   (with-current-buffer (or buffer (current-buffer))
     (imap-message-appenduid-1 (imap-utf7-encode mailbox))))
 
-(defun imap-message-append (mailbox article &optional flags date-time buffer)
+(defun imap-message-append (mailbox article &optional _flags _date-time buffer)
   "Append ARTICLE (a buffer) to MAILBOX on server in BUFFER.
 FLAGS and DATE-TIME is currently not used.  Return a cons holding
 uidvalidity of MAILBOX and UID the newly created article got, or nil
index ff6d0d10671c320d25fd4a20fa82077009330618..595037ab94392cfcbf0045f17bcd38f98aa057b2 100644 (file)
     (insert-directory . tramp-adb-handle-insert-directory)
     (insert-file-contents . tramp-handle-insert-file-contents)
     (load . tramp-handle-load)
-    ;; `make-auto-save-file-name' performed by default handler.
+    (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
     (make-directory . tramp-adb-handle-make-directory)
     (make-directory-internal . ignore)
     (make-symbolic-link . ignore)
@@ -407,9 +407,9 @@ Convert (\"-al\") to (\"-a\" \"-l\").  Remove arguments like \"--dired\"."
   (split-string
    (apply 'concat
          (mapcar (lambda (s)
-                   (replace-regexp-in-string
+                   (tramp-compat-replace-regexp-in-string
                     "\\(.\\)"  " -\\1"
-                    (replace-regexp-in-string "^-" "" s)))
+                    (tramp-compat-replace-regexp-in-string "^-" "" s)))
                  ;; FIXME: Warning about removed switches (long and non-dash).
                  (delq nil
                        (mapcar
@@ -874,7 +874,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
     (when p
       (if (yes-or-no-p "A command is running.  Kill it? ")
          (ignore-errors (kill-process p))
-       (tramp-compat-user-error "Shell command in progress")))
+       (tramp-user-error p "Shell command in progress")))
 
     (if current-buffer-p
        (progn
@@ -1153,11 +1153,11 @@ connection if a previous connection has died for some reason."
                      (read (current-buffer))))))
              (when (and (stringp old-getprop)
                         (not (string-equal old-getprop new-getprop)))
-               (tramp-cleanup vec)
                (tramp-message
                 vec 3
                 "Connection reset, because remote host changed from `%s' to `%s'"
                 old-getprop new-getprop)
+               (tramp-cleanup-connection vec t)
                (tramp-adb-maybe-open-connection vec)))
 
            ;; Change user if indicated.
index 118be5974339e375c4655652d6680856fa553d08..b4e5e4ffd0fbbbf53f9ef2a150c2f8ed7c122cc5 100644 (file)
@@ -285,6 +285,16 @@ KEY identifies the connection, it is either a process or a vector."
     (let (result)
       (maphash
        (lambda (key value)
+        ;; Remove text properties from KEY.
+        (when (vectorp key)
+          (dotimes (i (length key))
+            (when (stringp (aref key i))
+              (aset key i
+                    (funcall
+                     ;; `substring-no-properties' does not exist in XEmacs.
+                     (if (functionp 'substring-no-properties)
+                         'substring-no-properties 'identity)
+                     (aref key i))))))
         (let ((tmp (format
                     "(%s %s)"
                     (if (processp key)
index 937db34a3460e89128e69ef11a109790e638c1b7..5015929534dec5bfa62d8be715cfa612238790f0 100644 (file)
     (buffer-list))))
 
 ;;;###tramp-autoload
-(defun tramp-cleanup-connection (vec)
+(defun tramp-cleanup-connection (vec &optional keep-debug keep-password)
   "Flush all connection related objects.
-This includes password cache, file cache, connection cache, buffers.
+This includes password cache, file cache, connection cache,
+buffers.  KEEP-DEBUG non-nil preserves the debug buffer.
+KEEP-PASSWORD non-nil preserves the password cache.
 When called interactively, a Tramp connection has to be selected."
   (interactive
    ;; When interactive, select the Tramp remote identification.
@@ -80,14 +82,15 @@ When called interactively, a Tramp connection has to be selected."
               "Enter Tramp connection: " connections nil t
               (try-completion "" connections)))
        (when (and name (file-remote-p name))
-         (with-parsed-tramp-file-name name nil v))))))
+         (with-parsed-tramp-file-name name nil v))))
+    nil nil))
 
   (if (not vec)
       ;; Nothing to do.
       (message "No Tramp connection found.")
 
     ;; Flush password cache.
-    (tramp-clear-passwd vec)
+    (unless keep-password (tramp-clear-passwd vec))
 
     ;; Flush file cache.
     (tramp-flush-directory-property vec "")
@@ -101,7 +104,8 @@ When called interactively, a Tramp connection has to be selected."
     ;; Remove buffers.
     (dolist
        (buf (list (get-buffer (tramp-buffer-name vec))
-                  (get-buffer (tramp-debug-buffer-name vec))
+                  (unless keep-debug
+                    (get-buffer (tramp-debug-buffer-name vec)))
                   (tramp-get-connection-property vec "process-buffer" nil)))
       (when (bufferp buf) (kill-buffer buf)))))
 
@@ -190,7 +194,9 @@ This includes password cache, file cache, connection cache, buffers."
 
        'tramp-load-report-modules      ; pre-hook
        'tramp-append-tramp-buffers     ; post-hook
-       (propertize "\n" 'display "\
+       (funcall
+       (if (functionp 'propertize) 'propertize 'progn)
+       "\n" 'display "\
 Enter your bug report in this message, including as much detail
 as you possibly can about the problem, what you did to cause it
 and what the local and remote machines are.
index f0905245deacad5ea506829f19f8c2469cdef450..ca70c1384cbf9251a9c6974ca646edd83bf14b65 100644 (file)
 ;; `with-temp-message' does not exist in XEmacs.
 (if (fboundp 'with-temp-message)
     (defalias 'tramp-compat-with-temp-message 'with-temp-message)
-  (defmacro tramp-compat-with-temp-message (message &rest body)
+  (defmacro tramp-compat-with-temp-message (_message &rest body)
     "Display MESSAGE temporarily if non-nil while BODY is evaluated."
     `(progn ,@body)))
 
@@ -313,13 +313,21 @@ Not actually used.  Use `(format \"%o\" i)' instead?"
   "Like `copy-file' for Tramp files (compat function)."
   (cond
    (preserve-extended-attributes
-    (tramp-compat-funcall
-     'copy-file filename newname ok-if-already-exists keep-date
-     preserve-uid-gid preserve-extended-attributes))
+    (condition-case nil
+       (tramp-compat-funcall
+        'copy-file filename newname ok-if-already-exists keep-date
+        preserve-uid-gid preserve-extended-attributes)
+      (wrong-number-of-arguments
+       (tramp-compat-copy-file
+       filename newname ok-if-already-exists keep-date preserve-uid-gid))))
    (preserve-uid-gid
-    (tramp-compat-funcall
-     'copy-file filename newname ok-if-already-exists keep-date
-     preserve-uid-gid))
+    (condition-case nil
+       (tramp-compat-funcall
+        'copy-file filename newname ok-if-already-exists keep-date
+        preserve-uid-gid)
+      (wrong-number-of-arguments
+       (tramp-compat-copy-file
+       filename newname ok-if-already-exists keep-date))))
    (t
     (copy-file filename newname ok-if-already-exists keep-date))))
 
@@ -518,11 +526,57 @@ EOL-TYPE can be one of `dos', `unix', or `mac'."
                        "`dos', `unix', or `mac'")))))
         (t (error "Can't change EOL conversion -- is MULE missing?"))))
 
-;; `user-error' has been added to Emacs 24.3.
-(defun tramp-compat-user-error (format &rest args)
-  "Signal a pilot error."
-;  (tramp-backtrace)
-  (apply (if (fboundp 'user-error) 'user-error 'error) format args))
+;; `replace-regexp-in-string' does not exist in XEmacs.
+;; Implementation is taken from Emacs 24.
+(if (fboundp 'replace-regexp-in-string)
+    (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string)
+  (defun tramp-compat-replace-regexp-in-string
+    (regexp rep string &optional fixedcase literal subexp start)
+    "Replace all matches for REGEXP with REP in STRING.
+
+Return a new string containing the replacements.
+
+Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the
+arguments with the same names of function `replace-match'.  If START
+is non-nil, start replacements at that index in STRING.
+
+REP is either a string used as the NEWTEXT arg of `replace-match' or a
+function.  If it is a function, it is called with the actual text of each
+match, and its value is used as the replacement text.  When REP is called,
+the match data are the result of matching REGEXP against a substring
+of STRING.
+
+To replace only the first match (if any), make REGEXP match up to \\'
+and replace a sub-expression, e.g.
+  (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
+    => \" bar foo\""
+
+    (let ((l (length string))
+         (start (or start 0))
+         matches str mb me)
+      (save-match-data
+       (while (and (< start l) (string-match regexp string start))
+         (setq mb (match-beginning 0)
+               me (match-end 0))
+         ;; If we matched the empty string, make sure we advance by one char
+         (when (= me mb) (setq me (min l (1+ mb))))
+         ;; Generate a replacement for the matched substring.
+         ;; Operate only on the substring to minimize string consing.
+         ;; Set up match data for the substring for replacement;
+         ;; presumably this is likely to be faster than munging the
+         ;; match data directly in Lisp.
+         (string-match regexp (setq str (substring string mb me)))
+         (setq matches
+               (cons (replace-match (if (stringp rep)
+                                        rep
+                                      (funcall rep (match-string 0 str)))
+                                    fixedcase literal str subexp)
+                     (cons (substring string start mb) ; unmatched prefix
+                           matches)))
+         (setq start me))
+       ;; Reconstruct a string from the pieces.
+       (setq matches (cons (substring string start l) matches)) ; leftover
+       (apply #'concat (nreverse matches))))))
 
 (add-hook 'tramp-unload-hook
          (lambda ()
index e26ffb26e84436110866b2349375918e06afd053..e764e4767dd50ffacbef71999b60acfb7fa62951 100644 (file)
@@ -453,7 +453,7 @@ Every entry is a list (NAME ADDRESS).")
     (insert-directory . tramp-gvfs-handle-insert-directory)
     (insert-file-contents . tramp-gvfs-handle-insert-file-contents)
     (load . tramp-handle-load)
-    ;; `make-auto-save-file-name' performed by default handler.
+    (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
     (make-directory . tramp-gvfs-handle-make-directory)
     (make-directory-internal . ignore)
     (make-symbolic-link . ignore)
@@ -490,7 +490,7 @@ Operations not mentioned here will be handled by the default Emacs primitives.")
 First arg specifies the OPERATION, second arg is a list of arguments to
 pass to the OPERATION."
   (unless tramp-gvfs-enabled
-    (tramp-compat-user-error "Package `tramp-gvfs' not supported"))
+    (tramp-user-error nil "Package `tramp-gvfs' not supported"))
   (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist)))
     (if fn
        (save-match-data (apply (cdr fn) args))
@@ -594,15 +594,19 @@ is no information where to trace the message.")
            (and (tramp-tramp-file-p newname)
                 (not (tramp-gvfs-file-name-p newname))))
 
-       ;; We cannot copy directly.
+       ;; We cannot call `copy-file' directly.  Use
+       ;; `tramp-compat-funcall' for backward compatibility (number
+       ;; of arguments).
        (let ((tmpfile (tramp-compat-make-temp-file filename)))
          (cond
           (preserve-extended-attributes
-           (copy-file
+           (tramp-compat-funcall
+            'copy-file
             filename tmpfile t keep-date preserve-uid-gid
             preserve-extended-attributes))
           (preserve-uid-gid
-           (copy-file filename tmpfile t keep-date preserve-uid-gid))
+           (tramp-compat-funcall
+            'copy-file filename tmpfile t keep-date preserve-uid-gid))
           (t
            (copy-file filename tmpfile t keep-date)))
          (rename-file tmpfile newname ok-if-already-exists))
@@ -950,7 +954,7 @@ is no information where to trace the message.")
     (tramp-message proc 6 "%S\n%s" proc string)
     (setq string (concat rest-string string)
          ;; Attribute change is returned in unused wording.
-         string (replace-regexp-in-string
+         string (tramp-compat-replace-regexp-in-string
                  "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
 
     (while (string-match
@@ -960,7 +964,7 @@ is no information where to trace the message.")
                    "Event = \\([^[:blank:]]+\\)[\n\r]+")
            string)
       (let ((action (intern-soft
-                    (replace-regexp-in-string
+                    (tramp-compat-replace-regexp-in-string
                      "_" "-" (downcase (match-string 2 string)))))
            (file (match-string 1 string)))
        (setq string (replace-match "" nil nil string))
@@ -1158,7 +1162,8 @@ is no information where to trace the message.")
 (defun tramp-gvfs-file-name (object-path)
   "Retrieve file name from D-Bus OBJECT-PATH."
   (dbus-unescape-from-identifier
-   (replace-regexp-in-string "^.*/\\([^/]+\\)$" "\\1" object-path)))
+   (tramp-compat-replace-regexp-in-string
+    "^.*/\\([^/]+\\)$" "\\1" object-path)))
 
 (defun tramp-bluez-address (device)
   "Return bluetooth device address from a given bluetooth DEVICE name."
@@ -1417,47 +1422,38 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
         (port (tramp-file-name-port vec))
         (localname (tramp-file-name-localname vec))
         (ssl (if (string-match "^davs" method) "true" "false"))
-        (mount-spec '(:array))
-        (mount-pref "/"))
-
-    (setq
-     mount-spec
-     (append
-      mount-spec
-      (cond
-       ((string-equal "smb" method)
-       (string-match "^/?\\([^/]+\\)" localname)
-       (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
-             (tramp-gvfs-mount-spec-entry "server" host)
-             (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname))))
-       ((string-equal "obex" method)
-       (list (tramp-gvfs-mount-spec-entry "type" method)
-             (tramp-gvfs-mount-spec-entry
-              "host" (concat "[" (tramp-bluez-address host) "]"))))
-       ((string-match "^dav" method)
-       (list (tramp-gvfs-mount-spec-entry "type" "dav")
-             (tramp-gvfs-mount-spec-entry "host" host)
-             (tramp-gvfs-mount-spec-entry "ssl" ssl)))
-       (t
-       (list (tramp-gvfs-mount-spec-entry "type" method)
-             (tramp-gvfs-mount-spec-entry "host" host))))))
-
-    (when user
-      (add-to-list
-       'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append))
-
-    (when domain
-      (add-to-list
-       'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append))
-
-    (when port
-      (add-to-list
-       'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port))
-       'append))
-
-    (when (and (string-match "^dav" method)
-              (string-match "^/?[^/]+" localname))
-      (setq mount-pref (match-string 0 localname)))
+        (mount-spec
+          `(:array
+            ,@(cond
+               ((string-equal "smb" method)
+                (string-match "^/?\\([^/]+\\)" localname)
+                (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
+                      (tramp-gvfs-mount-spec-entry "server" host)
+                      (tramp-gvfs-mount-spec-entry
+                      "share" (match-string 1 localname))))
+               ((string-equal "obex" method)
+                (list (tramp-gvfs-mount-spec-entry "type" method)
+                      (tramp-gvfs-mount-spec-entry
+                       "host" (concat "[" (tramp-bluez-address host) "]"))))
+               ((string-match "\\`dav" method)
+                (list (tramp-gvfs-mount-spec-entry "type" "dav")
+                      (tramp-gvfs-mount-spec-entry "host" host)
+                      (tramp-gvfs-mount-spec-entry "ssl" ssl)))
+               (t
+                (list (tramp-gvfs-mount-spec-entry "type" method)
+                      (tramp-gvfs-mount-spec-entry "host" host))))
+            ,@(when user
+                (list (tramp-gvfs-mount-spec-entry "user" user)))
+            ,@(when domain
+                (list (tramp-gvfs-mount-spec-entry "domain" domain)))
+            ,@(when port
+                (list (tramp-gvfs-mount-spec-entry
+                      "port" (number-to-string port))))))
+        (mount-pref
+          (if (and (string-match "\\`dav" method)
+                   (string-match "^/?[^/]+" localname))
+              (match-string 0 localname)
+            "/")))
 
     ;; Return.
     `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec)))
@@ -1718,11 +1714,13 @@ They are retrieved from the hal daemon."
       (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
              :system tramp-hal-service device tramp-hal-interface-device
              "PropertyExists" "sync.plugin")
-       (add-to-list
-        'tramp-synce-devices
-        (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
-          :system tramp-hal-service device tramp-hal-interface-device
-          "GetPropertyString" "pda.pocketpc.name"))))
+       (let ((prop
+              (with-tramp-dbus-call-method
+               tramp-gvfs-dbus-event-vector t
+               :system tramp-hal-service device tramp-hal-interface-device
+               "GetPropertyString" "pda.pocketpc.name")))
+         (unless (member prop tramp-synce-devices)
+           (push prop tramp-synce-devices)))))
     (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices)
     tramp-synce-devices))
 
index 53dbdbc45d472f72ce4dc5d25e5b344669683ef9..e2c7461228f8ded8b1ff9b5401e91125ae6e966b 100644 (file)
@@ -238,7 +238,7 @@ authentication is requested from proxy server, provide it."
        tramp-gw-vector 6 "\n%s"
        (format
        "%s%s\r\n" command
-       (replace-regexp-in-string ;; no password in trace!
+       (tramp-compat-replace-regexp-in-string ;; no password in trace!
         "Basic [^\r\n]+" "Basic xxxxx" authentication t)))
       (with-current-buffer buffer
        ;; Trap errors to be traced in the right trace buffer.  Often,
index ac13176518934726dd75747b44dd7bd9ddd3f026..f91cbb29a1d1473071ead523d83e656faf81258c 100644 (file)
@@ -850,7 +850,7 @@ of command line.")
     (insert-file-contents-literally
      . tramp-sh-handle-insert-file-contents-literally)
     (load . tramp-handle-load)
-    (make-auto-save-file-name . tramp-sh-handle-make-auto-save-file-name)
+    (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
     (make-directory . tramp-sh-handle-make-directory)
     (make-symbolic-link . tramp-sh-handle-make-symbolic-link)
     (process-file . tramp-sh-handle-process-file)
@@ -2500,8 +2500,8 @@ This is like `dired-recursive-delete-directory' for Tramp files."
                        'file-name-nondirectory (list localname)))
         (setq localname (tramp-run-real-handler
                         'file-name-directory (list localname))))
-      (unless full-directory-p
-        (setq switches (add-to-list 'switches "-d" 'append)))
+      (unless (or full-directory-p (member "-d" switches))
+        (setq switches (append switches '("-d"))))
       (setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
       (when wildcard
        (setq switches (concat switches " " wildcard)))
@@ -2978,48 +2978,6 @@ the result will be a local, non-Tramp, filename."
          (fset 'find-buffer-file-type find-buffer-file-type-function)
        (fmakunbound 'find-buffer-file-type)))))
 
-(defun tramp-sh-handle-make-auto-save-file-name ()
-  "Like `make-auto-save-file-name' for Tramp files.
-Returns a file name in `tramp-auto-save-directory' for autosaving this file."
-  (let ((tramp-auto-save-directory tramp-auto-save-directory)
-       (buffer-file-name
-        (tramp-subst-strs-in-string
-         '(("_" . "|")
-           ("/" . "_a")
-           (":" . "_b")
-           ("|" . "__")
-           ("[" . "_l")
-           ("]" . "_r"))
-         (buffer-file-name))))
-    ;; File name must be unique.  This is ensured with Emacs 22 (see
-    ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
-    ;; all other cases we must do it ourselves.
-    (when (boundp 'auto-save-file-name-transforms)
-      (mapc
-       (lambda (x)
-        (when (and (string-match (car x) buffer-file-name)
-                   (not (car (cddr x))))
-          (setq tramp-auto-save-directory
-                (or tramp-auto-save-directory
-                    (tramp-compat-temporary-file-directory)))))
-       (symbol-value 'auto-save-file-name-transforms)))
-    ;; Create directory.
-    (when tramp-auto-save-directory
-      (setq buffer-file-name
-           (expand-file-name buffer-file-name tramp-auto-save-directory))
-      (unless (file-exists-p tramp-auto-save-directory)
-       (make-directory tramp-auto-save-directory t)))
-    ;; Run plain `make-auto-save-file-name'.  There might be an advice when
-    ;; it is not a magic file name operation (since Emacs 22).
-    ;; We must deactivate it temporarily.
-    (if (not (ad-is-active 'make-auto-save-file-name))
-       (tramp-run-real-handler 'make-auto-save-file-name nil)
-      ;; else
-      (ad-deactivate 'make-auto-save-file-name)
-      (prog1
-       (tramp-run-real-handler 'make-auto-save-file-name nil)
-       (ad-activate 'make-auto-save-file-name)))))
-
 ;; CCC grok LOCKNAME
 (defun tramp-sh-handle-write-region
   (start end filename &optional append visit lockname confirm)
@@ -3425,7 +3383,7 @@ Fall back to normal file name handler if no Tramp handler exists."
     (tramp-message proc 6 "%S\n%s" proc string)
     (setq string (concat rest-string string)
          ;; Attribute change is returned in unused wording.
-         string (replace-regexp-in-string
+         string (tramp-compat-replace-regexp-in-string
                  "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
 
     (while (string-match
@@ -3439,7 +3397,7 @@ Fall back to normal file name handler if no Tramp handler exists."
             (list
              proc
              (intern-soft
-              (replace-regexp-in-string
+              (tramp-compat-replace-regexp-in-string
                "_" "-" (downcase (match-string 4 string))))
              ;; File names are returned as absolute paths.  We must
              ;; add the remote prefix.
@@ -3475,7 +3433,8 @@ Fall back to normal file name handler if no Tramp handler exists."
            proc
            (mapcar
             (lambda (x)
-              (intern-soft (replace-regexp-in-string "_" "-" (downcase x))))
+              (intern-soft
+               (tramp-compat-replace-regexp-in-string "_" "-" (downcase x))))
             (split-string (match-string 1 line) "," 'omit-nulls))
            (match-string 3 line))))
       ;; Usually, we would add an Emacs event now.  Unfortunately,
@@ -3846,11 +3805,12 @@ process to set up.  VEC specifies the connection."
          vec "uname"
          (tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\""))))
     (when (and (stringp old-uname) (not (string-equal old-uname new-uname)))
-      (tramp-cleanup vec)
       (tramp-message
        vec 3
        "Connection reset, because remote host changed from `%s' to `%s'"
        old-uname new-uname)
+      ;; We want to keep the password.
+      (tramp-cleanup-connection vec t t)
       (throw 'uname-changed (tramp-maybe-open-connection vec))))
 
   ;; Check whether the remote host suffers from buggy
@@ -4252,7 +4212,7 @@ Gateway hops are already opened."
                  ?h (or (tramp-file-name-host (car target-alist)) ""))))
          (with-parsed-tramp-file-name proxy l
            ;; Add the hop.
-           (add-to-list 'target-alist l)
+           (push l target-alist)
            ;; Start next search.
            (setq choices tramp-default-proxies-alist)))))
 
@@ -4270,11 +4230,11 @@ Gateway hops are already opened."
           vec 'file-error
           "Connection `%s' is not supported for gateway access." hop))
        ;; Open the gateway connection.
-       (add-to-list
-        'target-alist
+       (push
         (vector
          (tramp-file-name-method hop) (tramp-file-name-user hop)
-         (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil))
+         (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)
+        target-alist)
        ;; For the password prompt, we need the correct values.
        ;; Therefore, we must remember the gateway vector.  But we
        ;; cannot do it as connection property, because it shouldn't
@@ -4328,68 +4288,68 @@ Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
   (tramp-check-proper-host vec)
 
-  (catch 'uname-changed
-    (let ((p (tramp-get-connection-process vec))
-         (process-name (tramp-get-connection-property vec "process-name" nil))
-         (process-environment (copy-sequence process-environment))
-         (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
-
-      ;; If Tramp opens the same connection within a short time frame,
-      ;; there is a problem.  We shall signal this.
-      (unless (or (and p (processp p) (memq (process-status p) '(run open)))
-                 (not (equal (butlast (append vec nil) 2)
-                             (car tramp-current-connection)))
-                 (> (tramp-time-diff
-                     (current-time) (cdr tramp-current-connection))
-                    (or tramp-connection-min-time-diff 0)))
-       (throw 'suppress 'suppress))
-
-      ;; If too much time has passed since last command was sent, look
-      ;; whether process is still alive.  If it isn't, kill it.  When
-      ;; using ssh, it can sometimes happen that the remote end has
-      ;; hung up but the local ssh client doesn't recognize this until
-      ;; it tries to send some data to the remote end.  So that's why
-      ;; we try to send a command from time to time, then look again
-      ;; whether the process is really alive.
-      (condition-case nil
-         (when (and (> (tramp-time-diff
-                        (current-time)
-                        (tramp-get-connection-property
-                         p "last-cmd-time" '(0 0 0)))
-                       60)
-                    p (processp p) (memq (process-status p) '(run open)))
-           (tramp-send-command vec "echo are you awake" t t)
-           (unless (and (memq (process-status p) '(run open))
-                        (tramp-wait-for-output p 10))
-             ;; The error will be caught locally.
-             (tramp-error vec 'file-error "Awake did fail")))
-       (file-error
-        (tramp-cleanup vec)
-        (setq p nil)))
-
-      ;; New connection must be opened.
-      (condition-case err
-         (unless (and p (processp p) (memq (process-status p) '(run open)))
-
-           ;; We call `tramp-get-buffer' in order to get a debug
-           ;; buffer for messages from the beginning.
-           (tramp-get-buffer vec)
-
-           ;; If `non-essential' is non-nil, don't reopen a new connection.
-           (when (and (boundp 'non-essential) (symbol-value 'non-essential))
-             (throw 'non-essential 'non-essential))
-
-           (with-tramp-progress-reporter
-               vec 3
-               (if (zerop (length (tramp-file-name-user vec)))
-                   (format "Opening connection for %s using %s"
-                           (tramp-file-name-host vec)
-                           (tramp-file-name-method vec))
-                 (format "Opening connection for %s@%s using %s"
-                         (tramp-file-name-user vec)
+  (let ((p (tramp-get-connection-process vec))
+       (process-name (tramp-get-connection-property vec "process-name" nil))
+       (process-environment (copy-sequence process-environment))
+       (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
+
+    ;; If Tramp opens the same connection within a short time frame,
+    ;; there is a problem.  We shall signal this.
+    (unless (or (and p (processp p) (memq (process-status p) '(run open)))
+               (not (equal (butlast (append vec nil) 2)
+                           (car tramp-current-connection)))
+               (> (tramp-time-diff
+                   (current-time) (cdr tramp-current-connection))
+                  (or tramp-connection-min-time-diff 0)))
+      (throw 'suppress 'suppress))
+
+    ;; If too much time has passed since last command was sent, look
+    ;; whether process is still alive.  If it isn't, kill it.  When
+    ;; using ssh, it can sometimes happen that the remote end has hung
+    ;; up but the local ssh client doesn't recognize this until it
+    ;; tries to send some data to the remote end.  So that's why we
+    ;; try to send a command from time to time, then look again
+    ;; whether the process is really alive.
+    (condition-case nil
+       (when (and (> (tramp-time-diff
+                      (current-time)
+                      (tramp-get-connection-property
+                       p "last-cmd-time" '(0 0 0)))
+                     60)
+                  p (processp p) (memq (process-status p) '(run open)))
+         (tramp-send-command vec "echo are you awake" t t)
+         (unless (and (memq (process-status p) '(run open))
+                      (tramp-wait-for-output p 10))
+           ;; The error will be caught locally.
+           (tramp-error vec 'file-error "Awake did fail")))
+      (file-error
+       (tramp-cleanup-connection vec t)
+       (setq p nil)))
+
+    ;; New connection must be opened.
+    (condition-case err
+       (unless (and p (processp p) (memq (process-status p) '(run open)))
+
+         ;; We call `tramp-get-buffer' in order to get a debug buffer
+         ;; for messages from the beginning.
+         (tramp-get-buffer vec)
+
+         ;; If `non-essential' is non-nil, don't reopen a new connection.
+         (when (and (boundp 'non-essential) (symbol-value 'non-essential))
+           (throw 'non-essential 'non-essential))
+
+         (with-tramp-progress-reporter
+             vec 3
+             (if (zerop (length (tramp-file-name-user vec)))
+                 (format "Opening connection for %s using %s"
                          (tramp-file-name-host vec)
-                         (tramp-file-name-method vec)))
+                         (tramp-file-name-method vec))
+               (format "Opening connection for %s@%s using %s"
+                       (tramp-file-name-user vec)
+                       (tramp-file-name-host vec)
+                       (tramp-file-name-method vec)))
 
+           (catch 'uname-changed
              ;; Start new process.
              (when (and p (processp p))
                (delete-process p))
@@ -4544,13 +4504,13 @@ connection if a previous connection has died for some reason."
                        target-alist (cdr target-alist)))
 
                ;; Make initial shell settings.
-               (tramp-open-connection-setup-interactive-shell p vec))))
+               (tramp-open-connection-setup-interactive-shell p vec)))))
 
-       ;; When the user did interrupt, we must cleanup.
-       (quit
-        (tramp-cleanup vec)
-        ;; Propagate the quit signal.
-        (signal (car err) (cdr err)))))))
+      ;; When the user did interrupt, we must cleanup.
+      (quit
+       (tramp-cleanup-connection vec t)
+       ;; Propagate the quit signal.
+       (signal (car err) (cdr err))))))
 
 (defun tramp-send-command (vec command &optional neveropen nooutput)
   "Send the COMMAND to connection VEC.
index 569bfb9c8748aef4a4cbaeaa7348bf77121d6a49..27f3bd41e9c6fe0c7cc6e5314ba4e4dcc1766d88 100644 (file)
@@ -229,7 +229,7 @@ See `tramp-actions-before-shell' for more info.")
     (insert-directory . tramp-smb-handle-insert-directory)
     (insert-file-contents . tramp-handle-insert-file-contents)
     (load . tramp-handle-load)
-    ;; `make-auto-save-file-name' performed by default handler.
+    (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
     (make-directory . tramp-smb-handle-make-directory)
     (make-directory-internal . tramp-smb-handle-make-directory-internal)
     (make-symbolic-link . tramp-smb-handle-make-symbolic-link)
@@ -403,7 +403,7 @@ pass to the OPERATION."
               (port      (tramp-file-name-port v))
               (share     (tramp-smb-get-share v))
               (localname (file-name-as-directory
-                          (replace-regexp-in-string
+                          (tramp-compat-replace-regexp-in-string
                            "\\\\" "/" (tramp-smb-get-localname v))))
               (tmpdir    (make-temp-name
                           (expand-file-name
@@ -537,7 +537,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
            (unless (tramp-smb-send-command
                     v (format "put \"%s\" \"%s\""
                               filename (tramp-smb-get-localname v)))
-             (tramp-error v 'file-error "Cannot copy `%s'" filename))))))
+             (tramp-error
+              v 'file-error "Cannot copy `%s' to `%s'" filename newname))))))
 
     ;; KEEP-DATE handling.
     (when keep-date
@@ -1151,7 +1152,8 @@ target of the symlink differ."
       (tramp-dissect-file-name (if (file-remote-p filename) filename newname))
       0 (format "Renaming %s to %s" filename newname)
 
-    (if (and (tramp-equal-remote filename newname)
+    (if (and (not (file-exists-p newname))
+            (tramp-equal-remote filename newname)
             (string-equal
              (tramp-smb-get-share (tramp-dissect-file-name filename))
              (tramp-smb-get-share (tramp-dissect-file-name newname))))
@@ -1364,14 +1366,14 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)."
              (while (not (eobp))
                (setq entry (tramp-smb-read-file-entry share))
                (forward-line)
-               (when entry (add-to-list 'res entry))))
+               (when entry (push entry res))))
 
            ;; Cache share entries.
            (unless share
              (tramp-set-connection-property v "share-cache" res)))
 
          ;; Add directory itself.
-         (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0)))
+         (push '("" "drwxrwxrwx" 0 (0 0)) res)
 
          ;; There's a very strange error (debugged with XEmacs 21.4.14)
          ;; If there's no short delay, it returns nil.  No idea about.
@@ -1719,11 +1721,15 @@ If ARGUMENT is non-nil, use it as argument for
                (error
                 (with-current-buffer (tramp-get-connection-buffer vec)
                   (goto-char (point-min))
-                  (if (search-forward-regexp
-                       tramp-smb-wrong-passwd-regexp nil t)
+                  (if (and (boundp 'auth-sources)
+                           (symbol-value 'auth-sources)
+                           (search-forward-regexp
+                            tramp-smb-wrong-passwd-regexp nil t))
                       ;; Disable `auth-source' and `password-cache'.
+                      (tramp-message
+                       vec 3 "Retry connection with new password")
                       (let (auth-sources)
-                        (tramp-cleanup vec)
+                        (tramp-cleanup-connection vec t)
                         (tramp-smb-maybe-open-connection vec argument))
                     ;; Propagate the error.
                     (signal (car err) (cdr err)))))))))))))
index 5f473a496e2f8e691872f1f129e504ba8d4965c4..fe4f7b8bb54acf1c97c21162ea5c7c34a56a438d 100644 (file)
@@ -690,7 +690,7 @@ Useful for \"rsync\" like methods.")
 ;; Tramp only knows how to deal with `file-name-handler-alist', not
 ;; the other places.
 
-;; Currently, we have the choice between 'ftp, 'sep, and 'url.
+;; Currently, we have the choice between 'ftp and 'sep.
 ;;;###autoload
 (defcustom tramp-syntax
   (if (featurep 'xemacs) 'sep 'ftp)
@@ -699,20 +699,15 @@ Useful for \"rsync\" like methods.")
 It can have the following values:
 
   'ftp -- Ange-FTP respective EFS like syntax (GNU Emacs default)
-  'sep -- Syntax as defined for XEmacs (not available yet for GNU Emacs)
-  'url -- URL-like syntax."
+  'sep -- Syntax as defined for XEmacs."
   :group 'tramp
-  :type (if (featurep 'xemacs)
-           '(choice (const :tag "EFS"    ftp)
-                    (const :tag "XEmacs" sep)
-                    (const :tag "URL"    url))
-         '(choice (const :tag "Ange-FTP" ftp)
-                  (const :tag "URL"      url))))
+  :version "24.4"
+  :type `(choice (const :tag  ,(if (featurep 'xemacs) "EFS" "Ange-FTP") ftp)
+                (const :tag "XEmacs" sep)))
 
 (defconst tramp-prefix-format
   (cond ((equal tramp-syntax 'ftp) "/")
        ((equal tramp-syntax 'sep) "/[")
-       ((equal tramp-syntax 'url) "/")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching the very beginning of Tramp file names.
 Used in `tramp-make-tramp-file-name'.")
@@ -729,7 +724,6 @@ Should always start with \"^\". Derived from `tramp-prefix-format'.")
 (defconst tramp-postfix-method-format
   (cond ((equal tramp-syntax 'ftp) ":")
        ((equal tramp-syntax 'sep) "/")
-       ((equal tramp-syntax 'url) "://")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching delimiter between method and user or host names.
 Used in `tramp-make-tramp-file-name'.")
@@ -776,7 +770,6 @@ Derived from `tramp-postfix-user-format'.")
 (defconst tramp-prefix-ipv6-format
   (cond ((equal tramp-syntax 'ftp) "[")
        ((equal tramp-syntax 'sep) "")
-       ((equal tramp-syntax 'url) "[")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching left hand side of IPv6 addresses.
 Used in `tramp-make-tramp-file-name'.")
@@ -796,7 +789,6 @@ Derived from `tramp-prefix-ipv6-format'.")
 (defconst tramp-postfix-ipv6-format
   (cond ((equal tramp-syntax 'ftp) "]")
        ((equal tramp-syntax 'sep) "")
-       ((equal tramp-syntax 'url) "]")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching right hand side of IPv6 addresses.
 Used in `tramp-make-tramp-file-name'.")
@@ -809,7 +801,6 @@ Derived from `tramp-postfix-ipv6-format'.")
 (defconst tramp-prefix-port-format
   (cond ((equal tramp-syntax 'ftp) "#")
        ((equal tramp-syntax 'sep) "#")
-       ((equal tramp-syntax 'url) ":")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching delimiter between host names and port numbers.")
 
@@ -838,7 +829,6 @@ Derived from `tramp-postfix-hop-format'.")
 (defconst tramp-postfix-host-format
   (cond ((equal tramp-syntax 'ftp) ":")
        ((equal tramp-syntax 'sep) "]")
-       ((equal tramp-syntax 'url) "")
        (t (error "Wrong `tramp-syntax' defined")))
   "String matching delimiter between host names and localnames.
 Used in `tramp-make-tramp-file-name'.")
@@ -908,16 +898,10 @@ On W32 systems, the volume letter must be ignored.")
 XEmacs uses a separate filename syntax for Tramp and EFS.
 See `tramp-file-name-structure' for more explanations.")
 
-;;;###autoload
-(defconst tramp-file-name-regexp-url "\\`/[^/|:]+://"
-  "Value for `tramp-file-name-regexp' for URL-like remoting.
-See `tramp-file-name-structure' for more explanations.")
-
 ;;;###autoload
 (defconst tramp-file-name-regexp
   (cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified)
        ((equal tramp-syntax 'sep) tramp-file-name-regexp-separate)
-       ((equal tramp-syntax 'url) tramp-file-name-regexp-url)
        (t (error "Wrong `tramp-syntax' defined")))
   "Regular expression matching file names handled by Tramp.
 This regexp should match Tramp file names but no other file names.
@@ -951,17 +935,10 @@ On W32 systems, the volume letter must be ignored.")
 XEmacs uses a separate filename syntax for Tramp and EFS.
 See `tramp-file-name-structure' for more explanations.")
 
-;;;###autoload
-(defconst tramp-completion-file-name-regexp-url
-  "\\`/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'"
-  "Value for `tramp-completion-file-name-regexp' for URL-like remoting.
-See `tramp-file-name-structure' for more explanations.")
-
 ;;;###autoload
 (defconst tramp-completion-file-name-regexp
   (cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified)
        ((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate)
-       ((equal tramp-syntax 'url) tramp-completion-file-name-regexp-url)
        (t (error "Wrong `tramp-syntax' defined")))
   "Regular expression matching file names handled by Tramp completion.
 This regexp should match partial Tramp file names only.
@@ -1120,6 +1097,12 @@ calling HANDLER.")
 
 ;;; Internal functions which must come first:
 
+(defsubst tramp-user-error (vec-or-proc format &rest args)
+  "Signal a pilot error."
+  (apply
+   'tramp-error vec-or-proc
+   (if (fboundp 'user-error) 'user-error 'error) format args))
+
 ;; Conversion functions between external representation and
 ;; internal data structure.  Convenience functions for internal
 ;; data structure.
@@ -1232,17 +1215,18 @@ their replacement."
        (if noninteractive
            (warn "Method %s is obsolete, using %s"
                  result (substring result 0 -1))
-         (unless (y-or-n-p (format "Method %s is obsolete, use %s? "
+         (unless (y-or-n-p (format "Method \"%s\" is obsolete, use \"%s\"? "
                                    result (substring result 0 -1)))
-           (tramp-compat-user-error "Method \"%s\" not supported" result)))
+           (tramp-user-error nil "Method \"%s\" not supported" result)))
        (add-to-list 'tramp-warned-obsolete-methods result))
       ;; This works with the current set of `tramp-obsolete-methods'.
       ;; Must be improved, if their are more sophisticated replacements.
       (setq result (substring result 0 -1)))
-    ;; We must mark, whether a default value has been used.
-    (if (or method (null result))
+    ;; We must mark, whether a default value has been used.  Not
+    ;; applicable for XEmacs.
+    (if (or method (null result) (null (functionp 'propertize)))
        result
-      (propertize result 'tramp-default t))))
+      (tramp-compat-funcall 'propertize result 'tramp-default t))))
 
 (defun tramp-find-user (method user host)
   "Return the right user string to use.
@@ -1260,10 +1244,11 @@ This is USER, if non-nil. Otherwise, do a lookup in
                   (setq choices nil)))
               luser)
             tramp-default-user)))
-    ;; We must mark, whether a default value has been used.
-    (if (or user (null result))
+    ;; We must mark, whether a default value has been used.  Not
+    ;; applicable for XEmacs.
+    (if (or user (null result) (null (functionp 'propertize)))
        result
-      (propertize result 'tramp-default t))))
+      (tramp-compat-funcall 'propertize result 'tramp-default t))))
 
 (defun tramp-find-host (method user host)
   "Return the right host string to use.
@@ -1289,8 +1274,8 @@ This is HOST, if non-nil. Otherwise, it is `tramp-default-host'."
               (or (null method) (get-text-property 0 'tramp-default method))
               (or (null user) (get-text-property 0 'tramp-default user))
               (member host (mapcar 'car tramp-methods)))
-      (tramp-compat-user-error
-       "Host name must not match method `%s'" host))))
+      (tramp-cleanup-connection vec)
+      (tramp-user-error vec "Host name must not match method \"%s\"" host))))
 
 (defun tramp-dissect-file-name (name &optional nodefault)
   "Return a `tramp-file-name' structure.
@@ -1300,7 +1285,7 @@ non-nil, the file name parts are not expanded to their default
 values."
   (save-match-data
     (let ((match (string-match (nth 0 tramp-file-name-structure) name)))
-      (unless match (tramp-compat-user-error "Not a Tramp file name: %s" name))
+      (unless match (tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
       (let ((method    (match-string (nth 1 tramp-file-name-structure) name))
            (user      (match-string (nth 2 tramp-file-name-structure) name))
            (host      (match-string (nth 3 tramp-file-name-structure) name))
@@ -1485,7 +1470,8 @@ ARGUMENTS to actually emit the message (if applicable)."
                         "tramp-debug-message"
                         "tramp-error"
                         "tramp-error-with-buffer"
-                        "tramp-message")
+                        "tramp-message"
+                        "tramp-user-error")
                       t)
                      "$")
                     fn)))
@@ -1625,18 +1611,19 @@ Remaining args are Lisp expressions to be evaluated (inside an implicit
 
 If VAR is nil, then we bind `v' to the structure and `method', `user',
 `host', `localname', `hop' to the components."
-  `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
-         (,(if var (intern (concat (symbol-name var) "-method")) 'method)
-          (tramp-file-name-method ,(or var 'v)))
-         (,(if var (intern (concat (symbol-name var) "-user")) 'user)
-          (tramp-file-name-user ,(or var 'v)))
-         (,(if var (intern (concat (symbol-name var) "-host")) 'host)
-          (tramp-file-name-host ,(or var 'v)))
-         (,(if var (intern (concat (symbol-name var) "-localname")) 'localname)
-          (tramp-file-name-localname ,(or var 'v)))
-         (,(if var (intern (concat (symbol-name var) "-hop")) 'hop)
-          (tramp-file-name-hop ,(or var 'v))))
-     ,@body))
+  (let ((bindings
+         (mapcar (lambda (elem)
+                   `(,(if var (intern (format "%s-%s" var elem)) elem)
+                     (,(intern (format "tramp-file-name-%s" elem))
+                      ,(or var 'v))))
+                 '(method user host localname hop))))
+    `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
+            ,@bindings)
+       ;; We don't know which of those vars will be used, so we bind them all,
+       ;; and then add here a dummy use of all those variables, so we don't get
+       ;; flooded by warnings about those vars `body' didn't use.
+       (ignore ,@(mapcar #'car bindings))
+       ,@body)))
 
 (put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
 (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body))
@@ -1654,24 +1641,27 @@ If VAR is nil, then we bind `v' to the structure and `method', `user',
 If LEVEL does not fit for visible messages, there are only traces
 without a visible progress reporter."
   (declare (indent 3) (debug t))
-  `(let ((result "failed")
-        pr tm)
+  `(progn
      (tramp-message ,vec ,level "%s..." ,message)
-     ;; We start a pulsing progress reporter after 3 seconds.  Feature
-     ;; introduced in Emacs 24.1.
-     (when (and tramp-message-show-message
-               ;; Display only when there is a minimum level.
-               (<= ,level (min tramp-verbose 3)))
-       (ignore-errors
-        (setq pr (tramp-compat-funcall 'make-progress-reporter ,message)
-              tm (when pr
-                   (run-at-time 3 0.1 'tramp-progress-reporter-update pr)))))
-     (unwind-protect
-        ;; Execute the body.
-        (prog1 (progn ,@body) (setq result "done"))
-       ;; Stop progress reporter.
-       (if tm (tramp-compat-funcall 'cancel-timer tm))
-       (tramp-message ,vec ,level "%s...%s" ,message result))))
+     (let ((cookie "failed")
+           (tm
+            ;; We start a pulsing progress reporter after 3 seconds.  Feature
+            ;; introduced in Emacs 24.1.
+            (when (and tramp-message-show-message
+                       ;; Display only when there is a minimum level.
+                       (<= ,level (min tramp-verbose 3)))
+              (ignore-errors
+                (let ((pr (tramp-compat-funcall
+                           #'make-progress-reporter ,message)))
+                  (when pr
+                    (run-at-time 3 0.1
+                                 #'tramp-progress-reporter-update pr)))))))
+       (unwind-protect
+           ;; Execute the body.
+           (prog1 (progn ,@body) (setq cookie "done"))
+         ;; Stop progress reporter.
+         (if tm (tramp-compat-funcall 'cancel-timer tm))
+         (tramp-message ,vec ,level "%s...%s" ,message cookie)))))
 
 (tramp-compat-font-lock-add-keywords
  'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>"))
@@ -1722,19 +1712,6 @@ letter into the file name.  This function removes it."
        (replace-match "/" nil t name)
       name)))
 
-(defun tramp-cleanup (vec)
-  "Cleanup connection VEC, but keep the debug buffer."
-  (with-current-buffer (tramp-get-debug-buffer vec)
-    ;; Keep the debug buffer.
-    (rename-buffer
-     (generate-new-buffer-name tramp-temp-buffer-name) 'unique)
-    (tramp-cleanup-connection vec)
-    (if (= (point-min) (point-max))
-       (kill-buffer nil)
-      (rename-buffer (tramp-debug-buffer-name vec) 'unique))
-    ;; We call `tramp-get-buffer' in order to keep the debug buffer.
-    (tramp-get-buffer vec)))
-
 ;;; Config Manipulation Functions:
 
 ;;;###tramp-autoload
@@ -2157,7 +2134,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
                          (tramp-message
                           v 1 "Suppress received in operation %s"
                           (append (list operation) args))
-                         (tramp-cleanup v)
+                         (tramp-cleanup-connection v t)
                          (tramp-run-real-handler operation args)))
                       (t result)))
 
@@ -2531,64 +2508,40 @@ They are collected by `tramp-completion-dissect-file-name1'."
                        tramp-prefix-ipv6-regexp
                        "\\(" tramp-completion-ipv6-regexp x-nil   "\\)$")
                nil 1 2 nil))
-        ;; "/method:user" "/[method/user" "/method://user"
+        ;; "/method:user" "/[method/user"
         (tramp-completion-file-name-structure7
          (list (concat tramp-prefix-regexp
                        "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
                        "\\(" tramp-user-regexp x-nil   "\\)$")
                1 2 nil nil))
-        ;; "/method:host" "/[method/host" "/method://host"
+        ;; "/method:host" "/[method/host"
         (tramp-completion-file-name-structure8
          (list (concat tramp-prefix-regexp
                        "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
                        "\\(" tramp-host-regexp x-nil   "\\)$")
                1 nil 2 nil))
-        ;; "/method:[ipv6" "/[method/ipv6" "/method://[ipv6"
+        ;; "/method:[ipv6" "/[method/ipv6"
         (tramp-completion-file-name-structure9
          (list (concat tramp-prefix-regexp
                        "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
                        tramp-prefix-ipv6-regexp
                        "\\(" tramp-completion-ipv6-regexp x-nil   "\\)$")
                1 nil 2 nil))
-        ;; "/method:user@host" "/[method/user@host" "/method://user@host"
+        ;; "/method:user@host" "/[method/user@host"
         (tramp-completion-file-name-structure10
          (list (concat tramp-prefix-regexp
                        "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
                        "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp
                        "\\(" tramp-host-regexp x-nil   "\\)$")
                1 2 3 nil))
-        ;; "/method:user@[ipv6" "/[method/user@ipv6" "/method://user@[ipv6"
+        ;; "/method:user@[ipv6" "/[method/user@ipv6"
         (tramp-completion-file-name-structure11
          (list (concat tramp-prefix-regexp
                        "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
                        "\\(" tramp-user-regexp "\\)"   tramp-postfix-user-regexp
                        tramp-prefix-ipv6-regexp
                        "\\(" tramp-completion-ipv6-regexp x-nil   "\\)$")
-               1 2 3 nil))
-        ;; "/method: "/method:/"
-        (tramp-completion-file-name-structure12
-         (list
-          (if (equal tramp-syntax 'url)
-              (concat tramp-prefix-regexp
-                      "\\(" tramp-method-regexp "\\)"
-                      "\\(" (substring tramp-postfix-method-regexp 0 1)
-                      "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
-                      "\\(" "\\)$")
-            ;; Should not match if not URL syntax.
-            (concat tramp-prefix-regexp "/$"))
-          1 3 nil nil))
-        ;; "/method: "/method:/"
-        (tramp-completion-file-name-structure13
-         (list
-          (if (equal tramp-syntax 'url)
-              (concat tramp-prefix-regexp
-                      "\\(" tramp-method-regexp "\\)"
-                      "\\(" (substring tramp-postfix-method-regexp 0 1)
-                      "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
-                      "\\(" "\\)$")
-            ;; Should not match if not URL syntax.
-            (concat tramp-prefix-regexp "/$"))
-          1 nil 3 nil)))
+               1 2 3 nil)))
 
     (mapc (lambda (structure)
       (add-to-list 'result
@@ -2605,8 +2558,6 @@ They are collected by `tramp-completion-dissect-file-name1'."
        tramp-completion-file-name-structure9
        tramp-completion-file-name-structure10
        tramp-completion-file-name-structure11
-       tramp-completion-file-name-structure12
-       tramp-completion-file-name-structure13
        tramp-file-name-structure))
 
     (delq nil result)))
@@ -3233,7 +3184,7 @@ User is always nil."
     (when p
       (if (yes-or-no-p "A command is running.  Kill it? ")
          (ignore-errors (kill-process p))
-       (tramp-compat-user-error "Shell command in progress")))
+       (tramp-user-error p "Shell command in progress")))
 
     (if current-buffer-p
        (progn
@@ -3278,35 +3229,19 @@ User is always nil."
 
 (defun tramp-handle-substitute-in-file-name (filename)
   "Like `substitute-in-file-name' for Tramp files.
-\"//\" and \"/~\" substitute only in the local filename part.
-If the URL Tramp syntax is chosen, \"//\" as method delimiter and \"/~\" at
-beginning of local filename are not substituted."
+\"//\" and \"/~\" substitute only in the local filename part."
   ;; First, we must replace environment variables.
   (setq filename (tramp-replace-environment-variables filename))
   (with-parsed-tramp-file-name filename nil
-    (if (equal tramp-syntax 'url)
-       ;; We need to check localname only.  The other parts cannot contain
-       ;; "//" or "/~".
-       (if (and (> (length localname) 1)
-                (or (string-match "//" localname)
-                    (string-match "/~" localname 1)))
-           (tramp-run-real-handler 'substitute-in-file-name (list filename))
-         (tramp-make-tramp-file-name
-          (when method (substitute-in-file-name method))
-          (when user (substitute-in-file-name user))
-          (when host (substitute-in-file-name host))
-          (when localname
-            (tramp-run-real-handler
-             'substitute-in-file-name (list localname)))))
-      ;; Ignore in LOCALNAME everything before "//" or "/~".
-      (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
-       (setq filename
-             (concat (file-remote-p filename)
-                     (replace-match "\\1" nil nil localname)))
-       ;; "/m:h:~" does not work for completion.  We use "/m:h:~/".
-       (when (string-match "~$" filename)
-         (setq filename (concat filename "/"))))
-      (tramp-run-real-handler 'substitute-in-file-name (list filename)))))
+    ;; Ignore in LOCALNAME everything before "//" or "/~".
+    (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
+      (setq filename
+           (concat (file-remote-p filename)
+                   (replace-match "\\1" nil nil localname)))
+      ;; "/m:h:~" does not work for completion.  We use "/m:h:~/".
+      (when (string-match "~$" filename)
+       (setq filename (concat filename "/"))))
+    (tramp-run-real-handler 'substitute-in-file-name (list filename))))
 
 (defun tramp-handle-unhandled-file-name-directory (_filename)
   "Like `unhandled-file-name-directory' for Tramp files."
@@ -3974,6 +3909,48 @@ Return the local name of the temporary file."
 
 ;;; Auto saving to a special directory:
 
+(defun tramp-handle-make-auto-save-file-name ()
+  "Like `make-auto-save-file-name' for Tramp files.
+Returns a file name in `tramp-auto-save-directory' for autosaving this file."
+  (let ((tramp-auto-save-directory tramp-auto-save-directory)
+       (buffer-file-name
+        (tramp-subst-strs-in-string
+         '(("_" . "|")
+           ("/" . "_a")
+           (":" . "_b")
+           ("|" . "__")
+           ("[" . "_l")
+           ("]" . "_r"))
+         (buffer-file-name))))
+    ;; File name must be unique.  This is ensured with Emacs 22 (see
+    ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
+    ;; all other cases we must do it ourselves.
+    (when (boundp 'auto-save-file-name-transforms)
+      (mapc
+       (lambda (x)
+        (when (and (string-match (car x) buffer-file-name)
+                   (not (car (cddr x))))
+          (setq tramp-auto-save-directory
+                (or tramp-auto-save-directory
+                    (tramp-compat-temporary-file-directory)))))
+       (symbol-value 'auto-save-file-name-transforms)))
+    ;; Create directory.
+    (when tramp-auto-save-directory
+      (setq buffer-file-name
+           (expand-file-name buffer-file-name tramp-auto-save-directory))
+      (unless (file-exists-p tramp-auto-save-directory)
+       (make-directory tramp-auto-save-directory t)))
+    ;; Run plain `make-auto-save-file-name'.  There might be an advice when
+    ;; it is not a magic file name operation (since Emacs 22).
+    ;; We must deactivate it temporarily.
+    (if (not (ad-is-active 'make-auto-save-file-name))
+       (tramp-run-real-handler 'make-auto-save-file-name nil)
+      ;; else
+      (ad-deactivate 'make-auto-save-file-name)
+      (prog1
+       (tramp-run-real-handler 'make-auto-save-file-name nil)
+       (ad-activate 'make-auto-save-file-name)))))
+
 (unless (tramp-exists-file-name-handler 'make-auto-save-file-name)
   (defadvice make-auto-save-file-name
     (around tramp-advice-make-auto-save-file-name () activate)
index 75479160cbb1b846af3da18c2ce882dfe8bfb657..c410aa12c8329f4f4b19ceace81c38f3b6b79381 100644 (file)
@@ -45,7 +45,7 @@
 
 (defmacro nxml-debug-clear-inside (start end)
   (when nxml-debug
-    `(loop for overlay in (overlays-in ,start ,end)
+    `(cl-loop for overlay in (overlays-in ,start ,end)
            if (overlay-get overlay 'nxml-inside-debug)
            do (delete-overlay overlay)
            finally (nxml-debug-change "nxml-clear-inside" ,start ,end))))
index 2c807b078f5b0c073da2294c15fe1937f8348f30..e814c3a06f2e2854c4e74e3c6e35423c55318329 100644 (file)
@@ -4627,21 +4627,21 @@ bottom."
 
 
 ;;;###autoload
-(defun pr-customize (&rest ignore)
+(defun pr-customize (&rest _ignore)
   "Customization of the `printing' group."
   (interactive)
   (customize-group 'printing))
 
 
 ;;;###autoload
-(defun lpr-customize (&rest ignore)
+(defun lpr-customize (&rest _ignore)
   "Customization of the `lpr' group."
   (interactive)
   (customize-group 'lpr))
 
 
 ;;;###autoload
-(defun pr-help (&rest ignore)
+(defun pr-help (&rest _ignore)
   "Help for the printing package."
   (interactive)
   (pr-show-setup pr-help-message "*Printing Help*"))
@@ -4675,21 +4675,21 @@ bottom."
 
 
 ;;;###autoload
-(defun pr-show-ps-setup (&rest ignore)
+(defun pr-show-ps-setup (&rest _ignore)
   "Show current ps-print settings."
   (interactive)
   (pr-show-setup (ps-setup) "*PS Setup*"))
 
 
 ;;;###autoload
-(defun pr-show-pr-setup (&rest ignore)
+(defun pr-show-pr-setup (&rest _ignore)
   "Show current printing settings."
   (interactive)
   (pr-show-setup (pr-setup) "*PR Setup*"))
 
 
 ;;;###autoload
-(defun pr-show-lpr-setup (&rest ignore)
+(defun pr-show-lpr-setup (&rest _ignore)
   "Show current lpr settings."
   (interactive)
   (pr-show-setup (lpr-setup) "*LPR Setup*"))
@@ -6125,7 +6125,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
        (pr-insert-checkbox
        "\n               "
        'pr-i-region
-       #'(lambda (widget &rest ignore)
+       #'(lambda (widget &rest _ignore)
            (let ((region-p (pr-interface-save
                             (ps-mark-active-p))))
              (cond ((null (widget-value widget)) ; widget is nil
@@ -6146,7 +6146,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
        (pr-insert-checkbox
        "    "
        'pr-i-mode
-       #'(lambda (widget &rest ignore)
+       #'(lambda (widget &rest _ignore)
            (let ((mode-p (pr-interface-save
                           (pr-mode-alist-p))))
              (cond
@@ -6182,7 +6182,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   (widget-create 'regexp
                 :size 58
                 :format "\n      File Regexp : %v\n"
-                :notify (lambda (widget &rest ignore)
+                :notify (lambda (widget &rest _ignore)
                           (setq pr-i-regexp (widget-value widget)))
                 pr-i-regexp)
   ;;    1b. Directory: List Directory Entry
@@ -6222,7 +6222,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
        (pr-insert-checkbox
        "    "
        'pr-i-despool
-       #'(lambda (widget &rest ignore)
+       #'(lambda (widget &rest _ignore)
            (if pr-spool-p
                (setq pr-i-despool (not pr-i-despool))
              (ding)
@@ -6259,7 +6259,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
    'integer
    :size 3
    :format "\n  N-Up : %v"
-   :notify (lambda (widget &rest ignore)
+   :notify (lambda (widget &rest _ignore)
             (let ((value (if (string= (widget-apply widget :value-get) "")
                              0
                            (widget-value widget))))
@@ -6288,7 +6288,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   ;; 4. Settings:
   ;; 4. Settings: Landscape             Auto Region    Verbose
   (pr-insert-checkbox "\n\n  " 'ps-landscape-mode
-                     #'(lambda (&rest ignore)
+                     #'(lambda (&rest _ignore)
                          (setq ps-landscape-mode (not ps-landscape-mode)
                                pr-file-landscape ps-landscape-mode))
                      " Landscape             ")
@@ -6310,7 +6310,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   (pr-insert-toggle 'ps-zebra-stripes " Zebra Stripes")
   (pr-insert-checkbox "         "
                      'pr-spool-p
-                     #'(lambda (&rest ignore)
+                     #'(lambda (&rest _ignore)
                          (setq pr-spool-p (not pr-spool-p))
                          (unless pr-spool-p
                            (setq pr-i-despool nil)
@@ -6320,7 +6320,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   ;; 4. Settings: Duplex                Print with faces
   (pr-insert-checkbox "\n  "
                      'ps-spool-duplex
-                     #'(lambda (&rest ignore)
+                     #'(lambda (&rest _ignore)
                          (setq ps-spool-duplex (not ps-spool-duplex)
                                pr-file-duplex  ps-spool-duplex))
                      " Duplex                ")
@@ -6329,7 +6329,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   ;; 4. Settings: Tumble                Print via Ghostscript
   (pr-insert-checkbox "\n  "
                      'ps-spool-tumble
-                     #'(lambda (&rest ignore)
+                     #'(lambda (&rest _ignore)
                          (setq ps-spool-tumble (not ps-spool-tumble)
                                pr-file-tumble  ps-spool-tumble))
                      " Tumble                ")
@@ -6352,7 +6352,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   ;; 5. Customize:
   (pr-insert-italic "\n\nCustomize     :   " 2 11)
   (pr-insert-button 'pr-customize "printing" "   ")
-  (pr-insert-button #'(lambda (&rest ignore) (ps-print-customize))
+  (pr-insert-button #'(lambda (&rest _ignore) (ps-print-customize))
                    "ps-print" "   ")
   (pr-insert-button 'lpr-customize "lpr"))
 
@@ -6374,7 +6374,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   (pr-insert-button 'pr-kill-help "Kill All Printing Help Buffer"))
 
 
-(defun pr-kill-help (&rest ignore)
+(defun pr-kill-help (&rest _ignore)
   "Kill all printing help buffer."
   (interactive)
   (let ((help '("*Printing Interface Help*" "*Printing Help*"
@@ -6388,20 +6388,20 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   (recenter (- (window-height) 2)))
 
 
-(defun pr-interface-quit (&rest ignore)
+(defun pr-interface-quit (&rest _ignore)
   "Kill the printing buffer interface and quit."
   (interactive)
   (kill-buffer pr-buffer-name)
   (set-window-configuration pr-i-window-configuration))
 
 
-(defun pr-interface-help (&rest ignore)
+(defun pr-interface-help (&rest _ignore)
   "printing buffer interface help."
   (interactive)
   (pr-show-setup pr-interface-help-message "*Printing Interface Help*"))
 
 
-(defun pr-interface-txt-print (&rest ignore)
+(defun pr-interface-txt-print (&rest _ignore)
   "Print using lpr package."
   (interactive)
   (condition-case data
@@ -6433,7 +6433,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
      (message "%s" (error-message-string data)))))
 
 
-(defun pr-interface-printify (&rest ignore)
+(defun pr-interface-printify (&rest _ignore)
   "Printify a buffer."
   (interactive)
   (condition-case data
@@ -6458,7 +6458,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
      (message "%s" (error-message-string data)))))
 
 
-(defun pr-interface-ps-print (&rest ignore)
+(defun pr-interface-ps-print (&rest _ignore)
   "Print using ps-print package."
   (interactive)
   (pr-interface-ps 'pr-despool-ps-print 'pr-ps-directory-ps-print
@@ -6467,7 +6467,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
                   'pr-ps-buffer-ps-print))
 
 
-(defun pr-interface-preview (&rest ignore)
+(defun pr-interface-preview (&rest _ignore)
   "Preview a PostScript file."
   (interactive)
   (pr-interface-ps 'pr-despool-preview 'pr-ps-directory-preview
@@ -6548,7 +6548,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
       (error "Please specify be a readable directory")))
 
 
-(defun pr-interface-directory (widget &rest ignore)
+(defun pr-interface-directory (widget &rest _ignore)
   (and pr-buffer-verbose
        (message "You can use M-TAB or ESC TAB for file completion"))
   (let ((dir (widget-value widget)))
@@ -6557,7 +6557,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
         (setq pr-i-directory dir))))
 
 
-(defun pr-interface-infile (widget &rest ignore)
+(defun pr-interface-infile (widget &rest _ignore)
   (and pr-buffer-verbose
        (message "You can use M-TAB or ESC TAB for file completion"))
   (let ((file (widget-value widget)))
@@ -6566,7 +6566,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
         (setq pr-i-ps-file file))))
 
 
-(defun pr-interface-outfile (widget &rest ignore)
+(defun pr-interface-outfile (widget &rest _ignore)
   (setq pr-i-answer-yes nil)
   (and pr-buffer-verbose
        (message "You can use M-TAB or ESC TAB for file completion"))
@@ -6602,7 +6602,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
 
 (defun pr-insert-toggle (var-sym label)
   (widget-create 'checkbox
-                :notify `(lambda (&rest ignore)
+                :notify `(lambda (&rest _ignore)
                            (setq ,var-sym (not ,var-sym)))
                 (symbol-value var-sym))
   (widget-insert label))
@@ -6623,7 +6623,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
                        :format "%v"
                        :inline t
                        :value ,var-sym
-                       :notify (lambda (widget &rest ignore)
+                       :notify (lambda (widget &rest _ignore)
                                  (setq ,var-sym (widget-value widget))
                                  ,@body)
                        :void '(choice-item :format "%[%t%]"
@@ -6639,7 +6639,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
                     'radio-button
                     :format "  %[%v%]"
                     :value (eq ,var-sym (quote ,sym))
-                    :notify (lambda (&rest ignore)
+                    :notify (lambda (&rest _ignore)
                               (setq ,var-sym (quote ,sym))
                               (pr-update-radio-button (quote ,var-sym)))))))
     (put var-sym 'pr-widget-list (cons (cons wid sym) wid-list))))
index d29fa8c1d3666b4d8c61e408719cad776114831d..1ca83a97a593161cc7de0f1e01c51caeac7db73d 100644 (file)
@@ -342,9 +342,9 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command."
                )
            (kill-buffer nil))))
 
-    (set 'ada-xref-runtime-library-specs-path
+    (setada-xref-runtime-library-specs-path
         (reverse ada-xref-runtime-library-specs-path))
-    (set 'ada-xref-runtime-library-ali-path
+    (setada-xref-runtime-library-ali-path
         (reverse ada-xref-runtime-library-ali-path))
     ))
 
@@ -582,8 +582,8 @@ as defined in the project file."
 
     (while dirs
       (if (file-directory-p (car dirs))
-         (set 'list (append list (file-name-all-completions string (car dirs)))))
-      (set 'dirs (cdr dirs)))
+         (setlist (append list (file-name-all-completions string (car dirs)))))
+      (setdirs (cdr dirs)))
     (cond ((equal flag 'lambda)
           (assoc string list))
          (flag
@@ -702,11 +702,11 @@ is non-nil, prompt the user to select one.  If none are found, return
 
         ((file-exists-p first-choice)
          ;; filename.adp
-         (set 'selected first-choice))
+         (setselected first-choice))
 
         ((= (length prj-files) 1)
          ;; Exactly one project file was found in the current directory
-         (set 'selected (car prj-files)))
+         (setselected (car prj-files)))
 
         ((and (> (length prj-files) 1) (not no-user-question))
          ;;  multiple project files in current directory, ask the user
@@ -732,7 +732,7 @@ is non-nil, prompt the user to select one.  If none are found, return
                    (> choice (length prj-files)))
              (setq choice (string-to-number
                            (read-from-minibuffer "Enter No. of your choice: "))))
-           (set 'selected (nth (1- choice) prj-files))))
+           (setselected (nth (1- choice) prj-files))))
 
         ((= (length prj-files) 0)
          ;; No project file in the current directory; ask user
@@ -742,7 +742,7 @@ is non-nil, prompt the user to select one.  If none are found, return
                   (concat "project file [" ada-last-prj-file "]:")
                   nil ada-last-prj-file))
            (unless (string= ada-last-prj-file "")
-             (set 'selected ada-last-prj-file))))
+             (setselected ada-last-prj-file))))
         )))
 
     (or selected "default.adp")
@@ -792,9 +792,9 @@ is non-nil, prompt the user to select one.  If none are found, return
 
     (setq prj-file (expand-file-name prj-file))
     (if (string= (file-name-extension prj-file) "gpr")
-       (set 'project (ada-gnat-parse-gpr project prj-file))
+       (setproject (ada-gnat-parse-gpr project prj-file))
 
-      (set 'project (ada-parse-prj-file-1 prj-file project))
+      (setproject (ada-parse-prj-file-1 prj-file project))
       )
 
     ;; Store the project properties
@@ -842,7 +842,7 @@ Return new value of PROJECT."
                          (substitute-in-file-name (match-string 2)))))
 
           ((string= (match-string 1) "build_dir")
-           (set 'project
+           (setproject
                 (plist-put project 'build_dir
                            (file-name-as-directory (match-string 2)))))
 
@@ -884,7 +884,7 @@ Return new value of PROJECT."
 
           (t
            ;; any other field in the file is just copied
-           (set 'project (plist-put project
+           (setproject (plist-put project
                                     (intern (match-string 1))
                                     (match-string 2))))))
 
@@ -900,21 +900,21 @@ Return new value of PROJECT."
        (let ((sep (plist-get project 'ada_project_path_sep)))
          (setq ada_project_path (reverse ada_project_path))
          (setq ada_project_path (mapconcat 'identity ada_project_path sep))
-         (set 'project (plist-put project 'ada_project_path ada_project_path))
+         (setproject (plist-put project 'ada_project_path ada_project_path))
          ;; env var needed now for ada-gnat-parse-gpr
          (setenv "ADA_PROJECT_PATH" ada_project_path)))
 
-    (if debug_post_cmd (set 'project (plist-put project 'debug_post_cmd (reverse debug_post_cmd))))
-    (if debug_pre_cmd (set 'project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd))))
-    (if casing (set 'project (plist-put project 'casing (reverse casing))))
-    (if check_cmd (set 'project (plist-put project 'check_cmd (reverse check_cmd))))
-    (if comp_cmd (set 'project (plist-put project 'comp_cmd (reverse comp_cmd))))
-    (if make_cmd (set 'project (plist-put project 'make_cmd (reverse make_cmd))))
-    (if run_cmd (set 'project (plist-put project 'run_cmd (reverse run_cmd))))
+    (if debug_post_cmd (setproject (plist-put project 'debug_post_cmd (reverse debug_post_cmd))))
+    (if debug_pre_cmd (setproject (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd))))
+    (if casing (setproject (plist-put project 'casing (reverse casing))))
+    (if check_cmd (setproject (plist-put project 'check_cmd (reverse check_cmd))))
+    (if comp_cmd (setproject (plist-put project 'comp_cmd (reverse comp_cmd))))
+    (if make_cmd (setproject (plist-put project 'make_cmd (reverse make_cmd))))
+    (if run_cmd (setproject (plist-put project 'run_cmd (reverse run_cmd))))
 
     (if gpr_file
        (progn
-         (set 'project (ada-gnat-parse-gpr project gpr_file))
+         (setproject (ada-gnat-parse-gpr project gpr_file))
          ;; append Ada source and object directories to others from Emacs project file
          (setq src_dir (append (plist-get project 'src_dir) src_dir))
          (setq obj_dir (append (plist-get project 'obj_dir) obj_dir))
@@ -930,8 +930,8 @@ Return new value of PROJECT."
     (ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) ""))
     ;;)
 
-    (if obj_dir (set 'project (plist-put project 'obj_dir (reverse obj_dir))))
-    (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir))))
+    (if obj_dir (setproject (plist-put project 'obj_dir (reverse obj_dir))))
+    (if src_dir (setproject (plist-put project 'src_dir (reverse src_dir))))
 
     project
     ))
@@ -1052,9 +1052,9 @@ existing buffer `*gnatfind*', if there is one."
       (if old-contents
          (progn
            (goto-char 1)
-           (set 'buffer-read-only nil)
+           (setbuffer-read-only nil)
            (insert old-contents)
-           (set 'buffer-read-only t)
+           (setbuffer-read-only t)
            (goto-char (point-max)))))
     )
   )
@@ -1194,9 +1194,9 @@ project file."
        (objects   (getenv "ADA_OBJECTS_PATH"))
        (build-dir (ada-xref-get-project-field 'build_dir)))
     (if include
-       (set 'include (concat path-separator include)))
+       (setinclude (concat path-separator include)))
     (if objects
-       (set 'objects (concat path-separator objects)))
+       (setobjects (concat path-separator objects)))
     (cons
      (concat "ADA_INCLUDE_PATH="
             (mapconcat (lambda(x) (expand-file-name x build-dir))
@@ -1303,7 +1303,7 @@ If ARG is non-nil, ask for user confirmation."
 
     ;;  Guess the command if it wasn't specified
     (if (not command)
-       (set 'command (list (file-name-sans-extension (buffer-name)))))
+       (setcommand (list (file-name-sans-extension (buffer-name)))))
 
     ;; Modify the command to run remotely
     (setq command (ada-remote (mapconcat 'identity command
@@ -1316,7 +1316,7 @@ If ARG is non-nil, ask for user confirmation."
 
     ;; Run the command
     (with-current-buffer (get-buffer-create "*run*")
-      (set 'buffer-read-only nil)
+      (setbuffer-read-only nil)
 
       (erase-buffer)
       (start-process "run" (current-buffer) shell-file-name
@@ -1352,7 +1352,7 @@ project file."
 
     ;;  If the command was not given in the project file, start a bare gdb
     (if (not cmd)
-       (set 'cmd (concat ada-prj-default-debugger
+       (setcmd (concat ada-prj-default-debugger
                          " "
                          (or executable-name
                              (file-name-sans-extension (buffer-file-name))))))
@@ -1368,18 +1368,18 @@ project file."
        ;;  chance to fully manage it.  Then it works fine with Enlightenment
        ;;  as well
        (let ((frame (make-frame '((visibility . nil)))))
-         (set 'cmd (concat
+         (setcmd (concat
                     cmd " --editor-window="
                     (cdr (assoc 'outer-window-id (frame-parameters frame)))))
          (select-frame frame)))
 
     ;;  Add a -fullname switch
     ;;  Use the remote machine
-    (set 'cmd (ada-remote (concat cmd " -fullname ")))
+    (setcmd (ada-remote (concat cmd " -fullname ")))
 
     ;;  Ask for confirmation if required
     (if (or arg ada-xref-confirm-compile)
-       (set 'cmd (read-from-minibuffer "enter command to debug: " cmd)))
+       (setcmd (read-from-minibuffer "enter command to debug: " cmd)))
 
     (let ((old-comint-exec (symbol-function 'comint-exec)))
 
@@ -1387,13 +1387,13 @@ project file."
       ;;  FIXME: This is evil but luckily a nop under Emacs-21.3.50 !  -stef
       (fset 'gud-gdb-massage-args (lambda (_file args) args))
 
-      (set 'pre-cmd  (mapconcat 'identity pre-cmd  ada-command-separator))
+      (setpre-cmd  (mapconcat 'identity pre-cmd  ada-command-separator))
       (if (not (equal pre-cmd ""))
          (setq pre-cmd (concat pre-cmd ada-command-separator)))
 
-      (set 'post-cmd (mapconcat 'identity post-cmd "\n"))
+      (setpost-cmd (mapconcat 'identity post-cmd "\n"))
       (if post-cmd
-         (set 'post-cmd (concat post-cmd "\n")))
+         (setpost-cmd (concat post-cmd "\n")))
 
 
       ;;  Temporarily replaces the definition of `comint-exec' so that we
@@ -1403,7 +1403,7 @@ project file."
            `(lambda (buffer name command startfile switches)
               (let (compilation-buffer-name-function)
                 (save-excursion
-                  (set 'compilation-buffer-name-function
+                  (setcompilation-buffer-name-function
                        (lambda(x) (buffer-name buffer)))
                   (compile (ada-quote-cmd
                             (concat ,pre-cmd
@@ -1498,12 +1498,12 @@ by replacing the file extension with `.ali'."
   "Search for FILE in DIR-LIST."
   (let (found)
     (while (and (not found) dir-list)
-      (set 'found (concat (file-name-as-directory (car dir-list))
+      (setfound (concat (file-name-as-directory (car dir-list))
                          (file-name-nondirectory file)))
 
       (unless (file-exists-p found)
-         (set 'found nil))
-      (set 'dir-list (cdr dir-list)))
+         (setfound nil))
+      (setdir-list (cdr dir-list)))
     found))
 
 (defun ada-find-ali-file-in-dir (file)
@@ -1558,11 +1558,11 @@ the project file."
            (while specs
              (if (string-match (concat (regexp-quote (car specs)) "$")
                                file)
-                 (set 'is-spec t))
-             (set 'specs (cdr specs)))))
+                 (setis-spec t))
+             (setspecs (cdr specs)))))
 
       (if is-spec
-         (set 'ali-file-name
+         (setali-file-name
               (ada-find-ali-file-in-dir
                (concat (file-name-base (ada-other-file-name)) ".ali"))))
 
@@ -1589,8 +1589,8 @@ the project file."
                  (while (and (not ali-file-name)
                              (string-match "^\\(.*\\)[.-][^.-]*" parent-name))
 
-                   (set 'parent-name (match-string 1 parent-name))
-                   (set 'ali-file-name (ada-find-ali-file-in-dir
+                   (setparent-name (match-string 1 parent-name))
+                   (setali-file-name (ada-find-ali-file-in-dir
                                         (concat parent-name ".ali")))
                    )
                  ali-file-name)))
@@ -1686,18 +1686,18 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..."
          (if (and (= (char-before) ?\")
                   (= (char-after (+ (length (match-string 0)) (point))) ?\"))
              (forward-char -1))
-         (set 'identifier (regexp-quote (concat "\"" (match-string 0) "\""))))
+         (setidentifier (regexp-quote (concat "\"" (match-string 0) "\""))))
 
       (if (ada-in-string-p)
          (error "Inside string or character constant"))
       (if (looking-at (concat ada-keywords "[^a-zA-Z_]"))
          (error "No cross-reference available for reserved keyword"))
       (if (looking-at "[a-zA-Z0-9_]+")
-         (set 'identifier (match-string 0))
+         (setidentifier (match-string 0))
        (error "No identifier around")))
 
     ;; Build the identlist
-    (set 'identlist    (ada-make-identlist))
+    (setidentlist    (ada-make-identlist))
     (ada-set-name      identlist (downcase identifier))
     (ada-set-line      identlist
                       (number-to-string (count-lines 1 (point))))
@@ -1725,7 +1725,7 @@ Information is extracted from the ali file."
         (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist)))
         nil t)
        (let ((bound (save-excursion (re-search-forward "^X " nil t))))
-         (set 'declaration-found
+         (setdeclaration-found
               (re-search-forward
                (concat "^"    (ada-line-of identlist)
                        "."    (ada-column-of identlist)
@@ -1743,7 +1743,7 @@ Information is extracted from the ali file."
       ;; Since we already know the number of the file, search for a direct
       ;; reference to it
       (goto-char (point-min))
-      (set 'declaration-found t)
+      (setdeclaration-found t)
       (ada-set-ali-index
        identlist
        (number-to-string (ada-find-file-number-in-ali
@@ -1771,7 +1771,7 @@ Information is extracted from the ali file."
            ;; If still not found, then either the declaration is unknown
            ;; or the source file has been modified since the ali file was
            ;; created
-           (set 'declaration-found nil)
+           (setdeclaration-found nil)
            )
          )
 
@@ -1786,7 +1786,7 @@ Information is extracted from the ali file."
              (beginning-of-line))
            (unless (looking-at (concat "[0-9]+.[0-9]+[ *]"
                                        (ada-name-of identlist) "[ <{=\(\[]"))
-             (set 'declaration-found nil))))
+             (setdeclaration-found nil))))
 
       ;; Still no success ! The ali file must be too old, and we need to
       ;; use a basic algorithm based on guesses.  Note that this only happens
@@ -1794,7 +1794,7 @@ Information is extracted from the ali file."
       ;; automatically
       (unless declaration-found
        (if (ada-xref-find-in-modified-ali identlist)
-           (set 'declaration-found t)
+           (setdeclaration-found t)
          ;; No more idea to find the declaration.  Give up
          (progn
            (kill-buffer ali-buffer)
@@ -1814,7 +1814,7 @@ Information is extracted from the ali file."
            (forward-line 1)
            (beginning-of-line)
            (while (looking-at "^\\.\\(.*\\)")
-             (set 'current-line (concat current-line (match-string 1)))
+             (setcurrent-line (concat current-line (match-string 1)))
              (forward-line 1))
            )
 
@@ -1860,7 +1860,7 @@ This function is disabled for operators, and only works for identifiers."
          (goto-char (point-max))
          (while (re-search-backward my-regexp nil t)
            (save-excursion
-             (set 'line-ali (count-lines 1 (point)))
+             (setline-ali (count-lines 1 (point)))
              (beginning-of-line)
              ;; have a look at the line and column numbers
              (if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]")
@@ -1948,7 +1948,7 @@ opens a new window to show the declaration."
 
     ;; Get all the possible locations
     (string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line)
-    (set 'locations (list (list (match-string 1 ali-line) ;; line
+    (setlocations (list (list (match-string 1 ali-line) ;; line
                                (match-string 2 ali-line) ;; column
                                (ada-declare-file-of identlist))))
     (while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)"
@@ -1968,16 +1968,16 @@ opens a new window to show the declaration."
            (goto-char (point-min))
            (re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t
                               (string-to-number file-number))
-           (set 'file (match-string 1))
+           (setfile (match-string 1))
            )
        ;; Else get the nearest file
-       (set 'file (ada-declare-file-of identlist)))
+       (setfile (ada-declare-file-of identlist)))
 
-      (set 'locations (append locations (list (list line col file)))))
+      (setlocations (append locations (list (list line col file)))))
 
     ;; Add the specs at the end again, so that from the last body we go to
     ;; the specs
-    (set 'locations (append locations (list (car locations))))
+    (setlocations (append locations (list (car locations))))
 
     ;; Find the new location we want to go to.
     ;; If we are on none of the locations listed, we simply go to the specs.
@@ -1996,10 +1996,10 @@ opens a new window to show the declaration."
                col       (nth 1 locations)
                file      (nth 2 locations)
                locations nil)
-       (set 'locations (cdr locations))))
+       (setlocations (cdr locations))))
 
     ;;  Find the file in the source path
-    (set 'file (ada-get-ada-file-name file (ada-file-of identlist)))
+    (setfile (ada-get-ada-file-name file (ada-file-of identlist)))
 
     ;; Kill the .ali buffer
     (kill-buffer (current-buffer))
@@ -2044,10 +2044,10 @@ the declaration and documentation of the subprograms one is using."
                  " "
                  (shell-quote-argument (file-name-as-directory (car dirs)))
                  "*.ali")))
-       (set 'dirs (cdr dirs)))
+       (setdirs (cdr dirs)))
 
       ;;  Now parse the output
-      (set 'case-fold-search t)
+      (setcase-fold-search t)
       (goto-char (point-min))
       (while (re-search-forward regexp nil t)
        (save-excursion
@@ -2058,12 +2058,12 @@ the declaration and documentation of the subprograms one is using."
                (setq line   (match-string 1)
                      column (match-string 2))
                (re-search-backward "^X [0-9]+ \\(.*\\)$")
-               (set 'file (list (match-string 1) line column))
+               (setfile (list (match-string 1) line column))
 
                ;;  There could be duplicate choices, because of the structure
                ;;  of the .ali files
                (unless (member file list)
-                 (set 'list (append list (list file))))))))
+                 (setlist (append list (list file))))))))
 
       ;;  Current buffer is still "*grep*"
       (kill-buffer "*grep*")
@@ -2078,7 +2078,7 @@ the declaration and documentation of the subprograms one is using."
 
      ;;  Only one choice => Do the cross-reference
      ((= (length list) 1)
-      (set 'file (ada-find-src-file-in-dir (caar list)))
+      (setfile (ada-find-src-file-in-dir (caar list)))
       (if file
          (ada-xref-change-buffer file
                                  (string-to-number (nth 1 (car list)))
@@ -2117,10 +2117,10 @@ the declaration and documentation of the subprograms one is using."
                (string-to-number
                 (read-from-minibuffer "Enter No. of your choice: "))))
        )
-      (set 'choice (1- choice))
+      (setchoice (1- choice))
       (kill-buffer "*choice list*")
 
-      (set 'file (ada-find-src-file-in-dir (car (nth choice list))))
+      (setfile (ada-find-src-file-in-dir (car (nth choice list))))
       (if file
          (ada-xref-change-buffer file
                                  (string-to-number (nth 1 (nth choice list)))
@@ -2144,7 +2144,7 @@ If OTHER-FRAME is non-nil, creates a new frame to show the file."
     (if ada-xref-other-buffer
        (if other-frame
            (find-file-other-frame file)
-         (set 'declaration-buffer (find-file-noselect file))
+         (setdeclaration-buffer (find-file-noselect file))
          (set-buffer declaration-buffer)
          (switch-to-buffer-other-window declaration-buffer)
          )
index 56680f23a8e5f427d801d53fa022bd22e76eda94..bf90db5400279e4579c714d9861131581d67ad31 100644 (file)
                (set-buffer-modified-p nil)))))))
 (put 'save-buffer-state-x 'lisp-indent-function 0)
 
-;; get rid of byte-compile warnings
-(eval-when-compile
-  (require 'cc-mode))
-
 (defvar outline-level)
 (defvar imenu-use-markers)
 (defvar imenu-create-index-function)
index 2b6f9d3434dcf885c008c3fbcf98eb375188dbd3..60b332170b06054a511cfd3dbbc39a027b1bdec8 100644 (file)
 (defvar bat-mode-syntax-table
   (let ((table (make-syntax-table)))
     (modify-syntax-entry ?\n ">" table)
+    (modify-syntax-entry ?\" "\"" table)
     ;; Beware: `w' should not be used for non-alphabetic chars.
     (modify-syntax-entry ?~ "_" table)
     (modify-syntax-entry ?% "." table)
index b5216b43ed9e4a4ed5e022c1291b8ca855696e4e..3ef9730ecdb47786f99832aa603197fd0595fbbe 100644 (file)
@@ -61,6 +61,7 @@
 (cc-bytecomp-defun c-backward-token-1)
 (cc-bytecomp-defun c-beginning-of-statement-1)
 (cc-bytecomp-defun c-backward-sws)
+(cc-bytecomp-defun c-forward-sws)
 
 (defvar awk-mode-syntax-table
   (let ((st (make-syntax-table)))
index 337a529241718fa44e45812a8345167f6398d062..c9835bbefe27c5cce247eb2e4b4352d22a13aa0e 100644 (file)
@@ -244,7 +244,9 @@ Having cyclic cc-require's will result in infinite recursion.  That's
 somewhat intentional."
   `(progn
      (eval-when-compile
-       (setq cc-bytecomp-noruntime-functions byte-compile-noruntime-functions)
+       (if (boundp 'byte-compile-noruntime-functions) ; in case load uncompiled
+          (setq cc-bytecomp-noruntime-functions
+                byte-compile-noruntime-functions))
        (cc-bytecomp-load (symbol-name ,cc-part)))
      ;; Hack to suppress spurious "might not be defined at runtime" warnings.
      ;; The basic issue is that
index b9345b2ae6ae592cbc796b24dfb8f1a37a11260b..c8a9c461a9db81a1ce853cff4aac67ed41f042a9 100644 (file)
@@ -6479,6 +6479,15 @@ comment at the start of cc-engine.el for more info."
           (c-go-list-forward)
          t)))
 
+(defmacro c-pull-open-brace (ps)
+  ;; Pull the next open brace from PS (which has the form of paren-state),
+  ;; skipping over any brace pairs.  Returns NIL when PS is exhausted.
+  `(progn
+     (while (consp (car ,ps))
+       (setq ,ps (cdr ,ps)))
+     (prog1 (car ,ps)
+       (setq ,ps (cdr ,ps)))))
+
 (defun c-back-over-member-initializers ()
   ;; Test whether we are in a C++ member initializer list, and if so, go back
   ;; to the introducing ":", returning the position of the opening paren of
@@ -6896,32 +6905,38 @@ comment at the start of cc-engine.el for more info."
 
       ;; Skip over type decl prefix operators.  (Note similar code in
       ;; `c-font-lock-declarators'.)
-      (while (and (looking-at c-type-decl-prefix-key)
-                 (if (and (c-major-mode-is 'c++-mode)
-                          (match-beginning 3))
-                     ;; If the third submatch matches in C++ then
-                     ;; we're looking at an identifier that's a
-                     ;; prefix only if it specifies a member pointer.
-                     (when (setq got-identifier (c-forward-name))
-                       (if (looking-at "\\(::\\)")
-                           ;; We only check for a trailing "::" and
-                           ;; let the "*" that should follow be
-                           ;; matched in the next round.
-                           (progn (setq got-identifier nil) t)
-                         ;; It turned out to be the real identifier,
-                         ;; so stop.
-                         nil))
-                   t))
-
-       (if (eq (char-after) ?\()
+      (if (and c-recognize-typeless-decls
+              (equal c-type-decl-prefix-key "\\<\\>"))
+         (when (eq (char-after) ?\()
            (progn
              (setq paren-depth (1+ paren-depth))
-             (forward-char))
-         (unless got-prefix-before-parens
-           (setq got-prefix-before-parens (= paren-depth 0)))
-         (setq got-prefix t)
-         (goto-char (match-end 1)))
-       (c-forward-syntactic-ws))
+             (forward-char)))
+       (while (and (looking-at c-type-decl-prefix-key)
+                   (if (and (c-major-mode-is 'c++-mode)
+                            (match-beginning 3))
+                       ;; If the third submatch matches in C++ then
+                       ;; we're looking at an identifier that's a
+                       ;; prefix only if it specifies a member pointer.
+                       (when (setq got-identifier (c-forward-name))
+                         (if (looking-at "\\(::\\)")
+                             ;; We only check for a trailing "::" and
+                             ;; let the "*" that should follow be
+                             ;; matched in the next round.
+                             (progn (setq got-identifier nil) t)
+                           ;; It turned out to be the real identifier,
+                           ;; so stop.
+                           nil))
+                     t))
+
+         (if (eq (char-after) ?\()
+             (progn
+               (setq paren-depth (1+ paren-depth))
+               (forward-char))
+           (unless got-prefix-before-parens
+             (setq got-prefix-before-parens (= paren-depth 0)))
+           (setq got-prefix t)
+           (goto-char (match-end 1)))
+         (c-forward-syntactic-ws)))
 
       (setq got-parens (> paren-depth 0))
 
@@ -8403,15 +8418,6 @@ comment at the start of cc-engine.el for more info."
          (back-to-indentation)
          (vector (point) open-paren-pos))))))
 
-(defmacro c-pull-open-brace (ps)
-  ;; Pull the next open brace from PS (which has the form of paren-state),
-  ;; skipping over any brace pairs.  Returns NIL when PS is exhausted.
-  `(progn
-     (while (consp (car ,ps))
-       (setq ,ps (cdr ,ps)))
-     (prog1 (car ,ps)
-       (setq ,ps (cdr ,ps)))))
-
 (defun c-most-enclosing-decl-block (paren-state)
   ;; Return the buffer position of the most enclosing decl-block brace (in the
   ;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if
index 0116e9ec3ddcd224a51d171a1e798853cf3cf3df..80e6189822b135a35b8dbd87609a5dab046ca54b 100644 (file)
@@ -2816,7 +2816,8 @@ is in effect when this is matched (see `c-identifier-syntax-table')."
                     "\\>")
                  "")
                "\\)")
-  (java idl) "\\([\[\(]\\)")
+  java "\\([\[\(\)]\\)"
+  idl "\\([\[\(]\\)")
 (c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key)
   'dont-doc)
 
@@ -2937,7 +2938,7 @@ calls before a brace block.  This setting does not affect declarations
 that are preceded by a declaration starting keyword, so
 e.g. `c-typeless-decl-kwds' may still be used when it's set to nil."
   t nil
-  (c c++ objc) t)
+  (c c++ objc java) t)
 (c-lang-defvar c-recognize-typeless-decls
   (c-lang-const c-recognize-typeless-decls))
 
index 74818b7e1ea757b9f6ff827c344aff817ee1982a..4c776290722301f0ed82bcd9bf554983153e0fe1 100644 (file)
@@ -217,12 +217,16 @@ control).  See \"cc-mode.el\" for more info."
      (t (error "CC Mode is incompatible with this version of Emacs")))
     map))
 
-(defun c-define-abbrev-table (name defs)
+(defun c-define-abbrev-table (name defs &optional doc)
   ;; Compatibility wrapper for `define-abbrev' which passes a non-nil
   ;; sixth argument for SYSTEM-FLAG in emacsen that support it
   ;; (currently only Emacs >= 21.2).
-  (let ((table (or (symbol-value name)
-                  (progn (define-abbrev-table name nil)
+  (let ((table (or (and (boundp name) (symbol-value name))
+                  (progn (condition-case nil
+                              (define-abbrev-table name nil doc)
+                            (wrong-number-of-arguments ;E.g. Emacs<23.
+                             (eval `(defvar ,name nil ,doc))
+                             (define-abbrev-table name nil)))
                          (symbol-value name)))))
     (while defs
       (condition-case nil
@@ -1241,27 +1245,22 @@ This function is called from `c-common-init', once per mode initialization."
 \f
 ;; Support for C
 
-;;;###autoload
-(defvar c-mode-syntax-table nil
+(defvar c-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table c))
   "Syntax table used in c-mode buffers.")
-(or c-mode-syntax-table
-    (setq c-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table c))))
 
-(defvar c-mode-abbrev-table nil
-  "Abbreviation table used in c-mode buffers.")
 (c-define-abbrev-table 'c-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
-    ("while" "while" c-electric-continued-statement 0)))
+    ("while" "while" c-electric-continued-statement 0))
+  "Abbreviation table used in c-mode buffers.")
 
-(defvar c-mode-map ()
+(defvar c-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for C.
+    (define-key map "\C-c\C-e"  'c-macro-expand)
+    map)
   "Keymap used in c-mode buffers.")
-(if c-mode-map
-    nil
-  (setq c-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for C
-  (define-key c-mode-map "\C-c\C-e"  'c-macro-expand)
-  )
+
 
 (easy-menu-define c-c-menu c-mode-map "C Mode Commands"
                  (cons "C" (c-lang-const c-mode-menu c)))
@@ -1326,30 +1325,25 @@ Key bindings:
 \f
 ;; Support for C++
 
-;;;###autoload
-(defvar c++-mode-syntax-table nil
+(defvar c++-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table c++))
   "Syntax table used in c++-mode buffers.")
-(or c++-mode-syntax-table
-    (setq c++-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table c++))))
 
-(defvar c++-mode-abbrev-table nil
-  "Abbreviation table used in c++-mode buffers.")
 (c-define-abbrev-table 'c++-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
     ("while" "while" c-electric-continued-statement 0)
-    ("catch" "catch" c-electric-continued-statement 0)))
+    ("catch" "catch" c-electric-continued-statement 0))
+  "Abbreviation table used in c++-mode buffers.")
 
-(defvar c++-mode-map ()
+(defvar c++-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for C++.
+    (define-key map "\C-c\C-e" 'c-macro-expand)
+    (define-key map "\C-c:"    'c-scope-operator)
+    (define-key map "<"        'c-electric-lt-gt)
+    (define-key map ">"        'c-electric-lt-gt)
+    map)
   "Keymap used in c++-mode buffers.")
-(if c++-mode-map
-    nil
-  (setq c++-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for C++
-  (define-key c++-mode-map "\C-c\C-e" 'c-macro-expand)
-  (define-key c++-mode-map "\C-c:"    'c-scope-operator)
-  (define-key c++-mode-map "<"        'c-electric-lt-gt)
-  (define-key c++-mode-map ">"        'c-electric-lt-gt))
 
 (easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands"
                  (cons "C++" (c-lang-const c-mode-menu c++)))
@@ -1386,26 +1380,21 @@ Key bindings:
 \f
 ;; Support for Objective-C
 
-;;;###autoload
-(defvar objc-mode-syntax-table nil
+(defvar objc-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table objc))
   "Syntax table used in objc-mode buffers.")
-(or objc-mode-syntax-table
-    (setq objc-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table objc))))
 
-(defvar objc-mode-abbrev-table nil
-  "Abbreviation table used in objc-mode buffers.")
 (c-define-abbrev-table 'objc-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
-    ("while" "while" c-electric-continued-statement 0)))
+    ("while" "while" c-electric-continued-statement 0))
+  "Abbreviation table used in objc-mode buffers.")
 
-(defvar objc-mode-map ()
+(defvar objc-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for Objective-C.
+    (define-key map "\C-c\C-e" 'c-macro-expand)
+    map)
   "Keymap used in objc-mode buffers.")
-(if objc-mode-map
-    nil
-  (setq objc-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for Objective-C
-  (define-key objc-mode-map "\C-c\C-e" 'c-macro-expand))
 
 (easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands"
                  (cons "ObjC" (c-lang-const c-mode-menu objc)))
@@ -1444,28 +1433,22 @@ Key bindings:
 \f
 ;; Support for Java
 
-;;;###autoload
-(defvar java-mode-syntax-table nil
+(defvar java-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table java))
   "Syntax table used in java-mode buffers.")
-(or java-mode-syntax-table
-    (setq java-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table java))))
 
-(defvar java-mode-abbrev-table nil
-  "Abbreviation table used in java-mode buffers.")
 (c-define-abbrev-table 'java-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
     ("while" "while" c-electric-continued-statement 0)
     ("catch" "catch" c-electric-continued-statement 0)
-    ("finally" "finally" c-electric-continued-statement 0)))
+    ("finally" "finally" c-electric-continued-statement 0))
+  "Abbreviation table used in java-mode buffers.")
 
-(defvar java-mode-map ()
+(defvar java-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for Java.
+    map)
   "Keymap used in java-mode buffers.")
-(if java-mode-map
-    nil
-  (setq java-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for Java
-  )
 
 ;; Regexp trying to describe the beginning of a Java top-level
 ;; definition.  This is not used by CC Mode, nor is it maintained
@@ -1510,24 +1493,18 @@ Key bindings:
 \f
 ;; Support for CORBA's IDL language
 
-;;;###autoload
-(defvar idl-mode-syntax-table nil
+(defvar idl-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table idl))
   "Syntax table used in idl-mode buffers.")
-(or idl-mode-syntax-table
-    (setq idl-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table idl))))
 
-(defvar idl-mode-abbrev-table nil
+(c-define-abbrev-table 'idl-mode-abbrev-table nil
   "Abbreviation table used in idl-mode buffers.")
-(c-define-abbrev-table 'idl-mode-abbrev-table nil)
 
-(defvar idl-mode-map ()
+(defvar idl-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for IDL.
+    map)
   "Keymap used in idl-mode buffers.")
-(if idl-mode-map
-    nil
-  (setq idl-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for IDL
-  )
 
 (easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands"
                  (cons "IDL" (c-lang-const c-mode-menu idl)))
@@ -1564,32 +1541,27 @@ Key bindings:
 \f
 ;; Support for Pike
 
-;;;###autoload
-(defvar pike-mode-syntax-table nil
+(defvar pike-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table pike))
   "Syntax table used in pike-mode buffers.")
-(or pike-mode-syntax-table
-    (setq pike-mode-syntax-table
-         (funcall (c-lang-const c-make-mode-syntax-table pike))))
 
-(defvar pike-mode-abbrev-table nil
-  "Abbreviation table used in pike-mode buffers.")
 (c-define-abbrev-table 'pike-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
-    ("while" "while" c-electric-continued-statement 0)))
+    ("while" "while" c-electric-continued-statement 0))
+  "Abbreviation table used in pike-mode buffers.")
 
-(defvar pike-mode-map ()
+(defvar pike-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Additional bindings.
+    (define-key map "\C-c\C-e" 'c-macro-expand)
+    map)
   "Keymap used in pike-mode buffers.")
-(if pike-mode-map
-    nil
-  (setq pike-mode-map (c-make-inherited-keymap))
-  ;; additional bindings
-  (define-key pike-mode-map "\C-c\C-e" 'c-macro-expand))
 
 (easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
                  (cons "Pike" (c-lang-const c-mode-menu pike)))
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`pike\\'" . pike-mode))
 
 ;;;###autoload
 (define-derived-mode pike-mode prog-mode "Pike"
@@ -1623,37 +1595,28 @@ Key bindings:
 ;; Support for AWK
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode))
-
-;;; Autoload directives must be on the top level, so we construct an
-;;; autoload form instead.
-;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t)
+;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`[gmn]?awk\\'" . awk-mode))
 
-(defvar awk-mode-abbrev-table nil
-  "Abbreviation table used in awk-mode buffers.")
 (c-define-abbrev-table 'awk-mode-abbrev-table
   '(("else" "else" c-electric-continued-statement 0)
-    ("while" "while" c-electric-continued-statement 0)))
+    ("while" "while" c-electric-continued-statement 0))
+  "Abbreviation table used in awk-mode buffers.")
 
-(defvar awk-mode-map ()
+(defvar awk-mode-map
+  (let ((map (c-make-inherited-keymap)))
+    ;; Add bindings which are only useful for awk.
+    (define-key map "#" 'self-insert-command)
+    (define-key map "/" 'self-insert-command)
+    (define-key map "*" 'self-insert-command)
+    (define-key map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
+    (define-key map "\C-c\C-p" 'undefined)
+    (define-key map "\C-c\C-u" 'undefined)
+    (define-key map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
+    (define-key map "\M-e" 'c-end-of-statement)       ; 2003/10/7
+    (define-key map "\C-\M-a" 'c-awk-beginning-of-defun)
+    (define-key map "\C-\M-e" 'c-awk-end-of-defun)
+    map)
   "Keymap used in awk-mode buffers.")
-(if awk-mode-map
-    nil
-  (setq awk-mode-map (c-make-inherited-keymap))
-  ;; add bindings which are only useful for awk.
-  (define-key awk-mode-map "#" 'self-insert-command)
-  (define-key awk-mode-map "/" 'self-insert-command)
-  (define-key awk-mode-map "*" 'self-insert-command)
-  (define-key awk-mode-map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
-  (define-key awk-mode-map "\C-c\C-p" 'undefined)
-  (define-key awk-mode-map "\C-c\C-u" 'undefined)
-  (define-key awk-mode-map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
-  (define-key awk-mode-map "\M-e" 'c-end-of-statement) ; 2003/10/7
-  (define-key awk-mode-map "\C-\M-a" 'c-awk-beginning-of-defun)
-  (define-key awk-mode-map "\C-\M-e" 'c-awk-end-of-defun))
 
 (easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
                  (cons "AWK" (c-lang-const c-mode-menu awk)))
index 770e78bb3b1a1deddf296d189025ea99270e3544..1eea6972707843a6fa3cbce38152a7b30e28150b 100644 (file)
@@ -412,15 +412,15 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
  "use cperl-vc-rcs-header or cperl-vc-sccs-header instead."
  "22.1")
 
-(defcustom cperl-clobber-mode-lists
-  (not
-   (and
-    (boundp 'interpreter-mode-alist)
-    (assoc "miniperl" interpreter-mode-alist)
-    (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
-  "*Whether to install us into `interpreter-' and `extension' mode lists."
-  :type 'boolean
-  :group 'cperl)
+;;; (defcustom cperl-clobber-mode-lists
+;;;   (not
+;;;    (and
+;;;     (boundp 'interpreter-mode-alist)
+;;;     (assoc "miniperl" interpreter-mode-alist)
+;;;     (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
+;;;   "*Whether to install us into `interpreter-' and `extension' mode lists."
+;;;   :type 'boolean
+;;;   :group 'cperl)
 
 (defcustom cperl-info-on-command-no-prompt nil
   "*Not-nil (and non-null) means not to prompt on C-h f.
index 7004836e69f3f07479f0201fdb6ba05bcc59e4e2..5eecc347f034577620daee94f1d0e1ccea3c5bc8 100644 (file)
 ;; Extra functions `python-nav-forward-statement',
 ;; `python-nav-backward-statement',
 ;; `python-nav-beginning-of-statement', `python-nav-end-of-statement',
-;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are
-;; included but no bound to any key.  At last but not least the
-;; specialized `python-nav-forward-sexp' allows easy navigation
-;; between code blocks.  If you prefer `cc-mode'-like `forward-sexp'
-;; movement, setting `forward-sexp-function' to nil is enough, You can
-;; do that using the `python-mode-hook':
+;; `python-nav-beginning-of-block', `python-nav-end-of-block' and
+;; `python-nav-if-name-main' are included but no bound to any key.  At
+;; last but not least the specialized `python-nav-forward-sexp' allows
+;; easy navigation between code blocks.  If you prefer `cc-mode'-like
+;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
+;; enough, You can do that using the `python-mode-hook':
 
 ;; (add-hook 'python-mode-hook
 ;;           (lambda () (setq forward-sexp-function nil)))
 ;;;###autoload
 (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'")  'python-mode))
 ;;;###autoload
-(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
+(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`python[0-9.]*\\'") 'python-mode))
 
 (defgroup python nil
   "Python Language's flying circus support for Emacs."
@@ -1327,9 +1327,7 @@ backward to previous statement."
 (defun python-nav-beginning-of-block ()
   "Move to start of current block."
   (interactive "^")
-  (let ((starting-pos (point))
-        (block-regexp (python-rx
-                       line-start (* whitespace) block-start)))
+  (let ((starting-pos (point)))
     (if (progn
           (python-nav-beginning-of-statement)
           (looking-at (python-rx block-start)))
@@ -1422,9 +1420,6 @@ backwards."
     (let* ((forward-p (if (> dir 0)
                           (and (setq dir 1) t)
                         (and (setq dir -1) nil)))
-           (re-search-fn (if forward-p
-                             're-search-forward
-                           're-search-backward))
            (context-type (python-syntax-context-type)))
       (cond
        ((memq context-type '(string comment))
@@ -1583,6 +1578,29 @@ This command assumes point is not in a string or comment."
   (or arg (setq arg 1))
   (python-nav-up-list (- arg)))
 
+(defun python-nav-if-name-main ()
+  "Move point at the beginning the __main__ block.
+When \"if __name__ == '__main__':\" is found returns its
+position, else returns nil."
+  (interactive)
+  (let ((point (point))
+        (found (catch 'found
+                 (goto-char (point-min))
+                 (while (re-search-forward
+                         (python-rx line-start
+                                    "if" (+ space)
+                                    "__name__" (+ space)
+                                    "==" (+ space)
+                                    (group-n 1 (or ?\" ?\'))
+                                    "__main__" (backref 1) (* space) ":")
+                         nil t)
+                   (when (not (python-syntax-context-type))
+                     (beginning-of-line)
+                     (throw 'found t))))))
+    (if found
+        (point)
+      (ignore (goto-char point)))))
+
 \f
 ;;; Shell integration
 
@@ -2114,17 +2132,58 @@ Returns the output.  See `python-shell-send-string-no-output'."
 (define-obsolete-function-alias
   'python-send-string 'python-shell-internal-send-string "24.3")
 
+(defun python-shell-buffer-substring (start end &optional nomain)
+  "Send buffer substring from START to END formatted for shell.
+This is a wrapper over `buffer-substring' that takes care of
+different transformations for the code sent to be evaluated in
+the python shell:
+  1. When Optional Argument NOMAIN is non-nil everything under an
+     \"if __name__ == '__main__'\" block will be removed.
+  2. When a subregion of the buffer is sent, it takes care of
+     appending extra empty lines so tracebacks are correct.
+  3. Wraps indented regions under an \"if True:\" block so the
+     interpreter evaluates them correctly."
+  (let ((substring (buffer-substring-no-properties start end))
+        (fillstr (make-string (1- (line-number-at-pos start)) ?\n))
+        (toplevel-block-p (save-excursion
+                            (goto-char start)
+                            (or (zerop (line-number-at-pos start))
+                                (progn
+                                  (python-util-forward-comment 1)
+                                  (zerop (current-indentation)))))))
+    (with-temp-buffer
+      (python-mode)
+      (insert fillstr)
+      (insert substring)
+      (goto-char (point-min))
+      (when (not toplevel-block-p)
+        (insert "if True:")
+        (delete-region (point) (line-end-position)))
+      (when nomain
+        (let* ((if-name-main-start-end
+                (and nomain
+                     (save-excursion
+                       (when (python-nav-if-name-main)
+                         (cons (point)
+                               (progn (python-nav-forward-sexp)
+                                      (point)))))))
+               ;; Oh destructuring bind, how I miss you.
+               (if-name-main-start (car if-name-main-start-end))
+               (if-name-main-end (cdr if-name-main-start-end)))
+          (when if-name-main-start-end
+            (goto-char if-name-main-start)
+            (delete-region if-name-main-start if-name-main-end)
+            (insert
+             (make-string
+              (- (line-number-at-pos if-name-main-end)
+                 (line-number-at-pos if-name-main-start)) ?\n)))))
+      (buffer-substring-no-properties (point-min) (point-max)))))
+
 (defun python-shell-send-region (start end)
   "Send the region delimited by START and END to inferior Python process."
   (interactive "r")
   (python-shell-send-string
-   (concat
-    (let ((line-num (line-number-at-pos start)))
-      ;; When sending a region, add blank lines for non sent code so
-      ;; backtraces remain correct.
-      (make-string (1- line-num) ?\n))
-    (buffer-substring start end))
-   nil t))
+   (python-shell-buffer-substring start end) nil t))
 
 (defun python-shell-send-buffer (&optional arg)
   "Send the entire buffer to inferior Python process.
@@ -2133,13 +2192,9 @@ by \"if __name__== '__main__':\""
   (interactive "P")
   (save-restriction
     (widen)
-    (let ((str (buffer-substring (point-min) (point-max))))
-      (and
-       (not arg)
-       (setq str (replace-regexp-in-string
-                  (python-rx if-name-main)
-                  "if __name__ == '__main__ ':" str)))
-      (python-shell-send-string str))))
+    (python-shell-send-string
+     (python-shell-buffer-substring
+      (point-min) (point-max) (not arg)))))
 
 (defun python-shell-send-defun (arg)
   "Send the current defun to inferior Python process.
@@ -2266,13 +2321,17 @@ and use the following as the value of this variable:
 LINE is used to detect the context on how to complete given
 INPUT."
   (let* ((prompt
-          ;; Get the last prompt for the inferior process
-          ;; buffer. This is used for the completion code selection
-          ;; heuristic.
+          ;; Get last prompt of the inferior process buffer (this
+          ;; intentionally avoids using `comint-last-prompt' because
+          ;; of incompatibilities with Emacs 24.x).
           (with-current-buffer (process-buffer process)
-            (buffer-substring-no-properties
-             (overlay-start comint-last-prompt-overlay)
-             (overlay-end comint-last-prompt-overlay))))
+            (save-excursion
+              (buffer-substring-no-properties
+               (- (point) (length line))
+               (progn
+                 (re-search-backward "^")
+                 (python-util-forward-comment)
+                 (point))))))
          (completion-context
           ;; Check whether a prompt matches a pdb string, an import
           ;; statement or just the standard prompt and use the
@@ -2602,8 +2661,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
 (defun python-fill-string (&optional justify)
   "String fill function for `python-fill-paragraph'.
 JUSTIFY should be used (if applicable) as in `fill-paragraph'."
-  (let* ((marker (point-marker))
-         (str-start-pos
+  (let* ((str-start-pos
           (set-marker
            (make-marker)
            (or (python-syntax-context 'string)
@@ -2669,7 +2727,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
              ;; Again indent only if a newline is added.
              (indent-according-to-mode))))) t)
 
-(defun python-fill-decorator (&optional justify)
+(defun python-fill-decorator (&optional _justify)
   "Decorator fill function for `python-fill-paragraph'.
 JUSTIFY should be used (if applicable) as in `fill-paragraph'."
   t)
@@ -2831,8 +2889,7 @@ The skeleton will be bound to python-skeleton-NAME."
 
 (defun python-skeleton-add-menu-items ()
   "Add menu items to Python->Skeletons menu."
-  (let ((skeletons (sort python-skeleton-available 'string<))
-        (items))
+  (let ((skeletons (sort python-skeleton-available 'string<)))
     (dolist (skeleton skeletons)
       (easy-menu-add-item
        nil '("Python" "Skeletons")
@@ -2920,7 +2977,7 @@ Runs COMMAND, a shell command, as if by `compile'.  See
   (let ((process-environment (python-shell-calculate-process-environment))
         (exec-path (python-shell-calculate-exec-path)))
     (compilation-start command nil
-                       (lambda (mode-name)
+                       (lambda (_modename)
                          (format python-check-buffer-name command)))))
 
 \f
@@ -3031,7 +3088,7 @@ It must be a function with two arguments: TYPE and NAME.")
   "Return imenu label for parent node using TYPE and NAME."
   (format "%s..." (python-imenu-format-item-label type name)))
 
-(defun python-imenu-format-parent-item-jump-label (type name)
+(defun python-imenu-format-parent-item-jump-label (type _name)
   "Return imenu label for parent node jump using TYPE and NAME."
   (if (string= type "class")
       "*class definition*"
@@ -3145,7 +3202,7 @@ To this:
                 (cons name (cdar pos))
                 (python-imenu-create-flat-index (cddr item) name))))))
     (or alist
-        (let* ((fn (lambda (type name) name))
+        (let* ((fn (lambda (_type name) name))
                (python-imenu-format-item-label-function fn)
               (python-imenu-format-parent-item-label-function fn)
               (python-imenu-format-parent-item-jump-label-function fn))
@@ -3550,7 +3607,7 @@ if that value is non-nil."
 
   (add-to-list 'hs-special-modes-alist
                `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
-                             ,(lambda (arg)
+                             ,(lambda (_arg)
                                 (python-nav-end-of-defun)) nil))
 
   (set (make-local-variable 'mode-require-final-newline) t)
index c8fae7ba1e6ed9d3a2fb04e64f57e1943243cd9a..9dc2c4fb6c9abdc153a09b99824eba10996f8580 100644 (file)
@@ -137,6 +137,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
 
 (defconst ruby-symbol-chars "a-zA-Z0-9_"
   "List of characters that symbol names may contain.")
+
 (defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]")
   "Regexp to match symbols.")
 
@@ -254,11 +255,13 @@ Also ignores spaces after parenthesis when 'space."
             ("for" for-body "end")
             ("[" expseq "]")
             ("{" hashvals "}")
+            ("{" insts "}")
             ("while" insts "end")
             ("until" insts "end")
             ("unless" insts "end")
             ("if" if-body "end")
             ("case"  cases "end"))
+      (formal-params ("opening-|" exp "|"))
       (for-body (for-head ";" insts))
       (for-head (id "in" exp))
       (cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts).
@@ -285,10 +288,20 @@ Also ignores spaces after parenthesis when 'space."
   (save-excursion
     (skip-chars-backward " \t")
     (not (or (bolp)
-             (memq (char-before) '(?\; ?- ?+ ?* ?/ ?:))
+             (and (memq (char-before) '(?\; ?- ?+ ?* ?/ ?: ?.))
+                  ;; Make sure it's not the end of a regexp.
+                  (not (eq (car (syntax-after (1- (point)))) 7)))
              (and (memq (char-before) '(?\? ?=))
-                  (not (memq (char-syntax (char-before (1- (point))))
-                             '(?w ?_))))))))
+                  (let ((tok (ruby-smie--backward-token)))
+                    (or (equal tok "?")
+                        (string-match "\\`\\s." tok))))))))
+
+(defun ruby-smie--opening-pipe-p ()
+  (save-excursion
+    (if (eq ?| (char-before)) (forward-char -1))
+    (skip-chars-backward " \t\n")
+    (or (eq ?\{ (char-before))
+        (looking-back "\\_<do" (- (point) 2)))))
 
 (defun ruby-smie--forward-token ()
   (skip-chars-forward " \t")
@@ -299,12 +312,16 @@ Also ignores spaces after parenthesis when 'space."
         (if (eolp) (forward-char 1) (forward-comment 1))
         ";")
     (forward-comment (point-max))
+    (if (looking-at ":\\s.+")
+        (progn (goto-char (match-end 0)) (match-string 0)) ;; bug#15208.
     (let ((tok (smie-default-forward-token)))
       (cond
        ((member tok '("unless" "if" "while" "until"))
         (if (save-excursion (forward-word -1) (ruby-smie--bosp))
             tok "iuwu-mod"))
-       (t tok)))))
+         ((equal tok "|")
+          (if (ruby-smie--opening-pipe-p) "opening-|" tok))
+         (t tok))))))
 
 (defun ruby-smie--backward-token ()
   (let ((pos (point)))
@@ -314,10 +331,14 @@ Also ignores spaces after parenthesis when 'space."
         (progn (skip-chars-forward " \t")
                ";")
       (let ((tok (smie-default-backward-token)))
+        (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok))
+          (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208.
         (cond
          ((member tok '("unless" "if" "while" "until"))
           (if (ruby-smie--bosp)
               tok "iuwu-mod"))
+         ((equal tok "|")
+          (if (ruby-smie--opening-pipe-p) "opening-|" tok))
          (t tok))))))
 
 (defun ruby-smie-rules (kind token)
@@ -332,7 +353,19 @@ Also ignores spaces after parenthesis when 'space."
        ;; For (invalid) code between switch and case.
        ;; (if (smie-parent-p "switch") 4)
        0))
-    (`(:before . ,(or `"else" `"then" `"elsif")) 0)
+    (`(:before . "do")
+     (when
+         (save-excursion
+           (forward-word 1)   ;Skip "do"
+           (skip-chars-forward " \t")
+           (and (equal (save-excursion (ruby-smie--forward-token)) "opening-|")
+                (save-excursion (forward-sexp 1)
+                                (skip-chars-forward " \t")
+                                (or (eolp)
+                                    (looking-at comment-start-skip)))))
+       ;; `(column . ,(smie-indent-virtual))
+       (smie-rule-parent)))
+    (`(:before . ,(or `"else" `"then" `"elsif" `"rescue")) 0)
     (`(:before . ,(or `"when"))
      (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level
     ;; Hack attack: Since newlines are separators, don't try to align args that
@@ -903,6 +936,10 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'."
                       (not (looking-at "[a-z_]"))))
                (and (looking-at ruby-operator-re)
                     (not (ruby-special-char-p))
+                    (save-excursion
+                      (forward-char -1)
+                      (or (not (looking-at ruby-operator-re))
+                          (not (eq (char-before) ?:))))
                     ;; Operator at the end of line.
                     (let ((c (char-after (point))))
                       (and
@@ -1825,11 +1862,11 @@ See `font-lock-syntax-table'.")
              "using")
            'symbols))
          1 'font-lock-builtin-face)
-   ;; Perl-ish keywords
-   "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
    ;; here-doc beginnings
    `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0))
                                'font-lock-string-face))
+   ;; Perl-ish keywords
+   "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
    ;; variables
    `(,(concat ruby-font-lock-keyword-beg-re
               "\\_<\\(nil\\|self\\|true\\|false\\)\\>")
@@ -1931,8 +1968,7 @@ The variable `ruby-indent-level' controls the amount of indentation.
                                      "\\)\\'")) 'ruby-mode))
 
 ;;;###autoload
-(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
-  (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
+(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`\\(rbx\\|j?ruby\\(1\\.[89]\\)?\\)\\'") 'ruby-mode))
 
 (provide 'ruby-mode)
 
index c8b65e0a029cc7c07f83099be98df8921a941d6e..3ea2afb6fc3aea0b929c0741736025f809649bd5 100644 (file)
@@ -1,7 +1,6 @@
 ;;; sh-script.el --- shell-script editing commands for Emacs
 
-;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
 ;; Version: 2.0f
@@ -673,7 +672,9 @@ removed when closing the here document."
          "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete"
           "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"
           "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt"
-          "source" "suspend" "typeset" "unalias")
+          "source" "suspend" "typeset" "unalias"
+          ;; bash4
+          "mapfile" "readarray")
 
     ;; The next entry is only used for defining the others
     (bourne sh-append shell
@@ -737,6 +738,7 @@ implemented as aliases.  See `sh-feature'."
   :type '(repeat (cons (symbol :tag "Shell")
                       (choice (repeat string)
                               (sexp :format "Evaluate: %v"))))
+  :version "24.4"                       ; bash4 additions
   :group 'sh-script)
 
 
@@ -2168,11 +2170,18 @@ the visited file executable, and NO-QUERY-FLAG (the second argument)
 controls whether to query about making the visited file executable.
 
 Calls the value of `sh-set-shell-hook' if set."
-  (interactive (list (completing-read (format "Shell \(default %s\): "
-                                             sh-shell-file)
-                                     interpreter-mode-alist
-                                     (lambda (x) (eq (cdr x) 'sh-mode))
-                                     nil nil nil sh-shell-file)
+  (interactive (list (completing-read
+                      (format "Shell \(default %s\): "
+                              sh-shell-file)
+                      ;; This used to use interpreter-mode-alist, but that is
+                      ;; no longer appropriate now that uses regexps.
+                      ;; Maybe there could be a separate variable that lists
+                      ;; the shells, used here and to construct i-mode-alist.
+                      ;; But the following is probably good enough:
+                      (append (mapcar (lambda (e) (symbol-name (car e)))
+                                      sh-ancestor-alist)
+                              '("csh" "rc" "sh"))
+                      nil nil nil nil sh-shell-file)
                     (eq executable-query 'function)
                     t))
   (if (string-match "\\.exe\\'" shell)
index 5e44677b0f802f684e8eca5ada7fedf431f3f487..abb59a674e380d5fd393f78af2312135bcacf2e3 100644 (file)
@@ -490,12 +490,13 @@ If `replace-lax-whitespace' is non-nil, a space or spaces in the string
 to be replaced will match a sequence of whitespace chars defined by the
 regexp in `search-whitespace-regexp'.
 
-In Transient Mark mode, if the mark is active, operate on the contents
-of the region.  Otherwise, operate from point to the end of the buffer.
-
 Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace
 only matches surrounded by word boundaries.
-Fourth and fifth arg START and END specify the region to operate on.
+
+Operates on the region between START and END (if both are nil, from point
+to the end of the buffer).  Interactively, if Transient Mark mode is
+enabled and the mark is active, operates on the contents of the region;
+otherwise from point to the end of the buffer.
 
 Use \\<minibuffer-local-map>\\[next-history-element] \
 to pull the last incremental search string to the minibuffer
index 2ddac6d6c431aa98fb0a3df2e66d20571cb4d576..e9dc12b00fe766b21c8749652d9af55b7ca14778 100644 (file)
@@ -255,8 +255,13 @@ may have changed\) back to `save-place-alist'."
                 (insert-file-contents file)
                 (goto-char (point-min))
                 (setq save-place-alist
-                      (car (read-from-string
-                            (buffer-substring (point-min) (point-max)))))
+                      ;; This is with-demoted-errors, but we want to
+                      ;; mention save-place in any error message.
+                      (condition-case err
+                        (car (read-from-string
+                              (buffer-substring (point-min) (point-max))))
+                        (error (message "Error reading save-place-file: %S" err)
+                               nil)))
 
                 ;; If there is a limit, and we're over it, then we'll
                 ;; have to truncate the end of the list:
index 6825c41becc14e2dc5a73b36ea2db78b49a66116..593f36d1ee1fe204e4f46534be3e46401e1fc633 100644 (file)
@@ -1231,7 +1231,7 @@ is a string to insert in the minibuffer before reading.
 Such arguments are used as in `read-from-minibuffer'.)"
   ;; Used for interactive spec `x'.
   (read-from-minibuffer prompt initial-contents minibuffer-local-map
-                        t minibuffer-history))
+                        t 'minibuffer-history))
 
 (defun eval-minibuffer (prompt &optional initial-contents)
   "Return value of Lisp expression read using the minibuffer.
@@ -1404,11 +1404,25 @@ to get different commands to edit and resubmit."
          ;; add it to the history.
          (or (equal newcmd (car command-history))
              (setq command-history (cons newcmd command-history)))
-         (eval newcmd))
+          (unwind-protect
+              (progn
+                ;; Trick called-interactively-p into thinking that `newcmd' is
+                ;; an interactive call (bug#14136).
+                (add-hook 'called-interactively-p-functions
+                          #'repeat-complex-command--called-interactively-skip)
+                (eval newcmd))
+            (remove-hook 'called-interactively-p-functions
+                         #'repeat-complex-command--called-interactively-skip)))
       (if command-history
          (error "Argument %d is beyond length of command history" arg)
        (error "There are no previous complex commands to repeat")))))
 
+(defun repeat-complex-command--called-interactively-skip (i _frame1 frame2)
+  (and (eq 'eval (cadr frame2))
+       (eq 'repeat-complex-command
+           (cadr (backtrace-frame i #'called-interactively-p)))
+       1))
+
 (defvar extended-command-history nil)
 
 (defun read-extended-command ()
@@ -3166,12 +3180,18 @@ see other processes running on the system, use `list-system-processes'."
   nil)
 \f
 (defvar universal-argument-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [t] 'universal-argument-other-key)
-    (define-key map (vector meta-prefix-char t) 'universal-argument-other-key)
-    (define-key map [switch-frame] nil)
+  (let ((map (make-sparse-keymap))
+        (universal-argument-minus
+         ;; For backward compatibility, minus with no modifiers is an ordinary
+         ;; command if digits have already been entered.
+         `(menu-item "" negative-argument
+                     :filter ,(lambda (cmd)
+                                (if (integerp prefix-arg) nil cmd)))))
+    (define-key map [switch-frame]
+      (lambda (e) (interactive "e")
+        (handle-switch-frame e) (universal-argument--mode)))
     (define-key map [?\C-u] 'universal-argument-more)
-    (define-key map [?-] 'universal-argument-minus)
+    (define-key map [?-] universal-argument-minus)
     (define-key map [?0] 'digit-argument)
     (define-key map [?1] 'digit-argument)
     (define-key map [?2] 'digit-argument)
@@ -3192,30 +3212,12 @@ see other processes running on the system, use `list-system-processes'."
     (define-key map [kp-7] 'digit-argument)
     (define-key map [kp-8] 'digit-argument)
     (define-key map [kp-9] 'digit-argument)
-    (define-key map [kp-subtract] 'universal-argument-minus)
+    (define-key map [kp-subtract] universal-argument-minus)
     map)
   "Keymap used while processing \\[universal-argument].")
 
-(defvar universal-argument-num-events nil
-  "Number of argument-specifying events read by `universal-argument'.
-`universal-argument-other-key' uses this to discard those events
-from (this-command-keys), and reread only the final command.")
-
-(defvar saved-overriding-map t
-  "The saved value of `overriding-terminal-local-map'.
-That variable gets restored to this value on exiting \"universal
-argument mode\".")
-
-(defun save&set-overriding-map (map)
-  "Set `overriding-terminal-local-map' to MAP."
-  (when (eq saved-overriding-map t)
-    (setq saved-overriding-map overriding-terminal-local-map)
-    (setq overriding-terminal-local-map map)))
-
-(defun restore-overriding-map ()
-  "Restore `overriding-terminal-local-map' to its saved value."
-  (setq overriding-terminal-local-map saved-overriding-map)
-  (setq saved-overriding-map t))
+(defun universal-argument--mode ()
+  (set-temporary-overlay-map universal-argument-map))
 
 (defun universal-argument ()
   "Begin a numeric argument for the following command.
@@ -3229,33 +3231,27 @@ which is different in effect from any particular numeric argument.
 These commands include \\[set-mark-command] and \\[start-kbd-macro]."
   (interactive)
   (setq prefix-arg (list 4))
-  (setq universal-argument-num-events (length (this-command-keys)))
-  (save&set-overriding-map universal-argument-map))
+  (universal-argument--mode))
 
-;; A subsequent C-u means to multiply the factor by 4 if we've typed
-;; nothing but C-u's; otherwise it means to terminate the prefix arg.
 (defun universal-argument-more (arg)
+  ;; A subsequent C-u means to multiply the factor by 4 if we've typed
+  ;; nothing but C-u's; otherwise it means to terminate the prefix arg.
   (interactive "P")
-  (if (consp arg)
-      (setq prefix-arg (list (* 4 (car arg))))
-    (if (eq arg '-)
-       (setq prefix-arg (list -4))
-      (setq prefix-arg arg)
-      (restore-overriding-map)))
-  (setq universal-argument-num-events (length (this-command-keys))))
+  (setq prefix-arg (if (consp arg)
+                       (list (* 4 (car arg)))
+                     (if (eq arg '-)
+                         (list -4)
+                       arg)))
+  (when (consp prefix-arg) (universal-argument--mode)))
 
 (defun negative-argument (arg)
   "Begin a negative numeric argument for the next command.
 \\[universal-argument] following digits or minus sign ends the argument."
   (interactive "P")
-  (cond ((integerp arg)
-        (setq prefix-arg (- arg)))
-       ((eq arg '-)
-        (setq prefix-arg nil))
-       (t
-        (setq prefix-arg '-)))
-  (setq universal-argument-num-events (length (this-command-keys)))
-  (save&set-overriding-map universal-argument-map))
+  (setq prefix-arg (cond ((integerp arg) (- arg))
+                         ((eq arg '-) nil)
+                         (t '-)))
+  (universal-argument--mode))
 
 (defun digit-argument (arg)
   "Part of the numeric argument for the next command.
@@ -3265,37 +3261,15 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
                   last-command-event
                 (get last-command-event 'ascii-character)))
         (digit (- (logand char ?\177) ?0)))
-    (cond ((integerp arg)
-          (setq prefix-arg (+ (* arg 10)
-                              (if (< arg 0) (- digit) digit))))
-         ((eq arg '-)
-          ;; Treat -0 as just -, so that -01 will work.
-          (setq prefix-arg (if (zerop digit) '- (- digit))))
-         (t
-          (setq prefix-arg digit))))
-  (setq universal-argument-num-events (length (this-command-keys)))
-  (save&set-overriding-map universal-argument-map))
-
-;; For backward compatibility, minus with no modifiers is an ordinary
-;; command if digits have already been entered.
-(defun universal-argument-minus (arg)
-  (interactive "P")
-  (if (integerp arg)
-      (universal-argument-other-key arg)
-    (negative-argument arg)))
-
-;; Anything else terminates the argument and is left in the queue to be
-;; executed as a command.
-(defun universal-argument-other-key (arg)
-  (interactive "P")
-  (setq prefix-arg arg)
-  (let* ((key (this-command-keys))
-        (keylist (listify-key-sequence key)))
-    (setq unread-command-events
-         (append (nthcdr universal-argument-num-events keylist)
-                 unread-command-events)))
-  (reset-this-command-lengths)
-  (restore-overriding-map))
+    (setq prefix-arg (cond ((integerp arg)
+                            (+ (* arg 10)
+                              (if (< arg 0) (- digit) digit)))
+                           ((eq arg '-)
+                            ;; Treat -0 as just -, so that -01 will work.
+                            (if (zerop digit) '- (- digit)))
+                           (t
+                            digit))))
+  (universal-argument--mode))
 \f
 
 (defvar filter-buffer-substring-functions nil
index d9f59b3a665c4caf686cd02076831f99d7ae711d..5279675562502e5e1486e955e492f0d5b6c520f5 100644 (file)
@@ -1007,9 +1007,9 @@ supported at a time.
                                 ;; with the selected frame.
                                 (list 'parent (selected-frame)))
                       speedbar-frame-parameters)
-                    speedbar-before-delete-hook
-                    speedbar-before-popup-hook
-                    speedbar-after-create-hook)
+                    'speedbar-before-delete-hook
+                    'speedbar-before-popup-hook
+                    'speedbar-after-create-hook)
   ;; Start up the timer
   (if (not speedbar-frame)
       (speedbar-set-timer nil)
index b8b0d5af3b8d0b09908e0b3bc250acabb336c366..de7c629b2088e4e2b1506f25aa5442069d0fda9f 100644 (file)
@@ -170,12 +170,16 @@ PLACE must be a generalized variable whose value is a list.
 If the value is nil, `pop' returns nil but does not actually
 change the list."
   (declare (debug (gv-place)))
-  (list 'car
-        (if (symbolp place)
-            ;; So we can use `pop' in the bootstrap before `gv' can be used.
-            (list 'prog1 place (list 'setq place (list 'cdr place)))
-          (gv-letplace (getter setter) place
-            `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
+  ;; We use `car-safe' here instead of `car' because the behavior is the same
+  ;; (if it's not a cons cell, the `cdr' would have signaled an error already),
+  ;; but `car-safe' is total, so the byte-compiler can safely remove it if the
+  ;; result is not used.
+  `(car-safe
+    ,(if (symbolp place)
+         ;; So we can use `pop' in the bootstrap before `gv' can be used.
+         (list 'prog1 place (list 'setq place (list 'cdr place)))
+       (gv-letplace (getter setter) place
+         `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
 
 (defmacro when (cond &rest body)
   "If COND yields non-nil, do BODY, else return nil.
@@ -3346,16 +3350,22 @@ even if this catches the signal."
 (define-obsolete-function-alias 'condition-case-no-debug
   'condition-case-unless-debug "24.1")
 
-(defmacro with-demoted-errors (&rest body)
+(defmacro with-demoted-errors (format &rest body)
   "Run BODY and demote any errors to simple messages.
 If `debug-on-error' is non-nil, run BODY without catching its errors.
 This is to be used around code which is not expected to signal an error
-but which should be robust in the unexpected case that an error is signaled."
-  (declare (debug t) (indent 0))
-  (let ((err (make-symbol "err")))
+but which should be robust in the unexpected case that an error is signaled.
+For backward compatibility, if FORMAT is not a constant string, it
+is assumed to be part of BODY, in which case the message format
+used is \"Error: %S\"."
+  (declare (debug t) (indent 1))
+  (let ((err (make-symbol "err"))
+        (format (if (and (stringp format) body) format
+                  (prog1 "Error: %S"
+                    (if format (push format body))))))
     `(condition-case-unless-debug ,err
-         (progn ,@body)
-       (error (message "Error: %S" ,err) nil))))
+         ,(macroexp-progn body)
+       (error (message ,format ,err) nil))))
 
 (defmacro combine-after-change-calls (&rest body)
   "Execute BODY, but don't call the after-change functions till the end.
index 171f373317a6fe48336c400761a21fbdb8c9ecfa..795c04e31e1b33f3212e4caa87e8ecd609dc85e4 100644 (file)
@@ -468,7 +468,7 @@ alternatives, starting from zero."
      nil
      (("editor") ("editora") ("editorb") ("editorc")
       ("translator") ("annotator") ("commentator")
-      ("introduction") ("foreword") ("afterword") ("titleaddon")
+      ("introduction") ("foreword") ("afterword") ("subtitle") ("titleaddon")
       ("maintitle") ("mainsubtitle") ("maintitleaddon")
       ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes")
       ("series") ("number") ("note") ("publisher") ("location") ("isbn")
index cb19c018839e5a19c6e2960d1a5fe366508891d5..9c32604b4f41e5b98a1255813ce4a5cd2bb32dc0 100644 (file)
 (defvar css-font-lock-defaults
   '(css-font-lock-keywords nil t))
 
+(defcustom css-indent-offset 4
+  "Basic size of one indentation step."
+  :version "22.2"
+  :type 'integer)
+
+(require 'smie)
+
+(defconst css-smie-grammar
+  (smie-prec2->grammar
+   (smie-precs->prec2 '((assoc ";") (assoc ",") (left ":")))))
+
+(defun css-smie--forward-token ()
+  (cond
+   ((and (eq (char-before) ?\})
+         ;; FIXME: If the next char is not whitespace, what should we do?
+         (or (memq (char-after) '(?\s ?\t ?\n))
+             (looking-at comment-start-skip)))
+    (if (memq (char-after) '(?\s ?\t ?\n))
+        (forward-char 1) (forward-comment 1))
+    ";")
+   ((progn (forward-comment (point-max))
+           (looking-at "[;,:]"))
+    (forward-char 1) (match-string 0))
+   (t (smie-default-forward-token))))
+
+(defun css-smie--backward-token ()
+  (let ((pos (point)))
+    (forward-comment (- (point)))
+    (cond
+     ;; FIXME: If the next char is not whitespace, what should we do?
+     ((and (eq (char-before) ?\}) (> pos (point))) ";")
+     ((memq (char-before) '(?\; ?\, ?\:))
+      (forward-char -1) (string (char-after)))
+     (t (smie-default-backward-token)))))
+
+(defun css-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:elem . basic) css-indent-offset)
+    (`(:elem . arg) 0)
+    (`(:before . "{") (if (smie-rule-hanging-p)
+                         (smie-rule-parent 0)))))
+
 ;;;###autoload
 (define-derived-mode css-mode fundamental-mode "CSS"
   "Major mode to edit Cascading Style Sheets."
   (setq-local comment-start-skip "/\\*+[ \t]*")
   (setq-local comment-end "*/")
   (setq-local comment-end-skip "[ \t]*\\*+/")
-  (setq-local forward-sexp-function 'css-forward-sexp)
   (setq-local parse-sexp-ignore-comments t)
   (setq-local indent-line-function 'css-indent-line)
   (setq-local fill-paragraph-function 'css-fill-paragraph)
   (setq-local add-log-current-defun-function #'css-current-defun-name)
+  (smie-setup css-smie-grammar #'css-smie-rules
+              :forward-token #'css-smie--forward-token
+              :backward-token #'css-smie--backward-token)
   (when css-electric-keys
     (let ((fc (make-char-table 'auto-fill-chars)))
       (set-char-table-parent fc auto-fill-chars)
             ;; Don't use the default filling code.
             t)))))))
 
-;;; Navigation and indentation.
-
-(defconst css-navigation-syntax-table
-  (let ((st (make-syntax-table css-mode-syntax-table)))
-    (map-char-table (lambda (c v)
-                      ;; Turn punctuation (code = 1) into symbol (code = 1).
-                      (if (eq (car-safe v) 1)
-                          (set-char-table-range st c (cons 3 (cdr v)))))
-                    st)
-    st))
-
-(defun css-backward-sexp (n)
-  (let ((forward-sexp-function nil))
-    (if (< n 0) (css-forward-sexp (- n))
-      (while (> n 0)
-        (setq n (1- n))
-        (forward-comment (- (point-max)))
-        (if (not (eq (char-before) ?\;))
-            (backward-sexp 1)
-          (while (progn (backward-sexp 1)
-                        (save-excursion
-                          (forward-comment (- (point-max)))
-                          ;; FIXME: We should also skip punctuation.
-                          (not (or (bobp) (memq (char-before) '(?\; ?\{))))))))))))
-
-(defun css-forward-sexp (n)
-  (let ((forward-sexp-function nil))
-    (if (< n 0) (css-backward-sexp (- n))
-      (while (> n 0)
-        (setq n (1- n))
-        (forward-comment (point-max))
-        (if (not (eq (char-after) ?\;))
-            (forward-sexp 1)
-          (while (progn (forward-sexp 1)
-                        (save-excursion
-                          (forward-comment (point-max))
-                          ;; FIXME: We should also skip punctuation.
-                          (not (memq (char-after) '(?\; ?\})))))))))))
-
-(defun css-indent-calculate-virtual ()
-  (if (or (save-excursion (skip-chars-backward " \t") (bolp))
-          (if (looking-at "\\s(")
-              (save-excursion
-                (forward-char 1) (skip-chars-forward " \t")
-                (not (or (eolp) (looking-at comment-start-skip))))))
-      (current-column)
-    (css-indent-calculate)))
-
-(defcustom css-indent-offset 4
-  "Basic size of one indentation step."
-  :version "22.2"
-  :type 'integer
-  :group 'css)
-
-(defun css-indent-calculate ()
-  (let ((ppss (syntax-ppss))
-        pos)
-    (with-syntax-table css-navigation-syntax-table
-      (save-excursion
-        (cond
-         ;; Inside a string.
-         ((nth 3 ppss) 'noindent)
-         ;; Inside a comment.
-         ((nth 4 ppss)
-          (setq pos (point))
-          (forward-line -1)
-          (skip-chars-forward " \t")
-          (if (>= (nth 8 ppss) (point))
-              (progn
-                (goto-char (nth 8 ppss))
-                (if (eq (char-after pos) ?*)
-                    (forward-char 1)
-                  (if (not (looking-at comment-start-skip))
-                      (error "Internal css-mode error")
-                    (goto-char (match-end 0))))
-                (current-column))
-            (if (and (eq (char-after pos) ?*) (eq (char-after) ?*))
-                (current-column)
-              ;; 'noindent
-              (current-column)
-              )))
-         ;; In normal code.
-         (t
-          (or
-           (when (looking-at "\\s)")
-             (forward-char 1)
-             (backward-sexp 1)
-             (css-indent-calculate-virtual))
-           (when (looking-at comment-start-skip)
-             (forward-comment (point-max))
-             (css-indent-calculate))
-           (when (save-excursion (forward-comment (- (point-max)))
-                                 (setq pos (point))
-                                 (eq (char-syntax (preceding-char)) ?\())
-             (goto-char (1- pos))
-             (if (not (looking-at "\\s([ \t]*"))
-                 (error "Internal css-mode error")
-               (if (or (memq (char-after (match-end 0)) '(?\n nil))
-                       (save-excursion (goto-char (match-end 0))
-                                       (looking-at comment-start-skip)))
-                   (+ (css-indent-calculate-virtual) css-indent-offset)
-                 (progn (goto-char (match-end 0)) (current-column)))))
-           (progn
-             (css-backward-sexp 1)
-             (if (looking-at "\\s(")
-                 (css-indent-calculate)
-               (css-indent-calculate-virtual))))))))))
-
-
-(defun css-indent-line ()
-  "Indent current line according to CSS indentation rules."
-  (interactive)
-  (let* ((savep (point))
-         (forward-sexp-function nil)
-        (indent (condition-case nil
-                    (save-excursion
-                      (forward-line 0)
-                      (skip-chars-forward " \t")
-                      (if (>= (point) savep) (setq savep nil))
-                      (css-indent-calculate))
-                  (error nil))))
-    (if (not (numberp indent)) 'noindent
-      (if savep
-          (save-excursion (indent-line-to indent))
-        (indent-line-to indent)))))
-
 (defun css-current-defun-name ()
   "Return the name of the CSS section at point, or nil."
   (save-excursion
index 3e64250d1a73a69e29289b0834ed9192ccf17073..3f0ef3a7a618eba04bb483378ab3988302725969 100644 (file)
@@ -211,7 +211,7 @@ one optional arguments, diff-number to refine.")
 ;; ediff-setup-diff-regions is called via a funcall to
 ;; ediff-setup-diff-regions-function, which can also have the value
 ;; ediff-setup-diff-regions3, which takes 4 arguments.
-(defun ediff-setup-diff-regions (file-A file-B file-C)
+(defun ediff-setup-diff-regions (file-A file-B _file-C)
   ;; looking for '-c', '-i', '-u', or 'c', 'i', 'u' among clustered non-long options
   (if (string-match "^-[ciu]\\| -[ciu]\\|\\(^\\| \\)-[^- ]+[ciu]"
                    ediff-diff-options)
@@ -1223,7 +1223,7 @@ delimiter regions"))
 ;; like shell-command-sentinel but doesn't print an exit status message
 ;; we do this because diff always exits with status 1, if diffs are found
 ;; so shell-command-sentinel displays a confusing message to the user
-(defun ediff-process-sentinel (process signal)
+(defun ediff-process-sentinel (process _signal)
   (if (and (memq (process-status process) '(exit signal))
            (buffer-name (process-buffer process)))
       (progn
index 075775923a528c2cf14afd9ec8eb5e80b349bee3..c9f3583a4373537d6b6a55bafac9f459ea4829eb 100644 (file)
@@ -810,7 +810,7 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs."
   (ediff-overlay-put extent 'face face)
   (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo))
 
-(defun ediff-region-help-echo (extent-or-window &optional overlay point)
+(defun ediff-region-help-echo (extent-or-window &optional overlay _point)
   (unless overlay
     (setq overlay extent-or-window))
   (let ((is-current (ediff-overlay-get overlay 'ediff))
@@ -1768,7 +1768,7 @@ Unless optional argument INPLACE is non-nil, return a new string."
   (or n (setq n ediff-current-difference))
   (and (>= n 0) (< n ediff-number-of-differences)))
 
-(defsubst ediff-show-all-diffs (n)
+(defsubst ediff-show-all-diffs (_n)
   "Don't skip difference regions."
   nil)
 
index a1f4d4f5d7838995034106c722b7644e6a0ec3fc..a319d8de9b69b4a7df21e86bba61925eb09c273a 100644 (file)
@@ -92,6 +92,8 @@ Buffer B."
   )
 (make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default)
 
+(defvar state-of-merge)                        ; dynamic var
+
 ;; check if there is no clash between the ancestor and one of the variants.
 ;; if it is not a merge job then return true
 (defun ediff-merge-region-is-non-clash (n)
@@ -351,8 +353,6 @@ Combining is done according to the specifications in variable
        (reverse delim-regs-list)
        )))
 
-(defvar state-of-merge)                        ; dynamic var
-
 ;; Check if the non-preferred merge has been modified since originally set.
 ;; This affects only the regions that are marked as default-A/B or combined.
 ;; If PREFERS-TOO is non-nil, then look at the regions marked as prefers-A/B as
index 58e10819a3078cad78a4e8b7dccef6cdf6c8d77f..55e9465d48a76dfa8cefe179639ed7ca4481c603 100644 (file)
@@ -1115,7 +1115,7 @@ behavior."
     (setq overl
          (if (featurep 'xemacs)
              (map-extents
-              (lambda (ext maparg)
+              (lambda (ext _maparg)
                 (if (and
                      (ediff-overlay-get ext 'ediff-meta-info)
                      (eq (ediff-overlay-get ext 'ediff-meta-session-number)
@@ -1444,7 +1444,7 @@ Useful commands:
 
 
 ;; argument is ignored
-(defun ediff-redraw-registry-buffer (&optional ignore)
+(defun ediff-redraw-registry-buffer (&optional _ignore)
   (ediff-with-current-buffer ediff-registry-buffer
     (let ((point (point))
          elt bufAname bufBname bufCname cur-diff total-diffs pt
index 2f2c71a71e69eed3a1100cdeef475713068c9d59..fe791f6bceefdf370bb2d1ba838adff6e4701a6d 100644 (file)
@@ -40,7 +40,7 @@
 (defvar ediff-after-quit-hook-internal nil)
 
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  _r))))
 
 ;; end pacifier
 
@@ -1602,7 +1602,7 @@ the width of the A/B/C windows."
 ;;BEG, END show the region to be positioned.
 ;;JOB-NAME holds ediff-job-name.  The ediff-windows job positions regions
 ;;differently.
-(defun ediff-position-region (beg end pos job-name)
+(defun ediff-position-region (beg end pos _job-name)
   (if (> end (point-max))
       (setq end (point-max)))
   (if ediff-windows-job
@@ -1685,7 +1685,7 @@ the width of the A/B/C windows."
                            'ediff-get-lines-to-region-start)
                           ((eq op 'scroll-up)
                            'ediff-get-lines-to-region-end)
-                          (t (lambda (a b c) 0))))
+                          (t (lambda (_a _b _c) 0))))
               (max-lines (max (funcall func 'A n ctl-buf)
                               (funcall func 'B n ctl-buf)
                               (if (ediff-buffer-live-p ediff-buffer-C)
index 5a14c1933442839a3727a4668ce17c435da6c26a..785535b82df487361c4a867fc39c401f9c3aa738 100644 (file)
@@ -40,7 +40,7 @@
 
 ;; declare-function does not exist in XEmacs
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  _r))))
 
 (require 'ediff-init)
 (require 'ediff-help)
@@ -280,7 +280,7 @@ into icons, regardless of the window manager."
 
 ;;; Functions
 
-(defun ediff-get-window-by-clicking (wind prev-wind wind-number)
+(defun ediff-get-window-by-clicking (_wind _prev-wind wind-number)
   (let (event)
     (message
      "Select windows by clicking.  Please click on Window %d " wind-number)
@@ -289,9 +289,9 @@ into icons, regardless of the window manager."
          (beep 1))
       (message "Please click on Window %d " wind-number))
     (ediff-read-event) ; discard event
-    (setq wind (if (featurep 'xemacs)
-                  (event-window event)
-                (posn-window (event-start event))))))
+    (if (featurep 'xemacs)
+        (event-window event)
+      (posn-window (event-start event)))))
 
 
 ;; Select the lowest window on the frame.
index d35c3e53e9a12f35afea6b0b5370345b75bba566..9ab592587c90a68a55a269b079de1f4b6d6e6309 100644 (file)
 
 ;; Compiler pacifier
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest  _r))))
 
 (require 'ediff-util)
 ;; end pacifier
index 8d0e8efc75cd5cfdb1308495162e689893df5d2c..af13665fc2ad9e358c3c0ffbb93fdee89be8b657 100644 (file)
@@ -849,7 +849,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
 ;;; Functions to start Emerge on files
 
 ;;;###autoload
-(defun emerge-files (arg file-A file-B file-out &optional startup-hooks
+(defun emerge-files (_arg file-A file-B file-out &optional startup-hooks
                     quit-hooks)
   "Run Emerge on two files."
   (interactive
@@ -869,7 +869,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
    file-out))
 
 ;;;###autoload
-(defun emerge-files-with-ancestor (arg file-A file-B file-ancestor file-out
+(defun emerge-files-with-ancestor (_arg file-A file-B file-ancestor file-out
                                   &optional startup-hooks quit-hooks)
   "Run Emerge on two files, giving another file as the ancestor."
   (interactive
@@ -1063,7 +1063,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
        quit-hooks)))
 
 (defun emerge-revisions-internal (file revision-A revision-B &optional
-                                  startup-hooks quit-hooks output-file)
+                                  startup-hooks quit-hooks _output-file)
   (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A)))
        (buffer-B (get-buffer-create (format "%s,%s" file revision-B)))
        (emerge-file-A (emerge-make-temp-file "A"))
index fb91185662a1742c2368d1033d2ad05a5bbbfad2..914eef4dd39278f8f0dc74feabac13c686d9d7f2 100644 (file)
@@ -648,7 +648,7 @@ If non-nil, NEW means to create a new buffer no matter what."
                             done))))
 
 
-(defun cvs-sentinel (proc msg)
+(defun cvs-sentinel (proc _msg)
   "Sentinel for the cvs update process.
 This is responsible for parsing the output from the cvs update when
 it is finished."
@@ -981,7 +981,7 @@ The files are stored to DIR."
 ;;;;
 
 (defun-cvs-mode (cvs-mode-revert-buffer . SIMPLE)
-                (&optional ignore-auto noconfirm)
+                (&optional _ignore-auto _noconfirm)
   "Rerun `cvs-examine' on the current directory with the default flags."
   (interactive)
   (cvs-examine default-directory t))
@@ -995,7 +995,7 @@ If in a *cvs* buffer, don't prompt unless a prefix argument is given."
     (read-directory-name prompt nil default-directory nil)))
 
 ;;;###autoload
-(defun cvs-quickdir (dir &optional flags noshow)
+(defun cvs-quickdir (dir &optional _flags noshow)
   "Open a *cvs* buffer on DIR without running cvs.
 With a prefix argument, prompt for a directory to use.
 A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]),
index f61e97216a91799ffe0f1503d694b3c707f2b6ca..87336b6a357e4542aa03164c47dfeb263eb34e90 100644 (file)
@@ -57,7 +57,6 @@
 
 (defcustom smerge-diff-buffer-name "*vc-diff*"
   "Buffer name to use for displaying diffs."
-  :group 'smerge
   :type '(choice
          (const "*vc-diff*")
          (const "*cvs-diff*")
          (if (listp diff-switches) diff-switches (list diff-switches)))
   "A list of strings specifying switches to be passed to diff.
 Used in `smerge-diff-base-mine' and related functions."
-  :group 'smerge
   :type '(repeat string))
 
 (defcustom smerge-auto-leave t
   "Non-nil means to leave `smerge-mode' when the last conflict is resolved."
-  :group 'smerge
   :type 'boolean)
 
 (defface smerge-mine
@@ -84,8 +81,7 @@ Used in `smerge-diff-base-mine' and related functions."
      :background "#553333")
     (((class color))
      :foreground "red"))
-  "Face for your code."
-  :group 'smerge)
+  "Face for your code.")
 (define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1")
 (defvar smerge-mine-face 'smerge-mine)
 
@@ -96,8 +92,7 @@ Used in `smerge-diff-base-mine' and related functions."
      :background "#335533")
     (((class color))
      :foreground "green"))
-  "Face for the other code."
-  :group 'smerge)
+  "Face for the other code.")
 (define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1")
 (defvar smerge-other-face 'smerge-other)
 
@@ -108,8 +103,7 @@ Used in `smerge-diff-base-mine' and related functions."
      :background "#888833")
     (((class color))
      :foreground "yellow"))
-  "Face for the base code."
-  :group 'smerge)
+  "Face for the base code.")
 (define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1")
 (defvar smerge-base-face 'smerge-base)
 
@@ -118,15 +112,13 @@ Used in `smerge-diff-base-mine' and related functions."
      (:background "grey85"))
     (((background dark))
      (:background "grey30")))
-  "Face for the conflict markers."
-  :group 'smerge)
+  "Face for the conflict markers.")
 (define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1")
 (defvar smerge-markers-face 'smerge-markers)
 
 (defface smerge-refined-change
   '((t nil))
-  "Face used for char-based changes shown by `smerge-refine'."
-  :group 'smerge)
+  "Face used for char-based changes shown by `smerge-refine'.")
 
 (defface smerge-refined-removed
   '((default
@@ -137,7 +129,6 @@ Used in `smerge-diff-base-mine' and related functions."
      :background "#aa2222")
     (t :inverse-video t))
   "Face used for removed characters shown by `smerge-refine'."
-  :group 'smerge
   :version "24.3")
 
 (defface smerge-refined-added
@@ -149,7 +140,6 @@ Used in `smerge-diff-base-mine' and related functions."
      :background "#22aa22")
     (t :inverse-video t))
   "Face used for added characters shown by `smerge-refine'."
-  :group 'smerge
   :version "24.3")
 
 (easy-mmode-defmap smerge-basic-map
@@ -172,7 +162,6 @@ Used in `smerge-diff-base-mine' and related functions."
 
 (defcustom smerge-command-prefix "\C-c^"
   "Prefix for `smerge-mode' commands."
-  :group 'smerge
   :type '(choice (const :tag "ESC"   "\e")
                 (const :tag "C-c ^" "\C-c^" )
                 (const :tag "none"  "")
index 8af488789de3f460ebe831dab9625812a5f91ae6..066b4ec65876ced2ba6b356bf888b711440183fc 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-annotate.el --- VC Annotate Support
+;;; vc-annotate.el --- VC Annotate Support  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
 
@@ -306,9 +306,9 @@ use; you may override this using the second optional arg MODE."
         (vc-annotate-display-default (or vc-annotate-ratio 1.0)))
         ;; One of the auto-scaling modes
        ((eq vc-annotate-display-mode 'scale)
-        (vc-exec-after `(vc-annotate-display-autoscale)))
+        (vc-run-delayed (vc-annotate-display-autoscale)))
        ((eq vc-annotate-display-mode 'fullscale)
-        (vc-exec-after `(vc-annotate-display-autoscale t)))
+        (vc-run-delayed (vc-annotate-display-autoscale t)))
        ((numberp vc-annotate-display-mode) ; A fixed number of days lookback
         (vc-annotate-display-default
          (/ vc-annotate-display-mode
@@ -316,6 +316,8 @@ use; you may override this using the second optional arg MODE."
        (t (error "No such display mode: %s"
                  vc-annotate-display-mode))))
 
+(defvar vc-sentinel-movepoint)
+
 ;;;###autoload
 (defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk)
   "Display the edit history of the current FILE using colors.
@@ -397,16 +399,16 @@ mode-specific menu.  `vc-annotate-color-map' and
                display-mode))))
 
     (with-current-buffer temp-buffer-name
-      (vc-exec-after
-       `(progn
-          ;; Ideally, we'd rather not move point if the user has already
-          ;; moved it elsewhere, but really point here is not the position
-          ;; of the user's cursor :-(
-          (when ,current-line           ;(and (bobp))
-            (goto-line ,current-line)
-            (setq vc-sentinel-movepoint (point)))
-          (unless (active-minibuffer-window)
-            (message "Annotating... done")))))))
+      (vc-run-delayed
+       ;; Ideally, we'd rather not move point if the user has already
+       ;; moved it elsewhere, but really point here is not the position
+       ;; of the user's cursor :-(
+       (when current-line           ;(and (bobp))
+         (goto-char (point-min))
+         (forward-line (1- current-line))
+         (setq vc-sentinel-movepoint (point)))
+       (unless (active-minibuffer-window)
+         (message "Annotating... done"))))))
 
 (defun vc-annotate-prev-revision (prefix)
   "Visit the annotation of the revision previous to this one.
@@ -630,7 +632,7 @@ or OFFSET if present."
              (vc-call-backend vc-annotate-backend 'annotate-current-time))
          next-time))))
 
-(defun vc-default-annotate-current-time (backend)
+(defun vc-default-annotate-current-time (_backend)
   "Return the current time, encoded as fractional days."
   (vc-annotate-convert-time (current-time)))
 
index f94e19271ee7e24510314a55c1e990dc0ab3ffc8..e9c65b49202798d0bbd89c2db5aa369d7a2ff8a0 100644 (file)
@@ -321,8 +321,8 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
   (let ((default-directory dir))
     (vc-arch-command t 'async nil "changes"))
   ;; The updating could be done asynchronously.
-  (vc-exec-after
-   `(vc-arch-after-dir-status ',callback)))
+  (vc-run-delayed
+   (vc-arch-after-dir-status callback)))
 
 (defun vc-arch-after-dir-status (callback)
   (let* ((state-map '(("M " . edited)
index e59a7dc5214f52f53a052d554cc97971133e9a6f..5f5416dc2ff6049240c7d8704e7698898e450b5e 100644 (file)
@@ -47,6 +47,7 @@
 
 (eval-when-compile
   (require 'cl-lib)
+  (require 'vc-dispatcher)
   (require 'vc-dir))                    ; vc-dir-at-event
 
 ;; Clear up the cache to force vc-call to check again and discover
@@ -354,7 +355,7 @@ prompt for the Bzr command to run."
            command        (cadr args)
            args           (cddr args)))
     (let ((buf (apply 'vc-bzr-async-command command args)))
-      (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+      (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
       (vc-set-async-update buf))))
 
 (defun vc-bzr-merge-branch ()
@@ -385,7 +386,7 @@ default if it is available."
         (command        (cadr cmd))
         (args           (cddr cmd)))
     (let ((buf (apply 'vc-bzr-async-command command args)))
-      (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+      (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
       (vc-set-async-update buf))))
 
 (defun vc-bzr-status (file)
@@ -651,21 +652,6 @@ REV non-nil gets an error."
           (vc-bzr-command "cat" t 0 file "-r" rev)
         (vc-bzr-command "cat" t 0 file))))
 
-(defun vc-bzr-ignore (file &optional directory remove)
-  "Ignore FILE under Bazaar.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
-  (if remove
-      (if directory
-         (vc--remove-regexp file (vc-bzr-find-ignore-file directory))
-       (vc--remove-regexp file
-                          (vc-bzr-find-ignore-file default-directory)))
-    (vc-bzr-command "ignore" t 0 file)))
-
-(defun vc-bzr-ignore-completion-table (file)
-  "Return the list of ignored files."
-  (vc--read-lines (vc-bzr-find-ignore-file file)))
-
 (defun vc-bzr-find-ignore-file (file)
   "Return the root directory of the repository of FILE."
   (expand-file-name ".bzrignore"
@@ -1010,23 +996,23 @@ stream.  Standard error output is discarded."
 (defun vc-bzr-dir-status (dir update-function)
   "Return a list of conses (file . state) for DIR."
   (vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
-  (vc-exec-after
-   `(vc-bzr-after-dir-status (quote ,update-function)
-                            ;; "bzr status" results are relative to
-                            ;; the bzr root directory, NOT to the
-                            ;; directory "bzr status" was invoked in.
-                            ;; Ugh.
-                            ;; We pass the relative directory here so
-                            ;; that `vc-bzr-after-dir-status' can
-                            ;; frob the results accordingly.
-                            (file-relative-name ,dir (vc-bzr-root ,dir)))))
+  (vc-run-delayed
+   (vc-bzr-after-dir-status update-function
+                            ;; "bzr status" results are relative to
+                            ;; the bzr root directory, NOT to the
+                            ;; directory "bzr status" was invoked in.
+                            ;; Ugh.
+                            ;; We pass the relative directory here so
+                            ;; that `vc-bzr-after-dir-status' can
+                            ;; frob the results accordingly.
+                            (file-relative-name dir (vc-bzr-root dir)))))
 
 (defun vc-bzr-dir-status-files (dir files _default-state update-function)
   "Return a list of conses (file . state) for DIR."
   (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
-  (vc-exec-after
-   `(vc-bzr-after-dir-status (quote ,update-function)
-                            (file-relative-name ,dir (vc-bzr-root ,dir)))))
+  (vc-run-delayed
+   (vc-bzr-after-dir-status update-function
+                            (file-relative-name dir (vc-bzr-root dir)))))
 
 (defvar vc-bzr-shelve-map
   (let ((map (make-sparse-keymap)))
index 48d83d4f408e9916d4e9631bf45c1ce6db2998e1..931193c46e03cbd329e86f1594767bc8d0e9e5db 100644 (file)
@@ -518,7 +518,7 @@ Remaining arguments are ignored."
    (if (vc-stay-local-p files 'CVS) 'async 0)
    files "log")
   (with-current-buffer buffer
-    (vc-exec-after (vc-rcs-print-log-cleanup)))
+    (vc-run-delayed (vc-rcs-print-log-cleanup)))
   (when limit 'limit-unsupported))
 
 (defun vc-cvs-comment-history (file)
@@ -1015,14 +1015,14 @@ state."
       ;; (vc-cvs-command (current-buffer) 'async
       ;;                 (file-relative-name dir)
       ;;                 "-f" "-n" "update" "-d" "-P")
-      (vc-exec-after
-       `(vc-cvs-after-dir-status (quote ,update-function))))))
+      (vc-run-delayed
+       (vc-cvs-after-dir-status update-function)))))
 
 (defun vc-cvs-dir-status-files (dir files _default-state update-function)
   "Create a list of conses (file . state) for DIR."
   (apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
-  (vc-exec-after
-   `(vc-cvs-after-dir-status (quote ,update-function))))
+  (vc-run-delayed
+   (vc-cvs-after-dir-status update-function)))
 
 (defun vc-cvs-file-to-string (file)
   "Read the content of FILE and return it as a string."
index 4f4c6942ba9b7b0ce80be497914524203c950c42..7888752553e556a36caa52d9ce20df7ca72bb3ba 100644 (file)
@@ -198,11 +198,11 @@ Another is that undo information is not kept."
           ;; Normally, we want async code such as sentinels to not move point.
           (save-excursion
             (goto-char m)
-                ;; Each sentinel may move point and the next one should be run
-                ;; at that new point.  We could get the same result by having
-                ;; each sentinel read&set process-mark, but since `cmd' needs
-                ;; to work both for async and sync processes, this would be
-                ;; difficult to achieve.
+            ;; Each sentinel may move point and the next one should be run
+            ;; at that new point.  We could get the same result by having
+            ;; each sentinel read&set process-mark, but since `cmd' needs
+            ;; to work both for async and sync processes, this would be
+            ;; difficult to achieve.
             (vc-exec-after code)
             (move-marker m (point)))
           ;; But sometimes the sentinels really want to move point.
@@ -224,8 +224,7 @@ Another is that undo information is not kept."
   "Eval CODE when the current buffer's process is done.
 If the current buffer has no process, just evaluate CODE.
 Else, add CODE to the process' sentinel.
-CODE can be either a function of no arguments, or an expression
-to evaluate."
+CODE should be a function of no arguments."
   (let ((proc (get-buffer-process (current-buffer))))
     (cond
      ;; If there's no background process, just execute the code.
@@ -247,6 +246,10 @@ to evaluate."
      (t (error "Unexpected process state"))))
   nil)
 
+(defmacro vc-run-delayed (&rest body)
+  (declare (indent 0) (debug t))
+  `(vc-exec-after (lambda () ,@body)))
+
 (defvar vc-post-command-functions nil
   "Hook run at the end of `vc-do-command'.
 Each function is called inside the buffer in which the command was run
@@ -328,8 +331,8 @@ case, and the process object in the asynchronous case."
                (set-process-filter proc 'vc-process-filter)
                (setq status proc)
                (when vc-command-messages
-                 (vc-exec-after
-                  `(message "Running %s in background... done" ',full-command))))
+                 (vc-run-delayed
+                  (message "Running %s in background... done" full-command))))
            ;; Run synchronously
            (when vc-command-messages
              (message "Running %s in foreground..." full-command))
@@ -346,9 +349,9 @@ case, and the process object in the asynchronous case."
                     (if (integerp status) (format "status %d" status) status)))
            (when vc-command-messages
              (message "Running %s...OK = %d" full-command status))))
-       (vc-exec-after
-        `(run-hook-with-args 'vc-post-command-functions
-                             ',command ',file-or-list ',flags))
+       (vc-run-delayed
+        (run-hook-with-args 'vc-post-command-functions
+                             command file-or-list flags))
        status))))
 
 (defun vc-do-async-command (buffer root command &rest args)
@@ -408,17 +411,17 @@ If the current buffer is a Dired buffer, revert it."
     (cond
      ((derived-mode-p 'vc-dir-mode)
       (with-current-buffer process-buffer
-       (vc-exec-after
-        `(if (buffer-live-p ,buf)
-             (with-current-buffer ,buf
-               (vc-dir-refresh))))))
+       (vc-run-delayed
+        (if (buffer-live-p buf)
+             (with-current-buffer buf
+               (vc-dir-refresh))))))
      ((derived-mode-p 'dired-mode)
       (with-current-buffer process-buffer
-       (vc-exec-after
-        `(and (buffer-live-p ,buf)
-              (= (buffer-modified-tick ,buf) ,tick)
-              (with-current-buffer ,buf
-                (revert-buffer)))))))))
+       (vc-run-delayed
+        (and (buffer-live-p buf)
+              (= (buffer-modified-tick buf) tick)
+              (with-current-buffer buf
+                (revert-buffer)))))))))
 
 ;; These functions are used to ensure that the view the user sees is up to date
 ;; even if the dispatcher client mode has messed with file contents (as in,
index 472c42840af135b7f28c3f1346838a62ed04fef0..a4ce3a2c46c373ea2e75f0353bade918cf5d384d 100644 (file)
@@ -477,8 +477,8 @@ or an empty string if none."
     (`diff-index
      (vc-git-command (current-buffer) 'async files
                      "diff-index" "--relative" "-z" "-M" "HEAD" "--")))
-  (vc-exec-after
-   `(vc-git-after-dir-status-stage ',stage  ',files ',update-function)))
+  (vc-run-delayed
+   (vc-git-after-dir-status-stage stage files update-function)))
 
 (defun vc-git-dir-status (_dir update-function)
   "Return a list of (FILE STATE EXTRA) entries for DIR."
@@ -649,11 +649,18 @@ If toggling on, also insert its message into the buffer."
 It is based on `log-edit-mode', and has Git-specific extensions.")
 
 (defun vc-git-checkin (files _rev comment)
-  (let ((coding-system-for-write vc-git-commits-coding-system))
+  (let* ((file1 (or (car files) default-directory))
+         (root (vc-git-root file1))
+         (default-directory (expand-file-name root))
+         (only (or (cdr files)
+                   (not (equal root (abbreviate-file-name file1)))))
+         (coding-system-for-write vc-git-commits-coding-system))
     (cl-flet ((boolean-arg-fn
                (argument)
                (lambda (value) (when (equal value "yes") (list argument)))))
-      (apply 'vc-git-command nil 0 files
+      ;; When operating on the whole tree, better pass nil than ".", since "."
+      ;; fails when we're committing a merge.
+      (apply 'vc-git-command nil 0 (if only files)
              (nconc (list "commit" "-m")
                     (log-edit-extract-headers
                      `(("Author" . "--author")
@@ -661,7 +668,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
                        ("Amend" . ,(boolean-arg-fn "--amend"))
                        ("Sign-Off" . ,(boolean-arg-fn "--signoff")))
                      comment)
-                    (list "--only" "--"))))))
+                    (if only (list "--only" "--")))))))
 
 (defun vc-git-find-revision (file rev buffer)
   (let* (process-file-side-effects
@@ -680,22 +687,6 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
      nil
      "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))
 
-(defun vc-git-ignore (file &optional directory remove)
-  "Ignore FILE under Git.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
-  (let (gitignore)
-    (if directory
-       (setq gitignore (vc-git-find-ignore-file directory))
-      (setq gitignore (vc-git-find-ignore-file default-directory)))
-    (if remove
-       (vc--remove-regexp file gitignore)
-      (vc--add-line file gitignore))))
-
-(defun vc-git-ignore-completion-table (file)
-  "Return the list of ignored files."
-  (vc--read-lines (vc-git-find-ignore-file file)))
-
 (defun vc-git-find-ignore-file (file)
   "Return the root directory of the repository of FILE."
   (expand-file-name ".gitignore"
@@ -735,7 +726,7 @@ for the Git command to run."
            command     (cadr args)
            args        (cddr args)))
     (apply 'vc-do-async-command buffer root git-program command args)
-    (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+    (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
     (vc-set-async-update buffer)))
 
 (defun vc-git-merge-branch ()
@@ -755,7 +746,7 @@ This prompts for a branch to merge from."
                           nil t)))
     (apply 'vc-do-async-command buffer root vc-git-program "merge"
           (list merge-source))
-    (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+    (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
     (vc-set-async-update buffer)))
 
 ;;; HISTORY FUNCTIONS
index 68d98a60f98d1a533b8562326ae2fa365a3834bf..ba882a3ec5dc10e28c80045f666bc244a9a142ba 100644 (file)
@@ -459,22 +459,6 @@ REV is ignored."
         (vc-hg-command buffer 0 file "cat" "-r" rev)
       (vc-hg-command buffer 0 file "cat"))))
 
-(defun vc-hg-ignore (file &optional directory remove)
-  "Ignore FILE under Mercurial.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
-  (let (hgignore)
-    (if directory
-       (setq hgignore (vc-hg-find-ignore-file directory))
-      (setq hgignore (vc-hg-find-ignore-file default-directory)))
-    (if remove
-       (vc--remove-regexp file hgignore)
-      (vc--add-line file hgignore))))
-
-(defun vc-hg-ignore-completion-table (file)
-  "Return the list of ignored files."
-  (vc--read-lines (vc-hg-find-ignore-file file)))
-
 (defun vc-hg-find-ignore-file (file)
   "Return the root directory of the repository of FILE."
   (expand-file-name ".hgignore"
@@ -624,13 +608,13 @@ REV is the revision to check out into WORKFILE."
 
 (defun vc-hg-dir-status (dir update-function)
   (vc-hg-command (current-buffer) 'async dir "status" "-C")
-  (vc-exec-after
-   `(vc-hg-after-dir-status (quote ,update-function))))
+  (vc-run-delayed
+   (vc-hg-after-dir-status update-function)))
 
 (defun vc-hg-dir-status-files (dir files _default-state update-function)
   (apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files)
-  (vc-exec-after
-   `(vc-hg-after-dir-status (quote ,update-function))))
+  (vc-run-delayed
+   (vc-hg-after-dir-status update-function)))
 
 (defun vc-hg-dir-extra-header (name &rest commands)
   (concat (propertize name 'face 'font-lock-type-face)
@@ -724,7 +708,8 @@ then attempts to update the working directory."
                args       (cddr args)))
        (apply 'vc-do-async-command buffer root hg-program
               command args)
-        (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+        (with-current-buffer buffer
+          (vc-run-delayed (vc-compilation-mode 'hg)))
        (vc-set-async-update buffer)))))
 
 (defun vc-hg-merge-branch ()
@@ -733,7 +718,7 @@ This runs the command \"hg merge\"."
   (let* ((root (vc-hg-root default-directory))
         (buffer (format "*vc-hg : %s*" (expand-file-name root))))
     (apply 'vc-do-async-command buffer root vc-hg-program '("merge"))
-    (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+    (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
     (vc-set-async-update buffer)))
 
 ;;; Internal functions
index 29996fafe92c26c825456059cefcf70a904e5ace..56536a26b41fb0aa1837c8ddd8379d5769af91c7 100644 (file)
@@ -128,8 +128,8 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
 
 (defun vc-mtn-dir-status (dir update-function)
   (vc-mtn-command (current-buffer) 'async dir "status")
-  (vc-exec-after
-   `(vc-mtn-after-dir-status (quote ,update-function))))
+  (vc-run-delayed
+   (vc-mtn-after-dir-status update-function)))
 
 (defun vc-mtn-working-revision (file)
   ;; If `mtn' fails or returns status>0, or if the search fails, just
index e85494b21561f77aff41eee43e6d4bcf69be5bca..ef1ae8294b2100b59a9fe52d09b487bb730cea09 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-rcs.el --- support for RCS version-control
+;;; vc-rcs.el --- support for RCS version-control  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
 
@@ -520,7 +520,7 @@ expanded to all registered subfiles in them."
                         ;; No, it was some other error: re-signal it.
                         (signal (car err) (cdr err)))))))))
 
-(defun vc-rcs-revert (file &optional contents-done)
+(defun vc-rcs-revert (file &optional _contents-done)
   "Revert FILE to the version it was based on.  If FILE is a directory,
 revert all registered files beneath it."
   (if (file-directory-p file)
@@ -571,8 +571,8 @@ directory the operation is applied to all registered files beneath it."
     (when (looking-at "[\b\t\n\v\f\r ]+")
       (delete-char (- (match-end 0) (match-beginning 0))))))
 
-(defun vc-rcs-print-log (files buffer &optional shortlog
-                               start-revision-ignored limit)
+(defun vc-rcs-print-log (files buffer &optional _shortlog
+                               _start-revision-ignored limit)
   "Print commit log associated with FILES into specified BUFFER.
 Remaining arguments are ignored.
 If FILE is a directory the operation is applied to all registered
@@ -853,7 +853,7 @@ systime, or nil if there is none.  Also, reposition point."
   (string-match "[0-9]+\\'" rev)
   (substring rev (match-beginning 0) (match-end 0)))
 
-(defun vc-rcs-previous-revision (file rev)
+(defun vc-rcs-previous-revision (_file rev)
   "Return the revision number immediately preceding REV for FILE,
 or nil if there is no previous revision.  This default
 implementation works for MAJOR.MINOR-style revision numbers as
@@ -1440,8 +1440,8 @@ The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension."
               ;; only the former since it behaves identically to the
               ;; latter in the absence of "@@".)
               sub)
-          (cl-flet ((incg (beg end)
-                          (let ((b beg) (e end) @-holes)
+          (cl-flet ((incg (_beg end)
+                          (let ((e end) @-holes)
                             (while (and asc (< (car asc) e))
                               (push (pop asc) @-holes))
                             ;; Self-deprecate when work is done.
index 7bce1ea3ba6f5ebc0f7d05e7b8120da509879b62..e00d55218c8cf937c7dc173ab05338d52f7485db 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-sccs.el --- support for SCCS version-control
+;;; vc-sccs.el --- support for SCCS version-control  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
 
@@ -101,7 +101,7 @@ For a description of possible values, see `vc-check-master-templates'."
 ;;; Properties of the backend
 
 (defun vc-sccs-revision-granularity () 'file)
-(defun vc-sccs-checkout-model (files) 'locking)
+(defun vc-sccs-checkout-model (_files) 'locking)
 
 ;;;
 ;;; State-querying functions
@@ -321,7 +321,7 @@ are expanded to all version-controlled subfiles."
                                 (vc-name file) (concat "-r" discard))
            (vc-sccs-do-command nil 0 "get" (vc-name file) nil))))
 
-(defun vc-sccs-revert (file &optional contents-done)
+(defun vc-sccs-revert (file &optional _contents-done)
   "Revert FILE to the version it was based on. If FILE is a directory,
 revert all subfiles."
   (if (file-directory-p file)
@@ -353,7 +353,7 @@ revert all subfiles."
 ;;; History functions
 ;;;
 
-(defun vc-sccs-print-log (files buffer &optional shortlog start-revision-ignored limit)
+(defun vc-sccs-print-log (files buffer &optional _shortlog _start-revision-ignored limit)
   "Print commit log associated with FILES into specified BUFFER.
 Remaining arguments are ignored."
   (setq files (vc-expand-dirs files))
@@ -363,6 +363,8 @@ Remaining arguments are ignored."
 (autoload 'vc-setup-buffer "vc-dispatcher")
 (autoload 'vc-delistify "vc-dispatcher")
 
+(defvar w32-quote-process-args)
+
 ;; FIXME use sccsdiff if present?
 (defun vc-sccs-diff (files &optional oldvers newvers buffer)
   "Get a difference report using SCCS between two filesets."
index 0e020614fd2a0afa065c5799e050ea018973fa6f..afc76c0974261a0a2c52f535575a79c33cb40d9b 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-svn.el --- non-resident support for Subversion version-control
+;;; vc-svn.el --- non-resident support for Subversion version-control  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
 
@@ -115,7 +115,7 @@ If you want to force an empty list of arguments, use t."
 ;;; Properties of the backend
 
 (defun vc-svn-revision-granularity () 'repository)
-(defun vc-svn-checkout-model (files) 'implicit)
+(defun vc-svn-checkout-model (_files) 'implicit)
 
 ;;;
 ;;; State-querying functions
@@ -231,13 +231,13 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
         (remote (or t (not local) (eq local 'only-file))))
     (vc-svn-command (current-buffer) 'async nil "status"
                    (if remote "-u"))
-  (vc-exec-after
-     `(vc-svn-after-dir-status (quote ,callback) ,remote))))
+  (vc-run-delayed
+   (vc-svn-after-dir-status callback remote))))
 
-(defun vc-svn-dir-status-files (dir files default-state callback)
+(defun vc-svn-dir-status-files (dir files _default-state callback)
   (apply 'vc-svn-command (current-buffer) 'async nil "status" files)
-  (vc-exec-after
-   `(vc-svn-after-dir-status (quote ,callback))))
+  (vc-run-delayed
+   (vc-svn-after-dir-status callback)))
 
 (defun vc-svn-dir-extra-headers (dir)
   "Generate extra status headers for a Subversion working copy."
@@ -268,7 +268,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
 ;; vc-svn-mode-line-string doesn't exist because the default implementation
 ;; works just fine.
 
-(defun vc-svn-previous-revision (file rev)
+(defun vc-svn-previous-revision (_file rev)
   (let ((newrev (1- (string-to-number rev))))
     (when (< 0 newrev)
       (number-to-string newrev))))
@@ -298,7 +298,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-svn-register (files &optional rev comment)
+(defun vc-svn-register (files &optional _rev _comment)
   "Register FILES into the SVN version-control system.
 The COMMENT argument is ignored  This does an add but not a commit.
 Passes either `vc-svn-register-switches' or `vc-register-switches'
@@ -314,7 +314,7 @@ to the SVN command."
   "Return non-nil if FILE could be registered in SVN.
 This is only possible if SVN is responsible for FILE's directory.")
 
-(defun vc-svn-checkin (files rev comment &optional extra-args-ignored)
+(defun vc-svn-checkin (files rev comment &optional _extra-args-ignored)
   "SVN-specific version of `vc-backend-checkin'."
   (if rev (error "Committing to a specific revision is unsupported in SVN"))
   (let ((status (apply
@@ -354,11 +354,10 @@ This is only possible if SVN is responsible for FILE's directory.")
 
 (defun vc-svn-ignore (file &optional directory remove)
   "Ignore FILE under Subversion.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
+FILE is a file wildcard, relative to the root directory of DIRECTORY."
   (vc-svn-command t 0 file "propedit" "svn:ignore"))
 
-(defun vc-svn-ignore-completion-table (file)
+(defun vc-svn-ignore-completion-table (_file)
   "Return the list of ignored files."
   )
 
@@ -369,7 +368,7 @@ DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
   (vc-mode-line file 'SVN)
   (message "Checking out %s...done" file))
 
-(defun vc-svn-update (file editable rev switches)
+(defun vc-svn-update (file _editable rev switches)
   (if (and (file-exists-p file) (not rev))
       ;; If no revision was specified, there's nothing to do.
       nil
@@ -458,7 +457,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
             (error "Couldn't analyze svn update result")))
       (message "Merging changes into %s...done" file))))
 
-(defun vc-svn-modify-change-comment (files rev comment)
+(defun vc-svn-modify-change-comment (_files rev comment)
   "Modify the change comments for a specified REV.
 You must have ssh access to the repository host, and the directory Emacs
 uses locally for temp files must also be writable by you on that host.
@@ -510,7 +509,7 @@ or svn+ssh://."
 
 (autoload 'vc-setup-buffer "vc-dispatcher")
 
-(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit)
+(defun vc-svn-print-log (files buffer &optional _shortlog start-revision limit)
   "Print commit log associated with FILES into specified BUFFER.
 SHORTLOG is ignored.
 If START-REVISION is non-nil, it is the newest revision to show.
index 35e91e7e059e5323421cd51a4ddff533f0a0b915..39e3fbdc29a44502331de53befa2888e5e432078 100644 (file)
 ;;   This function is used in `vc-stay-local-p' which backends can use
 ;;   for their convenience.
 ;;
-;; - ignore (file &optional remove)
+;; - ignore (file &optional directory)
 ;;
-;;   Ignore FILE under the current VCS.  When called interactively and
-;;   with a prefix argument, remove an ignored file.  When called from
-;;   Lisp code, if REMOVE is non-nil, remove FILE from ignored files."
+;;   Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+;;   FILE is a file wildcard.
+;;   When called interactively and with a prefix argument, remove FILE
+;;   from ignored files.
+;;   When called from Lisp code, if DIRECTORY is non-nil, the
+;;   repository to use will be deduced by DIRECTORY.
 ;;
 ;; - ignore-completion-table
 ;;
@@ -1342,33 +1345,44 @@ first backend that could register the file is used."
   (let ((vc-handled-backends (list backend)))
     (call-interactively 'vc-register)))
 
-(defun vc-ignore (file &optional directory remove)
+(defun vc-ignore (file &optional directory)
   "Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+FILE is a file wildcard.
 When called interactively and with a prefix argument, remove FILE
 from ignored files.
 When called from Lisp code, if DIRECTORY is non-nil, the
-repository to use will be deduced by DIRECTORY; if REMOVE is
-non-nil, remove FILE from ignored files."
+repository to use will be deduced by DIRECTORY."
   (interactive
-   (if (null current-prefix-arg)
-       (list (read-file-name "The file to ignore: "))
-     (list
-      (completing-read
-       "The file to remove: "
-       (vc-call-backend
-       (vc-backend default-directory)
-       'ignore-completion-table default-directory)))))
-  (let (backend)
-    (if directory
-       (progn (setq backend (vc-backend default-directory))
-              (vc-call-backend backend 'ignore file directory remove))
-      (setq backend (vc-backend directory))
-      (vc-call-backend backend 'ignore file default-directory remove))))
-
-(defun vc-default-ignore-completion-table (_file)
-  "Return the list of ignored files."
-  ;; Unused lexical argument `file'
-  nil)
+   (list (read-file-name "The file to ignore: ")
+        (completing-read
+         "The file to remove: "
+         (vc-call-backend
+          (vc-backend default-directory)
+          'ignore-completion-table default-directory))))
+  (let* ((directory (or directory default-directory))
+        (backend (vc-backend default-directory))
+        (remove current-prefix-arg))
+    (vc-call-backend backend 'ignore file directory remove)))
+
+(defun vc-default-ignore (backend file &optional directory remove)
+  "Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+FILE is a file wildcard, relative to the root directory of DIRECTORY.
+When called from Lisp code, if DIRECTORY is non-nil, the
+repository to use will be deduced by DIRECTORY; if REMOVE is
+non-nil, remove FILE from ignored files.
+Argument BACKEND is the backend you are using."
+  (let ((ignore
+        (vc-call-backend backend 'find-ignore-file (or directory default-directory)))
+       (pattern (file-relative-name
+                 (expand-file-name file) (file-name-directory file))))
+    (if remove
+       (vc--remove-regexp pattern ignore)
+      (vc--add-line pattern ignore))))
+
+(defun vc-default-ignore-completion-table (backend file)
+  "Return the list of ignored files under BACKEND."
+  (vc--read-lines
+   (vc-call-backend backend 'find-ignore-file file)))
 
 (defun vc--read-lines (file)
   "Return a list of lines of FILE."
@@ -1522,11 +1536,11 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
 ;;   (vc-file-tree-walk
 ;;    default-directory
 ;;    (lambda (f)
-;;      (vc-exec-after
-;;       `(let ((coding-system-for-read (vc-coding-system-for-diff ',f)))
-;;          (message "Looking at %s" ',f)
-;;          (vc-call-backend ',(vc-backend f)
-;;                           'diff (list ',f) ',rev1 ',rev2))))))
+;;      (vc-run-delayed
+;;       (let ((coding-system-for-read (vc-coding-system-for-diff f)))
+;;          (message "Looking at %s" f)
+;;          (vc-call-backend (vc-backend f)
+;;                           'diff (list f) rev1 rev2))))))
 
 (defvar vc-coding-system-inherit-eol t
   "When non-nil, inherit the EOL format for reading Diff output from the file.
@@ -1664,8 +1678,8 @@ Return t if the buffer had changes, nil otherwise."
     (diff-mode)
     (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
     (set (make-local-variable 'revert-buffer-function)
-        `(lambda (ignore-auto noconfirm)
-           (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
+        (lambda (_ignore-auto _noconfirm)
+           (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
     ;; Make the *vc-diff* buffer read only, the diff-mode key
     ;; bindings are nicer for read only buffers. pcl-cvs does the
     ;; same thing.
@@ -1681,8 +1695,8 @@ Return t if the buffer had changes, nil otherwise."
       ;; The diff process may finish early, so call `vc-diff-finish'
       ;; after `pop-to-buffer'; the former assumes the diff buffer is
       ;; shown in some window.
-      (vc-exec-after `(vc-diff-finish ,(current-buffer)
-                                     ',(when verbose messages)))
+      (let ((buf (current-buffer)))
+        (vc-run-delayed (vc-diff-finish buf (when verbose messages))))
       ;; In the async case, we return t even if there are no differences
       ;; because we don't know that yet.
       t)))
@@ -2216,6 +2230,7 @@ earlier revisions.  Show up to LIMIT entries (non-nil means unlimited)."
 (defvar vc-log-view-type nil
   "Set this to differentiate the different types of logs.")
 (put 'vc-log-view-type 'permanent-local t)
+(defvar vc-sentinel-movepoint)
 
 (defun vc-log-internal-common (backend
                               buffer-name
@@ -2238,13 +2253,13 @@ earlier revisions.  Show up to LIMIT entries (non-nil means unlimited)."
       (set (make-local-variable 'log-view-vc-fileset) files)
       (set (make-local-variable 'revert-buffer-function)
           rev-buff-func))
-    (vc-exec-after
-     `(let ((inhibit-read-only t))
-       (funcall ',setup-buttons-func ',backend ',files ',retval)
-       (shrink-window-if-larger-than-buffer)
-       (funcall ',goto-location-func ',backend)
-       (setq vc-sentinel-movepoint (point))
-       (set-buffer-modified-p nil)))))
+    (vc-run-delayed
+     (let ((inhibit-read-only t))
+       (funcall setup-buttons-func backend files retval)
+       (shrink-window-if-larger-than-buffer)
+       (funcall goto-location-func backend)
+       (setq vc-sentinel-movepoint (point))
+       (set-buffer-modified-p nil)))))
 
 (defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
   (vc-log-internal-common
index a9e424ac4b312b58f66175c6e95aeff7b5cb48cf..5a1018f85e5f9c7cad8417a2a564a783e83b33f6 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Makefile improvements.
+       * Makefile.in (all): Put this first.  Don't use double-colon
+       rules, as they are not portable according to POSIX.  Mark as phony.
+
 2013-06-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix minor problems found by static checking.
index f228221c45dad202983f212f9ca3966e475c3471..40f4a405e97027cd16faf4989f050588c66239ea 100644 (file)
@@ -59,11 +59,12 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
   -Demacs -I../src \
   -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
 
+all: liblw.a
+.PHONY: all
+
 .c.o:
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
 
-all:: liblw.a
-
 liblw.a: $(OBJS)
        rm -f $@
        $(AR) $(ARFLAGS) $@ $(OBJS)
index ed53f933de386487547c6dc9891e2d2db2056e9b..513664c86e89b9be6fd364659e5ec4940000bb7d 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -404,7 +404,7 @@ echo "Making links to \`nt'"
  ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt
  ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
  ln Makefile.in gnulib.mk ../${tempdir}/nt
- ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.MSYS ../${tempdir}/nt
+ ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
  ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt)
 
 echo "Making links to \`nt/inc' and its subdirectories"
index d76d832555c093ffa05bea2417b34eba39ef3658..42086ec10075ca2746e4debc425171463aa0826b 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * Makefile.in (${ns_check_file}): Add so Emacs.app gets properly
+       updated when doing parallel make install.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-06-02  Jan Djärv  <jan.h.d@swipnet.se>
 
        * templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument.
index feeafc0d694e0f6695d83283b57d9bf0c4206247..3d80ddb7ad2598782fff5d431b86155c2046c773 100644 (file)
@@ -20,7 +20,7 @@
 ### Commentary:
 
 ### Code:
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 srcdir = @srcdir@
 EXEEXT = @EXEEXT@
@@ -31,8 +31,9 @@ MKDIR_P = @MKDIR_P@
 ns_appdir = @ns_appdir@
 ns_appbindir = @ns_appbindir@
 ns_appsrc = @ns_appsrc@
+ns_check_file = @ns_appdir@/@ns_check_file@
 
-${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
+${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
        rm -rf ${ns_appdir}
        ${MKDIR_P} ${ns_appdir}
        ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
@@ -42,7 +43,7 @@ ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
            ( cd ${ns_appdir} ; umask 022; tar xf - )
        touch ${ns_appdir}
 
-${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT}
+${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
        ${MKDIR_P} ${ns_appbindir}
        cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs
 
index ebc823071a355d9c7a48daed80d3bde43f445b32..e7d9ed99e3c9cf3923df6f932a08ece03f5bbb5d 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-31  Glenn Morris  <rgm@gnu.org>
+
+       * INSTALL: Rename from INSTALL.MSYS.
+       * INSTALL.OLD: Rename from INSTALL.
+       * configure.bat: Update for INSTALL name changes.
+
 2013-08-25  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 
        * configure.bat: Rather than disabling, make configure.bat produce
index 594ff9ff7526d4814b3c109f282b59e8e799c1c6..be36014e3b22909cb7da0f69c819042e2abcd851 100644 (file)
-                   Building and Installing Emacs on Windows
-                          (from 95 to 7 and beyond)
+                   Building and Installing Emacs on MS-Windows
+                          using the MSYS and MinGW tools
 
-  Copyright (C) 2001-2013 Free Software Foundation, Inc.
+  Copyright (C) 2013 Free Software Foundation, Inc.
   See the end of the file for license conditions.
 
-*** This method of building Emacs is no longer supported. ***
-    Instead, see INSTALL.MSYS.
+The MSYS/MinGW build described here is supported on versions of
+Windows starting with Windows 2000 and newer.  Windows 9X are not
+supported (but the Emacs binary produced by this build will run on
+Windows 9X as well).
 
-* For the impatient
+* For the brave (a.k.a. "impatient"):
 
-  Here are the concise instructions for configuring and building the
-  native Windows binary of Emacs, for those who want to skip the
-  complex explanations and ``just do it'':
+  For those who have a working MSYS/MinGW development environment and
+  are comfortable with running Posix configure scripts, here are the
+  concise instructions for configuring and building the native Windows
+  binary of Emacs with these tools.
 
-  Do not use this recipe with Cygwin.  For building on Cygwin,
-  use the normal installation instructions, ../INSTALL.
+  Do not use this recipe with Cygwin.  For building on Cygwin, use the
+  normal installation instructions, ../INSTALL.
 
-  Do not use these instructions with MSYS environment.  For building
-  the native Windows binary with MinGW and MSYS, follow the
-  instructions in the file INSTALL.MSYS in this directory.
+  0. Start the MSYS Bash window.  Everything else below is done from
+     that window's Bash prompt.
 
-  For building without MSYS, if you have a Cygwin or MSYS port of Bash
-  on your Path, you will be better off removing it from PATH.  (For
-  details, search for "MSYS sh.exe" below.)
+  0a. If you are building from the development trunk (as opposed to a
+      release tarball), produce the configure script, by typing from
+      the top-level Emacs source directory:
 
-  1. Change to the `nt' directory (the directory of this file):
+      ./autogen.sh
 
-       cd nt
+  1. If you want to build Emacs outside of the source tree
+     (recommended), create the build directory and chdir there.
 
-  2. Run configure.bat.
+  2. Invoke the MSYS-specific configure script:
 
-  2a.If you use MSVC, set up the build environment by running the
-     SetEnv.cmd batch file from the appropriate SDK directory.  (Skip
-     this step if you are using MinGW.)  For example:
+      - If you are building outside the source tree:
 
-       "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug
+        /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
 
-      if you are going to compile a debug version, or
+      - If you are building in-place, i.e. inside the source tree:
 
-       "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
+        ./nt/msysconfig.sh --prefix=PREFIX ...
 
-      if you are going to compile an optimized version.
+     It is always preferable to use --prefix to configure Emacs for
+     some specific location of its installed tree; the default
+     /usr/local is not suitable for Windows (see the detailed
+     instructions for the reasons).
 
-  2b.From the COMMAND.COM/CMD.EXE command prompt type:
+     You can pass other options to the configure script.  Here's a
+     typical example (for an in-place debug build):
 
-       configure
+       CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
 
-     From a Unixy shell prompt:
+  3. After the configure script finishes, it should display the
+     resulting configuration.  After that, type
 
-       cmd /c configure.bat
-     or
-       command.com /c configure.bat
+       make
 
-  3. Run the Make utility suitable for your environment.  If you build
-     with the Microsoft's Visual C compiler:
+     Use "make -j N" if your MSYS Make supports parallel execution;
+     the build will take significantly less time in that case.  Here N
+     is the number of simultaneous parallel jobs; use the number of
+     the cores on your system.
 
-       nmake
+  4. Install the produced binaries:
 
-     For the development environments based on GNU GCC (MinGW, MSYS,
-     Cygwin - but see notes about Cygwin make below), depending on how
-     Make is called, it could be:
+       make install
 
-       make
-     or
-       mingw32-make
-     or
-       gnumake
-     or
-       gmake
+     If you want the installation tree to go to a place that is
+     different from the one specified by --prefix, say
 
-     (If you are building from Bazaar, say "make bootstrap" or "nmake
-     bootstrap" instead, and avoid using Cygwin make.)
+       make install prefix=/where/ever/you/want
 
-     With GNU Make, you can use the -j command-line option to have
-     Make execute several commands at once, like this:
+  That's it!
 
-       gmake -j 2
+  If these short instructions somehow fail, read the rest of this
+  file.
 
-     (With versions of GNU Make before 3.82, you need also set the
-     XMFLAGS variable, like this:
+* Installing MinGW and MSYS
 
-       gmake -j 2 XMFLAGS="-j 2"
+  Make sure you carefully read the following two sections in their
+  entirety and install/configure the various packages as instructed.
+  A correct installation makes all the rest almost trivial; a botched
+  installation will likely make you miserable for quite some time.
 
-     The XMFLAGS variable overrides the default behavior of version
-     3.82 and older of GNU Make on Windows, whereby recursive Make
-     invocations reset the maximum number of simultaneous commands to
-     1.  The above command allows up to 4 simultaneous commands at
-     once in the top-level Make, and up to 3 in each one of the
-     recursive Make's.)
+  There are two alternative to installing MinGW + MSYS: using the GUI
+  installer, called mingw-get, provided by the MinGW project, or
+  manual installation.  The next two sections describe each one of
+  these.
 
-  4. Generate the Info manuals (only if you are building out of Bazaar,
-     and if you have makeinfo.exe installed):
+** Installing MinGW and MSYS using mingw-get
 
-     make info
+  A nice installer, called mingw-get, is available for those who don't
+  like to mess with manual installations.  You can download it from
+  here:
 
-     (change "make" to "nmake" if you use MSVC).
+    https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
 
-  5. Install the produced binaries:
+  (This installer only supports packages downloaded from the MinGW
+  site; for the rest you will still need the manual method.)
 
-     make install
+  After installing mingw-get, invoke it to install the packages that
+  are already selected by default on the "Select Components" screen of
+  its wizard.
 
-  That's it!
+  After that, use "mingw-get install PACKAGE" to install the following
+  additional packages:
 
-  If these short instructions somehow fail, read the rest of this
-  file.
+   . msys-base
+   . mingw-developer-toolkit
 
-* Preliminaries
+  (We recommend that you refrain from installing the MSYS Texinfo
+  package, which is part of msys-base, because it might produce mixed
+  EOL format when installing Info files.  Instead, install the MinGW
+  port of Texinfo, see the ezwinports URL below.  To uninstall the
+  MSYS Texinfo, after installing it as part of msys-base, invoke the
+  command "mingw-get remove msys-texinfo".)
 
-  If you want to build a Cygwin port of Emacs, use the instructions in
-  the INSTALL file in the main Emacs directory (the parent of this
-  directory).  These instructions are for building a native Windows
-  binary of Emacs.
+  At this point, you should be ready to configure and build Emacs in
+  its basic configuration.  Skip to the "Generating the configure
+  script" section for the build instructions.  If you want to build it
+  with image support and other optional libraries, read about the
+  optional libraries near the end of this document, before you start
+  the build.  Also, consider installing additional MinGW packages that
+  are required/recommended, especially if you are building from the
+  Bazaar repository, as described in the next section.
 
-  If you used WinZip to unpack the distribution, we suggest to
-  remove the files and unpack again with a different program!
-  WinZip is known to create some subtle and hard to debug problems,
-  such as converting files to DOS CR-LF format, not creating empty
-  directories, etc.  We suggest to use djtarnt.exe from the GNU FTP
-  site.  For modern formats, such as .tar.xz, we suggest bsdtar.exe
-  from the libarchive package; its precompiled Windows binaries are
-  available from this site:
+** Installing MinGW and MSYS manually
+
+*** MinGW
+
+  You will need to install the MinGW port of GCC and Binutils, and the
+  MinGW runtime and Windows API distributions, to compile Emacs.  You
+  can find these on the MinGW download/Base page:
+
+    https://sourceforge.net/projects/mingw/files/MinGW/Base/
+
+  In general, install the latest stable versions of the following
+  MinGW packages from that page: gcc, binutils, mingw-rt, w32api.  You
+  only need the 'bin' and the 'dll' tarballs of each of the above.
+
+  MinGW packages are distributed as .tar.lzma compressed archives.  To
+  install the packages manually, we recommend to use the Windows port
+  of the 'bsdtar' program to unpack the tarballs.  'bsdtar' is
+  available as part of the 'libarchive' package from here:
 
     http://sourceforge.net/projects/ezwinports/files/
 
-  In addition to this file, if you build a development snapshot, you
-  should also read INSTALL.BZR in the parent directory.
-
-* Supported development environments
-
-  To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
-  later and nmake, or a Windows port of GCC 2.95 or later with MinGW
-  and Windows API support and a port of GNU Make.  You can use the Cygwin
-  ports of GCC, but Emacs requires the MinGW headers and libraries to
-  build (latest versions of the Cygwin toolkit, at least since v1.3.3,
-  include the MinGW headers and libraries as an integral part).
-
-  The rest of this file assumes you have a working development
-  environment.  If you just installed such an environment, try
-  building a trivial C "Hello world" program, and see if it works.  If
-  it doesn't work, resolve that problem first!  If you use Microsoft
-  Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
-  file from the `Bin' subdirectory of the directory where you have
-  installed VS.NET.  With other versions of MSVC, run the SetEnv.cmd
-  batch file from the `Bin' subdirectory of the directory where you
-  have the SDK installed.
-
-  If you use the MinGW port of GCC and GNU Make to build Emacs, there
-  are some compatibility issues wrt Make and the shell that is run by
-  Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
-  or sh.exe, a port of a Unixy shell.  For reference, below is a list
-  of which builds of GNU Make are known to work or not, and whether
-  they work in the presence and/or absence of sh.exe, the Cygwin port
-  of Bash.  Note that any version of Make that is compiled with Cygwin
-  will only work with Cygwin tools, due to the use of Cygwin style
-  paths.  This means Cygwin Make is unsuitable for building parts of
-  Emacs that need to invoke Emacs itself (leim and "make bootstrap",
-  for example).  Also see the Trouble-shooting section below if you
-  decide to go ahead and use Cygwin make.
-
-  In addition, using 4NT or TCC as your shell is known to fail the
-  build process, at least since 4NT version 3.01.  Use CMD.EXE, the
-  default Windows shell, instead.  MSYS sh.exe also appears to cause
-  various problems, e.g., it is known to cause failures in commands
-  like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a
-  Unix-style file name that needs conversion to the Windows format.
-  If you have MSYS installed, try "make SHELL=cmd.exe" to force the
-  use of cmd.exe instead of the MSYS sh.exe.
-
-                                         sh exists     no sh
-
-    cygwin b20.1 make (3.75):            fails[1, 5]   fails[2, 5]
-    MSVC compiled gmake 3.77:            okay          okay
-    MSVC compiled gmake 3.78.1:          okay          okay
-    MSVC compiled gmake 3.79.1:          okay          okay
-    mingw32/gcc-2.92.2 make (3.77):      okay          okay[4]
-    cygwin compiled gmake 3.77:          fails[1, 5]   fails[2, 5]
-    cygwin compiled make 3.78.1:         fails[5]      fails[2, 5]
-    cygwin compiled make 3.79.1:         fails[3, 5]   fails[2?, 5]
-    cygwin compiled make 3.80:           okay[6]       fails?[7]
-    cygwin compiled make 3.81:           fails         fails?[7]
-    mingw32 compiled make 3.79.1:        okay          okay
-    mingw32 compiled make 3.80:          okay          okay[7]
-    mingw32 compiled make 3.81:          okay          okay[8]
-
-  Notes:
-
-    [1] doesn't cope with makefiles with DOS line endings, so must mount
-        emacs source with text!=binary.
-    [2] fails when needs to invoke shell commands; okay invoking gcc etc.
-    [3] requires LC_MESSAGES support to build; cannot build with early
-        versions of Cygwin.
-    [4] may fail on Windows 9X and Windows ME; if so, install Bash.
-    [5] fails when building leim due to the use of cygwin style paths.
-        May work if building emacs without leim.
-    [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
-       (look for "cygpath" near line 85 of gmake.defs).
-    [7] not recommended; please report if you try this combination.
-    [8] tested only on Windows XP.
-
-  Other compilers may work, but specific reports from people that have
-  tried suggest that the Intel C compiler (for example) may produce an
-  Emacs executable with strange filename completion behavior.  Unless
-  you would like to assist by finding and fixing the cause of any bugs
-  like this, we recommend the use of the supported compilers mentioned
-  in the previous paragraph.
-
-  You will also need a copy of the POSIX cp, rm and mv programs.  These
-  and other useful POSIX utilities can be obtained from one of several
-  projects:
-
-  * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
-  * http://www.mingw.org/                         ( MinGW    )
-  * http://www.cygwin.com/                        ( Cygwin   )
-  * http://unxutils.sourceforge.net/              ( UnxUtils )
-
-  If you build Emacs on 16-bit versions of Windows (9X or ME), we
-  suggest to install the Cygwin port of Bash.  That is because the
-  native Windows shell COMMAND.COM is too limited; the Emacs build
-  procedure tries very hard to support even such limited shells, but
-  as none of the Windows developers of Emacs work on Windows 9X, we
-  cannot guarantee that it works without a more powerful shell.
-
-  Additional instructions and help for building Emacs on Windows can be
-  found at the Emacs Wiki:
-
-    http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
-
-  and on these URLs:
-
-    http://ourcomments.org/Emacs/w32-build-emacs.html
-    http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
-
-  Both of those pages were written before Emacs switched from CVS to
-  Bazaar, but the parts about building Emacs still apply in Bazaar.
-  The second URL has instructions for building with MSVC, as well as
-  with MinGW, while the first URL covers only MinGW, but has more
-  details about it.
-
-* Configuring
-
-  Configuration of Emacs is now handled by running configure.bat in the
-  `nt' subdirectory.  It will detect which compiler you have available,
-  and generate makefiles accordingly.  You can override the compiler
-  detection, and control optimization and debug settings, by specifying
-  options on the command line when invoking configure.
-
-  To configure Emacs to build with GCC or MSVC, whichever is available,
-  simply change to the `nt' subdirectory and run `configure.bat' with no
-  options.  To see what options are available, run `configure --help'.
-  Do NOT use the --no-debug option to configure.bat unless you are
-  absolutely sure the produced binaries will never need to be run under
-  a debugger.
-
-  Because of limitations of the stock Windows command shells, special
-  care is needed to pass some characters in the arguments of the
-  --cflags and --ldflags options.  Backslashes should not be used in
-  file names passed to the compiler and linker via these options.  Use
-  forward slashes instead.  If the arguments to these two options
-  include the `=' character, like when passing a -DFOO=bar preprocessor
-  option, the argument with the `=' character should be enclosed in
-  quotes, like this:
-
-    configure --cflags "-DFOO=bar"
-
-  Support for options that include the `=' character require "command
-  extensions" to be enabled.  (They are enabled by default, but your
-  system administrator could have changed that.  See "cmd /?" for
-  details.)  If command extensions are disabled, a warning message might
-  be displayed informing you that "using parameters that include the =
-  character by enclosing them in quotes will not be supported."
-
-  You may also use the --cflags and --ldflags options to pass
-  additional parameters to the compiler and linker, respectively; they
-  are frequently used to pass -I and -L flags to specify supplementary
-  include and library directories.  If a directory name includes
-  spaces, you will need to enclose it in quotes, as follows
-  -I"C:/Program Files/GnuTLS-2.10.1/include".  Note that only the
-  directory name is enclosed in quotes, not the entire argument.  Also
-  note that this functionality is only supported if command extensions
-  are available.  If command extensions are disabled and you attempt to
-  use this functionality you may see the following warning message
-  "Error in --cflags argument: ... Backslashes and quotes cannot be
-  used with --cflags.  Please use forward slashes for filenames and
-  paths (e.g. when passing directories to -I)."
-
-  N.B.  It is normal to see a few error messages output while configure
-  is running, when gcc support is being tested.  These cannot be
-  suppressed because of limitations in the Windows 9X command.com shell.
-
-  You are encouraged to look at the file config.log which shows details
-  for failed tests, after configure.bat finishes.  Any unexplained failure
-  should be investigated and perhaps reported as a bug (see the section
-  about reporting bugs in the file README in this directory and in the
-  Emacs manual).
+  The recommended place to install these packages is a single tree
+  starting from some directory on a drive other than the system drive
+  C:.  A typical example would be D:\usr, with D:\usr\bin holding the
+  binaries and DLLs (should be added to your Path environment
+  variable), D:\usr\include holding the include files, D:\usr\lib
+  holding the static and import libraries, D:\usr\share holding docs,
+  message catalogs, and package-specific subdirectories, etc.
+
+  Having all the headers and libraries in a single place will greatly
+  reduce the number of -I and -L flags you will have to pass to the
+  configure script (see below), as these files will be right where the
+  compiler expects them.
+
+  We specifically do NOT recommend installing packages below
+  "C:\Program Files" or "C:\Program Files (x86)".  These directories
+  are protected on versions of Windows from Vista and on, and you will
+  have difficulties updating and maintaining your installation later,
+  due to UAC elevation prompts, file virtualization, etc.  You *have*
+  been warned!
+
+  Additional MinGW packages are required/recommended, especially if
+  you are building from the Bazaar repository:
+
+   . Texinfo (needed to produce the Info manuals when building from
+     bzr, and for "make install")
+
+     Available from http://sourceforge.net/projects/ezwinports/files/.
+
+   . gzip (needed to compress files during "make install")
+
+     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
+
+   . pkg-config (needed for building with some optional libraries,
+     such as GnuTLS and libxml2)
+
+     Available from http://www.gtk.org/download/win32.php
+
+  Each package might list other packages as prerequisites on its
+  download page (under "Runtime requirements"); download those as
+  well.  (Using the mingw-get installer will fetch those prerequisites
+  automatically for you.)  A missing prerequisite will manifest itself
+  by the program failing to run and presenting a pop-up dialog that
+  states the missing or incompatible DLL; be sure to find and install
+  these missing DLLs.
+
+  Once you think you have MinGW installed, test the installation by
+  building a trivial "hello, world!" program, and make sure that it
+  builds without any error messages and the binary works when run.
+
+*** MSYS
+
+  You will need a reasonably full MSYS installation.  MSYS is an
+  environment needed to run the Posix configure scripts and the
+  resulting Makefile's, in order to produce native Windows binaries
+  using the MinGW compiler and runtime libraries.  Here's the list of
+  MSYS packages that are required:
+
+   . All the packages from the MSYS Base distribution, listed here:
+
+     https://sourceforge.net/projects/mingw/files/MSYS/Base/
+
+   . Additional packages listed below, from the MSYS Extension
+     distribution here:
+
+     https://sourceforge.net/projects/mingw/files/MSYS/Extension/
+
+      - flex
+      - bison
+      - m4
+      - perl
+      - mktemp
+
+     These should only be needed if you intend to build development
+     versions of Emacs from the Bazaar repository.
+
+   . Additional packages (needed only if building from the Bazaar
+     repository): Automake and Autoconf.  They are available from
+     here:
+
+       http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
+       http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
+
+  MSYS packages are distributed as .tar.lzma compressed archives.  To
+  install the packages manually, we recommend to use the Windows port
+  of the 'bsdtar' program, already mentioned above.
+
+  If/when you are confident in your MinGW/MSYS installation, and want
+  to speed up the builds, we recommend installing a pre-release
+  version of Make from here:
+
+     https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
+
+  These are snapshot builds of many packages, but you only need
+  make.exe from there.  The advantage of this make.exe is that it
+  supports parallel builds, so you can use "make -j N" to considerably
+  speed up your builds.
+
+  Several users reported that MSYS 1.0.18 causes Make to hang in
+  parallel builds.  If you bump into this, we suggest to downgrade to
+  MSYS 1.0.17, which doesn't have that problem.
+
+  For each of these packages, install the 'bin' and 'dll' tarballs of
+  their latest stable releases.  If there's an 'ext' tarball (e.g.,
+  msysCORE and Coreutils have it), download and install those as well.
+
+  Each package might list other packages as prerequisites on its
+  download page (under "Runtime requirements"); download those as
+  well.  (Using the mingw-get installer will fetch those prerequisites
+  automatically for you.)  A missing prerequisite will manifest itself
+  by the program failing to run and presenting a pop-up dialog that
+  states the missing or incompatible DLL; be sure to find and install
+  these missing DLLs.
+
+  MSYS packages should be installed in a separate tree from MinGW.
+  For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
+  from which you unpack all of the MSYS packages.
+
+  Do NOT add the MSYS bin directory to your Windows Path!  Only the
+  MinGW bin directory should be on Path.  When you install MSYS, it
+  creates a shortcut on your desktop that invokes the MSYS Bash shell
+  in a Command Prompt window; that shell is already set up so that the
+  MSYS bin directory is on PATH ahead of any other directory.  Thus,
+  Bash will find MSYS executables first, which is exactly what you
+  need.
+
+  At this point, you are ready to build Emacs in its basic
+  configuration.  If you want to build it with image support and other
+  optional libraries, read about that near the end of this document.
+
+* Generating the configure script
+
+  If you are building a release or pretest tarball, skip this section,
+  because the configure script is already present in the tarball.
+
+  To build a development snapshot from the Emacs Bazaar repository,
+  you will first need to generate the configure script and a few other
+  auto-generated files.  (If this step, described below, somehow
+  fails, you can use the files in the autogen/ directory instead, but
+  they might be outdated, and, most importantly, you are well advised
+  not to disregard any failures in your local build procedures, as
+  these are likely to be symptoms of incorrect installation that will
+  bite you down the road.)
+
+  To generate the configure script, type this at the MSYS Bash prompt
+  from the top-level directory of the Emacs tree:
+
+     ./autogen.sh
+
+  If successful, this command should produce the following output:
+
+     $ ./autogen.sh
+     Checking whether you have the necessary tools...
+     (Read INSTALL.BZR for more details on building Emacs)
+
+     Checking for autoconf (need at least version 2.65)...
+     ok
+     Checking for automake (need at least version 1.11)...
+     ok
+     Your system has the required tools, running autoreconf...
+     You can now run `./configure'.
+
+* Configuring Emacs for MinGW:
+
+  Now it's time to run the configure script.  You can do that either
+  from a separate build directory that is outside of the Emacs source
+  tree (recommended), or from inside the source tree.  The former is
+  recommended because it allows you to have several different builds,
+  e.g., an optimized build and an unoptimized one, of the same
+  revision of the source tree; the source tree will be left in its
+  pristine state, without any build products.
+
+  You invoke the configure script like this:
+
+     /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
+
+  or, if you are building in-place, i.e. inside the source tree:
+
+     ./nt/msysconfig.sh --prefix=PREFIX ...
+
+  Here PREFIX is the place where you eventually want to install Emacs
+  once built, e.g. /d/usr.  We recommend to always use --prefix when
+  building Emacs on Windows, because the default '/usr/local' is not
+  appropriate for Windows: it will be mapped by MSYS to something like
+  C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
+  install programs in a single coherent tree resembling Posix systems.
+  Such a single-tree installation makes sure all the other programs
+  and packages ported from GNU or Unix systems will work seamlessly
+  together.  Where exactly is the root of that tree on your system is
+  something only you, the user who builds Emacs, can know, and the
+  Emacs build process cannot guess, because usually there's no
+  '/usr/local' directory on any drive on Windows systems.
+
+  Do NOT use Windows-style x:/foo/bar file names on the configure
+  script command line; use the MSYS-style /x/foo/bar instead.  Using
+  Windows-style file names was reported to cause subtle and hard to
+  figure out problems during the build.  This applies both to the
+  command switches, such as --prefix=, and to the absolute file name
+  of msysconfig.sh, if you are building outside of the source tree.
+
+  You can pass additional options to the configure script, for the
+  full list type
+
+     ./nt/msysconfig.sh --help
+
+  As explained in the help text, you may need to tell the script what
+  are the optional flags to invoke the compiler.  This is needed if
+  some of your headers and libraries, e.g., those belonging to
+  optional image libraries, are installed in places where the compiler
+  normally doesn't look for them.  (Remember that advice above to
+  avoid such situations? here's is where you will start paying for
+  disregarding that recommendation.)  For example, if you have libpng
+  headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
+  headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
+  something like this:
+
+    CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
+
+  which is quite a mouth-full, especially if you have more directories
+  to specify...  Perhaps you may wish to revisit your installation
+  decisions now.
+
+  If you have a global site-lisp directory from previous Emacs
+  installation, and you want Emacs to continue using it, specify it
+  via the --enable-locallisppath switch to msysconfig.sh, like this:
+
+   ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
+
+  Use the normal MSYS /d/foo/bar style to specify directories by their
+  absolute file names.
+
+  A few frequently used options are needed when you want to produce an
+  unoptimized binary with runtime checks enabled:
+
+     CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
+
+  Once invoked, the configure script will run for some time, and, if
+  successful, will eventually produce a summary of the configuration
+  like this:
+
+     Configured for `i686-pc-mingw32'.
+
+       Where should the build process find the source code?    /path/to/emacs/sources
+       What compiler should emacs be built with?               gcc  -std=gnu99 -O0 -g3
+       Should Emacs use the GNU version of malloc?             yes
+       Should Emacs use a relocating allocator for buffers?    yes
+       Should Emacs use mmap(2) for buffer allocation?         no
+       What window system should Emacs use?                    w32
+       What toolkit should Emacs use?                          none
+       Where do we find X Windows header files?                NONE
+       Where do we find X Windows libraries?                   NONE
+       Does Emacs use -lXaw3d?                                 no
+       Does Emacs use -lXpm?                                   yes
+       Does Emacs use -ljpeg?                                  yes
+       Does Emacs use -ltiff?                                  yes
+       Does Emacs use a gif library?                           yes
+       Does Emacs use -lpng?                                   yes
+       Does Emacs use -lrsvg-2?                                no
+       Does Emacs use imagemagick?                             no
+       Does Emacs use -lgpm?                                   no
+       Does Emacs use -ldbus?                                  no
+       Does Emacs use -lgconf?                                 no
+       Does Emacs use GSettings?                               no
+       Does Emacs use -lselinux?                               no
+       Does Emacs use -lgnutls?                                yes
+       Does Emacs use -lxml2?                                  yes
+       Does Emacs use -lfreetype?                              no
+       Does Emacs use -lm17n-flt?                              no
+       Does Emacs use -lotf?                                   no
+       Does Emacs use -lxft?                                   no
+       Does Emacs use toolkit scroll bars?                     yes
+
+  You are almost there, hang on.
+
+  If the output is significantly different, or if configure finishes
+  prematurely and displays some error message, you should examine the
+  configuration log in config.log and find the reason for the failure.
+
+  Once you succeeded in configuring Emacs, and just want to rebuild it
+  after updating your local repository from the main repository, you
+  don't need to re-run the configure script manually, unless you want
+  to change the configure-time options.  Just typing "make" will
+  re-run configure if necessary with the exact same options you
+  specified originally, and then go on to invoking Make, described
+  below.
+
+* Running Make.
+
+  This is simple: just type "make" and sit back, watching the fun.
+
+  If you  installed a snapshot build  of Make, the build  will be much
+  faster if  you type "make  -j N" instead, where  N is the  number of
+  independent processing  units on your  machine.  E.g., on a  core i7
+  system try using  N of 6 or  even 8.  (If this hangs,  see the notes
+  above about downgrading to MSYS 1.0.17.)
+
+  When Make finishes, you can install the produced binaries:
+
+    make install
+
+  or, if you want the installed tree to go in a place different from
+  the configured one, type
+
+    make install prefix=WHEREVER
+
+  Congrats!  You have built and installed your own Emacs!
+
+* Make targets
+
+  The following make targets may be used by users building the source
+  distribution, or users who have checked out of Bazaar after
+  an initial bootstrapping.
+
+  make
+  Builds Emacs from the available sources and pre-compiled lisp files.
+
+  make install
+  Installs the built programs and the auxiliary files.
+
+  make clean
+  Removes object and executable files produced by the build process in
+  the current configuration.  After "make clean", you can rebuild with
+  the same configuration using make.  useful when you want to be sure
+  that all of the products are built from coherent sources.
+
+  make distclean
+  In addition to the files removed by make clean, this also removes
+  Makefiles and other generated files to get back to the state of a
+  freshly unpacked source distribution.  After make distclean, it is
+  necessary to run the configure script followed by "make", in order
+  to rebuild.
+
+  The following targets are intended only for use with the Bazaar sources.
+
+  make bootstrap
+  Removes all the auto-generated files and all the *.elc byte-compiled
+  files, and builds Emacs from scratch.  Useful when some change in
+  basic Emacs functionality makes byte compilation of updated files
+  fail.
+
+  make maintainer-clean
+  Removes everything that can be recreated, including compiled Lisp
+  files, to get back to the state of a fresh Bazaar tree.  After make
+  maintainer-clean, it is necessary to run configure and "make" or
+  "make bootstrap" to rebuild.  Occasionally it may be necessary to
+  run this target after an update.
 
 * Optional image library support
 
   support for svg.
 
   To build Emacs with support for them, the corresponding headers must
-  be in the include path when the configure script is run.  This can
-  be setup using environment variables, or by specifying --cflags
-  -I... options on the command-line to configure.bat.  The configure
-  script will report whether it was able to detect the headers.  If
-  the results of this testing appear to be incorrect, please look for
+  be in the include path and libraries should be where the linker
+  looks for them, when the configure script is run.  If needed, this
+  can be set up using the CPPFLAGS and CFLAGS variable specified on
+  the configure command line.  The configure script will report
+  whether it was able to detect the headers and libraries.  If the
+  results of this testing appear to be incorrect, please look for
   details in the file config.log: it will show the failed test
   programs and compiler error messages that should explain what is
   wrong.  (Usually, any such failures happen because some headers are
   missing due to bad packaging of the image support libraries.)
 
   Note that any file path passed to the compiler or linker must use
-  forward slashes; using backslashes will cause compiler warnings or
-  errors about unrecognized escape sequences.
+  forward slashes, or double each backslash, as that is how Bash
+  works.
+
+  If the configure script finds the necessary headers and libraries,
+  but they are for some reason incompatible, or if you want to omit
+  support for some image library that is installed on your system for
+  some other reason, use the --without-PACKAGE option to configure,
+  such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
+  Passing the --help option to the configure script displays all of
+  the supported --without-PACKAGE options.
 
   To use the external image support, the DLLs implementing the
   functionality must be found when Emacs first needs them, either on the
   compatible (for example, that they were built with the same compiler).
 
   Binaries for the image libraries (among many others) can be found at
-  the GnuWin32 project.  PNG, JPEG and TIFF libraries are also
-  included with GTK, which is installed along with other Free Software
-  that requires it.  These are built with MinGW, but they can be used
-  with both GCC/MinGW and MSVC builds of Emacs.  See the info on
-  http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
-  Images Support", for more details about installing image support
-  libraries.  Note specifically that, due to some packaging snafus in
-  the GnuWin32-supplied image libraries, you will need to download
+  the GnuWin32 project.  The PNG libraries are also included with GTK,
+  which is installed along with other Free Software that requires it.
+  Note specifically that, due to some packaging snafus in the
+  GnuWin32-supplied image libraries, you will need to download
   _source_ packages for some of the libraries in order to get the
   header files necessary for building Emacs with image support.
 
-  If GTK 2.0 is installed, addpm will arrange for its image libraries
-  to be on the DLL search path for Emacs.
-
   For PNG images, we recommend to use versions 1.4.x and later of
   libpng, because previous versions had security issues.  You can find
   precompiled libraries and headers on the GTK download page for
 
 * Optional GnuTLS support
 
-  If configure.bat finds the gnutls/gnutls.h file in the include path,
-  Emacs is built with GnuTLS support by default; to avoid that you can
-  pass the argument --without-gnutls.
+  To compile with GnuTLS, you will need pkg-config to be installed, as
+  the configure script invokes pkg-config to find out which compiler
+  switches to use for GnuTLS.  See above for the URL where you can
+  find pkg-config for Windows.
+
+  You will also need to install the p11-kit package, which is a
+  dependency of GnuTLS, and its header files are needed for
+  compilation of programs that use GnuTLS.  You can find p11-kit on
+  the same site as GnuTLS, see the URL below.
+
+  If the configure script finds the GnuTLS header files and libraries
+  on your system, Emacs is built with GnuTLS support by default; to
+  avoid that you can pass the argument --without-gnutls.
 
   In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
   be able to find the relevant DLLs during startup; failure to do so
 
 * Optional libxml2 support
 
-  If configure.bat finds the libxml/HTMLparser.h file in the include path,
-  Emacs is built with libxml2 support by default; to avoid that you can
-  pass the argument --without-libxml2.
+  To compile with libxml2, you will need pkg-config to be installed,
+  as the configure script invokes pkg-config to find out which
+  compiler switches to use for libxml2.  See above for the URL where
+  you can find pkg-config for Windows.
+
+  If the configure script finds the libxml2 header files and libraries
+  on your system, Emacs is built with libxml2 support by default; to
+  avoid that you can pass the argument --without-libxml2.
 
   In order to support libxml2 at runtime, a libxml2-enabled Emacs must
   be able to find the relevant DLLs during startup; failure to do so
 
      http://sourceforge.net/projects/ezwinports/files/
 
-  To compile Emacs with libxml2 from that site, you will need to pass
-  the "--cflags -I/path/to/include/libxml2" option to configure.bat,
-  because libxml2 header files are installed in the include/libxml2
-  subdirectory of the directory where you unzip the binary
-  distribution.  Other binary distributions might use other
-  directories, although include/libxml2 is the canonical place where
-  libxml2 headers are installed on Posix platforms.
-
-  You will also need to install the libiconv "development" tarball,
-  because the libiconv headers need to be available to the compiler
-  when you compile with libxml2 support.  A MinGW port of libiconv can
-  be found on the MinGW site:
+  For runtime support of libxml2, you will also need to install the
+  libiconv "development" tarball, because the libiconv headers need to
+  be available to the compiler when you compile with libxml2 support.
+  A MinGW port of libiconv can be found on the MinGW site:
 
    http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
 
 
 * Experimental SVG support
 
+  To compile with SVG, you will need pkg-config to be installed, as
+  the configure script invokes pkg-config to find out which compiler
+  switches to use for SVG.  See above for the URL where you can find
+  pkg-config for Windows.
+
   SVG support is currently experimental, and not built by default.
-  Specify --with-svg and ensure you have all the dependencies in your
+  Specify --with-rsvg and ensure you have all the dependencies in your
   include path.  Unless you have built a minimalist librsvg yourself
   (untested), librsvg depends on a significant chunk of GTK+ to build,
   plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime.  The
   easiest way to obtain the dependencies required for building is to
   download a pre-bundled GTK+ development environment for Windows.
-  GTK puts its header files all over the place, so you will need to
-  run pkgconfig to list the include path you will need (either passed
-  to configure.bat as --cflags options, or set in the environment).
 
   To use librsvg at runtime, ensure that librsvg and its dependencies
   are on your PATH.  If you didn't build librsvg yourself, you will
   maybe a problem with the way Cairo or librsvg is using it that
   doesn't show up on other platforms.
 
-* Optional extra runtime checks
-
-  The configure.bat option --enable-checking builds Emacs with some
-  optional extra runtime checks and assertions enabled.  This may be
-  useful for debugging.
-
-* Optional extra libraries
-
-  You can pass --lib LIBNAME option to configure.bat to cause Emacs to
-  link with the specified library.  You can use this option more than once.
-
-* Building
-
-  After running configure, simply run the appropriate `make' program for
-  your compiler to build Emacs.  For MSVC, this is nmake; for GCC, it is
-  GNU make.  (If you are building out of Bazaar, say "make bootstrap" or
-  "nmake bootstrap" instead.)
-
-  As the files are compiled, you will see some warning messages
-  declaring that some functions don't return a value, or that some data
-  conversions will be lossy, etc.  You can safely ignore these messages.
-  The warnings may be fixed in the main FSF source at some point, but
-  until then we will just live with them.
-
-  With GNU Make, you can use the -j command-line option to have Make
-  execute several commands at once, like this:
-
-    gmake -j 4 XMFLAGS="-j 3"
-
-  The XMFLAGS variable overrides the default behavior of GNU Make on
-  Windows, whereby recursive Make invocations reset the maximum number
-  of simultaneous commands to 1.  The above command allows up to 4
-  simultaneous commands at once in the top-level Make, and up to 3 in
-  each one of the recursive Make's; you can use other numbers of jobs,
-  if you wish.
-
-  If you are building from Bazaar, the following commands will produce
-  the Info manuals (which are not part of the Bazaar sources):
-
-    make info
-  or
-    nmake info
-
-  Note that you will need makeinfo.exe (from the GNU Texinfo package)
-  in order for this command to succeed.
-
-* Installing
-
-  To install Emacs after it has compiled, simply run `nmake install'
-  or `make install', depending on which version of the Make utility
-  do you have.
-
-  By default, Emacs will be installed in the location where it was
-  built, but a different location can be specified either using the
-  --prefix option to configure, or by setting INSTALL_DIR when running
-  make, like so:
-
-     make install INSTALL_DIR=D:/emacs
-
-  (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
-
-  The install process will run addpm to setup the registry entries, and
-  to create a Start menu icon for Emacs.
-
-* Make targets
-
-  The following make targets may be used by users building the source
-  distribution, or users who have checked out of Bazaar after
-  an initial bootstrapping.
-
-  make
-  Builds Emacs from the available sources and pre-compiled lisp files.
-
-  make install
-  Installs programs to the bin directory, and runs addpm to create
-  Start Menu icons.
-
-  make clean
-  Removes object and executable files produced by the build process in
-  the current configuration.  After make clean, you can rebuild with
-  the same configuration using make.
-
-  make distclean
-  In addition to the files removed by make clean, this also removes
-  Makefiles and other generated files to get back to the state of a
-  freshly unpacked source distribution.  Note that this will not remove
-  installed files, or the results of builds performed with different
-  compiler or optimization options than the current configuration.
-  After make distclean, it is necessary to run configure.bat followed
-  by make to rebuild.
-
-  make cleanall
-  Removes object and executable files that may have been created by
-  previous builds with different configure options, in addition to
-  the files produced by the current configuration.
-
-  make realclean
-  Removes the installed files in the bin subdirectory in addition to
-  the files removed by make cleanall.
-
-  make dist
-  Builds Emacs from the available sources and pre-compiled lisp files.
-  Packages Emacs binaries as full distribution and barebin distribution.
-
-  The following targets are intended only for use with the Bazaar sources.
-
-  make bootstrap
-  Creates a temporary emacs binary with lisp source files and
-  uses it to compile the lisp files.  Once the lisp files are built,
-  emacs is redumped with the compiled lisp.
-
-  make recompile
-  Recompiles any changed lisp files after an update.  This saves
-  doing a full bootstrap after every update.  If this or a subsequent
-  make fail, you probably need to perform a full bootstrap, though
-  running this target multiple times may eventually sort out the
-  interdependencies.
-
-  make maintainer-clean
-  Removes everything that can be recreated, including compiled lisp
-  files, to get back to the state of a fresh Bazaar tree.  After make
-  maintainer-clean, it is necessary to run configure.bat and make
-  bootstrap to rebuild.  Occasionally it may be necessary to run this
-  target after an update.
-
-* Creating binary distributions
-
-  Binary distributions (full and barebin distributions) can be
-  automatically built and packaged from source tarballs or a bzr
-  checkout.
-
-  When building Emacs binary distributions, the --distfiles argument
-  to configure.bat specifies files to be included in the bin directory
-  of the binary distributions. This is intended for libraries that are
-  not built as part of Emacs, e.g. image libraries.
-
-  For example, specifying
-
-       --distfiles D:\distfiles\libXpm.dll
-
-  results in libXpm.dll being copied from D:\distfiles to the
-  bin directory before packaging starts.
-
-  Multiple files can be specified using multiple --distfiles arguments:
-
-       --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
-
-  For packaging the binary distributions, the 'dist' make target uses
-  7-Zip (http://www.7-zip.org), which must be installed and available
-  on the Windows Path.
-
-
-* Trouble-shooting
-
-  The main problems that are likely to be encountered when building
-  Emacs stem from using an old version of GCC, or old MinGW or Windows API
-  headers.  Additionally, Cygwin ports of GNU make may require the Emacs
-  source tree to be mounted with text!=binary, because the makefiles
-  generated by configure.bat necessarily use DOS line endings.  Also,
-  Cygwin ports of make must run in UNIX mode, either by specifying
-  --unix on the command line, or MAKE_MODE=UNIX in the environment.
-
-  When configure runs, it attempts to detect when GCC itself, or the
-  headers it is using, are not suitable for building Emacs.  GCC version
-  2.95 or later is needed, because that is when the Windows port gained
-  sufficient support for anonymous structs and unions to cope with some
-  definitions from winnt.h that are used by addsection.c.
-  Older versions of the Windows API headers that come with Cygwin and MinGW
-  may be missing some definitions required by Emacs, or broken in other
-  ways.  In particular, uniscribe APIs were added to MinGW CVS only on
-  2006-03-26, so releases from before then cannot be used.
-
-  When in doubt about correctness of what configure did, look at the file
-  config.log, which shows all the failed test programs and compiler
-  messages associated with the failures.  If that doesn't give a clue,
-  please report the problems, together with the relevant fragments from
-  config.log, as bugs.
-
-  If configure succeeds, but make fails, install the Cygwin port of
-  Bash, even if the table above indicates that Emacs should be able to
-  build without sh.exe.  (Some versions of Windows shells are too dumb
-  for Makefile's used by Emacs.)
-
-  If you are using certain Cygwin builds of GCC, such as Cygwin version
-  1.1.8, you may need to specify some extra compiler flags like so:
-
-    configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
-      --ldflags -mwin32
-
-  However, the latest Cygwin versions, such as 1.3.3, don't need those
-  switches; you can simply use "configure --with-gcc".
-
-  We will attempt to auto-detect the need for these flags in a future
-  release.
-
-* Debugging
-
-  You should be able to debug Emacs using the debugger that is
-  appropriate for the compiler you used, namely DevStudio or Windbg if
-  compiled with MSVC, or GDB if compiled with GCC.  (GDB for Windows
-  is available from the MinGW site, http://www.mingw.org/download.shtml.)
-
-  When Emacs aborts due to a fatal internal error, Emacs on Windows
-  pops up an Emacs Abort Dialog asking you whether you want to debug
-  Emacs or terminate it.  If Emacs was built with MSVC, click YES
-  twice, and Windbg or the DevStudio debugger will start up
-  automatically.  If Emacs was built with GCC, first start GDB and
-  attach it to the Emacs process with the "gdb -p EMACS-PID" command,
-  where EMACS-PID is the Emacs process ID (which you can see in the
-  Windows Task Manager), type the "continue" command inside GDB, and
-  only then click YES on the abort dialog.  This will pass control to
-  the debugger, and you will be able to debug the cause of the fatal
-  error.
-
-  The single most important thing to find out when Emacs aborts or
-  crashes is where did that happen in the Emacs code.  This is called
-  "backtrace".
-
-  Emacs on Windows uses more than one thread.  When Emacs aborts due
-  to a fatal error, the current thread may not be the application
-  thread running Emacs code.  Therefore, to produce a meaningful
-  backtrace from a debugger, you need to instruct it to show the
-  backtrace for every thread.  With GDB, you do it like this:
-
-   (gdb) thread apply all backtrace
-
-  To run Emacs under a debugger to begin with, simply start it from
-  the debugger.  With GDB, chdir to the `src' directory (if you have
-  the source tree) or to a directory with the `.gdbinit' file (if you
-  don't have the source tree), and type these commands:
-
-    C:\whatever\src> gdb x:\path\to\emacs.exe
-    (gdb) run <ARGUMENTS TO EMACS>
-
-  Thereafter, use Emacs as usual; you can minimize the debugger
-  window, if you like.  The debugger will take control if and when
-  Emacs crashes.
-
-  Emacs functions implemented in C use a naming convention that reflects
-  their names in lisp.  The names of the C routines are the lisp names
-  prefixed with 'F', and with dashes converted to underscores.  For
-  example, the function call-process is implemented in C by
-  Fcall_process.  Similarly, lisp variables are prefixed with 'V', again
-  with dashes converted to underscores.  These conventions enable you to
-  easily set breakpoints or examine familiar lisp variables by name.
-
-  Since Emacs data is often in the form of a lisp object, and the
-  Lisp_Object type is difficult to examine manually in a debugger,
-  Emacs provides a helper routine called debug_print that prints out a
-  readable representation of a Lisp_Object.  If you are using GDB,
-  there is a .gdbinit file in the src directory which provides
-  definitions that are useful for examining lisp objects.  Therefore,
-  the following tips are mainly of interest when using MSVC.
-
-  The output from debug_print is sent to stderr, and to the debugger
-  via the OutputDebugString routine.  The output sent to stderr should
-  be displayed in the console window that was opened when the
-  emacs.exe executable was started.  The output sent to the debugger
-  should be displayed in its "Debug" output window.
-
-  When you are in the process of debugging Emacs and you would like to
-  examine the contents of a Lisp_Object variable, pop up the QuickWatch
-  window (QuickWatch has an eyeglass symbol on its button in the
-  toolbar).  In the text field at the top of the window, enter
-  debug_print(<variable>) and hit return.  For example, start and run
-  Emacs in the debugger until it is waiting for user input.  Then click
-  on the Break button in the debugger to halt execution.  Emacs should
-  halt in ZwUserGetMessage waiting for an input event.  Use the Call
-  Stack window to select the procedure w32_msp_pump up the call stack
-  (see below for why you have to do this).  Open the QuickWatch window
-  and enter debug_print(Vexec_path).  Evaluating this expression will
-  then print out the contents of the lisp variable exec-path.
-
-  If QuickWatch reports that the symbol is unknown, then check the call
-  stack in the Call Stack window.  If the selected frame in the call
-  stack is not an Emacs procedure, then the debugger won't recognize
-  Emacs symbols.  Instead, select a frame that is inside an Emacs
-  procedure and try using debug_print again.
-
-  If QuickWatch invokes debug_print but nothing happens, then check the
-  thread that is selected in the debugger.  If the selected thread is
-  not the last thread to run (the "current" thread), then it cannot be
-  used to execute debug_print.  Use the Debug menu to select the current
-  thread and try using debug_print again.  Note that the debugger halts
-  execution (e.g., due to a breakpoint) in the context of the current
-  thread, so this should only be a problem if you've explicitly switched
-  threads.
-
 \f
 This file is part of GNU Emacs.
 
diff --git a/nt/INSTALL.MSYS b/nt/INSTALL.MSYS
deleted file mode 100644 (file)
index 420b8be..0000000
+++ /dev/null
@@ -1,673 +0,0 @@
-                   Building and Installing Emacs on MS-Windows
-                          using the MSYS and MinGW tools
-
-  Copyright (C) 2013 Free Software Foundation, Inc.
-  See the end of the file for license conditions.
-
-The MSYS/MinGW build described here is supported on versions of
-Windows starting with Windows 2000 and newer.  Windows 9X are not
-supported (but the Emacs binary produced by this build will run on
-Windows 9X as well).
-
-* For the brave (a.k.a. "impatient"):
-
-  For those who have a working MSYS/MinGW development environment and
-  are comfortable with running Posix configure scripts, here are the
-  concise instructions for configuring and building the native Windows
-  binary of Emacs with these tools.
-
-  Do not use this recipe with Cygwin.  For building on Cygwin, use the
-  normal installation instructions, ../INSTALL.
-
-  Do not use these instructions if you don't have MSYS installed; for
-  that, see the file INSTALL in this directory.
-
-  0. Start the MSYS Bash window.  Everything else below is done from
-     that window's Bash prompt.
-
-  0a. If you are building from the development trunk (as opposed to a
-      release tarball), produce the configure script, by typing from
-      the top-level Emacs source directory:
-
-      ./autogen.sh
-
-  1. If you want to build Emacs outside of the source tree
-     (recommended), create the build directory and chdir there.
-
-  2. Invoke the MSYS-specific configure script:
-
-      - If you are building outside the source tree:
-
-        /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
-
-      - If you are building in-place, i.e. inside the source tree:
-
-        ./nt/msysconfig.sh --prefix=PREFIX ...
-
-     It is always preferable to use --prefix to configure Emacs for
-     some specific location of its installed tree; the default
-     /usr/local is not suitable for Windows (see the detailed
-     instructions for the reasons).
-
-     You can pass other options to the configure script.  Here's a
-     typical example (for an in-place debug build):
-
-       CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
-
-  3. After the configure script finishes, it should display the
-     resulting configuration.  After that, type
-
-       make
-
-     Use "make -j N" if your MSYS Make supports parallel execution;
-     the build will take significantly less time in that case.  Here N
-     is the number of simultaneous parallel jobs; use the number of
-     the cores on your system.
-
-  4. Install the produced binaries:
-
-       make install
-
-     If you want the installation tree to go to a place that is
-     different from the one specified by --prefix, say
-
-       make install prefix=/where/ever/you/want
-
-  That's it!
-
-  If these short instructions somehow fail, read the rest of this
-  file.
-
-* Installing MinGW and MSYS
-
-  Make sure you carefully read the following two sections in their
-  entirety and install/configure the various packages as instructed.
-  A correct installation makes all the rest almost trivial; a botched
-  installation will likely make you miserable for quite some time.
-
-  There are two alternative to installing MinGW + MSYS: using the GUI
-  installer, called mingw-get, provided by the MinGW project, or
-  manual installation.  The next two sections describe each one of
-  these.
-
-** Installing MinGW and MSYS using mingw-get
-
-  A nice installer, called mingw-get, is available for those who don't
-  like to mess with manual installations.  You can download it from
-  here:
-
-    https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
-
-  (This installer only supports packages downloaded from the MinGW
-  site; for the rest you will still need the manual method.)
-
-  After installing mingw-get, invoke it to install the packages that
-  are already selected by default on the "Select Components" screen of
-  its wizard.
-
-  After that, use "mingw-get install PACKAGE" to install the following
-  additional packages:
-
-   . msys-base
-   . mingw-developer-toolkit
-
-  (We recommend that you refrain from installing the MSYS Texinfo
-  package, which is part of msys-base, because it might produce mixed
-  EOL format when installing Info files.  Instead, install the MinGW
-  port of Texinfo, see the ezwinports URL below.  To uninstall the
-  MSYS Texinfo, after installing it as part of msys-base, invoke the
-  command "mingw-get remove msys-texinfo".)
-
-  At this point, you should be ready to configure and build Emacs in
-  its basic configuration.  Skip to the "Generating the configure
-  script" section for the build instructions.  If you want to build it
-  with image support and other optional libraries, read about the
-  optional libraries near the end of this document, before you start
-  the build.  Also, consider installing additional MinGW packages that
-  are required/recommended, especially if you are building from the
-  Bazaar repository, as described in the next section.
-
-** Installing MinGW and MSYS manually
-
-*** MinGW
-
-  You will need to install the MinGW port of GCC and Binutils, and the
-  MinGW runtime and Windows API distributions, to compile Emacs.  You
-  can find these on the MinGW download/Base page:
-
-    https://sourceforge.net/projects/mingw/files/MinGW/Base/
-
-  In general, install the latest stable versions of the following
-  MinGW packages from that page: gcc, binutils, mingw-rt, w32api.  You
-  only need the 'bin' and the 'dll' tarballs of each of the above.
-
-  MinGW packages are distributed as .tar.lzma compressed archives.  To
-  install the packages manually, we recommend to use the Windows port
-  of the 'bsdtar' program to unpack the tarballs.  'bsdtar' is
-  available as part of the 'libarchive' package from here:
-
-    http://sourceforge.net/projects/ezwinports/files/
-
-  The recommended place to install these packages is a single tree
-  starting from some directory on a drive other than the system drive
-  C:.  A typical example would be D:\usr, with D:\usr\bin holding the
-  binaries and DLLs (should be added to your Path environment
-  variable), D:\usr\include holding the include files, D:\usr\lib
-  holding the static and import libraries, D:\usr\share holding docs,
-  message catalogs, and package-specific subdirectories, etc.
-
-  Having all the headers and libraries in a single place will greatly
-  reduce the number of -I and -L flags you will have to pass to the
-  configure script (see below), as these files will be right where the
-  compiler expects them.
-
-  We specifically do NOT recommend installing packages below
-  "C:\Program Files" or "C:\Program Files (x86)".  These directories
-  are protected on versions of Windows from Vista and on, and you will
-  have difficulties updating and maintaining your installation later,
-  due to UAC elevation prompts, file virtualization, etc.  You *have*
-  been warned!
-
-  Additional MinGW packages are required/recommended, especially if
-  you are building from the Bazaar repository:
-
-   . Texinfo (needed to produce the Info manuals when building from
-     bzr, and for "make install")
-
-     Available from http://sourceforge.net/projects/ezwinports/files/.
-
-   . gzip (needed to compress files during "make install")
-
-     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
-
-   . pkg-config (needed for building with some optional libraries,
-     such as GnuTLS and libxml2)
-
-     Available from http://www.gtk.org/download/win32.php
-
-  Each package might list other packages as prerequisites on its
-  download page (under "Runtime requirements"); download those as
-  well.  (Using the mingw-get installer will fetch those prerequisites
-  automatically for you.)  A missing prerequisite will manifest itself
-  by the program failing to run and presenting a pop-up dialog that
-  states the missing or incompatible DLL; be sure to find and install
-  these missing DLLs.
-
-  Once you think you have MinGW installed, test the installation by
-  building a trivial "hello, world!" program, and make sure that it
-  builds without any error messages and the binary works when run.
-
-*** MSYS
-
-  You will need a reasonably full MSYS installation.  MSYS is an
-  environment needed to run the Posix configure scripts and the
-  resulting Makefile's, in order to produce native Windows binaries
-  using the MinGW compiler and runtime libraries.  Here's the list of
-  MSYS packages that are required:
-
-   . All the packages from the MSYS Base distribution, listed here:
-
-     https://sourceforge.net/projects/mingw/files/MSYS/Base/
-
-   . Additional packages listed below, from the MSYS Extension
-     distribution here:
-
-     https://sourceforge.net/projects/mingw/files/MSYS/Extension/
-
-      - flex
-      - bison
-      - m4
-      - perl
-      - mktemp
-
-     These should only be needed if you intend to build development
-     versions of Emacs from the Bazaar repository.
-
-   . Additional packages (needed only if building from the Bazaar
-     repository): Automake and Autoconf.  They are available from
-     here:
-
-       http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
-       http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
-
-  MSYS packages are distributed as .tar.lzma compressed archives.  To
-  install the packages manually, we recommend to use the Windows port
-  of the 'bsdtar' program, already mentioned above.
-
-  If/when you are confident in your MinGW/MSYS installation, and want
-  to speed up the builds, we recommend installing a pre-release
-  version of Make from here:
-
-     https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
-
-  These are snapshot builds of many packages, but you only need
-  make.exe from there.  The advantage of this make.exe is that it
-  supports parallel builds, so you can use "make -j N" to considerably
-  speed up your builds.
-
-  Several users reported that MSYS 1.0.18 causes Make to hang in
-  parallel builds.  If you bump into this, we suggest to downgrade to
-  MSYS 1.0.17, which doesn't have that problem.
-
-  For each of these packages, install the 'bin' and 'dll' tarballs of
-  their latest stable releases.  If there's an 'ext' tarball (e.g.,
-  msysCORE and Coreutils have it), download and install those as well.
-
-  Each package might list other packages as prerequisites on its
-  download page (under "Runtime requirements"); download those as
-  well.  (Using the mingw-get installer will fetch those prerequisites
-  automatically for you.)  A missing prerequisite will manifest itself
-  by the program failing to run and presenting a pop-up dialog that
-  states the missing or incompatible DLL; be sure to find and install
-  these missing DLLs.
-
-  MSYS packages should be installed in a separate tree from MinGW.
-  For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
-  from which you unpack all of the MSYS packages.
-
-  Do NOT add the MSYS bin directory to your Windows Path!  Only the
-  MinGW bin directory should be on Path.  When you install MSYS, it
-  creates a shortcut on your desktop that invokes the MSYS Bash shell
-  in a Command Prompt window; that shell is already set up so that the
-  MSYS bin directory is on PATH ahead of any other directory.  Thus,
-  Bash will find MSYS executables first, which is exactly what you
-  need.
-
-  At this point, you are ready to build Emacs in its basic
-  configuration.  If you want to build it with image support and other
-  optional libraries, read about that near the end of this document.
-
-* Generating the configure script
-
-  If you are building a release or pretest tarball, skip this section,
-  because the configure script is already present in the tarball.
-
-  To build a development snapshot from the Emacs Bazaar repository,
-  you will first need to generate the configure script and a few other
-  auto-generated files.  (If this step, described below, somehow
-  fails, you can use the files in the autogen/ directory instead, but
-  they might be outdated, and, most importantly, you are well advised
-  not to disregard any failures in your local build procedures, as
-  these are likely to be symptoms of incorrect installation that will
-  bite you down the road.)
-
-  To generate the configure script, type this at the MSYS Bash prompt
-  from the top-level directory of the Emacs tree:
-
-     ./autogen.sh
-
-  If successful, this command should produce the following output:
-
-     $ ./autogen.sh
-     Checking whether you have the necessary tools...
-     (Read INSTALL.BZR for more details on building Emacs)
-
-     Checking for autoconf (need at least version 2.65)...
-     ok
-     Checking for automake (need at least version 1.11)...
-     ok
-     Your system has the required tools, running autoreconf...
-     You can now run `./configure'.
-
-* Configuring Emacs for MinGW:
-
-  Now it's time to run the configure script.  You can do that either
-  from a separate build directory that is outside of the Emacs source
-  tree (recommended), or from inside the source tree.  The former is
-  recommended because it allows you to have several different builds,
-  e.g., an optimized build and an unoptimized one, of the same
-  revision of the source tree; the source tree will be left in its
-  pristine state, without any build products.
-
-  You invoke the configure script like this:
-
-     /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
-
-  or, if you are building in-place, i.e. inside the source tree:
-
-     ./nt/msysconfig.sh --prefix=PREFIX ...
-
-  Here PREFIX is the place where you eventually want to install Emacs
-  once built, e.g. /d/usr.  We recommend to always use --prefix when
-  building Emacs on Windows, because the default '/usr/local' is not
-  appropriate for Windows: it will be mapped by MSYS to something like
-  C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
-  install programs in a single coherent tree resembling Posix systems.
-  Such a single-tree installation makes sure all the other programs
-  and packages ported from GNU or Unix systems will work seamlessly
-  together.  Where exactly is the root of that tree on your system is
-  something only you, the user who builds Emacs, can know, and the
-  Emacs build process cannot guess, because usually there's no
-  '/usr/local' directory on any drive on Windows systems.
-
-  Do NOT use Windows-style x:/foo/bar file names on the configure
-  script command line; use the MSYS-style /x/foo/bar instead.  Using
-  Windows-style file names was reported to cause subtle and hard to
-  figure out problems during the build.  This applies both to the
-  command switches, such as --prefix=, and to the absolute file name
-  of msysconfig.sh, if you are building outside of the source tree.
-
-  You can pass additional options to the configure script, for the
-  full list type
-
-     ./nt/msysconfig.sh --help
-
-  As explained in the help text, you may need to tell the script what
-  are the optional flags to invoke the compiler.  This is needed if
-  some of your headers and libraries, e.g., those belonging to
-  optional image libraries, are installed in places where the compiler
-  normally doesn't look for them.  (Remember that advice above to
-  avoid such situations? here's is where you will start paying for
-  disregarding that recommendation.)  For example, if you have libpng
-  headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
-  headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
-  something like this:
-
-    CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
-
-  which is quite a mouth-full, especially if you have more directories
-  to specify...  Perhaps you may wish to revisit your installation
-  decisions now.
-
-  If you have a global site-lisp directory from previous Emacs
-  installation, and you want Emacs to continue using it, specify it
-  via the --enable-locallisppath switch to msysconfig.sh, like this:
-
-   ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
-
-  Use the normal MSYS /d/foo/bar style to specify directories by their
-  absolute file names.
-
-  A few frequently used options are needed when you want to produce an
-  unoptimized binary with runtime checks enabled:
-
-     CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
-
-  Once invoked, the configure script will run for some time, and, if
-  successful, will eventually produce a summary of the configuration
-  like this:
-
-     Configured for `i686-pc-mingw32'.
-
-       Where should the build process find the source code?    /path/to/emacs/sources
-       What compiler should emacs be built with?               gcc  -std=gnu99 -O0 -g3
-       Should Emacs use the GNU version of malloc?             yes
-       Should Emacs use a relocating allocator for buffers?    yes
-       Should Emacs use mmap(2) for buffer allocation?         no
-       What window system should Emacs use?                    w32
-       What toolkit should Emacs use?                          none
-       Where do we find X Windows header files?                NONE
-       Where do we find X Windows libraries?                   NONE
-       Does Emacs use -lXaw3d?                                 no
-       Does Emacs use -lXpm?                                   yes
-       Does Emacs use -ljpeg?                                  yes
-       Does Emacs use -ltiff?                                  yes
-       Does Emacs use a gif library?                           yes
-       Does Emacs use -lpng?                                   yes
-       Does Emacs use -lrsvg-2?                                no
-       Does Emacs use imagemagick?                             no
-       Does Emacs use -lgpm?                                   no
-       Does Emacs use -ldbus?                                  no
-       Does Emacs use -lgconf?                                 no
-       Does Emacs use GSettings?                               no
-       Does Emacs use -lselinux?                               no
-       Does Emacs use -lgnutls?                                yes
-       Does Emacs use -lxml2?                                  yes
-       Does Emacs use -lfreetype?                              no
-       Does Emacs use -lm17n-flt?                              no
-       Does Emacs use -lotf?                                   no
-       Does Emacs use -lxft?                                   no
-       Does Emacs use toolkit scroll bars?                     yes
-
-  You are almost there, hang on.
-
-  If the output is significantly different, or if configure finishes
-  prematurely and displays some error message, you should examine the
-  configuration log in config.log and find the reason for the failure.
-
-  Once you succeeded in configuring Emacs, and just want to rebuild it
-  after updating your local repository from the main repository, you
-  don't need to re-run the configure script manually, unless you want
-  to change the configure-time options.  Just typing "make" will
-  re-run configure if necessary with the exact same options you
-  specified originally, and then go on to invoking Make, described
-  below.
-
-* Running Make.
-
-  This is simple: just type "make" and sit back, watching the fun.
-
-  If you  installed a snapshot build  of Make, the build  will be much
-  faster if  you type "make  -j N" instead, where  N is the  number of
-  independent processing  units on your  machine.  E.g., on a  core i7
-  system try using  N of 6 or  even 8.  (If this hangs,  see the notes
-  above about downgrading to MSYS 1.0.17.)
-
-  When Make finishes, you can install the produced binaries:
-
-    make install
-
-  or, if you want the installed tree to go in a place different from
-  the configured one, type
-
-    make install prefix=WHEREVER
-
-  Congrats!  You have built and installed your own Emacs!
-
-* Make targets
-
-  The following make targets may be used by users building the source
-  distribution, or users who have checked out of Bazaar after
-  an initial bootstrapping.
-
-  make
-  Builds Emacs from the available sources and pre-compiled lisp files.
-
-  make install
-  Installs the built programs and the auxiliary files.
-
-  make clean
-  Removes object and executable files produced by the build process in
-  the current configuration.  After "make clean", you can rebuild with
-  the same configuration using make.  useful when you want to be sure
-  that all of the products are built from coherent sources.
-
-  make distclean
-  In addition to the files removed by make clean, this also removes
-  Makefiles and other generated files to get back to the state of a
-  freshly unpacked source distribution.  After make distclean, it is
-  necessary to run the configure script followed by "make", in order
-  to rebuild.
-
-  The following targets are intended only for use with the Bazaar sources.
-
-  make bootstrap
-  Removes all the auto-generated files and all the *.elc byte-compiled
-  files, and builds Emacs from scratch.  Useful when some change in
-  basic Emacs functionality makes byte compilation of updated files
-  fail.
-
-  make maintainer-clean
-  Removes everything that can be recreated, including compiled Lisp
-  files, to get back to the state of a fresh Bazaar tree.  After make
-  maintainer-clean, it is necessary to run configure and "make" or
-  "make bootstrap" to rebuild.  Occasionally it may be necessary to
-  run this target after an update.
-
-* Optional image library support
-
-  In addition to its "native" image formats (pbm and xbm), Emacs can
-  handle other image types: xpm, tiff, gif, png, jpeg and experimental
-  support for svg.
-
-  To build Emacs with support for them, the corresponding headers must
-  be in the include path and libraries should be where the linker
-  looks for them, when the configure script is run.  If needed, this
-  can be set up using the CPPFLAGS and CFLAGS variable specified on
-  the configure command line.  The configure script will report
-  whether it was able to detect the headers and libraries.  If the
-  results of this testing appear to be incorrect, please look for
-  details in the file config.log: it will show the failed test
-  programs and compiler error messages that should explain what is
-  wrong.  (Usually, any such failures happen because some headers are
-  missing due to bad packaging of the image support libraries.)
-
-  Note that any file path passed to the compiler or linker must use
-  forward slashes, or double each backslash, as that is how Bash
-  works.
-
-  If the configure script finds the necessary headers and libraries,
-  but they are for some reason incompatible, or if you want to omit
-  support for some image library that is installed on your system for
-  some other reason, use the --without-PACKAGE option to configure,
-  such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
-  Passing the --help option to the configure script displays all of
-  the supported --without-PACKAGE options.
-
-  To use the external image support, the DLLs implementing the
-  functionality must be found when Emacs first needs them, either on the
-  PATH, or in the same directory as emacs.exe.  Failure to find a
-  library is not an error; the associated image format will simply be
-  unavailable.  Note that once Emacs has determined that a library can
-  not be found, there's no way to force it to try again, other than
-  restarting.  See the variable `dynamic-library-alist' to configure the
-  expected names of the libraries.
-
-  Some image libraries have dependencies on one another, or on zlib.
-  For example, tiff support depends on the jpeg library.  If you did not
-  compile the libraries yourself, you must make sure that any dependency
-  is in the PATH or otherwise accessible and that the binaries are
-  compatible (for example, that they were built with the same compiler).
-
-  Binaries for the image libraries (among many others) can be found at
-  the GnuWin32 project.  The PNG libraries are also included with GTK,
-  which is installed along with other Free Software that requires it.
-  Note specifically that, due to some packaging snafus in the
-  GnuWin32-supplied image libraries, you will need to download
-  _source_ packages for some of the libraries in order to get the
-  header files necessary for building Emacs with image support.
-
-  For PNG images, we recommend to use versions 1.4.x and later of
-  libpng, because previous versions had security issues.  You can find
-  precompiled libraries and headers on the GTK download page for
-  Windows (http://www.gtk.org/download/win32.php).
-
-  Versions 1.4.0 and later of libpng are binary incompatible with
-  earlier versions, so Emacs will only look for libpng libraries which
-  are compatible with the version it was compiled against.  That
-  version is given by the value of the Lisp variable `libpng-version';
-  e.g., 10403 means version 1.4.3.  The variable `dynamic-library-alist'
-  is automatically set to name only those DLL names that are known to
-  be compatible with the version given by `libpng-version'.  If PNG
-  support does not work for you even though you have the support DLL
-  installed, check the name of the installed DLL against
-  `dynamic-library-alist' and the value of `libpng-version', and
-  download compatible DLLs if needed.
-
-* Optional GnuTLS support
-
-  To compile with GnuTLS, you will need pkg-config to be installed, as
-  the configure script invokes pkg-config to find out which compiler
-  switches to use for GnuTLS.  See above for the URL where you can
-  find pkg-config for Windows.
-
-  You will also need to install the p11-kit package, which is a
-  dependency of GnuTLS, and its header files are needed for
-  compilation of programs that use GnuTLS.  You can find p11-kit on
-  the same site as GnuTLS, see the URL below.
-
-  If the configure script finds the GnuTLS header files and libraries
-  on your system, Emacs is built with GnuTLS support by default; to
-  avoid that you can pass the argument --without-gnutls.
-
-  In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
-  be able to find the relevant DLLs during startup; failure to do so
-  is not an error, but GnuTLS won't be available to the running
-  session.
-
-  You can get pre-built binaries (including any required DLL and the
-  header files) at http://sourceforge.net/projects/ezwinports/files/.
-
-* Optional libxml2 support
-
-  To compile with libxml2, you will need pkg-config to be installed,
-  as the configure script invokes pkg-config to find out which
-  compiler switches to use for libxml2.  See above for the URL where
-  you can find pkg-config for Windows.
-
-  If the configure script finds the libxml2 header files and libraries
-  on your system, Emacs is built with libxml2 support by default; to
-  avoid that you can pass the argument --without-libxml2.
-
-  In order to support libxml2 at runtime, a libxml2-enabled Emacs must
-  be able to find the relevant DLLs during startup; failure to do so
-  is not an error, but libxml2 features won't be available to the
-  running session.
-
-  One place where you can get pre-built Windows binaries of libxml2
-  (including any required DLL and the header files) is here:
-
-     http://sourceforge.net/projects/ezwinports/files/
-
-  For runtime support of libxml2, you will also need to install the
-  libiconv "development" tarball, because the libiconv headers need to
-  be available to the compiler when you compile with libxml2 support.
-  A MinGW port of libiconv can be found on the MinGW site:
-
-   http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
-
-  You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
-  site.
-
-* Experimental SVG support
-
-  To compile with SVG, you will need pkg-config to be installed, as
-  the configure script invokes pkg-config to find out which compiler
-  switches to use for SVG.  See above for the URL where you can find
-  pkg-config for Windows.
-
-  SVG support is currently experimental, and not built by default.
-  Specify --with-rsvg and ensure you have all the dependencies in your
-  include path.  Unless you have built a minimalist librsvg yourself
-  (untested), librsvg depends on a significant chunk of GTK+ to build,
-  plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime.  The
-  easiest way to obtain the dependencies required for building is to
-  download a pre-bundled GTK+ development environment for Windows.
-
-  To use librsvg at runtime, ensure that librsvg and its dependencies
-  are on your PATH.  If you didn't build librsvg yourself, you will
-  need to check with where you downloaded it from for the
-  dependencies, as there are different build options.  If it is a
-  short list, then it most likely only lists the immediate
-  dependencies of librsvg, but the dependencies themselves have
-  dependencies - so don't download individual libraries from GTK+,
-  download and install the whole thing.  If you think you've got all
-  the dependencies and SVG support is still not working, check your
-  PATH for other libraries that shadow the ones you downloaded.
-  Libraries of the same name from different sources may not be
-  compatible, this problem was encountered with libbzip2 from GnuWin32
-  with libcroco from gnome.org.
-
-  If you can see etc/images/splash.svg, then you have managed to get
-  SVG support working.  Congratulations for making it through DLL hell
-  to this point.  You'll probably find that some SVG images crash
-  Emacs.  Problems have been observed in some images that contain
-  text, they seem to be a problem in the Windows port of Pango, or
-  maybe a problem with the way Cairo or librsvg is using it that
-  doesn't show up on other platforms.
-
-\f
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/nt/INSTALL.OLD b/nt/INSTALL.OLD
new file mode 100644 (file)
index 0000000..20162de
--- /dev/null
@@ -0,0 +1,752 @@
+                   Building and Installing Emacs on Windows
+                          (from 95 to 7 and beyond)
+
+  Copyright (C) 2001-2013 Free Software Foundation, Inc.
+  See the end of the file for license conditions.
+
+*** This method of building Emacs is no longer supported. ***
+    It may fail to produce a correctly working Emacs.
+    Do not report bugs associated with this build method.
+    Instead, follow the new instructions in INSTALL.
+
+* For the impatient
+
+  Here are the concise instructions for configuring and building the
+  native Windows binary of Emacs, for those who want to skip the
+  complex explanations and ``just do it'':
+
+  Do not use this recipe with Cygwin.  For building on Cygwin,
+  use the normal installation instructions, ../INSTALL.
+
+  Do not use these instructions with MSYS environment.  For building
+  the native Windows binary with MinGW and MSYS, follow the
+  instructions in the file INSTALL in this directory.
+
+  For building without MSYS, if you have a Cygwin or MSYS port of Bash
+  on your Path, you will be better off removing it from PATH.  (For
+  details, search for "MSYS sh.exe" below.)
+
+  1. Change to the `nt' directory (the directory of this file):
+
+       cd nt
+
+  2. Run configure.bat.
+
+  2a.If you use MSVC, set up the build environment by running the
+     SetEnv.cmd batch file from the appropriate SDK directory.  (Skip
+     this step if you are using MinGW.)  For example:
+
+       "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug
+
+      if you are going to compile a debug version, or
+
+       "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
+
+      if you are going to compile an optimized version.
+
+  2b.From the COMMAND.COM/CMD.EXE command prompt type:
+
+       configure
+
+     From a Unixy shell prompt:
+
+       cmd /c configure.bat
+     or
+       command.com /c configure.bat
+
+  3. Run the Make utility suitable for your environment.  If you build
+     with the Microsoft's Visual C compiler:
+
+       nmake
+
+     For the development environments based on GNU GCC (MinGW, MSYS,
+     Cygwin - but see notes about Cygwin make below), depending on how
+     Make is called, it could be:
+
+       make
+     or
+       mingw32-make
+     or
+       gnumake
+     or
+       gmake
+
+     (If you are building from Bazaar, say "make bootstrap" or "nmake
+     bootstrap" instead, and avoid using Cygwin make.)
+
+     With GNU Make, you can use the -j command-line option to have
+     Make execute several commands at once, like this:
+
+       gmake -j 2
+
+     (With versions of GNU Make before 3.82, you need also set the
+     XMFLAGS variable, like this:
+
+       gmake -j 2 XMFLAGS="-j 2"
+
+     The XMFLAGS variable overrides the default behavior of version
+     3.82 and older of GNU Make on Windows, whereby recursive Make
+     invocations reset the maximum number of simultaneous commands to
+     1.  The above command allows up to 4 simultaneous commands at
+     once in the top-level Make, and up to 3 in each one of the
+     recursive Make's.)
+
+  4. Generate the Info manuals (only if you are building out of Bazaar,
+     and if you have makeinfo.exe installed):
+
+     make info
+
+     (change "make" to "nmake" if you use MSVC).
+
+  5. Install the produced binaries:
+
+     make install
+
+  That's it!
+
+  If these short instructions somehow fail, read the rest of this
+  file.
+
+* Preliminaries
+
+  If you want to build a Cygwin port of Emacs, use the instructions in
+  the INSTALL file in the main Emacs directory (the parent of this
+  directory).  These instructions are for building a native Windows
+  binary of Emacs.
+
+  If you used WinZip to unpack the distribution, we suggest to
+  remove the files and unpack again with a different program!
+  WinZip is known to create some subtle and hard to debug problems,
+  such as converting files to DOS CR-LF format, not creating empty
+  directories, etc.  We suggest to use djtarnt.exe from the GNU FTP
+  site.  For modern formats, such as .tar.xz, we suggest bsdtar.exe
+  from the libarchive package; its precompiled Windows binaries are
+  available from this site:
+
+    http://sourceforge.net/projects/ezwinports/files/
+
+  In addition to this file, if you build a development snapshot, you
+  should also read INSTALL.BZR in the parent directory.
+
+* Supported development environments
+
+  To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
+  later and nmake, or a Windows port of GCC 2.95 or later with MinGW
+  and Windows API support and a port of GNU Make.  You can use the Cygwin
+  ports of GCC, but Emacs requires the MinGW headers and libraries to
+  build (latest versions of the Cygwin toolkit, at least since v1.3.3,
+  include the MinGW headers and libraries as an integral part).
+
+  The rest of this file assumes you have a working development
+  environment.  If you just installed such an environment, try
+  building a trivial C "Hello world" program, and see if it works.  If
+  it doesn't work, resolve that problem first!  If you use Microsoft
+  Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
+  file from the `Bin' subdirectory of the directory where you have
+  installed VS.NET.  With other versions of MSVC, run the SetEnv.cmd
+  batch file from the `Bin' subdirectory of the directory where you
+  have the SDK installed.
+
+  If you use the MinGW port of GCC and GNU Make to build Emacs, there
+  are some compatibility issues wrt Make and the shell that is run by
+  Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
+  or sh.exe, a port of a Unixy shell.  For reference, below is a list
+  of which builds of GNU Make are known to work or not, and whether
+  they work in the presence and/or absence of sh.exe, the Cygwin port
+  of Bash.  Note that any version of Make that is compiled with Cygwin
+  will only work with Cygwin tools, due to the use of Cygwin style
+  paths.  This means Cygwin Make is unsuitable for building parts of
+  Emacs that need to invoke Emacs itself (leim and "make bootstrap",
+  for example).  Also see the Trouble-shooting section below if you
+  decide to go ahead and use Cygwin make.
+
+  In addition, using 4NT or TCC as your shell is known to fail the
+  build process, at least since 4NT version 3.01.  Use CMD.EXE, the
+  default Windows shell, instead.  MSYS sh.exe also appears to cause
+  various problems, e.g., it is known to cause failures in commands
+  like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a
+  Unix-style file name that needs conversion to the Windows format.
+  If you have MSYS installed, try "make SHELL=cmd.exe" to force the
+  use of cmd.exe instead of the MSYS sh.exe.
+
+                                         sh exists     no sh
+
+    cygwin b20.1 make (3.75):            fails[1, 5]   fails[2, 5]
+    MSVC compiled gmake 3.77:            okay          okay
+    MSVC compiled gmake 3.78.1:          okay          okay
+    MSVC compiled gmake 3.79.1:          okay          okay
+    mingw32/gcc-2.92.2 make (3.77):      okay          okay[4]
+    cygwin compiled gmake 3.77:          fails[1, 5]   fails[2, 5]
+    cygwin compiled make 3.78.1:         fails[5]      fails[2, 5]
+    cygwin compiled make 3.79.1:         fails[3, 5]   fails[2?, 5]
+    cygwin compiled make 3.80:           okay[6]       fails?[7]
+    cygwin compiled make 3.81:           fails         fails?[7]
+    mingw32 compiled make 3.79.1:        okay          okay
+    mingw32 compiled make 3.80:          okay          okay[7]
+    mingw32 compiled make 3.81:          okay          okay[8]
+
+  Notes:
+
+    [1] doesn't cope with makefiles with DOS line endings, so must mount
+        emacs source with text!=binary.
+    [2] fails when needs to invoke shell commands; okay invoking gcc etc.
+    [3] requires LC_MESSAGES support to build; cannot build with early
+        versions of Cygwin.
+    [4] may fail on Windows 9X and Windows ME; if so, install Bash.
+    [5] fails when building leim due to the use of cygwin style paths.
+        May work if building emacs without leim.
+    [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
+       (look for "cygpath" near line 85 of gmake.defs).
+    [7] not recommended; please report if you try this combination.
+    [8] tested only on Windows XP.
+
+  Other compilers may work, but specific reports from people that have
+  tried suggest that the Intel C compiler (for example) may produce an
+  Emacs executable with strange filename completion behavior.  Unless
+  you would like to assist by finding and fixing the cause of any bugs
+  like this, we recommend the use of the supported compilers mentioned
+  in the previous paragraph.
+
+  You will also need a copy of the POSIX cp, rm and mv programs.  These
+  and other useful POSIX utilities can be obtained from one of several
+  projects:
+
+  * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
+  * http://www.mingw.org/                         ( MinGW    )
+  * http://www.cygwin.com/                        ( Cygwin   )
+  * http://unxutils.sourceforge.net/              ( UnxUtils )
+
+  If you build Emacs on 16-bit versions of Windows (9X or ME), we
+  suggest to install the Cygwin port of Bash.  That is because the
+  native Windows shell COMMAND.COM is too limited; the Emacs build
+  procedure tries very hard to support even such limited shells, but
+  as none of the Windows developers of Emacs work on Windows 9X, we
+  cannot guarantee that it works without a more powerful shell.
+
+  Additional instructions and help for building Emacs on Windows can be
+  found at the Emacs Wiki:
+
+    http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
+
+  and on these URLs:
+
+    http://ourcomments.org/Emacs/w32-build-emacs.html
+    http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
+
+  Both of those pages were written before Emacs switched from CVS to
+  Bazaar, but the parts about building Emacs still apply in Bazaar.
+  The second URL has instructions for building with MSVC, as well as
+  with MinGW, while the first URL covers only MinGW, but has more
+  details about it.
+
+* Configuring
+
+  Configuration of Emacs is now handled by running configure.bat in the
+  `nt' subdirectory.  It will detect which compiler you have available,
+  and generate makefiles accordingly.  You can override the compiler
+  detection, and control optimization and debug settings, by specifying
+  options on the command line when invoking configure.
+
+  To configure Emacs to build with GCC or MSVC, whichever is available,
+  simply change to the `nt' subdirectory and run `configure.bat' with no
+  options.  To see what options are available, run `configure --help'.
+  Do NOT use the --no-debug option to configure.bat unless you are
+  absolutely sure the produced binaries will never need to be run under
+  a debugger.
+
+  Because of limitations of the stock Windows command shells, special
+  care is needed to pass some characters in the arguments of the
+  --cflags and --ldflags options.  Backslashes should not be used in
+  file names passed to the compiler and linker via these options.  Use
+  forward slashes instead.  If the arguments to these two options
+  include the `=' character, like when passing a -DFOO=bar preprocessor
+  option, the argument with the `=' character should be enclosed in
+  quotes, like this:
+
+    configure --cflags "-DFOO=bar"
+
+  Support for options that include the `=' character require "command
+  extensions" to be enabled.  (They are enabled by default, but your
+  system administrator could have changed that.  See "cmd /?" for
+  details.)  If command extensions are disabled, a warning message might
+  be displayed informing you that "using parameters that include the =
+  character by enclosing them in quotes will not be supported."
+
+  You may also use the --cflags and --ldflags options to pass
+  additional parameters to the compiler and linker, respectively; they
+  are frequently used to pass -I and -L flags to specify supplementary
+  include and library directories.  If a directory name includes
+  spaces, you will need to enclose it in quotes, as follows
+  -I"C:/Program Files/GnuTLS-2.10.1/include".  Note that only the
+  directory name is enclosed in quotes, not the entire argument.  Also
+  note that this functionality is only supported if command extensions
+  are available.  If command extensions are disabled and you attempt to
+  use this functionality you may see the following warning message
+  "Error in --cflags argument: ... Backslashes and quotes cannot be
+  used with --cflags.  Please use forward slashes for filenames and
+  paths (e.g. when passing directories to -I)."
+
+  N.B.  It is normal to see a few error messages output while configure
+  is running, when gcc support is being tested.  These cannot be
+  suppressed because of limitations in the Windows 9X command.com shell.
+
+  You are encouraged to look at the file config.log which shows details
+  for failed tests, after configure.bat finishes.  Any unexplained failure
+  should be investigated and perhaps reported as a bug (see the section
+  about reporting bugs in the file README in this directory and in the
+  Emacs manual).
+
+* Optional image library support
+
+  In addition to its "native" image formats (pbm and xbm), Emacs can
+  handle other image types: xpm, tiff, gif, png, jpeg and experimental
+  support for svg.
+
+  To build Emacs with support for them, the corresponding headers must
+  be in the include path when the configure script is run.  This can
+  be setup using environment variables, or by specifying --cflags
+  -I... options on the command-line to configure.bat.  The configure
+  script will report whether it was able to detect the headers.  If
+  the results of this testing appear to be incorrect, please look for
+  details in the file config.log: it will show the failed test
+  programs and compiler error messages that should explain what is
+  wrong.  (Usually, any such failures happen because some headers are
+  missing due to bad packaging of the image support libraries.)
+
+  Note that any file path passed to the compiler or linker must use
+  forward slashes; using backslashes will cause compiler warnings or
+  errors about unrecognized escape sequences.
+
+  To use the external image support, the DLLs implementing the
+  functionality must be found when Emacs first needs them, either on the
+  PATH, or in the same directory as emacs.exe.  Failure to find a
+  library is not an error; the associated image format will simply be
+  unavailable.  Note that once Emacs has determined that a library can
+  not be found, there's no way to force it to try again, other than
+  restarting.  See the variable `dynamic-library-alist' to configure the
+  expected names of the libraries.
+
+  Some image libraries have dependencies on one another, or on zlib.
+  For example, tiff support depends on the jpeg library.  If you did not
+  compile the libraries yourself, you must make sure that any dependency
+  is in the PATH or otherwise accessible and that the binaries are
+  compatible (for example, that they were built with the same compiler).
+
+  Binaries for the image libraries (among many others) can be found at
+  the GnuWin32 project.  PNG, JPEG and TIFF libraries are also
+  included with GTK, which is installed along with other Free Software
+  that requires it.  These are built with MinGW, but they can be used
+  with both GCC/MinGW and MSVC builds of Emacs.  See the info on
+  http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
+  Images Support", for more details about installing image support
+  libraries.  Note specifically that, due to some packaging snafus in
+  the GnuWin32-supplied image libraries, you will need to download
+  _source_ packages for some of the libraries in order to get the
+  header files necessary for building Emacs with image support.
+
+  If GTK 2.0 is installed, addpm will arrange for its image libraries
+  to be on the DLL search path for Emacs.
+
+  For PNG images, we recommend to use versions 1.4.x and later of
+  libpng, because previous versions had security issues.  You can find
+  precompiled libraries and headers on the GTK download page for
+  Windows (http://www.gtk.org/download/win32.php).
+
+  Versions 1.4.0 and later of libpng are binary incompatible with
+  earlier versions, so Emacs will only look for libpng libraries which
+  are compatible with the version it was compiled against.  That
+  version is given by the value of the Lisp variable `libpng-version';
+  e.g., 10403 means version 1.4.3.  The variable `dynamic-library-alist'
+  is automatically set to name only those DLL names that are known to
+  be compatible with the version given by `libpng-version'.  If PNG
+  support does not work for you even though you have the support DLL
+  installed, check the name of the installed DLL against
+  `dynamic-library-alist' and the value of `libpng-version', and
+  download compatible DLLs if needed.
+
+* Optional GnuTLS support
+
+  If configure.bat finds the gnutls/gnutls.h file in the include path,
+  Emacs is built with GnuTLS support by default; to avoid that you can
+  pass the argument --without-gnutls.
+
+  In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
+  be able to find the relevant DLLs during startup; failure to do so
+  is not an error, but GnuTLS won't be available to the running
+  session.
+
+  You can get pre-built binaries (including any required DLL and the
+  header files) at http://sourceforge.net/projects/ezwinports/files/.
+
+* Optional libxml2 support
+
+  If configure.bat finds the libxml/HTMLparser.h file in the include path,
+  Emacs is built with libxml2 support by default; to avoid that you can
+  pass the argument --without-libxml2.
+
+  In order to support libxml2 at runtime, a libxml2-enabled Emacs must
+  be able to find the relevant DLLs during startup; failure to do so
+  is not an error, but libxml2 features won't be available to the
+  running session.
+
+  One place where you can get pre-built Windows binaries of libxml2
+  (including any required DLL and the header files) is here:
+
+     http://sourceforge.net/projects/ezwinports/files/
+
+  To compile Emacs with libxml2 from that site, you will need to pass
+  the "--cflags -I/path/to/include/libxml2" option to configure.bat,
+  because libxml2 header files are installed in the include/libxml2
+  subdirectory of the directory where you unzip the binary
+  distribution.  Other binary distributions might use other
+  directories, although include/libxml2 is the canonical place where
+  libxml2 headers are installed on Posix platforms.
+
+  You will also need to install the libiconv "development" tarball,
+  because the libiconv headers need to be available to the compiler
+  when you compile with libxml2 support.  A MinGW port of libiconv can
+  be found on the MinGW site:
+
+   http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
+
+  You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
+  site.
+
+* Experimental SVG support
+
+  SVG support is currently experimental, and not built by default.
+  Specify --with-svg and ensure you have all the dependencies in your
+  include path.  Unless you have built a minimalist librsvg yourself
+  (untested), librsvg depends on a significant chunk of GTK+ to build,
+  plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime.  The
+  easiest way to obtain the dependencies required for building is to
+  download a pre-bundled GTK+ development environment for Windows.
+  GTK puts its header files all over the place, so you will need to
+  run pkgconfig to list the include path you will need (either passed
+  to configure.bat as --cflags options, or set in the environment).
+
+  To use librsvg at runtime, ensure that librsvg and its dependencies
+  are on your PATH.  If you didn't build librsvg yourself, you will
+  need to check with where you downloaded it from for the
+  dependencies, as there are different build options.  If it is a
+  short list, then it most likely only lists the immediate
+  dependencies of librsvg, but the dependencies themselves have
+  dependencies - so don't download individual libraries from GTK+,
+  download and install the whole thing.  If you think you've got all
+  the dependencies and SVG support is still not working, check your
+  PATH for other libraries that shadow the ones you downloaded.
+  Libraries of the same name from different sources may not be
+  compatible, this problem was encountered with libbzip2 from GnuWin32
+  with libcroco from gnome.org.
+
+  If you can see etc/images/splash.svg, then you have managed to get
+  SVG support working.  Congratulations for making it through DLL hell
+  to this point.  You'll probably find that some SVG images crash
+  Emacs.  Problems have been observed in some images that contain
+  text, they seem to be a problem in the Windows port of Pango, or
+  maybe a problem with the way Cairo or librsvg is using it that
+  doesn't show up on other platforms.
+
+* Optional extra runtime checks
+
+  The configure.bat option --enable-checking builds Emacs with some
+  optional extra runtime checks and assertions enabled.  This may be
+  useful for debugging.
+
+* Optional extra libraries
+
+  You can pass --lib LIBNAME option to configure.bat to cause Emacs to
+  link with the specified library.  You can use this option more than once.
+
+* Building
+
+  After running configure, simply run the appropriate `make' program for
+  your compiler to build Emacs.  For MSVC, this is nmake; for GCC, it is
+  GNU make.  (If you are building out of Bazaar, say "make bootstrap" or
+  "nmake bootstrap" instead.)
+
+  As the files are compiled, you will see some warning messages
+  declaring that some functions don't return a value, or that some data
+  conversions will be lossy, etc.  You can safely ignore these messages.
+  The warnings may be fixed in the main FSF source at some point, but
+  until then we will just live with them.
+
+  With GNU Make, you can use the -j command-line option to have Make
+  execute several commands at once, like this:
+
+    gmake -j 4 XMFLAGS="-j 3"
+
+  The XMFLAGS variable overrides the default behavior of GNU Make on
+  Windows, whereby recursive Make invocations reset the maximum number
+  of simultaneous commands to 1.  The above command allows up to 4
+  simultaneous commands at once in the top-level Make, and up to 3 in
+  each one of the recursive Make's; you can use other numbers of jobs,
+  if you wish.
+
+  If you are building from Bazaar, the following commands will produce
+  the Info manuals (which are not part of the Bazaar sources):
+
+    make info
+  or
+    nmake info
+
+  Note that you will need makeinfo.exe (from the GNU Texinfo package)
+  in order for this command to succeed.
+
+* Installing
+
+  To install Emacs after it has compiled, simply run `nmake install'
+  or `make install', depending on which version of the Make utility
+  do you have.
+
+  By default, Emacs will be installed in the location where it was
+  built, but a different location can be specified either using the
+  --prefix option to configure, or by setting INSTALL_DIR when running
+  make, like so:
+
+     make install INSTALL_DIR=D:/emacs
+
+  (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
+
+  The install process will run addpm to setup the registry entries, and
+  to create a Start menu icon for Emacs.
+
+* Make targets
+
+  The following make targets may be used by users building the source
+  distribution, or users who have checked out of Bazaar after
+  an initial bootstrapping.
+
+  make
+  Builds Emacs from the available sources and pre-compiled lisp files.
+
+  make install
+  Installs programs to the bin directory, and runs addpm to create
+  Start Menu icons.
+
+  make clean
+  Removes object and executable files produced by the build process in
+  the current configuration.  After make clean, you can rebuild with
+  the same configuration using make.
+
+  make distclean
+  In addition to the files removed by make clean, this also removes
+  Makefiles and other generated files to get back to the state of a
+  freshly unpacked source distribution.  Note that this will not remove
+  installed files, or the results of builds performed with different
+  compiler or optimization options than the current configuration.
+  After make distclean, it is necessary to run configure.bat followed
+  by make to rebuild.
+
+  make cleanall
+  Removes object and executable files that may have been created by
+  previous builds with different configure options, in addition to
+  the files produced by the current configuration.
+
+  make realclean
+  Removes the installed files in the bin subdirectory in addition to
+  the files removed by make cleanall.
+
+  make dist
+  Builds Emacs from the available sources and pre-compiled lisp files.
+  Packages Emacs binaries as full distribution and barebin distribution.
+
+  The following targets are intended only for use with the Bazaar sources.
+
+  make bootstrap
+  Creates a temporary emacs binary with lisp source files and
+  uses it to compile the lisp files.  Once the lisp files are built,
+  emacs is redumped with the compiled lisp.
+
+  make recompile
+  Recompiles any changed lisp files after an update.  This saves
+  doing a full bootstrap after every update.  If this or a subsequent
+  make fail, you probably need to perform a full bootstrap, though
+  running this target multiple times may eventually sort out the
+  interdependencies.
+
+  make maintainer-clean
+  Removes everything that can be recreated, including compiled lisp
+  files, to get back to the state of a fresh Bazaar tree.  After make
+  maintainer-clean, it is necessary to run configure.bat and make
+  bootstrap to rebuild.  Occasionally it may be necessary to run this
+  target after an update.
+
+* Creating binary distributions
+
+  Binary distributions (full and barebin distributions) can be
+  automatically built and packaged from source tarballs or a bzr
+  checkout.
+
+  When building Emacs binary distributions, the --distfiles argument
+  to configure.bat specifies files to be included in the bin directory
+  of the binary distributions. This is intended for libraries that are
+  not built as part of Emacs, e.g. image libraries.
+
+  For example, specifying
+
+       --distfiles D:\distfiles\libXpm.dll
+
+  results in libXpm.dll being copied from D:\distfiles to the
+  bin directory before packaging starts.
+
+  Multiple files can be specified using multiple --distfiles arguments:
+
+       --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
+
+  For packaging the binary distributions, the 'dist' make target uses
+  7-Zip (http://www.7-zip.org), which must be installed and available
+  on the Windows Path.
+
+
+* Trouble-shooting
+
+  The main problems that are likely to be encountered when building
+  Emacs stem from using an old version of GCC, or old MinGW or Windows API
+  headers.  Additionally, Cygwin ports of GNU make may require the Emacs
+  source tree to be mounted with text!=binary, because the makefiles
+  generated by configure.bat necessarily use DOS line endings.  Also,
+  Cygwin ports of make must run in UNIX mode, either by specifying
+  --unix on the command line, or MAKE_MODE=UNIX in the environment.
+
+  When configure runs, it attempts to detect when GCC itself, or the
+  headers it is using, are not suitable for building Emacs.  GCC version
+  2.95 or later is needed, because that is when the Windows port gained
+  sufficient support for anonymous structs and unions to cope with some
+  definitions from winnt.h that are used by addsection.c.
+  Older versions of the Windows API headers that come with Cygwin and MinGW
+  may be missing some definitions required by Emacs, or broken in other
+  ways.  In particular, uniscribe APIs were added to MinGW CVS only on
+  2006-03-26, so releases from before then cannot be used.
+
+  When in doubt about correctness of what configure did, look at the file
+  config.log, which shows all the failed test programs and compiler
+  messages associated with the failures.  If that doesn't give a clue,
+  please report the problems, together with the relevant fragments from
+  config.log, as bugs.
+
+  If configure succeeds, but make fails, install the Cygwin port of
+  Bash, even if the table above indicates that Emacs should be able to
+  build without sh.exe.  (Some versions of Windows shells are too dumb
+  for Makefile's used by Emacs.)
+
+  If you are using certain Cygwin builds of GCC, such as Cygwin version
+  1.1.8, you may need to specify some extra compiler flags like so:
+
+    configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
+      --ldflags -mwin32
+
+  However, the latest Cygwin versions, such as 1.3.3, don't need those
+  switches; you can simply use "configure --with-gcc".
+
+  We will attempt to auto-detect the need for these flags in a future
+  release.
+
+* Debugging
+
+  You should be able to debug Emacs using the debugger that is
+  appropriate for the compiler you used, namely DevStudio or Windbg if
+  compiled with MSVC, or GDB if compiled with GCC.  (GDB for Windows
+  is available from the MinGW site, http://www.mingw.org/download.shtml.)
+
+  When Emacs aborts due to a fatal internal error, Emacs on Windows
+  pops up an Emacs Abort Dialog asking you whether you want to debug
+  Emacs or terminate it.  If Emacs was built with MSVC, click YES
+  twice, and Windbg or the DevStudio debugger will start up
+  automatically.  If Emacs was built with GCC, first start GDB and
+  attach it to the Emacs process with the "gdb -p EMACS-PID" command,
+  where EMACS-PID is the Emacs process ID (which you can see in the
+  Windows Task Manager), type the "continue" command inside GDB, and
+  only then click YES on the abort dialog.  This will pass control to
+  the debugger, and you will be able to debug the cause of the fatal
+  error.
+
+  The single most important thing to find out when Emacs aborts or
+  crashes is where did that happen in the Emacs code.  This is called
+  "backtrace".
+
+  Emacs on Windows uses more than one thread.  When Emacs aborts due
+  to a fatal error, the current thread may not be the application
+  thread running Emacs code.  Therefore, to produce a meaningful
+  backtrace from a debugger, you need to instruct it to show the
+  backtrace for every thread.  With GDB, you do it like this:
+
+   (gdb) thread apply all backtrace
+
+  To run Emacs under a debugger to begin with, simply start it from
+  the debugger.  With GDB, chdir to the `src' directory (if you have
+  the source tree) or to a directory with the `.gdbinit' file (if you
+  don't have the source tree), and type these commands:
+
+    C:\whatever\src> gdb x:\path\to\emacs.exe
+    (gdb) run <ARGUMENTS TO EMACS>
+
+  Thereafter, use Emacs as usual; you can minimize the debugger
+  window, if you like.  The debugger will take control if and when
+  Emacs crashes.
+
+  Emacs functions implemented in C use a naming convention that reflects
+  their names in lisp.  The names of the C routines are the lisp names
+  prefixed with 'F', and with dashes converted to underscores.  For
+  example, the function call-process is implemented in C by
+  Fcall_process.  Similarly, lisp variables are prefixed with 'V', again
+  with dashes converted to underscores.  These conventions enable you to
+  easily set breakpoints or examine familiar lisp variables by name.
+
+  Since Emacs data is often in the form of a lisp object, and the
+  Lisp_Object type is difficult to examine manually in a debugger,
+  Emacs provides a helper routine called debug_print that prints out a
+  readable representation of a Lisp_Object.  If you are using GDB,
+  there is a .gdbinit file in the src directory which provides
+  definitions that are useful for examining lisp objects.  Therefore,
+  the following tips are mainly of interest when using MSVC.
+
+  The output from debug_print is sent to stderr, and to the debugger
+  via the OutputDebugString routine.  The output sent to stderr should
+  be displayed in the console window that was opened when the
+  emacs.exe executable was started.  The output sent to the debugger
+  should be displayed in its "Debug" output window.
+
+  When you are in the process of debugging Emacs and you would like to
+  examine the contents of a Lisp_Object variable, pop up the QuickWatch
+  window (QuickWatch has an eyeglass symbol on its button in the
+  toolbar).  In the text field at the top of the window, enter
+  debug_print(<variable>) and hit return.  For example, start and run
+  Emacs in the debugger until it is waiting for user input.  Then click
+  on the Break button in the debugger to halt execution.  Emacs should
+  halt in ZwUserGetMessage waiting for an input event.  Use the Call
+  Stack window to select the procedure w32_msp_pump up the call stack
+  (see below for why you have to do this).  Open the QuickWatch window
+  and enter debug_print(Vexec_path).  Evaluating this expression will
+  then print out the contents of the lisp variable exec-path.
+
+  If QuickWatch reports that the symbol is unknown, then check the call
+  stack in the Call Stack window.  If the selected frame in the call
+  stack is not an Emacs procedure, then the debugger won't recognize
+  Emacs symbols.  Instead, select a frame that is inside an Emacs
+  procedure and try using debug_print again.
+
+  If QuickWatch invokes debug_print but nothing happens, then check the
+  thread that is selected in the debugger.  If the selected thread is
+  not the last thread to run (the "current" thread), then it cannot be
+  used to execute debug_print.  Use the Debug menu to select the current
+  thread and try using debug_print again.  Note that the debugger halts
+  execution (e.g., due to a breakpoint) in the context of the current
+  thread, so this should only be a problem if you've explicitly switched
+  threads.
+
+\f
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
index b62dc0b746bf7bf326d05a5b00e64fb0dcd6899f..d3112ca50f128555cbabef397aca9ac2aa8f365e 100644 (file)
--- a/nt/README
+++ b/nt/README
 
 * Further information
 
-  There is a web page that serves as a FAQ for the Windows port of
-  Emacs (a.k.a. NTEmacs) at:
+  The FAQ for the MS Windows port of Emacs is distributed with Emacs
+  (info manual "efaq-w32"), and also available at
 
-       http://www.gnu.org/software/emacs/windows/ntemacs.html
+        http://www.gnu.org/software/emacs/manual/efaq-w32.html
 
   There is also a mailing list for discussing issues related to this
   port of Emacs.  For information about the list, see this Web page:
 
   Use the built in bug reporting functionality in Emacs so that it
   will be seen by the right people.  You can use the command M-x
-  report-emacs-bug to create and send the bug report, but in some
-  cases there is a function to report bugs in a specific package;
-  e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java
-  mode, etc.
-
+  report-emacs-bug to create and send the bug report.
 \f
 This file is part of GNU Emacs.
 
index a2881ce1914455b4de2aa8eee3e0fb7813c2c9a8..d81a308ae051c163a4bc485a308c28e2620f8039 100644 (file)
@@ -18,12 +18,6 @@ See the end of the file for license conditions.
   this file as part of the Emacs source distribution, please read
   those 2 files and not this one.
 
-  Answers to frequently asked questions, and further information about
-  this port of GNU Emacs and related software packages can be found via
-  http:
-
-       http://www.gnu.org/software/emacs/windows/
-
 * Preliminaries
 
   Along with this file should be six subdirectories (bin, etc, info,
@@ -242,14 +236,10 @@ See the end of the file for license conditions.
 
 * Further information
 
-  If you have access to the World Wide Web, I would recommend pointing
-  your favorite web browser to the following document (if you haven't
-  already):
-
-       http://www.gnu.org/software/emacs/windows/
+  The FAQ for the MS Windows port of Emacs is distributed with Emacs
+  (info manual "efaq-w32"), and also available at
 
-  This document serves as an FAQ and a source for further information
-  about the Windows port and related software packages.
+        http://www.gnu.org/software/emacs/manual/efaq-w32.html
 
   In addition to the FAQ, there is a mailing list for discussing issues
   related to the Windows port of Emacs.  For information about the
index 8f717fd41686381d393f6fd3b1635621c9d721a9..f98396bb81ed4989b568d00c0c5922407c716b37 100755 (executable)
@@ -60,7 +60,7 @@ rem [8] tested only on Windows XP.
 rem\r
 echo ****************************************************************\r
 echo *** THIS METHOD OF BUILDING EMACS IS NO LONGER SUPPORTED.     **\r
-echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL.MSYS.       **\r
+echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL.            **\r
 echo ****************************************************************\r
 :confirm_continue\r
 set /p answer=Continue running this script at your own risks ? (Y/N)\r
@@ -191,7 +191,7 @@ echo.
 echo. IMPORTANT: This method of building Emacs for MS-Windows is deprecated,\r
 echo. and could be removed in a future version of Emacs.  The preferred way\r
 echo  to build Emacs for MS-Windows from now on is using the MSYS environment\r
-echo. and MinGW development tools.  Please see nt/INSTALL.MSYS for details.\r
+echo. and MinGW development tools.  Please see nt/INSTALL for details.\r
 goto end\r
 \r
 rem ----------------------------------------------------------------------\r
index 8f2951700e8836be695054f251adf3638ae223eb..21acbe830530a010c448988398208b42335324d0 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Makefile improvements.
+       * Makefile.in (all, tags): Don't use double-colon rules, as they
+       are not portable according to POSIX.  Mark as phony.
+
 2012-12-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        Include <config.h> uniformly in oldXMenu sources.
index b08e6649cbd201cc7433a2e36321519b45623762..394bfb3ab500498f547a5b5d0a80653f0bb9c511 100644 (file)
@@ -85,7 +85,8 @@ OBJS =  Activate.o \
        SetSel.o \
       XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o
 
-all:: libXMenu11.a
+all: libXMenu11.a
+.PHONY: all
 
 ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
   $(C_SWITCH_X_SITE) \
@@ -139,5 +140,6 @@ distclean: clean
        rm -f Makefile
 maintainer-clean: distclean
 
-tags::
+tags:
        $(TAGS) -t *.[ch]
+.PHONY: tags
index 5d5a811b3c483c7ca773a98e40d5d334559cea0f..4e08178989ead1f43812a76fe12f6832d595cb05 100644 (file)
@@ -1,5 +1,464 @@
+2013-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * eval.c (Feval): Document the new use of `lexical'.
+
+2013-09-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Review and drop old frame resize hack.
+       * frame.h (struct frame): Remove force_flush_display_p.
+       * dispnew.c (update_frame): Adjust user and don't call
+       flush_frame here.  The comment has said that there was an issues
+       with redisplaying fringes, but I don't see any differences with
+       and without this hack.  Hopefully we can continue without it.
+       * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
+       current frame matrices twice if resized_p is set.
+
+2013-09-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Do not populate pure Xism x_sync to other ports.
+       * frame.h (x_sync): Move under HAVE_X_WINDOWS.
+       * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
+       * nsfns.m, w32xfns.c (x_sync): Remove no-op.
+       * w32term.h (x_sync): Remove prototype.
+
+2013-09-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Cleanup frame flushing.
+       * dispextern.h (struct redisplay_interface):
+       Drop flush_display_optional because flush_display is enough
+       for X and flushing via RIF is just a no-op for others.
+       * frame.h (flush_frame): New function.
+       * dispnew.c (update_frame):
+       * minibuf.c (read_minibuf):
+       * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
+       Use it.
+       * keyboard.c (detect_input_pending_run_timers): Do not flush
+       all frames but selected one in redisplay_preserve_echo_area.
+       * nsterm.m (ns_flush): Remove no-op.
+       (ns_redisplay_interface): Adjust user.
+       * w32term.h (x_flush): Remove no-op.
+       (w32_redisplay_interface): Adjust user.
+       * xterm.c (x_flush): Simplify because we do not flush all
+       frames at once any more.  Adjust comment.
+       (x_redisplay_interface): Adjust user.
+
+2013-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port --without-x --enable-gcc-warnings to Fedora 19.
+       * gfilenotify.c (globals_of_gfilenotify):
+       Call g_type_init only if using an older glib version that needs it.
+
+2013-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
+       (last_glyphless_glyph_merged_face_id): Remove declarations.
+       * dispextern.h (merge_glyphless_glyph_face): Add prototype.
+       * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
+       (last_glyphless_glyph_merged_face_id): Now static.
+       (merge_escape_glyph_face): New function, refactored from...
+       (get_next_display_element): ...here.
+       (merge_glyphless_glyph_face): New function, refactored from...
+       (produce_glyphless_glyph): ...here...
+       * term.c (produce_glyphless_glyph): ...and here.
+
+2013-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * eval.c (eval_sub): Only call Ffunction if necessary.
+
+2013-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Attempt to make redisplay more selective when changing cursor type.
+       * frame.h (struct frame): New bitfield cursor_type_changed.
+       * xdisp.c (cursor_type_changed): Remove.
+       (try_cursor_movement, redisplay_window, try_window_id)
+       (set_frame_cursor_types, try_window_reusing_current_matrix):
+       Adjust to use per-frame bitfield.
+       (redisplay_internal): Look for cursor type change on each visible
+       frame and consider all frames if cursor type has been changed on
+       the frame other than selected.  If cursor type has been changed on
+       selected frame only, do not use fast update.
+
+2013-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Attempt to make redisplay more selective when changing fonts.
+       * frame.h (struct frame): New bitfield fonts_changed.
+       * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
+       (adjust_frame_glyphs): Add prototype.
+       * dispnew.c (fonts_changed_p): Remove.
+       (adjust_glyphs): Remove because we do not
+       adjust matrices on all frames at once any more.
+       (adjust_frame_glyphs): Block and unblock input here.
+       (adjust_glyph_matrix): Use fonts_changed.
+       (change_frame_size_1): Use adjust_frame_glyphs.
+       * font.c (font_open_entity): Use fonts_changed.
+       * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
+       * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
+       * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
+       (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
+       (shrink_mini_window, Fresize_mini_window_internal)
+       (window_scroll_pixel_based, Fset_window_configuration)
+       (apply_window_adjustment, Fset_window_vscroll):
+       * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
+       Use adjust_frame_glyphs.
+       * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
+       (try_window_reusing_current_matrix, try_window_id, display_line)
+       (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
+       (redisplay_internal): Consider fonts_changed and adjust frame
+       matrices for each frame only if the frame is visible.  If font
+       has been changed on some frame during full redisplay, retry
+       only visible frames where the font has been actually changed.
+
+2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Cache current header and mode line height for each window.
+       * window.h (struct window): New fields mode_line_height
+       and header_line_height.
+       * window.c (make_window): Initialize them.
+       * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
+       (CURRENT_HEADER_LINE_HEIGHT): Use them.  Adjust comment.
+       (current_mode_line_height, current_header_line_height):
+       Remove declaration.
+       * xdisp.c (current_mode_line_height, current_header_line_height):
+       Remove.
+       (pos_visible_p, init_xdisp): Adjust user.
+       (redisplay_window): Invalidate mode_line_height and
+       header_line_height if current and desired matrices do not agree.
+
+2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
+       * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
+
+2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Make --without-x compatible with --enable-gcc-warnings.
+       * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
+       * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
+       members under HAVE_WINDOW_SYSTEM.
+       * keyboard.c (make_lispy_focus_out): Likewise.
+       (record_menu_key): Move under HAVE_MENUS.
+       * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
+       THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
+       (syms_of_xdisp): Adjust user.
+       (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
+       (start_hourglass, cancel_hourglass):
+       * xfaces.c (toplevel): Likewise with PT_PER_INCH,
+       clear_font_table_count, CLEAR_FONT_TABLE_COUNT
+       and CLEAR_FONT_TABLE_NFONTS.
+       (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
+       Declare only if HAVE_WINDOW_SYSTEM.
+       (lface_same_font_attributes_p, clear_face_gcs): Define only
+       if HAVE_WINDOW_SYSTEM.
+
+2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
+       * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
+       Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
+
+2013-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
+
+2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
+       This fixes a type error on hosts where ptrdiff_t is wider than int.
+
+2013-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keyboard.c (read_key_sequence_vs): New function.
+       (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
+       common code.
+
+       * callint.c (Fcall_interactively): Always return a vector for 'K'.
+
+2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Makefile improvements.
+       * Makefile.in (config.status): Don't use double-colon rules, as
+       they are not portable according to POSIX.  Fix shell typo with `;
+       I guess this rule has never been tested?
+       (VCSWITNESS): New macro, to override any environment var.
+
+2013-09-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.h (struct x_display_info): Do not track X connection
+       fd separately because it is always available from Display.
+       * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
+       Adjust users.
+
+2013-09-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * buffer.c (drop_overlay):
+       * fileio.c (restore_point_unwind): Prefer unchain_marker to
+       Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
+
+2013-09-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * buffer.c (Fmake_overlay, Fmove_overlay):
+       * intervals.c (set_point_from_marker):
+       * print.c (PRINTPREPARE): Prefer signal_error
+       to plain error and report unsuitable marker too.
+
+2013-09-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
+       for 'dragging' member.
+       (struct x_output): Remove set-but-unused leftovers
+       'left_before_move' and 'top_before_move'.
+       * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
+       * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
+       (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
+       (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
+       (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
+       (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
+       (x_scroll_bar_report_motion, x_set_offset): Related users changed.
+       * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
+
+2013-09-03  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsfont.m (INVALID_GLYPH): New define.
+       (nsfont_encode_char): Use INVALID_GLYPH.
+       (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
+
+2013-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.c (x_last_mouse_movement_time): Revert last change.
+       This code should use XDisplayMotionBufferSize to check display's
+       motion history first, and there are few other issues as well.
+       (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
+       (handle_one_xevent): Adjust user.
+
+2013-09-02  Martin Rudalics  <rudalics@gmx.at>
+
+       * dispnew.c (Flast_nonminibuf_frame): Move from here ...
+       * frame.c (Flast_nonminibuf_frame): ... to here.
+       (check_minibuf_window): Don't abort if no window was found
+       (Bug#15247).
+
+2013-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use XGetMotionEvents to ask the last mouse motion time from X server.
+       * xterm.c (X_MOTION_HISTORY): Default to 1.
+       (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
+       (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
+       (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
+       Ifdef away legacy code.
+       (XTmouse_position, x_scroll_bar_report_motion):
+       Use x_last_mouse_movement_time.
+       (handle_one_xevent): Use event.xunmap and not event.xmap when handling
+       UnmapNotify event.
+
+2013-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * msdos.c (last_mouse_window): Move to...
+       (dos_rawgetc): ...this function and adjust comment.
+       * nsterm.m (last_window): Rename to last_mouse_window, move to...
+       (mouseMoved): ...this function and adjust comment.
+       * w32term.c (last_window): Likewise with...
+       (w32_read_socket): ...this function.
+       * xterm.c (last_window): Likewise with...
+       (handle_one_xevent): ...this function.
+
+2013-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
+       * xterm.c (toplevel): Drop obsolete comment and move compose_status...
+       (handle_one_xevent): ...to here.
+       (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
+       otherwise.
+
+2013-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * msdos.c (IT_set_terminal_window): Remove no-op.
+       (initialize_msdos_display): Adjust terminal setup.
+       * w32console.c (w32con_set_terminal_window): Remove no-op.
+       (initialize_w32_display): Adjust terminal setup.
+       * w32term.c (w32_set_terminal_window): Remove no-op.
+       (w32_create_terminal): Adjust terminal setup.
+       * xterm.c (XTset_terminal_window): Remove no-op.
+       (x_create_terminal): Adjust terminal setup.
+
+2013-09-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
+       Remove no-ops.
+       (ns_create_terminal): Adjust terminal setup.
+       * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
+       Remove no-ops.
+       (w32_create_terminal): Adjust terminal setup.
+       * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
+       Remove no-ops.
+       (x_create_terminal): Adjust terminal setup.
+
+2013-09-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
+       (CLIP_TEXT_POS_FROM_MARKER): New macro.
+       * dispnew.c (buffer_posn_from_coords):
+       * window.c (Fwindow_end, displayed_window_lines):
+       * xdisp.c (redisplay_mode_lines): Use it.
+
+2013-09-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * fontset.c (face_for_char): Check char in the current face font first
+       if HAVE_NS (Bug#15138).
+
+2013-08-31  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.c (temp_output_buffer_show): Make sure window returned
+       by display_buffer is live (Bug#15213).
+
+2013-08-30  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Minor cleanup to avoid forward declarations.
+       * coding.h (struct ccl_spec): Remove forward declaration.
+       * composite.h (toplevel): Include font.h.
+       (struct composition_it, struct face, struct font_metrics):
+       Remove forward declaration.
+       * dispextern.h (struct image, struct atimer): Likewise.
+       * emacsgtkfixed.h (struct frame): Likewise.
+       * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
+       * font.h (struct font_driver, struct font, struct glyph_string)
+       (struct face): Remove forward declaration.
+       * fontset.h (struct face, struct font): Likewise.
+       * frame.h (toplevel): Style cleanup.
+       (enum output_method): Move to...
+       * termhooks.h (enum output_method): ...here.
+       (struct glyph, struct frame, struct ns_display_info)
+       (struct x_display_info, struct w32_display_info):
+       Remove forward declaration.
+       * xterm.h (toplevel): Include termhooks.h.
+       (struct font, struct window, struct glyph_matrix, struct frame)
+       (struct input_event, struct face, struct image): Remove forward
+       declaration.
+       * gtkutil.h (struct _widget_value): Likewise.
+       * keyboard.h (toplevel): Include termhooks.h.
+       (struct input_event): Remove forward declaration.
+
+2013-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * intervals.c (set_point_from_marker): New function.
+       * editfns.c (Fgoto_char):
+       * process.c (Finternal_default_process_filter):
+       * window.c (select_window_1): Use it.
+       * buffer.h (set_point_from_marker): Add prototype.
+
+2013-08-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (term_winsock): Call release_listen_threads before calling
+       WSACleanup.
+       (_sys_wait_accept): Wait for accept event in a loop with a finite
+       timeout, instead of waiting indefinitely.  Will hopefully avoid
+       hanging during exit because WSACleanup deadlocks waiting for the
+       event object to be released.  (Bug#14333)
+
+       * w32proc.c (release_listen_threads): New function, signals all
+       the reader threads that listen for connections to stop waiting.
+
+       * w32.h (release_listen_threads): Add prototype.
+
+2013-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
+       field of new marker (for sanity and safety).
+       * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
+       anyway because XMISCTYPE is a function and can't be an lvalue).
+
+2013-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.c (x_clear_area): Lost 7th arg because it is always False.
+       (x_after_update_window_line, x_scroll_bar_create):
+       (x_scroll_bar_set_handle, XTset_vertical_scroll_bar):
+       (handle_one_xevent, x_clear_frame_area):
+       * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
+       * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
+       * xterm.h (x_clear_area): Adjust prototype.
+
+2013-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Hook scanning and indentation functions to find_newline.  This helps
+       to avoid duplicated code and renders more respect to newline cache.
+       * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
+       * cmds.c (Fforward_line):
+       * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
+       Use find_newline and avoid unnecessary point movements.
+       * search.c (scan_newline): Implement on top of find_newline.
+
+2013-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
+       scoped code (bug#11258).
+
+2013-08-28  Davor Cubranic  <cubranic@stat.ubc.ca> (tiny change)
+
+       * nsterm.m (last_window): New variable.
+       (EV_TRAILER2): New macro.
+       (EV_TRAILER): Call EV_TRAILER2.
+       (mouseMoved:):  Add support for mouse-autoselect-window
+       on nextstep (Bug#6888).
+
+2013-08-28  Andreas Schwab  <schwab@suse.de>
+
+       * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
+       (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
+       Remove unused macro definitions.
+       (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
+       (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
+       Only define if emacs.
+
+2013-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Prefer enum glyph_row_area to int where appropriate.
+       * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
+       Fix comment.
+       (window_box, window_box_width, window_box_left, window_box_left_offset)
+       (window_box_right, window_box_right_offset): Adjust prototypes.
+       * xdisp.c (window_box, window_box_width, window_box_left)
+       (window_box_left_offset, window_box_right, window_box_right_offset):
+       Use enum glyph_row_area.  Adjust users and tweak comment where needed.
+       (window_box_edges): Likewise.  Lost 2nd arg since it is always ANY_AREA.
+       * nsterm.m (ns_clip_to_row):
+       * w32term.c (w32_clip_to_row):
+       * xterm.c (x_clip_to_row): Likewise.
+
+2013-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
+       (Fprevious_overlay_change): Fast path for buffer with no overlays.
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
+2013-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Redesign redisplay interface to drop global output_cursor.
+       * dispextern.h (struct redisplay_interface): Remove cursor_to member.
+       (toplevel): Remove declaration of output_cursor.
+       (set_output_cursor, x_cursor_to): Remove prototype.
+       * window.h (struct window): New member output_cursor.
+       (output_cursor_to): New function to replace RIF member.
+       * dispnew.c (redraw_overlapped_rows, update_marginal_area)
+       (update_text_area, set_window_cursor_after_update): Use it.
+       * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
+       (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
+       * nsterm.m (ns_update_window_begin, ns_update_window_end):
+       * w32term.c (x_update_window_begin, x_update_window_end):
+       * xterm.c (x_update_window_begin, x_update_window_end):
+       Adjust to use per-window output cursor.
+
 2013-08-27  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Simplify SELECT_TYPE-related code.
+       Like EMACS_TIME, this portability layer is no longer needed, since
+       Emacs has been using fd_set as a portability layer for some time.
+       * sysselect.h (FD_SETSIZE): Rename from MAXDESC.  All uses changed.
+       (SELECT_TYPE): Remove.  All uses changed to fd_set.
+       (fd_set) [!FD_SET]: New typedef.
+
        Simplify EMACS_TIME-related code.
        This portability layer is no longer needed, since Emacs has been
        using struct timespec as a portability layer for some time.
index 76a4e0c570344df2222c69987d26ec92e9b34baa..aa51108ffc2356e5bb4a26c96c4672218d245233 100644 (file)
@@ -23,7 +23,7 @@
 # script may need modifying in sync with changes made here.  Try to
 # avoid shell-ism because the DOS build has to use the DOS shell.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # Here are the things that we expect ../configure to edit.
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
@@ -548,14 +548,9 @@ stamp-oldxmenu: $(OLDXMENU_DEPS)
 
 $(OLDXMENU): $(OLDXMENU_TARGET)
 
-../config.status:: epaths.in
-       @echo "The file epaths.h needs to be set up from epaths.in."
-       @echo "Please run the `configure' script again."
-       exit 1
-
-../config.status:: config.in
-       @echo "The file config.h needs to be set up from config.in."
-       @echo "Please run the `configure' script again."
+../config.status: config.in epaths.in
+       @echo "The file ${?:.in=.h} needs to be set up from $?."
+       @echo "Please run the 'configure' script again."
        exit 1
 
 doc.o: buildobj.h
@@ -668,6 +663,9 @@ $(lisp): $(BOOTSTRAPEMACS)
 
 ## VCSWITNESS points to the file that holds info about the current checkout.
 ## We use it as a heuristic to decide when to rebuild loaddefs.el.
+## If empty it is ignored; the parent makefile can set it to some other value.
+VCSWITNESS =
+
 $(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
        cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe)
 
index ebb8ef58991deaa82e23c251a8d7c2e468364048..0989e63664ff858f8e5fbf916c74b34197db90ef 100644 (file)
@@ -3479,6 +3479,7 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
   p->charpos = 0;
   p->next = NULL;
   p->insertion_type = 0;
+  p->need_adjustment = 0;
   return val;
 }
 
@@ -3503,6 +3504,7 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos)
   m->charpos = charpos;
   m->bytepos = bytepos;
   m->insertion_type = 0;
+  m->need_adjustment = 0;
   m->next = BUF_MARKERS (buf);
   BUF_MARKERS (buf) = m;
   return obj;
@@ -3525,9 +3527,9 @@ free_marker (Lisp_Object marker)
    Any number of arguments, even zero arguments, are allowed.  */
 
 Lisp_Object
-make_event_array (register int nargs, Lisp_Object *args)
+make_event_array (ptrdiff_t nargs, Lisp_Object *args)
 {
-  int i;
+  ptrdiff_t i;
 
   for (i = 0; i < nargs; i++)
     /* The things that fit in a string
index e42dbb2befd6e6f0523ac99e01f1b159e36a2a09..ff05da6d0d9657bcfac7a3cbc298e6808072874c 100644 (file)
@@ -892,8 +892,8 @@ drop_overlay (struct buffer *b, struct Lisp_Overlay *ov)
   eassert (b == XBUFFER (Fmarker_buffer (ov->start)));
   modify_overlay (b, marker_position (ov->start),
                  marker_position (ov->end));
-  Fset_marker (ov->start, Qnil, Qnil);
-  Fset_marker (ov->end, Qnil, Qnil);
+  unchain_marker (XMARKER (ov->start));
+  unchain_marker (XMARKER (ov->end));
 
 }
 
@@ -3843,7 +3843,8 @@ for the front of the overlay advance when text is inserted there
 The fifth arg REAR-ADVANCE, if non-nil, makes the marker
 for the rear of the overlay advance when text is inserted there
 \(which means the text *is* included in the overlay).  */)
-  (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance)
+  (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer,
+   Lisp_Object front_advance, Lisp_Object rear_advance)
 {
   Lisp_Object overlay;
   struct buffer *b;
@@ -3852,12 +3853,11 @@ for the rear of the overlay advance when text is inserted there
     XSETBUFFER (buffer, current_buffer);
   else
     CHECK_BUFFER (buffer);
-  if (MARKERP (beg)
-      && ! EQ (Fmarker_buffer (beg), buffer))
-    error ("Marker points into wrong buffer");
-  if (MARKERP (end)
-      && ! EQ (Fmarker_buffer (end), buffer))
-    error ("Marker points into wrong buffer");
+
+  if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
+    signal_error ("Marker points into wrong buffer", beg);
+  if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
+    signal_error ("Marker points into wrong buffer", end);
 
   CHECK_NUMBER_COERCE_MARKER (beg);
   CHECK_NUMBER_COERCE_MARKER (end);
@@ -3983,12 +3983,10 @@ buffer.  */)
   if (NILP (Fbuffer_live_p (buffer)))
     error ("Attempt to move overlay to a dead buffer");
 
-  if (MARKERP (beg)
-      && ! EQ (Fmarker_buffer (beg), buffer))
-    error ("Marker points into wrong buffer");
-  if (MARKERP (end)
-      && ! EQ (Fmarker_buffer (end), buffer))
-    error ("Marker points into wrong buffer");
+  if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
+    signal_error ("Marker points into wrong buffer", beg);
+  if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
+    signal_error ("Marker points into wrong buffer", end);
 
   CHECK_NUMBER_COERCE_MARKER (beg);
   CHECK_NUMBER_COERCE_MARKER (end);
@@ -4170,6 +4168,9 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
 
   CHECK_NUMBER_COERCE_MARKER (pos);
 
+  if (!buffer_has_overlays ())
+    return Qnil;
+
   len = 10;
   /* We can't use alloca here because overlays_at can call xrealloc.  */
   overlay_vec = xmalloc (len * sizeof *overlay_vec);
@@ -4202,6 +4203,9 @@ end of the buffer.  */)
   CHECK_NUMBER_COERCE_MARKER (beg);
   CHECK_NUMBER_COERCE_MARKER (end);
 
+  if (!buffer_has_overlays ())
+    return Qnil;
+
   len = 10;
   overlay_vec = xmalloc (len * sizeof *overlay_vec);
 
@@ -4230,6 +4234,9 @@ the value is (point-max).  */)
 
   CHECK_NUMBER_COERCE_MARKER (pos);
 
+  if (!buffer_has_overlays ())
+    return make_number (ZV);
+
   len = 10;
   overlay_vec = xmalloc (len * sizeof *overlay_vec);
 
@@ -4269,6 +4276,9 @@ the value is (point-min).  */)
 
   CHECK_NUMBER_COERCE_MARKER (pos);
 
+  if (!buffer_has_overlays ())
+    return make_number (BEGV);
+
   /* At beginning of buffer, we know the answer;
      avoid bug subtracting 1 below.  */
   if (XINT (pos) == BEGV)
index bedb7890939eb4deaf5277ce49c5f9bc36016f41..169a15c7d0fa99183102c04bcd098fcf0d7007c9 100644 (file)
@@ -249,6 +249,7 @@ extern void temp_set_point (struct buffer *, ptrdiff_t);
 extern void set_point_both (ptrdiff_t, ptrdiff_t);
 extern void temp_set_point_both (struct buffer *,
                                 ptrdiff_t, ptrdiff_t);
+extern void set_point_from_marker (Lisp_Object);
 extern void enlarge_buffer_text (struct buffer *, ptrdiff_t);
 
 \f
index 25096af506846b1885fee62b5bb245eb3136840d..d31604b070eb487997e532bdd9f8824abccf7ef6 100644 (file)
@@ -616,8 +616,8 @@ invoke it.  If KEYS is omitted or nil, the return value of
            Fput_text_property (make_number (0),
                                make_number (SCHARS (callint_message)),
                                Qface, Qminibuffer_prompt, callint_message);
-           args[i] = Fread_key_sequence (callint_message,
-                                         Qnil, Qt, Qnil, Qnil);
+           args[i] = Fread_key_sequence_vector (callint_message,
+                                                Qnil, Qt, Qnil, Qnil);
            teml = args[i];
            visargs[i] = Fkey_description (teml, Qnil);
            unbind_to (speccount1, Qnil);
index ce91877f85e85f051a7fba22dbaf09895d6ab0ca..aeedb152f623ee2d8f389676b14a94e1cf62ee6b 100644 (file)
@@ -121,9 +121,7 @@ With positive N, a non-empty line at the end counts as one line
 successfully moved (for the return value).  */)
   (Lisp_Object n)
 {
-  ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-  ptrdiff_t pos, pos_byte;
-  EMACS_INT count, shortage;
+  ptrdiff_t opoint = PT, pos, pos_byte, shortage, count;
 
   if (NILP (n))
     count = 1;
@@ -134,16 +132,12 @@ successfully moved (for the return value).  */)
     }
 
   if (count <= 0)
-    shortage = scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1, 1);
+    pos = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1,
+                       &shortage, &pos_byte, 1);
   else
-    shortage = scan_newline (PT, PT_BYTE, ZV, ZV_BYTE, count, 1);
-
-  /* Since scan_newline does TEMP_SET_PT_BOTH,
-     and we want to set PT "for real",
-     go back to the old point and then come back here.  */
-  pos = PT;
-  pos_byte = PT_BYTE;
-  TEMP_SET_PT_BOTH (opoint, opoint_byte);
+    pos = find_newline (PT, PT_BYTE, ZV, ZV_BYTE, count,
+                       &shortage, &pos_byte, 1);
+
   SET_PT_BOTH (pos, pos_byte);
 
   if (shortage > 0
@@ -310,7 +304,7 @@ At the end, it runs `post-self-insert-hook'.  */)
   /* Barf if the key that invoked this was not a character.  */
   if (!CHARACTERP (last_command_event))
     bitch_at_user ();
-  {
+  else {
     int character = translate_char (Vtranslation_table_for_input,
                                    XINT (last_command_event));
     int val = internal_self_insert (character, XFASTINT (n));
index 7b7078e06fa9ffdb046e3e577a63099ae12d64e6..2c01a05d19759e8c0e89a52a1447e9806aaed989 100644 (file)
@@ -378,8 +378,6 @@ struct emacs_mule_spec
   struct composition_status cmp_status;
 };
 
-struct ccl_spec;
-
 struct undecided_spec
 {
   /* Inhibit null byte detection.  1 means always inhibit,
index 53665b36bd1821c92fc448da0fc5e23f758f8478..df1700937975803307723b32cc977cd28cf2156b 100644 (file)
@@ -25,6 +25,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef EMACS_COMPOSITE_H
 #define EMACS_COMPOSITE_H
 
+#include "font.h"
+
 INLINE_HEADER_BEGIN
 #ifndef COMPOSITE_INLINE
 # define COMPOSITE_INLINE INLINE
@@ -312,10 +314,6 @@ enum lglyph_indices
 #define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
                           ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
 
-struct composition_it;
-struct face;
-struct font_metrics;
-
 extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
 extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
 extern bool composition_gstring_p (Lisp_Object);
index c32577c41dcf3b191a55a6ce740b29d119ece330..e9f57d9fa22c5a4a1fc9896c57aeb1b9c2729080 100644 (file)
@@ -223,8 +223,16 @@ struct text_pos
 /* Set text position POS from marker MARKER.  */
 
 #define SET_TEXT_POS_FROM_MARKER(POS, MARKER)          \
-     (CHARPOS (POS) = marker_position ((MARKER)),      \
-      BYTEPOS (POS) = marker_byte_position ((MARKER)))
+  (CHARPOS (POS) = marker_position (MARKER),           \
+   BYTEPOS (POS) = marker_byte_position (MARKER))
+
+/* Like above, but clip POS within accessible range.  */
+
+#define CLIP_TEXT_POS_FROM_MARKER(POS, MARKER)         \
+  (CHARPOS (POS) = clip_to_bounds                      \
+   (BEGV, marker_position (MARKER), ZV),               \
+   BYTEPOS (POS) = clip_to_bounds                      \
+   (BEGV_BYTE, marker_byte_position (MARKER), ZV_BYTE))
 
 /* Set marker MARKER from text position POS.  */
 
@@ -758,11 +766,12 @@ void check_matrix_pointer_lossage (struct glyph_matrix *);
                             Glyph Rows
  ***********************************************************************/
 
-/* Area in window glyph matrix.  If values are added or removed, the
-   function mark_object in alloc.c has to be changed.  */
+/* Area in window glyph matrix.  If values are added or removed,
+   the function mark_glyph_matrix in alloc.c may need to be changed.  */
 
 enum glyph_row_area
 {
+  ANY_AREA = -1,
   LEFT_MARGIN_AREA,
   TEXT_AREA,
   RIGHT_MARGIN_AREA,
@@ -1193,12 +1202,6 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
       ((ROW)->phys_height - (ROW)->phys_ascent \
        > (ROW)->height - (ROW)->ascent)
 
-/* True means that fonts have been loaded since the last glyph
-   matrix adjustments.  The function redisplay_internal adjusts glyph
-   matrices when this flag is true.  */
-
-extern bool fonts_changed_p;
-
 /* A glyph for a space.  */
 
 extern struct glyph space_glyph;
@@ -1429,31 +1432,31 @@ struct glyph_string
 #define CURRENT_MODE_LINE_FACE_ID(W)           \
        (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))
 
-/* Return the current height of the mode line of window W.  If not
-   known from current_mode_line_height, look at W's current glyph
-   matrix, or return a default based on the height of the font of the
-   face `mode-line'.  */
+/* Return the current height of the mode line of window W.  If not known
+   from W->mode_line_height, look at W's current glyph matrix, or return
+   a default based on the height of the font of the face `mode-line'.  */
 
-#define CURRENT_MODE_LINE_HEIGHT(W)                            \
-     (current_mode_line_height >= 0                            \
-      ? current_mode_line_height                               \
-      : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)         \
-        ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)        \
-        : estimate_mode_line_height (XFRAME ((W)->frame),      \
-                                     CURRENT_MODE_LINE_FACE_ID (W))))
+#define CURRENT_MODE_LINE_HEIGHT(W)                                    \
+  (W->mode_line_height >= 0                                            \
+   ? W->mode_line_height                                               \
+   : (W->mode_line_height                                              \
+      = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix)                   \
+        ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix)                  \
+        : estimate_mode_line_height                                    \
+            (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
 
-/* Return the current height of the header line of window W.  If not
-   known from current_header_line_height, look at W's current glyph
-   matrix, or return an estimation based on the height of the font of
-   the face `header-line'.  */
+/* Return the current height of the header line of window W.  If not known
+   from W->header_line_height, look at W's current glyph matrix, or return
+   an estimation based on the height of the font of the face `header-line'.  */
 
 #define CURRENT_HEADER_LINE_HEIGHT(W)                          \
-      (current_header_line_height >= 0                         \
-       ? current_header_line_height                            \
-       : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)      \
-         ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)     \
-         : estimate_mode_line_height (XFRAME ((W)->frame),     \
-                                      HEADER_LINE_FACE_ID)))
+  (W->header_line_height >= 0                                  \
+   ? W->header_line_height                                     \
+   : (W->header_line_height                                    \
+      = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix)         \
+        ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix)        \
+        : estimate_mode_line_height                            \
+            (XFRAME (W->frame), HEADER_LINE_FACE_ID))))
 
 /* Return the height of the desired mode line of window W.  */
 
@@ -2818,19 +2821,9 @@ struct redisplay_interface
   void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
                                   bool mouse_face_overwritten_p);
 
-  /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
-     Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
-     are window-relative pixel positions.  */
-  void (*cursor_to) (struct window *w, int vpos, int hpos, int y, int x);
-
   /* Flush the display of frame F.  For X, this is XFlush.  */
   void (*flush_display) (struct frame *f);
 
-  /* Flush the display of frame F if non-NULL.  This is called
-     during redisplay, and should be NULL on systems which flush
-     automatically before reading input.  */
-  void (*flush_display_optional) (struct frame *f);
-
   /* Clear the mouse highlight in window W, if there is any.  */
   void (*clear_window_mouse_face) (struct window *w);
 
@@ -2901,11 +2894,6 @@ struct redisplay_interface
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-/* Structure forward declarations.  */
-
-struct image;
-
-
 /* Each image format (JPEG, TIFF, ...) supported is described by
    a structure of the type below.  */
 
@@ -3196,14 +3184,15 @@ int resize_mini_window (struct window *, int);
 void set_vertical_scroll_bar (struct window *);
 #endif
 int try_window (Lisp_Object, struct text_pos, int);
-void window_box (struct window *, int, int *, int *, int *, int *);
+void window_box (struct window *, enum glyph_row_area,
+                int *, int *, int *, int *);
 int window_box_height (struct window *);
 int window_text_bottom_y (struct window *);
-int window_box_width (struct window *, int);
-int window_box_left (struct window *, int);
-int window_box_left_offset (struct window *, int);
-int window_box_right (struct window *, int);
-int window_box_right_offset (struct window *, int);
+int window_box_width (struct window *, enum glyph_row_area);
+int window_box_left (struct window *, enum glyph_row_area);
+int window_box_left_offset (struct window *, enum glyph_row_area);
+int window_box_right (struct window *, enum glyph_row_area);
+int window_box_right_offset (struct window *, enum glyph_row_area);
 int estimate_mode_line_height (struct frame *, enum face_id);
 void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
                             NativeRectangle *, int);
@@ -3229,7 +3218,6 @@ int frame_mode_line_height (struct frame *);
 extern Lisp_Object Qtool_bar;
 extern bool redisplaying_p;
 extern int help_echo_showing_p;
-extern int current_mode_line_height, current_header_line_height;
 extern Lisp_Object help_echo_string, help_echo_window;
 extern Lisp_Object help_echo_object, previous_help_echo_string;
 extern ptrdiff_t help_echo_pos;
@@ -3243,6 +3231,7 @@ extern ptrdiff_t compute_display_string_pos (struct text_pos *,
 extern ptrdiff_t compute_display_string_end (ptrdiff_t,
                                             struct bidi_string_data *);
 extern void produce_stretch_glyph (struct it *);
+extern int merge_glyphless_glyph_face (struct it *);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
@@ -3260,9 +3249,6 @@ extern void x_insert_glyphs (struct window *, struct glyph_row *,
                             struct glyph *, enum glyph_row_area, int);
 extern void x_clear_end_of_line (struct window *, struct glyph_row *,
                                 enum glyph_row_area, int);
-
-extern struct cursor_pos output_cursor;
-
 extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
                                     enum glyph_row_area, int);
 extern void draw_phys_cursor_glyph (struct window *,
@@ -3272,10 +3258,6 @@ extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
                                       struct glyph *, int *, int *, int *);
 extern void erase_phys_cursor (struct window *);
 extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
-
-extern void set_output_cursor (struct cursor_pos *);
-extern void x_cursor_to (struct window *, int, int, int, int);
-
 extern void x_update_cursor (struct frame *, bool);
 extern void x_clear_cursor (struct window *);
 extern void x_draw_vertical_border (struct window *w);
@@ -3439,8 +3421,6 @@ extern frame_parm_handler x_frame_parm_handlers[];
 extern void start_hourglass (void);
 extern void cancel_hourglass (void);
 extern int hourglass_shown_p;
-
-struct atimer;                 /* Defined in atimer.h.  */
 /* If non-null, an asynchronous timer that, when it expires, displays
    an hourglass cursor on all frames.  */
 extern struct atimer *hourglass_atimer;
@@ -3492,7 +3472,7 @@ extern void cancel_line (int, struct frame *);
 extern void init_desired_glyphs (struct frame *);
 extern bool update_frame (struct frame *, bool, bool);
 extern void bitch_at_user (void);
-void adjust_glyphs (struct frame *);
+extern void adjust_frame_glyphs (struct frame *);
 void free_glyphs (struct frame *);
 void free_window_matrices (struct window *);
 void check_glyph_memory (void);
index 096416db56e32adf214226a3c8b85f3be2958556..c239d7ab745dee28e66bc8c38861135f4f005a75 100644 (file)
@@ -80,7 +80,6 @@ struct dim
 static void update_frame_line (struct frame *, int);
 static int required_matrix_height (struct window *);
 static int required_matrix_width (struct window *);
-static void adjust_frame_glyphs (struct frame *);
 static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool);
 static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
 static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
@@ -155,16 +154,6 @@ static int glyph_pool_count;
 
 static struct frame *frame_matrix_frame;
 
-/* True means that fonts have been loaded since the last glyph
-   matrix adjustments.  Redisplay must stop, and glyph matrices must
-   be adjusted when this flag becomes true during display.  The
-   reason fonts can be loaded so late is that fonts of fontsets are
-   loaded on demand.  Another reason is that a line contains many
-   characters displayed by zero width or very narrow glyphs of
-   variable-width fonts.  */
-
-bool fonts_changed_p;
-
 /* Convert vpos and hpos from frame to window and vice versa.
    This may only be used for terminal frames.  */
 
@@ -415,7 +404,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
      Get W's size.  */
   if (w)
     {
-      window_box (w, -1, 0, 0, &window_width, &window_height);
+      window_box (w, ANY_AREA, 0, 0, &window_width, &window_height);
 
       header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
       header_line_changed_p = header_line_p != matrix->header_line_p;
@@ -435,7 +424,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
                                  || right != matrix->right_margin_glyphs);
 
       if (!marginal_areas_changed_p
-         && !fonts_changed_p
+         && !XFRAME (w->frame)->fonts_changed
          && !header_line_changed_p
          && matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w)
          && matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w)
@@ -1801,37 +1790,17 @@ allocate_matrices_for_window_redisplay (struct window *w)
     }
 }
 
-
-/* Re-allocate/ re-compute glyph matrices on frame F.  If F is null,
-   do it for all frames; otherwise do it just for the given frame.
-   This function must be called when a new frame is created, its size
-   changes, or its window configuration changes.  */
+/* Allocate/reallocate glyph matrices of a single frame F.
+   This function must be called when a new frame is created,
+   its size changes, or its window configuration changes.  */
 
 void
-adjust_glyphs (struct frame *f)
+adjust_frame_glyphs (struct frame *f)
 {
   /* Block input so that expose events and other events that access
      glyph matrices are not processed while we are changing them.  */
   block_input ();
 
-  if (f)
-    adjust_frame_glyphs (f);
-  else
-    {
-      Lisp_Object tail, lisp_frame;
-
-      FOR_EACH_FRAME (tail, lisp_frame)
-       adjust_frame_glyphs (XFRAME (lisp_frame));
-    }
-
-  unblock_input ();
-}
-
-/* Allocate/reallocate glyph matrices of a single frame F.  */
-
-static void
-adjust_frame_glyphs (struct frame *f)
-{
   if (FRAME_WINDOW_P (f))
     adjust_frame_glyphs_for_window_redisplay (f);
   else
@@ -1841,6 +1810,8 @@ adjust_frame_glyphs (struct frame *f)
   adjust_decode_mode_spec_buffer (f);
 
   f->glyphs_initialized_p = 1;
+
+  unblock_input ();
 }
 
 /* Return true if any window in the tree has nonzero window margins.  See
@@ -3092,16 +3063,6 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
       /* Update windows.  */
       paused_p = update_window_tree (root_window, force_p);
       update_end (f);
-
-      /* This flush is a performance bottleneck under X,
-        and it doesn't seem to be necessary anyway (in general).
-         It is necessary when resizing the window with the mouse, or
-        at least the fringes are not redrawn in a timely manner.  ++kfs */
-      if (f->force_flush_display_p)
-       {
-         FRAME_RIF (f)->flush_display (f);
-         f->force_flush_display_p = 0;
-       }
     }
   else
     {
@@ -3225,8 +3186,8 @@ redraw_overlapped_rows (struct window *w, int yb)
 
          for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
            {
-             FRAME_RIF (f)->cursor_to (w, i, 0, row->y,
-                                        area == TEXT_AREA ? row->x : 0);
+             output_cursor_to (w, i, 0, row->y,
+                               area == TEXT_AREA ? row->x : 0);
              if (row->used[area])
                FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area],
                                              area, row->used[area]);
@@ -3483,7 +3444,7 @@ update_window (struct window *w, bool force_p)
       /* End the update of window W.  Don't set the cursor if we
          paused updating the display because in this case,
          set_window_cursor_after_update hasn't been called, and
-         output_cursor doesn't contain the cursor location.  */
+         W->output_cursor doesn't contain the cursor location.  */
       rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p);
     }
   else
@@ -3516,7 +3477,7 @@ update_marginal_area (struct window *w, struct glyph_row *updated_row,
   /* Set cursor to start of glyphs, write them, and clear to the end
      of the area.  I don't think that something more sophisticated is
      necessary here, since marginal areas will not be the default.  */
-  rif->cursor_to (w, vpos, 0, desired_row->y, 0);
+  output_cursor_to (w, vpos, 0, desired_row->y, 0);
   if (desired_row->used[area])
     rif->write_glyphs (w, updated_row, desired_row->glyphs[area],
                       area, desired_row->used[area]);
@@ -3554,7 +3515,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
          && !(current_row->mode_line_p && vpos > 0))
       || current_row->x != desired_row->x)
     {
-      rif->cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
+      output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
 
       if (desired_row->used[TEXT_AREA])
        rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA],
@@ -3697,7 +3658,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
                  break;
                }
 
-             rif->cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
+             output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
              rif->write_glyphs (w, updated_row, start,
                                 TEXT_AREA, i - start_hpos);
              changed_p = 1;
@@ -3707,7 +3668,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
       /* Write the rest.  */
       if (i < desired_row->used[TEXT_AREA])
        {
-         rif->cursor_to (w, vpos, i, desired_row->y, x);
+         output_cursor_to (w, vpos, i, desired_row->y, x);
          rif->write_glyphs (w, updated_row, desired_glyph,
                             TEXT_AREA, desired_row->used[TEXT_AREA] - i);
          changed_p = 1;
@@ -3729,8 +3690,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
        {
          /* If old row extends to the end of the text area, clear.  */
          if (i >= desired_row->used[TEXT_AREA])
-           rif->cursor_to (w, vpos, i, desired_row->y,
-                           desired_row->pixel_width);
+           output_cursor_to (w, vpos, i, desired_row->y,
+                             desired_row->pixel_width);
          rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1);
          changed_p = 1;
        }
@@ -3741,8 +3702,8 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
          int xlim;
 
          if (i >= desired_row->used[TEXT_AREA])
-           rif->cursor_to (w, vpos, i, desired_row->y,
-                           desired_row->pixel_width);
+           output_cursor_to (w, vpos, i, desired_row->y,
+                             desired_row->pixel_width);
 
          /* If cursor is displayed at the end of the line, make sure
             it's cleared.  Nowadays we don't have a phys_cursor_glyph
@@ -3841,7 +3802,6 @@ static void
 set_window_cursor_after_update (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
-  struct redisplay_interface *rif = FRAME_RIF (f);
   int cx, cy, vpos, hpos;
 
   /* Not intended for frame matrix updates.  */
@@ -3913,7 +3873,7 @@ set_window_cursor_after_update (struct window *w)
      Horizontal position is -1 when cursor is on the left fringe.   */
   hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1);
   vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1);
-  rif->cursor_to (w, vpos, hpos, cy, cx);
+  output_cursor_to (w, vpos, hpos, cy, cx);
 }
 
 
@@ -5078,9 +5038,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
      wrong thing with `face-remapping-alist' (bug#2044).  */
   Fset_buffer (w->contents);
   itdata = bidi_shelve_cache ();
-  SET_TEXT_POS_FROM_MARKER (startp, w->start);
-  CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
-  BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
+  CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
   start_display (&it, w, startp);
   /* start_display takes into account the header-line row, but IT's
      vpos still counts from the glyph row that includes the window's
@@ -5560,7 +5518,7 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth,
       w->cursor.vpos = w->cursor.y = 0;
   }
 
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   calculate_costs (f);
   SET_FRAME_GARBAGED (f);
   f->resized_p = 1;
@@ -6186,19 +6144,6 @@ WINDOW nil or omitted means report on the selected window.  */)
 {
   return decode_any_window (window)->cursor_off_p ? Qnil : Qt;
 }
-
-DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
-       Slast_nonminibuf_frame, 0, 0, 0,
-       doc: /* Value is last nonminibuffer frame. */)
-  (void)
-{
-  Lisp_Object frame = Qnil;
-
-  if (last_nonminibuf_frame)
-    XSETFRAME (frame, last_nonminibuf_frame);
-
-  return frame;
-}
 \f
 /***********************************************************************
                            Initialization
@@ -6217,7 +6162,6 @@ syms_of_display (void)
   defsubr (&Ssend_string_to_terminal);
   defsubr (&Sinternal_show_cursor);
   defsubr (&Sinternal_show_cursor_p);
-  defsubr (&Slast_nonminibuf_frame);
 
 #ifdef GLYPH_DEBUG
   defsubr (&Sdump_redisplay_history);
index 9e36655f3d3ae96d09842f787f7baffe763cb425..84a5c8395fcbe735862dd8e5f24321ff6dee12ab 100644 (file)
@@ -233,26 +233,12 @@ Beginning of buffer is position (point-min), end is (point-max).
 The return value is POSITION.  */)
   (register Lisp_Object position)
 {
-  ptrdiff_t pos;
-
-  if (MARKERP (position)
-      && current_buffer == XMARKER (position)->buffer)
-    {
-      pos = marker_position (position);
-      if (pos < BEGV)
-       SET_PT_BOTH (BEGV, BEGV_BYTE);
-      else if (pos > ZV)
-       SET_PT_BOTH (ZV, ZV_BYTE);
-      else
-       SET_PT_BOTH (pos, marker_byte_position (position));
-
-      return position;
-    }
-
-  CHECK_NUMBER_COERCE_MARKER (position);
-
-  pos = clip_to_bounds (BEGV, XINT (position), ZV);
-  SET_PT (pos);
+  if (MARKERP (position))
+    set_point_from_marker (position);
+  else if (INTEGERP (position))
+    SET_PT (clip_to_bounds (BEGV, XINT (position), ZV));
+  else
+    wrong_type_argument (Qinteger_or_marker_p, position);
   return position;
 }
 
index 8635ab652acfa635aabc83642c43f9ad9474369f..1e57eeb57c4dbd399ec7620dce027cb9568b2e80 100644 (file)
@@ -20,15 +20,14 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
-#include "emacsgtkfixed.h"
-#include <stdio.h>
-
 #include "lisp.h"
 #include "frame.h"
 #include "xterm.h"
 #ifdef HAVE_XWIDGETS
 #include "xwidget.h"
 #endif
+#include "emacsgtkfixed.h"
+
 /* Silence a bogus diagnostic; see GNOME bug 683906.  */
 #if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
 # pragma GCC diagnostic push
index 566be0c2a8399d61ea4afd458612c0bcf59501cb..6e964f6604bed98ab3c258dba018eb618fa11ffc 100644 (file)
@@ -2033,7 +2033,9 @@ it is defines a macro.  */)
 \f
 DEFUN ("eval", Feval, Seval, 1, 2, 0,
        doc: /* Evaluate FORM and return its value.
-If LEXICAL is t, evaluate using lexical scoping.  */)
+If LEXICAL is t, evaluate using lexical scoping.
+LEXICAL can also be an actual lexical environment, in the form of an
+alist mapping symbols to their value.  */)
   (Lisp_Object form, Lisp_Object lexical)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
@@ -2146,8 +2148,9 @@ eval_sub (Lisp_Object form)
 
   /* Optimize for no indirection.  */
   fun = original_fun;
-  if (SYMBOLP (fun) && !NILP (fun)
-      && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
+  if (!SYMBOLP (fun))
+    fun = Ffunction (Fcons (fun, Qnil));
+  else if (!NILP (fun) && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
     fun = indirect_function (fun);
 
   if (SUBRP (fun))
@@ -3151,20 +3154,17 @@ let_shadows_global_binding_p (Lisp_Object symbol)
   return 0;
 }
 
-/* `specpdl_ptr->symbol' is a field which describes which variable is
+/* `specpdl_ptr' describes which variable is
    let-bound, so it can be properly undone when we unbind_to.
-   It can have the following two shapes:
-   - SYMBOL : if it's a plain symbol, it means that we have let-bound
-     a symbol that is not buffer-local (at least at the time
-     the let binding started).  Note also that it should not be
+   It can be either a plain SPECPDL_LET or a SPECPDL_LET_LOCAL/DEFAULT.
+   - SYMBOL is the variable being bound.  Note that it should not be
      aliased (i.e. when let-binding V1 that's aliased to V2, we want
      to record V2 here).
-   - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for
-     variable SYMBOL which can be buffer-local.  WHERE tells us
-     which buffer is affected (or nil if the let-binding affects the
-     global value of the variable) and BUFFER tells us which buffer was
-     current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise
-     BUFFER did not yet have a buffer-local value).  */
+   - WHERE tells us in which buffer the binding took place.
+     This is used for SPECPDL_LET_LOCAL bindings (i.e. bindings to a
+     buffer-local variable) as well as for SPECPDL_LET_DEFAULT bindings,
+     i.e. bindings to the default value of a variable which can be
+     buffer-local.  */
 
 void
 specbind (Lisp_Object symbol, Lisp_Object value)
index a751a73ae5044c858b6c082464f0c0e50873f607..0e6113f349d3d5a3682a2dea4a22b6ed74b0a6e8 100644 (file)
@@ -233,7 +233,7 @@ void
 restore_point_unwind (Lisp_Object location)
 {
   Fgoto_char (location);
-  Fset_marker (location, Qnil, Qnil);
+  unchain_marker (XMARKER (location));
 }
 
 \f
index 6a8262623dc5170f0999bcb90fd1e4fc2c3c2209..2606a25dff8d53b3b70627866bcab3a4b35e03e3 100644 (file)
@@ -2866,14 +2866,14 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
     {
       FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
       FRAME_SMALLEST_FONT_HEIGHT (f) = height;
-      fonts_changed_p = 1;
+      f->fonts_changed = 1;
     }
   else
     {
       if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width)
-       FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, fonts_changed_p = 1;
+       FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, f->fonts_changed = 1;
       if (FRAME_SMALLEST_FONT_HEIGHT (f) > height)
-       FRAME_SMALLEST_FONT_HEIGHT (f) = height, fonts_changed_p = 1;
+       FRAME_SMALLEST_FONT_HEIGHT (f) = height, f->fonts_changed = 1;
     }
 #endif
 
@@ -3379,9 +3379,11 @@ register_font_driver (struct font_driver *driver, struct frame *f)
   struct font_driver_list *root = f ? f->font_driver_list : font_driver_list;
   struct font_driver_list *prev, *list;
 
+#ifdef HAVE_WINDOW_SYSTEM
   if (f && ! driver->draw)
     error ("Unusable font driver for a frame: %s",
           SDATA (SYMBOL_NAME (driver->type)));
+#endif /* HAVE_WINDOW_SYSTEM */
 
   for (prev = NULL, list = root; list; prev = list, list = list->next)
     if (EQ (list->driver->type, driver->type))
index adb4a582fd821eefbe4b94b034024e38557383eb..3e0d97baaacc97d0dc022f0aa1d2fa03a96026b7 100644 (file)
@@ -56,11 +56,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
 
-
-struct font_driver;
-struct font;
-struct glyph_string;
-
 /* An enumerator for each font property.  This is used as an index to
    the vector of FONT-SPEC and FONT-ENTITY.
 
@@ -487,8 +482,6 @@ struct font_bitmap
    this value.  */
 #define FONT_PIXEL_SIZE_QUANTUM 1
 
-struct face;
-
 #define FONT_INVALID_CODE 0xFFFFFFFF
 
 /* Font driver.  Members specified as "optional" can be NULL.  */
@@ -582,6 +575,8 @@ struct font_driver
                        unsigned *code, int nglyphs,
                        struct font_metrics *metrics);
 
+#ifdef HAVE_WINDOW_SYSTEM
+
   /* Optional.
      Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
      position of frame F with S->FACE and S->GC.  If WITH_BACKGROUND,
@@ -602,6 +597,8 @@ struct font_driver
      Free bitmap data in BITMAP.  */
   void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap);
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
   /* Optional.
      Return an outline data for glyph-code CODE of FONT.  The format
      of the outline data depends on the font-driver.  */
index 0bf716bf1b267d2afeb77aa12532be9d7cd8fb71..797d51ac0a76895544b7e650f7f1eed5e55e977d 100644 (file)
@@ -39,17 +39,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "intervals.h"
 #include "fontset.h"
 #include "window.h"
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
-#ifdef HAVE_NS
-#include "nsterm.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
 #include "termhooks.h"
-
 #include "font.h"
 
 /* FONTSET
@@ -944,6 +937,19 @@ face_for_char (struct frame *f, struct face *face, int c, int pos, Lisp_Object o
   if (ASCII_CHAR_P (c) || face->fontset < 0)
     return face->ascii_face->id;
 
+#ifdef HAVE_NS
+  if (face->font)
+    {
+      /* Fonts often have characters in other scripts, like symbol, even if they
+         don't match script: symbol.  So check if the character is present
+         in the current face first.  Only enable for NS for now, but should
+         perhaps be general?  */
+      Lisp_Object font_object;
+      XSETFONT (font_object, face->font);
+      if (font_has_char (f, font_object, c)) return face->id;
+    }
+#endif
+
   eassert (fontset_id_valid_p (face->fontset));
   fontset = FONTSET_FROM_ID (face->fontset);
   eassert (!BASE_FONTSET_P (fontset));
index fd16c7178f5f0885d5ef5d2eea77a9e98b2f838b..b8ef4789e71e0884e300b8fe54303ef49281cb5a 100644 (file)
@@ -26,8 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef EMACS_FONTSET_H
 #define EMACS_FONTSET_H
 
-struct face;
-
 extern void free_face_fontset (struct frame *, struct face *);
 extern int face_for_char (struct frame *, struct face *, int,
                           int, Lisp_Object);
@@ -42,7 +40,6 @@ extern Lisp_Object Qlatin;
 extern Lisp_Object fontset_name (int);
 extern Lisp_Object fontset_ascii (int);
 
-struct font;
 extern int face_for_font (struct frame *, Lisp_Object, struct face *);
 
 #endif /* EMACS_FONTSET_H */
index 5ee421bb9bf88259278ba2a3e1aa0467f281ddf2..692d224866cc1646ea18321fd75230910f6ae6e2 100644 (file)
@@ -224,7 +224,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
       FRAME_MENU_BAR_LINES (f) = nlines;
       set_menu_bar_lines_1 (f->root_window, nlines - olines);
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
     }
 }
 \f
@@ -712,7 +712,7 @@ affects all frames on the same terminal device.  */)
     change_frame_size (f, height, width, 0, 0, 0);
   }
 
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   calculate_costs (f);
   XSETFRAME (frame, f);
 
@@ -1078,6 +1078,19 @@ Otherwise, include all frames.  */)
   CHECK_LIVE_FRAME (frame);
   return prev_frame (frame, miniframe);
 }
+
+DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
+       Slast_nonminibuf_frame, 0, 0, 0,
+       doc: /* Return last non-minibuffer frame selected. */)
+  (void)
+{
+  Lisp_Object frame = Qnil;
+
+  if (last_nonminibuf_frame)
+    XSETFRAME (frame, last_nonminibuf_frame);
+
+  return frame;
+}
 \f
 /* Return 1 if it is ok to delete frame F;
    0 if all frames aside from F are invisible.
@@ -1095,7 +1108,7 @@ other_visible_frames (struct frame *f)
 
       /* Verify that we can still talk to the frame's X window,
         and note any recent change in visibility.  */
-#ifdef HAVE_WINDOW_SYSTEM
+#ifdef HAVE_X_WINDOWS
       if (FRAME_WINDOW_P (XFRAME (this)))
        x_sync (XFRAME (this));
 #endif
@@ -1120,6 +1133,8 @@ check_minibuf_window (Lisp_Object frame, int select)
 {
   struct frame *f = decode_live_frame (frame);
 
+  XSETFRAME (frame, f);
+
   if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window))
     {
       Lisp_Object frames, this, window = make_number (0);
@@ -1137,9 +1152,8 @@ check_minibuf_window (Lisp_Object frame, int select)
              }
          }
 
-      if (!WINDOWP (window))
-       emacs_abort ();
-      else
+      /* Don't abort if no window was found (Bug#15247).  */
+      if (WINDOWP (window))
        {
          /* Use set_window_buffer instead of Fset_window_buffer (see
             discussion of bug#11984, bug#12025, bug#12026).  */
@@ -4493,6 +4507,7 @@ automatically.  See also `mouse-autoselect-window'.  */);
   defsubr (&Sframe_list);
   defsubr (&Snext_frame);
   defsubr (&Sprevious_frame);
+  defsubr (&Slast_nonminibuf_frame);
   defsubr (&Sdelete_frame);
   defsubr (&Smouse_position);
   defsubr (&Smouse_pixel_position);
index 2dcb7562524390ac2946b2a3802b62ee10d67047..87e218ee938cdf61977103dbe700c2ae77a3b7de 100644 (file)
@@ -24,31 +24,13 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define EMACS_FRAME_H
 
 #include "dispextern.h"
+#include "termhooks.h"
 
 INLINE_HEADER_BEGIN
 #ifndef FRAME_INLINE
 # define FRAME_INLINE INLINE
 #endif
 
-\f
-/* Miscellanea.  */
-
-/* Nonzero means there is at least one garbaged frame.  */
-extern bool frame_garbaged;
-
-\f
-/* The structure representing a frame.  */
-
-enum output_method
-{
-  output_initial,
-  output_termcap,
-  output_x_window,
-  output_msdos_raw,
-  output_w32,
-  output_ns
-};
-
 enum vertical_scroll_bar_type
 {
   vertical_scroll_bar_none,
@@ -66,10 +48,7 @@ enum fullscreen_type
   FULLSCREEN_WAIT      = 0x100
 };
 
-
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
-
+/* The structure representing a frame.  */
 
 struct frame
 {
@@ -206,10 +185,6 @@ struct frame
      Clear the frame in clear_garbaged_frames if set.  */
   unsigned resized_p : 1;
 
-  /* Set to non-zero in when we want for force a flush_display in
-     update_frame, usually after resizing the frame.  */
-  unsigned force_flush_display_p : 1;
-
   /* Set to non-zero if the default face for the frame has been
      realized.  Reset to zero whenever the default face changes.
      Used to see the difference between a font change and face change.  */
@@ -231,6 +206,13 @@ struct frame
   unsigned external_tool_bar : 1;
 #endif
 
+  /* Nonzero means that fonts have been loaded since the last glyph
+     matrix adjustments.  */
+  unsigned fonts_changed : 1;
+
+  /* Nonzero means that cursor type has been changed.  */
+  unsigned cursor_type_changed : 1;
+
   /* Margin at the top of the frame.  Used to display the tool-bar.  */
   int tool_bar_lines;
 
@@ -884,6 +866,9 @@ default_pixels_per_inch_y (void)
 #define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
 #define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
 
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
+
 /* Return a pointer to the face cache of frame F.  */
 
 #define FRAME_FACE_CACHE(F)    (F)->face_cache
@@ -950,6 +935,9 @@ extern Lisp_Object Qtty_color_mode;
 extern Lisp_Object Qterminal;
 extern Lisp_Object Qnoelisp;
 
+/* Nonzero means there is at least one garbaged frame.  */
+extern bool frame_garbaged;
+
 extern struct frame *last_nonminibuf_frame;
 
 extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
@@ -1251,7 +1239,6 @@ extern Lisp_Object display_x_get_resource (Display_Info *,
 extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
 extern void x_set_window_size (struct frame *f, int change_grav,
                               int cols, int rows);
-extern void x_sync (struct frame *);
 extern Lisp_Object x_get_focus_frame (struct frame *);
 extern void x_set_mouse_position (struct frame *f, int h, int v);
 extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
@@ -1277,13 +1264,24 @@ extern void x_wm_set_icon_position (struct frame *, int, int);
 #if !defined USE_X_TOOLKIT
 extern char *x_get_resource_string (const char *, const char *);
 #endif
-#endif
+extern void x_sync (struct frame *);
+#endif /* HAVE_X_WINDOWS */
 
 extern void x_query_colors (struct frame *f, XColor *, int);
 extern void x_query_color (struct frame *f, XColor *);
 
 #endif /* HAVE_WINDOW_SYSTEM */
 \f
+
+FRAME_INLINE void
+flush_frame (struct frame *f)
+{
+  struct redisplay_interface *rif = FRAME_RIF (f);
+
+  if (rif && rif->flush_display)
+    rif->flush_display (f);
+}
+
 /***********************************************************************
                        Multimonitor data
  ***********************************************************************/
index 8f13c72df81d0dd7dd3751b9889cb90e16df5c43..7415c3a24135ab7de5de4b7b25833b094191e7bc 100644 (file)
@@ -249,7 +249,9 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'.  */)
 void
 globals_of_gfilenotify (void)
 {
+#if ! GLIB_CHECK_VERSION (2, 36, 0)
   g_type_init ();
+#endif
   watch_list = Qnil;
 }
 
index f03ca5928348acd5db82357e43b3ea9b99e1fcc7..6228f2150f582c5f97b54182b1396a0af4318c8d 100644 (file)
@@ -872,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f)
   if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
     {
       GtkWidget *wfixed = f->output_data.x->edit_widget;
+
       gtk_widget_queue_draw (wfixed);
       gdk_window_process_all_updates ();
-      x_clear_area (FRAME_X_DISPLAY (f),
-                    FRAME_X_WINDOW (f),
-                    0, 0,
-                    FRAME_PIXEL_WIDTH (f),
-                    FRAME_INTERNAL_BORDER_WIDTH (f), 0);
-      x_clear_area (FRAME_X_DISPLAY (f),
-                    FRAME_X_WINDOW (f),
-                    0, 0,
-                    FRAME_INTERNAL_BORDER_WIDTH (f),
-                    FRAME_PIXEL_HEIGHT (f), 0);
-      x_clear_area (FRAME_X_DISPLAY (f),
-                    FRAME_X_WINDOW (f),
-                    0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
-                    FRAME_PIXEL_WIDTH (f),
-                    FRAME_INTERNAL_BORDER_WIDTH (f), 0);
-      x_clear_area (FRAME_X_DISPLAY (f),
-                    FRAME_X_WINDOW (f),
-                    FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
-                    0,
-                    FRAME_INTERNAL_BORDER_WIDTH (f),
-                    FRAME_PIXEL_HEIGHT (f), 0);
+
+      x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+                   FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+      x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+                   FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
+
+      x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0,
+                   FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+                   FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+      x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                   FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+                   0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
     }
 }
 
@@ -3751,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f,
       gtk_widget_queue_draw (wfixed);
       gdk_window_process_all_updates ();
       if (oldx != -1 && oldw > 0 && oldh > 0)
-        {
-          /* Clear under old scroll bar position.  This must be done after
-             the gtk_widget_queue_draw and gdk_window_process_all_updates
-             above.  */
-          x_clear_area (FRAME_X_DISPLAY (f),
-                        FRAME_X_WINDOW (f),
-                        oldx, oldy, oldw, oldh, 0);
-        }
+       /* Clear under old scroll bar position.  This must be done after
+          the gtk_widget_queue_draw and gdk_window_process_all_updates
+          above.  */
+       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                     oldx, oldy, oldw, oldh);
 
       /* GTK does not redraw until the main loop is entered again, but
          if there are no X events pending we will not enter it.  So we sync
@@ -3792,7 +3783,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
 
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
 
-  if (wscroll && NILP (bar->dragging))
+  if (wscroll && bar->dragging == -1)
     {
       GtkAdjustment *adj;
       gdouble shown;
index 482331a89348b2943e6f44d13cd5d3396c16e3b4..fc959862fd346a8e49b04593ce641c27cdf8eaff 100644 (file)
@@ -74,8 +74,6 @@ typedef struct xg_menu_item_cb_data_
 
 } xg_menu_item_cb_data;
 
-struct _widget_value;
-
 extern struct _widget_value *malloc_widget_value (void);
 extern void free_widget_value (struct _widget_value *);
 
index bcc0fcd78a33b1e09276e8401675c4e1ccc46be1..1271376bcab07ebb0fddc4052441d499aaf79702 100644 (file)
@@ -30,13 +30,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 #include <setjmp.h>
-
 #include <c-ctype.h>
 
-/* This makes the fields of a Display accessible, in Xlib header files.  */
-
-#define XLIB_ILLEGAL_ACCESS
-
 #include "lisp.h"
 #include "frame.h"
 #include "window.h"
index 6aaf86579d731aa83853efde881cdbe073d9ce9d..891b42788ed80ec4c5f6c41348ccd68f590b0574 100644 (file)
@@ -510,15 +510,10 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
   register ptrdiff_t col = 0, prev_col = 0;
   EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM;
   ptrdiff_t end = endpos ? *endpos : PT;
-  ptrdiff_t scan, scan_byte;
-  ptrdiff_t next_boundary;
-  {
-  ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-  scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
-  scan = PT, scan_byte = PT_BYTE;
-  SET_PT_BOTH (opoint, opoint_byte);
+  ptrdiff_t scan, scan_byte, next_boundary;
+
+  scan = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &scan_byte, 1);
   next_boundary = scan;
-  }
 
   window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
   w = ! NILP (window) ? XWINDOW (window) : NULL;
@@ -835,14 +830,10 @@ This is the horizontal position of the character
 following any initial whitespace.  */)
   (void)
 {
-  Lisp_Object val;
-  ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-
-  scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
+  ptrdiff_t posbyte;
 
-  XSETFASTINT (val, position_indentation (PT_BYTE));
-  SET_PT_BOTH (opoint, opoint_byte);
-  return val;
+  find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &posbyte, 1);
+  return make_number (position_indentation (posbyte));
 }
 
 static ptrdiff_t
@@ -935,16 +926,13 @@ position_indentation (ptrdiff_t pos_byte)
 bool
 indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column)
 {
-  ptrdiff_t val;
-  ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-
-  SET_PT_BOTH (pos, pos_byte);
-  while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n')
-    scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0);
-
-  val = position_indentation (PT_BYTE);
-  SET_PT_BOTH (opoint, opoint_byte);
-  return val >= column;
+  while (pos > BEGV && FETCH_BYTE (pos_byte) == '\n')
+    {
+      DEC_BOTH (pos, pos_byte);
+      pos = find_newline (pos, pos_byte, BEGV, BEGV_BYTE,
+                         -1, NULL, &pos_byte, 0);
+    }
+  return position_indentation (pos_byte) >= column;
 }
 \f
 DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2,
index f2ddcd01507727f2ee90bc9f84cad2991ecfe456..ded536ca3c8bf5c1ddddba1d4ae3539a57a9a8b4 100644 (file)
@@ -1821,6 +1821,18 @@ set_point (ptrdiff_t charpos)
   set_point_both (charpos, buf_charpos_to_bytepos (current_buffer, charpos));
 }
 
+/* Set PT from MARKER's clipped position.  */
+
+void
+set_point_from_marker (Lisp_Object marker)
+{
+  if (XMARKER (marker)->buffer != current_buffer)
+    signal_error ("Marker points into wrong buffer", marker);
+  set_point_both
+    (clip_to_bounds (BEGV, marker_position (marker), ZV),
+     clip_to_bounds (BEGV_BYTE, marker_byte_position (marker), ZV_BYTE));
+}
+
 /* If there's an invisible character at position POS + TEST_OFFS in the
    current buffer, and the invisible property has a `stickiness' such that
    inserting a character at position POS would inherit the property it,
index a2f772dea8adb24c64f92e0eb6fea8ca52316e77..5996986bfb4b19e6e733b3d63c54669dbd493f26 100644 (file)
@@ -425,7 +425,9 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
                                         Lisp_Object *, ptrdiff_t);
 static Lisp_Object make_lispy_switch_frame (Lisp_Object);
 static Lisp_Object make_lispy_focus_in (Lisp_Object);
+#ifdef HAVE_WINDOW_SYSTEM
 static Lisp_Object make_lispy_focus_out (Lisp_Object);
+#endif /* HAVE_WINDOW_SYSTEM */
 static bool help_char_p (Lisp_Object);
 static void save_getcjmp (sys_jmp_buf);
 static void restore_getcjmp (sys_jmp_buf);
@@ -3213,6 +3215,8 @@ read_char (int commandflag, Lisp_Object map,
   RETURN_UNGCPRO (c);
 }
 
+#ifdef HAVE_MENUS
+
 /* Record a key that came from a mouse menu.
    Record it for echoing, for this-command-keys, and so on.  */
 
@@ -3248,6 +3252,8 @@ record_menu_key (Lisp_Object c)
   num_input_events++;
 }
 
+#endif /* HAVE_MENUS */
+
 /* Return true if should recognize C as "the help character".  */
 
 static bool
@@ -6095,12 +6101,17 @@ make_lispy_focus_in (Lisp_Object frame)
 {
   return list2 (Qfocus_in, frame);
 }
+
+#ifdef HAVE_WINDOW_SYSTEM
+
 static Lisp_Object
 make_lispy_focus_out (Lisp_Object frame)
 {
   return list2 (Qfocus_out, frame);
 }
-\f
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* Manipulating modifiers.  */
 
 /* Parse the name of SYMBOL, and return the set of modifiers it contains.
@@ -9738,54 +9749,11 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
   return t;
 }
 
-DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
-       doc: /* Read a sequence of keystrokes and return as a string or vector.
-The sequence is sufficient to specify a non-prefix command in the
-current local and global maps.
-
-First arg PROMPT is a prompt string.  If nil, do not prompt specially.
-Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
-as a continuation of the previous key.
-
-The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
-convert the last event to lower case.  (Normally any upper case event
-is converted to lower case if the original event is undefined and the lower
-case equivalent is defined.)  A non-nil value is appropriate for reading
-a key sequence to be defined.
-
-A C-g typed while in this function is treated like any other character,
-and `quit-flag' is not set.
-
-If the key sequence starts with a mouse click, then the sequence is read
-using the keymaps of the buffer of the window clicked in, not the buffer
-of the selected window as normal.
-
-`read-key-sequence' drops unbound button-down events, since you normally
-only care about the click or drag events which follow them.  If a drag
-or multi-click event is unbound, but the corresponding click event would
-be bound, `read-key-sequence' turns the event into a click event at the
-drag's starting position.  This means that you don't have to distinguish
-between click and drag, double, or triple events unless you want to.
-
-`read-key-sequence' prefixes mouse events on mode lines, the vertical
-lines separating windows, and scroll bars with imaginary keys
-`mode-line', `vertical-line', and `vertical-scroll-bar'.
-
-Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
-function will process a switch-frame event if the user switches frames
-before typing anything.  If the user switches frames in the middle of a
-key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
-is nil, then the event will be put off until after the current key sequence.
-
-`read-key-sequence' checks `function-key-map' for function key
-sequences, where they wouldn't conflict with ordinary bindings.  See
-`function-key-map' for more details.
-
-The optional fifth argument CMD-LOOP, if non-nil, means
-that this key sequence is being read by something that will
-read commands one after another.  It should be nil if the caller
-will read just one key sequence.  */)
-  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+static Lisp_Object
+read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
+                     Lisp_Object dont_downcase_last,
+                     Lisp_Object can_return_switch_frame,
+                     Lisp_Object cmd_loop, bool allow_string)
 {
   Lisp_Object keybuf[30];
   register int i;
@@ -9836,60 +9804,71 @@ will read just one key sequence.  */)
       QUIT;
     }
   UNGCPRO;
-  return unbind_to (count, make_event_array (i, keybuf));
+  return unbind_to (count,
+                   ((allow_string ? make_event_array : Fvector)
+                    (i, keybuf)));
 }
 
-DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
-       Sread_key_sequence_vector, 1, 5, 0,
-       doc: /* Like `read-key-sequence' but always return a vector.  */)
-  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
-{
-  Lisp_Object keybuf[30];
-  register int i;
-  struct gcpro gcpro1;
-  ptrdiff_t count = SPECPDL_INDEX ();
+DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
+       doc: /* Read a sequence of keystrokes and return as a string or vector.
+The sequence is sufficient to specify a non-prefix command in the
+current local and global maps.
 
-  if (!NILP (prompt))
-    CHECK_STRING (prompt);
-  QUIT;
+First arg PROMPT is a prompt string.  If nil, do not prompt specially.
+Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
+as a continuation of the previous key.
 
-  specbind (Qinput_method_exit_on_first_char,
-           (NILP (cmd_loop) ? Qt : Qnil));
-  specbind (Qinput_method_use_echo_area,
-           (NILP (cmd_loop) ? Qt : Qnil));
+The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
+convert the last event to lower case.  (Normally any upper case event
+is converted to lower case if the original event is undefined and the lower
+case equivalent is defined.)  A non-nil value is appropriate for reading
+a key sequence to be defined.
 
-  memset (keybuf, 0, sizeof keybuf);
-  GCPRO1 (keybuf[0]);
-  gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
+A C-g typed while in this function is treated like any other character,
+and `quit-flag' is not set.
 
-  if (NILP (continue_echo))
-    {
-      this_command_key_count = 0;
-      this_command_key_count_reset = 0;
-      this_single_command_key_start = 0;
-    }
+If the key sequence starts with a mouse click, then the sequence is read
+using the keymaps of the buffer of the window clicked in, not the buffer
+of the selected window as normal.
 
-#ifdef HAVE_WINDOW_SYSTEM
-  if (display_hourglass_p)
-    cancel_hourglass ();
-#endif
+`read-key-sequence' drops unbound button-down events, since you normally
+only care about the click or drag events which follow them.  If a drag
+or multi-click event is unbound, but the corresponding click event would
+be bound, `read-key-sequence' turns the event into a click event at the
+drag's starting position.  This means that you don't have to distinguish
+between click and drag, double, or triple events unless you want to.
 
-  i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
-                        prompt, ! NILP (dont_downcase_last),
-                        ! NILP (can_return_switch_frame), 0);
+`read-key-sequence' prefixes mouse events on mode lines, the vertical
+lines separating windows, and scroll bars with imaginary keys
+`mode-line', `vertical-line', and `vertical-scroll-bar'.
 
-#ifdef HAVE_WINDOW_SYSTEM
-  if (display_hourglass_p)
-    start_hourglass ();
-#endif
+Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
+function will process a switch-frame event if the user switches frames
+before typing anything.  If the user switches frames in the middle of a
+key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
+is nil, then the event will be put off until after the current key sequence.
 
-  if (i == -1)
-    {
-      Vquit_flag = Qt;
-      QUIT;
-    }
-  UNGCPRO;
-  return unbind_to (count, Fvector (i, keybuf));
+`read-key-sequence' checks `function-key-map' for function key
+sequences, where they wouldn't conflict with ordinary bindings.  See
+`function-key-map' for more details.
+
+The optional fifth argument CMD-LOOP, if non-nil, means
+that this key sequence is being read by something that will
+read commands one after another.  It should be nil if the caller
+will read just one key sequence.  */)
+  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+{
+  return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
+                              can_return_switch_frame, cmd_loop, true);
+}
+
+DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
+       Sread_key_sequence_vector, 1, 5, 0,
+       doc: /* Like `read-key-sequence' but always return a vector.  */)
+  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+{
+  return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
+                              can_return_switch_frame, cmd_loop, false);
 }
 \f
 /* Return true if input events are pending.  */
@@ -9920,20 +9899,7 @@ detect_input_pending_run_timers (bool do_display)
     get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW);
 
   if (old_timers_run != timers_run && do_display)
-    {
-      redisplay_preserve_echo_area (8);
-      /* The following fixes a bug when using lazy-lock with
-        lazy-lock-defer-on-the-fly set to t, i.e.  when fontifying
-        from an idle timer function.  The symptom of the bug is that
-        the cursor sometimes doesn't become visible until the next X
-        event is processed.  --gerd.  */
-      {
-        Lisp_Object tail, frame;
-        FOR_EACH_FRAME (tail, frame)
-          if (FRAME_RIF (XFRAME (frame)))
-            FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame));
-      }
-    }
+    redisplay_preserve_echo_area (8);
 
   return input_pending;
 }
index 0953f1b7cfd79dbca239ff640c9b444c4dcfee9a..1ee4a97c5c5b29aeaca7b30111e1157635834c70 100644 (file)
@@ -19,6 +19,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "systime.h"           /* for struct timespec, Time */
 #include "coding.h"             /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
+#include "termhooks.h"
 
 INLINE_HEADER_BEGIN
 #ifndef KEYBOARD_INLINE
@@ -477,9 +478,6 @@ extern bool ignore_mouse_drag_p;
 /* The primary selection.  */
 extern Lisp_Object QPRIMARY;
 
-/* Forward declaration for prototypes.  */
-struct input_event;
-
 extern Lisp_Object parse_modifiers (Lisp_Object);
 extern Lisp_Object reorder_modifiers (Lisp_Object);
 extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
index ef5e54d8cb684a9c8d6c4a1777e198c46e4d2cdf..dce1b17146b473b8521d9fe17e025bda4a04706d 100644 (file)
@@ -871,11 +871,7 @@ make_lisp_proc (struct Lisp_Process *p)
 #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
 #define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol))
 #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
-
-/* Misc types.  */
-
 #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
-#define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker)
 
 /* Pseudovector types.  */
 
@@ -2639,19 +2635,6 @@ typedef jmp_buf sys_jmp_buf;
    they are bound by a function application or a let form, stores the
    code to be executed for unwind-protect forms.
 
-   If func is non-zero, undoing this binding applies func to old_value;
-      This implements record_unwind_protect.
-
-   Otherwise, the element is a variable binding.
-
-   If the symbol field is a symbol, it is an ordinary variable binding.
-
-   Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER),
-   which means having bound a local value while CURRENT-BUFFER was active.
-   If WHERE is nil this means we saw the default value when binding SYMBOL.
-   WHERE being a buffer or frame means we saw a buffer-local or frame-local
-   value.  Other values of WHERE mean an internal error.
-
    NOTE: The specbinding union is defined here, because SPECPDL_INDEX is
    used all over the place, needs to be fast, and needs to know the size of
    union specbinding.  But only eval.c should access it.  */
@@ -3381,9 +3364,6 @@ extern Lisp_Object Qglyphless_char;
 extern Lisp_Object QCdata, QCfile;
 extern Lisp_Object QCmap;
 extern Lisp_Object Qrisky_local_variable;
-extern struct frame *last_glyphless_glyph_frame;
-extern int last_glyphless_glyph_face_id;
-extern int last_glyphless_glyph_merged_face_id;
 extern int noninteractive_need_newline;
 extern Lisp_Object echo_area_buffer[2];
 extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
@@ -3485,7 +3465,7 @@ build_unibyte_string (const char *str)
 }
 
 extern Lisp_Object make_multibyte_string (const char *, ptrdiff_t, ptrdiff_t);
-extern Lisp_Object make_event_array (int, Lisp_Object *);
+extern Lisp_Object make_event_array (ptrdiff_t, Lisp_Object *);
 extern Lisp_Object make_uninit_string (EMACS_INT);
 extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
 extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
@@ -3839,8 +3819,8 @@ extern ptrdiff_t fast_looking_at (Lisp_Object, ptrdiff_t, ptrdiff_t,
                                   ptrdiff_t, ptrdiff_t, Lisp_Object);
 extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
                               ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool);
-extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
-                              EMACS_INT, bool);
+extern ptrdiff_t scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
+                              ptrdiff_t, bool);
 extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t,
                                       ptrdiff_t, ptrdiff_t *);
 extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t,
index 7403fc6c32d8775af65253ced07f21ff5397c9ff..cc6f234f7dafa6729b4bf5795dc647bdf6d3a900 100644 (file)
@@ -672,12 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
       XWINDOW (minibuf_window)->cursor.x = 0;
       XWINDOW (minibuf_window)->must_be_updated_p = 1;
       update_frame (XFRAME (selected_frame), 1, 1);
-      {
-        struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
-        struct redisplay_interface *rif = FRAME_RIF (f);
-        if (rif && rif->flush_display)
-          rif->flush_display (f);
-      }
+      flush_frame (XFRAME (XWINDOW (minibuf_window)->frame));
     }
 
   /* Make minibuffer contents into a string.  */
index 3c78efbc47b548a41a7e967a4ce2d73c7fc53bea..7142c3ada773cecc39bb70738add0a64e1313208 100644 (file)
@@ -946,9 +946,6 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
                          Mouse Highlight (and friends..)
  ************************************************************************/
 
-/* Last window where we saw the mouse.  Used by mouse-autoselect-window.  */
-static Lisp_Object last_mouse_window;
-
 static int mouse_preempted = 0;        /* non-zero when XMenu gobbles mouse events */
 
 int
@@ -1546,11 +1543,6 @@ IT_reset_terminal_modes (struct terminal *term)
   term_setup_done = 0;
 }
 
-static void
-IT_set_terminal_window (struct frame *f, int foo)
-{
-}
-
 /* Remember the screen colors of the current frame, to serve as the
    default colors for newly-created frames.  */
 DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors,
@@ -1871,7 +1863,7 @@ initialize_msdos_display (struct terminal *term)
   term->ring_bell_hook = IT_ring_bell;
   term->reset_terminal_modes_hook = IT_reset_terminal_modes;
   term->set_terminal_modes_hook = IT_set_terminal_modes;
-  term->set_terminal_window_hook = IT_set_terminal_window;
+  term->set_terminal_window_hook = NULL;
   term->update_begin_hook = IT_update_begin;
   term->update_end_hook = IT_update_end;
   term->frame_up_to_date_hook = IT_frame_up_to_date;
@@ -2673,10 +2665,10 @@ dos_rawgetc (void)
          /* Generate SELECT_WINDOW_EVENTs when needed.  */
          if (!NILP (Vmouse_autoselect_window))
            {
-             mouse_window = window_from_coordinates (SELECTED_FRAME (),
-                                                     mouse_last_x,
-                                                     mouse_last_y,
-                                                     0, 0);
+             static Lisp_Object last_mouse_window;
+
+             mouse_window = window_from_coordinates
+               (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0);
              /* A window will be selected only when it is not
                 selected now, and the last mouse movement event was
                 not in it.  A minibuffer window will be selected iff
@@ -2691,10 +2683,9 @@ dos_rawgetc (void)
                  event.timestamp = event_timestamp ();
                  kbd_buffer_store_event (&event);
                }
+             /* Remember the last window where we saw the mouse.  */
              last_mouse_window = mouse_window;
            }
-         else
-           last_mouse_window = Qnil;
 
          previous_help_echo_string = help_echo_string;
          help_echo_string = help_echo_object = help_echo_window = Qnil;
index fc276c2b12d482b0e5b6d341a49ff2c2fb91f180..f021e834d594b8c6b2c4f6c68664c746163300da 100644 (file)
@@ -2231,15 +2231,6 @@ x_get_focus_frame (struct frame *frame)
   return nsfocus;
 }
 
-void
-x_sync (struct frame *f)
-{
-  /* XXX Not implemented XXX */
-  return;
-}
-
-
-
 /* ==========================================================================
 
     Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'.
index 235150e3aef16306725b90b780fffebae51ee826..e1c7d32dde037ec6570304038f1558e3459b9be5 100644 (file)
@@ -61,6 +61,7 @@ static void ns_uni_to_glyphs (struct nsfont_info *font_info,
 static void ns_glyph_metrics (struct nsfont_info *font_info,
                               unsigned char block);
 
+#define INVALID_GLYPH 0xFFFF
 
 /* ==========================================================================
 
@@ -981,7 +982,7 @@ nsfont_encode_char (struct font *font, int c)
     ns_uni_to_glyphs (font_info, high);
 
   g = font_info->glyphs[high][low];
-  return g == 0xFFFF ? FONT_INVALID_CODE : g;
+  return g == INVALID_GLYPH ? FONT_INVALID_CODE : g;
 }
 
 
@@ -1354,8 +1355,8 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
 #else
         g = glyphStorage->cglyphs[i];
         /* TODO: is this a good check?  maybe need to use coveredChars.. */
-        if (g > numGlyphs)
-          g = 0xFFFF; /* hopefully unused... */
+        if (g > numGlyphs || g == NSNullGlyph)
+          g = INVALID_GLYPH; /* hopefully unused... */
 #endif
         *glyphs = g;
       }
@@ -1483,7 +1484,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
         characterIndex: (NSUInteger)charIndex
 {
   len = glyphIndex+length;
-  for (i =glyphIndex; i<len; i++)
+  for (i =glyphIndex; i<len; i++) 
     cglyphs[i] = glyphs[i-glyphIndex];
   if (len > maxGlyph)
     maxGlyph = len;
index ec365df0c224fc6dd22f7c4832fd170481931a90..38d76e9389c15fdc7d313fc5de0e3326907b0444 100644 (file)
@@ -308,8 +308,13 @@ static CGPoint menu_mouse_point;
 /* This is a piece of code which is common to all the event handling
    methods.  Maybe it should even be a function.  */
 #define EV_TRAILER(e)                                                   \
-    {                                                                   \
-      XSETFRAME (emacs_event->frame_or_window, emacsframe);             \
+  {                                                                     \
+    XSETFRAME (emacs_event->frame_or_window, emacsframe);               \
+    EV_TRAILER2 (e);                                                    \
+  }
+
+#define EV_TRAILER2(e)                                                  \
+  {                                                                     \
       if (e) emacs_event->timestamp = EV_TIMESTAMP (e);                 \
       if (q_event_ptr)                                                  \
         {                                                               \
@@ -720,7 +725,7 @@ ns_update_window_begin (struct window *w)
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 
   NSTRACE (ns_update_window_begin);
-  set_output_cursor (&w->cursor);
+  w->output_cursor = w->cursor;
 
   block_input ();
 
@@ -756,8 +761,8 @@ ns_update_window_end (struct window *w, bool cursor_on_p,
 
       if (cursor_on_p)
        display_and_set_cursor (w, 1,
-                                output_cursor.hpos, output_cursor.vpos,
-                               output_cursor.x, output_cursor.y);
+                               w->output_cursor.hpos, w->output_cursor.vpos,
+                               w->output_cursor.x, w->output_cursor.y);
 
       if (draw_window_fringes (w, 1))
        x_draw_vertical_border (w);
@@ -796,18 +801,6 @@ ns_update_end (struct frame *f)
   NSTRACE (ns_update_end);
 }
 
-
-static void
-ns_flush (struct frame *f)
-/* --------------------------------------------------------------------------
-   external (RIF) call
-   NS impl is no-op since currently we flush in ns_update_end and elsewhere
-   -------------------------------------------------------------------------- */
-{
-    NSTRACE (ns_flush);
-}
-
-
 static void
 ns_focus (struct frame *f, NSRect *r, int n)
 /* --------------------------------------------------------------------------
@@ -885,7 +878,8 @@ ns_unfocus (struct frame *f)
 
 
 static void
-ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc)
+ns_clip_to_row (struct window *w, struct glyph_row *row,
+               enum glyph_row_area area, BOOL gc)
 /* --------------------------------------------------------------------------
      Internal (but parallels other terms): Focus drawing on given row
    -------------------------------------------------------------------------- */
@@ -954,24 +948,6 @@ ns_ring_bell (struct frame *f)
     }
 }
 
-
-static void
-ns_reset_terminal_modes (struct terminal *terminal)
-/*  Externally called as hook */
-{
-  NSTRACE (ns_reset_terminal_modes);
-}
-
-
-static void
-ns_set_terminal_modes (struct terminal *terminal)
-/*  Externally called as hook */
-{
-  NSTRACE (ns_set_terminal_modes);
-}
-
-
-
 /* ==========================================================================
 
     Frame / window manager related functions
@@ -1989,9 +1965,6 @@ ns_clear_frame (struct frame *f)
 
   mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
 
-  output_cursor.hpos = output_cursor.vpos = 0;
-  output_cursor.x = -1;
-
   r = [view bounds];
 
   block_input ();
@@ -2047,7 +2020,7 @@ ns_scroll_run (struct window *w, struct run *run)
   /* Get frame-relative bounding box of the text display area of W,
      without mode lines.  Include in this box the left and right
      fringe of W.  */
-  window_box (w, -1, &x, &y, &width, &height);
+  window_box (w, ANY_AREA, &x, &y, &width, &height);
 
   from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
   to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
@@ -2222,7 +2195,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
     }
 
   /* Must clip because of partially visible lines.  */
-  ns_clip_to_row (w, row, -1, YES);
+  ns_clip_to_row (w, row, ANY_AREA, YES);
 
   if (!p->overlay_p)
     {
@@ -2402,7 +2375,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
 
   /* TODO: only needed in rare cases with last-resort font in HELLO..
      should we do this more efficiently? */
-  ns_clip_to_row (w, glyph_row, -1, NO); /* do ns_focus(f, &r, 1); if remove */
+  ns_clip_to_row (w, glyph_row, ANY_AREA, NO); /* do ns_focus(f, &r, 1); if remove */
 
 
   face = FACE_FROM_ID (f, phys_cursor_glyph->face_id);
@@ -3713,7 +3686,7 @@ ns_set_vertical_scroll_bar (struct window *window,
   NSTRACE (ns_set_vertical_scroll_bar);
 
   /* Get dimensions.  */
-  window_box (window, -1, 0, &window_y, 0, &window_height);
+  window_box (window, ANY_AREA, 0, &window_y, 0, &window_height);
   top = window_y;
   height = window_height;
   width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f);
@@ -3978,9 +3951,7 @@ static struct redisplay_interface ns_redisplay_interface =
   ns_after_update_window_line,
   ns_update_window_begin,
   ns_update_window_end,
-  x_cursor_to,
-  ns_flush,
-  0, /* flush_display_optional */
+  0, /* flush_display */
   x_clear_window_mouse_face,
   x_get_glyph_overhangs,
   x_fix_overlapping_area,
@@ -4045,8 +4016,8 @@ ns_create_terminal (struct ns_display_info *dpyinfo)
   terminal->ins_del_lines_hook = 0; /* XXX vestigial? */
   terminal->delete_glyphs_hook = 0; /* XXX vestigial? */
   terminal->ring_bell_hook = ns_ring_bell;
-  terminal->reset_terminal_modes_hook = ns_reset_terminal_modes;
-  terminal->set_terminal_modes_hook = ns_set_terminal_modes;
+  terminal->reset_terminal_modes_hook = NULL;
+  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = ns_update_begin;
   terminal->update_end_hook = ns_update_end;
   terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */
@@ -4686,7 +4657,7 @@ not_in_argv (NSString *arg)
   int waiting = 1, nfds;
   char c;
 
-  SELECT_TYPE readfds, writefds, *wfds;
+  fd_set readfds, writefds, *wfds;
   struct timespec timeout, *tmo;
   NSAutoreleasePool *pool = nil;
 
@@ -4699,7 +4670,7 @@ not_in_argv (NSString *arg)
 
       if (waiting)
         {
-          SELECT_TYPE fds;
+          fd_set fds;
           FD_ZERO (&fds);
           FD_SET (selfds[0], &fds);
           result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
@@ -5468,6 +5439,30 @@ not_in_argv (NSString *arg)
   previous_help_echo_string = help_echo_string;
   help_echo_string = Qnil;
 
+  if (!NILP (Vmouse_autoselect_window))
+    {
+      NSTRACE (mouse_autoselect_window);
+      static Lisp_Object last_mouse_window;
+      Lisp_Object window = window_from_coordinates
+       (emacsframe, last_mouse_motion_position.x,
+        last_mouse_motion_position.y, 0, 0);
+
+      if (WINDOWP (window)
+          && !EQ (window, last_mouse_window)
+          && !EQ (window, selected_window)
+          && (focus_follows_mouse
+              || (EQ (XWINDOW (window)->frame,
+                      XWINDOW (selected_window)->frame))))
+        {
+          NSTRACE (in_window);
+          emacs_event->kind = SELECT_WINDOW_EVENT;
+          emacs_event->frame_or_window = window;
+          EV_TRAILER2 (e);
+        }
+      /* Remember the last window where we saw the mouse.  */
+      last_mouse_window = window;
+    }
+
   if (!note_mouse_movement (emacsframe, last_mouse_motion_position.x,
                             last_mouse_motion_position.y))
     help_echo_string = previous_help_echo_string;
index e55657d7d8c372f589b90dc6e90090faf19580dc..03e781cac18ba9e465e91010d573a666e80dafe1 100644 (file)
@@ -126,7 +126,8 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
          set_buffer_internal (XMARKER (printcharfun)->buffer);         \
        marker_pos = marker_position (printcharfun);                    \
        if (marker_pos < BEGV || marker_pos > ZV)                       \
-        error ("Marker is outside the accessible part of the buffer"); \
+        signal_error ("Marker is outside the accessible "              \
+                      "part of the buffer", printcharfun);             \
        old_point = PT;                                                 \
        old_point_byte = PT_BYTE;                                       \
        SET_PT_BOTH (marker_pos,                                                \
@@ -138,10 +139,10 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
    if (NILP (printcharfun))                                            \
      {                                                                 \
        Lisp_Object string;                                             \
-       if (NILP (BVAR (current_buffer, enable_multibyte_characters))           \
+       if (NILP (BVAR (current_buffer, enable_multibyte_characters))   \
           && ! print_escape_multibyte)                                 \
          specbind (Qprint_escape_multibyte, Qt);                       \
-       if (! NILP (BVAR (current_buffer, enable_multibyte_characters))         \
+       if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
           && ! print_escape_nonascii)                                  \
          specbind (Qprint_escape_nonascii, Qt);                                \
        if (print_buffer != 0)                                          \
@@ -168,7 +169,7 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
    if (NILP (printcharfun))                                            \
      {                                                                 \
        if (print_buffer_pos != print_buffer_pos_byte                   \
-          && NILP (BVAR (current_buffer, enable_multibyte_characters)))        \
+          && NILP (BVAR (current_buffer, enable_multibyte_characters)))\
         {                                                              \
           unsigned char *temp = alloca (print_buffer_pos + 1);         \
           copy_text ((unsigned char *) print_buffer, temp,             \
index 3b62f45bf0ab624c09bffdc7c0da90cb7b100abc..20f84990d6f84a5be55eec5f36fb5161a45aca63 100644 (file)
@@ -132,7 +132,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 #ifdef WINDOWSNT
-extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+extern int sys_select (int, fd_set *, fd_set *, fd_set *,
                       struct timespec *, void *);
 #endif
 
@@ -280,7 +280,7 @@ static bool process_output_skip;
 
 static void create_process (Lisp_Object, char **, Lisp_Object);
 #ifdef USABLE_SIGIO
-static bool keyboard_bit_set (SELECT_TYPE *);
+static bool keyboard_bit_set (fd_set *);
 #endif
 static void deactivate_process (Lisp_Object);
 static void status_notify (struct Lisp_Process *);
@@ -299,26 +299,26 @@ static void exec_sentinel (Lisp_Object proc, Lisp_Object reason);
 
 /* Mask of bits indicating the descriptors that we wait for input on.  */
 
-static SELECT_TYPE input_wait_mask;
+static fd_set input_wait_mask;
 
 /* Mask that excludes keyboard input descriptor(s).  */
 
-static SELECT_TYPE non_keyboard_wait_mask;
+static fd_set non_keyboard_wait_mask;
 
 /* Mask that excludes process input descriptor(s).  */
 
-static SELECT_TYPE non_process_wait_mask;
+static fd_set non_process_wait_mask;
 
 /* Mask for selecting for write.  */
 
-static SELECT_TYPE write_mask;
+static fd_set write_mask;
 
 #ifdef NON_BLOCKING_CONNECT
 /* Mask of bits indicating the descriptors that we wait for connect to
    complete on.  Once they complete, they are removed from this mask
    and added to the input_wait_mask and non_keyboard_wait_mask.  */
 
-static SELECT_TYPE connect_wait_mask;
+static fd_set connect_wait_mask;
 
 /* Number of bits set in connect_wait_mask.  */
 static int num_pending_connects;
@@ -331,7 +331,7 @@ static int max_process_desc;
 static int max_input_desc;
 
 /* Indexed by descriptor, gives the process (if any) for that descriptor */
-static Lisp_Object chan_process[MAXDESC];
+static Lisp_Object chan_process[FD_SETSIZE];
 
 /* Alist of elements (NAME . PROCESS) */
 static Lisp_Object Vprocess_alist;
@@ -342,18 +342,18 @@ static Lisp_Object Vprocess_alist;
    output from the process is to read at least one char.
    Always -1 on systems that support FIONREAD.  */
 
-static int proc_buffered_char[MAXDESC];
+static int proc_buffered_char[FD_SETSIZE];
 
 /* Table of `struct coding-system' for each process.  */
-static struct coding_system *proc_decode_coding_system[MAXDESC];
-static struct coding_system *proc_encode_coding_system[MAXDESC];
+static struct coding_system *proc_decode_coding_system[FD_SETSIZE];
+static struct coding_system *proc_encode_coding_system[FD_SETSIZE];
 
 #ifdef DATAGRAM_SOCKETS
 /* Table of `partner address' for datagram sockets.  */
 static struct sockaddr_and_len {
   struct sockaddr *sa;
   int len;
-} datagram_address[MAXDESC];
+} datagram_address[FD_SETSIZE];
 #define DATAGRAM_CHAN_P(chan)  (datagram_address[chan].sa != 0)
 #define DATAGRAM_CONN_P(proc)  (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0)
 #else
@@ -458,7 +458,7 @@ static struct fd_callback_data
 #define FOR_READ  1
 #define FOR_WRITE 2
   int condition; /* mask of the defines above.  */
-} fd_callback_info[MAXDESC];
+} fd_callback_info[FD_SETSIZE];
 
 
 /* Add a file descriptor FD to be monitored for when read is possible.
@@ -467,7 +467,7 @@ static struct fd_callback_data
 void
 add_read_fd (int fd, fd_callback func, void *data)
 {
-  eassert (fd < MAXDESC);
+  eassert (fd < FD_SETSIZE);
   add_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].func = func;
@@ -480,7 +480,7 @@ add_read_fd (int fd, fd_callback func, void *data)
 void
 delete_read_fd (int fd)
 {
-  eassert (fd < MAXDESC);
+  eassert (fd < FD_SETSIZE);
   delete_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].condition &= ~FOR_READ;
@@ -497,7 +497,7 @@ delete_read_fd (int fd)
 void
 add_write_fd (int fd, fd_callback func, void *data)
 {
-  eassert (fd < MAXDESC);
+  eassert (fd < FD_SETSIZE);
   FD_SET (fd, &write_mask);
   if (fd > max_input_desc)
     max_input_desc = fd;
@@ -528,7 +528,7 @@ delete_input_desc (int fd)
 void
 delete_write_fd (int fd)
 {
-  eassert (fd < MAXDESC);
+  eassert (fd < FD_SETSIZE);
   FD_CLR (fd, &write_mask);
   fd_callback_info[fd].condition &= ~FOR_WRITE;
   if (fd_callback_info[fd].condition == 0)
@@ -3232,7 +3232,7 @@ usage: (make-network-process &rest ARGS)  */)
             wait for completion is pselect(). */
          int sc;
          socklen_t len;
-         SELECT_TYPE fdset;
+         fd_set fdset;
        retry_select:
          FD_ZERO (&fdset);
          FD_SET (s, &fdset);
@@ -4232,8 +4232,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                             struct Lisp_Process *wait_proc, int just_wait_proc)
 {
   int channel, nfds;
-  SELECT_TYPE Available;
-  SELECT_TYPE Writeok;
+  fd_set Available;
+  fd_set Writeok;
   bool check_write;
   int check_delay;
   bool no_avail;
@@ -4387,8 +4387,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
         timeout to get our attention.  */
       if (update_tick != process_tick)
        {
-         SELECT_TYPE Atemp;
-         SELECT_TYPE Ctemp;
+         fd_set Atemp;
+         fd_set Ctemp;
 
           if (kbd_on_hold_p ())
             FD_ZERO (&Atemp);
@@ -4571,7 +4571,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                     the gnutls library -- 2.12.14 has been confirmed
                     to need it.  See
                     http://comments.gmane.org/gmane.emacs.devel/145074 */
-                 for (channel = 0; channel < MAXDESC; ++channel)
+                 for (channel = 0; channel < FD_SETSIZE; ++channel)
                    if (! NILP (chan_process[channel]))
                      {
                        struct Lisp_Process *p =
@@ -5178,15 +5178,10 @@ DEFUN ("internal-default-process-filter", Finternal_default_process_filter,
 
       bset_read_only (current_buffer, Qnil);
 
-      /* Insert new output into buffer
-        at the current end-of-output marker,
-        thus preserving logical ordering of input and output.  */
+      /* Insert new output into buffer at the current end-of-output
+        marker, thus preserving logical ordering of input and output.  */
       if (XMARKER (p->mark)->buffer)
-       SET_PT_BOTH (clip_to_bounds (BEGV,
-                                    marker_position (p->mark), ZV),
-                    clip_to_bounds (BEGV_BYTE,
-                                    marker_byte_position (p->mark),
-                                    ZV_BYTE));
+       set_point_from_marker (p->mark);
       else
        SET_PT_BOTH (ZV, ZV_BYTE);
       before = PT;
@@ -6542,7 +6537,7 @@ keyboard_bit_set (fd_set *mask)
 #else  /* not subprocesses */
 
 /* Defined on msdos.c.  */
-extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+extern int sys_select (int, fd_set *, fd_set *, fd_set *,
                       struct timespec *, void *);
 
 /* Implementation of wait_reading_process_output, assuming that there
@@ -6608,7 +6603,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
   while (1)
     {
       bool timeout_reduced_for_timers = 0;
-      SELECT_TYPE waitchannels;
+      fd_set waitchannels;
       int xerrno;
 
       /* If calling from keyboard input, do not quit
@@ -7072,7 +7067,7 @@ init_process_emacs (void)
 
   Vprocess_alist = Qnil;
   deleted_pid_list = Qnil;
-  for (i = 0; i < MAXDESC; i++)
+  for (i = 0; i < FD_SETSIZE; i++)
     {
       chan_process[i] = Qnil;
       proc_buffered_char[i] = -1;
index 2363fe2a290e601a94715b97d922d807e6c98eb6..1befececd22e1876b2fe43028ad603c3800bf53b 100644 (file)
@@ -257,15 +257,10 @@ xrealloc (void *block, size_t size)
 enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
 
 /* Dummy macros for non-Emacs environments.  */
-# define CHAR_CHARSET(c) 0
-# define CHARSET_LEADING_CODE_BASE(c) 0
 # define MAX_MULTIBYTE_LENGTH 1
 # define RE_MULTIBYTE_P(x) 0
 # define RE_TARGET_MULTIBYTE_P(x) 0
 # define WORD_BOUNDARY_P(c1, c2) (0)
-# define CHAR_HEAD_P(p) (1)
-# define SINGLE_BYTE_CHAR_P(c) (1)
-# define SAME_CHARSET_P(c1, c2) (1)
 # define BYTES_BY_CHAR_HEAD(p) (1)
 # define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
 # define STRING_CHAR(p) (*(p))
@@ -279,8 +274,6 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
   (c = ((p) == (str2) ? *((end1) - 1) : *((p) - 1)))
 # define GET_CHAR_AFTER(c, p, len)     \
   (c = *p, len = 1)
-# define MAKE_CHAR(charset, c1, c2) (c1)
-# define BYTE8_TO_CHAR(c) (c)
 # define CHAR_BYTE8_P(c) (0)
 # define CHAR_LEADING_CODE(c) (c)
 
@@ -775,10 +768,12 @@ extract_number_and_incr (re_char **source)
    and the 2 bytes of flags at the start of the range table.  */
 #define CHARSET_RANGE_TABLE(p) (&(p)[4 + CHARSET_BITMAP_SIZE (p)])
 
+#ifdef emacs
 /* Extract the bit flags that start a range table.  */
 #define CHARSET_RANGE_TABLE_BITS(p)            \
   ((p)[2 + CHARSET_BITMAP_SIZE (p)]            \
    + (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100)
+#endif
 
 /* Return the address of end of RANGE_TABLE.  COUNT is number of
    ranges (which is a pair of (start, end)) in the RANGE_TABLE.  `* 2'
@@ -1830,6 +1825,8 @@ struct range_table_work_area
   int bits;                    /* flag to record character classes */
 };
 
+#ifdef emacs
+
 /* Make sure that WORK_AREA can hold more N multibyte characters.
    This is used only in set_image_of_range and set_image_of_range_1.
    It expects WORK_AREA to be a pointer.
@@ -1848,15 +1845,6 @@ struct range_table_work_area
 #define SET_RANGE_TABLE_WORK_AREA_BIT(work_area, bit)          \
   (work_area).bits |= (bit)
 
-/* Bits used to implement the multibyte-part of the various character classes
-   such as [:alnum:] in a charset's range table.  */
-#define BIT_WORD       0x1
-#define BIT_LOWER      0x2
-#define BIT_PUNCT      0x4
-#define BIT_SPACE      0x8
-#define BIT_UPPER      0x10
-#define BIT_MULTIBYTE  0x20
-
 /* Set a range (RANGE_START, RANGE_END) to WORK_AREA.  */
 #define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end)   \
   do {                                                                 \
@@ -1865,6 +1853,8 @@ struct range_table_work_area
     (work_area).table[(work_area).used++] = (range_end);               \
   } while (0)
 
+#endif /* emacs */
+
 /* Free allocated memory for WORK_AREA.  */
 #define FREE_RANGE_TABLE_WORK_AREA(work_area)  \
   do {                                         \
@@ -1876,6 +1866,15 @@ struct range_table_work_area
 #define RANGE_TABLE_WORK_USED(work_area) ((work_area).used)
 #define RANGE_TABLE_WORK_BITS(work_area) ((work_area).bits)
 #define RANGE_TABLE_WORK_ELT(work_area, i) ((work_area).table[i])
+
+/* Bits used to implement the multibyte-part of the various character classes
+   such as [:alnum:] in a charset's range table.  */
+#define BIT_WORD       0x1
+#define BIT_LOWER      0x2
+#define BIT_PUNCT      0x4
+#define BIT_SPACE      0x8
+#define BIT_UPPER      0x10
+#define BIT_MULTIBYTE  0x20
 \f
 
 /* Set the bit for character C in a list.  */
index 761c12a364a7b4dd40aab42fb3deae571e000cb7..99e8d2501feb8bf50154bda4a3e1b731eb1ca926 100644 (file)
@@ -859,88 +859,20 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
    If ALLOW_QUIT, set immediate_quit.  That's good to do
    except in special cases.  */
 
-EMACS_INT
+ptrdiff_t
 scan_newline (ptrdiff_t start, ptrdiff_t start_byte,
              ptrdiff_t limit, ptrdiff_t limit_byte,
-             EMACS_INT count, bool allow_quit)
+             ptrdiff_t count, bool allow_quit)
 {
-  int direction = ((count > 0) ? 1 : -1);
-
-  unsigned char *cursor;
-  unsigned char *base;
-
-  ptrdiff_t ceiling;
-  unsigned char *ceiling_addr;
-
-  bool old_immediate_quit = immediate_quit;
-
-  if (allow_quit)
-    immediate_quit++;
+  ptrdiff_t charpos, bytepos, shortage;
 
-  if (count > 0)
-    {
-      while (start_byte < limit_byte)
-       {
-         ceiling =  BUFFER_CEILING_OF (start_byte);
-         ceiling = min (limit_byte - 1, ceiling);
-         ceiling_addr = BYTE_POS_ADDR (ceiling) + 1;
-         base = (cursor = BYTE_POS_ADDR (start_byte));
-
-         do
-           {
-             unsigned char *nl = memchr (cursor, '\n', ceiling_addr - cursor);
-             if (! nl)
-               break;
-             if (--count == 0)
-               {
-                 immediate_quit = old_immediate_quit;
-                 start_byte += nl - base + 1;
-                 start = BYTE_TO_CHAR (start_byte);
-                 TEMP_SET_PT_BOTH (start, start_byte);
-                 return 0;
-               }
-             cursor = nl + 1;
-           }
-         while (cursor < ceiling_addr);
-
-         start_byte += ceiling_addr - base;
-       }
-    }
+  charpos = find_newline (start, start_byte, limit, limit_byte,
+                         count, &shortage, &bytepos, allow_quit);
+  if (shortage)
+    TEMP_SET_PT_BOTH (limit, limit_byte);
   else
-    {
-      while (start_byte > limit_byte)
-       {
-         ceiling = BUFFER_FLOOR_OF (start_byte - 1);
-         ceiling = max (limit_byte, ceiling);
-         ceiling_addr = BYTE_POS_ADDR (ceiling);
-         base = (cursor = BYTE_POS_ADDR (start_byte - 1) + 1);
-         while (1)
-           {
-             unsigned char *nl = memrchr (ceiling_addr, '\n',
-                                          cursor - ceiling_addr);
-             if (! nl)
-               break;
-
-             if (++count == 0)
-               {
-                 immediate_quit = old_immediate_quit;
-                 /* Return the position AFTER the match we found.  */
-                 start_byte += nl - base + 1;
-                 start = BYTE_TO_CHAR (start_byte);
-                 TEMP_SET_PT_BOTH (start, start_byte);
-                 return 0;
-               }
-
-             cursor = nl;
-           }
-         start_byte += ceiling_addr - base;
-       }
-    }
-
-  TEMP_SET_PT_BOTH (limit, limit_byte);
-  immediate_quit = old_immediate_quit;
-
-  return count * direction;
+    TEMP_SET_PT_BOTH (charpos, bytepos);
+  return shortage;
 }
 
 /* Like find_newline, but doesn't allow QUITting and doesn't return
index e43991f41ab0cf215a4d0d7a7e219bdd33433fd3..6439697501e022bcbf21180578d52ec08f0bf0b4 100644 (file)
@@ -588,7 +588,7 @@ restore_signal_handlers (struct save_signal *saved_handlers)
 }
 \f
 #ifdef USABLE_SIGIO
-static int old_fcntl_flags[MAXDESC];
+static int old_fcntl_flags[FD_SETSIZE];
 #endif
 
 void
@@ -817,7 +817,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, bool flushp)
 \f
 
 #ifdef F_SETOWN
-static int old_fcntl_owner[MAXDESC];
+static int old_fcntl_owner[FD_SETSIZE];
 #endif /* F_SETOWN */
 
 /* This may also be defined in stdio,
index 0a4f7e3ad96cda918ca3a02a0d10b24cffe2c6cf..5df0af9ed37fb1f1ae23d53aa1a811308b4ada59 100644 (file)
@@ -25,15 +25,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    definitions in w32.h are incompatible with the below.  */
 #ifndef WINDOWSNT
 #ifdef FD_SET
-#ifdef FD_SETSIZE
-#define MAXDESC FD_SETSIZE
-#else
-#define MAXDESC 64
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 64
 #endif
-#define SELECT_TYPE fd_set
 #else /* no FD_SET */
-#define MAXDESC 32
-#define SELECT_TYPE int
+#define FD_SETSIZE 32
+typedef int fd_set;
 
 /* Define the macros to access a single-int bitmap of descriptors.  */
 #define FD_SET(n, p) (*(p) |= (1 << (n)))
index aa61fde06ee585dc95219c8014272406a7da9ec2..0270c1eefa66202afbe05464c41f8b762754e262 100644 (file)
@@ -1800,27 +1800,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
 static void
 produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
 {
-  int face_id;
-  int len;
+  int len, face_id = merge_glyphless_glyph_face (it);
   char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)];
   char const *str = "    ";
 
-  /* Get a face ID for the glyph by utilizing a cache (the same way as
-     done for `escape-glyph' in get_next_display_element).  */
-  if (it->f == last_glyphless_glyph_frame
-      && it->face_id == last_glyphless_glyph_face_id)
-    {
-      face_id = last_glyphless_glyph_merged_face_id;
-    }
-  else
-    {
-      /* Merge the `glyphless-char' face into the current face.  */
-      face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
-      last_glyphless_glyph_frame = it->f;
-      last_glyphless_glyph_face_id = it->face_id;
-      last_glyphless_glyph_merged_face_id = face_id;
-    }
-
   if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
     {
       /* As there's no way to produce a thin space, we produce a space
index b22367b6751351a7d41e40fa2f11bee0837c743c..e47d9701229adee67f0ba2b84e82880f8ab16239 100644 (file)
@@ -18,7 +18,9 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-\f
+#ifndef EMACS_TERMHOOKS_H
+#define EMACS_TERMHOOKS_H
+
 /* Miscellanea.   */
 
 #include "systime.h" /* for Time */
@@ -28,10 +30,6 @@ INLINE_HEADER_BEGIN
 # define TERMHOOKS_INLINE INLINE
 #endif
 
-struct glyph;
-struct frame;
-\f
-
 enum scroll_bar_part {
   scroll_bar_above_handle,
   scroll_bar_handle,
@@ -49,7 +47,18 @@ enum scroll_bar_part {
    may do something OS dependent, like extended window manager hints on X11.  */
 extern void (*fullscreen_hook) (struct frame *f);
 
-\f
+/* Output method of a terminal (and frames on this terminal, respectively).  */
+
+enum output_method
+{
+  output_initial,
+  output_termcap,
+  output_x_window,
+  output_msdos_raw,
+  output_w32,
+  output_ns
+};
+
 /* Input queue declarations and hooks.  */
 
 enum event_kind
@@ -324,11 +333,6 @@ extern void term_mouse_moveto (int, int);
 extern struct tty_display_info *gpm_tty;
 #endif
 
-\f
-struct ns_display_info;
-struct x_display_info;
-struct w32_display_info;
-
 /* Terminal-local parameters. */
 struct terminal
 {
@@ -663,3 +667,5 @@ extern void close_gpm (int gpm_fd);
 #endif
 
 INLINE_HEADER_END
+
+#endif /* EMACS_TERMHOOKS_H */
index 05a3fde97ce41cd223dbbf17f46f03df185a5892..1dcf46b5f4bc1b83819256e1986be0de8cf4ae0a 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -6092,6 +6092,7 @@ term_winsock (void)
 {
   if (winsock_lib != NULL && winsock_inuse == 0)
     {
+      release_listen_threads ();
       /* Not sure what would cause WSAENETDOWN, or even if it can happen
         after WSAStartup returns successfully, but it seems reasonable
         to allow unloading winsock anyway in that case. */
@@ -7076,7 +7077,12 @@ _sys_wait_accept (int fd)
   rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT);
   if (rc != SOCKET_ERROR)
     {
-      rc = WaitForSingleObject (hEv, INFINITE);
+      do {
+       rc = WaitForSingleObject (hEv, 500);
+       Sleep (5);
+      } while (rc == WAIT_TIMEOUT
+              && cp->status != STATUS_READ_ERROR
+              && cp->char_avail);
       pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
       if (rc == WAIT_OBJECT_0)
        cp->status = STATUS_READ_SUCCEEDED;
index 9c1f1efa6994755b87eb2c41c932822d99f2c984..32d0fdbe3cfabb134a6c51449a27f298beb6b6dd 100644 (file)
--- a/src/w32.h
+++ b/src/w32.h
@@ -163,6 +163,7 @@ extern void reset_standard_handles (int in, int out,
 /* Return the string resource associated with KEY of type TYPE.  */
 extern LPBYTE w32_get_resource (char * key, LPDWORD type);
 
+extern void release_listen_threads (void);
 extern void init_ntproc (int);
 extern void term_ntproc (int);
 extern void globals_of_w32 (void);
index a707344efc8ac71412e0009d7122d2f29b515702..8da1ccf1892dd939b91d8e46b7b1f71697cd9f77 100644 (file)
@@ -53,7 +53,6 @@ static void w32con_write_glyphs (struct frame *f, struct glyph *string, int len)
 static void w32con_delete_glyphs (struct frame *f, int n);
 static void w32con_reset_terminal_modes (struct terminal *t);
 static void w32con_set_terminal_modes (struct terminal *t);
-static void w32con_set_terminal_window (struct frame *f, int size);
 static void w32con_update_begin (struct frame * f);
 static void w32con_update_end (struct frame * f);
 static WORD w32_face_attributes (struct frame *f, int face_id);
@@ -497,11 +496,6 @@ w32con_update_end (struct frame * f)
   SetConsoleCursorPosition (cur_screen, cursor_coords);
 }
 
-static void
-w32con_set_terminal_window (struct frame *f, int size)
-{
-}
-
 /***********************************************************************
                        stubs from termcap.c
  ***********************************************************************/
@@ -619,7 +613,7 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
   term->ring_bell_hook         = w32_sys_ring_bell;
   term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
   term->set_terminal_modes_hook        = w32con_set_terminal_modes;
-  term->set_terminal_window_hook = w32con_set_terminal_window;
+  term->set_terminal_window_hook = NULL;
   term->update_begin_hook      = w32con_update_begin;
   term->update_end_hook                = w32con_update_end;
 
index b8c445a3a360f8eee02b9dad7a0517f4020da313..58c63d959efe089bbadc8b64fd9cf82983581591 100644 (file)
@@ -1637,7 +1637,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
       x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
       do_pending_window_change (0);
     }
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
 }
 
 
@@ -1679,7 +1679,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 
   FRAME_TOOL_BAR_LINES (f) = nlines;
   resize_frame_windows (f, FRAME_LINES (f), 0);
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
 
   /* We also have to make sure that the internal border at the top of
      the frame, below the menu bar or tool bar, is redrawn when the
@@ -6059,7 +6059,7 @@ Text larger than the specified size is clipped.  */)
     }
 
   FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w);
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   w->pseudo_window_p = 1;
 
   /* Display the tooltip text in a temporary buffer.  */
@@ -6128,7 +6128,7 @@ Text larger than the specified size is clipped.  */)
       width /= WINDOW_FRAME_COLUMN_WIDTH (w);
       w->total_cols = width;
       FRAME_TOTAL_COLS (f) = width;
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
       w->pseudo_window_p = 1;
       clear_glyph_matrix (w->desired_matrix);
       clear_glyph_matrix (w->current_matrix);
index 54316a6f80fa6efeade567a5ae2babf1415dff8d..dabaa62f71c59402647871e16f4e68865b952c9e 100644 (file)
@@ -990,6 +990,18 @@ find_child_pid (DWORD pid)
   return NULL;
 }
 
+void
+release_listen_threads (void)
+{
+  int i;
+
+  for (i = child_proc_count - 1; i >= 0; i--)
+    {
+      if (CHILD_ACTIVE (&child_procs[i])
+         && (fd_info[child_procs[i].fd].flags & FILE_LISTEN))
+       child_procs[i].status = STATUS_READ_ERROR;
+    }
+}
 
 /* Thread proc for child process and socket reader threads. Each thread
    is normally blocked until woken by select() to check for input by
index ba3aadd0b49809c8542e0fda1676a3f07576d126..681f70b5888cdf0daf2d3467a0a4ded57a54f447 100644 (file)
@@ -84,9 +84,6 @@ static int last_mousemove_y = 0;
 
 static int any_help_event_p;
 
-/* Last window where we saw the mouse.  Used by mouse-autoselect-window.  */
-static Lisp_Object last_window;
-
 extern unsigned int msh_mousewheel;
 
 extern void free_frame_menubar (struct frame *);
@@ -224,8 +221,6 @@ void x_wm_set_icon_pixmap (struct frame *, int);
 static void w32_initialize (void);
 static void x_update_end (struct frame *);
 static void w32_frame_up_to_date (struct frame *);
-static void w32_set_terminal_modes (struct terminal *);
-static void w32_reset_terminal_modes (struct terminal *);
 static void x_clear_frame (struct frame *);
 static void frame_highlight (struct frame *);
 static void frame_unhighlight (struct frame *);
@@ -240,7 +235,8 @@ static void x_frame_rehighlight (struct w32_display_info *);
 static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
 static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
                                enum text_cursor_kinds);
-static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC);
+static void w32_clip_to_row (struct window *, struct glyph_row *,
+                            enum glyph_row_area, HDC);
 static BOOL my_show_window (struct frame *, HWND, int);
 static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT);
 #if 0
@@ -576,8 +572,7 @@ x_update_begin (struct frame *f)
 }
 
 
-/* Start update of window W.  Set output_cursor to the cursor
-   position of W.  */
+/* Start update of window W.  */
 
 static void
 x_update_window_begin (struct window *w)
@@ -591,7 +586,7 @@ x_update_window_begin (struct window *w)
       SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
     }
 
-  set_output_cursor (&w->cursor);
+  w->output_cursor = w->cursor;
 
   block_input ();
 
@@ -683,9 +678,9 @@ x_update_window_end (struct window *w, bool cursor_on_p,
       block_input ();
 
       if (cursor_on_p)
-       display_and_set_cursor (w, 1, output_cursor.hpos,
-                               output_cursor.vpos,
-                               output_cursor.x, output_cursor.y);
+       display_and_set_cursor (w, 1,
+                               w->output_cursor.hpos, w->output_cursor.vpos,
+                               w->output_cursor.x, w->output_cursor.y);
 
       if (draw_window_fringes (w, 1))
        x_draw_vertical_border (w);
@@ -849,7 +844,7 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
     }
 
   /* Must clip because of partially visible lines.  */
-  w32_clip_to_row (w, row, -1, hdc);
+  w32_clip_to_row (w, row, ANY_AREA, hdc);
 
   if (p->which && p->which < max_fringe_bmp)
     {
@@ -934,28 +929,6 @@ w32_destroy_fringe_bitmap (int which)
   fringe_bmp[which] = 0;
 }
 
-
-\f
-/* This is called when starting Emacs and when restarting after
-   suspend.  When starting Emacs, no window is mapped.  And nothing
-   must be done to Emacs's own window if it is suspended (though that
-   rarely happens).  */
-
-static void
-w32_set_terminal_modes (struct terminal *term)
-{
-}
-
-/* This is called when exiting or suspending Emacs.  Exiting will make
-   the W32 windows go away, and suspending requires no action. */
-
-static void
-w32_reset_terminal_modes (struct terminal *term)
-{
-}
-
-
-\f
 /***********************************************************************
                           Display Iterator
  ***********************************************************************/
@@ -2651,11 +2624,7 @@ x_clear_frame (struct frame *f)
   /* Clearing the frame will erase any cursor, so mark them all as no
      longer visible.  */
   mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
-  output_cursor.hpos = output_cursor.vpos = 0;
-  output_cursor.x = -1;
 
-  /* We don't set the output cursor here because there will always
-     follow an explicit cursor_to.  */
   block_input ();
 
   w32_clear_window (f);
@@ -2693,19 +2662,6 @@ w32_ring_bell (struct frame *f)
   unblock_input ();
 }
 
-\f
-/* Specify how many text lines, from the top of the window,
-   should be affected by insert-lines and delete-lines operations.
-   This, and those operations, are used only within an update
-   that is bounded by calls to x_update_begin and x_update_end.  */
-
-static void
-w32_set_terminal_window (struct frame *f, int n)
-{
-  /* This function intentionally left blank.  */
-}
-
-\f
 /***********************************************************************
                              Line Dance
  ***********************************************************************/
@@ -2736,7 +2692,7 @@ x_scroll_run (struct window *w, struct run *run)
   /* Get frame-relative bounding box of the text display area of W,
      without mode lines.  Include in this box the left and right
      fringes of W.  */
-  window_box (w, -1, &x, &y, &width, &height);
+  window_box (w, ANY_AREA, &x, &y, &width, &height);
 
   /* If the fringe is adjacent to the left (right) scroll bar of a
      leftmost (rightmost, respectively) window, then extend its
@@ -3830,7 +3786,7 @@ w32_set_vertical_scroll_bar (struct window *w,
   bool fringe_extended_p;
 
   /* Get window dimensions.  */
-  window_box (w, -1, 0, &window_y, 0, &window_height);
+  window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
   top  = window_y;
   width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
   height = window_height;
@@ -4544,18 +4500,16 @@ w32_read_socket (struct terminal *terminal,
              /* Generate SELECT_WINDOW_EVENTs when needed.  */
              if (!NILP (Vmouse_autoselect_window))
                {
-                 Lisp_Object window;
-                 int x = LOWORD (msg.msg.lParam);
-                 int y = HIWORD (msg.msg.lParam);
-
-                 window = window_from_coordinates (f, x, y, 0, 0);
+                 static Lisp_Object last_mouse_window;
+                 Lisp_Object window = window_from_coordinates
+                   (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 0);
 
                  /* Window will be selected only when it is not
                     selected now and last mouse movement event was
                     not in it.  Minibuffer window will be selected
                     only when it is active.  */
                  if (WINDOWP (window)
-                     && !EQ (window, last_window)
+                     && !EQ (window, last_mouse_window)
                      && !EQ (window, selected_window)
                      /* For click-to-focus window managers
                         create event iff we don't leave the
@@ -4567,8 +4521,8 @@ w32_read_socket (struct terminal *terminal,
                      inev.kind = SELECT_WINDOW_EVENT;
                      inev.frame_or_window = window;
                    }
-
-                 last_window = window;
+                 /* Remember the last window where we saw the mouse.  */
+                 last_mouse_window = window;
                }
              if (!note_mouse_movement (f, &msg.msg))
                help_echo_string = previous_help_echo_string;
@@ -5123,7 +5077,8 @@ w32_read_socket (struct terminal *terminal,
    mode lines must be clipped to the whole window.  */
 
 static void
-w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc)
+w32_clip_to_row (struct window *w, struct glyph_row *row,
+                enum glyph_row_area area, HDC hdc)
 {
   RECT clip_rect;
   int window_x, window_y, window_width;
@@ -6303,11 +6258,6 @@ w32_make_rdb (char *xrm_option)
   return buffer;
 }
 
-void
-x_flush (struct frame * f)
-{ /* Nothing to do */ }
-
-
 extern frame_parm_handler w32_frame_parm_handlers[];
 
 static struct redisplay_interface w32_redisplay_interface =
@@ -6321,9 +6271,7 @@ static struct redisplay_interface w32_redisplay_interface =
   x_after_update_window_line,
   x_update_window_begin,
   x_update_window_end,
-  x_cursor_to,
-  x_flush,
-  0,  /* flush_display_optional */
+  0, /* flush_display */
   x_clear_window_mouse_face,
   x_get_glyph_overhangs,
   x_fix_overlapping_area,
@@ -6358,11 +6306,11 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
   terminal->ins_del_lines_hook = x_ins_del_lines;
   terminal->delete_glyphs_hook = x_delete_glyphs;
   terminal->ring_bell_hook = w32_ring_bell;
-  terminal->reset_terminal_modes_hook = w32_reset_terminal_modes;
-  terminal->set_terminal_modes_hook = w32_set_terminal_modes;
+  terminal->reset_terminal_modes_hook = NULL;
+  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = x_update_begin;
   terminal->update_end_hook = x_update_end;
-  terminal->set_terminal_window_hook = w32_set_terminal_window;
+  terminal->set_terminal_window_hook = NULL;
   terminal->read_socket_hook = w32_read_socket;
   terminal->frame_up_to_date_hook = w32_frame_up_to_date;
   terminal->mouse_position_hook = w32_mouse_position;
index 41c5c71832a922ae620499760d295b15dff56f5a..b4818f69aeed5827abe2a7e9901892f656100f76 100644 (file)
@@ -211,7 +211,6 @@ extern void x_set_window_size (struct frame *f, int change_grav,
                               int cols, int rows);
 extern int x_display_pixel_height (struct w32_display_info *);
 extern int x_display_pixel_width (struct w32_display_info *);
-extern void x_sync (struct frame *);
 extern Lisp_Object x_get_focus_frame (struct frame *);
 extern void x_set_mouse_position (struct frame *f, int h, int v);
 extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
index 19c6b72bf8981b051aa251eeec2e45070ab5d3c1..7629e49caf88240af30e1dc4bba74cc8d9c56ae4 100644 (file)
@@ -333,9 +333,3 @@ drain_message_queue (void)
     }
   return retval;
 }
-
-/* x_sync is a no-op on W32.  */
-void
-x_sync (struct frame *f)
-{
-}
index 1331ac014ffa3224ab98be02215313e4660e712a..410015e472e54fed5e5a3a0129c508782966901f 100644 (file)
@@ -39,13 +39,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "blockinput.h"
 #include "intervals.h"
 #include "termhooks.h"         /* For FRAME_TERMINAL.  */
-
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif /* HAVE_X_WINDOWS */
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
 #ifdef MSDOS
 #include "msdos.h"
 #endif
@@ -552,15 +548,7 @@ select_window_1 (Lisp_Object window, bool inhibit_point_swap)
      than one window.  It also matters when
      redisplay_window has altered point after scrolling,
      because it makes the change only in the window.  */
-  {
-    register ptrdiff_t new_point = marker_position (XWINDOW (window)->pointm);
-    if (new_point < BEGV)
-      SET_PT (BEGV);
-    else if (new_point > ZV)
-      SET_PT (ZV);
-    else
-      SET_PT (new_point);
-  }
+  set_point_from_marker (XWINDOW (window)->pointm);
 }
 
 DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0,
@@ -1505,7 +1493,6 @@ if it isn't already recorded.  */)
       && !noninteractive)
     {
       struct text_pos startp;
-      ptrdiff_t charpos = marker_position (w->start);
       struct it it;
       struct buffer *old_buffer = NULL;
       void *itdata = NULL;
@@ -1523,12 +1510,7 @@ if it isn't already recorded.  */)
          `-l' containing a call to `rmail' with subsequent other
          commands.  At the end, W->start happened to be BEG, while
          rmail had already narrowed the buffer.  */
-      if (charpos < BEGV)
-       SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
-      else if (charpos > ZV)
-       SET_TEXT_POS (startp, ZV, ZV_BYTE);
-      else
-       SET_TEXT_POS_FROM_MARKER (startp, w->start);
+      CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
 
       itdata = bidi_shelve_cache ();
       start_display (&it, w, startp);
@@ -2969,7 +2951,7 @@ window-start value is reasonable when this function is called.  */)
        }
     }
 
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   unblock_input ();
 
   run_window_configuration_change_hook (f);
@@ -3352,10 +3334,8 @@ temp_output_buffer_show (register Lisp_Object buf)
 
   if (!NILP (Vtemp_buffer_show_function))
     call1 (Vtemp_buffer_show_function, buf);
-  else
+  else if (WINDOW_LIVE_P (window = display_buffer (buf, Qnil, Qnil)))
     {
-      window = display_buffer (buf, Qnil, Qnil);
-
       if (!EQ (XWINDOW (window)->frame, selected_frame))
        Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
       Vminibuf_scroll_window = window;
@@ -3445,6 +3425,7 @@ make_window (void)
      non-Lisp data, so do it only for slots which should not be zero.  */
   w->nrows_scale_factor = w->ncols_scale_factor = 1;
   w->left_fringe_width = w->right_fringe_width = -1;
+  w->mode_line_height = w->header_line_height = -1;
   w->phys_cursor_type = -1;
   w->phys_cursor_width = -1;
   w->scroll_bar_width = -1;
@@ -3670,7 +3651,7 @@ be applied on the Elisp level.  */)
   windows_or_buffers_changed++;
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
 
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   unblock_input ();
 
   run_window_configuration_change_hook (f);
@@ -3940,7 +3921,7 @@ set correctly.  See the code of `split-window' for how this is done.  */)
 
   block_input ();
   window_resize_apply (p, horflag);
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   /* Set buffer of NEW to buffer of reference window.  Don't run
      any hooks.  */
   set_window_buffer (new, r->contents, 0, 1);
@@ -4072,7 +4053,7 @@ Signal an error when WINDOW is the only window on its frame.  */)
          recombine_windows (sibling);
        }
 
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
 
       if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
        /* We deleted the frame's selected window.  */
@@ -4159,7 +4140,7 @@ grow_mini_window (struct window *w, int delta)
       w->total_lines -= XINT (value);
       /* Enforce full redisplay.  FIXME: make it more selective.  */
       windows_or_buffers_changed++;
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
       unblock_input ();
     }
 }
@@ -4193,7 +4174,7 @@ shrink_mini_window (struct window *w)
          w->total_lines = 1;
          /* Enforce full redisplay.  FIXME: make it more selective.  */
          windows_or_buffers_changed++;
-         adjust_glyphs (f);
+         adjust_frame_glyphs (f);
          unblock_input ();
        }
       /* If the above failed for whatever strange reason we must make a
@@ -4234,7 +4215,7 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
 
       windows_or_buffers_changed++;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
       unblock_input ();
 
       run_window_configuration_change_hook (f);
@@ -4505,7 +4486,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
                 visible.  */
              w->vscroll = (it.last_visible_y
                            - it.current_y + it.max_ascent + it.max_descent);
-             adjust_glyphs (it.f);
+             adjust_frame_glyphs (it.f);
            }
          else
            {
@@ -5054,7 +5035,6 @@ displayed_window_lines (struct window *w)
 {
   struct it it;
   struct text_pos start;
-  ptrdiff_t charpos = marker_position (w->start);
   int height = window_box_height (w);
   struct buffer *old_buffer;
   int bottom_y;
@@ -5071,12 +5051,7 @@ displayed_window_lines (struct window *w)
   /* In case W->start is out of the accessible range, do something
      reasonable.  This happens in Info mode when Info-scroll-down
      calls (recenter -1) while W->start is 1.  */
-  if (charpos < BEGV)
-    SET_TEXT_POS (start, BEGV, BEGV_BYTE);
-  else if (charpos > ZV)
-    SET_TEXT_POS (start, ZV, ZV_BYTE);
-  else
-    SET_TEXT_POS_FROM_MARKER (start, w->start);
+  CLIP_TEXT_POS_FROM_MARKER (start, w->start);
 
   itdata = bidi_shelve_cache ();
   start_display (&it, w, start);
@@ -5788,7 +5763,7 @@ the return value is nil.  Otherwise the value is t.  */)
            ++n;
        }
 
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
       unblock_input ();
 
       /* Scan dead buffer windows.  */
@@ -6117,7 +6092,7 @@ apply_window_adjustment (struct window *w)
   clear_glyph_matrix (w->current_matrix);
   w->window_end_valid = 0;
   windows_or_buffers_changed++;
-  adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
+  adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
 }
 
 \f
@@ -6383,7 +6358,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL.  */)
          /* Adjust glyph matrix of the frame if the virtual display
             area becomes larger than before.  */
          if (w->vscroll < 0 && w->vscroll < old_dy)
-           adjust_glyphs (f);
+           adjust_frame_glyphs (f);
 
          /* Prevent redisplay shortcuts.  */
          XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
index de77dcabc85184444ab3e2d83df04c6562c0806b..f5ae81149b3decd0637fadfc5a5b8d08718fa0ca 100644 (file)
@@ -236,6 +236,9 @@ struct window
     /* Where the cursor actually is.  */
     struct cursor_pos phys_cursor;
 
+    /* Internally used for redisplay purposes.  */
+    struct cursor_pos output_cursor;
+
     /* Vertical cursor position as of last update that completed
        without pause.  This is the position of last_point.  */
     int last_cursor_vpos;
@@ -261,6 +264,12 @@ struct window
        A value of -1 means use frame values.  */
     int scroll_bar_width;
 
+    /* Effective height of the mode line, or -1 if not known.  */
+    int mode_line_height;
+
+    /* Effective height of the header line, or -1 if not known.  */
+    int header_line_height;
+
     /* Z - the buffer position of the last glyph in the current
        matrix of W.  Only valid if window_end_valid is nonzero.  */
     ptrdiff_t window_end_pos;
@@ -856,14 +865,6 @@ extern Lisp_Object minibuf_window;
 
 extern Lisp_Object minibuf_selected_window;
 
-/* Window that the mouse is over (nil if no mouse support).  */
-
-extern Lisp_Object Vmouse_window;
-
-/* Last mouse-click event (nil if no mouse support).  */
-
-extern Lisp_Object Vmouse_event;
-
 extern Lisp_Object make_window (void);
 extern Lisp_Object window_from_coordinates (struct frame *, int, int,
                                             enum window_part *, bool);
@@ -956,6 +957,22 @@ extern void init_window (void);
 extern void syms_of_window (void);
 extern void keys_of_window (void);
 
+/* Move cursor to row/column position VPOS/HPOS, pixel coordinates
+   Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
+   are window-relative pixel positions.  This is always done during
+   window update, so the position is the future output cursor position
+   for currently updated window W.  */
+
+WINDOW_INLINE void
+output_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
+{
+  eassert (w);
+  w->output_cursor.hpos = hpos;
+  w->output_cursor.vpos = vpos;
+  w->output_cursor.x = x;
+  w->output_cursor.y = y;
+}
+
 INLINE_HEADER_END
 
 #endif /* not WINDOW_H_INCLUDED */
index e3a6eca387f83959da3006202c10e857f32b2b85..b9a16ffcc434a82d949238083cdfe131a3d11061 100644 (file)
@@ -299,19 +299,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "font.h"
 #include "fontset.h"
 #include "blockinput.h"
-
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
-#ifdef HAVE_NS
-#include "nsterm.h"
-#endif
-#ifdef USE_GTK
-#include "gtkutil.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
 
 #include "font.h"
 #ifdef HAVE_XWIDGETS
@@ -526,10 +516,6 @@ int update_mode_lines;
 
 int windows_or_buffers_changed;
 
-/* Nonzero means a frame's cursor type has been changed.  */
-
-static int cursor_type_changed;
-
 /* Nonzero after display_mode_line if %l was used and it displayed a
    line number.  */
 
@@ -587,12 +573,6 @@ static int last_height;
 
 int help_echo_showing_p;
 
-/* If >= 0, computed, exact values of mode-line and header-line height
-   to use in the macros CURRENT_MODE_LINE_HEIGHT and
-   CURRENT_HEADER_LINE_HEIGHT.  */
-
-int current_mode_line_height, current_header_line_height;
-
 /* The maximum distance to look ahead for text properties.  Values
    that are too small let us call compute_char_face and similar
    functions too often which is expensive.  Values that are too large
@@ -764,6 +744,8 @@ Lisp_Object previous_help_echo_string;
 
 /* Platform-independent portion of hourglass implementation. */
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 /* Non-zero means an hourglass cursor is currently shown.  */
 int hourglass_shown_p;
 
@@ -771,6 +753,8 @@ int hourglass_shown_p;
    an hourglass cursor on all frames.  */
 struct atimer *hourglass_atimer;
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* Name of the face used to display glyphless characters.  */
 Lisp_Object Qglyphless_char;
 
@@ -780,14 +764,17 @@ static Lisp_Object Qglyphless_char_display;
 /* Method symbols for Vglyphless_char_display.  */
 static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
 
-/* Default pixel width of `thin-space' display method.  */
-#define THIN_SPACE_WIDTH 1
-
 /* Default number of seconds to wait before displaying an hourglass
    cursor.  */
 #define DEFAULT_HOURGLASS_DELAY 1
 
-\f
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* Default pixel width of `thin-space' display method.  */
+#define THIN_SPACE_WIDTH 1
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* Function prototypes.  */
 
 static void setup_for_ellipsis (struct it *, int);
@@ -973,12 +960,12 @@ window_text_bottom_y (struct window *w)
   return height;
 }
 
-/* Return the pixel width of display area AREA of window W.  AREA < 0
-   means return the total width of W, not including fringes to
-   the left and right of the window.  */
+/* Return the pixel width of display area AREA of window W.
+   ANY_AREA means return the total width of W, not including
+   fringes to the left and right of the window.  */
 
 int
-window_box_width (struct window *w, int area)
+window_box_width (struct window *w, enum glyph_row_area area)
 {
   int cols = w->total_cols;
   int pixels = 0;
@@ -1056,11 +1043,11 @@ window_box_height (struct window *w)
 }
 
 /* Return the window-relative coordinate of the left edge of display
-   area AREA of window W.  AREA < 0 means return the left edge of the
+   area AREA of window W.  ANY_AREA means return the left edge of the
    whole window, to the right of the left fringe of W.  */
 
 int
-window_box_left_offset (struct window *w, int area)
+window_box_left_offset (struct window *w, enum glyph_row_area area)
 {
   int x;
 
@@ -1088,21 +1075,21 @@ window_box_left_offset (struct window *w, int area)
 
 
 /* Return the window-relative coordinate of the right edge of display
-   area AREA of window W.  AREA < 0 means return the right edge of the
+   area AREA of window W.  ANY_AREA means return the right edge of the
    whole window, to the left of the right fringe of W.  */
 
 int
-window_box_right_offset (struct window *w, int area)
+window_box_right_offset (struct window *w, enum glyph_row_area area)
 {
   return window_box_left_offset (w, area) + window_box_width (w, area);
 }
 
 /* Return the frame-relative coordinate of the left edge of display
-   area AREA of window W.  AREA < 0 means return the left edge of the
+   area AREA of window W.  ANY_AREA means return the left edge of the
    whole window, to the right of the left fringe of W.  */
 
 int
-window_box_left (struct window *w, int area)
+window_box_left (struct window *w, enum glyph_row_area area)
 {
   struct frame *f = XFRAME (w->frame);
   int x;
@@ -1118,25 +1105,25 @@ window_box_left (struct window *w, int area)
 
 
 /* Return the frame-relative coordinate of the right edge of display
-   area AREA of window W.  AREA < 0 means return the right edge of the
+   area AREA of window W.  ANY_AREA means return the right edge of the
    whole window, to the left of the right fringe of W.  */
 
 int
-window_box_right (struct window *w, int area)
+window_box_right (struct window *w, enum glyph_row_area area)
 {
   return window_box_left (w, area) + window_box_width (w, area);
 }
 
 /* Get the bounding box of the display area AREA of window W, without
-   mode lines, in frame-relative coordinates.  AREA < 0 means the
+   mode lines, in frame-relative coordinates.  ANY_AREA means the
    whole window, not including the left and right fringes of
    the window.  Return in *BOX_X and *BOX_Y the frame-relative pixel
    coordinates of the upper-left corner of the box.  Return in
    *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box.  */
 
 void
-window_box (struct window *w, int area, int *box_x, int *box_y,
-           int *box_width, int *box_height)
+window_box (struct window *w, enum glyph_row_area area, int *box_x,
+           int *box_y, int *box_width, int *box_height)
 {
   if (box_width)
     *box_width = window_box_width (w, area);
@@ -1152,27 +1139,27 @@ window_box (struct window *w, int area, int *box_x, int *box_y,
     }
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
 
 /* Get the bounding box of the display area AREA of window W, without
-   mode lines.  AREA < 0 means the whole window, not including the
-   left and right fringe of the window.  Return in *TOP_LEFT_X
+   mode lines and both fringes of the window.  Return in *TOP_LEFT_X
    and TOP_LEFT_Y the frame-relative pixel coordinates of the
    upper-left corner of the box.  Return in *BOTTOM_RIGHT_X, and
    *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the
    box.  */
 
 static void
-window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
-                  int *bottom_right_x, int *bottom_right_y)
+window_box_edges (struct window *w, int *top_left_x, int *top_left_y,
+                 int *bottom_right_x, int *bottom_right_y)
 {
-  window_box (w, area, top_left_x, top_left_y, bottom_right_x,
-             bottom_right_y);
+  window_box (w, ANY_AREA, top_left_x, top_left_y,
+             bottom_right_x, bottom_right_y);
   *bottom_right_x += *top_left_x;
   *bottom_right_y += *top_left_y;
 }
 
+#endif /* HAVE_WINDOW_SYSTEM */
 
-\f
 /***********************************************************************
                              Utilities
  ***********************************************************************/
@@ -1359,12 +1346,12 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
 
   /* Compute exact mode line heights.  */
   if (WINDOW_WANTS_MODELINE_P (w))
-    current_mode_line_height
+    w->mode_line_height
       = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w),
                           BVAR (current_buffer, mode_line_format));
 
   if (WINDOW_WANTS_HEADER_LINE_P (w))
-    current_header_line_height
+    w->header_line_height
       = display_mode_line (w, HEADER_LINE_FACE_ID,
                           BVAR (current_buffer, header_line_format));
 
@@ -1657,8 +1644,6 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
   if (old_buffer)
     set_buffer_internal_1 (old_buffer);
 
-  current_header_line_height = current_mode_line_height = -1;
-
   if (visible_p && w->hscroll > 0)
     *x -=
       window_hscroll_limited (w, WINDOW_XFRAME (w))
@@ -6721,17 +6706,59 @@ lookup_glyphless_char_display (int c, struct it *it)
   return glyphless_method;
 }
 
-/* Load IT's display element fields with information about the next
-   display element from the current position of IT.  Value is zero if
-   end of buffer (or C string) is reached.  */
+/* Merge escape glyph face and cache the result.  */
 
 static struct frame *last_escape_glyph_frame = NULL;
 static int last_escape_glyph_face_id = (1 << FACE_ID_BITS);
 static int last_escape_glyph_merged_face_id = 0;
 
-struct frame *last_glyphless_glyph_frame = NULL;
-int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
-int last_glyphless_glyph_merged_face_id = 0;
+static int
+merge_escape_glyph_face (struct it *it)
+{
+  int face_id;
+
+  if (it->f == last_escape_glyph_frame
+      && it->face_id == last_escape_glyph_face_id)
+    face_id = last_escape_glyph_merged_face_id;
+  else
+    {
+      /* Merge the `escape-glyph' face into the current face.  */
+      face_id = merge_faces (it->f, Qescape_glyph, 0, it->face_id);
+      last_escape_glyph_frame = it->f;
+      last_escape_glyph_face_id = it->face_id;
+      last_escape_glyph_merged_face_id = face_id;
+    }
+  return face_id;
+}
+
+/* Likewise for glyphless glyph face.  */
+
+static struct frame *last_glyphless_glyph_frame = NULL;
+static int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
+static int last_glyphless_glyph_merged_face_id = 0;
+
+int
+merge_glyphless_glyph_face (struct it *it)
+{
+  int face_id;
+
+  if (it->f == last_glyphless_glyph_frame
+      && it->face_id == last_glyphless_glyph_face_id)
+    face_id = last_glyphless_glyph_merged_face_id;
+  else
+    {
+      /* Merge the `glyphless-char' face into the current face.  */
+      face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
+      last_glyphless_glyph_frame = it->f;
+      last_glyphless_glyph_face_id = it->face_id;
+      last_glyphless_glyph_merged_face_id = face_id;
+    }
+  return face_id;
+}
+
+/* Load IT's display element fields with information about the next
+   display element from the current position of IT.  Value is zero if
+   end of buffer (or C string) is reached.  */
 
 static int
 get_next_display_element (struct it *it)
@@ -6879,24 +6906,10 @@ get_next_display_element (struct it *it)
                      g = GLYPH_CODE_CHAR (gc);
                      lface_id = GLYPH_CODE_FACE (gc);
                    }
-                 if (lface_id)
-                   {
-                     face_id = merge_faces (it->f, Qt, lface_id, it->face_id);
-                   }
-                 else if (it->f == last_escape_glyph_frame
-                          && it->face_id == last_escape_glyph_face_id)
-                   {
-                     face_id = last_escape_glyph_merged_face_id;
-                   }
-                 else
-                   {
-                     /* Merge the escape-glyph face into the current face.  */
-                     face_id = merge_faces (it->f, Qescape_glyph, 0,
-                                            it->face_id);
-                     last_escape_glyph_frame = it->f;
-                     last_escape_glyph_face_id = it->face_id;
-                     last_escape_glyph_merged_face_id = face_id;
-                   }
+
+                 face_id = (lface_id
+                            ? merge_faces (it->f, Qt, lface_id, it->face_id)
+                            : merge_escape_glyph_face (it));
 
                  XSETINT (it->ctl_chars[0], g);
                  XSETINT (it->ctl_chars[1], c ^ 0100);
@@ -6928,27 +6941,10 @@ get_next_display_element (struct it *it)
                  escape_glyph = GLYPH_CODE_CHAR (gc);
                  lface_id = GLYPH_CODE_FACE (gc);
                }
-             if (lface_id)
-               {
-                 /* The display table specified a face.
-                    Merge it into face_id and also into escape_glyph.  */
-                 face_id = merge_faces (it->f, Qt, lface_id,
-                                        it->face_id);
-               }
-             else if (it->f == last_escape_glyph_frame
-                      && it->face_id == last_escape_glyph_face_id)
-               {
-                 face_id = last_escape_glyph_merged_face_id;
-               }
-             else
-               {
-                 /* Merge the escape-glyph face into the current face.  */
-                 face_id = merge_faces (it->f, Qescape_glyph, 0,
-                                        it->face_id);
-                 last_escape_glyph_frame = it->f;
-                 last_escape_glyph_face_id = it->face_id;
-                 last_escape_glyph_merged_face_id = face_id;
-               }
+
+             face_id = (lface_id
+                        ? merge_faces (it->f, Qt, lface_id, it->face_id)
+                        : merge_escape_glyph_face (it));
 
              /* Draw non-ASCII hyphen with just highlighting: */
 
@@ -10827,11 +10823,9 @@ clear_garbaged_frames (void)
          if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f))
            {
              if (f->resized_p)
-               {
-                 redraw_frame (f);
-                 f->force_flush_display_p = 1;
-               }
-             clear_current_matrices (f);
+               redraw_frame (f);
+             else
+               clear_current_matrices (f);
              changed_count++;
              f->garbaged = 0;
              f->resized_p = 0;
@@ -10919,7 +10913,7 @@ echo_area_display (int update_frame_p)
                 Can do with a display update of the echo area,
                 unless we displayed some mode lines.  */
              update_single_window (w, 1);
-             FRAME_RIF (f)->flush_display (f);
+             flush_frame (f);
            }
          else
            update_frame (f, 1, 1);
@@ -11501,62 +11495,6 @@ update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
   return hooks_run;
 }
 
-
-\f
-/***********************************************************************
-                           Output Cursor
- ***********************************************************************/
-
-#ifdef HAVE_WINDOW_SYSTEM
-
-/* EXPORT:
-   Nominal cursor position -- where to draw output.
-   HPOS and VPOS are window relative glyph matrix coordinates.
-   X and Y are window relative pixel coordinates.  */
-
-struct cursor_pos output_cursor;
-
-
-/* EXPORT:
-   Set the global variable output_cursor to CURSOR.  All cursor
-   positions are relative to currently updated window.  */
-
-void
-set_output_cursor (struct cursor_pos *cursor)
-{
-  output_cursor.hpos = cursor->hpos;
-  output_cursor.vpos = cursor->vpos;
-  output_cursor.x = cursor->x;
-  output_cursor.y = cursor->y;
-}
-
-
-/* EXPORT for RIF:
-   Set a nominal cursor position.
-
-   HPOS and VPOS are column/row positions in a window glyph matrix.
-   X and Y are window text area relative pixel positions.
-
-   This is always done during window update, so the position is the
-   future output cursor position for currently updated window W.
-   NOTE: W is used only to check whether this function is called
-   in a consistent manner via the redisplay interface.  */
-
-void
-x_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
-{
-  eassert (w);
-
-  /* Set the output cursor.  */
-  output_cursor.hpos = hpos;
-  output_cursor.vpos = vpos;
-  output_cursor.x = x;
-  output_cursor.y = y;
-}
-
-#endif /* HAVE_WINDOW_SYSTEM */
-
-\f
 /***********************************************************************
                               Tool-bars
  ***********************************************************************/
@@ -12108,7 +12046,7 @@ redisplay_tool_bar (struct frame *f)
          if (WINDOW_TOTAL_LINES (w) != old_height)
            {
              clear_glyph_matrix (w->desired_matrix);
-             fonts_changed_p = 1;
+             f->fonts_changed = 1;
              return 1;
            }
        }
@@ -12209,7 +12147,7 @@ redisplay_tool_bar (struct frame *f)
                {
                  clear_glyph_matrix (w->desired_matrix);
                  f->n_tool_bar_rows = nrows;
-                 fonts_changed_p = 1;
+                 f->fonts_changed = 1;
                  return 1;
                }
            }
@@ -13095,15 +13033,6 @@ redisplay_internal (void)
   last_glyphless_glyph_frame = NULL;
   last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
 
-  /* If new fonts have been loaded that make a glyph matrix adjustment
-     necessary, do it.  */
-  if (fonts_changed_p)
-    {
-      adjust_glyphs (NULL);
-      ++windows_or_buffers_changed;
-      fonts_changed_p = 0;
-    }
-
   /* If face_change_count is non-zero, init_iterator will free all
      realized faces, which includes the faces referenced from current
      matrices.  So, we can't reuse current matrices in this case.  */
@@ -13134,7 +13063,19 @@ redisplay_internal (void)
       struct frame *f = XFRAME (frame);
 
       if (FRAME_VISIBLE_P (f))
-       ++number_of_visible_frames;
+       {
+         ++number_of_visible_frames;
+         /* Adjust matrices for visible frames only.  */
+         if (f->fonts_changed)
+           {
+             adjust_frame_glyphs (f);
+             f->fonts_changed = 0;
+           }
+         /* If cursor type has been changed on the frame
+            other than selected, consider all frames.  */
+         if (f != sf && f->cursor_type_changed)
+           update_mode_lines++;
+       }
       clear_desired_matrices (f);
     }
 
@@ -13183,8 +13124,7 @@ redisplay_internal (void)
     }
 
   consider_all_windows_p = (update_mode_lines
-                           || buffer_shared_and_changed ()
-                           || cursor_type_changed);
+                           || buffer_shared_and_changed ());
 
   /* If specs for an arrow have changed, do thorough redisplay
      to ensure we remove any arrow that should no longer exist.  */
@@ -13218,9 +13158,7 @@ redisplay_internal (void)
       if (!display_last_displayed_message_p)
        message_cleared_p = 0;
 
-      if (fonts_changed_p)
-       goto retry;
-      else if (window_height_changed_p)
+      if (window_height_changed_p)
        {
          consider_all_windows_p = 1;
          ++update_mode_lines;
@@ -13277,6 +13215,7 @@ redisplay_internal (void)
       && !current_buffer->prevent_redisplay_optimizations_p
       && FRAME_VISIBLE_P (XFRAME (w->frame))
       && !FRAME_OBSCURED_P (XFRAME (w->frame))
+      && !XFRAME (w->frame)->cursor_type_changed
       /* Make sure recorded data applies to current buffer, etc.  */
       && this_line_buffer == current_buffer
       && match_p
@@ -13502,6 +13441,8 @@ redisplay_internal (void)
              && !EQ (FRAME_TTY (f)->top_frame, frame))
            continue;
 
+       retry_frame:
+
          if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
            {
              /* Mark all the scroll bars to be removed; we'll redeem
@@ -13521,20 +13462,22 @@ redisplay_internal (void)
              if (FRAME_TERMINAL (f)->judge_scroll_bars_hook)
                FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
 
-             /* If fonts changed, display again.  */
-             /* ??? rms: I suspect it is a mistake to jump all the way
-                back to retry here.  It should just retry this frame.  */
-             if (fonts_changed_p)
-               goto retry;
-
              if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
                {
+                 /* If fonts changed on visible frame, display again.  */
+                 if (f->fonts_changed)
+                   {
+                     adjust_frame_glyphs (f);
+                     f->fonts_changed = 0;
+                     goto retry_frame;
+                   }
+
                  /* See if we have to hscroll.  */
                  if (!f->already_hscrolled_p)
                    {
                      f->already_hscrolled_p = 1;
                      if (hscroll_windows (f->root_window))
-                       goto retry;
+                       goto retry_frame;
                    }
 
                  /* Prevent various kinds of signals during display
@@ -13548,6 +13491,7 @@ redisplay_internal (void)
                  /* Update the display.  */
                  set_window_update_flags (XWINDOW (f->root_window), 1);
                  pending |= update_frame (f, 0, 0);
+                 f->cursor_type_changed = 0;
                  f->updated_p = 1;
                }
            }
@@ -13592,7 +13536,7 @@ redisplay_internal (void)
 
     update:
       /* If fonts changed, display again.  */
-      if (fonts_changed_p)
+      if (sf->fonts_changed)
        goto retry;
 
       /* Prevent various kinds of signals during display update.
@@ -13609,6 +13553,7 @@ redisplay_internal (void)
 
          XWINDOW (selected_window)->must_be_updated_p = 1;
          pending = update_frame (sf, 0, 0);
+         sf->cursor_type_changed = 0;
        }
 
       /* We may have called echo_area_display at the top of this
@@ -13623,6 +13568,7 @@ redisplay_internal (void)
        {
          XWINDOW (mini_window)->must_be_updated_p = 1;
          pending |= update_frame (mini_frame, 0, 0);
+         mini_frame->cursor_type_changed = 0;
          if (!pending && hscroll_windows (mini_window))
            goto retry;
        }
@@ -13663,7 +13609,6 @@ redisplay_internal (void)
 
       update_mode_lines = 0;
       windows_or_buffers_changed = 0;
-      cursor_type_changed = 0;
     }
 
   /* Start SIGIO interrupts coming again.  Having them off during the
@@ -13761,9 +13706,7 @@ redisplay_preserve_echo_area (int from_where)
   else
     redisplay_internal ();
 
-  if (FRAME_RIF (SELECTED_FRAME ()) != NULL
-      && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
-    FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL);
+  flush_frame (SELECTED_FRAME ());
 }
 
 
@@ -15105,7 +15048,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
         cases.  */
       && !update_mode_lines
       && !windows_or_buffers_changed
-      && !cursor_type_changed
+      && !f->cursor_type_changed
       /* Can't use this case if highlighting a region.  When a
          region exists, cursor movement has to do more than just
          set the cursor.  */
@@ -15452,9 +15395,8 @@ set_vertical_scroll_bar (struct window *w)
 /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only
    selected_window is redisplayed.
 
-   We can return without actually redisplaying the window if
-   fonts_changed_p.  In that case, redisplay_internal will
-   retry.  */
+   We can return without actually redisplaying the window if fonts has been
+   changed on window's frame.  In that case, redisplay_internal will retry.  */
 
 static void
 redisplay_window (Lisp_Object window, int just_this_one_p)
@@ -15839,7 +15781,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
       debug_method_add (w, "try_window_id %d", tem);
 #endif
 
-      if (fonts_changed_p)
+      if (f->fonts_changed)
        goto need_larger_matrices;
       if (tem > 0)
        goto done;
@@ -15909,12 +15851,12 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
          IF_DEBUG (debug_method_add (w, "1"));
          if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
            /* -1 means we need to scroll.
-              0 means we need new matrices, but fonts_changed_p
+              0 means we need new matrices, but fonts_changed
               is set in that case, so we will detect it below.  */
            goto try_to_scroll;
        }
 
-      if (fonts_changed_p)
+      if (f->fonts_changed)
        goto need_larger_matrices;
 
       if (w->cursor.vpos >= 0)
@@ -16102,7 +16044,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
   /* Redisplay the window.  */
   if (!current_matrix_up_to_date_p
       || windows_or_buffers_changed
-      || cursor_type_changed
+      || f->cursor_type_changed
       /* Don't use try_window_reusing_current_matrix in this case
         because it can have changed the buffer.  */
       || !NILP (Vwindow_scroll_functions)
@@ -16115,7 +16057,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
   /* If new fonts have been loaded (due to fontsets), give up.  We
      have to start a new redisplay since we need to re-adjust glyph
      matrices.  */
-  if (fonts_changed_p)
+  if (f->fonts_changed)
     goto need_larger_matrices;
 
   /* If cursor did not appear assume that the middle of the window is
@@ -16228,7 +16170,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
       if (WINDOW_WANTS_MODELINE_P (w)
          && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w))
        {
-         fonts_changed_p = 1;
+         f->fonts_changed = 1;
+         w->mode_line_height = -1;
          MATRIX_MODE_LINE_ROW (w->current_matrix)->height
            = DESIRED_MODE_LINE_HEIGHT (w);
        }
@@ -16238,12 +16181,13 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
       if (WINDOW_WANTS_HEADER_LINE_P (w)
          && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
        {
-         fonts_changed_p = 1;
+         f->fonts_changed = 1;
+         w->header_line_height = -1;
          MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
            = DESIRED_HEADER_LINE_HEIGHT (w);
        }
 
-      if (fonts_changed_p)
+      if (f->fonts_changed)
        goto need_larger_matrices;
     }
 
@@ -16308,8 +16252,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
     }
 #endif /* HAVE_WINDOW_SYSTEM */
 
-  /* We go to this label, with fonts_changed_p set,
-     if it is necessary to try again using larger glyph matrices.
+  /* We go to this label, with fonts_changed set, if it is
+     necessary to try again using larger glyph matrices.
      We have to redeem the scroll bar even in this case,
      because the loop in redisplay_internal expects that.  */
  need_larger_matrices:
@@ -16383,7 +16327,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
     {
       if (display_line (&it))
        last_text_row = it.glyph_row - 1;
-      if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
+      if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
        return 0;
     }
 #ifdef HAVE_XWIDGETS_xxx
@@ -16493,7 +16437,7 @@ try_window_reusing_current_matrix (struct window *w)
       /* Don't try to reuse the display if windows have been split
         or such.  */
       || windows_or_buffers_changed
-      || cursor_type_changed)
+      || f->cursor_type_changed)
     return 0;
 
   /* Can't do this if region may have changed.  */
@@ -16541,8 +16485,7 @@ try_window_reusing_current_matrix (struct window *w)
       w->cursor.vpos = -1;
       last_text_row = last_reused_text_row = NULL;
 
-      while (it.current_y < it.last_visible_y
-            && !fonts_changed_p)
+      while (it.current_y < it.last_visible_y && !f->fonts_changed)
        {
          /* If we have reached into the characters in the START row,
             that means the line boundaries have changed.  So we
@@ -16753,7 +16696,7 @@ try_window_reusing_current_matrix (struct window *w)
       if (pt_row == NULL)
        w->cursor.vpos = -1;
       last_text_row = NULL;
-      while (it.current_y < it.last_visible_y && !fonts_changed_p)
+      while (it.current_y < it.last_visible_y && !f->fonts_changed)
        if (display_line (&it))
          last_text_row = it.glyph_row - 1;
 
@@ -17272,7 +17215,7 @@ try_window_id (struct window *w)
     GIVE_UP (1);
 
   /* This flag is used to prevent redisplay optimizations.  */
-  if (windows_or_buffers_changed || cursor_type_changed)
+  if (windows_or_buffers_changed || f->cursor_type_changed)
     GIVE_UP (2);
 
   /* Verify that narrowing has not changed.
@@ -17603,7 +17546,7 @@ try_window_id (struct window *w)
   last_text_row = NULL;
   overlay_arrow_seen = 0;
   while (it.current_y < it.last_visible_y
-        && !fonts_changed_p
+        && !f->fonts_changed
         && (first_unchanged_at_end_row == NULL
             || IT_CHARPOS (it) < stop_pos))
     {
@@ -17611,7 +17554,7 @@ try_window_id (struct window *w)
        last_text_row = it.glyph_row - 1;
     }
 
-  if (fonts_changed_p)
+  if (f->fonts_changed)
     return -1;
 
 
@@ -17858,8 +17801,7 @@ try_window_id (struct window *w)
 
       /* Display the rest of the lines at the window end.  */
       it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
-      while (it.current_y < it.last_visible_y
-            && !fonts_changed_p)
+      while (it.current_y < it.last_visible_y && !f->fonts_changed)
        {
          /* Is it always sure that the display agrees with lines in
             the current matrix?  I don't think so, so we mark rows
@@ -19418,7 +19360,7 @@ display_line (struct it *it)
       >= it->w->desired_matrix->nrows)
     {
       it->w->nrows_scale_factor++;
-      fonts_changed_p = 1;
+      it->f->fonts_changed = 1;
       return 0;
     }
 
@@ -20770,13 +20712,8 @@ redisplay_mode_lines (Lisp_Object window, int force)
            {
              struct text_pos pt;
 
-             SET_TEXT_POS_FROM_MARKER (pt, w->pointm);
-             if (CHARPOS (pt) < BEGV)
-               TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
-             else if (CHARPOS (pt) > (ZV - 1))
-               TEMP_SET_PT_BOTH (ZV, ZV_BYTE);
-             else
-               TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
+             CLIP_TEXT_POS_FROM_MARKER (pt, w->pointm);
+             TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
            }
 
          /* Display mode lines.  */
@@ -24205,12 +24142,12 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
 
 #define IT_EXPAND_MATRIX_WIDTH(it, area)               \
   {                                                    \
-    if (!fonts_changed_p                               \
+    if (!it->f->fonts_changed                          \
        && (it->glyph_row->glyphs[area]                 \
            < it->glyph_row->glyphs[area + 1]))         \
       {                                                        \
        it->w->ncols_scale_factor++;                    \
-       fonts_changed_p = 1;                            \
+       it->f->fonts_changed = 1;                       \
       }                                                        \
   }
 
@@ -25209,21 +25146,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
   base_height = it->ascent + it->descent;
   base_width = font->average_width;
 
-  /* Get a face ID for the glyph by utilizing a cache (the same way as
-     done for `escape-glyph' in get_next_display_element).  */
-  if (it->f == last_glyphless_glyph_frame
-      && it->face_id == last_glyphless_glyph_face_id)
-    {
-      face_id = last_glyphless_glyph_merged_face_id;
-    }
-  else
-    {
-      /* Merge the `glyphless-char' face into the current face.  */
-      face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
-      last_glyphless_glyph_frame = it->f;
-      last_glyphless_glyph_face_id = it->face_id;
-      last_glyphless_glyph_merged_face_id = face_id;
-    }
+  face_id = merge_glyphless_glyph_face (it);
 
   if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
     {
@@ -26037,7 +25960,7 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
   /* Write glyphs.  */
 
   hpos = start - updated_row->glyphs[updated_area];
-  x = draw_glyphs (w, output_cursor.x,
+  x = draw_glyphs (w, w->output_cursor.x,
                   updated_row, updated_area,
                   hpos, hpos + len,
                   DRAW_NORMAL_TEXT, 0);
@@ -26045,7 +25968,7 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
   /* Invalidate old phys cursor if the glyph at its hpos is redrawn.  */
   if (updated_area == TEXT_AREA
       && w->phys_cursor_on_p
-      && w->phys_cursor.vpos == output_cursor.vpos
+      && w->phys_cursor.vpos == w->output_cursor.vpos
       && chpos >= hpos
       && chpos < hpos + len)
     w->phys_cursor_on_p = 0;
@@ -26053,8 +25976,8 @@ x_write_glyphs (struct window *w, struct glyph_row *updated_row,
   unblock_input ();
 
   /* Advance the output cursor.  */
-  output_cursor.hpos += len;
-  output_cursor.x = x;
+  w->output_cursor.hpos += len;
+  w->output_cursor.x = x;
 }
 
 
@@ -26087,25 +26010,25 @@ x_insert_glyphs (struct window *w, struct glyph_row *updated_row,
 
   /* Get the width of the region to shift right.  */
   shifted_region_width = (window_box_width (w, updated_area)
-                         - output_cursor.x
+                         - w->output_cursor.x
                          - shift_by_width);
 
   /* Shift right.  */
-  frame_x = window_box_left (w, updated_area) + output_cursor.x;
-  frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y);
+  frame_x = window_box_left (w, updated_area) + w->output_cursor.x;
+  frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, w->output_cursor.y);
 
   FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width,
                                           line_height, shift_by_width);
 
   /* Write the glyphs.  */
   hpos = start - row->glyphs[updated_area];
-  draw_glyphs (w, output_cursor.x, row, updated_area,
+  draw_glyphs (w, w->output_cursor.x, row, updated_area,
               hpos, hpos + len,
               DRAW_NORMAL_TEXT, 0);
 
   /* Advance the output cursor.  */
-  output_cursor.hpos += len;
-  output_cursor.x += shift_by_width;
+  w->output_cursor.hpos += len;
+  w->output_cursor.x += shift_by_width;
   unblock_input ();
 }
 
@@ -26144,16 +26067,16 @@ x_clear_end_of_line (struct window *w, struct glyph_row *updated_row,
   else
     to_x = min (to_x, max_x);
 
-  to_y = min (max_y, output_cursor.y + updated_row->height);
+  to_y = min (max_y, w->output_cursor.y + updated_row->height);
 
   /* Notice if the cursor will be cleared by this operation.  */
   if (!updated_row->full_width_p)
     notice_overwritten_cursor (w, updated_area,
-                              output_cursor.x, -1,
+                              w->output_cursor.x, -1,
                               updated_row->y,
                               MATRIX_ROW_BOTTOM_Y (updated_row));
 
-  from_x = output_cursor.x;
+  from_x = w->output_cursor.x;
 
   /* Translate to frame coordinates.  */
   if (updated_row->full_width_p)
@@ -26169,7 +26092,7 @@ x_clear_end_of_line (struct window *w, struct glyph_row *updated_row,
     }
 
   min_y = WINDOW_HEADER_LINE_HEIGHT (w);
-  from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y));
+  from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, w->output_cursor.y));
   to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y);
 
   /* Prevent inadvertently clearing to end of the X window.  */
@@ -26267,7 +26190,7 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
     FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
 
   /* Make sure the cursor gets redrawn.  */
-  cursor_type_changed = 1;
+  f->cursor_type_changed = 1;
 }
 
 
@@ -29037,7 +28960,7 @@ x_draw_vertical_border (struct window *w)
     {
       int x0, x1, y0, y1;
 
-      window_box_edges (w, -1, &x0, &y0, &x1, &y1);
+      window_box_edges (w, &x0, &y0, &x1, &y1);
       y1 -= 1;
 
       if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
@@ -29050,7 +28973,7 @@ x_draw_vertical_border (struct window *w)
     {
       int x0, x1, y0, y1;
 
-      window_box_edges (w, -1, &x0, &y0, &x1, &y1);
+      window_box_edges (w, &x0, &y0, &x1, &y1);
       y1 -= 1;
 
       if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
@@ -29959,8 +29882,10 @@ cursor shapes.  */);
               doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy.  */);
   Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
 
+#ifdef HAVE_WINDOW_SYSTEM
   hourglass_atimer = NULL;
   hourglass_shown_p = 0;
+#endif /* HAVE_WINDOW_SYSTEM */
 
   DEFSYM (Qglyphless_char, "glyphless-char");
   DEFSYM (Qhex_code, "hex-code");
@@ -30002,8 +29927,6 @@ Its value should be an ASCII acronym string, `hex-code', `empty-box', or
 void
 init_xdisp (void)
 {
-  current_header_line_height = current_mode_line_height = -1;
-
   CHARPOS (this_line_start_pos) = 0;
 
   if (!noninteractive)
@@ -30047,13 +29970,14 @@ init_xdisp (void)
   help_echo_showing_p = 0;
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 /* Platform-independent portion of hourglass implementation.  */
 
 /* Cancel a currently active hourglass timer, and start a new one.  */
 void
 start_hourglass (void)
 {
-#if defined (HAVE_WINDOW_SYSTEM)
   struct timespec delay;
 
   cancel_hourglass ();
@@ -30078,7 +30002,6 @@ start_hourglass (void)
 
   hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
                                   show_hourglass, NULL);
-#endif
 }
 
 
@@ -30087,7 +30010,6 @@ start_hourglass (void)
 void
 cancel_hourglass (void)
 {
-#if defined (HAVE_WINDOW_SYSTEM)
   if (hourglass_atimer)
     {
       cancel_atimer (hourglass_atimer);
@@ -30096,5 +30018,6 @@ cancel_hourglass (void)
 
   if (hourglass_shown_p)
     hide_hourglass ();
-#endif
 }
+
+#endif /* HAVE_WINDOW_SYSTEM */
index a55ac90086dc33eeab297cd2964ea59ecd203844..e8cb7a703221d05880ac06f73fe98782c2f629bc 100644 (file)
@@ -211,13 +211,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 #include "termhooks.h"
 
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
 #ifdef USE_MOTIF
 #include <Xm/Xm.h>
 #include <Xm/XmStrDefs.h>
 #endif /* USE_MOTIF */
-#endif /* HAVE_X_WINDOWS */
 
 #ifdef MSDOS
 #include "dosfns.h"
@@ -238,6 +235,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
 #define GCGraphicsExposures 0
 #endif /* HAVE_NS */
+
+/* Number of pt per inch (from the TeXbook).  */
+
+#define PT_PER_INCH 72.27
+
 #endif /* HAVE_WINDOW_SYSTEM */
 
 #include "buffer.h"
@@ -272,10 +274,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <c-ctype.h>
 
-/* Number of pt per inch (from the TeXbook).  */
-
-#define PT_PER_INCH 72.27
-
 /* Non-zero if face attribute ATTR is unspecified.  */
 
 #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
@@ -396,6 +394,8 @@ static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_val
 
 static Lisp_Object Qtty_color_alist;
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 /* Counter for calls to clear_face_cache.  If this counter reaches
    CLEAR_FONT_TABLE_COUNT, and a frame has more than
    CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed.  */
@@ -404,6 +404,8 @@ static int clear_font_table_count;
 #define CLEAR_FONT_TABLE_COUNT 100
 #define CLEAR_FONT_TABLE_NFONTS        10
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* Non-zero means face attributes have been changed since the last
    redisplay.  Used in redisplay_internal.  */
 
@@ -434,29 +436,27 @@ static int ngcs;
 
 static int menu_face_changed_default;
 
-\f
-/* Function prototypes.  */
-
-struct table_entry;
 struct named_merge_point;
 
-static void set_font_frame_param (Lisp_Object, Lisp_Object);
 static struct face *realize_face (struct face_cache *, Lisp_Object *,
                                  int);
-static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
-                                           struct face *);
 static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
 static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
 static bool realize_basic_faces (struct frame *);
 static bool realize_default_face (struct frame *);
 static void realize_named_face (struct frame *, Lisp_Object, int);
 static struct face_cache *make_face_cache (struct frame *);
-static void clear_face_gcs (struct face_cache *);
 static void free_face_cache (struct face_cache *);
 static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *,
                           int, struct named_merge_point *);
 
-\f
+#ifdef HAVE_WINDOW_SYSTEM
+static void set_font_frame_param (Lisp_Object, Lisp_Object);
+static void clear_face_gcs (struct face_cache *);
+static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
+                                           struct face *);
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /***********************************************************************
                              Utilities
  ***********************************************************************/
@@ -3983,6 +3983,7 @@ lface_hash (Lisp_Object *v)
          ^ XHASH (v[LFACE_HEIGHT_INDEX]));
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
 
 /* Return non-zero if LFACE1 and LFACE2 specify the same font (without
    considering charsets/registries).  They do if they specify the same
@@ -4011,8 +4012,8 @@ lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
          );
 }
 
+#endif /* HAVE_WINDOW_SYSTEM */
 
-\f
 /***********************************************************************
                            Realized Faces
  ***********************************************************************/
@@ -4171,6 +4172,7 @@ make_face_cache (struct frame *f)
   return c;
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
 
 /* Clear out all graphics contexts for all realized faces, except for
    the basic faces.  This should be done from time to time just to avoid
@@ -4181,7 +4183,6 @@ clear_face_gcs (struct face_cache *c)
 {
   if (c && FRAME_WINDOW_P (c->f))
     {
-#ifdef HAVE_WINDOW_SYSTEM
       int i;
       for (i = BASIC_FACE_ID_SENTINEL; i < c->used; ++i)
        {
@@ -4196,10 +4197,10 @@ clear_face_gcs (struct face_cache *c)
              unblock_input ();
            }
        }
-#endif /* HAVE_WINDOW_SYSTEM */
     }
 }
 
+#endif /* HAVE_WINDOW_SYSTEM */
 
 /* Free all realized faces in face cache C, including basic faces.
    C may be null.  If faces are freed, make sure the frame's current
index 0c91e298ec8068fa188a5135a22256bf8eb35c09..4e8442dd3a38fb6028b630e8e871e78e34e27bea 100644 (file)
@@ -22,10 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <math.h>
 #include <unistd.h>
 
-/* This makes the fields of a Display accessible, in Xlib header files.  */
-
-#define XLIB_ILLEGAL_ACCESS
-
 #include "lisp.h"
 #include "xterm.h"
 #include "frame.h"
@@ -1186,7 +1182,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 
          block_input ();
          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       0, y, width, height, False);
+                       0, y, width, height);
          unblock_input ();
        }
 
@@ -1197,7 +1193,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 
          block_input ();
          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       0, y, width, height, False);
+                       0, y, width, height);
          unblock_input ();
        }
 
@@ -1205,7 +1201,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
        clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
     }
 #endif /* not USE_X_TOOLKIT && not USE_GTK */
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   run_window_configuration_change_hook (f);
 }
 
@@ -1268,7 +1264,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 
   FRAME_TOOL_BAR_LINES (f) = nlines;
   resize_frame_windows (f, FRAME_LINES (f), 0);
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
 
   /* We also have to make sure that the internal border at the top of
      the frame, below the menu bar or tool bar, is redrawn when the
@@ -1295,8 +1291,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
       if (height > 0 && width > 0)
        {
           block_input ();
-          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                        0, y, width, height, False);
+         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                       0, y, width, height);
           unblock_input ();
         }
 
@@ -5490,7 +5486,7 @@ Text larger than the specified size is clipped.  */)
     }
 
   FRAME_TOTAL_COLS (f) = w->total_cols;
-  adjust_glyphs (f);
+  adjust_frame_glyphs (f);
   w->pseudo_window_p = 1;
 
   /* Display the tooltip text in a temporary buffer.  */
@@ -5558,7 +5554,7 @@ Text larger than the specified size is clipped.  */)
       width /= WINDOW_FRAME_COLUMN_WIDTH (w);
       w->total_cols = width;
       FRAME_TOTAL_COLS (f) = width;
-      adjust_glyphs (f);
+      adjust_frame_glyphs (f);
       clear_glyph_matrix (w->desired_matrix);
       clear_glyph_matrix (w->current_matrix);
       try_window (FRAME_ROOT_WINDOW (f), pos, 0);
index 45a34f2e0a56c834d84e88e3342dde852e7c3722..7a754bd75c029be5535643060c14db7094c8ee73 100644 (file)
@@ -29,10 +29,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 
 int
-xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
           struct timespec const *timeout, sigset_t const *sigmask)
 {
-  SELECT_TYPE all_rfds, all_wfds;
+  fd_set all_rfds, all_wfds;
   struct timespec tmo;
   struct timespec const *tmop = timeout;
 
index f85c17f71907e4b139bedb683109df2e2513560e..1f8555591d0ad9b1b3baeed6cf5244e6aa07499b 100644 (file)
@@ -25,9 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sysselect.h"
 
 extern int xg_select (int max_fds,
-                      SELECT_TYPE *rfds,
-                      SELECT_TYPE *wfds,
-                      SELECT_TYPE *efds,
+                     fd_set *rfds, fd_set *wfds, fd_set *efds,
                      struct timespec const *timeout,
                      sigset_t const *sigmask);
 
index 98473939373f4b024baffc6b5c4578b71d998277..823c63bfc6fb6e3b056cd1aecda5823c970544da 100644 (file)
@@ -378,7 +378,7 @@ x_menu_wait_for_event (void *data)
          )
     {
       struct timespec next_time = timer_check (), *ntp;
-      SELECT_TYPE read_fds;
+      fd_set read_fds;
       struct x_display_info *dpyinfo;
       int n = 0;
 
index 548975c635adc38d8ecee30daf184baa2e46a210..3e05ba6fed258f43c8220215cbece47cf233e229 100644 (file)
@@ -143,16 +143,11 @@ int use_xim = 1;
 int use_xim = 0;  /* configure --without-xim */
 #endif
 
-\f
-
 /* Non-zero means that a HELP_EVENT has been generated since Emacs
    start.  */
 
 static bool any_help_event_p;
 
-/* Last window where we saw the mouse.  Used by mouse-autoselect-window.  */
-static Lisp_Object last_window;
-
 /* This is a chain of structures for all the X displays currently in
    use.  */
 
@@ -300,8 +295,6 @@ static struct terminal *x_create_terminal (struct x_display_info *);
 void x_delete_terminal (struct terminal *);
 static void x_update_end (struct frame *);
 static void XTframe_up_to_date (struct frame *);
-static void XTset_terminal_modes (struct terminal *);
-static void XTreset_terminal_modes (struct terminal *);
 static void x_clear_frame (struct frame *);
 static _Noreturn void x_ins_del_lines (struct frame *, int, int);
 static void frame_highlight (struct frame *);
@@ -317,7 +310,8 @@ static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
 static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
                                enum text_cursor_kinds);
 
-static void x_clip_to_row (struct window *, struct glyph_row *, int, GC);
+static void x_clip_to_row (struct window *, struct glyph_row *,
+                          enum glyph_row_area, GC);
 static void x_flush (struct frame *f);
 static void x_update_begin (struct frame *);
 static void x_update_window_begin (struct window *);
@@ -343,29 +337,19 @@ static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
 static void x_initialize (void);
 
 
-/* Flush display of frame F, or of all frames if F is null.  */
+/* Flush display of frame F.  */
 
 static void
 x_flush (struct frame *f)
 {
+  eassert (f && FRAME_X_P (f));
   /* Don't call XFlush when it is not safe to redisplay; the X
      connection may be broken.  */
   if (!NILP (Vinhibit_redisplay))
     return;
 
   block_input ();
-  if (f)
-    {
-      eassert (FRAME_X_P (f));
-      XFlush (FRAME_X_DISPLAY (f));
-    }
-  else
-    {
-      /* Flush all displays and so all frames on them.  */
-      struct x_display_info *xdi;
-      for (xdi = x_display_list; xdi; xdi = xdi->next)
-       XFlush (xdi->display);
-    }
+  XFlush (FRAME_X_DISPLAY (f));
   unblock_input ();
 }
 
@@ -554,8 +538,7 @@ x_update_begin (struct frame *f)
 }
 
 
-/* Start update of window W.  Set output_cursor to the cursor
-   position of W.  */
+/* Start update of window W.  */
 
 static void
 x_update_window_begin (struct window *w)
@@ -563,7 +546,7 @@ x_update_window_begin (struct window *w)
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 
-  set_output_cursor (&w->cursor);
+  w->output_cursor = w->cursor;
 
   block_input ();
 
@@ -621,9 +604,9 @@ x_update_window_end (struct window *w, bool cursor_on_p,
       block_input ();
 
       if (cursor_on_p)
-       display_and_set_cursor (w, 1, output_cursor.hpos,
-                               output_cursor.vpos,
-                               output_cursor.x, output_cursor.y);
+       display_and_set_cursor (w, 1,
+                               w->output_cursor.hpos, w->output_cursor.vpos,
+                               w->output_cursor.x, w->output_cursor.y);
 
       if (draw_window_fringes (w, 1))
        x_draw_vertical_border (w);
@@ -701,10 +684,10 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
 
       block_input ();
       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                   0, y, width, height, False);
+                   0, y, width, height);
       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                    FRAME_PIXEL_WIDTH (f) - width,
-                   y, width, height, False);
+                   y, width, height);
       unblock_input ();
     }
 }
@@ -719,7 +702,7 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
   struct face *face = p->face;
 
   /* Must clip because of partially visible lines.  */
-  x_clip_to_row (w, row, -1, gc);
+  x_clip_to_row (w, row, ANY_AREA, gc);
 
   if (!p->overlay_p)
     {
@@ -836,27 +819,6 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
   XSetClipMask (display, gc, None);
 }
 
-\f
-
-/* This is called when starting Emacs and when restarting after
-   suspend.  When starting Emacs, no X window is mapped.  And nothing
-   must be done to Emacs's own window if it is suspended (though that
-   rarely happens).  */
-
-static void
-XTset_terminal_modes (struct terminal *terminal)
-{
-}
-
-/* This is called when exiting or suspending Emacs.  Exiting will make
-   the X-windows go away, and suspending requires no action.  */
-
-static void
-XTreset_terminal_modes (struct terminal *terminal)
-{
-}
-
-\f
 /***********************************************************************
                            Glyph display
  ***********************************************************************/
@@ -2977,10 +2939,10 @@ x_delete_glyphs (struct frame *f, register int n)
    If they are <= 0, this is probably an error.  */
 
 void
-x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
+x_clear_area (Display *dpy, Window window, int x, int y, int width, int height)
 {
   eassert (width > 0 && height > 0);
-  XClearArea (dpy, window, x, y, width, height, exposures);
+  XClearArea (dpy, window, x, y, width, height, False);
 }
 
 
@@ -2992,11 +2954,7 @@ x_clear_frame (struct frame *f)
   /* Clearing the frame will erase any cursor, so mark them all as no
      longer visible.  */
   mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
-  output_cursor.hpos = output_cursor.vpos = 0;
-  output_cursor.x = -1;
 
-  /* We don't set the output cursor here because there will always
-     follow an explicit cursor_to.  */
   block_input ();
 
   XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
@@ -3222,20 +3180,6 @@ XTring_bell (struct frame *f)
     }
 }
 
-\f
-/* Specify how many text lines, from the top of the window,
-   should be affected by insert-lines and delete-lines operations.
-   This, and those operations, are used only within an update
-   that is bounded by calls to x_update_begin and x_update_end.  */
-
-static void
-XTset_terminal_window (struct frame *f, int n)
-{
-  /* This function intentionally left blank.  */
-}
-
-
-\f
 /***********************************************************************
                              Line Dance
  ***********************************************************************/
@@ -3261,7 +3205,7 @@ x_scroll_run (struct window *w, struct run *run)
   /* Get frame-relative bounding box of the text display area of W,
      without mode lines.  Include in this box the left and right
      fringe of W.  */
-  window_box (w, -1, &x, &y, &width, &height);
+  window_box (w, ANY_AREA, &x, &y, &width, &height);
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
   /* If the fringe is adjacent to the left (right) scroll bar of a
@@ -3777,7 +3721,6 @@ construct_mouse_click (struct input_event *result, XButtonEvent *event, struct f
   return Qnil;
 }
 
-\f
 /* Function to report a mouse movement to the mainstream Emacs code.
    The input handler calls this.
 
@@ -4197,9 +4140,9 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
                               scroll_bar_end_scroll, 0, 0);
       w = XWINDOW (window_being_scrolled);
 
-      if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
+      if (XSCROLL_BAR (w->vertical_scroll_bar)->dragging != -1)
        {
-         XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
+         XSCROLL_BAR (w->vertical_scroll_bar)->dragging = -1;
          /* The thumb size is incorrect while dragging: fix it.  */
          set_vertical_scroll_bar (w);
        }
@@ -4337,32 +4280,32 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
   switch (cs->reason)
     {
     case XmCR_DECREMENT:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_up_arrow;
       break;
 
     case XmCR_INCREMENT:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_down_arrow;
       break;
 
     case XmCR_PAGE_DECREMENT:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_above_handle;
       break;
 
     case XmCR_PAGE_INCREMENT:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_below_handle;
       break;
 
     case XmCR_TO_TOP:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_to_top;
       break;
 
     case XmCR_TO_BOTTOM:
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       part = scroll_bar_to_bottom;
       break;
 
@@ -4378,7 +4321,7 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
        whole = XM_SB_MAX - slider_size;
        portion = min (cs->value, whole);
        part = scroll_bar_handle;
-       bar->dragging = make_number (cs->value);
+       bar->dragging = cs->value;
       }
       break;
 
@@ -4426,24 +4369,24 @@ xg_scroll_callback (GtkRange     *range,
           whole = gtk_adjustment_get_upper (adj) -
             gtk_adjustment_get_page_size (adj);
           portion = min ((int)position, whole);
-          bar->dragging = make_number ((int)portion);
+          bar->dragging = portion;
         }
       break;
     case GTK_SCROLL_STEP_BACKWARD:
       part = scroll_bar_up_arrow;
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       break;
     case GTK_SCROLL_STEP_FORWARD:
       part = scroll_bar_down_arrow;
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       break;
     case GTK_SCROLL_PAGE_BACKWARD:
       part = scroll_bar_above_handle;
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       break;
     case GTK_SCROLL_PAGE_FORWARD:
       part = scroll_bar_below_handle;
-      bar->dragging = Qnil;
+      bar->dragging = -1;
       break;
     }
 
@@ -4457,7 +4400,7 @@ xg_scroll_callback (GtkRange     *range,
   return FALSE;
 }
 
-/* Callback for button release. Sets dragging to Qnil when dragging is done.  */
+/* Callback for button release. Sets dragging to -1 when dragging is done.  */
 
 static gboolean
 xg_end_scroll_callback (GtkWidget *widget,
@@ -4465,7 +4408,7 @@ xg_end_scroll_callback (GtkWidget *widget,
                         gpointer user_data)
 {
   struct scroll_bar *bar = user_data;
-  bar->dragging = Qnil;
+  bar->dragging = -1;
   if (WINDOWP (window_being_scrolled))
     {
       x_send_scroll_bar_event (window_being_scrolled,
@@ -4513,7 +4456,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
     part = scroll_bar_handle;
 
   window_being_scrolled = bar->window;
-  bar->dragging = make_number (portion);
+  bar->dragging = portion;
   last_scroll_bar_part = part;
   x_send_scroll_bar_event (bar->window, part, portion, whole);
 }
@@ -4552,7 +4495,7 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
     part = scroll_bar_move_ratio;
 
   window_being_scrolled = bar->window;
-  bar->dragging = Qnil;
+  bar->dragging = -1;
   last_scroll_bar_part = part;
   x_send_scroll_bar_event (bar->window, part, position, height);
 }
@@ -4828,7 +4771,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
       shown = (float) portion / whole;
     }
 
-  if (NILP (bar->dragging))
+  if (bar->dragging == -1)
     {
       int size, value;
 
@@ -4863,7 +4806,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
                   NULL);
 
     /* Massage the top+shown values.  */
-    if (NILP (bar->dragging) || last_scroll_bar_part == scroll_bar_down_arrow)
+    if (bar->dragging == -1 || last_scroll_bar_part == scroll_bar_down_arrow)
       top = max (0, min (1, top));
     else
       top = old_top;
@@ -4875,7 +4818,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
        for `NARROWPROTO'.  See s/freebsd.h for an example.  */
     if (top != old_top || shown != old_shown)
       {
-       if (NILP (bar->dragging))
+       if (bar->dragging == -1)
          XawScrollbarSetThumb (widget, top, shown);
        else
          {
@@ -4940,8 +4883,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
        this case, no clear_frame is generated to reduce flickering.  */
     if (width > 0 && height > 0)
       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                   left, top, width,
-                   window_box_height (w), False);
+                   left, top, width, window_box_height (w));
 
     window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                            /* Position and size of scroll bar.  */
@@ -4967,7 +4909,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   bar->height = height;
   bar->start = 0;
   bar->end = 0;
-  bar->dragging = Qnil;
+  bar->dragging = -1;
   bar->fringe_extended_p = 0;
 
   /* Add bar to its frame's list of scroll bars.  */
@@ -5025,7 +4967,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
 static void
 x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
 {
-  int dragging = ! NILP (bar->dragging);
+  bool dragging = bar->dragging != -1;
   Window w = bar->x_window;
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
   GC gc = f->output_data.x->normal_gc;
@@ -5077,11 +5019,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
        zero-height areas; that means "clear to end of window."  */
     if (start > 0)
       x_clear_area (FRAME_X_DISPLAY (f), w,
-                   /* x, y, width, height, and exposures.  */
                    VERTICAL_SCROLL_BAR_LEFT_BORDER,
                    VERTICAL_SCROLL_BAR_TOP_BORDER,
-                   inside_width, start,
-                   False);
+                   inside_width, start);
 
     /* Change to proper foreground color if one is specified.  */
     if (f->output_data.x->scroll_bar_foreground_pixel != -1)
@@ -5104,12 +5044,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
        clear zero-height areas; that means "clear to end of window." */
     if (end < inside_height)
       x_clear_area (FRAME_X_DISPLAY (f), w,
-                   /* x, y, width, height, and exposures.  */
                    VERTICAL_SCROLL_BAR_LEFT_BORDER,
                    VERTICAL_SCROLL_BAR_TOP_BORDER + end,
-                   inside_width, inside_height - end,
-                   False);
-
+                   inside_width, inside_height - end);
   }
 
   unblock_input ();
@@ -5161,7 +5098,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 #endif
 
   /* Get window dimensions.  */
-  window_box (w, -1, 0, &window_y, 0, &window_height);
+  window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
   top = window_y;
   width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
   height = window_height;
@@ -5202,11 +5139,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 #ifdef USE_TOOLKIT_SCROLL_BARS
          if (fringe_extended_p)
            x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                         sb_left, top, sb_width, height, False);
+                         sb_left, top, sb_width, height);
          else
 #endif
            x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                         left, top, width, height, False);
+                         left, top, width, height);
          unblock_input ();
        }
 
@@ -5241,10 +5178,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
            {
              if (fringe_extended_p)
                x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                             sb_left, top, sb_width, height, False);
+                             sb_left, top, sb_width, height);
              else
                x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                             left, top, width, height, False);
+                             left, top, width, height);
            }
 #ifdef USE_GTK
           xg_update_scrollbar_pos (f,
@@ -5268,12 +5205,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
       if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
        {
          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
-                       height, False);
+                       left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                        left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM,
-                       top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
-                       height, False);
+                       top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
        }
 
       /* Clear areas not covered by the scroll bar because it's not as
@@ -5287,11 +5222,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
          {
            if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
              x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                           left + area_width -  rest, top,
-                           rest, height, False);
+                           left + area_width - rest, top, rest, height);
            else
              x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                           left, top, rest, height, False);
+                           left, top, rest, height);
          }
       }
 
@@ -5326,7 +5260,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 #else /* not USE_TOOLKIT_SCROLL_BARS */
   /* Set the scroll bar's current state, unless we're currently being
      dragged.  */
-  if (NILP (bar->dragging))
+  if (bar->dragging == -1)
     {
       int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height);
 
@@ -5536,14 +5470,13 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
 
 #ifndef USE_TOOLKIT_SCROLL_BARS
     /* If the user has released the handle, set it to its final position.  */
-    if (event->type == ButtonRelease
-       && ! NILP (bar->dragging))
+    if (event->type == ButtonRelease && bar->dragging != -1)
       {
-       int new_start = y - XINT (bar->dragging);
+       int new_start = y - bar->dragging;
        int new_end = new_start + bar->end - bar->start;
 
        x_scroll_bar_set_handle (bar, new_start, new_end, 0);
-       bar->dragging = Qnil;
+       bar->dragging = -1;
       }
 #endif
 
@@ -5560,20 +5493,20 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
    mark bits.  */
 
 static void
-x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
+x_scroll_bar_note_movement (struct scroll_bar *bar, XMotionEvent *event)
 {
   struct frame *f = XFRAME (XWINDOW (bar->window)->frame);
 
-  last_mouse_movement_time = event->xmotion.time;
+  last_mouse_movement_time = event->time;
 
   f->mouse_moved = 1;
   XSETVECTOR (last_mouse_scroll_bar, bar);
 
   /* If we're dragging the bar, display it.  */
-  if (! NILP (bar->dragging))
+  if (bar->dragging != -1)
     {
       /* Where should the handle be now?  */
-      int new_start = event->xmotion.y - XINT (bar->dragging);
+      int new_start = event->y - bar->dragging;
 
       if (new_start != bar->start)
        {
@@ -5625,8 +5558,8 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
 
       win_y -= VERTICAL_SCROLL_BAR_TOP_BORDER;
 
-      if (! NILP (bar->dragging))
-       win_y -= XINT (bar->dragging);
+      if (bar->dragging != -1)
+       win_y -= bar->dragging;
 
       if (win_y < 0)
        win_y = 0;
@@ -5636,7 +5569,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
       *fp = f;
       *bar_window = bar->window;
 
-      if (! NILP (bar->dragging))
+      if (bar->dragging != -1)
        *part = scroll_bar_handle;
       else if (win_y < bar->start)
        *part = scroll_bar_above_handle;
@@ -5681,18 +5614,7 @@ x_scroll_bar_clear (struct frame *f)
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
 }
 
-\f
-/* The main X event-reading loop - XTread_socket.  */
-
-/* This holds the state XLookupString needs to implement dead keys
-   and other tricks known as "compose processing".  _X Window System_
-   says that a portable program can't use this, but Stephen Gildea assures
-   me that letting the compiler initialize it to zeros will work okay.
-
-   This must be defined outside of XTread_socket, for the same reasons
-   given for enter_timestamp, above.  */
-
-static XComposeStatus compose_status;
+#ifdef ENABLE_CHECKING
 
 /* Record the last 100 characters stored
    to help debug the loss-of-chars-during-GC problem.  */
@@ -5705,6 +5627,12 @@ static short temp_buffer[100];
     temp_index = 0;                                            \
   temp_buffer[temp_index++] = (keysym)
 
+#else /* not ENABLE_CHECKING */
+
+#define STORE_KEYSYM_FOR_DEBUG(keysym) ((void)0)
+
+#endif /* ENABLE_CHECKING */
+
 /* Set this to nonzero to fake an "X I/O error"
    on a particular display.  */
 
@@ -5842,6 +5770,12 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
   struct coding_system coding;
   XEvent event = *eventptr;
   Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
+  /* This holds the state XLookupString needs to implement dead keys
+     and other tricks known as "compose processing".  _X Window System_
+     says that a portable program can't use this, but Stephen Gildea assures
+     me that letting the compiler initialize it to zeros will work okay.  */
+  static XComposeStatus compose_status;
+
   USE_SAFE_ALLOCA;
 
   *finish = X_EVENT_NORMAL;
@@ -6135,11 +6069,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
         {
 #ifdef USE_GTK
           /* This seems to be needed for GTK 2.6.  */
-          x_clear_area (event.xexpose.display,
-                        event.xexpose.window,
-                        event.xexpose.x, event.xexpose.y,
-                        event.xexpose.width, event.xexpose.height,
-                        FALSE);
+         x_clear_area (event.xexpose.display,
+                       event.xexpose.window,
+                       event.xexpose.x, event.xexpose.y,
+                       event.xexpose.width, event.xexpose.height);
 #endif
           if (!FRAME_VISIBLE_P (f))
             {
@@ -6211,7 +6144,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
 
     case UnmapNotify:
       /* Redo the mouse-highlight after the tooltip has gone.  */
-      if (event.xmap.window == tip_window)
+      if (event.xunmap.window == tip_window)
         {
           tip_window = 0;
           redo_mouse_highlight ();
@@ -6715,18 +6648,16 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
             /* Generate SELECT_WINDOW_EVENTs when needed.
                Don't let popup menus influence things (bug#1261).  */
             if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
-              {
-                Lisp_Object window;
-
-                window = window_from_coordinates (f,
-                                                  event.xmotion.x, event.xmotion.y,
-                                                  0, 0);
-
-                /* Window will be selected only when it is not selected now and
-                   last mouse movement event was not in it.  Minibuffer window
-                   will be selected only when it is active.  */
-                if (WINDOWP (window)
-                    && !EQ (window, last_window)
+             {
+               static Lisp_Object last_mouse_window;
+               Lisp_Object window = window_from_coordinates
+                 (f, event.xmotion.x, event.xmotion.y, 0, 0);
+
+               /* Window will be selected only when it is not selected now and
+                  last mouse movement event was not in it.  Minibuffer window
+                  will be selected only when it is active.  */
+               if (WINDOWP (window)
+                   && !EQ (window, last_mouse_window)
                    && !EQ (window, selected_window)
                    /* For click-to-focus window managers
                       create event iff we don't leave the
@@ -6734,13 +6665,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
                    && (focus_follows_mouse
                        || (EQ (XWINDOW (window)->frame,
                                XWINDOW (selected_window)->frame))))
-                  {
-                    inev.ie.kind = SELECT_WINDOW_EVENT;
-                    inev.ie.frame_or_window = window;
-                  }
-
-                last_window=window;
-              }
+                 {
+                   inev.ie.kind = SELECT_WINDOW_EVENT;
+                   inev.ie.frame_or_window = window;
+                 }
+               /* Remember the last window where we saw the mouse.  */
+               last_mouse_window = window;
+             }
             if (!note_mouse_movement (f, &event.xmotion))
              help_echo_string = previous_help_echo_string;
           }
@@ -6752,7 +6683,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
                                         event.xmotion.window);
 
             if (bar)
-              x_scroll_bar_note_movement (bar, &event);
+              x_scroll_bar_note_movement (bar, &event.xmotion);
 #endif /* USE_TOOLKIT_SCROLL_BARS */
 
             /* If we move outside the frame, then we're
@@ -7184,7 +7115,8 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit)
    mode lines must be clipped to the whole window.  */
 
 static void
-x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc)
+x_clip_to_row (struct window *w, struct glyph_row *row,
+              enum glyph_row_area area, GC gc)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   XRectangle clip_rect;
@@ -7366,8 +7298,7 @@ x_define_frame_cursor (struct frame *f, Cursor cursor)
 static void
 x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
 {
-  x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-               x, y, width, height, False);
+  x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x, y, width, height);
 #ifdef USE_GTK
   /* Must queue a redraw, because scroll bars might have been cleared.  */
   if (FRAME_GTK_WIDGET (f))
@@ -7434,9 +7365,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
 #endif
     }
 
-#ifndef XFlush
   XFlush (FRAME_X_DISPLAY (f));
-#endif
 }
 
 \f
@@ -8189,9 +8118,6 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
 
   if (change_gravity > 0)
     {
-      FRAME_X_OUTPUT (f)->left_before_move = f->left_pos;
-      FRAME_X_OUTPUT (f)->top_before_move = f->top_pos;
-
       f->top_pos = yoff;
       f->left_pos = xoff;
       f->size_hint_flags &= ~ (XNegative | YNegative);
@@ -8690,7 +8616,7 @@ x_wait_for_event (struct frame *f, int eventtype)
 {
   int level = interrupt_input_blocked;
 
-  SELECT_TYPE fds;
+  fd_set fds;
   struct timespec tmo, tmo_at, time_now;
   int fd = ConnectionNumber (FRAME_X_DISPLAY (f));
 
@@ -10250,9 +10176,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   dpyinfo->x_dnd_atoms_size = 8;
   dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
                                   * dpyinfo->x_dnd_atoms_size);
-
-  connection = ConnectionNumber (dpyinfo->display);
-  dpyinfo->connection = connection;
   dpyinfo->gray
     = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
                                   gray_bits, gray_width, gray_height,
@@ -10264,6 +10187,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
   xsettings_initialize (dpyinfo);
 
+  connection = ConnectionNumber (dpyinfo->display);
+
   /* This is only needed for distinguishing keyboard and process input.  */
   if (connection != 0)
     add_keyboard_wait_descriptor (connection);
@@ -10364,8 +10289,6 @@ x_delete_display (struct x_display_info *dpyinfo)
         break;
       }
 
-  delete_keyboard_wait_descriptor (dpyinfo->connection);
-
   /* Discard this display from x_display_name_list and x_display_list.
      We can't use Fdelq because that can quit.  */
   if (! NILP (x_display_name_list)
@@ -10466,13 +10389,7 @@ static struct redisplay_interface x_redisplay_interface =
     x_after_update_window_line,
     x_update_window_begin,
     x_update_window_end,
-    x_cursor_to,
-    x_flush,
-#ifdef XFlush
     x_flush,
-#else
-    0,  /* flush_display_optional */
-#endif
     x_clear_window_mouse_face,
     x_get_glyph_overhangs,
     x_fix_overlapping_area,
@@ -10494,6 +10411,7 @@ void
 x_delete_terminal (struct terminal *terminal)
 {
   struct x_display_info *dpyinfo = terminal->display_info.x;
+  int connection = -1;
 
   /* Protect against recursive calls.  delete_frame in
      delete_terminal calls us back when it deletes our last frame.  */
@@ -10512,6 +10430,8 @@ x_delete_terminal (struct terminal *terminal)
      and dpyinfo->display was set to 0 to indicate that.  */
   if (dpyinfo->display)
     {
+      connection = ConnectionNumber (dpyinfo->display);
+
       x_destroy_all_bitmaps (dpyinfo);
       XSetCloseDownMode (dpyinfo->display, DestroyAll);
 
@@ -10552,6 +10472,10 @@ x_delete_terminal (struct terminal *terminal)
 #endif /* ! USE_GTK */
     }
 
+  /* No more input on this descriptor.  */
+  if (connection != -1)
+    delete_keyboard_wait_descriptor (connection);
+
   /* Mark as dead. */
   dpyinfo->display = NULL;
   x_delete_display (dpyinfo);
@@ -10579,11 +10503,11 @@ x_create_terminal (struct x_display_info *dpyinfo)
   terminal->delete_glyphs_hook = x_delete_glyphs;
   terminal->ring_bell_hook = XTring_bell;
   terminal->toggle_invisible_pointer_hook = XTtoggle_invisible_pointer;
-  terminal->reset_terminal_modes_hook = XTreset_terminal_modes;
-  terminal->set_terminal_modes_hook = XTset_terminal_modes;
+  terminal->reset_terminal_modes_hook = NULL;
+  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = x_update_begin;
   terminal->update_end_hook = x_update_end;
-  terminal->set_terminal_window_hook = XTset_terminal_window;
+  terminal->set_terminal_window_hook = NULL;
   terminal->read_socket_hook = XTread_socket;
   terminal->frame_up_to_date_hook = XTframe_up_to_date;
   terminal->mouse_position_hook = XTmouse_position;
index 723550c57c497ca861c4523ca1f1b167a01e48c4..883a249629dda20f89cd42666ed2df58c69c0469 100644 (file)
@@ -20,8 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef XTERM_H
 #define XTERM_H
 
-#include "dispextern.h"
-
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
 
@@ -73,14 +71,13 @@ typedef GtkWidget *xt_or_gtk_widget;
 #define USE_GTK_TOOLTIP
 #endif
 
-\f
-/* Bookkeeping to distinguish X versions.  */
-
-
 #ifdef HAVE_X_I18N
 #include <X11/Xlocale.h>
 #endif
-\f
+
+#include "dispextern.h"
+#include "termhooks.h"
+
 #define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
                                         XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
 #define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
@@ -141,9 +138,6 @@ struct x_display_info
   /* The generic display parameters corresponding to this X display. */
   struct terminal *terminal;
 
-  /* Connection number (normally a file descriptor number).  */
-  int connection;
-
   /* This says how to access this display in Xlib.  */
   Display *display;
 
@@ -409,9 +403,6 @@ extern bool x_display_ok (const char *);
 
 extern void select_visual (struct x_display_info *);
 
-\f
-struct font;
-
 /* Each X frame object points to its own struct x_output object
    in the output_data.x field.  The x_output structure contains
    the information that is specific to X windows.  */
@@ -632,11 +623,6 @@ struct x_output
   int move_offset_top;
   int move_offset_left;
 
-  /* The frame's left/top offsets before we call XMoveWindow.  See
-     x_check_expected_move.  */
-  int left_before_move;
-  int top_before_move;
-
   /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame.  */
   unsigned net_wm_state_hidden_seen : 1;
 };
@@ -812,8 +798,8 @@ struct scroll_bar
   /* If the scroll bar handle is currently being dragged by the user,
      this is the number of pixels from the top of the handle to the
      place where the user grabbed it.  If the handle isn't currently
-     being dragged, this is Qnil.  */
-  Lisp_Object dragging;
+     being dragged, this is -1.  */
+  int dragging;
 
   /* 1 if the background of the fringe that is adjacent to a scroll
      bar is extended to the gap between the fringe and the bar.  */
@@ -919,14 +905,6 @@ struct selection_input_event
 #define SELECTION_EVENT_TIME(eventp)   \
   (((struct selection_input_event *) (eventp))->time)
 
-\f
-struct window;
-struct glyph_matrix;
-struct frame;
-struct input_event;
-struct face;
-struct image;
-
 /* From xselect.c.  */
 
 void x_handle_selection_notify (XSelectionEvent *);
@@ -968,7 +946,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
 #endif
 extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
 extern void x_query_color (struct frame *f, XColor *);
-extern void x_clear_area (Display *, Window, int, int, int, int, int);
+extern void x_clear_area (Display *, Window, int, int, int, int);
 #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK
 extern void x_mouse_leave (struct x_display_info *);
 #endif
index 969bc3c49392b7486b5ab14592004c7f70987455..7b39097d3b5876abda347a81e6005efab7bd4788 100644 (file)
@@ -1,3 +1,14 @@
+2013-09-01  Glenn Morris  <rgm@gnu.org>
+
+       * automated/Makefile.in (setwins): Avoid leading space in $wins.
+       Otherwise the sed command used by eg compile-main ends up
+       containing "/*.el".  (Bug#15170)
+
+2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+       for portability to hosts where /bin/sh has problems.
+
 2013-08-21  David Engster  <deng@randomsample.de>
 
        * automated/eieio-tests.el, automated/eieio-test-persist.el:
index d4bfcc12130de9187bf9555f06d9be8b153e3604..bf8e62f77cda777a010910303b4e30fae7e651aa 100644 (file)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -52,7 +52,7 @@ emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT)
 setwins=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* | ./data* ) ;; \
-               *) wins="$$wins $$file" ;; \
+               *) wins="$$wins$${wins:+ }$$file" ;; \
           esac; \
         done
 
index 76a28919f2190a2ca4cb4414cc1635bf55555061..db8618c811eb1ad3a4f2936b7806753e614cb5b1 100644 (file)
@@ -1,4 +1,4 @@
-;;; eieio-testsinvoke.el -- eieio tests for method invokation
+;;; eieio-testsinvoke.el -- eieio tests for method invocation
 
 ;; Copyright (C) 2005, 2008, 2010, 2013 Free Software Foundation, Inc.
 
     (setq eieio-test-method-order-list (nreverse eieio-test-method-order-list))
     (eieio-test-match ans)))
 
-;;; Test static invokation
+;;; Test static invocation
 ;;
 (defmethod eitest-H :STATIC ((class eitest-A))
   "No need to do work in here."
index 2d8ae4c7d43eb462a4d79ee95c8bf01993eeda3f..144f0bc919dc171c12700f1b2db521d2c10376db 100644 (file)
@@ -21,7 +21,7 @@
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;;  
+;;
 ;; Test the various features of EIEIO.
 
 (require 'ert)
@@ -66,7 +66,7 @@
           :initform moose
           :type symbol
           :allocation :instance
-          :documentation "Fisrt slot testing slot arguments."
+          :documentation "First slot testing slot arguments."
           :custom symbol
           :label "Wild Animal"
           :group borg
   (defun anormalfunction () "A plain function for error testing." nil)
   (should-error
    (progn
-     (defgeneric anormalfunction () 
+     (defgeneric anormalfunction ()
        "Attempt to turn it into a generic.")))
 
   ;; Check that generic-p works
@@ -589,7 +589,7 @@ METHOD is the method that was attempting to be called."
   ;;; HACK ALERT: The new value of a class slot is inherited by the
   ;; subclass!  This is probably a bug.  We should either share the slot
   ;; so sets on the baseclass change the subclass, or we should inherit
-  ;; the original value. 
+  ;; the original value.
 ;;  (should (eq (get-slot-3 eitest-t2) 'emu))
 ;;  (should (eq (get-slot-3 class-subc) 'emu))
 ;;  (setf (get-slot-3 eitest-t2) 'setf-emu)
@@ -604,7 +604,7 @@ METHOD is the method that was attempting to be called."
   "Try to access slot-2 from this class which doesn't have it.
 The object S2 passed in will be of class prot-1, which does have
 the slot.  This could be allowed, and currently is in EIEIO.
-Needed by the eieio persistant base class."
+Needed by the eieio persistent base class."
   (oref s2 slot-2))
 
 (defclass prot-1 (prot-0)
@@ -662,7 +662,7 @@ Do not override for `prot-2'."
   (prot0-slot-2 eitest-p1)
   ;; Accessing private slot out of context must fail
   (should-error (oref eitest-p1 slot-3) :type 'invalid-slot-name)
-  ;; Access private slot in ethod
+  ;; Access private slot in method
   (prot1-slot-3 eitest-p1)
   ;; Access private slot in subclass method must fail
   (should-error (prot1-slot-3 eitest-p2) :type 'invalid-slot-name)
@@ -713,7 +713,7 @@ Do not override for `prot-2'."
 Subclasses to override slot attributes.")
 
 (defclass slotattr-ok (slotattr-base)
-  ((initform :initform no-init)   
+  ((initform :initform no-init)
    (initarg :initarg :initblarg)
    (custom :custom string
           :label "One String"
@@ -767,7 +767,7 @@ Subclasses to override slot attributes.")
 Subclasses to override slot attributes.")
 
 (defclass slotattr-class-ok (slotattr-class-base)
-  ((initform :initform no-init)   
+  ((initform :initform no-init)
    (initarg :initarg :initblarg)
    (custom :custom string
           :label "One String"
index 853f4dbf992456eb28872670d5b1cfbb0ce60258..af1bbb9d8ab26e4a6a9d8c2cc696eff99b42cab7 100644 (file)
@@ -66,3 +66,8 @@ end
 Given /toto/ do
   print "hello"
 end
+
+# Bug#15208
+if something == :==
+  do_something
+end