emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] xwidget_mvp 2d27e24: merge master


From: Joakim Verona
Subject: [Emacs-diffs] xwidget_mvp 2d27e24: merge master
Date: Sun, 03 Jan 2016 05:34:25 +0000

branch: xwidget_mvp
commit 2d27e24a37b514e7c07c120cc4f3984ae3b0c53e
Merge: 3e73732 531b28b
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    merge master
---
 ChangeLog.2                                     |   94 +++-
 admin/gitmerge.el                               |   12 +-
 doc/emacs/dired.texi                            |    7 +
 doc/misc/emacs-gnutls.texi                      |   17 +-
 doc/misc/eww.texi                               |    6 +
 etc/NEWS                                        |   12 +
 lisp/Makefile.in                                |   16 +-
 lisp/dired-aux.el                               |    2 +-
 lisp/dired-x.el                                 |    2 +-
 lisp/dired.el                                   |  559 +------------------
 lisp/emacs-lisp/eieio-compat.el                 |    2 +-
 lisp/emacs-lisp/eieio-core.el                   |   93 +---
 lisp/emacs-lisp/eieio-custom.el                 |    2 +-
 lisp/emacs-lisp/eieio-opt.el                    |    2 +-
 lisp/emacs-lisp/eieio.el                        |   35 --
 lisp/erc/erc.el                                 |    7 +-
 lisp/ffap.el                                    |    2 +-
 lisp/hfy-cmap.el                                |    2 +-
 lisp/htmlfontify.el                             |   22 +-
 lisp/ibuf-ext.el                                |    2 +-
 lisp/ibuffer.el                                 |  377 +------------
 lisp/mail/rmail.el                              |  223 +-------
 lisp/mail/rmailedit.el                          |    2 +-
 lisp/mail/rmailkwd.el                           |    2 +-
 lisp/mail/rmailmm.el                            |    2 +-
 lisp/mail/rmailmsc.el                           |    2 +-
 lisp/mail/rmailsort.el                          |    2 +-
 lisp/mail/rmailsum.el                           |    2 +-
 lisp/mail/undigest.el                           |    2 +-
 lisp/menu-bar.el                                |   12 +-
 lisp/net/eww.el                                 |  126 +++-
 lisp/net/gnutls.el                              |    9 +-
 lisp/net/shr.el                                 |   71 ++-
 lisp/ps-mule.el                                 |    2 +-
 lisp/ps-print.el                                |   75 +---
 lisp/textmodes/reftex-auc.el                    |    2 +-
 lisp/textmodes/reftex-cite.el                   |    2 +-
 lisp/textmodes/reftex-dcr.el                    |    2 +-
 lisp/textmodes/reftex-global.el                 |    2 +-
 lisp/textmodes/reftex-index.el                  |    2 +-
 lisp/textmodes/reftex-parse.el                  |    2 +-
 lisp/textmodes/reftex-ref.el                    |    2 +-
 lisp/textmodes/reftex-sel.el                    |    2 +-
 lisp/textmodes/reftex-toc.el                    |    2 +-
 lisp/textmodes/reftex.el                        |  699 +----------------------
 lisp/url/url-auth.el                            |    3 +
 lisp/url/url-cookie.el                          |   71 ++--
 lisp/url/url-expand.el                          |   84 ++--
 lisp/url/url-handlers.el                        |    4 +-
 lisp/url/url-http.el                            |   15 +-
 lisp/url/url-parse.el                           |    5 +-
 test/lisp/dired-tests.el                        |   35 ++
 test/lisp/emacs-lisp/eieio-tests/eieio-tests.el |    6 +
 test/lisp/htmlfontify-tests.el                  |   34 ++
 test/lisp/ibuffer-tests.el                      |   34 ++
 test/lisp/mail/rmail-tests.el                   |   35 ++
 test/lisp/ps-print-tests.el                     |   36 ++
 test/lisp/textmodes/reftex-tests.el             |   15 +
 test/lisp/url/url-expand-tests.el               |  105 ++++
 test/lisp/url/url-parse-tests.el                |  167 ++++++
 60 files changed, 921 insertions(+), 2250 deletions(-)

diff --git a/ChangeLog.2 b/ChangeLog.2
index 07a6c0e..61b25ab 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,95 @@
+2015-12-18  Phillip Lord  <address@hidden>
+
+       Fix bootstrap issue with dired-loaddefs
+
+       * lisp/dired.el: Autoloads for secondary files loaded optionally.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       dired generate autoloads to non-versioned file.
+
+       * lisp/dired.el: Remove autoloads.
+       * lisp/Makefile.in: Add dired to autogenel.
+       * lisp/dired-aux.el,lisp/dired-x.el: Update file local.
+       * test/lisp/dired-tests.el: Add new test.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       eieio generate autoloads to non-versioned file.
+
+       * lisp/Makefile.in: eieio-loaddefs add to autogenel.
+       * lisp/emacs-lisp/eieio.el,lisp/emacs-lisp/eieio-core.el:
+         Remove autoloads.
+       * lisp/emacs-lisp/eieio-compat.el,lisp/emacs-lisp/eieio-custom.el,
+         lisp/emacs-lisp/eieio-opt.el: Update file local.
+       * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: New test.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       htmlfontify generate autoload to non-versioned file.
+
+       * lisp/Makefile.in: Add htmlfontity-loaddefs to autogenel.
+       * lisp/hfy-cmap.el: Update file local.
+       * lisp/htmlfontify.el: Remove autoloads, add require.
+       * test/lisp/htmlfontify-tests.el: Test autoload functionality.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       ibuffer generate autoloads to non-versioned file.
+
+       * lisp/Makefile.in: Add ibuffer-loaddefs to autogenel.
+       * lisp/ibuf-ext.el: Update file local.
+       * lisp/ibuffer.el: Remove autoloads and add a require.
+       * test/lisp/ibuffer-tests.el: Test that autoload is working.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       rmail generate autoloads to non-versioned file.
+
+       * lisp/Makefile.in: Add rmail-loaddefs.el to autogenel.
+       * lisp/mail/rmail.el: Remove autoloads, add require.
+       * lisp/mail/rmailedit.el,lisp/mail/rmailkwd.el,
+         lisp/mail/rmailmm.el,lisp/mail/rmailmsc.el,
+         lisp/mail/rmailsort.el,lisp/mail/rmailsum.el,
+         lisp/mail/undigest.el: Update file-local.
+       * test/lisp/mail/rmail-tests.el:
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       Add autoload-force target.
+
+       * lisp/Makefile.in (autoload-force): New target.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       ps-print generate autoloads to non versioned file.
+
+       * lisp/Makefile.in: Add ps-print-loaddefs.el to autogen list.
+       * lisp/ps-print.el: Remove autoloads.
+       * lisp/ps-mule.el: Update file-local.
+       * test/lisp/ps-print-tests.el: Test autoload functionality.
+
+2015-12-17  Phillip Lord  <address@hidden>
+
+       reftex generate autoloads to non versioned file.
+
+       * lisp/Makefile.in: Add reftex-loaddefs to autogen files
+       * lisp/textmodes/reftex.el: Remove autoloads.
+       * lisp/textmodes/reftex-auc.el,lisp/textmodes/reftex-cite.el,
+         lisp/textmodes/reftex-dcr.el,lisp/textmodes/reftex-global.el,
+         lisp/textmodes/reftex-index.el,lisp/textmodes/reftex-parse.el,
+         lisp/textmodes/reftex-ref.el,lisp/textmodes/reftex-sel.el,
+         lisp/textmodes/reftex-toc.el: Update autoload file-local.
+       * test/lisp/textmodes/reftex-tests.el: Add test of an autoloaded
+         function.
+
+2015-12-07  Stefan Monnier  <address@hidden>
+
+       * lisp/calculator.el (calculator-define-key): Undo last change
+
+       Make map argument mandatory instead (bug#22106).
+       (calculator-add-operators): Pass the argument that's not optional any 
more.
+
 2015-12-03  Glenn Morris  <address@hidden>
 
        * Makefile.in: Avoid duplication.
@@ -20033,7 +20125,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit ffefb6e899fbcdcbd79cb34292d57b7bc3043fcc (inclusive).
+commit 138480a97bfc1104143b5fc10dfc962b95b78ae8 (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index 1e92c8c..69e4d28 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -48,7 +48,9 @@
 (require 'smerge-mode)
 
 (defvar gitmerge-skip-regexp
-  "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk\\|\
+  ;; We used to include "sync" in there, but in my experience it only
+  ;; caused false positives.  --Stef
+  "back[- ]?port\\|merge\\|re-?generate\\|bump version\\|from trunk\\|\
 Auto-commit"
   "Regexp matching logs of revisions that might be skipped.
 `gitmerge-missing' will ask you if it should skip any matches.")
@@ -429,8 +431,14 @@ If so, add no longer conflicted files and commit."
        (when mergehead
          (with-current-buffer (get-buffer-create gitmerge-output-buffer)
            (erase-buffer)
+            ;; FIXME: We add "-m-" because the default commit message
+            ;; apparently tickles our commit hook:
+            ;;    Line longer than 78 characters in commit message
+            ;;    Line longer than 78 characters in commit message
+            ;;    Line longer than 78 characters in commit message
+            ;;    Commit aborted; please see the file CONTRIBUTE
            (unless (zerop (call-process "git" nil t nil
-                                        "commit" "--no-edit"))
+                                        "commit" "--no-edit" "-m-"))
              (error "Git error during merge - fix it manually"))))
        ;; Successfully resumed.
        t))))
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index e7e4944..04cef38 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1414,6 +1414,13 @@ names into arguments for other Emacs commands.  It also 
displays what
 it added to the kill ring, so you can use it to display the list of
 currently marked files in the echo area.
 
address@hidden W @r{(Dired)}
address@hidden browse-url-of-dired-file
+  If you have an HTML file in the file listing, it can be useful to
+view that file with a browser.  The @kbd{W}
+(@code{browse-url-of-dired-file}) command will use the standard
+configured browser to view that file.
+
 @kindex ( @r{(Dired)}
 @findex dired-hide-details-mode
 @vindex dired-hide-details-hide-symlink-targets
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index 4f6ef01..d951e2f 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -123,14 +123,15 @@ The @code{gnutls-trustfiles} variable is a list of 
trustfiles
 host name (although @code{gnutls-negotiate} supports a trustfile per
 connection so it could be done if needed).  The trustfiles can be in
 PEM or DER format and examples can be found in most Unix
-distributions.  By default four locations are tried in this order:
address@hidden/etc/ssl/certs/ca-certificates.crt} for Debian, Ubuntu, Gentoo
-and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for Fedora
-and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse;
address@hidden/usr/ssl/certs/ca-bundle.crt} for Cygwin.  You can easily
-customize @code{gnutls-trustfiles} to be something else, but let us
-know if you do, so we can make the change to benefit the other users
-of that platform.
+distributions.  By default the following locations are tried in this
+order: @file{/etc/ssl/certs/ca-certificates.crt} for Debian, Ubuntu,
+Gentoo and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for
+Fedora and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse;
address@hidden/usr/ssl/certs/ca-bundle.crt} for Cygwin;
address@hidden/usr/local/share/certs/ca-root-nss.crt} for FreeBSD.  You can
+easily customize @code{gnutls-trustfiles} to be something else, but
+let us know if you do, so we can make the change to benefit the other
+users of that platform.
 @end defvar
 
 @defvar gnutls-verify-error
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index f1347b7..15cc867 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -109,6 +109,12 @@ only display this part.  This usually gets rid of menus 
and the like.
   The @kbd{F} command (@code{eww-toggle-fonts}) toggles whether to use
 variable-pitch fonts or not.  This sets the @code{shr-use-fonts} variable.
 
address@hidden eww-toggle-colors
address@hidden shr-use-colors
address@hidden F
+  The @kbd{C} command (@code{eww-toggle-colors}) toggles whether to use
+HTML-specified colors or not.  This sets the @code{shr-use-colors} variable.
+
 @findex eww-download
 @vindex eww-download-directory
 @kindex d
diff --git a/etc/NEWS b/etc/NEWS
index 1ef496c..20a1232 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -376,6 +376,9 @@ hide all messages of the specified type, where 
`erc-network-hide-list'
 and `erc-channel-hide-list' will only hide the specified message types
 for the respective specified targets.
 
+*** New variable `erc-default-port-tls' used to connect to TLS IRC
+servers.
+
 ** Midnight-mode
 *** `midnight-mode' is a proper minor mode.
 *** clean-buffer-*-regexps can now specify buffers via predicate functions.
@@ -524,6 +527,11 @@ whether to use variable-pitch fonts or not.  The user can 
also
 customize the `shr-use-fonts' variable.
 
 +++
+*** A new command `C' (`eww-toggle-colors) can be used to toggle
+whether to use the HTML-specified colors or not.  The user can also
+customize the `shr-use-colors variable.
+
++++
 *** A new command `R' (`eww-readable') will try do identify the main
 textual parts of a web page and display only that, leaving menus and
 the like off the page.
@@ -895,6 +903,10 @@ compress many marked files into a single named archive.  
The
 compression command is determined from the new
 `dired-compress-files-alist' variable.
 
++++
+*** `W' is now bound to `browse-url-of-dired-file', and is useful for
+viewing HTML files and the like.
+
 ** Obsolete packages
 
 ---
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 2ad16ed..164df25 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -81,13 +81,20 @@ AUTOGENEL = loaddefs.el \
        cus-load.el \
        finder-inf.el \
        subdirs.el \
+       ps-print-loaddefs.el \
        emacs-lisp/cl-loaddefs.el \
        calc/calc-loaddefs.el \
        eshell/esh-groups.el \
        cedet/semantic/loaddefs.el \
        cedet/ede/loaddefs.el \
        cedet/srecode/loaddefs.el \
-       org/org-loaddefs.el
+       org/org-loaddefs.el \
+       textmodes/reftex-loaddefs.el \
+       mail/rmail-loaddefs.el \
+       ibuffer-loaddefs.el \
+       htmlfontify-loaddefs \
+       emacs-lisp/eieio-loaddefs.el \
+       dired-loaddefs.el
 
 # Set load-prefer-newer for the benefit of the non-bootstrappers.
 BYTE_COMPILE_FLAGS = \
@@ -178,6 +185,13 @@ $(lisp)/loaddefs.el: $(LOADDEFS)
            --eval '(setq generated-autoload-file (expand-file-name 
(unmsys--file-name "$@")))' \
            -f batch-update-autoloads ${SUBDIRS_ALMOST}
 
+# autoloads only runs when loaddefs.el is non-existant, although it
+# generates a number of different files. Provide a force option to enable
+# regeneration of all these files.
+autoloads-force .PHONY:
+       rm loaddefs.el
+       $(MAKE) autoloads
+
 # This is required by the bootstrap-emacs target in ../src/Makefile, so
 # we know that if we have an emacs executable, we also have a subdirs.el.
 $(lisp)/subdirs.el:
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 9f11514..c0d1a90 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -2736,7 +2736,7 @@ instead."
 
 ;; Local Variables:
 ;; byte-compile-dynamic: t
-;; generated-autoload-file: "dired.el"
+;; generated-autoload-file: "dired-loaddefs.el"
 ;; End:
 
 ;;; dired-aux.el ends here
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index b6704bb..750e89d 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1669,7 +1669,7 @@ If `current-prefix-arg' is non-nil, uses name at point as 
guess."
 
 ;; Local Variables:
 ;; byte-compile-dynamic: t
-;; generated-autoload-file: "dired.el"
+;; generated-autoload-file: "dired-loaddefs.el"
 ;; End:
 
 ;;; dired-x.el ends here
diff --git a/lisp/dired.el b/lisp/dired.el
index 9ec39af..0a1b064 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -34,6 +34,9 @@
 
 ;;; Code:
 
+;; When bootstrapping dired-loaddefs has not been generated.
+(require 'dired-loaddefs nil t)
+
 (declare-function dired-buffer-more-recently-used-p
                  "dired-x" (buffer1 buffer2))
 
@@ -1535,6 +1538,7 @@ Do so according to the former subdir alist 
OLD-SUBDIR-ALIST."
     (define-key map "u" 'dired-unmark)
     (define-key map "v" 'dired-view-file)
     (define-key map "w" 'dired-copy-filename-as-kill)
+    (define-key map "W" 'browse-url-of-dired-file)
     (define-key map "x" 'dired-do-flagged-delete)
     (define-key map "y" 'dired-show-file-type)
     (define-key map "+" 'dired-create-directory)
@@ -3900,561 +3904,6 @@ Ask means pop up a menu for the user to select one of 
copy, move or link."
 (add-to-list 'desktop-buffer-mode-handlers
             '(dired-mode . dired-restore-desktop-buffer))
 
-
-;;; Start of automatically extracted autoloads.
-
-;;;### (autoloads nil "dired-aux" "dired-aux.el" 
"29842a53d6651f8f535ec8e02d20d7cc")
-;;; Generated autoloads from dired-aux.el
-
-(autoload 'dired-diff "dired-aux" "\
-Compare file at point with file FILE using `diff'.
-If called interactively, prompt for FILE.  If the file at point
-has a backup file, use that as the default.  If the file at point
-is a backup file, use its original.  If the mark is active
-in Transient Mark mode, use the file at the mark as the default.
-\(That's the mark set by \\[set-mark-command], not by Dired's
-\\[dired-mark] command.)
-
-FILE is the first file given to `diff'.  The file at point
-is the second file given to `diff'.
-
-With prefix arg, prompt for second argument SWITCHES, which is
-the string of command switches for the third argument of `diff'.
-
-\(fn FILE &optional SWITCHES)" t nil)
-
-(autoload 'dired-backup-diff "dired-aux" "\
-Diff this file with its backup file or vice versa.
-Uses the latest backup, if there are several numerical backups.
-If this file is a backup, diff it with its original.
-The backup file is the first file given to `diff'.
-With prefix arg, prompt for argument SWITCHES which is options for `diff'.
-
-\(fn &optional SWITCHES)" t nil)
-
-(autoload 'dired-compare-directories "dired-aux" "\
-Mark files with different file attributes in two dired buffers.
-Compare file attributes of files in the current directory
-with file attributes in directory DIR2 using PREDICATE on pairs of files
-with the same name.  Mark files for which PREDICATE returns non-nil.
-Mark files with different names if PREDICATE is nil (or interactively
-with empty input at the predicate prompt).
-
-PREDICATE is a Lisp expression that can refer to the following variables:
-
-    size1, size2   - file size in bytes
-    mtime1, mtime2 - last modification time in seconds, as a float
-    fa1, fa2       - list of file attributes
-                     returned by function `file-attributes'
-
-    where 1 refers to attribute of file in the current dired buffer
-    and 2 to attribute of file in second dired buffer.
-
-Examples of PREDICATE:
-
-    (> mtime1 mtime2) - mark newer files
-    (not (= size1 size2)) - mark files with different sizes
-    (not (string= (nth 8 fa1) (nth 8 fa2))) - mark files with different modes
-    (not (and (= (nth 2 fa1) (nth 2 fa2))   - mark files with different UID
-              (= (nth 3 fa1) (nth 3 fa2))))   and GID.
-
-\(fn DIR2 PREDICATE)" t nil)
-
-(autoload 'dired-do-chmod "dired-aux" "\
-Change the mode of the marked (or next ARG) files.
-Symbolic modes like `g+w' are allowed.
-Type M-n to pull the file attributes of the file at point
-into the minibuffer.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-chgrp "dired-aux" "\
-Change the group of the marked (or next ARG) files.
-Type M-n to pull the file attributes of the file at point
-into the minibuffer.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-chown "dired-aux" "\
-Change the owner of the marked (or next ARG) files.
-Type M-n to pull the file attributes of the file at point
-into the minibuffer.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-touch "dired-aux" "\
-Change the timestamp of the marked (or next ARG) files.
-This calls touch.
-Type M-n to pull the file attributes of the file at point
-into the minibuffer.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-print "dired-aux" "\
-Print the marked (or next ARG) files.
-Uses the shell command coming from variables `lpr-command' and
-`lpr-switches' as default.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-clean-directory "dired-aux" "\
-Flag numerical backups for deletion.
-Spares `dired-kept-versions' latest versions, and `kept-old-versions' oldest.
-Positive prefix arg KEEP overrides `dired-kept-versions';
-Negative prefix arg KEEP overrides `kept-old-versions' with KEEP made positive.
-
-To clear the flags on these files, you can use \\[dired-flag-backup-files]
-with a prefix argument.
-
-\(fn KEEP)" t nil)
-
-(autoload 'dired-do-async-shell-command "dired-aux" "\
-Run a shell command COMMAND on the marked files asynchronously.
-
-Like `dired-do-shell-command', but adds `&' at the end of COMMAND
-to execute it asynchronously.
-
-When operating on multiple files, asynchronous commands
-are executed in the background on each file in parallel.
-In shell syntax this means separating the individual commands
-with `&'.  However, when COMMAND ends in `;' or `;&' then commands
-are executed in the background on each file sequentially waiting
-for each command to terminate before running the next command.
-In shell syntax this means separating the individual commands with `;'.
-
-The output appears in the buffer `*Async Shell Command*'.
-
-\(fn COMMAND &optional ARG FILE-LIST)" t nil)
-
-(autoload 'dired-do-shell-command "dired-aux" "\
-Run a shell command COMMAND on the marked files.
-If no files are marked or a numeric prefix arg is given,
-the next ARG files are used.  Just \\[universal-argument] means the current 
file.
-The prompt mentions the file(s) or the marker, as appropriate.
-
-If there is a `*' in COMMAND, surrounded by whitespace, this runs
-COMMAND just once with the entire file list substituted there.
-
-If there is no `*', but there is a `?' in COMMAND, surrounded by
-whitespace, this runs COMMAND on each file individually with the
-file name substituted for `?'.
-
-Otherwise, this runs COMMAND on each file individually with the
-file name added at the end of COMMAND (separated by a space).
-
-`*' and `?' when not surrounded by whitespace have no special
-significance for `dired-do-shell-command', and are passed through
-normally to the shell, but you must confirm first.
-
-If you want to use `*' as a shell wildcard with whitespace around
-it, write `*\"\"' in place of just `*'.  This is equivalent to just
-`*' in the shell, but avoids Dired's special handling.
-
-If COMMAND ends in `&', `;', or `;&', it is executed in the
-background asynchronously, and the output appears in the buffer
-`*Async Shell Command*'.  When operating on multiple files and COMMAND
-ends in `&', the shell command is executed on each file in parallel.
-However, when COMMAND ends in `;' or `;&' then commands are executed
-in the background on each file sequentially waiting for each command
-to terminate before running the next command.  You can also use
-`dired-do-async-shell-command' that automatically adds `&'.
-
-Otherwise, COMMAND is executed synchronously, and the output
-appears in the buffer `*Shell Command Output*'.
-
-This feature does not try to redisplay Dired buffers afterward, as
-there's no telling what files COMMAND may have changed.
-Type \\[dired-do-redisplay] to redisplay the marked files.
-
-When COMMAND runs, its working directory is the top-level directory
-of the Dired buffer, so output files usually are created there
-instead of in a subdir.
-
-In a noninteractive call (from Lisp code), you must specify
-the list of file names explicitly with the FILE-LIST argument, which
-can be produced by `dired-get-marked-files', for example.
-
-\(fn COMMAND &optional ARG FILE-LIST)" t nil)
-
-(autoload 'dired-run-shell-command "dired-aux" "\
-
-
-\(fn COMMAND)" nil nil)
-
-(autoload 'dired-do-kill-lines "dired-aux" "\
-Kill all marked lines (not the files).
-With a prefix argument, kill that many lines starting with the current line.
-\(A negative argument kills backward.)
-If you use this command with a prefix argument to kill the line
-for a file that is a directory, which you have inserted in the
-Dired buffer as a subdirectory, then it deletes that subdirectory
-from the buffer as well.
-To kill an entire subdirectory (without killing its line in the
-parent directory), go to its directory header line and use this
-command with a prefix argument (the value does not matter).
-
-\(fn &optional ARG FMT)" t nil)
-
-(autoload 'dired-do-compress-to "dired-aux" "\
-Compress selected files and directories to an archive.
-You are prompted for the archive name.
-The archiving command is chosen based on the archive name extension and
-`dired-compress-files-alist'.
-
-\(fn)" t nil)
-
-(autoload 'dired-compress-file "dired-aux" "\
-Compress or uncompress FILE.
-Return the name of the compressed or uncompressed file.
-Return nil if no change in files.
-
-\(fn FILE)" nil nil)
-
-(autoload 'dired-query "dired-aux" "\
-Format PROMPT with ARGS, query user, and store the result in SYM.
-The return value is either nil or t.
-
-The user may type y or SPC to accept once; n or DEL to skip once;
-! to accept this and subsequent queries; or q or ESC to decline
-this and subsequent queries.
-
-If SYM is already bound to a non-nil value, this function may
-return automatically without querying the user.  If SYM is !,
-return t; if SYM is q or ESC, return nil.
-
-\(fn SYM PROMPT &rest ARGS)" nil nil)
-
-(autoload 'dired-do-compress "dired-aux" "\
-Compress or uncompress marked (or next ARG) files.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-byte-compile "dired-aux" "\
-Byte compile marked (or next ARG) Emacs Lisp files.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-load "dired-aux" "\
-Load the marked (or next ARG) Emacs Lisp files.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-redisplay "dired-aux" "\
-Redisplay all marked (or next ARG) files.
-If on a subdir line, redisplay that subdirectory.  In that case,
-a prefix arg lets you edit the `ls' switches used for the new listing.
-
-Dired remembers switches specified with a prefix arg, so that reverting
-the buffer will not reset them.  However, using `dired-undo' to re-insert
-or delete subdirectories can bypass this machinery.  Hence, you sometimes
-may have to reset some subdirectory switches after a `dired-undo'.
-You can reset all subdirectory switches to the default using
-\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs)Subdir switches' for more details.
-
-\(fn &optional ARG TEST-FOR-SUBDIR)" t nil)
-
-(autoload 'dired-add-file "dired-aux" "\
-
-
-\(fn FILENAME &optional MARKER-CHAR)" nil nil)
-
-(autoload 'dired-remove-file "dired-aux" "\
-
-
-\(fn FILE)" nil nil)
-
-(autoload 'dired-relist-file "dired-aux" "\
-Create or update the line for FILE in all Dired buffers it would belong in.
-
-\(fn FILE)" nil nil)
-
-(autoload 'dired-copy-file "dired-aux" "\
-
-
-\(fn FROM TO OK-FLAG)" nil nil)
-
-(autoload 'dired-rename-file "dired-aux" "\
-
-
-\(fn FILE NEWNAME OK-IF-ALREADY-EXISTS)" nil nil)
-
-(autoload 'dired-create-directory "dired-aux" "\
-Create a directory called DIRECTORY.
-If DIRECTORY already exists, signal an error.
-
-\(fn DIRECTORY)" t nil)
-
-(autoload 'dired-do-copy "dired-aux" "\
-Copy all marked (or next ARG) files, or copy the current file.
-When operating on just the current file, prompt for the new name.
-
-When operating on multiple or marked files, prompt for a target
-directory, and make the new copies in that directory, with the
-same names as the original files.  The initial suggestion for the
-target directory is the Dired buffer's current directory (or, if
-`dired-dwim-target' is non-nil, the current directory of a
-neighboring Dired window).
-
-If `dired-copy-preserve-time' is non-nil, this command preserves
-the modification time of each old file in the copy, similar to
-the \"-p\" option for the \"cp\" shell command.
-
-This command copies symbolic links by creating new ones, similar
-to the \"-d\" option for the \"cp\" shell command.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-symlink "dired-aux" "\
-Make symbolic links to current file or all marked (or next ARG) files.
-When operating on just the current file, you specify the new name.
-When operating on multiple or marked files, you specify a directory
-and new symbolic links are made in that directory
-with the same names that the files currently have.  The default
-suggested for the target directory depends on the value of
-`dired-dwim-target', which see.
-
-For relative symlinks, use \\[dired-do-relsymlink].
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-hardlink "dired-aux" "\
-Add names (hard links) current file or all marked (or next ARG) files.
-When operating on just the current file, you specify the new name.
-When operating on multiple or marked files, you specify a directory
-and new hard links are made in that directory
-with the same names that the files currently have.  The default
-suggested for the target directory depends on the value of
-`dired-dwim-target', which see.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-rename "dired-aux" "\
-Rename current file or all marked (or next ARG) files.
-When renaming just the current file, you specify the new name.
-When renaming multiple or marked files, you specify a directory.
-This command also renames any buffers that are visiting the files.
-The default suggested for the target directory depends on the value
-of `dired-dwim-target', which see.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-do-rename-regexp "dired-aux" "\
-Rename selected files whose names match REGEXP to NEWNAME.
-
-With non-zero prefix argument ARG, the command operates on the next ARG
-files.  Otherwise, it operates on all the marked files, or the current
-file if none are marked.
-
-As each match is found, the user must type a character saying
-  what to do with it.  For directions, type \\[help-command] at that time.
-NEWNAME may contain \\=\\<n> or \\& as in `query-replace-regexp'.
-REGEXP defaults to the last regexp used.
-
-With a zero prefix arg, renaming by regexp affects the absolute file name.
-Normally, only the non-directory part of the file name is used and changed.
-
-\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil)
-
-(autoload 'dired-do-copy-regexp "dired-aux" "\
-Copy selected files whose names match REGEXP to NEWNAME.
-See function `dired-do-rename-regexp' for more info.
-
-\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil)
-
-(autoload 'dired-do-hardlink-regexp "dired-aux" "\
-Hardlink selected files whose names match REGEXP to NEWNAME.
-See function `dired-do-rename-regexp' for more info.
-
-\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil)
-
-(autoload 'dired-do-symlink-regexp "dired-aux" "\
-Symlink selected files whose names match REGEXP to NEWNAME.
-See function `dired-do-rename-regexp' for more info.
-
-\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil)
-
-(autoload 'dired-upcase "dired-aux" "\
-Rename all marked (or next ARG) files to upper case.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-downcase "dired-aux" "\
-Rename all marked (or next ARG) files to lower case.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'dired-maybe-insert-subdir "dired-aux" "\
-Insert this subdirectory into the same dired buffer.
-If it is already present, just move to it (type \\[dired-do-redisplay] to 
refresh),
-  else inserts it at its natural place (as `ls -lR' would have done).
-With a prefix arg, you may edit the ls switches used for this listing.
-  You can add `R' to the switches to expand the whole tree starting at
-  this subdirectory.
-This function takes some pains to conform to `ls -lR' output.
-
-Dired remembers switches specified with a prefix arg, so that reverting
-the buffer will not reset them.  However, using `dired-undo' to re-insert
-or delete subdirectories can bypass this machinery.  Hence, you sometimes
-may have to reset some subdirectory switches after a `dired-undo'.
-You can reset all subdirectory switches to the default using
-\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs)Subdir switches' for more details.
-
-\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil)
-
-(autoload 'dired-insert-subdir "dired-aux" "\
-Insert this subdirectory into the same Dired buffer.
-If it is already present, overwrite the previous entry;
-  otherwise, insert it at its natural place (as `ls -lR' would
-  have done).
-With a prefix arg, you may edit the `ls' switches used for this listing.
-  You can add `R' to the switches to expand the whole tree starting at
-  this subdirectory.
-This function takes some pains to conform to `ls -lR' output.
-
-\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil)
-
-(autoload 'dired-prev-subdir "dired-aux" "\
-Go to previous subdirectory, regardless of level.
-When called interactively and not on a subdir line, go to this subdir's line.
-
-\(fn ARG &optional NO-ERROR-IF-NOT-FOUND NO-SKIP)" t nil)
-
-(autoload 'dired-goto-subdir "dired-aux" "\
-Go to end of header line of DIR in this dired buffer.
-Return value of point on success, otherwise return nil.
-The next char is either \\n, or \\r if DIR is hidden.
-
-\(fn DIR)" t nil)
-
-(autoload 'dired-mark-subdir-files "dired-aux" "\
-Mark all files except `.' and `..' in current subdirectory.
-If the Dired buffer shows multiple directories, this command
-marks the files listed in the subdirectory that point is in.
-
-\(fn)" t nil)
-
-(autoload 'dired-kill-subdir "dired-aux" "\
-Remove all lines of current subdirectory.
-Lower levels are unaffected.
-
-\(fn &optional REMEMBER-MARKS)" t nil)
-
-(autoload 'dired-tree-up "dired-aux" "\
-Go up ARG levels in the dired tree.
-
-\(fn ARG)" t nil)
-
-(autoload 'dired-tree-down "dired-aux" "\
-Go down in the dired tree.
-
-\(fn)" t nil)
-
-(autoload 'dired-hide-subdir "dired-aux" "\
-Hide or unhide the current subdirectory and move to next directory.
-Optional prefix arg is a repeat factor.
-Use \\[dired-hide-all] to (un)hide all directories.
-
-\(fn ARG)" t nil)
-
-(autoload 'dired-hide-all "dired-aux" "\
-Hide all subdirectories, leaving only their header lines.
-If there is already something hidden, make everything visible again.
-Use \\[dired-hide-subdir] to (un)hide a particular subdirectory.
-
-\(fn &optional IGNORED)" t nil)
-
-(autoload 'dired-isearch-filenames-setup "dired-aux" "\
-Set up isearch to search in Dired file names.
-Intended to be added to `isearch-mode-hook'.
-
-\(fn)" nil nil)
-
-(autoload 'dired-isearch-filenames "dired-aux" "\
-Search for a string using Isearch only in file names in the Dired buffer.
-
-\(fn)" t nil)
-
-(autoload 'dired-isearch-filenames-regexp "dired-aux" "\
-Search for a regexp using Isearch only in file names in the Dired buffer.
-
-\(fn)" t nil)
-
-(autoload 'dired-do-isearch "dired-aux" "\
-Search for a string through all marked files using Isearch.
-
-\(fn)" t nil)
-
-(autoload 'dired-do-isearch-regexp "dired-aux" "\
-Search for a regexp through all marked files using Isearch.
-
-\(fn)" t nil)
-
-(autoload 'dired-do-search "dired-aux" "\
-Search through all marked files for a match for REGEXP.
-Stops when a match is found.
-To continue searching for next match, use command \\[tags-loop-continue].
-
-\(fn REGEXP)" t nil)
-
-(autoload 'dired-do-query-replace-regexp "dired-aux" "\
-Do `query-replace-regexp' of FROM with TO, on all marked files.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue].
-
-\(fn FROM TO &optional DELIMITED)" t nil)
-
-(autoload 'dired-show-file-type "dired-aux" "\
-Print the type of FILE, according to the `file' command.
-If you give a prefix to this command, and FILE is a symbolic
-link, then the type of the file linked to by FILE is printed
-instead.
-
-\(fn FILE &optional DEREF-SYMLINKS)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "dired-x" "dired-x.el" 
"06f532e2e812fa1cb10ade31249e9700")
-;;; Generated autoloads from dired-x.el
-
-(autoload 'dired-jump "dired-x" "\
-Jump to Dired buffer corresponding to current buffer.
-If in a file, Dired the current directory and move to file's line.
-If in Dired already, pop up a level and goto old directory's line.
-In case the proper Dired file line cannot be found, refresh the dired
-buffer and try again.
-When OTHER-WINDOW is non-nil, jump to Dired buffer in other window.
-Interactively with prefix argument, read FILE-NAME and
-move to its line in dired.
-
-\(fn &optional OTHER-WINDOW FILE-NAME)" t nil)
-
-(autoload 'dired-jump-other-window "dired-x" "\
-Like \\[dired-jump] (`dired-jump') but in other window.
-
-\(fn &optional FILE-NAME)" t nil)
-
-(autoload 'dired-do-relsymlink "dired-x" "\
-Relative symlink all marked (or next ARG) files into a directory.
-Otherwise make a relative symbolic link to the current file.
-This creates relative symbolic links like
-
-    foo -> ../bar/foo
-
-not absolute ones like
-
-    foo -> /ugly/file/name/that/may/change/any/day/bar/foo
-
-For absolute symlinks, use \\[dired-do-symlink].
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;; End of automatically extracted autoloads.
-
 (provide 'dired)
 
 (run-hooks 'dired-load-hook)           ; for your customizations
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 06e65b9..e48e2d2 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -264,7 +264,7 @@ Summary:
 
 
 ;; Local Variables:
-;; generated-autoload-file: "eieio-core.el"
+;; generated-autoload-file: "eieio-loaddefs.el"
 ;; End:
 
 (provide 'eieio-compat)
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index c54cd22..61d076d 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -33,6 +33,7 @@
 
 (require 'cl-lib)
 (require 'pcase)
+(require 'eieio-loaddefs)
 
 ;;;
 ;; A few functions that are better in the official EIEIO src, but
@@ -1094,98 +1095,6 @@ method invocation orders of the involved classes."
 (cl-defmethod cl-generic-generalizers ((_specializer (head subclass)))
   (list eieio--generic-subclass-generalizer))
 
-
-;;;### (autoloads nil "eieio-compat" "eieio-compat.el" 
"11dd361fd4c1c625de90a39977936236")
-;;; Generated autoloads from eieio-compat.el
-
-(autoload 'eieio--defalias "eieio-compat" "\
-Like `defalias', but with less side-effects.
-More specifically, it has no side-effects at all when the new function
-definition is the same (`eq') as the old one.
-
-\(fn NAME BODY)" nil nil)
-
-(autoload 'defgeneric "eieio-compat" "\
-Create a generic function METHOD.
-DOC-STRING is the base documentation for this class.  A generic
-function has no body, as its purpose is to decide which method body
-is appropriate to use.  Uses `defmethod' to create methods, and calls
-`defgeneric' for you.  With this implementation the ARGS are
-currently ignored.  You can use `defgeneric' to apply specialized
-top level documentation to a method.
-
-\(fn METHOD ARGS &optional DOC-STRING)" nil t)
-
-(function-put 'defgeneric 'doc-string-elt '3)
-
-(make-obsolete 'defgeneric 'cl-defgeneric '"25.1")
-
-(autoload 'defmethod "eieio-compat" "\
-Create a new METHOD through `defgeneric' with ARGS.
-
-The optional second argument KEY is a specifier that
-modifies how the method is called, including:
-   :before  - Method will be called before the :primary
-   :primary - The default if not specified
-   :after   - Method will be called after the :primary
-   :static  - First arg could be an object or class
-The next argument is the ARGLIST.  The ARGLIST specifies the arguments
-to the method as with `defun'.  The first argument can have a type
-specifier, such as:
-  ((VARNAME CLASS) ARG2 ...)
-where VARNAME is the name of the local variable for the method being
-created.  The CLASS is a class symbol for a class made with `defclass'.
-A DOCSTRING comes after the ARGLIST, and is optional.
-All the rest of the args are the BODY of the method.  A method will
-return the value of the last form in the BODY.
-
-Summary:
-
- (defmethod mymethod [:before | :primary | :after | :static]
-                     ((typearg class-name) arg2 &optional opt &rest rest)
-    \"doc-string\"
-     body)
-
-\(fn METHOD &rest ARGS)" nil t)
-
-(function-put 'defmethod 'doc-string-elt '3)
-
-(make-obsolete 'defmethod 'cl-defmethod '"25.1")
-
-(autoload 'eieio--defgeneric-init-form "eieio-compat" "\
-
-
-\(fn METHOD DOC-STRING)" nil nil)
-
-(autoload 'eieio--defmethod "eieio-compat" "\
-
-
-\(fn METHOD KIND ARGCLASS CODE)" nil nil)
-
-(autoload 'eieio-defmethod "eieio-compat" "\
-Obsolete work part of an old version of the `defmethod' macro.
-
-\(fn METHOD ARGS)" nil nil)
-
-(make-obsolete 'eieio-defmethod 'cl-defmethod '"24.1")
-
-(autoload 'eieio-defgeneric "eieio-compat" "\
-Obsolete work part of an old version of the `defgeneric' macro.
-
-\(fn METHOD DOC-STRING)" nil nil)
-
-(make-obsolete 'eieio-defgeneric 'cl-defgeneric '"24.1")
-
-(autoload 'eieio-defclass "eieio-compat" "\
-
-
-\(fn CNAME SUPERCLASSES SLOTS OPTIONS)" nil nil)
-
-(make-obsolete 'eieio-defclass 'eieio-defclass-internal '"25.1")
-
-;;;***
-
-
 (provide 'eieio-core)
 
 ;;; eieio-core.el ends here
diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el
index 31d0b85..08b1908 100644
--- a/lisp/emacs-lisp/eieio-custom.el
+++ b/lisp/emacs-lisp/eieio-custom.el
@@ -473,7 +473,7 @@ Return the symbol for the group, or nil"
 (provide 'eieio-custom)
 
 ;; Local variables:
-;; generated-autoload-file: "eieio.el"
+;; generated-autoload-file: "eieio-loaddefs.el"
 ;; End:
 
 ;;; eieio-custom.el ends here
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index a5d8b6f..60fcafa 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -349,7 +349,7 @@ INDENT is the current indentation level."
 (provide 'eieio-opt)
 
 ;; Local variables:
-;; generated-autoload-file: "eieio.el"
+;; generated-autoload-file: "eieio-loaddefs.el"
 ;; End:
 
 ;;; eieio-opt.el ends here
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 0ec07fe..909785c 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -966,41 +966,6 @@ variable PRINT-FUNCTION.  Optional argument NOESCAPE is 
passed to
 (advice-add 'edebug-prin1-to-string
             :around #'eieio-edebug-prin1-to-string)
 
-
-;;; Start of automatically extracted autoloads.
-
-;;;### (autoloads nil "eieio-custom" "eieio-custom.el" 
"916f54b818479a77a02f3ecccda84a11")
-;;; Generated autoloads from eieio-custom.el
-
-(autoload 'customize-object "eieio-custom" "\
-Customize OBJ in a custom buffer.
-Optional argument GROUP is the sub-group of slots to display.
-
-\(fn OBJ &optional GROUP)" nil nil)
-
-;;;***
-
-;;;### (autoloads nil "eieio-opt" "eieio-opt.el" 
"d00419c898056fadf2f8e491f864aa1e")
-;;; Generated autoloads from eieio-opt.el
-
-(autoload 'eieio-browse "eieio-opt" "\
-Create an object browser window to show all objects.
-If optional ROOT-CLASS, then start with that, otherwise start with
-variable `eieio-default-superclass'.
-
-\(fn &optional ROOT-CLASS)" t nil)
-
-(define-obsolete-function-alias 'eieio-help-class 'cl--describe-class "25.1")
-
-(autoload 'eieio-help-constructor "eieio-opt" "\
-Describe CTR if it is a class constructor.
-
-\(fn CTR)" nil nil)
-
-;;;***
-
-;;; End of automatically extracted autoloads.
-
 (provide 'eieio)
 
 ;;; eieio ends here
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 8e26db1..cd8c8a8 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1471,6 +1471,10 @@ Defaults to the server buffer."
 (defconst erc-default-port 6667
   "IRC port to use if it cannot be detected otherwise.")
 
+(defconst erc-default-port-tls 6697
+  "IRC port to use for encrypted connections if it cannot be
+  detected otherwise.")
+
 (defcustom erc-join-buffer 'buffer
   "Determines how to display a newly created IRC buffer.
 
@@ -2194,7 +2198,8 @@ be invoked for the values of the other parameters."
 (defun erc-tls (&rest r)
   "Interactively select TLS connection parameters and run ERC.
 Arguments are the same as for `erc'."
-  (interactive (erc-select-read-args))
+  (interactive (let ((erc-default-port erc-default-port-tls))
+                (erc-select-read-args)))
   (let ((erc-server-connect-function 'erc-open-tls-stream))
     (apply #'erc r)))
 
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 8d3f8bf..037b978 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -570,7 +570,7 @@ Looks at `ffap-ftp-default-user', returns \"\" for 
\"localhost\"."
 (defvaralias 'ffap-newsgroup-heads  'thing-at-point-newsgroup-heads)
 (defalias 'ffap-newsgroup-p 'thing-at-point-newsgroup-p)
 
-(defsubst ffap-url-p (string)
+(defun ffap-url-p (string)
   "If STRING looks like an URL, return it (maybe improved), else nil."
   (when (and (stringp string) ffap-url-regexp)
     (let* ((case-fold-search t)
diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el
index 6b7f2ca..0dc532f 100644
--- a/lisp/hfy-cmap.el
+++ b/lisp/hfy-cmap.el
@@ -845,7 +845,7 @@ Loads the variable `hfy-rgb-txt-colour-map', which is used 
by
 (provide 'hfy-cmap)
 
 ;; Local Variables:
-;; generated-autoload-file: "htmlfontify.el"
+;; generated-autoload-file: "htmlfontify-loaddefs.el"
 ;; End:
 
 ;;; hfy-cmap.el ends here
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 719cb50a..d00fae2 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -90,6 +90,8 @@
 ;;  (`font-lock-fontify-region')
 (require 'cus-edit)
 
+(require 'htmlfontify-loaddefs)
+
 (defconst htmlfontify-version 0.21)
 
 (defconst hfy-meta-tags
@@ -2411,26 +2413,6 @@ You may also want to set `hfy-page-header' and 
`hfy-page-footer'."
   (let ((file (hfy-initfile)))
     (load file 'NOERROR nil nil) ))
 
-
-;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" 
"1fb78b15b18622256262c7246b2a3520")
-;;; Generated autoloads from hfy-cmap.el
-
-(autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\
-Load an X11 style rgb.txt FILE.
-Search `hfy-rgb-load-path' if FILE is not specified.
-Loads the variable `hfy-rgb-txt-colour-map', which is used by
-`hfy-fallback-colour-values'.
-
-\(fn &optional FILE)" t nil)
-
-(autoload 'hfy-fallback-colour-values "hfy-cmap" "\
-Use a fallback method for obtaining the rgb values for a color.
-
-\(fn COLOUR-STRING)" nil nil)
-
-;;;***
-
-
 (provide 'htmlfontify)
 
 ;;; htmlfontify.el ends here
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index e5df999..a2d92e9 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1598,7 +1598,7 @@ defaults to one."
 (provide 'ibuf-ext)
 
 ;; Local Variables:
-;; generated-autoload-file: "ibuffer.el"
+;; generated-autoload-file: "ibuffer-loaddefs.el"
 ;; End:
 
 ;;; ibuf-ext.el ends here
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 89477bd..3253a63 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -37,6 +37,7 @@
 
 (require 'font-core)
 
+(require 'ibuffer-loaddefs)
 ;; These come from ibuf-ext.el, which can not be require'd at compile time
 ;; because it has a recursive dependency on ibuffer.el
 (defvar ibuffer-auto-mode)
@@ -2598,382 +2599,6 @@ will be inserted before the group at point."
     (setq default-directory ibuffer-default-directory))
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t))
 
-
-;;; Start of automatically extracted autoloads.
-
-;;;### (autoloads nil "ibuf-ext" "ibuf-ext.el" 
"65ef908165926cf48da6f43fd01ef50b")
-;;; Generated autoloads from ibuf-ext.el
-
-(autoload 'ibuffer-auto-mode "ibuf-ext" "\
-Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode).
-With a prefix argument ARG, enable Ibuffer Auto mode if ARG is
-positive, and disable it otherwise.  If called from Lisp, enable
-the mode if ARG is omitted or nil.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'ibuffer-mouse-filter-by-mode "ibuf-ext" "\
-Enable or disable filtering by the major mode chosen via mouse.
-
-\(fn EVENT)" t nil)
-
-(autoload 'ibuffer-interactive-filter-by-mode "ibuf-ext" "\
-Enable or disable filtering by the major mode at point.
-
-\(fn EVENT-OR-POINT)" t nil)
-
-(autoload 'ibuffer-mouse-toggle-filter-group "ibuf-ext" "\
-Toggle the display status of the filter group chosen with the mouse.
-
-\(fn EVENT)" t nil)
-
-(autoload 'ibuffer-toggle-filter-group "ibuf-ext" "\
-Toggle the display status of the filter group on this line.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-forward-filter-group "ibuf-ext" "\
-Move point forwards by COUNT filtering groups.
-
-\(fn &optional COUNT)" t nil)
-
-(autoload 'ibuffer-backward-filter-group "ibuf-ext" "\
-Move point backwards by COUNT filtering groups.
-
-\(fn &optional COUNT)" t nil)
- (autoload 'ibuffer-do-shell-command-pipe "ibuf-ext")
- (autoload 'ibuffer-do-shell-command-pipe-replace "ibuf-ext")
- (autoload 'ibuffer-do-shell-command-file "ibuf-ext")
- (autoload 'ibuffer-do-eval "ibuf-ext")
- (autoload 'ibuffer-do-view-and-eval "ibuf-ext")
- (autoload 'ibuffer-do-rename-uniquely "ibuf-ext")
- (autoload 'ibuffer-do-revert "ibuf-ext")
- (autoload 'ibuffer-do-isearch "ibuf-ext")
- (autoload 'ibuffer-do-isearch-regexp "ibuf-ext")
- (autoload 'ibuffer-do-replace-regexp "ibuf-ext")
- (autoload 'ibuffer-do-query-replace "ibuf-ext")
- (autoload 'ibuffer-do-query-replace-regexp "ibuf-ext")
- (autoload 'ibuffer-do-print "ibuf-ext")
-
-(autoload 'ibuffer-included-in-filters-p "ibuf-ext" "\
-
-
-\(fn BUF FILTERS)" nil nil)
-
-(autoload 'ibuffer-filters-to-filter-group "ibuf-ext" "\
-Make the current filters into a filtering group.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-set-filter-groups-by-mode "ibuf-ext" "\
-Set the current filter groups to filter by mode.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-pop-filter-group "ibuf-ext" "\
-Remove the first filter group.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-decompose-filter-group "ibuf-ext" "\
-Decompose the filter group GROUP into active filters.
-
-\(fn GROUP)" t nil)
-
-(autoload 'ibuffer-clear-filter-groups "ibuf-ext" "\
-Remove all filter groups.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-jump-to-filter-group "ibuf-ext" "\
-Move point to the filter group whose name is NAME.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-kill-filter-group "ibuf-ext" "\
-Kill the filter group named NAME.
-The group will be added to `ibuffer-filter-group-kill-ring'.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-kill-line "ibuf-ext" "\
-Kill the filter group at point.
-See also `ibuffer-kill-filter-group'.
-
-\(fn &optional ARG INTERACTIVE-P)" t nil)
-
-(autoload 'ibuffer-yank "ibuf-ext" "\
-Yank the last killed filter group before group at point.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-yank-filter-group "ibuf-ext" "\
-Yank the last killed filter group before group named NAME.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-save-filter-groups "ibuf-ext" "\
-Save all active filter groups GROUPS as NAME.
-They are added to `ibuffer-saved-filter-groups'.  Interactively,
-prompt for NAME, and use the current filters.
-
-\(fn NAME GROUPS)" t nil)
-
-(autoload 'ibuffer-delete-saved-filter-groups "ibuf-ext" "\
-Delete saved filter groups with NAME.
-They are removed from `ibuffer-saved-filter-groups'.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-switch-to-saved-filter-groups "ibuf-ext" "\
-Set this buffer's filter groups to saved version with NAME.
-The value from `ibuffer-saved-filter-groups' is used.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-filter-disable "ibuf-ext" "\
-Disable all filters currently in effect in this buffer.
-With optional arg DELETE-FILTER-GROUPS non-nil, delete all filter
-group definitions by setting `ibuffer-filter-groups' to nil.
-
-\(fn &optional DELETE-FILTER-GROUPS)" t nil)
-
-(autoload 'ibuffer-pop-filter "ibuf-ext" "\
-Remove the top filter in this buffer.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-decompose-filter "ibuf-ext" "\
-Separate the top compound filter (OR, NOT, or SAVED) in this buffer.
-
-This means that the topmost filter on the filtering stack, which must
-be a complex filter like (OR [name: foo] [mode: bar-mode]), will be
-turned into two separate filters [name: foo] and [mode: bar-mode].
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-exchange-filters "ibuf-ext" "\
-Exchange the top two filters on the stack in this buffer.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-negate-filter "ibuf-ext" "\
-Negate the sense of the top filter in the current buffer.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-or-filter "ibuf-ext" "\
-Replace the top two filters in this buffer with their logical OR.
-If optional argument REVERSE is non-nil, instead break the top OR
-filter into parts.
-
-\(fn &optional REVERSE)" t nil)
-
-(autoload 'ibuffer-save-filters "ibuf-ext" "\
-Save FILTERS in this buffer with name NAME in `ibuffer-saved-filters'.
-Interactively, prompt for NAME, and use the current filters.
-
-\(fn NAME FILTERS)" t nil)
-
-(autoload 'ibuffer-delete-saved-filters "ibuf-ext" "\
-Delete saved filters with NAME from `ibuffer-saved-filters'.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-add-saved-filters "ibuf-ext" "\
-Add saved filters from `ibuffer-saved-filters' to this buffer's filters.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-switch-to-saved-filters "ibuf-ext" "\
-Set this buffer's filters to filters with NAME from `ibuffer-saved-filters'.
-
-\(fn NAME)" t nil)
- (autoload 'ibuffer-filter-by-mode "ibuf-ext")
- (autoload 'ibuffer-filter-by-used-mode "ibuf-ext")
- (autoload 'ibuffer-filter-by-derived-mode "ibuf-ext")
- (autoload 'ibuffer-filter-by-name "ibuf-ext")
- (autoload 'ibuffer-filter-by-filename "ibuf-ext")
- (autoload 'ibuffer-filter-by-size-gt  "ibuf-ext")
- (autoload 'ibuffer-filter-by-size-lt  "ibuf-ext")
- (autoload 'ibuffer-filter-by-content "ibuf-ext")
- (autoload 'ibuffer-filter-by-predicate "ibuf-ext")
-
-(autoload 'ibuffer-toggle-sorting-mode "ibuf-ext" "\
-Toggle the current sorting mode.
-Default sorting modes are:
- Recency - the last time the buffer was viewed
- Name - the name of the buffer
- Major Mode - the name of the major mode of the buffer
- Size - the size of the buffer
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-invert-sorting "ibuf-ext" "\
-Toggle whether or not sorting is in reverse order.
-
-\(fn)" t nil)
- (autoload 'ibuffer-do-sort-by-major-mode "ibuf-ext")
- (autoload 'ibuffer-do-sort-by-mode-name "ibuf-ext")
- (autoload 'ibuffer-do-sort-by-alphabetic "ibuf-ext")
- (autoload 'ibuffer-do-sort-by-size "ibuf-ext")
- (autoload 'ibuffer-do-sort-by-filename/process "ibuf-ext")
-
-(autoload 'ibuffer-bs-show "ibuf-ext" "\
-Emulate `bs-show' from the bs.el package.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-add-to-tmp-hide "ibuf-ext" "\
-Add REGEXP to `ibuffer-tmp-hide-regexps'.
-This means that buffers whose name matches REGEXP will not be shown
-for this Ibuffer session.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'ibuffer-add-to-tmp-show "ibuf-ext" "\
-Add REGEXP to `ibuffer-tmp-show-regexps'.
-This means that buffers whose name matches REGEXP will always be shown
-for this Ibuffer session.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'ibuffer-forward-next-marked "ibuf-ext" "\
-Move forward by COUNT marked buffers (default 1).
-
-If MARK is non-nil, it should be a character denoting the type of mark
-to move by.  The default is `ibuffer-marked-char'.
-
-If DIRECTION is non-nil, it should be an integer; negative integers
-mean move backwards, non-negative integers mean move forwards.
-
-\(fn &optional COUNT MARK DIRECTION)" t nil)
-
-(autoload 'ibuffer-backwards-next-marked "ibuf-ext" "\
-Move backwards by COUNT marked buffers (default 1).
-
-If MARK is non-nil, it should be a character denoting the type of mark
-to move by.  The default is `ibuffer-marked-char'.
-
-\(fn &optional COUNT MARK)" t nil)
-
-(autoload 'ibuffer-do-kill-lines "ibuf-ext" "\
-Hide all of the currently marked lines.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-jump-to-buffer "ibuf-ext" "\
-Move point to the buffer whose name is NAME.
-
-If called interactively, prompt for a buffer name and go to the
-corresponding line in the Ibuffer buffer.  If said buffer is in a
-hidden group filter, open it.
-
-If `ibuffer-jump-offer-only-visible-buffers' is non-nil, only offer
-visible buffers in the completion list.  Calling the command with
-a prefix argument reverses the meaning of that variable.
-
-\(fn NAME)" t nil)
-
-(autoload 'ibuffer-diff-with-file "ibuf-ext" "\
-View the differences between marked buffers and their associated files.
-If no buffers are marked, use buffer at point.
-This requires the external program \"diff\" to be in your `exec-path'.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-copy-filename-as-kill "ibuf-ext" "\
-Copy filenames of marked buffers into the kill ring.
-
-The names are separated by a space.
-If a buffer has no filename, it is ignored.
-
-With no prefix arg, use the filename sans its directory of each marked file.
-With a zero prefix arg, use the complete filename of each marked file.
-With \\[universal-argument], use the filename of each marked file relative
-to `ibuffer-default-directory' if non-nil, otherwise `default-directory'.
-
-You can then feed the file name(s) to other commands with \\[yank].
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'ibuffer-mark-by-name-regexp "ibuf-ext" "\
-Mark all buffers whose name matches REGEXP.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'ibuffer-mark-by-mode-regexp "ibuf-ext" "\
-Mark all buffers whose major mode matches REGEXP.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'ibuffer-mark-by-file-name-regexp "ibuf-ext" "\
-Mark all buffers whose file name matches REGEXP.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'ibuffer-mark-by-mode "ibuf-ext" "\
-Mark all buffers whose major mode equals MODE.
-
-\(fn MODE)" t nil)
-
-(autoload 'ibuffer-mark-modified-buffers "ibuf-ext" "\
-Mark all modified buffers.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-unsaved-buffers "ibuf-ext" "\
-Mark all modified buffers that have an associated file.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-dissociated-buffers "ibuf-ext" "\
-Mark all buffers whose associated file does not exist.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-help-buffers "ibuf-ext" "\
-Mark buffers whose major mode is in variable `ibuffer-help-buffer-modes'.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-compressed-file-buffers "ibuf-ext" "\
-Mark buffers whose associated file is compressed.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-old-buffers "ibuf-ext" "\
-Mark buffers which have not been viewed in `ibuffer-old-time' hours.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-special-buffers "ibuf-ext" "\
-Mark all buffers whose name begins and ends with `*'.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-read-only-buffers "ibuf-ext" "\
-Mark all read-only buffers.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-mark-dired-buffers "ibuf-ext" "\
-Mark all `dired' buffers.
-
-\(fn)" t nil)
-
-(autoload 'ibuffer-do-occur "ibuf-ext" "\
-View lines which match REGEXP in all marked buffers.
-Optional argument NLINES says how many lines of context to display: it
-defaults to one.
-
-\(fn REGEXP &optional NLINES)" t nil)
-
-;;;***
-
-;;; End of automatically extracted autoloads.
-
-
 (provide 'ibuffer)
 
 (run-hooks 'ibuffer-load-hook)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 8e38564..1ed4cc7 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -40,6 +40,8 @@
 (require 'mail-utils)
 (require 'rfc2047)
 
+(require 'rmail-loaddefs)
+
 (declare-function compilation--message->loc "compile" (cl-x) t)
 (declare-function epa--find-coding-system-for-mime-charset "epa" 
(mime-charset))
 
@@ -4722,227 +4724,6 @@ Argument MIME is non-nil if this is a mime message."
        (setq buffer-file-coding-system rmail-message-encoding))))
 (add-hook 'after-save-hook 'rmail-after-save-hook)
 
-
-;;; Start of automatically extracted autoloads.
-
-;;;### (autoloads nil "rmailedit" "rmailedit.el" 
"1ed1c211e6e9c254ba3e0dd8d546e745")
-;;; Generated autoloads from rmailedit.el
-
-(autoload 'rmail-edit-current-message "rmailedit" "\
-Edit the contents of this message.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "rmailkwd" "rmailkwd.el" 
"298dcda7febb6e4ebf0a166101f40650")
-;;; Generated autoloads from rmailkwd.el
-
-(autoload 'rmail-add-label "rmailkwd" "\
-Add LABEL to labels associated with current RMAIL message.
-Completes (see `rmail-read-label') over known labels when reading.
-LABEL may be a symbol or string.  Only one label is allowed.
-
-\(fn LABEL)" t nil)
-
-(autoload 'rmail-kill-label "rmailkwd" "\
-Remove LABEL from labels associated with current RMAIL message.
-Completes (see `rmail-read-label') over known labels when reading.
-LABEL may be a symbol or string.  Only one label is allowed.
-
-\(fn LABEL)" t nil)
-
-(autoload 'rmail-read-label "rmailkwd" "\
-Read a label with completion, prompting with PROMPT.
-Completions are chosen from `rmail-label-obarray'.  The default
-is `rmail-last-label', if that is non-nil.  Updates `rmail-last-label'
-according to the choice made, and returns a symbol.
-
-\(fn PROMPT)" nil nil)
-
-(autoload 'rmail-previous-labeled-message "rmailkwd" "\
-Show previous message with one of the labels LABELS.
-LABELS should be a comma-separated list of label names.
-If LABELS is empty, the last set of labels specified is used.
-With prefix argument N moves backward N messages with these labels.
-
-\(fn N LABELS)" t nil)
-
-(autoload 'rmail-next-labeled-message "rmailkwd" "\
-Show next message with one of the labels LABELS.
-LABELS should be a comma-separated list of label names.
-If LABELS is empty, the last set of labels specified is used.
-With prefix argument N moves forward N messages with these labels.
-
-\(fn N LABELS)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "rmailmm" "rmailmm.el" 
"36f518e036612a33eb436cb267fd39c7")
-;;; Generated autoloads from rmailmm.el
-
-(autoload 'rmail-mime "rmailmm" "\
-Toggle the display of a MIME message.
-
-The actual behavior depends on the value of `rmail-enable-mime'.
-
-If `rmail-enable-mime' is non-nil (the default), this command toggles
-the display of a MIME message between decoded presentation form and
-raw data.  With optional prefix argument ARG, it toggles the display only
-of the MIME entity at point, if there is one.  The optional argument
-STATE forces a particular display state, rather than toggling.
-`raw' forces raw mode, any other non-nil value forces decoded mode.
-
-If `rmail-enable-mime' is nil, this creates a temporary \"*RMAIL*\"
-buffer holding a decoded copy of the message. Inline content-types are
-handled according to `rmail-mime-media-type-handlers-alist'.
-By default, this displays text and multipart messages, and offers to
-download attachments as specified by `rmail-mime-attachment-dirs-alist'.
-The arguments ARG and STATE have no effect in this case.
-
-\(fn &optional ARG STATE)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "rmailmsc" "rmailmsc.el" 
"c3f0d33739768fc12acc4258ae0da72e")
-;;; Generated autoloads from rmailmsc.el
-
-(autoload 'set-rmail-inbox-list "rmailmsc" "\
-Set the inbox list of the current RMAIL file to FILE-NAME.
-You can specify one file name, or several names separated by commas.
-If FILE-NAME is empty, remove any existing inbox list.
-
-This applies only to the current session.
-
-\(fn FILE-NAME)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "rmailsort" "rmailsort.el" 
"8f551773021df4fa1a14ec2517e6a4f1")
-;;; Generated autoloads from rmailsort.el
-
-(autoload 'rmail-sort-by-date "rmailsort" "\
-Sort messages of current Rmail buffer by \"Date\" header.
-If prefix argument REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-subject "rmailsort" "\
-Sort messages of current Rmail buffer by \"Subject\" header.
-Ignores any \"Re: \" prefix.  If prefix argument REVERSE is
-non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-author "rmailsort" "\
-Sort messages of current Rmail buffer by author.
-This uses either the \"From\" or \"Sender\" header, downcased.
-If prefix argument REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-recipient "rmailsort" "\
-Sort messages of current Rmail buffer by recipient.
-This uses either the \"To\" or \"Apparently-To\" header, downcased.
-If prefix argument REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-correspondent "rmailsort" "\
-Sort messages of current Rmail buffer by other correspondent.
-This uses either the \"From\", \"Sender\", \"To\", or
-\"Apparently-To\" header, downcased.  Uses the first header not
-excluded by `mail-dont-reply-to-names'.  If prefix argument
-REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-lines "rmailsort" "\
-Sort messages of current Rmail buffer by the number of lines.
-If prefix argument REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE)" t nil)
-
-(autoload 'rmail-sort-by-labels "rmailsort" "\
-Sort messages of current Rmail buffer by labels.
-LABELS is a comma-separated list of labels.  The order of these
-labels specifies the order of messages: messages with the first
-label come first, messages with the second label come second, and
-so on.  Messages that have none of these labels come last.
-If prefix argument REVERSE is non-nil, sorts in reverse order.
-
-\(fn REVERSE LABELS)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "rmailsum" "rmailsum.el" 
"4bc0d1a65aede332348200e1937c84d4")
-;;; Generated autoloads from rmailsum.el
-
-(autoload 'rmail-summary "rmailsum" "\
-Display a summary of all messages, one line per message.
-
-\(fn)" t nil)
-
-(autoload 'rmail-summary-by-labels "rmailsum" "\
-Display a summary of all messages with one or more LABELS.
-LABELS should be a string containing the desired labels, separated by commas.
-
-\(fn LABELS)" t nil)
-
-(autoload 'rmail-summary-by-recipients "rmailsum" "\
-Display a summary of all messages with the given RECIPIENTS.
-Normally checks the To, From and Cc fields of headers;
-but if PRIMARY-ONLY is non-nil (prefix arg given),
- only look in the To and From fields.
-RECIPIENTS is a regular expression.
-
-\(fn RECIPIENTS &optional PRIMARY-ONLY)" t nil)
-
-(autoload 'rmail-summary-by-regexp "rmailsum" "\
-Display a summary of all messages according to regexp REGEXP.
-If the regular expression is found in the header of the message
-\(including in the date and other lines, as well as the subject line),
-Emacs will list the message in the summary.
-
-\(fn REGEXP)" t nil)
-
-(autoload 'rmail-summary-by-topic "rmailsum" "\
-Display a summary of all messages with the given SUBJECT.
-Normally checks just the Subject field of headers; but with prefix
-argument WHOLE-MESSAGE is non-nil, looks in the whole message.
-SUBJECT is a regular expression.
-
-\(fn SUBJECT &optional WHOLE-MESSAGE)" t nil)
-
-(autoload 'rmail-summary-by-senders "rmailsum" "\
-Display a summary of all messages whose \"From\" field matches SENDERS.
-SENDERS is a regular expression.
-
-\(fn SENDERS)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "undigest" "undigest.el" 
"c0ddfad4fe34ef9c1e790c2cc72b571d")
-;;; Generated autoloads from undigest.el
-
-(autoload 'undigestify-rmail-message "undigest" "\
-Break up a digest message into its constituent messages.
-Leaves original message, deleted, before the undigestified messages.
-
-\(fn)" t nil)
-
-(autoload 'unforward-rmail-message "undigest" "\
-Extract a forwarded message from the containing message.
-This puts the forwarded message into a separate rmail message following
-the containing message.  This command is only useful when messages are
-forwarded with `rmail-enable-mime-composing' set to nil.
-
-\(fn)" t nil)
-
-;;;***
-
-;;; End of automatically extracted autoloads.
-
 
 (provide 'rmail)
 
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 0b49782..d79ec39 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -448,7 +448,7 @@ HEADER-DIFF should be a return value from 
`rmail-edit-diff-headers'."
 (provide 'rmailedit)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailedit.el ends here
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index f46a687..5fe867e 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -192,7 +192,7 @@ With prefix argument N moves forward N messages with these 
labels."
 (provide 'rmailkwd)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailkwd.el ends here
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 16f6215..8ca10b2 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -1560,7 +1560,7 @@ This is the usual value of 
`rmail-insert-mime-forwarded-message-function'."
 (provide 'rmailmm)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailmm.el ends here
diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el
index aefb35d..16329f4 100644
--- a/lisp/mail/rmailmsc.el
+++ b/lisp/mail/rmailmsc.el
@@ -55,7 +55,7 @@ This applies only to the current session."
   (rmail-show-message-1 rmail-current-message))
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailmsc.el ends here
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 3e01b58..1e1b425 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -251,7 +251,7 @@ Numeric keys are sorted numerically, all others as strings."
 (provide 'rmailsort)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailsort.el ends here
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index eeb42e8..0717bb8 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1870,7 +1870,7 @@ the summary is only showing a subset of messages."
 (provide 'rmailsum)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; rmailsum.el ends here
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el
index 9fbbd94..7346d0d 100644
--- a/lisp/mail/undigest.el
+++ b/lisp/mail/undigest.el
@@ -327,7 +327,7 @@ forwarded with `rmail-enable-mime-composing' set to nil."
 (provide 'undigest)
 
 ;; Local Variables:
-;; generated-autoload-file: "rmail.el"
+;; generated-autoload-file: "rmail-loaddefs.el"
 ;; End:
 
 ;;; undigest.el ends here
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 42f48c7..b22c1ea 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -535,19 +535,25 @@
 (defun clipboard-yank ()
   "Insert the clipboard contents, or the last stretch of killed text."
   (interactive "*")
-  (let ((gui-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t)
+        (interprogram-paste-function (or interprogram-paste-function
+                                         #'gui-selection-value)))
     (yank)))
 
 (defun clipboard-kill-ring-save (beg end &optional region)
   "Copy region to kill ring, and save in the GUI's clipboard."
   (interactive "r\np")
-  (let ((gui-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t)
+        (interprogram-cut-function (or interprogram-cut-function
+                                       #'gui-select-text)))
     (kill-ring-save beg end region)))
 
 (defun clipboard-kill-region (beg end &optional region)
   "Kill the region, and save it in the GUI's clipboard."
   (interactive "r\np")
-  (let ((gui-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t)
+        (interprogram-cut-function (or interprogram-cut-function
+                                       #'gui-select-text)))
     (kill-region beg end region)))
 
 (defun menu-bar-enable-clipboard ()
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 5748e88..babfdef 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -274,17 +274,13 @@ word(s) will be searched for via `eww-search-prefix'."
                  (setq url (concat url "/"))))
            (setq url (concat eww-search-prefix
                              (replace-regexp-in-string " " "+" url))))))
-  (if (eq major-mode 'eww-mode)
-      (when (or (plist-get eww-data :url)
-               (plist-get eww-data :dom))
-       (eww-save-history))
-    (eww-setup-buffer)
-    (plist-put eww-data :url url)
-    (plist-put eww-data :title "")
-    (eww-update-header-line-format)
-    (let ((inhibit-read-only t))
-      (insert (format "Loading %s..." url))
-      (goto-char (point-min))))
+  (eww-setup-buffer)
+  (plist-put eww-data :url url)
+  (plist-put eww-data :title "")
+  (eww-update-header-line-format)
+  (let ((inhibit-read-only t))
+    (insert (format "Loading %s..." url))
+    (goto-char (point-min)))
   (url-retrieve url 'eww-render
                (list url nil (current-buffer))))
 
@@ -411,13 +407,17 @@ Currently this means either text/html or 
application/xhtml+xml."
            (inhibit-modification-hooks t)
            (shr-target-id (url-target (url-generic-parse-url url)))
            (shr-external-rendering-functions
-            '((title . eww-tag-title)
-              (form . eww-tag-form)
-              (input . eww-tag-input)
-              (textarea . eww-tag-textarea)
-              (select . eww-tag-select)
-              (link . eww-tag-link)
-              (a . eww-tag-a))))
+             (append
+              shr-external-rendering-functions
+              '((title . eww-tag-title)
+                (form . eww-tag-form)
+                (input . eww-tag-input)
+                (button . eww-form-submit)
+                (textarea . eww-tag-textarea)
+                (select . eww-tag-select)
+                (link . eww-tag-link)
+                (meta . eww-tag-meta)
+                (a . eww-tag-a)))))
        (erase-buffer)
        (shr-insert-document document)
        (cond
@@ -462,6 +462,27 @@ Currently this means either text/html or 
application/xhtml+xml."
         where
         (plist-put eww-data (cdr where) href))))
 
+(defvar eww-redirect-level 1)
+
+(defun eww-tag-meta (dom)
+  (when (and (cl-equalp (dom-attr dom 'http-equiv) "refresh")
+             (< eww-redirect-level 5))
+    (when-let (refresh (dom-attr dom 'content))
+      (when (or (string-match "^\\([0-9]+\\) *;.*url=\"\\([^\"]+\\)\"" refresh)
+                (string-match "^\\([0-9]+\\) *;.*url=\\([^ ]+\\)" refresh))
+        (let ((timeout (match-string 1 refresh))
+              (url (match-string 2 refresh))
+              (eww-redirect-level (1+ eww-redirect-level)))
+          (if (equal timeout "0")
+              (eww (shr-expand-url url))
+            (eww-tag-a
+             (dom-node 'a `((href . ,(shr-expand-url url)))
+                       (format "Auto refresh in %s second%s disabled"
+                               timeout
+                               (if (equal timeout "1")
+                                   ""
+                                 "s"))))))))))
+
 (defun eww-tag-link (dom)
   (eww-handle-link dom)
   (shr-generic dom))
@@ -538,6 +559,9 @@ Currently this means either text/html or 
application/xhtml+xml."
 
 (defun eww-setup-buffer ()
   (switch-to-buffer (get-buffer-create "*eww*"))
+  (when (or (plist-get eww-data :url)
+            (plist-get eww-data :dom))
+    (eww-save-history))
   (let ((inhibit-read-only t))
     (remove-overlays)
     (erase-buffer))
@@ -658,6 +682,7 @@ the like."
     (define-key map "E" 'eww-set-character-encoding)
     (define-key map "S" 'eww-list-buffers)
     (define-key map "F" 'eww-toggle-fonts)
+    (define-key map [(meta C)] 'eww-toggle-colors)
 
     (define-key map "b" 'eww-add-bookmark)
     (define-key map "B" 'eww-list-bookmarks)
@@ -682,6 +707,8 @@ the like."
        ["Add bookmark" eww-add-bookmark t]
        ["List bookmarks" eww-list-bookmarks t]
        ["List cookies" url-cookie-list t]
+       ["Toggle fonts" eww-toggle-fonts t]
+       ["Toggle colors" eww-toggle-colors t]
        ["Character Encoding" eww-set-character-encoding]))
     map))
 
@@ -715,7 +742,8 @@ the like."
   (setq-local desktop-save-buffer #'eww-desktop-misc-data)
   ;; multi-page isearch support
   (setq-local multi-isearch-next-buffer-function #'eww-isearch-next-buffer)
-  (setq truncate-lines t)
+  (setq truncate-lines t
+        bidi-paragraph-direction 'left-to-right)
   (buffer-disable-undo)
   (setq buffer-read-only t))
 
@@ -1179,16 +1207,19 @@ See URL 
`https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
      (eww-update-field display))))
 
 (defun eww-update-field (string &optional offset)
-  (if (not offset) (setq offset 0))
+  (unless offset
+    (setq offset 0))
   (let ((properties (text-properties-at (point)))
        (start (+ (eww-beginning-of-field) offset))
        (current-end (1+ (eww-end-of-field)))
-       (new-end (1+ (+ (eww-beginning-of-field) (length string)))))
+       (new-end (+ (eww-beginning-of-field) (length string)))
+        (inhibit-read-only t))
     (delete-region start current-end)
     (forward-char offset)
     (insert string
            (make-string (- (- (+ new-end offset) start) (length string)) ? ))
-    (if (= 0 offset) (set-text-properties start new-end properties))
+    (when (= 0 offset)
+      (set-text-properties start new-end properties))
     start))
 
 (defun eww-toggle-checkbox ()
@@ -1402,26 +1433,52 @@ Differences in #targets are ignored."
   (unless (plist-get status :error)
     (let* ((obj (url-generic-parse-url url))
            (path (car (url-path-and-query obj)))
-           (file (eww-make-unique-file-name (file-name-nondirectory path)
-                                           eww-download-directory)))
+           (file (eww-make-unique-file-name
+                  (eww-decode-url-file-name (file-name-nondirectory path))
+                  eww-download-directory)))
       (goto-char (point-min))
       (re-search-forward "\r?\n\r?\n")
       (write-region (point) (point-max) file)
       (message "Saved %s" file))))
 
+(defun eww-decode-url-file-name (string)
+  (let* ((binary (url-unhex-string string))
+         (decoded
+          (decode-coding-string
+           binary
+           ;; Possibly set by `universal-coding-system-argument'.
+           (or coding-system-for-read
+               ;; RFC 3986 says that %AB stuff is utf-8.
+               (if (equal (decode-coding-string binary 'utf-8)
+                          '(unicode))
+                   'utf-8
+                 ;; But perhaps not.
+                 (car (detect-coding-string binary))))))
+         (encodes (find-coding-systems-string decoded)))
+    (if (or (equal encodes '(undecided))
+            (memq (coding-system-base (or file-name-coding-system
+                                          default-file-name-coding-system))
+                  encodes))
+        decoded
+      ;; If we can't encode the decoded file name (due to language
+      ;; environment settings), then we return the original, hexified
+      ;; string.
+      string)))
+
 (defun eww-make-unique-file-name (file directory)
     (cond
      ((zerop (length file))
       (setq file "!"))
      ((string-match "\\`[.]" file)
       (setq file (concat "!" file))))
-    (let ((count 1))
+    (let ((count 1)
+          (stem file)
+          (suffix ""))
+      (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
+        (setq stem (match-string 1)
+              suffix (match-string 2)))
       (while (file-exists-p (expand-file-name file directory))
-       (setq file
-             (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
-                 (format "%s(%d)%s" (match-string 1 file)
-                         count (match-string 2 file))
-               (format "%s(%d)" file count)))
+        (setq file (format "%s(%d)%s" stem count suffix))
        (setq count (1+ count)))
       (expand-file-name file directory)))
 
@@ -1442,6 +1499,15 @@ If CHARSET is nil then use UTF-8."
             "off"))
   (eww-reload))
 
+(defun eww-toggle-colors ()
+  "Toggle whether to use HTML-specified colors or not."
+  (interactive)
+  (message "Colors are now %s"
+          (if (setq shr-use-colors (not shr-use-colors))
+              "on"
+            "off"))
+  (eww-reload))
+
 ;;; Bookmarks code
 
 (defvar eww-bookmarks nil)
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 479c9a5..ccaef8a 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -67,10 +67,11 @@ set this variable to \"normal:-dhe-rsa\"."
 
 (defcustom gnutls-trustfiles
   '(
-    "/etc/ssl/certs/ca-certificates.crt" ; Debian, Ubuntu, Gentoo and Arch 
Linux
-    "/etc/pki/tls/certs/ca-bundle.crt"   ; Fedora and RHEL
-    "/etc/ssl/ca-bundle.pem"             ; Suse
-    "/usr/ssl/certs/ca-bundle.crt"       ; Cygwin
+    "/etc/ssl/certs/ca-certificates.crt"     ; Debian, Ubuntu, Gentoo and Arch 
Linux
+    "/etc/pki/tls/certs/ca-bundle.crt"       ; Fedora and RHEL
+    "/etc/ssl/ca-bundle.pem"                 ; Suse
+    "/usr/ssl/certs/ca-bundle.crt"           ; Cygwin
+    "/usr/local/share/certs/ca-root-nss.crt" ; FreeBSD
     )
   "List of CA bundle location filenames or a function returning said list.
 The files may be in PEM or DER format, as per the GnuTLS documentation.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index a48d098..469ef4e 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -63,6 +63,12 @@ fit these criteria."
   :group 'shr
   :type 'boolean)
 
+(defcustom shr-use-colors t
+  "If non-nil, respect color specifications in the HTML."
+  :version "25.2"
+  :group 'shr
+  :type 'boolean)
+
 (defcustom shr-table-horizontal-line nil
   "Character used to draw horizontal table lines.
 If nil, don't draw horizontal table lines."
@@ -135,6 +141,14 @@ cid: URL as the argument.")
 (defvar shr-inhibit-images nil
   "If non-nil, inhibit loading images.")
 
+(defvar shr-external-rendering-functions nil
+  "Alist of tag/function pairs used to alter how shr renders certain tags.
+For instance, eww uses this to alter rendering of title, forms
+and other things:
+((title . eww-tag-title)
+ (form . eww-tag-form)
+ ...)")
+
 ;;; Internal variables.
 
 (defvar shr-folding-mode nil)
@@ -150,7 +164,6 @@ cid: URL as the argument.")
 (defvar shr-depth 0)
 (defvar shr-warning nil)
 (defvar shr-ignore-cache nil)
-(defvar shr-external-rendering-functions nil)
 (defvar shr-target-id nil)
 (defvar shr-table-separator-length 1)
 (defvar shr-table-separator-pixel-width 0)
@@ -416,17 +429,16 @@ size, and full-buffer size."
 
 (defun shr-descend (dom)
   (let ((function
-        (or
-         ;; Allow other packages to override (or provide) rendering
-         ;; of elements.
-         (cdr (assq (dom-tag dom) shr-external-rendering-functions))
-         (intern (concat "shr-tag-" (symbol-name (dom-tag dom))) obarray)))
+         (intern (concat "shr-tag-" (symbol-name (dom-tag dom))) obarray))
+        ;; Allow other packages to override (or provide) rendering
+        ;; of elements.
+        (external (cdr (assq (dom-tag dom) shr-external-rendering-functions)))
        (style (dom-attr dom 'style))
        (shr-stylesheet shr-stylesheet)
        (shr-depth (1+ shr-depth))
        (start (point)))
-    ;; shr uses about 12 frames per nested node.
-    (if (> shr-depth (/ max-specpdl-size 12))
+    ;; shr uses many frames per nested node.
+    (if (> shr-depth (/ max-specpdl-size 15))
        (setq shr-warning "Too deeply nested to render properly; consider 
increasing `max-specpdl-size'")
       (when style
        (if (string-match "color\\|display\\|border-collapse" style)
@@ -435,9 +447,12 @@ size, and full-buffer size."
          (setq style nil)))
       ;; If we have a display:none, then just ignore this part of the DOM.
       (unless (equal (cdr (assq 'display shr-stylesheet)) "none")
-       (if (fboundp function)
-           (funcall function dom)
-         (shr-generic dom))
+        (cond (external
+               (funcall external dom))
+              ((fboundp function)
+               (funcall function dom))
+              (t
+               (shr-generic dom)))
        (when (and shr-target-id
                   (equal (dom-attr dom 'id) shr-target-id))
          ;; If the element was empty, we don't have anything to put the
@@ -1075,7 +1090,9 @@ ones, in case fg and bg are nil."
                (shr-color-visible bg fg)))))))
 
 (defun shr-colorize-region (start end fg &optional bg)
-  (when (and (or fg bg) (>= (display-color-cells) 88))
+  (when (and shr-use-colors
+             (or fg bg)
+             (>= (display-color-cells) 88))
     (let ((new-colors (shr-color-check fg bg)))
       (when new-colors
        (when fg
@@ -1102,6 +1119,15 @@ ones, in case fg and bg are nil."
 
 ;;; Tag-specific rendering rules.
 
+(defun shr-tag-html (dom)
+  (let ((dir (dom-attr dom 'dir)))
+    (cond
+     ((equal dir "ltr")
+      (setq bidi-paragraph-direction 'left-to-right))
+     ((equal dir "rtl")
+      (setq bidi-paragraph-direction 'right-to-left))))
+  (shr-generic dom))
+
 (defun shr-tag-body (dom)
   (let* ((start (point))
         (fgcolor (or (dom-attr dom 'fgcolor) (dom-attr dom 'text)))
@@ -1152,7 +1178,9 @@ ones, in case fg and bg are nil."
 
 (defun shr-tag-svg (dom)
   (when (and (image-type-available-p 'svg)
-            (not shr-inhibit-images))
+            (not shr-inhibit-images)
+             (dom-attr dom 'width)
+             (dom-attr dom 'height))
     (funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml)
             "SVG Image")))
 
@@ -1570,19 +1598,30 @@ The preference is a float determined from 
`shr-prefer-media-type'."
     ;; Then render the table again with these new "hard" widths.
     (shr-insert-table (shr-make-table dom sketch-widths t) sketch-widths)))
 
+(defun shr-table-body (dom)
+  (let ((tbodies (dom-by-tag dom 'tbody)))
+    (cond
+     ((null tbodies)
+      dom)
+     ((= (length tbodies) 1)
+      (car tbodies))
+     (t
+      ;; Table with multiple tbodies.  Convert into a single tbody.
+      `(tbody nil ,@(cl-reduce 'append
+                               (mapcar 'dom-non-text-children tbodies)))))))
+
 (defun shr-tag-table (dom)
   (shr-ensure-paragraph)
   (let* ((caption (dom-children (dom-child-by-tag dom 'caption)))
         (header (dom-non-text-children (dom-child-by-tag dom 'thead)))
-        (body (dom-non-text-children (or (dom-child-by-tag dom 'tbody)
-                                         dom)))
+        (body (dom-non-text-children (shr-table-body dom)))
         (footer (dom-non-text-children (dom-child-by-tag dom 'tfoot)))
          (bgcolor (dom-attr dom 'bgcolor))
         (start (point))
         (shr-stylesheet (nconc (list (cons 'background-color bgcolor))
                                shr-stylesheet))
         (nheader (if header (shr-max-columns header)))
-        (nbody (if body (shr-max-columns body)))
+        (nbody (if body (shr-max-columns body) 0))
         (nfooter (if footer (shr-max-columns footer))))
     (if (and (not caption)
             (not header)
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index 3afb72a..853c915 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -1232,7 +1232,7 @@ V%s 0 /%s-latin1 /%s Latin1Encoding put\n"
 (provide 'ps-mule)
 
 ;; Local Variables:
-;; generated-autoload-file: "ps-print.el"
+;; generated-autoload-file: "ps-print-loaddefs.el"
 ;; End:
 
 ;;; ps-mule.el ends here
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index e929427..b29894d 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1475,6 +1475,8 @@ Please send all bug fixes and enhancements to
 ;; Load XEmacs/Emacs definitions
 (require 'ps-def)
 
+;; autoloads for secondary file
+(require 'ps-print-loaddefs)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; User Variables:
@@ -6584,79 +6586,6 @@ If FACE is not a valid face name, use default face."
 (unless noninteractive
   (add-hook 'kill-emacs-hook #'ps-kill-emacs-check))
 
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; To make this file smaller, some commands go in a separate file.
-;; But autoload them here to make the separation invisible.
-
-;;;### (autoloads nil "ps-mule" "ps-mule.el" 
"231b07356e5a37ebf517c613a3a12bba")
-;;; Generated autoloads from ps-mule.el
-
-(defvar ps-multibyte-buffer nil "\
-Specifies the multi-byte buffer handling.
-
-Valid values are:
-
-  nil                    This is the value to use the default settings;
-                         by default, this only works to print buffers with
-                         only ASCII and Latin characters.   But this default
-                         setting can be changed by setting the variable
-                         `ps-mule-font-info-database-default' differently.
-                         The initial value of this variable is
-                         `ps-mule-font-info-database-latin' (see
-                         documentation).
-
-  `non-latin-printer'    This is the value to use when you have a Japanese
-                         or Korean PostScript printer and want to print
-                         buffer with ASCII, Latin-1, Japanese (JISX0208 and
-                         JISX0201-Kana) and Korean characters.  At present,
-                         it was not tested with the Korean characters
-                         printing.  If you have a korean PostScript printer,
-                         please, test it.
-
-  `bdf-font'             This is the value to use when you want to print
-                         buffer with BDF fonts.  BDF fonts include both latin
-                         and non-latin fonts.  BDF (Bitmap Distribution
-                         Format) is a format used for distributing X's font
-                         source file.  BDF fonts are included in
-                         `intlfonts-1.2' which is a collection of X11 fonts
-                         for all characters supported by Emacs.  In order to
-                         use this value, be sure to have installed
-                         `intlfonts-1.2' and set the variable
-                         `bdf-directory-list' appropriately (see ps-bdf.el for
-                         documentation of this variable).
-
-  `bdf-font-except-latin' This is like `bdf-font' except that it uses
-                         PostScript default fonts to print ASCII and Latin-1
-                         characters.  This is convenient when you want or
-                         need to use both latin and non-latin characters on
-                         the same buffer.  See `ps-font-family',
-                         `ps-header-font-family' and `ps-font-info-database'.
-
-Any other value is treated as nil.")
-
-(custom-autoload 'ps-multibyte-buffer "ps-mule" t)
-
-(autoload 'ps-mule-initialize "ps-mule" "\
-Initialize global data for printing multi-byte characters.
-
-\(fn)" nil nil)
-
-(autoload 'ps-mule-begin-job "ps-mule" "\
-Start printing job for multi-byte chars between FROM and TO.
-It checks if all multi-byte characters in the region are printable or not.
-
-\(fn FROM TO)" nil nil)
-
-(autoload 'ps-mule-end-job "ps-mule" "\
-Finish printing job for multi-byte chars.
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 (provide 'ps-print)
 
 ;;; ps-print.el ends here
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index bbad065..b2629a5 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -237,5 +237,5 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . 
LEVEL).  See
 ;;; reftex-auc.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index a35d411..b2229d5 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -1262,5 +1262,5 @@ created files in the variables 
`reftex-create-bibtex-header' or
 ;;; reftex-cite.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index 60cb1f6..8601294 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -488,5 +488,5 @@ Calling this function several times find successive 
citation locations."
 ;;; reftex-dcr.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index 15d42fe..94635c0 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -477,5 +477,5 @@ With no argument, this command toggles
 ;;; reftex-global.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index 7e961e8..47ba14b 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -2119,5 +2119,5 @@ Does not do a save-excursion."
 ;;; reftex-index.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index f571131..d27989a 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -1131,5 +1131,5 @@ When LEVEL is non-nil, increase section numbers on that 
level."
 ;;; reftex-parse.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index df78447..3d44e5a 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -881,5 +881,5 @@ Optional prefix argument OTHER-WINDOW goes to the label in 
another window."
 ;;; reftex-ref.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index 643dbfb..1948d9f 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -745,5 +745,5 @@ Cycle in reverse order if optional argument REVERSE is 
non-nil."
 ;;; reftex-sel.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index bdae6e5..87f7944 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -1111,5 +1111,5 @@ always show the current section in connection with the 
option
 ;;; reftex-toc.el ends here
 
 ;; Local Variables:
-;; generated-autoload-file: "reftex.el"
+;; generated-autoload-file: "reftex-loaddefs.el"
 ;; End:
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 84efa7a..b29a56a 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -70,7 +70,8 @@
 (require 'reftex-vars)
 
 
-;;; Autoloads - see end for automatic autoloads
+;;; Autoloads to ensure loading of support files when necessary
+(require 'reftex-loaddefs)
 
 ;; We autoload tons of functions from these files, but some have
 ;; a single function that needs to be globally autoloaded.
@@ -2394,702 +2395,6 @@ Your bug report will be posted to the AUCTeX bug 
reporting list.
 
 (setq reftex-tables-dirty t)  ; in case this file is evaluated by hand
 
-
-;;; Start of automatically extracted autoloads.
-
-;;;### (autoloads nil "reftex-auc" "reftex-auc.el" 
"cf606f7918831321cb46f254436dc66e")
-;;; Generated autoloads from reftex-auc.el
-
-(autoload 'reftex-arg-label "reftex-auc" "\
-Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg.
-What is being used depends upon `reftex-plug-into-AUCTeX'.
-
-\(fn OPTIONAL &optional PROMPT DEFINITION)" nil nil)
-
-(autoload 'reftex-arg-cite "reftex-auc" "\
-Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument.
-What is being used depends upon `reftex-plug-into-AUCTeX'.
-
-\(fn OPTIONAL &optional PROMPT DEFINITION)" nil nil)
-
-(autoload 'reftex-arg-index-tag "reftex-auc" "\
-Prompt for an index tag with completion.
-This is the name of an index, not the entry.
-
-\(fn OPTIONAL &optional PROMPT &rest ARGS)" nil nil)
-
-(autoload 'reftex-arg-index "reftex-auc" "\
-Prompt for an index entry completing with known entries.
-Completion is specific for just one index, if the macro or a tag
-argument identify one of multiple indices.
-
-\(fn OPTIONAL &optional PROMPT &rest ARGS)" nil nil)
-
-(autoload 'reftex-plug-into-AUCTeX "reftex-auc" "\
-
-
-\(fn)" nil nil)
-
-(autoload 'reftex-toggle-plug-into-AUCTeX "reftex-auc" "\
-Toggle Interface between AUCTeX and RefTeX on and off.
-
-\(fn)" t nil)
-
-(autoload 'reftex-add-label-environments "reftex-auc" "\
-Add label environment descriptions to `reftex-label-alist-style'.
-The format of ENTRY-LIST is exactly like `reftex-label-alist'.  See there
-for details.
-This function makes it possible to support RefTeX from AUCTeX style files.
-The entries in ENTRY-LIST will be processed after the user settings in
-`reftex-label-alist', and before the defaults (specified in
-`reftex-default-label-alist-entries').  Any changes made to
-`reftex-label-alist-style' will raise a flag to the effect that
-the label information is recompiled on next use.
-
-\(fn ENTRY-LIST)" nil nil)
-
-(defalias 'reftex-add-to-label-alist 'reftex-add-label-environments)
-
-(autoload 'reftex-add-section-levels "reftex-auc" "\
-Add entries to the value of `reftex-section-levels'.
-The added values are kept local to the current document.  The format
-of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL).  See
-`reftex-section-levels' for an example.
-
-\(fn ENTRY-LIST)" nil nil)
-
-(autoload 'reftex-notice-new-section "reftex-auc" "\
-
-
-\(fn)" nil nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-cite" "reftex-cite.el" 
"7eaa61c05a6578999ea68f1be0fbcf49")
-;;; Generated autoloads from reftex-cite.el
-
-(autoload 'reftex-default-bibliography "reftex-cite" "\
-Return the expanded value of variable `reftex-default-bibliography'.
-The expanded value is cached.
-
-\(fn)" nil nil)
-
-(autoload 'reftex-bib-or-thebib "reftex-cite" "\
-Test if BibTeX or egin{thebibliography} should be used for the citation.
-Find the bof of the current file
-
-\(fn)" nil nil)
-
-(autoload 'reftex-get-bibfile-list "reftex-cite" "\
-Return list of bibfiles for current document.
-When using the chapterbib or bibunits package you should either
-use the same database files everywhere, or separate parts using
-different databases into different files (included into the mater file).
-Then this function will return the applicable database files.
-
-\(fn)" nil nil)
-
-(autoload 'reftex-pop-to-bibtex-entry "reftex-cite" "\
-Find BibTeX KEY in any file in FILE-LIST in another window.
-If MARK-TO-KILL is non-nil, mark new buffer to kill.
-If HIGHLIGHT is non-nil, highlight the match.
-If ITEM in non-nil, search for bibitem instead of database entry.
-If RETURN is non-nil, just return the entry and restore point.
-
-\(fn KEY FILE-LIST &optional MARK-TO-KILL HIGHLIGHT ITEM RETURN)" nil nil)
-
-(autoload 'reftex-end-of-bib-entry "reftex-cite" "\
-
-
-\(fn ITEM)" nil nil)
-
-(autoload 'reftex-parse-bibtex-entry "reftex-cite" "\
-Parse BibTeX ENTRY.
-If ENTRY is nil then parse the entry in current buffer between FROM and TO.
-If RAW is non-nil, keep double quotes/curly braces delimiting fields.
-
-\(fn ENTRY &optional FROM TO RAW)" nil nil)
-
-(autoload 'reftex-citation "reftex-cite" "\
-Make a citation using BibTeX database files.
-After prompting for a regular expression, scans the buffers with
-bibtex entries (taken from the \\bibliography command) and offers the
-matching entries for selection.  The selected entry is formatted according
-to `reftex-cite-format' and inserted into the buffer.
-
-If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
-
-FORMAT-KEY can be used to pre-select a citation format.
-
-When called with a `C-u' prefix, prompt for optional arguments in
-cite macros.  When called with a numeric prefix, make that many
-citations.  When called with point inside the braces of a `\\cite'
-command, it will add another key, ignoring the value of
-`reftex-cite-format'.
-
-The regular expression uses an expanded syntax: && is interpreted as `and'.
-Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'.
-While entering the regexp, completion on knows citation keys is possible.
-`=' is a good regular expression to match all entries in all files.
-
-\(fn &optional NO-INSERT FORMAT-KEY)" t nil)
-
-(autoload 'reftex-citep "reftex-cite" "\
-Call `reftex-citation' with a format selector `?p'.
-
-\(fn)" t nil)
-
-(autoload 'reftex-citet "reftex-cite" "\
-Call `reftex-citation' with a format selector `?t'.
-
-\(fn)" t nil)
-
-(autoload 'reftex-make-cite-echo-string "reftex-cite" "\
-Format a bibtex ENTRY for the echo area and cache the result.
-
-\(fn ENTRY DOCSTRUCT-SYMBOL)" nil nil)
-
-(autoload 'reftex-create-bibtex-file "reftex-cite" "\
-Create a new BibTeX database BIBFILE with all entries referenced in document.
-The command prompts for a filename and writes the collected
-entries to that file.  Only entries referenced in the current
-document with any \\cite-like macros are used.  The sequence in
-the new file is the same as it was in the old database.
-
-Entries referenced from other entries must appear after all
-referencing entries.
-
-You can define strings to be used as header or footer for the
-created files in the variables `reftex-create-bibtex-header' or
-`reftex-create-bibtex-footer' respectively.
-
-\(fn BIBFILE)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-dcr" "reftex-dcr.el" 
"08fc5bd6c35f9d6ab4a6ad336d3769c0")
-;;; Generated autoloads from reftex-dcr.el
-
-(autoload 'reftex-view-crossref "reftex-dcr" "\
-View cross reference of macro at point.  Point must be on the KEY
-argument.  When at a `\\ref' macro, show corresponding `\\label'
-definition, also in external documents (`xr').  When on a label, show
-a locations where KEY is referenced.  Subsequent calls find additional
-locations.  When on a `\\cite', show the associated `\\bibitem' macro or
-the BibTeX database entry.  When on a `\\bibitem', show a `\\cite' macro
-which uses this KEY. When on an `\\index', show other locations marked
-by the same index entry.
-To define additional cross referencing items, use the option
-`reftex-view-crossref-extra'.  See also `reftex-view-crossref-from-bibtex'.
-With one or two C-u prefixes, enforce rescanning of the document.
-With argument 2, select the window showing the cross reference.
-AUTO-HOW is only for the automatic crossref display and is handed through
-to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'.
-
-\(fn &optional ARG AUTO-HOW FAIL-QUIETLY)" t nil)
-
-(autoload 'reftex-mouse-view-crossref "reftex-dcr" "\
-View cross reference of \\ref or \\cite macro where you click.
-If the macro at point is a \\ref, show the corresponding label definition.
-If it is a \\cite, show the BibTeX database entry.
-If there is no such macro at point, search forward to find one.
-With argument, actually select the window showing the cross reference.
-
-\(fn EV)" t nil)
-
-(autoload 'reftex-toggle-auto-view-crossref "reftex-dcr" "\
-Toggle the automatic display of crossref information in the echo area.
-When active, leaving point idle in the argument of a \\ref or \\cite macro
-will display info in the echo area.
-
-\(fn)" t nil)
-
-(autoload 'reftex-view-crossref-from-bibtex "reftex-dcr" "\
-View location in a LaTeX document which cites the BibTeX entry at point.
-Since BibTeX files can be used by many LaTeX documents, this function
-prompts upon first use for a buffer in RefTeX mode.  To reset this
-link to a document, call the function with a prefix arg.
-Calling this function several times find successive citation locations.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-global" "reftex-global.el" 
"5fdd9c2edced0882471f86baf4b4b234")
-;;; Generated autoloads from reftex-global.el
-
-(autoload 'reftex-create-tags-file "reftex-global" "\
-Create TAGS file by running `etags' on the current document.
-The TAGS file is also immediately visited with `visit-tags-table'.
-
-\(fn)" t nil)
-
-(autoload 'reftex-grep-document "reftex-global" "\
-Run grep query through all files related to this document.
-With prefix arg, force to rescan document.
-No active TAGS table is required.
-
-\(fn GREP-CMD)" t nil)
-
-(autoload 'reftex-search-document "reftex-global" "\
-Regexp search through all files of the current document.
-Starts always in the master file.  Stops when a match is found.
-To continue searching for next match, use command \\[tags-loop-continue].
-No active TAGS table is required.
-
-\(fn &optional REGEXP)" t nil)
-
-(autoload 'reftex-query-replace-document "reftex-global" "\
-Do `query-replace-regexp' of FROM with TO over the entire document.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue].
-No active TAGS table is required.
-
-\(fn &optional FROM TO DELIMITED)" t nil)
-
-(autoload 'reftex-find-duplicate-labels "reftex-global" "\
-Produce a list of all duplicate labels in the document.
-
-\(fn)" t nil)
-
-(autoload 'reftex-change-label "reftex-global" "\
-Run `query-replace-regexp' of FROM with TO in all macro arguments.
-Works on the entire multifile document.
-If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
-with the command \\[tags-loop-continue].
-No active TAGS table is required.
-
-\(fn &optional FROM TO)" t nil)
-
-(autoload 'reftex-renumber-simple-labels "reftex-global" "\
-Renumber all simple labels in the document to make them sequentially.
-Simple labels are the ones created by RefTeX, consisting only of the
-prefix and a number.  After the command completes, all these labels will
-have sequential numbers throughout the document.  Any references to
-the labels will be changed as well.  For this, RefTeX looks at the
-arguments of any macros which either start or end in the string `ref'.
-This command should be used with care, in particular in multifile
-documents.  You should not use it if another document refers to this
-one with the `xr' package.
-
-\(fn)" t nil)
-
-(autoload 'reftex-save-all-document-buffers "reftex-global" "\
-Save all documents associated with the current document.
-The function is useful after a global action like replacing or renumbering
-labels.
-
-\(fn)" t nil)
-
-(autoload 'reftex-isearch-minor-mode "reftex-global" "\
-When on, isearch searches the whole document, not only the current file.
-This minor mode allows isearch to search through all the files of
-the current TeX document.
-
-With no argument, this command toggles
-`reftex-isearch-minor-mode'.  With a prefix argument ARG, turn
-`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-index" "reftex-index.el" 
"29cb6e91c2e06592053e9d543f30f0ea")
-;;; Generated autoloads from reftex-index.el
-
-(autoload 'reftex-index-selection-or-word "reftex-index" "\
-Put selection or the word near point into the default index macro.
-This uses the information in `reftex-index-default-macro' to make an index
-entry.  The phrase indexed is the current selection or the word near point.
-When called with one `C-u' prefix, let the user have a chance to edit the
-index entry.  When called with 2 `C-u' as prefix, also ask for the index
-macro and other stuff.
-When called inside TeX math mode as determined by the `texmathp.el' library
-which is part of AUCTeX, the string is first processed with the
-`reftex-index-math-format', which see.
-
-\(fn &optional ARG PHRASE)" t nil)
-
-(autoload 'reftex-index "reftex-index" "\
-Query for an index macro and insert it along with its arguments.
-The index macros available are those defined in `reftex-index-macro' or
-by a call to `reftex-add-index-macros', typically from an AUCTeX style file.
-RefteX provides completion for the index tag and the index key, and
-will prompt for other arguments.
-
-\(fn &optional CHAR KEY TAG SEL NO-INSERT)" t nil)
-
-(autoload 'reftex-index-complete-tag "reftex-index" "\
-
-
-\(fn &optional ITAG OPT-ARGS)" nil nil)
-
-(autoload 'reftex-index-select-tag "reftex-index" "\
-
-
-\(fn)" nil nil)
-
-(autoload 'reftex-index-complete-key "reftex-index" "\
-
-
-\(fn &optional TAG OPTIONAL INITIAL)" nil nil)
-
-(autoload 'reftex-index-show-entry "reftex-index" "\
-
-
-\(fn DATA &optional NO-REVISIT)" nil nil)
-
-(autoload 'reftex-display-index "reftex-index" "\
-Display a buffer with an index compiled from the current document.
-When the document has multiple indices, first prompts for the correct one.
-When index support is turned off, offer to turn it on.
-With one or two `C-u' prefixes, rescan document first.
-With prefix 2, restrict index to current document section.
-With prefix 3, restrict index to region.
-
-\(fn &optional TAG OVERRIDING-RESTRICTION REDO &rest LOCATIONS)" t nil)
-
-(autoload 'reftex-index-phrase-selection-or-word "reftex-index" "\
-Add current selection or word at point to the phrases buffer.
-When you are in transient-mark-mode and the region is active, the
-selection will be used - otherwise the word at point.
-You get a chance to edit the entry in the phrases buffer - finish with
-`C-c C-c'.
-
-\(fn ARG)" t nil)
-
-(autoload 'reftex-index-visit-phrases-buffer "reftex-index" "\
-Switch to the phrases buffer, initialize if empty.
-
-\(fn)" t nil)
-
-(autoload 'reftex-index-phrases-mode "reftex-index" "\
-Major mode for managing the Index phrases of a LaTeX document.
-This buffer was created with RefTeX.
-
-To insert new phrases, use
- - `C-c \\' in the LaTeX document to copy selection or word
- - `\\[reftex-index-new-phrase]' in the phrases buffer.
-
-To index phrases use one of:
-
-\\[reftex-index-this-phrase]     index current phrase
-\\[reftex-index-next-phrase]     index next phrase (or N with prefix arg)
-\\[reftex-index-all-phrases]     index all phrases
-\\[reftex-index-remaining-phrases]     index current and following phrases
-\\[reftex-index-region-phrases]     index the phrases in the region
-
-You can sort the phrases in this buffer with \\[reftex-index-sort-phrases].
-To display information about the phrase at point, use 
\\[reftex-index-phrases-info].
-
-For more information see the RefTeX User Manual.
-
-Here are all local bindings.
-
-\\{reftex-index-phrases-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-parse" "reftex-parse.el" 
"7bfdcb2f040dbe9a08d2c38c005c8f21")
-;;; Generated autoloads from reftex-parse.el
-
-(autoload 'reftex-parse-one "reftex-parse" "\
-Re-parse this file.
-
-\(fn)" t nil)
-
-(autoload 'reftex-parse-all "reftex-parse" "\
-Re-parse entire document.
-
-\(fn)" t nil)
-
-(autoload 'reftex-do-parse "reftex-parse" "\
-Do a document rescan.
-When allowed, do only a partial scan from FILE.
-
-\(fn RESCAN &optional FILE)" nil nil)
-
-(autoload 'reftex-everything-regexp "reftex-parse" "\
-
-
-\(fn)" nil nil)
-
-(autoload 'reftex-all-document-files "reftex-parse" "\
-Return a list of all files belonging to the current document.
-When RELATIVE is non-nil, give file names relative to directory
-of master file.
-
-\(fn &optional RELATIVE)" nil nil)
-
-(autoload 'reftex-locate-bibliography-files "reftex-parse" "\
-Scan buffer for bibliography macros and return file list.
-
-\(fn MASTER-DIR &optional FILES)" nil nil)
-
-(autoload 'reftex-section-info "reftex-parse" "\
-Return a section entry for the current match.
-Careful: This function expects the match-data to be still in place!
-
-\(fn FILE)" nil nil)
-
-(autoload 'reftex-ensure-index-support "reftex-parse" "\
-When index support is turned off, ask to turn it on and
-set the current prefix argument so that `reftex-access-scan-info'
-will rescan the entire document.
-
-\(fn &optional ABORT)" nil nil)
-
-(autoload 'reftex-index-info-safe "reftex-parse" "\
-
-
-\(fn FILE)" nil nil)
-
-(autoload 'reftex-index-info "reftex-parse" "\
-Return an index entry for the current match.
-Careful: This function expects the match-data to be still in place!
-
-\(fn FILE)" nil nil)
-
-(autoload 'reftex-short-context "reftex-parse" "\
-Get about one line of useful context for the label definition at point.
-
-\(fn ENV PARSE &optional BOUND DERIVE)" nil nil)
-
-(autoload 'reftex-where-am-I "reftex-parse" "\
-Return the docstruct entry above point.
-Actually returns a cons cell in which the cdr is a flag indicating
-if the information is exact (t) or approximate (nil).
-
-\(fn)" nil nil)
-
-(autoload 'reftex-notice-new "reftex-parse" "\
-Hook to handshake with RefTeX after something new has been inserted.
-
-\(fn &optional N FORCE)" nil nil)
-
-(autoload 'reftex-what-macro-safe "reftex-parse" "\
-Call `reftex-what-macro' with special syntax table.
-
-\(fn WHICH &optional BOUND)" nil nil)
-
-(autoload 'reftex-what-macro "reftex-parse" "\
-Find out if point is within the arguments of any TeX-macro.
-The return value is either (\"\\macro\" . (point)) or a list of them.
-
-If WHICH is nil, immediately return nil.
-If WHICH is 1, return innermost enclosing macro.
-If WHICH is t, return list of all macros enclosing point.
-If WHICH is a list of macros, look only for those macros and return the
-  name of the first macro in this list found to enclose point.
-If the optional BOUND is an integer, bound backwards directed
-  searches to this point.  If it is nil, limit to nearest \\section -
-  like statement.
-
-This function is pretty stable, but can be fooled if the text contains
-things like \\macro{aa}{bb} where \\macro is defined to take only one
-argument.  As RefTeX cannot know this, the string \"bb\" would still be
-considered an argument of macro \\macro.
-
-\(fn WHICH &optional BOUND)" nil nil)
-
-(autoload 'reftex-what-environment "reftex-parse" "\
-Find out if point is inside a LaTeX environment.
-The return value is (e.g.) either (\"equation\" . (point)) or a list of
-them.
-
-If WHICH is nil, immediately return nil.
-If WHICH is 1, return innermost enclosing environment.
-If WHICH is t, return list of all environments enclosing point.
-If WHICH is a list of environments, look only for those environments and
-  return the name of the first environment in this list found to enclose
-  point.
-
-If the optional BOUND is an integer, bound backwards directed searches to
-this point.  If it is nil, limit to nearest \\section - like statement.
-
-\(fn WHICH &optional BOUND)" nil nil)
-
-(autoload 'reftex-what-special-env "reftex-parse" "\
-Run the special environment parsers and return the matches.
-
-The return value is (e.g.) either (\"my-parser-function\" . (point))
-or a list of them.
-
-If WHICH is nil, immediately return nil.
-If WHICH is 1, return innermost enclosing environment.
-If WHICH is t, return list of all environments enclosing point.
-If WHICH is a list of environments, look only for those environments and
-  return the name of the first environment in this list found to enclose
-  point.
-
-\(fn WHICH &optional BOUND)" nil nil)
-
-(autoload 'reftex-nth-arg "reftex-parse" "\
-Return the Nth following {} or [] parentheses content.
-OPT-ARGS is a list of argument numbers which are optional.
-
-\(fn N &optional OPT-ARGS)" nil nil)
-
-(autoload 'reftex-move-over-touching-args "reftex-parse" "\
-
-
-\(fn)" nil nil)
-
-(autoload 'reftex-init-section-numbers "reftex-parse" "\
-Initialize the section numbers with zeros or with what is found in the 
TOC-ENTRY.
-
-\(fn &optional TOC-ENTRY APPENDIX)" nil nil)
-
-(autoload 'reftex-section-number "reftex-parse" "\
-Return a string with the current section number.
-When LEVEL is non-nil, increase section numbers on that level.
-
-\(fn &optional LEVEL STAR)" nil nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-ref" "reftex-ref.el" 
"86c0a243e49d55bb33a32ddac613e189")
-;;; Generated autoloads from reftex-ref.el
-
-(autoload 'reftex-label-location "reftex-ref" "\
-Return the environment or macro which determines the label type at point.
-If optional BOUND is an integer, limit backward searches to that point.
-
-\(fn &optional BOUND)" nil nil)
-
-(autoload 'reftex-label-info-update "reftex-ref" "\
-
-
-\(fn CELL)" nil nil)
-
-(autoload 'reftex-label-info "reftex-ref" "\
-
-
-\(fn LABEL &optional FILE BOUND DERIVE ENV-OR-MAC)" nil nil)
-
-(autoload 'reftex-label "reftex-ref" "\
-Insert a unique label.  Return the label.
-If ENVIRONMENT is given, don't bother to find out yourself.
-If NO-INSERT is non-nil, do not insert label into buffer.
-With prefix arg, force to rescan document first.
-When you are prompted to enter or confirm a label, and you reply with
-just the prefix or an empty string, no label at all will be inserted.
-A new label is also recorded into the label list.
-This function is controlled by the settings of reftex-insert-label-flags.
-
-\(fn &optional ENVIRONMENT NO-INSERT)" t nil)
-
-(autoload 'reftex-reference "reftex-ref" "\
-Make a LaTeX reference.  Look only for labels of a certain TYPE.
-With prefix arg, force to rescan buffer for labels.  This should only be
-necessary if you have recently entered labels yourself without using
-reftex-label.  Rescanning of the buffer can also be requested from the
-label selection menu.
-The function returns the selected label or nil.
-If NO-INSERT is non-nil, do not insert \\ref command, just return label.
-When called with 2 C-u prefix args, disable magic word recognition.
-
-\(fn &optional TYPE NO-INSERT CUT)" t nil)
-
-(autoload 'reftex-query-label-type "reftex-ref" "\
-
-
-\(fn)" nil nil)
-
-(autoload 'reftex-show-label-location "reftex-ref" "\
-
-
-\(fn DATA FORWARD NO-REVISIT &optional STAY ERROR)" nil nil)
-
-(autoload 'reftex-goto-label "reftex-ref" "\
-Prompt for a label (with completion) and jump to the location of this label.
-Optional prefix argument OTHER-WINDOW goes to the label in another window.
-
-\(fn &optional OTHER-WINDOW)" t nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-sel" "reftex-sel.el" 
"faea36cbe37033efd3f9063187eef7ee")
-;;; Generated autoloads from reftex-sel.el
-
-(autoload 'reftex-select-label-mode "reftex-sel" "\
-Major mode for selecting a label in a LaTeX document.
-This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
-selection process.
-To select a label, move the cursor to it and press RET.
-Press `?' for a summary of important key bindings.
-
-During a selection process, these are the local bindings.
-
-\\{reftex-select-label-mode-map}
-
-\(fn)" t nil)
-
-(autoload 'reftex-select-bib-mode "reftex-sel" "\
-Major mode for selecting a citation key in a LaTeX document.
-This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
-selection process.
-In order to select a citation, move the cursor to it and press RET.
-Press `?' for a summary of important key bindings.
-
-During a selection process, these are the local bindings.
-
-\\{reftex-select-label-mode-map}
-
-\(fn)" t nil)
-
-(autoload 'reftex-get-offset "reftex-sel" "\
-
-
-\(fn BUF HERE-AM-I &optional TYPEKEY TOC INDEX FILE)" nil nil)
-
-(autoload 'reftex-insert-docstruct "reftex-sel" "\
-
-
-\(fn BUF TOC LABELS INDEX-ENTRIES FILES CONTEXT COUNTER SHOW-COMMENTED 
HERE-I-AM XR-PREFIX TOC-BUFFER)" nil nil)
-
-(autoload 'reftex-find-start-point "reftex-sel" "\
-
-
-\(fn FALLBACK &rest LOCATIONS)" nil nil)
-
-(autoload 'reftex-select-item "reftex-sel" "\
-
-
-\(fn REFTEX-SELECT-PROMPT HELP-STRING KEYMAP &optional OFFSET CALL-BACK 
CB-FLAG)" nil nil)
-
-;;;***
-
-;;;### (autoloads nil "reftex-toc" "reftex-toc.el" 
"db9b727d89e2a6ff01986e7c6aff1058")
-;;; Generated autoloads from reftex-toc.el
-
-(autoload 'reftex-toc "reftex-toc" "\
-Show the table of contents for the current document.
-When called with a raw C-u prefix, rescan the document first.
-
-\(fn &optional REBUILD REUSE)" t nil)
-
-(autoload 'reftex-toc-recenter "reftex-toc" "\
-Display the TOC window and highlight line corresponding to current position.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" "\
-Toggle the automatic recentering of the TOC window.
-When active, leaving point idle will make the TOC window jump to the correct
-section.
-
-\(fn)" t nil)
-
-;;;***
-
-;;; End of automatically extracted autoloads.
-
 (provide 'reftex)
 
 ;;; reftex.el ends here
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 87f6718..b419db5 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -80,6 +80,9 @@ instead of the filename inheritance method."
          byserv (cdr-safe (assoc server
                                  (symbol-value url-basic-auth-storage))))
     (cond
+     ((and user pass)
+      ;; Explicit http://user:address@hidden/ URL.  Just return the 
credentials.
+      (setq retval (base64-encode-string (format "%s:%s" user pass))))
      ((and prompt (not byserv))
       (setq user (or
                  (url-do-auth-source-search server type :user)
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index df9cf62..1f8ddfd 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -119,41 +119,42 @@ telling Microsoft that."
 
 (defun url-cookie-store (name value &optional expires domain localpart secure)
   "Store a cookie."
-  (let ((storage (if secure url-cookie-secure-storage url-cookie-storage))
-       tmp found-domain)
-    ;; First, look for a matching domain.
-    (if (setq found-domain (assoc domain storage))
-       ;; Need to either stick the new cookie in existing domain storage
-       ;; or possibly replace an existing cookie if the names match.
-       (unless (dolist (cur (setq storage (cdr found-domain)) tmp)
-                 (and (equal localpart (url-cookie-localpart cur))
-                      (equal name (url-cookie-name cur))
-                      (progn
-                        (setf (url-cookie-expires cur) expires)
-                        (setf (url-cookie-value cur) value)
-                        (setq tmp t))))
-         ;; New cookie.
-         (setcdr found-domain (cons
-                               (url-cookie-create :name name
-                                                  :value value
-                                                  :expires expires
-                                                  :domain domain
-                                                  :localpart localpart
-                                                  :secure secure)
-                               (cdr found-domain))))
-      ;; Need to add a new top-level domain.
-      (setq tmp (url-cookie-create :name name
-                                  :value value
-                                  :expires expires
-                                  :domain domain
-                                  :localpart localpart
-                                  :secure secure))
-      (cond (storage
-            (setcdr storage (cons (list domain tmp) (cdr storage))))
-           (secure
-            (setq url-cookie-secure-storage (list (list domain tmp))))
-           (t
-            (setq url-cookie-storage (list (list domain tmp))))))))
+  (when (> (length name) 0)
+    (let ((storage (if secure url-cookie-secure-storage url-cookie-storage))
+          tmp found-domain)
+      ;; First, look for a matching domain.
+      (if (setq found-domain (assoc domain storage))
+          ;; Need to either stick the new cookie in existing domain storage
+          ;; or possibly replace an existing cookie if the names match.
+          (unless (dolist (cur (setq storage (cdr found-domain)) tmp)
+                    (and (equal localpart (url-cookie-localpart cur))
+                         (equal name (url-cookie-name cur))
+                         (progn
+                           (setf (url-cookie-expires cur) expires)
+                           (setf (url-cookie-value cur) value)
+                           (setq tmp t))))
+            ;; New cookie.
+            (setcdr found-domain (cons
+                                  (url-cookie-create :name name
+                                                     :value value
+                                                     :expires expires
+                                                     :domain domain
+                                                     :localpart localpart
+                                                     :secure secure)
+                                  (cdr found-domain))))
+        ;; Need to add a new top-level domain.
+        (setq tmp (url-cookie-create :name name
+                                     :value value
+                                     :expires expires
+                                     :domain domain
+                                     :localpart localpart
+                                     :secure secure))
+        (cond (storage
+               (setcdr storage (cons (list domain tmp) (cdr storage))))
+              (secure
+               (setq url-cookie-secure-storage (list (list domain tmp))))
+              (t
+               (setq url-cookie-storage (list (list domain tmp)))))))))
 
 (defun url-cookie-expired-p (cookie)
   "Return non-nil if COOKIE is expired."
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index c468a79..600a36d 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -26,32 +26,35 @@
 (require 'url-parse)
 
 (defun url-expander-remove-relative-links (name)
-  ;; Strip . and .. from pathnames
-  (let ((new (if (not (string-match "^/" name))
-                (concat "/" name)
-              name)))
-
-    ;; If it ends with a '/.' or '/..', tack on a trailing '/' sot hat
-    ;; the tests that follow are not too complicated in terms of
-    ;; looking for '..' or '../', etc.
-    (if (string-match "/\\.+$" new)
-       (setq new (concat new "/")))
-
-    ;; Remove '/./' first
-    (while (string-match "/\\(\\./\\)" new)
-      (setq new (concat (substring new 0 (match-beginning 1))
-                       (substring new (match-end 1)))))
-
-    ;; Then remove '/../'
-    (while (string-match "/\\([^/]*/\\.\\./\\)" new)
-      (setq new (concat (substring new 0 (match-beginning 1))
-                       (substring new (match-end 1)))))
-
-    ;; Remove cruft at the beginning of the string, so people that put
-    ;; in extraneous '..' because they are morons won't lose.
-    (while (string-match "^/\\.\\.\\(/\\)" new)
-      (setq new (substring new (match-beginning 1) nil)))
-    new))
+  (if (equal name "")
+      ;; An empty name is a properly valid relative URL reference/path.
+      ""
+    ;; Strip . and .. from pathnames
+    (let ((new (if (not (string-match "^/" name))
+                   (concat "/" name)
+                 name)))
+
+      ;; If it ends with a '/.' or '/..', tack on a trailing '/' sot hat
+      ;; the tests that follow are not too complicated in terms of
+      ;; looking for '..' or '../', etc.
+      (if (string-match "/\\.+$" new)
+          (setq new (concat new "/")))
+
+      ;; Remove '/./' first
+      (while (string-match "/\\(\\./\\)" new)
+        (setq new (concat (substring new 0 (match-beginning 1))
+                          (substring new (match-end 1)))))
+
+      ;; Then remove '/../'
+      (while (string-match "/\\([^/]*/\\.\\./\\)" new)
+        (setq new (concat (substring new 0 (match-beginning 1))
+                          (substring new (match-end 1)))))
+
+      ;; Remove cruft at the beginning of the string, so people that put
+      ;; in extraneous '..' because they are morons won't lose.
+      (while (string-match "^/\\.\\.\\(/\\)" new)
+        (setq new (substring new (match-beginning 1) nil)))
+      new)))
 
 (defun url-expand-file-name (url &optional default)
   "Convert URL to a fully specified URL, and canonicalize it.
@@ -89,8 +92,6 @@ path components followed by `..' are removed, along with the 
`..' itself."
   (cond
    ((= (length url) 0)                 ; nil or empty string
     (url-recreate-url default))
-   ((string-match "^#" url)            ; Offset link, use it raw
-    url)
    ((string-match url-nonrelative-link url) ; Fully-qualified URL, return it 
immediately
     url)
    (t
@@ -120,29 +121,24 @@ path components followed by `..' are removed, along with 
the `..' itself."
        (setf (url-host urlobj) (or (url-host urlobj) (url-host defobj))))
     (if (string= "ftp"  (url-type urlobj))
        (setf (url-user urlobj) (or (url-user urlobj) (url-user defobj))))
-    (if (string= (url-filename urlobj) "")
-       (setf (url-filename urlobj) "/"))
     ;; If the object we're expanding from is full, then we are now
     ;; full.
     (unless (url-fullness urlobj)
       (setf (url-fullness urlobj) (url-fullness defobj)))
-    (if (string-match "^/" (url-filename urlobj))
-       nil
-      (let ((query nil)
-           (file nil)
-           (sepchar nil))
-       (if (string-match "[?#]" (url-filename urlobj))
-           (setq query (substring (url-filename urlobj) (match-end 0))
-                 file (substring (url-filename urlobj) 0 (match-beginning 0))
-                 sepchar (substring (url-filename urlobj) (match-beginning 0) 
(match-end 0)))
-         (setq file (url-filename urlobj)))
+    (let* ((pathandquery (url-path-and-query urlobj))
+           (defpathandquery (url-path-and-query defobj))
+           (file (car pathandquery))
+           (query (or (cdr pathandquery) (and (equal file "") (cdr 
defpathandquery)))))
+      (if (string-match "^/" (url-filename urlobj))
+          (setq file (url-expander-remove-relative-links file))
        ;; We use concat rather than expand-file-name to combine
        ;; directory and file name, since urls do not follow the same
        ;; rules as local files on all platforms.
-       (setq file (url-expander-remove-relative-links
-                   (concat (url-file-directory (url-filename defobj)) file)))
-       (setf (url-filename urlobj)
-              (if query (concat file sepchar query) file))))))
+        (setq file (url-expander-remove-relative-links
+                    (if (equal file "")
+                        (or (car (url-path-and-query defobj)) "")
+                      (concat (url-file-directory (url-filename defobj)) 
file)))))
+      (setf (url-filename urlobj) (if query (concat file "?" query) file)))))
 
 (provide 'url-expand)
 
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index bafe3e5..6d2a5c2 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -269,7 +269,8 @@ A prefix arg makes KEEP-TIME non-nil."
        (error "Opening input file: No such file or directory, %s" url))
     (with-current-buffer buffer
       (setq handle (mm-dissect-buffer t)))
-    (mm-save-part-to-file handle newname)
+    (let ((mm-attachment-file-modes (default-file-modes)))
+      (mm-save-part-to-file handle newname))
     (kill-buffer buffer)
     (mm-destroy-parts handle)))
 (put 'copy-file 'url-file-handlers 'url-copy-file)
@@ -309,6 +310,7 @@ They count bytes from the beginning of the body."
 
 (defvar url-http-codes)
 
+;;;###autoload
 (defun url-insert-buffer-contents (buffer url &optional visit beg end replace)
   "Insert the contents of BUFFER into current buffer.
 This is like `url-insert', but also decodes the current buffer as
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 7367a1e..916f263 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1206,17 +1206,20 @@ the end of the document."
   "Retrieve URL via HTTP asynchronously.
 URL must be a parsed URL.  See `url-generic-parse-url' for details.
 
-When retrieval is completed, execute the function CALLBACK, passing it
-an updated value of CBARGS as arguments.  The first element in CBARGS
-should be a plist describing what has happened so far during the
-request, as described in the docstring of `url-retrieve' (if in
-doubt, specify nil).
+When retrieval is completed, execute the function CALLBACK,
+passing it an updated value of CBARGS as arguments.  The first
+element in CBARGS should be a plist describing what has happened
+so far during the request, as described in the docstring of
+`url-retrieve' (if in doubt, specify nil).  The current buffer
+then CALLBACK is executed is the retrieval buffer.
 
 Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a
 previous `url-http' call, which is being re-attempted.
 
 Optional arg GATEWAY-METHOD specifies the gateway to be used,
-overriding the value of `url-gateway-method'."
+overriding the value of `url-gateway-method'.
+
+The return value of this function is the retrieval buffer."
   (cl-check-type url vector "Need a pre-parsed URL.")
   (let* ((host (url-host (or url-using-proxy url)))
         (port (url-port (or url-using-proxy url)))
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index dbf0c38..c3159a7 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -59,8 +59,6 @@ where each of PATH and QUERY are strings or nil."
          (setq path  (substring name 0 (match-beginning 0))
                query (substring name (match-end 0)))
        (setq path name)))
-    (if (equal path "") (setq path nil))
-    (if (equal query "") (setq query nil))
     (cons path query)))
 
 (defun url-port-if-non-default (urlobj)
@@ -217,8 +215,7 @@ parses to
            (when (looking-at "#")
              (let ((opoint (point)))
                (forward-char 1)
-               (unless (eobp)
-                 (setq fragment (buffer-substring (point) (point-max))))
+                (setq fragment (buffer-substring (point) (point-max)))
                (delete-region opoint (point-max)))))
 
           (if (and host (string-match "%[0-9][0-9]" host))
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
new file mode 100644
index 0000000..ff6c88f
--- /dev/null
+++ b/test/lisp/dired-tests.el
@@ -0,0 +1,35 @@
+;;; dired-tests.el --- Test suite. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; 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/>.
+
+;;; Code:
+(require 'ert)
+(require 'dired)
+
+
+(ert-deftest dired-autoload ()
+  "Tests to see whether dired-x has been autoloaded"
+  (should
+   (fboundp 'dired-jump))
+  (should
+   (autoloadp
+    (symbol-function
+     'dired-jump))))
+
+(provide 'dired-tests)
+;; dired-tests.el ends here
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el 
b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index 915532b..3a181be 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -895,6 +895,12 @@ Subclasses to override slot attributes.")
 (ert-deftest eieio-test-37-obsolete-name-in-constructor ()
   (should (equal (eieio--testing "toto") '("toto" 2))))
 
+(ert-deftest eieio-autoload ()
+  "Tests to see whether reftex-auc has been autoloaded"
+  (should
+   (fboundp 'eieio--defalias)))
+
+
 (provide 'eieio-tests)
 
 ;;; eieio-tests.el ends here
diff --git a/test/lisp/htmlfontify-tests.el b/test/lisp/htmlfontify-tests.el
new file mode 100644
index 0000000..a5a92fa
--- /dev/null
+++ b/test/lisp/htmlfontify-tests.el
@@ -0,0 +1,34 @@
+;;; htmlfontify-tests.el --- Test suite. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; 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/>.
+
+;;; Code:
+(require 'ert)
+(require 'htmlfontify)
+
+(ert-deftest htmlfontify-autoload ()
+  "Tests to see whether reftex-auc has been autoloaded"
+  (should
+   (fboundp 'htmlfontify-load-rgb-file))
+  (should
+   (autoloadp
+    (symbol-function
+     'htmlfontify-load-rgb-file))))
+
+(provide 'htmlfontify-tests)
+;; htmlfontify-tests.el ends here
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
new file mode 100644
index 0000000..c813e71
--- /dev/null
+++ b/test/lisp/ibuffer-tests.el
@@ -0,0 +1,34 @@
+;;; ibuffer-tests.el --- Test suite. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; 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/>.
+
+;;; Code:
+(require 'ert)
+(require 'ibuffer)
+
+(ert-deftest ibuffer-autoload ()
+  "Tests to see whether reftex-auc has been autoloaded"
+  (should
+   (fboundp 'ibuffer-mark-unsaved-buffers))
+  (should
+   (autoloadp
+    (symbol-function
+     'ibuffer-mark-unsaved-buffers))))
+
+(provide 'ibuffer-tests)
+;; ibuffer-tests.el ends here
diff --git a/test/lisp/mail/rmail-tests.el b/test/lisp/mail/rmail-tests.el
new file mode 100644
index 0000000..ed481d0
--- /dev/null
+++ b/test/lisp/mail/rmail-tests.el
@@ -0,0 +1,35 @@
+;;; rmail-tests.el --- Test suite. -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; 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/>.
+
+;;; Code:
+(require 'ert)
+(require 'rmail)
+
+
+(ert-deftest rmail-autoload ()
+  "Tests to see whether reftex-auc has been autoloaded"
+  (should
+   (fboundp 'rmail-edit-current-message))
+  (should
+   (autoloadp
+    (symbol-function
+     'rmail-edit-current-message))))
+
+(provide 'rmail-tests)
+;; rmail-tests.el ends here
diff --git a/test/lisp/ps-print-tests.el b/test/lisp/ps-print-tests.el
new file mode 100644
index 0000000..67c3fbb
--- /dev/null
+++ b/test/lisp/ps-print-tests.el
@@ -0,0 +1,36 @@
+;;; ps-print-tests.el --- Test suite for ps-print.el  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Phillip Lord <address@hidden>
+
+;; 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/>.
+
+;;; Commentary:
+
+;;; Code:
+(require 'ps-print)
+(require 'ert)
+
+;;; Autoload tests
+(ert-deftest ps-mule-autoload ()
+  "Tests to see whether ps-mule has been autoloaded"
+  (should
+   (fboundp 'ps-mule-initialize))
+  (should
+   (autoloadp
+    (symbol-function
+     'ps-mule-initialize))))
diff --git a/test/lisp/textmodes/reftex-tests.el 
b/test/lisp/textmodes/reftex-tests.el
index 962e39f..a7af58f 100644
--- a/test/lisp/textmodes/reftex-tests.el
+++ b/test/lisp/textmodes/reftex-tests.el
@@ -204,5 +204,20 @@
     (should (string= (reftex-format-citation entry "%l:%A:%y:%t %j %P %a")
                      "Foo13:Jane Roe:2013:Some Article Some Journal 1 Jane 
Roe, John Doe \\& Jane Taxpayer"))))
 
+
+;;; Autoload tests
+
+;; Test to check whether reftex autoloading mechanisms are working
+;; correctly.
+(ert-deftest reftex-autoload-auc ()
+  "Tests to see whether reftex-auc has been autoloaded"
+  (should
+   (fboundp 'reftex-arg-label))
+  (should
+   (autoloadp
+    (symbol-function
+     'reftex-arg-label))))
+
+
 (provide 'reftex-tests)
 ;;; reftex-tests.el ends here.
diff --git a/test/lisp/url/url-expand-tests.el 
b/test/lisp/url/url-expand-tests.el
new file mode 100644
index 0000000..2bd2868
--- /dev/null
+++ b/test/lisp/url/url-expand-tests.el
@@ -0,0 +1,105 @@
+;;; url-expand-tests.el --- Test suite for relative URI/URL resolution.
+
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
+
+;; Author: Alain Schneble <address@hidden>
+;; Version: 1.0
+
+;; 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/>.
+
+;;; Commentary:
+
+;; Test cases covering URI reference resolution as described in RFC3986,
+;; section 5. Reference Resolution and especially the relative resolution
+;; rules specified in section 5.2. Relative Resolution.
+
+;; Each test calls `url-expand-file-name', typically with a relative
+;; reference URI and a base URI as string and compares the result (Actual)
+;; against a manually specified URI (Expected)
+
+;;; Code:
+
+(require 'url-expand)
+(require 'ert)
+
+(ert-deftest url-expand-file-name/relative-resolution-normal-examples ()
+  "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.1. Normal 
Examples"
+  (should (equal (url-expand-file-name "g:h"     "http://a/b/c/d;p?q";) "g:h"))
+  (should (equal (url-expand-file-name "g"       "http://a/b/c/d;p?q";) 
"http://a/b/c/g";))
+  (should (equal (url-expand-file-name "./g"     "http://a/b/c/d;p?q";) 
"http://a/b/c/g";))
+  (should (equal (url-expand-file-name "g/"      "http://a/b/c/d;p?q";) 
"http://a/b/c/g/";))
+  (should (equal (url-expand-file-name "/g"      "http://a/b/c/d;p?q";) 
"http://a/g";))
+  (should (equal (url-expand-file-name "//g"     "http://a/b/c/d;p?q";) 
"http://g";))
+  (should (equal (url-expand-file-name "?y"      "http://a/b/c/d;p?q";) 
"http://a/b/c/d;p?y";))
+  (should (equal (url-expand-file-name "g?y"     "http://a/b/c/d;p?q";) 
"http://a/b/c/g?y";))
+  (should (equal (url-expand-file-name "#s"      "http://a/b/c/d;p?q";) 
"http://a/b/c/d;p?q#s";))
+  (should (equal (url-expand-file-name "g#s"     "http://a/b/c/d;p?q";) 
"http://a/b/c/g#s";))
+  (should (equal (url-expand-file-name "g?y#s"   "http://a/b/c/d;p?q";) 
"http://a/b/c/g?y#s";))
+  (should (equal (url-expand-file-name ";x"      "http://a/b/c/d;p?q";) 
"http://a/b/c/;x";))
+  (should (equal (url-expand-file-name "g;x"     "http://a/b/c/d;p?q";) 
"http://a/b/c/g;x";))
+  (should (equal (url-expand-file-name "g;x?y#s" "http://a/b/c/d;p?q";) 
"http://a/b/c/g;x?y#s";))
+  (should (equal (url-expand-file-name ""        "http://a/b/c/d;p?q";) 
"http://a/b/c/d;p?q";))
+  (should (equal (url-expand-file-name "."       "http://a/b/c/d;p?q";) 
"http://a/b/c/";))
+  (should (equal (url-expand-file-name "./"      "http://a/b/c/d;p?q";) 
"http://a/b/c/";))
+  (should (equal (url-expand-file-name ".."      "http://a/b/c/d;p?q";) 
"http://a/b/";))
+  (should (equal (url-expand-file-name "../"     "http://a/b/c/d;p?q";) 
"http://a/b/";))
+  (should (equal (url-expand-file-name "../g"    "http://a/b/c/d;p?q";) 
"http://a/b/g";))
+  (should (equal (url-expand-file-name "../.."   "http://a/b/c/d;p?q";) 
"http://a/";))
+  (should (equal (url-expand-file-name "../../"  "http://a/b/c/d;p?q";) 
"http://a/";))
+  (should (equal (url-expand-file-name "../../g" "http://a/b/c/d;p?q";) 
"http://a/g";)))
+
+(ert-deftest url-expand-file-name/relative-resolution-absolute-examples ()
+  "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.2. 
Abnormal Examples"
+  (should (equal (url-expand-file-name "../../../g"    "http://a/b/c/d;p?q";) 
"http://a/g";))
+  (should (equal (url-expand-file-name "../../../../g" "http://a/b/c/d;p?q";) 
"http://a/g";))
+
+  (should (equal (url-expand-file-name "/./g"          "http://a/b/c/d;p?q";) 
"http://a/g";))
+  (should (equal (url-expand-file-name "/../g"         "http://a/b/c/d;p?q";) 
"http://a/g";))
+  (should (equal (url-expand-file-name "g."            "http://a/b/c/d;p?q";) 
"http://a/b/c/g.";))
+  (should (equal (url-expand-file-name ".g"            "http://a/b/c/d;p?q";) 
"http://a/b/c/.g";))
+  (should (equal (url-expand-file-name "g.."           "http://a/b/c/d;p?q";) 
"http://a/b/c/g..";))
+  (should (equal (url-expand-file-name "..g"           "http://a/b/c/d;p?q";) 
"http://a/b/c/..g";))
+
+  (should (equal (url-expand-file-name "./../g"        "http://a/b/c/d;p?q";) 
"http://a/b/g";))
+  (should (equal (url-expand-file-name "./g/."         "http://a/b/c/d;p?q";) 
"http://a/b/c/g/";))
+  (should (equal (url-expand-file-name "g/./h"         "http://a/b/c/d;p?q";) 
"http://a/b/c/g/h";))
+  (should (equal (url-expand-file-name "g/../h"        "http://a/b/c/d;p?q";) 
"http://a/b/c/h";))
+  (should (equal (url-expand-file-name "g;x=1/./y"     "http://a/b/c/d;p?q";) 
"http://a/b/c/g;x=1/y";))
+  (should (equal (url-expand-file-name "g;x=1/../y"    "http://a/b/c/d;p?q";) 
"http://a/b/c/y";))
+
+  (should (equal (url-expand-file-name "g?y/./x"       "http://a/b/c/d;p?q";) 
"http://a/b/c/g?y/./x";))
+  (should (equal (url-expand-file-name "g?y/../x"      "http://a/b/c/d;p?q";) 
"http://a/b/c/g?y/../x";))
+  (should (equal (url-expand-file-name "g#s/./x"       "http://a/b/c/d;p?q";) 
"http://a/b/c/g#s/./x";))
+  (should (equal (url-expand-file-name "g#s/../x"      "http://a/b/c/d;p?q";) 
"http://a/b/c/g#s/../x";))
+
+  (should (equal (url-expand-file-name "http:g"        "http://a/b/c/d;p?q";) 
"http:g")) ; for strict parsers
+  )
+
+(ert-deftest url-expand-file-name/relative-resolution-additional-examples ()
+  "Reference Resolution Examples / Arbitrary Examples"
+  (should (equal (url-expand-file-name "" "http://host/foobar";) 
"http://host/foobar";))
+  (should (equal (url-expand-file-name "?y"      "http://a/b/c/d";) 
"http://a/b/c/d?y";))
+  (should (equal (url-expand-file-name "?y"      "http://a/b/c/d/";) 
"http://a/b/c/d/?y";))
+  (should (equal (url-expand-file-name "?y#fragment"      
"http://a/b/c/d;p?q";) "http://a/b/c/d;p?y#fragment";))
+  (should (equal (url-expand-file-name "#bar" "http://host";) 
"http://host#bar";))
+  (should (equal (url-expand-file-name "#bar" "http://host/";) 
"http://host/#bar";))
+  (should (equal (url-expand-file-name "#bar" "http://host/foo";) 
"http://host/foo#bar";))
+  (should (equal (url-expand-file-name "foo#bar" "http://host/foobar";) 
"http://host/foo#bar";))
+  (should (equal (url-expand-file-name "foo#bar" "http://host/foobar/";) 
"http://host/foobar/foo#bar";)))
+
+(provide 'url-expand-tests)
+
+;;; url-expand-tests.el ends here
diff --git a/test/lisp/url/url-parse-tests.el b/test/lisp/url/url-parse-tests.el
new file mode 100644
index 0000000..154e091
--- /dev/null
+++ b/test/lisp/url/url-parse-tests.el
@@ -0,0 +1,167 @@
+;;; url-parse-tests.el --- Test suite for URI/URL parsing.
+
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
+
+;; Author: Alain Schneble <address@hidden>
+;; Version: 1.0
+
+;; 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/>.
+
+;;; Commentary:
+
+;; Test cases covering generic URI syntax as described in RFC3986,
+;; section 3. Syntax Components and 4. Usage. See also appendix
+;; A. Collected ABNF for URI, as the example given here are all
+;; productions of this grammar.
+
+;; Each tests parses a given URI string - whether relative or absolute -
+;; using `url-generic-parse-url' and compares the constructed
+;; URL-struct (Actual) against a manually `url-parse-make-urlobj'-
+;; constructed URL-struct (Expected).
+
+;;; Code:
+
+(require 'url-parse)
+(require 'ert)
+
+(ert-deftest url-generic-parse-url/generic-uri-examples ()
+  "RFC 3986, section 1.1.2. Examples / Example illustrating several URI 
schemes and variations in their common syntax components"
+  (should (equal (url-generic-parse-url "ftp://ftp.is.co.za/rfc/rfc1808.txt";) 
(url-parse-make-urlobj "ftp" nil nil "ftp.is.co.za" nil "/rfc/rfc1808.txt" nil 
nil t)))
+  (should (equal (url-generic-parse-url "http://www.ietf.org/rfc/rfc2396.txt";) 
(url-parse-make-urlobj "http" nil nil "www.ietf.org" nil "/rfc/rfc2396.txt" nil 
nil t)))
+  (should (equal (url-generic-parse-url 
"ldap://[2001:db8::7]/c=GB?objectClass?one";) (url-parse-make-urlobj "ldap" nil 
nil "[2001:db8::7]" nil "/c=GB?objectClass?one" nil nil t)))
+  (should (equal (url-generic-parse-url "mailto:address@hidden";) 
(url-parse-make-urlobj "mailto" nil nil nil nil "address@hidden" nil nil nil)))
+  (should (equal (url-generic-parse-url 
"news:comp.infosystems.www.servers.unix";) (url-parse-make-urlobj "news" nil nil 
nil nil "comp.infosystems.www.servers.unix" nil nil nil)))
+  (should (equal (url-generic-parse-url "tel:+1-816-555-1212") 
(url-parse-make-urlobj "tel" nil nil nil nil "+1-816-555-1212" nil nil nil)))
+  (should (equal (url-generic-parse-url "telnet://192.0.2.16:80/") 
(url-parse-make-urlobj "telnet" nil nil "192.0.2.16" 80 "/" nil nil t)))
+  (should (equal (url-generic-parse-url 
"urn:oasis:names:specification:docbook:dtd:xml:4.1.2") (url-parse-make-urlobj 
"urn" nil nil nil nil "oasis:names:specification:docbook:dtd:xml:4.1.2" nil nil 
nil))))
+
+(ert-deftest url-generic-parse-url/generic-uri ()
+  "RFC 3986, section 3. Syntax Components / generic URI syntax"
+  ;; empty path
+  (should (equal (url-generic-parse-url "http://host#";) (url-parse-make-urlobj 
"http" nil nil "host" nil "" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "?" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "?query" "fragment" nil t)))
+  ;; absolute path /
+  (should (equal (url-generic-parse-url "http://host/#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?query" "fragment" nil t)))
+  ;; absolute path /foo
+  (should (equal (url-generic-parse-url "http://host/foo#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "fragment" nil 
t)))
+  ;; absolute path /foo/
+  (should (equal (url-generic-parse-url "http://host/foo/#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "fragment" nil 
t)))
+  ;; absolute path /foo/bar
+  (should (equal (url-generic-parse-url "http://host/foo/bar#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "fragment" 
nil t)))
+  ;; absolute path /foo/bar/
+  (should (equal (url-generic-parse-url "http://host/foo/bar/#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "fragment" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?query#";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "" nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "fragment" nil 
t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?query#fragment";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "fragment" 
nil t)))
+  ;; for more examples of URIs without fragments, see tests covering section 
4.3. Absolute URI
+  )
+
+(ert-deftest url-generic-parse-url/network-path-reference ()
+  "RFC 3986, section 4.2. Relative Reference / network-path reference: a 
relative reference that begins with two slash characters"
+  (should (equal (url-generic-parse-url "//host") (url-parse-make-urlobj nil 
nil nil "host" nil "" nil nil t)))
+  (should (equal (url-generic-parse-url "//host/") (url-parse-make-urlobj nil 
nil nil "host" nil "/" nil nil t)))
+  (should (equal (url-generic-parse-url "//host/foo") (url-parse-make-urlobj 
nil nil nil "host" nil "/foo" nil nil t)))
+  (should (equal (url-generic-parse-url "//host/foo/bar") 
(url-parse-make-urlobj nil nil nil "host" nil "/foo/bar" nil nil t)))
+  (should (equal (url-generic-parse-url "//host/foo/bar/") 
(url-parse-make-urlobj nil nil nil "host" nil "/foo/bar/" nil nil t))))
+
+(ert-deftest url-generic-parse-url/absolute-path-reference ()
+  "RFC 3986, section 4.2. Relative Reference / absolute-path reference: a 
relative reference that begins with a single slash character"
+  (should (equal (url-generic-parse-url "/") (url-parse-make-urlobj nil nil 
nil nil nil "/" nil nil nil)))
+  (should (equal (url-generic-parse-url "/foo") (url-parse-make-urlobj nil nil 
nil nil nil "/foo" nil nil nil)))
+  (should (equal (url-generic-parse-url "/foo/bar") (url-parse-make-urlobj nil 
nil nil nil nil "/foo/bar" nil nil nil)))
+  (should (equal (url-generic-parse-url "/foo/bar/") (url-parse-make-urlobj 
nil nil nil nil nil "/foo/bar/" nil nil nil)))
+  (should (equal (url-generic-parse-url "/foo/bar#") (url-parse-make-urlobj 
nil nil nil nil nil "/foo/bar" "" nil nil)))
+  (should (equal (url-generic-parse-url "/foo/bar/#") (url-parse-make-urlobj 
nil nil nil nil nil "/foo/bar/" "" nil nil))))
+
+(ert-deftest url-generic-parse-url/relative-path-reference ()
+  "RFC 3986, section 4.2. Relative Reference / relative-path reference: a 
relative reference that does not begin with a slash character"
+  (should (equal (url-generic-parse-url "foo") (url-parse-make-urlobj nil nil 
nil nil nil "foo" nil nil nil)))
+  (should (equal (url-generic-parse-url "foo/bar") (url-parse-make-urlobj nil 
nil nil nil nil "foo/bar" nil nil nil)))
+  (should (equal (url-generic-parse-url "foo/bar/") (url-parse-make-urlobj nil 
nil nil nil nil "foo/bar/" nil nil nil)))
+  (should (equal (url-generic-parse-url "./foo") (url-parse-make-urlobj nil 
nil nil nil nil "./foo" nil nil nil)))
+  (should (equal (url-generic-parse-url "./foo/bar") (url-parse-make-urlobj 
nil nil nil nil nil "./foo/bar" nil nil nil)))
+  (should (equal (url-generic-parse-url "./foo/bar/") (url-parse-make-urlobj 
nil nil nil nil nil "./foo/bar/" nil nil nil)))
+  (should (equal (url-generic-parse-url "../foo") (url-parse-make-urlobj nil 
nil nil nil nil "../foo" nil nil nil)))
+  (should (equal (url-generic-parse-url "../foo/bar") (url-parse-make-urlobj 
nil nil nil nil nil "../foo/bar" nil nil nil)))
+  (should (equal (url-generic-parse-url "../foo/bar/") (url-parse-make-urlobj 
nil nil nil nil nil "../foo/bar/" nil nil nil)))
+  (should (equal (url-generic-parse-url "./this:that") (url-parse-make-urlobj 
nil nil nil nil nil "./this:that" nil nil nil)))
+  ;; for more examples of relative-path references, see tests covering section 
4.4. Same-Document Reference
+  )
+
+(ert-deftest url-generic-parse-url/absolute-uri ()
+  "RFC 3986, section 4.3. Absolute URI / absolute URI: absolute form of a URI 
without a fragment identifier"
+  ;; empty path
+  (should (equal (url-generic-parse-url "http://host";) (url-parse-make-urlobj 
"http" nil nil "host" nil "" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host?";) (url-parse-make-urlobj 
"http" nil nil "host" nil "?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "?query" nil nil t)))
+  ;; absolute path /
+  (should (equal (url-generic-parse-url "http://host/";) (url-parse-make-urlobj 
"http" nil nil "host" nil "/" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/?";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/?query" nil nil t)))
+  ;; absolute path /foo
+  (should (equal (url-generic-parse-url "http://host/foo";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" nil nil t)))
+  ;; absolute path /foo/
+  (should (equal (url-generic-parse-url "http://host/foo/";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" nil nil t)))
+  ;; absolute path /foo/bar
+  (should (equal (url-generic-parse-url "http://host/foo/bar";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" nil nil t)))
+  ;; absolute path /foo/bar/
+  (should (equal (url-generic-parse-url "http://host/foo/bar/";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" nil nil t)))
+  (should (equal (url-generic-parse-url "http://host/foo/bar/?query";) 
(url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" nil nil t)))
+  ;; example mentioned in RFC3986, section 5.4. Reference Resolution Examples
+  (should (equal (url-generic-parse-url "http://a/b/c/d;p?q";) 
(url-parse-make-urlobj "http" nil nil "a" nil "/b/c/d;p?q" nil nil t))))
+
+(ert-deftest url-generic-parse-url/same-decument-reference ()
+  "RFC 3986, section 4.4. Same-Document Reference / same-document reference: 
empty or number sign (\"#\") followed by a fragment identifier"
+  (should (equal (url-generic-parse-url "") (url-parse-make-urlobj nil nil nil 
nil nil "" nil nil nil)))
+  (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil 
nil nil nil "" "" nil nil)))
+  (should (equal (url-generic-parse-url "#foo") (url-parse-make-urlobj nil nil 
nil nil nil "" "foo" nil nil))))
+
+(provide 'url-parse-tests)
+
+;;; url-parse-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]