emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] xwidget_mvp f569bd4 1/2: Merge remote-tracking branch 'ori


From: Joakim Verona
Subject: [Emacs-diffs] xwidget_mvp f569bd4 1/2: Merge remote-tracking branch 'origin/master' into xwidget_mvp
Date: Thu, 30 Jul 2015 23:18:58 +0000

branch: xwidget_mvp
commit f569bd47da4745560ec06a8f5947e7fe570f6e90
Merge: 97cc85a 420b293
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    Merge remote-tracking branch 'origin/master' into xwidget_mvp
---
 .gitattributes                            |   19 +-
 .gitignore                                |    6 +-
 ChangeLog.2                               |  656 ++++++++++++++++++
 admin/gitmerge.el                         |    3 +-
 admin/merge-gnulib                        |    2 +-
 build-aux/gitlog-to-emacslog              |    2 +-
 doc/emacs/basic.texi                      |    6 +
 doc/emacs/emacs.texi                      |    2 +-
 doc/emacs/modes.texi                      |    6 +
 doc/emacs/mule.texi                       |   18 +-
 doc/emacs/rmail.texi                      |   11 +-
 doc/emacs/text.texi                       |   42 ++
 doc/lispref/display.texi                  |    5 +-
 doc/lispref/help.texi                     |   22 +-
 doc/lispref/nonascii.texi                 |    1 +
 doc/lispref/os.texi                       |   13 +-
 doc/lispref/tips.texi                     |   35 +-
 doc/misc/cc-mode.texi                     |   11 +-
 doc/misc/texinfo.tex                      |    3 +-
 etc/NEWS                                  |   67 ++-
 etc/edt-user.el                           |    2 +-
 lib-src/etags.c                           |    9 -
 lib/acl-internal.c                        |   31 +
 lib/acl-internal.h                        |   57 ++-
 lib/get-permissions.c                     |  280 ++++++++
 lib/gnulib.mk                             |   23 +-
 lib/inttypes.in.h                         |    4 +
 lib/qcopy-acl.c                           |  531 +---------------
 lib/{qset-acl.c => set-permissions.c}     |  806 +++++++++++++---------
 lib/string.in.h                           |   21 +-
 lisp/arc-mode.el                          |   31 +-
 lisp/calc/calc-help.el                    |   22 +-
 lisp/calc/calc-misc.el                    |    4 +-
 lisp/cedet/mode-local.el                  |   17 +-
 lisp/cedet/semantic/grammar-wy.el         |    4 +-
 lisp/cedet/semantic/wisent/wisent.el      |    8 +-
 lisp/cedet/srecode/texi.el                |    4 +-
 lisp/cus-theme.el                         |    6 +-
 lisp/descr-text.el                        |   15 +-
 lisp/desktop.el                           |   32 +-
 lisp/electric.el                          |  108 +++
 lisp/emacs-lisp/backquote.el              |    6 +-
 lisp/emacs-lisp/checkdoc.el               |   20 +-
 lisp/emacs-lisp/cl-generic.el             |    4 +-
 lisp/emacs-lisp/eieio-opt.el              |   20 +-
 lisp/emacs-lisp/eieio.el                  |    2 +-
 lisp/emacs-lisp/ert.el                    |   27 +-
 lisp/emacs-lisp/lisp-mode.el              |    8 +-
 lisp/emacs-lisp/macroexp.el               |    2 +-
 lisp/emacs-lisp/package.el                |   54 +-
 lisp/emacs-lisp/pcase.el                  |    4 +-
 lisp/emacs-lisp/tabulated-list.el         |    3 +-
 lisp/emulation/viper-cmd.el               |    2 +-
 lisp/erc/erc.el                           |    2 +-
 lisp/eshell/em-dirs.el                    |   12 +-
 lisp/eshell/esh-mode.el                   |    1 -
 lisp/faces.el                             |   20 +-
 lisp/files.el                             |  143 ++--
 lisp/finder.el                            |    2 +-
 lisp/gnus/gnus-art.el                     |    8 +-
 lisp/gnus/nnimap.el                       |    2 +-
 lisp/gnus/smime.el                        |    2 +-
 lisp/help-fns.el                          |   52 +-
 lisp/help-mode.el                         |    7 +-
 lisp/help.el                              |    5 +-
 lisp/ido.el                               |    4 +-
 lisp/info-look.el                         |   18 +-
 lisp/info.el                              |   24 +-
 lisp/international/mule-cmds.el           |   25 +-
 lisp/international/mule-diag.el           |   15 +-
 lisp/isearch.el                           |   23 +-
 lisp/language/ethio-util.el               |    6 +-
 lisp/ldefs-boot.el                        |  739 +++++++++++----------
 lisp/leim/quail/cyrillic.el               |    4 +-
 lisp/leim/quail/greek.el                  |    2 +-
 lisp/leim/quail/hebrew.el                 |    6 +-
 lisp/leim/quail/latin-alt.el              |  150 ++--
 lisp/leim/quail/latin-post.el             |   26 +-
 lisp/leim/quail/latin-pre.el              |   24 +-
 lisp/leim/quail/thai.el                   |    2 +-
 lisp/leim/quail/tibetan.el                |    2 +-
 lisp/leim/quail/viqr.el                   |    2 +-
 lisp/mail/rmail.el                        |    8 +-
 lisp/mail/rmailsum.el                     |   20 +-
 lisp/mail/sendmail.el                     |    7 +-
 lisp/net/tramp-sh.el                      |   36 +-
 lisp/net/tramp.el                         |  107 ++-
 lisp/net/trampver.el                      |   14 +
 lisp/obsolete/iso-acc.el                  |    4 +-
 lisp/obsolete/scribe.el                   |    8 +-
 lisp/obsolete/sregex.el                   |    2 +-
 lisp/obsolete/tpu-edt.el                  |    2 +-
 lisp/obsolete/tpu-mapper.el               |    2 +-
 lisp/org/ob-core.el                       |    2 +-
 lisp/org/org-agenda.el                    |    2 +-
 lisp/org/org.el                           |    6 +-
 lisp/progmodes/cc-langs.el                |    2 +-
 lisp/progmodes/cc-mode.el                 |   12 +-
 lisp/progmodes/cperl-mode.el              |    8 +-
 lisp/progmodes/elisp-mode.el              |   52 +-
 lisp/progmodes/etags.el                   |   49 +-
 lisp/progmodes/f90.el                     |   10 +-
 lisp/progmodes/grep.el                    |  108 ++--
 lisp/progmodes/idlwave.el                 |    4 +-
 lisp/progmodes/sh-script.el               |    2 +-
 lisp/progmodes/verilog-mode.el            |   76 +-
 lisp/progmodes/vhdl-mode.el               |    2 +-
 lisp/progmodes/xref.el                    |  127 ++--
 lisp/replace.el                           |   52 +-
 lisp/skeleton.el                          |    2 +-
 lisp/startup.el                           |  581 +++++++++--------
 lisp/term/xterm.el                        |  117 ++--
 lisp/textmodes/tex-mode.el                |    8 +-
 lisp/textmodes/texinfmt.el                |    6 +-
 lisp/textmodes/texinfo.el                 |    2 +-
 lisp/vc/ediff-help.el                     |   82 ++--
 lisp/vc/vc-dispatcher.el                  |   12 +-
 lisp/wid-edit.el                          |    2 +-
 m4/acl.m4                                 |   24 +-
 m4/gnulib-comp.m4                         |    8 +-
 m4/stdio_h.m4                             |   20 +-
 nt/emacs-x64.manifest                     |    7 +-
 nt/emacs-x86.manifest                     |    7 +-
 nt/gnulib.mk                              |   23 +-
 src/alloc.c                               |    8 +-
 src/buffer.c                              |    8 +-
 src/callint.c                             |    1 -
 src/ccl.c                                 |    4 -
 src/charset.c                             |    4 -
 src/cmds.c                                |    1 -
 src/coding.c                              |   14 +-
 src/composite.c                           |    1 -
 src/data.c                                |   34 +-
 src/dbusbind.c                            |   12 +-
 src/decompress.c                          |    1 -
 src/dispnew.c                             |    5 +-
 src/doc.c                                 |   48 ++-
 src/editfns.c                             |    7 -
 src/emacs.c                               |   13 +-
 src/eval.c                                |    1 -
 src/fileio.c                              |   35 +-
 src/fns.c                                 |    5 +-
 src/font.c                                |    5 -
 src/fontset.c                             |    1 -
 src/frame.c                               |    4 -
 src/ftfont.c                              |    1 -
 src/gfilenotify.c                         |    3 -
 src/gnutls.c                              |    2 -
 src/image.c                               |    2 -
 src/keyboard.c                            |    5 -
 src/keymap.c                              |    3 -
 src/lisp.h                                |    1 -
 src/lread.c                               |    5 +-
 src/macros.c                              |    2 -
 src/minibuf.c                             |    5 -
 src/nsfont.m                              |    1 -
 src/print.c                               |  107 ++-
 src/process.c                             |    4 +-
 src/term.c                                |   16 +-
 src/textprop.c                            |   18 +-
 src/unexmacosx.c                          |    5 +-
 src/w32fns.c                              |    8 +
 src/w32font.c                             |   32 +-
 src/w32font.h                             |    2 +-
 src/w32term.c                             |    8 +-
 src/window.c                              |    1 -
 src/xdisp.c                               |   26 +-
 src/xfaces.c                              |    8 -
 src/xfns.c                                |    9 +-
 src/xml.c                                 |    2 -
 src/xselect.c                             |    5 +-
 src/xterm.c                               |    4 +-
 test/automated/ert-x-tests.el             |    5 +-
 test/automated/f90.el                     |   25 +
 test/automated/file-notify-tests.el       |  195 +++---
 test/automated/package-test.el            |    8 +-
 test/automated/replace-tests.el           |   35 +
 test/automated/tramp-tests.el             |  106 +++-
 test/automated/vc-tests.el                |  130 ++--
 test/etags/CTAGS.good                     |   15 +
 test/etags/ETAGS.good_1                   |  117 ++--
 test/etags/ETAGS.good_2                   |  133 +++--
 test/etags/ETAGS.good_3                   |  133 +++--
 test/etags/ETAGS.good_4                   |  117 ++--
 test/etags/ETAGS.good_5                   |  149 +++--
 test/etags/{ETAGS.good_5 => ETAGS.good_6} |  533 ++++++++-------
 test/etags/Makefile                       |    5 +-
 test/etags/c-src/dostorture.c             |  107 +++
 test/etags/cp-src/c.C                     |    2 +-
 test/etags/cp-src/x.cc                    |   26 +
 test/etags/html-src/algrthms.html         | 1038 ++++++++++++++--------------
 191 files changed, 5546 insertions(+), 3880 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index c3bbf66..21af4e6 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -19,13 +19,16 @@
 
 # A few files use CRLF endings, even on non-Microsoft platforms.
 # Do not warn about trailing whitespace with these files.
-*.bat -whitespace
-admin/charsets/mapfiles/PTCP154 -whitespace
-leim/MISC-DIC/cangjie-table.b5 -whitespace
-leim/MISC-DIC/cangjie-table.cns -whitespace
-leim/MISC-DIC/pinyin.map -whitespace
-lib-src/update-game-score.exe.manifest -whitespace
-nt/nmake.defs -whitespace
+*.bat whitespace=cr-at-eol
+admin/charsets/mapfiles/PTCP154 whitespace=cr-at-eol
+leim/MISC-DIC/cangjie-table.b5 whitespace=cr-at-eol
+leim/MISC-DIC/cangjie-table.cns whitespace=cr-at-eol
+leim/MISC-DIC/pinyin.map whitespace=cr-at-eol
+lib-src/update-game-score.exe.manifest whitespace=cr-at-eol
+nt/nmake.defs whitespace=cr-at-eol
+test/etags/c-src/dostorture.c whitespace=cr-at-eol
+test/etags/cp-src/c.C whitespace=cr-at-eol
+test/etags/html-src/algrthms.html whitespace=cr-at-eol
 
 # The upstream maintainer does not want to remove trailing whitespace.
 doc/misc/texinfo.tex -whitespace=blank-at-eol
@@ -40,4 +43,4 @@ doc/misc/texinfo.tex -whitespace=blank-at-eol
 *.png binary
 *.sig binary
 *.tiff binary
-test/automated/data/decompress/foo-gzipped binary
+etc/e/eterm-color binary
diff --git a/.gitignore b/.gitignore
index 2f47e3c..d7be846 100644
--- a/.gitignore
+++ b/.gitignore
@@ -155,6 +155,7 @@ test/etags/CTAGS
 
 # ctags, etags.
 TAGS
+!admin/notes/tags
 
 # GNU global.
 GPATH
@@ -207,7 +208,7 @@ lisp/international/uni-*.el
 *.dvi
 *.fn
 *.fns
-*.html
+doc/*/*.html
 !test/etags/html-src/*.html
 *.info
 *.ky
@@ -223,8 +224,7 @@ lisp/international/uni-*.el
 *.pgs
 *.pj
 *.pjs
-*.ps
-!test/etags/ps-src/*.ps
+doc/*/*.ps
 *.sc
 *.scs
 *.t2d/
diff --git a/ChangeLog.2 b/ChangeLog.2
index b612b52..115ccda 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,659 @@
+2015-05-30  Dmitry Gutov  <address@hidden>
+
+       Make sure there's no explicit tag name
+       * lisp/progmodes/etags.el (tag-implicit-name-match-p): Make sure
+       there's no explicit tag name (bug#20629).
+
+2015-05-30  Paul Eggert  <address@hidden>
+
+       Remove format2
+       * src/editfns.c, src/lisp.h (format2): Remove.
+       It is more trouble than it's worth, now that we have CALLN.
+       This is just a minor refactoring.
+       * src/buffer.c (Fkill_buffer):
+       * src/dbusbind.c (XD_OBJECT_TO_STRING):
+       * src/fileio.c (barf_or_query_if_file_exists):
+       Adjust to format2 going away.
+
+       Don't misencode C-generated messages
+       Also, be more consistent about calls to 'Fmessage' vs 'message'.
+       * src/alloc.c (Fgc_status):
+       Prefer AUTO_STRING to build_string for Fmessage call.
+       * src/data.c (Fmake_variable_buffer_local)
+       (Fmake_local_variable, Fmake_variable_frame_local):
+       * src/doc.c (store_function_docstring):
+       Use Fmessage, not message, since the argument can contain
+       non-ASCII characters, and this can cause the resulting message
+       to be incorrectly encoded for the current environment.
+       * src/fns.c (maybe_resize_hash_table):
+       * src/xselect.c (x_clipboard_manager_save_all):
+       Use message, not Fmessage, since Fmessage's power isn't needed here.
+       * src/process.c (Fmake_network_process): Reword message to avoid %s.
+       * src/xdisp.c (vmessage): Document restrictions on message contents.
+       (message_nolog) [false]: Remove unused code.
+
+       Use \r rather than ^M in string literals
+       This is less likely to cause problems on platforms that
+       use CRLF (or CR!) termination for lines.
+
+       Update .gitattributes to match current sources
+       http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00879.html
+       * .gitattributes: Accommodate tests that insist on DOS format.
+       Remove test/automated/data/decompress/foo-gzipped.
+       Add etc/e/eterm-color.
+
+2015-05-30  Eli Zaretskii  <address@hidden>
+
+       Document 'face-ignored-fonts'
+       * doc/emacs/mule.texi (Modifying Fontsets): Document
+       face-ignored-fonts.  (Bug#20628)
+
+       Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
+
+       Add etags test for the new -Q option
+       * test/etags/ETAGS.good_1, test/etags/ETAGS.good_2:
+       * test/etags/ETAGS.good_3, test/etags/ETAGS.good_4:
+       * test/etags/ETAGS.good_5, test/etags/CTAGS.good: Adjust to
+       test-case changes below.
+       * test/etags/ETAGS.good_6: New file.
+       * test/etags/cp-src/x.cc: New file.
+       * test/etags/Makefile (CPSRC): Add x.cc.
+       (check): Add one more test, for -Q.
+
+2015-05-30  Dmitry Gutov  <address@hidden>
+
+       Use list for the tags completion table, not obarray
+       * lisp/progmodes/etags.el (etags-tags-completion-table): Return a
+       list instead of an obarray
+       (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00876.html).
+       (tags-completion-table): Combine those lists.
+       (tags-completion-table): Update the docstring.
+
+2015-05-30  Eli Zaretskii  <address@hidden>
+
+       Restore EOL format testing in etags
+       * test/etags/ETAGS.good_1, test/etags/ETAGS.good_2:
+       * test/etags/ETAGS.good_3, test/etags/ETAGS.good_4:
+       * test/etags/ETAGS.good_5, test/etags/CTAGS.good: Adjust to
+       test-case changes below.
+       * test/etags/html-src/algrthms.html: Convert back to DOS EOL format.
+       * test/etags/cp-src/c.C (B): Add back stray CR character.
+       * test/etags/c-src/dostorture.c: Add back.
+       * test/etags/Makefile (CSRC): Add back c-src/dostorture.c.
+
+2015-05-30  Vitaly Takmazov  <address@hidden>  (tiny change)
+
+       Declare Emacs on MS-Windows to be DPI-aware
+       * nt/emacs-x86.manifest (asmv3:windowsSettings): Add dpiAware.
+       * nt/emacs-x64.manifest (asmv3:windowsSettings): Add dpiAware.
+       This avoids Windows entering compatibility mode for Emacs,
+       which causes fonts to look less nice.
+
+2015-05-30  Michael Albinus  <address@hidden>
+
+       Improve Tramp traces.
+       * lisp/net/trampver.el (tramp-repository-get-version): New defun.
+       * lisp/net/tramp.el (tramp-debug-message): Use it.
+
+2015-05-30  Paul Eggert  <address@hidden>
+
+       backup-buffer minor reworking of internals
+       * lisp/files.el (backup-buffer): Rework to avoid a couple of
+       unused locals inadvertently introduced in the previous change.
+
+       backup-buffer now reports .emacs.d/%backup% ills
+       * lisp/files.el (backup-buffer): If the write to .emacs.d/%backup%
+       fails due to disk space exhaustion or whatever, do not pretend
+       that it succeeded.  More generally, do a better job of checking
+       for I/O failures, and limit the scope of the condition-case to
+       just the operations where file errors should be caught and ignored
+       (Bug#20595).  Also, don't bother trying to delete later backups if
+       an earlier deletion fails, as this is a sign of trouble and it's
+       better to stop when there's trouble.
+
+       copy-file now truncates output after writing
+       * src/fileio.c (Fcopy_file): Truncate output after writing rather
+       than before.  This is more likely to work than truncation before
+       writing, if the file system is out of space or the user is over
+       disk quota (Bug#20595).  Also, check for read errors.
+
+2015-05-29  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Don't load from parent dir
+       (package-load-all-descriptors): Don't load descriptors from
+       directories above the package directories.
+
+2015-05-29  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+       This incorporates the following (Bug#20681):
+       2015-05-29 acl-permissions: Fix build on Mac OS X and older AIX
+       2015-05-29 acl-permissions: Fix build on Solaris and Cygwin
+       * lib/set-permissions.c: Copy from gnulib.
+
+2015-05-29  Michael Albinus  <address@hidden>
+
+       Improve Tramp traces.
+       * lisp/net/tramp.el (tramp-call-process-region): New defun.
+       * lisp/net/tramp-sh.el (tramp-get-inline-coding): Use it.
+
+2015-05-29  Glenn Morris  <address@hidden>
+
+       * test/automated/vc-tests.el: Try enabling tests on hydra.nixos.org.
+
+2015-05-29  Wolfgang Jenkner  <address@hidden>
+
+       * src/xfns.c (x_set_menu_bar_lines): Fix calls to x_clear_area.
+       The signature was changed in the cairo branch, merged on 2015-05-23.
+       This oversight broke compiling only the non-toolkit X version.
+
+2015-05-29  Samer Masterson  <address@hidden>
+
+       * doc/lispref/os.texi: Update initial-buffer-choice docs.
+
+2015-05-29  Glenn Morris  <address@hidden>
+
+       * test/automated/vc-tests.el (vc-test-rcs04-checkout-model):
+       Mark as an expected failure.
+
+2015-05-29  Paul Eggert  <address@hidden>
+
+       Change package test to look for curved quotes
+       * test/automated/package-test.el (package-test-describe-package)
+       (package-test-signed): Search for curved single quotes as well as
+       for grave accent and apostrophe.
+
+2015-05-28  Katsumi Yamaoka  <address@hidden>
+
+       gnus-art.el: Re-revert last change
+       * lisp/gnus/gnus-art.el (gnus-button-alist): Re-revert last change.
+       cf. <http://news.gmane.org/group/gmane.emacs.devel/thread=186896>
+
+2015-05-28  Samer Masterson  <address@hidden>
+
+       Show files when `initial-buffer-choice' is non-nil
+       * startup.el (command-line-1): When Emacs is given a file as an
+       argument and `initial-buffer-choice' is non-nil, display both the file
+       and `initial-buffer-choice'.  For more than one file, show
+       `initial-buffer-choice' and *Buffer List*.  Refactor display-changing
+       commands out of the command line arg parser.
+       (initial-buffer-choice): Clarify docstring.
+
+2015-05-28  Eli Zaretskii  <address@hidden>
+
+       Fix last commit
+       * nt/gnulib.mk (libgnu_a_SOURCES): Add get-permissions.c back.
+       (gnulib module qcopy-acl): Add back, as it is harmless.  This
+       minimizes differences wrt lib/gnulib.mk.
+
+       Fix the MS-Windows build as followup to gnulib update
+       * nt/gnulib.mk (libgnu_a_SOURCES): Remove get-permissions.c and
+       set-permissions.c, as they don't compile on MinGW.
+       (gnulib module qcopy-acl): Remove, as it needs set-permissions.c.
+
+2015-05-28  Paul Eggert  <address@hidden>
+
+       Revert my change to gnus-art.el
+       * lisp/gnus/gnus-art.el (gnus-button-alist): Revert last change.
+       It wasn't that important, and it caused a Gnus build to fail.  See:
+       http://www.randomsample.de:4456/builders/emacs-devel/builds/734
+
+       New minor mode Electric Quote
+       This lets you easily insert quotes ‘like this’ by typing
+       quotes `like this', and similarly you can easily insert
+       quotes “like this” by typing quotes ``like this'' (Bug#20545).
+       * doc/emacs/basic.texi (Inserting Text):
+       * doc/emacs/modes.texi (Minor Modes):
+       * etc/NEWS: Document it.
+       * doc/emacs/text.texi (Quotation Marks): New section.
+       * lisp/electric.el (electric-quote-comment)
+       (electric-quote-string, electric-quote-paragraph):
+       New custom vars.
+       (electric--insertable-p)
+       (electric-quote-post-self-insert-function): New functions.
+       (electric-quote-mode, electric-quote-local-mode): New minor modes.
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
+       Add curved single quotes to electric-pair-text-pairs.
+       Set electric-quote-string in this buffer.
+
+       A few more doc string fixes (Bug#20385)
+
+       Accept curved quotes in doc strings
+       * lisp/info-look.el (info-lookup-guess-custom-symbol):
+       (info-lookup-alist): Treat ‘’ like `' when parsing help buffers etc.
+
+       Generate curved quotes in pseudo-info nodes
+       * lisp/info.el (Info-virtual-index-find-node)
+       (Info-virtual-index, Info-apropos-find-node, info-apropos):
+       Quote ‘like this’, not `like this', when generating pseudo-info nodes.
+
+       Fix minor quoting problems in doc strings
+       Most of these fixes involve escaping grave accents that are
+       actually intended to be grave accents, not left quotes.
+       (Bug#20385)
+
+       Support curved quotes in doc strings
+       Emacs's traditional doc string style has been to quote symbols
+       `like this'.  This worked well on now-obsolete terminals where
+       ` and ' were symmetric quotes, but nowadays curved quotes
+       ‘like this’ look better.  Support quoting the new way too.
+       (Bug#20385)
+       * doc/lispref/tips.texi (Documentation Tips): Symbols can be quoted
+       ‘like-this’ as well as `like-this'.
+       * etc/NEWS: Mention this.
+       * lisp/cedet/mode-local.el (overload-docstring-extension)
+       (mode-local-print-binding, mode-local-describe-bindings-2):
+       * lisp/cus-theme.el (describe-theme-1):
+       * lisp/descr-text.el (describe-text-properties-1, describe-char):
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
+       * lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
+       * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
+       (eieio-help-constructor):
+       * lisp/emacs-lisp/package.el (describe-package-1):
+       * lisp/faces.el (describe-face):
+       * lisp/help-fns.el (help-fns--key-bindings)
+       (help-fns--compiler-macro, help-fns--parent-mode, help-fns--obsolete):
+       (help-fns--interactive-only, describe-function-1):
+       (describe-variable):
+       * lisp/help.el (describe-mode):
+       * lisp/international/mule-cmds.el (describe-input-method)
+       (describe-language-environment):
+       * lisp/international/mule-diag.el (describe-character-set)
+       (print-coding-system-briefly, list-input-methods)
+       (list-input-methods-1):
+       Insert curved quotes rather than grave accent and apostrophe.
+       * lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
+       (checkdoc-proper-noun-region-engine):
+       * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2)
+       (lisp-cl-font-lock-keywords-2):
+       * lisp/finder.el (finder-font-lock-keywords):
+       * lisp/gnus/gnus-art.el (gnus-button-alist):
+       * lisp/help-fns.el (help-do-arg-highlight)
+       (describe-function-1, describe-variable):
+       * lisp/help-mode.el (help-xref-symbol-regexp)
+       (help-xref-info-regexp, help-xref-url-regexp):
+       * lisp/help.el (describe-mode):
+       * lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
+       * lisp/wid-edit.el (widget-documentation-link-regexp):
+       Parse symbols quoted ‘like-this’ as well as `like-this'.
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
+       Add "‘" and "’" to electric-pair-text-pairs.
+       (elisp--form-quoted-p): Also allow "‘" as a quoting char.
+       (elisp-completion-at-point, elisp--preceding-sexp):
+       Also treat "‘" and "’" as quoting chars.
+
+       substitute-command-keys now curves quotes
+       So, for example, it turns "`abc'" into "‘abc’" (Bug#20385).
+       * doc/lispref/help.texi (Keys in Documentation):
+       * etc/NEWS: Document this.
+       * src/doc.c (Fsubstitute_command_keys): Implement it.
+
+2015-05-28  Glenn Morris  <address@hidden>
+
+       * lisp/mail/rmailsum.el (rmail-summary-by-recipients)
+       (rmail-summary-by-topic, rmail-summary-by-senders):
+       No longer strip leading/trailing whitespace.
+
+       * lisp/progmodes/f90.el (f90-type-def-re): Add "type, extends".
+       (f90-no-block-limit): Add "enum".  (Bug#20680)
+       * test/automated/f90.el (f90-test-bug20680, f90-test-bug20680b):
+       New tests.
+
+2015-05-27  Stefan Monnier  <address@hidden>
+
+       * lisp/isearch.el (isearch--current-buffer): Give a default value.
+
+       Un-revert changes mistakenly dropped by f9fabb2b
+
+2015-05-27  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+       This incorporates:
+       2015-05-27 qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
+       2015-05-27 file-has-acl: Split feature tests again (Bug#20667)
+       2015-05-27 string: fix build failure on BSD/OSX with FORTIFY_SOURCE
+       2015-05-26 stdio: limit __gnu_printf__ witness to gcc 4.4+
+       2015-05-26 inttypes: force correct mingw PRIdMAX even without <stdio.h>
+       2015-05-26 stdio: fix probe on mingw under gcc 5.1
+       * admin/merge-gnulib (GNULIB_MODULES):
+       Replace qacl with qcopy-acl, since we don't need the rest of qacl.
+       * doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
+       * lib/inttypes.in.h, lib/qcopy-acl.c, lib/qset-acl.c:
+       * lib/string.in.h, m4/acl.m4, m4/stdio_h.m4:
+       Get latest versions from gnulib.
+       * lib/get-permissions.c, lib/set-permissions.c: New files.
+       * lib/gnulib.mk, m4/gnulib-comp.m4:
+       Regenerate.
+       * nt/gnulib.mk: Merge lib/gnulib.mk changes by hand.
+
+2015-05-27  Dmitry Gutov  <address@hidden>
+
+       Delete the old process in vc-setup-buffer
+       * lisp/vc/vc-dispatcher.el (vc-setup-buffer): Delete the old
+       process here.
+       (vc-do-command): Rather than here (bug#20608).
+
+2015-05-27  Ivan Shmakov  <address@hidden>
+
+       Avoid gratuitous delete-dups in face-at-point.
+       * lisp/faces.el (face-at-point): Do not compute the properly
+       ordered, duplicate-free list if only a single value is
+       requested anyway.  (Bug#20519)
+
+       Show the exact C-x 8 RET invocation in describe-char.
+       * lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
+       invocation instead of a template.  (Bug#20522)
+
+2015-05-27  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Don't erase tags on refresh
+       (package-menu--post-refresh): Call `tabulated-list-print' with the
+       UPDATE argument.  This only affects the refresh action, the revert
+       action still erases tags.
+       (package-menu-get-status): Change `assq' to `assoc'.
+       (package-menu--mark-upgrades-1): New function.
+       (package-menu--mark-upgrades-pending): New variable.
+       (package-menu-mark-upgrades): Use them to delay marking until
+       after refresh is done.
+       (package-menu--post-refresh): Call mark-upgrades-1 if
+       mark-upgrades-pending is non-nil.
+
+2015-05-27  Michael Albinus  <address@hidden>
+
+       Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
+       Conflicts:
+               lisp/net/tramp.el
+
+       Fix typo in commit 3953c4be2816537be95520605d45b866dc731f4b
+
+2015-05-27  Eli Zaretskii  <address@hidden>
+
+       Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
+
+2015-05-27  Stefan Monnier  <address@hidden>
+
+       * lisp/isearch.el (isearch--current-buffer): New var
+       (isearch-update): Set cursor-sensor-inhibit here.
+       (isearch-done): Unset cursor-sensor-inhibit in the right buffer 
(bug#20532).
+
+       Change inhibit-point-motion-hooks to t
+       * src/textprop.c (syms_of_textprop): Default Vinhibit_point_motion_hooks
+       to t and document it as obsolete.
+
+2015-05-27  Eli Zaretskii  <address@hidden>
+
+       Support ZIP files that use Zip64 extensions
+       * lisp/arc-mode.el (archive-zip-summarize): Handle the new ZIP
+       format of central directory offsets used by Zip64 extensions.
+       (Bug#20665)
+
+2015-05-27  Michael Albinus  <address@hidden>
+
+       New test tramp-test30-make-auto-save-file-name
+       * tramp-tests.el (tramp-test30-make-auto-save-file-name): New test.
+       (tramp-test31-special-characters)
+       (tramp-test31-special-characters-with-stat)
+       (tramp-test31-special-characters-with-perl)
+       (tramp-test31-special-characters-with-ls, tramp-test32-utf8)
+       (tramp-test32-utf8-with-stat, tramp-test32-utf8-with-perl)
+       (tramp-test32-utf8-with-ls, tramp-test33-asynchronous-requests)
+       (tramp-test34-recursive-load, tramp-test35-unload): Rename.
+
+       Improve tramp-handle-make-auto-save-file-name
+       * tramp.el (tramp-auto-save-directory): Add :tags.
+       (tramp-handle-make-auto-save-file-name): Let native
+       `make-auto-save-file-name' use `auto-save-file-name-transforms',
+       if `tramp-auto-save-directory' is not set.
+
+2015-05-27  Glenn Morris  <address@hidden>
+
+       No longer set dired-directory in eshell.  (Bug#16477)
+       * lisp/eshell/esh-mode.el (eshell-mode):
+       * lisp/eshell/em-dirs.el (eshell/cd): No longer set dired-directory.
+
+       * lisp/mail/sendmail.el (mail-position-on-field): Doc fix.
+
+       Make c-submit-bug-report file reports at debbugs.gnu.org.  (Bug#15784)
+       * lisp/progmodes/cc-mode.el (c-mode-help-address):
+       Change to address@hidden
+       (c-mode-bug-package): New constant.
+       (mail-position-on-field): Declare.
+       (c-submit-bug-report): Insert X-Debbugs-Package header.
+       * doc/misc/cc-mode.texi (Mailing Lists and Bug Reports):
+       Mention debbugs.gnu.org.
+
+2015-05-26  Glenn Morris  <address@hidden>
+
+       * lisp/mail/rmailsum.el: Commas no longer separate regexps.  (Bug#19026)
+       (rmail-summary-by-recipients, rmail-summary-by-topic)
+       (rmail-summary-by-senders): No longer use mail-comma-list-regexp.
+       * doc/emacs/rmail.texi (Rmail Make Summary): Update for this change.
+
+2015-05-26  Paul Eggert  <address@hidden>
+
+       Handle curved quotes in info files
+       * lisp/calc/calc-help.el (calc-describe-thing):
+       * lisp/info.el (Info-find-index-name)
+       (Info-try-follow-nearest-node, Info-fontify-node):
+       * lisp/vc/ediff-help.el (ediff-help-for-quick-help):
+       In info files, process quotes ‘like this’ the same way we process
+       quotes `like this'.  This catches a few places we missed earlier.
+
+2015-05-26  Dmitry Gutov  <address@hidden>
+
+       xref-prompt-for-identifier: Use a list value
+       * lisp/progmodes/xref.el (xref-prompt-for-identifier): Allow list
+       value, to be interpreted as a list of commands.
+       (xref--prompt-p): New function.
+       (xref--read-identifier): Use it.
+
+2015-05-26  Eli Zaretskii  <address@hidden>
+
+       Teach MS-Windows font back-end return per-glyph ascent/descent
+       * src/w32font.h (struct w32_metric_cache): Add ascent and descent
+       values.
+       * src/w32font.c (w32font_text_extents): Compute, cache, and
+       accumulate per-glyph ascent and descent values, instead of copying
+       global values from the font.  If the values are not available from
+       the font data, i.e., non-TTF fonts, fall back on font-global values.
+       (compute_metrics): Compute and return per-glyph ascent and descent
+       values, if returned by GetGlyphOutlineW, falling back on
+       font-global values.  (Bug#20628)
+       * src/w32term.c (w32_draw_rectangle): Add 1 pixel to width and
+       height of rectangle to be drawn, to be compatible with
+       XDrawRectangle.  Fixes glyphless-char display as hex codes in a
+       box, when per-glyph ascent/descent values are used.
+
+2015-05-26  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/tabulated-list.el: Don't sort without sorter
+       (tabulated-list-print): Don't sort if sorter is nil
+
+2015-05-26  Michael Albinus  <address@hidden>
+
+       Fix Bug#20621
+       * lisp/net/tramp-sh.el (tramp-set-auto-save): Remove it.  There
+       are major modes which set `auto-save-mode' on their own rules;
+       Tramp shall not overwrite such settings.
+       (Bug#20621)
+
+2015-05-26  Glenn Morris  <address@hidden>
+
+       * lisp/desktop.el: If modes aren't autoloaded, try simple guesswork.
+       (desktop-load-file): Guess that "foobar" defines "foobar-mode".
+       (desktop-buffer-mode-handlers, desktop-minor-mode-handlers):
+       Doc updates.
+       (vc-dir-mode): Remove unnecessary autoload.
+
+2015-05-25  Philipp Stephani  <address@hidden>
+
+       * lisp/term/xterm.el: Add gui-get-selection support via OSC-52
+       (xterm--extra-capabilities-type): Add `getSelection'.
+       (xterm--query): Add `no-async' argument.
+       (xterm--init-activate-get-selection): New function.
+       (terminal-init-xterm): Use it.
+       (xterm--init-modify-other-keys): Rename from
+       terminal-init-xterm-modify-other-keys.
+       (xterm--init-bracketed-paste-mode): Rename from
+       terminal-init-xterm-bracketed-paste-mode.
+       (xterm--init-activate-set-selection): Rename from
+       terminal-init-xterm-activate-set-selection.
+       (xterm--selection-char): New function.
+       (gui-backend-set-selection): Use it.  Use the &context to only apply
+       this method in terminals where we enabled the feature.
+       (gui-backend-get-selection): New method.
+
+2015-05-25  Daniel Colascione  <address@hidden>
+
+       Add C-language keyword constants to C++
+       * lisp/progmodes/cc-langs.el (c-constant-kwds): Add C-language
+       keyword constants to C++.
+
+2015-05-25  Paul Eggert  <address@hidden>
+
+       Make TAGS files more portable to MS-Windows
+       * etc/NEWS: Document this.
+       * lib-src/etags.c (readline_internal) [DOS_NT]:
+       Don't treat CRs differently from GNUish hosts.
+       * lisp/progmodes/etags.el (etags-goto-tag-location):
+       Adjust STARTPOS to account for the skipped CRs in dos-style files.
+
+2015-05-25  Michael Albinus  <address@hidden>
+
+       Improve fix of debbugs:20634 in tramp-sh.el
+
+2015-05-25  Eli Zaretskii  <address@hidden>
+
+       Fix a typo in last commit
+       * lib-src/etags.c (C_entries): Fix a typo.
+       * test/etags/ETAGS.good_1:
+       * test/etags/ETAGS.good_2:
+       * test/etags/ETAGS.good_3:
+       * test/etags/ETAGS.good_4:
+       * test/etags/ETAGS.good_5:
+       * test/etags/CTAGS.good: Update due to the change in etags.c.
+
+       Fix tagging of class members in C-like OO languages
+       * lib-src/etags.c (longopts): Add new option --class-qualify and
+       its shorthand -Q.
+       (print_help): Add help text for --class-qualify.
+       (main): Add handling of -Q.
+       (consider_token, C_entries) <omethodparm>: Append argument types
+       to Objective C methods only if --class-qualify was specified.
+       Qualify C++, Objective C, and Java class members with their class
+       names only if --class-qualify was specified.
+       (C_entries): If --class-qualify was not specified, remove the
+       namespace and class qualifiers from tag names of C++ methods.
+       This allows to use etags.el as xref back-end without the
+       tag-symbol-match-p method, which greatly increases the number of
+       potentially false positives.  (Bug#20629)
+       * doc/man/etags.1: Update to document the new --class-qualify
+       option.
+       * test/etags/ETAGS.good_1:
+       * test/etags/ETAGS.good_2:
+       * test/etags/ETAGS.good_3:
+       * test/etags/ETAGS.good_4:
+       * test/etags/ETAGS.good_5:
+       * test/etags/CTAGS.good: Update due to changes in etags.c.
+
+2015-05-25  Stefan Monnier  <address@hidden>
+
+       (cl-generic-define-method): Side effects are evil (bug#20644)
+       * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Don't reuse
+       cons-cells that might be used as keys in an `equal' hash-table.
+
+2015-05-25  Lars Magne Ingebrigtsen  <address@hidden>
+
+       Make erc timestamps visible again
+       * lisp/erc/erc-stamp.el (erc-munge-invisibility-spec): Make
+       timestamps visible again (if requested).
+
+2015-05-25  Eli Zaretskii  <address@hidden>
+
+       Fix last change in etags.c that broke tagging compresed files
+       * lib-src/etags.c (process_file_name) [MSDOS || DOS_NT]: Fix
+       quoting of decompression shell command for MS-Windows/MS-DOS.
+
+2015-05-25  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/cl-macs.el (cl-tagbody): Scope cl--tagbody-alist
+       (Bug#20639)
+
+2015-05-25  Michael Albinus  <address@hidden>
+
+       Fix typo in 89035e247591c8d688fce922b7079881aa110f33
+
+2015-05-25  Orivej Desh  <address@hidden>  (tiny change)
+
+       Fix IPv6 addresses in Tramp
+       * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
+       Add sqare brackets around host name.
+
+2015-05-25  Michael Albinus  <address@hidden>
+
+       Inhibit `epa-file-handler' in Tramp
+       (Bug#20634)
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer)
+       (tramp-sh-handle-insert-file-contents-literally): Inhibit also
+       `epa-file-handler'.
+
+2015-05-24  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstring
+       (pcase-let): Document the behavior in case the pattern doesn't match.
+
+2015-05-24  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/tabulated-list.el: New optional print method
+       (tabulated-list-print): New optional argument, UPDATE.  If
+       non-nil, the list is printed by only adding and deleting the
+       changed entries, instead of erasing the whole buffer.  This method
+       is much faster when few or no entries have changed.
+       * doc/lispref/modes.texi (Tabulated List Mode): Document it.
+       * etc/NEWS: Document it.
+
+       * lisp/emacs-lisp/tabulated-list.el: Improve printing
+       (tabulated-list--get-sorter): New function.
+       (tabulated-list-print): Restore window-line when remember-pos is
+       passed and optimize away the `nreverse'.
+
+2015-05-24  Paul Eggert  <address@hidden>
+
+       Simpilify etags TEX mode scanning
+       * lib-src/etags.c (TEX_mode, TEX_esc, TEX_opgrp, TEX_clgrp):
+       Remove static vars.
+       (TeX_commands): Deduce escapes here instead.
+       (TEX_LESC, TEX_SESC, TEX_mode): Remove; all uses removed.
+       This removes the need for a reset_input call.
+
+       Improve etags I/O error reporting
+       * lib-src/etags.c:
+       Don't include sys/types.h and sys/stat.h; no longer needed.
+       (infilename): New static var.
+       (process_file_name): Don't call 'stat'.  Instead, just open the
+       file for reading and report any errors.  Don't bother making
+       a copy of the file argument; it's not needed.  Be more careful to
+       use the failing errno when reporting an error.
+       Quote the real name better (though no perfectly)
+       when passing it to the shell.
+       (reset_input): New function, which reports I/O errors.
+       All uses of 'rewind' changed to use this function.
+       (perhaps_more_input): New function, which also checks for
+       I/O errors.  All uses of 'feof' changed to use this function.
+       (analyze_regex): Report an error if fclose fails.
+       (readline_internal): Report an error if getc fails.
+       (etags_mktmp): Return an error if close fails.
+
+       etags.c: avoid side effects in 'if'
+       * lib-src/etags.c (process_file_name, Perl_functions)
+       (TEX_decode_env): Hoist side effects into previous statement.
+
+       .gitignore tweaks
+       * .gitignore: Ignore all *.stamp files.  Sort.
+       Ignore [0-9]*.txt (commonly used name for git patches)
+       and /vc-dwim-log-* (vc-dwim temporary).
+
 2015-05-24  Eli Zaretskii  <address@hidden>
 
        Fix last change in etags.c, which failed the test suite
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index 43773f5..c6a3446 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -314,7 +314,8 @@ Returns non-nil if conflicts remain."
 SKIP denotes whether those commits are actually skipped.  If END
 is nil, only the single commit BEG is merged."
   (with-temp-buffer
-    (insert "Merge from " branch "\n\n"
+    (insert (if skip "; " "")
+           "Merge from " branch "\n\n"
            (if skip
                (concat "The following commit"
                        (if end "s were " " was ")
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index e63422b..e7910a6 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -34,7 +34,7 @@ GNULIB_MODULES='
   getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog
   intprops largefile lstat
   manywarnings memrchr mkostemp mktime
-  pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat
+  pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat
   sig2str socklen stat-time stdalign stddef stdio
   stpcpy strftime strtoimax strtoumax symlink sys_stat
   sys_time time time_r timer-time timespec-add timespec-sub
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index c833721..e687708 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -23,7 +23,7 @@ LC_ALL=C
 export LC_ALL
 
 # The newest revision that should not appear in the generated ChangeLog.
-gen_origin=b98a2ef74758f78831d7c6dd4ae13f3433d77869
+gen_origin=0700eb152da4c57419a391161107b48d81abdeb2
 force=
 output=ChangeLog
 nmax=2
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index be45856..cc9602e 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -127,6 +127,12 @@ sign (Unicode code-point @code{U+221E}):
   A numeric argument to @kbd{C-q} or @kbd{C-x 8 @key{RET}} specifies
 how many copies of the character to insert (@pxref{Arguments}).
 
+  In some contexts, if you type a quotation using grave accent and
+apostrophe @t{`like this'}, it is converted to a form @t{‘like this’}
+using single quotation marks.  Similarly, typing a quotation @t{``like
+this''} using double grave accent and apostrophe converts it to a form
address@hidden this”} using double quotation marks.  @xref{Quotation Marks}.
+
 @node Moving Point
 @section Changing the Location of Point
 
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 21f645e..713bf8b 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -93,7 +93,7 @@ developing GNU and promoting software freedom.''
 Published by the Free Software Foundation @*
 51 Franklin Street, Fifth Floor @*
 Boston, MA 02110-1301 USA @*
-ISBN 978-0-9831592-4-7
+ISBN 978-0-9831592-5-4
 
 @sp 2
 Cover art by Etienne Suvasa; cover design by Matt Lee.
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 0e8f46a..e79561a 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -200,6 +200,12 @@ Auto Save mode saves the buffer contents periodically to 
reduce the
 amount of work you can lose in case of a crash.  @xref{Auto Save}.
 
 @item
+Electric Quote mode automatically converts quotation marks.  For
+example, it requotes text typed @t{`like this'} to text @t{‘like
+this’}.  You can control what kind of text it operates in, and you can
+disable it entirely in individual buffers.  @xref{Quotation Marks}.
+
address@hidden
 Enriched mode enables editing and saving of formatted text.
 @xref{Enriched Text}.
 
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index d929e09..80b1384 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1164,7 +1164,9 @@ current language environment.
 to use when encoding and decoding system strings such as system error
 messages and @code{format-time-string} formats and time stamps.  That
 coding system is also used for decoding address@hidden keyboard
-input on the X Window System.  You should choose a coding system that is 
compatible
+input on the X Window System and for encoding text sent to the
+standard output and error streams when in batch mode.  You should
+choose a coding system that is compatible
 with the underlying system's text representation, which is normally
 specified by one of the environment variables @env{LC_ALL},
 @env{LC_CTYPE}, and @env{LANG}.  (The first one, in the order
@@ -1555,6 +1557,20 @@ used.  Some examples are:
 
 @end example
 
address@hidden ignore font
address@hidden fonts, how to ignore
address@hidden face-ignored-fonts
+  Some fonts installed on your system might be broken, or produce
+unpleasant results for characters for which they are used, and you may
+wish to instruct Emacs to completely ignore them while searching for a
+suitable font required to display a character.  You can do that by
+adding the offending fonts to the value of @code{face-ignored-fonts}
+variable, which is a list.  Here's an example to put in your
address@hidden/.emacs}:
+
address@hidden
+(add-to-list 'face-ignored-fonts "Some Bad Font")
address@hidden example
 
 @node Undisplayable Characters
 @section Undisplayable Characters
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 82ac99f..6cad280 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -926,8 +926,7 @@ commas.
 @findex rmail-summary-by-recipients
   @kbd{C-M-r @var{rcpts} @key{RET}} (@code{rmail-summary-by-recipients})
 makes a partial summary mentioning only the messages that have one or
-more recipients matching the regular expression @var{rcpts}.  You can
-use commas to separate multiple regular expressions.  These are matched
+more recipients matching the regular expression @var{rcpts}.  This is matched
 against the @samp{To}, @samp{From}, and @samp{CC} headers (supply a prefix
 argument to exclude this header).
 
@@ -935,9 +934,8 @@ argument to exclude this header).
 @findex rmail-summary-by-topic
   @kbd{C-M-t @var{topic} @key{RET}} (@code{rmail-summary-by-topic})
 makes a partial summary mentioning only the messages whose subjects have
-a match for the regular expression @var{topic}.  You can use commas to
-separate multiple regular expressions.  With a prefix argument, the
-match is against the whole message, not just the subject.
+a match for the regular expression @var{topic}.  With a prefix argument,
+the match is against the whole message, not just the subject.
 
 @kindex C-M-s @r{(Rmail)}
 @findex rmail-summary-by-regexp
@@ -950,8 +948,7 @@ expression @var{regexp}.
 @findex rmail-summary-by-senders
   @kbd{C-M-f @var{senders} @key{RET}} (@code{rmail-summary-by-senders})
 makes a partial summary that mentions only the messages whose @samp{From}
-fields match the regular expression @var{senders}.  You can use commas to
-separate multiple regular expressions.
+fields match the regular expression @var{senders}.
 
   Note that there is only one summary buffer for any Rmail buffer;
 making any kind of summary discards any previous summary.
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 9bc5ade..d891cc1 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -69,6 +69,7 @@ for editing such pictures.
 * Sentences::           Moving over and killing sentences.
 * Paragraphs::          Moving over paragraphs.
 * Pages::               Moving over pages.
+* Quotation Marks::     Inserting quotation marks.
 * Filling::             Filling or justifying text.
 * Case::                Changing the case of text.
 * Text Mode::           The major modes for editing text files.
@@ -404,6 +405,47 @@ that separates pages (@pxref{Regexps}).  The normal value 
of this
 variable is @code{"^\f"}, which matches a formfeed character at the
 beginning of a line.
 
address@hidden Quotation Marks
address@hidden Quotation Marks
address@hidden Quotation marks
address@hidden Electric Quote mode
address@hidden mode, Electric Quote
address@hidden electric-quote-mode
+  One common way to quote is the typewriter convention, which quotes
+using straight apostrophes @t{'like this'} or double-quotes @t{"like
+this"}.  Another common way is the curved quote convention, which uses
+left and right single or double quotation marks @t{‘like this’} or
address@hidden this”}.  Typewriter quotes are simple and portable; curved
+quotes are less ambiguous and typically look nicer.
+
+  Electric Quote mode makes it easier to type curved quotes.  It
+optionally converts a quotation's grave accent and apostrophe @t{`like
+this'} to single quotation marks @t{‘like this’}.  Similarly, it
+converts a quotation's double grave accent and double apostrophe
address@hidden this''} to double quotation marks @t{“like this”}.  These
+conversions are suppressed in buffers whose coding systems cannot
+represent curved quote characters.
+
address@hidden electric-quote-paragraph
address@hidden electric-quote-comment
address@hidden electric-quote-string
+  You can customize the behavior of Electric Quote mode by customizing
+variables that control where it is active.  It is active in text
+paragraphs if @code{electric-quote-paragraph} is address@hidden, in
+programming-language comments if @code{electric-quote-comment} is
address@hidden, and in programming-language strings if
address@hidden is address@hidden  The default is
address@hidden for @code{electric-quote-string} and @code{t} for the other
+variables.
+
+  Electric Quote mode is disabled by default.  To toggle it, type
address@hidden electric-quote-mode}.  To toggle it in a single buffer, use
address@hidden electric-quote-local-mode}.  To suppress it for a single use,
+type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}.  To
+insert a curved quote even when Electric Quote is disabled or
+inactive, use @kbd{C-x 8 @key{RET}} (@code{insert-char}).
address@hidden Text}.
+
 @node Filling
 @section Filling Text
 @cindex filling text
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b12995b..357a3c3 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -6522,8 +6522,9 @@ no buffer display table.
 @defvar standard-display-table
 The value of this variable is the standard display table, which is
 used when Emacs is displaying a buffer in a window with neither a
-window display table nor a buffer display table defined.  Its default
-is @code{nil}.
+window display table nor a buffer display table defined, or when Emacs
+is outputting text to the standard output or error streams.  Its
+default is @code{nil}.
 @end defvar
 
 The @file{disp-table} library defines several functions for changing
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 868d284..ce29f3f 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -318,10 +318,18 @@ stands for no text itself.  It is used only for a side 
effect: it
 specifies @var{mapvar}'s value as the keymap for any following
 @address@hidden sequences in this documentation string.
 
address@hidden `
+(grave accent) stands for a left single quotation mark (@samp{‘}).
+
address@hidden '
+(apostrophe) stands for a right single quotation mark (@samp{’}) if
+preceded by grave accent and there are no intervening apostrophes.
+Otherwise, apostrophe stands for itself.
+
 @item \=
-quotes the following character and is discarded; thus, @samp{\=\[} puts
address@hidden into the output, and @samp{\=\=} puts @samp{\=} into the
-output.
+quotes the following character and is discarded; thus, @samp{\=`} puts
address@hidden into the output, @samp{\=\[} puts @samp{\[} into the output,
+and @samp{\=\=} puts @samp{\=} into the output.
 @end table
 
 @strong{Please note:} Each @samp{\} must be doubled when written in a
@@ -354,8 +362,8 @@ specifies a key binding that the command does not actually 
have.
 @smallexample
 @group
 (substitute-command-keys
-   "To abort recursive edit, type: \\[abort-recursive-edit]")
address@hidden "To abort recursive edit, type: C-]"
+   "To abort recursive edit, type ‘\\[abort-recursive-edit]’.")
address@hidden "To abort recursive edit, type ‘C-]’."
 @end group
 
 @group
@@ -376,8 +384,8 @@ C-g             abort-recursive-edit
 @group
 (substitute-command-keys
    "To abort a recursive edit from the minibuffer, type\
-\\<minibuffer-local-must-match-map>\\[abort-recursive-edit].")
address@hidden "To abort a recursive edit from the minibuffer, type C-g."
+`\\<minibuffer-local-must-match-map>\\[abort-recursive-edit]'.")
address@hidden "To abort a recursive edit from the minibuffer, type ‘C-g’."
 @end group
 @end smallexample
 
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index f160184..362c3a4 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1959,6 +1959,7 @@ how Emacs interacts with these features.
 @cindex keyboard input decoding on X
 This variable specifies the coding system to use for decoding system
 error messages and---on X Window system only---keyboard input, for
+sending batch output to the standard output and error streams, for
 encoding the format argument to @code{format-time-string}, and for
 decoding the return value of @code{format-time-string}.
 @end defvar
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 97fa083..0c39be9 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -194,16 +194,23 @@ It processes any command-line options that were not 
handled earlier.
 It now exits if the option @code{--batch} was specified.
 
 @item
+If the @file{*scratch*} buffer exists and is empty, it inserts
address@hidden into that buffer.
+
address@hidden
 If @code{initial-buffer-choice} is a string, it visits the file (or
 directory) with that name.  If it is a function, it calls the function
-with no arguments and selects the buffer that it returns.
+with no arguments and selects the buffer that it returns.  If one file
+is given as a command line argument, that file is visited and its
+buffer displayed alongside @code{initial-buffer-choice}.  If more than
+one file is given, all of the files are visited and the @file{*Buffer
+List*} buffer is displayed alongside @code{initial-buffer-choice}.
+
 @ignore
 @c I do not think this should be mentioned.  AFAICS it is just a dodge
 @c around inhibit-startup-screen not being settable on a site-wide basis.
 If it is @code{t}, it selects the @file{*scratch*} buffer.
 @end ignore
-If the @file{*scratch*} buffer exists and is empty, it inserts
address@hidden into that buffer.
 
 @c To make things nice and confusing, the next three items can be
 @c called from two places.  If displaying a startup screen, they are
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index cc1f0e4..798b670 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -658,17 +658,22 @@ starting double-quote is not part of the string!
 @anchor{Docstring hyperlinks}
 @item
 When a documentation string refers to a Lisp symbol, write it as it
-would be printed (which usually means in lower case), with a grave
-accent @samp{`} before and apostrophe @samp{'} after it.  There are
+would be printed (which usually means in lower case), surrounding
+it with curved single quotes (@samp{‘} and @samp{’}).  There are
 two exceptions: write @code{t} and @code{nil} without surrounding
-punctuation.  For example: @samp{CODE can be `lambda', nil, or t.}
-(In this manual, we use a different convention, with single-quotes
-around symbols.)
+punctuation.  For example: @samp{CODE can be ‘lambda’, nil, or t.}
+
+Documentation strings can also use an older single-quoting convention,
+which quotes symbols with grave accent @samp{`} and apostrophe
address@hidden'}: @samp{`like-this'} rather than @samp{‘like-this’}.  This
+older convention was designed for now-obsolete displays in which grave
+accent and apostrophe were mirror images.  Documentation in this older
+convention is converted to the standard convention when it is copied
+into a help buffer.  @xref{Keys in Documentation}.
 
 @cindex hyperlinks in documentation strings
 Help mode automatically creates a hyperlink when a documentation string
-uses a symbol name between grave accent and apostrophe, if the symbol
-has either a
+uses a single-quoted symbol name, if the symbol has either a
 function or a variable definition.  You do not need to do anything
 special to make use of this feature.  However, when a symbol has both a
 function definition and a variable definition, and you want to refer to
@@ -678,7 +683,7 @@ immediately before the symbol name.  (Case makes no 
difference in
 recognizing these indicator words.)  For example, if you write
 
 @example
-This function sets the variable `buffer-file-name'.
+This function sets the variable ‘buffer-file-name’.
 @end example
 
 @noindent
@@ -691,7 +696,7 @@ you can write the words @samp{symbol} or @samp{program} 
before the
 symbol name to prevent making any hyperlink.  For example,
 
 @example
-If the argument KIND-OF-RESULT is the symbol `list',
+If the argument KIND-OF-RESULT is the symbol ‘list’,
 this function returns a list of all the objects
 that satisfy the criterion.
 @end example
@@ -710,21 +715,21 @@ followed by the word @samp{face}.  In that case, only the 
face
 documentation will be shown, even if the symbol is also defined as a
 variable or as a function.
 
-To make a hyperlink to Info documentation, write the name of the Info
-node (or anchor) between grave accent and apostrophe, preceded by
+To make a hyperlink to Info documentation, write the single-quoted
+name of the Info node (or anchor), preceded by
 @samp{info node}, @samp{Info node}, @samp{info anchor} or @samp{Info
 anchor}.  The Info file name defaults to @samp{emacs}.  For example,
 
 @smallexample
-See Info node `Font Lock' and Info node `(elisp)Font Lock Basics'.
+See Info node ‘Font Lock’ and Info node ‘(elisp)Font Lock Basics’.
 @end smallexample
 
-Finally, to create a hyperlink to URLs, write the URL between grave
-accent and apostrophe, preceded by @samp{URL}. For example,
+Finally, to create a hyperlink to URLs, write the single-quoted URL,
+preceded by @samp{URL}.  For example,
 
 @smallexample
 The home page for the GNU project has more information (see URL
-`http://www.gnu.org/').
+‘http://www.gnu.org/’).
 @end smallexample
 
 @item
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 5ad29cd..c90a7db 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -7173,11 +7173,12 @@ configuration.  In that case, we'd appreciate it if you 
isolate the
 Emacs Lisp code that triggers the bug and include it in your report.
 
 @cindex bug report mailing list
-Bug reports should be sent to @email{bug-cc-mode@@gnu.org}.  You can
-also send other questions and suggestions (kudos?@: @t{;-)} to that
-address.  It's a mailing list which you can join or browse an archive
-of; see the web site at @uref{http://cc-mode.sourceforge.net/} for
-further details.
+Reporting a bug using @code{c-submit-bug-report} files it in
+the GNU Bug Tracker at @url{http://debbugs.gnu.org}, then sends it on
+to @email{bug-cc-mode@@gnu.org}.  You can also send reports, other
+questions, and suggestions (kudos?@: @t{;-)} to that address.  It's a
+mailing list which you can join or browse an archive of; see the web site at
address@hidden://cc-mode.sourceforge.net/} for further details.
 
 @cindex announcement mailing list
 If you want to get announcements of new @ccmode{} releases, send the
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 152e985..4b48564 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2015-05-06.11}
+\def\texinfoversion{2015-05-26.15}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -8954,7 +8954,6 @@ directory should work if nowhere else does.}
       \catcode\count255=#1\relax
       \advance\count255 by 1
    \repeat
-
 }
 
 % @documentencoding sets the definition of non-ASCII characters
diff --git a/etc/NEWS b/etc/NEWS
index b922a27..57e63b1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -70,6 +70,14 @@ so if you want to use it, you can always take a copy from an 
older Emacs.
 
 * Startup Changes in Emacs 25.1
 
++++
+** When Emacs is given a file as a command line argument and
+`initial-buffer-choice' is non-nil, display both the file and
+`initial-buffer-choice'.  When Emacs is given more than one file and
+`initial-buffer-choice' is non-nil, show `initial-buffer-choice'
+and *Buffer List*.  This makes Emacs convenient to use from the
+command line when `initial-buffer-choice' is non-nil.
+
 
 * Changes in Emacs 25.1
 
@@ -226,6 +234,8 @@ successive char insertions.
 ** C-x 8 now has shorthands for these chars: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″
 € № ← → ↔ − ≈ ≠ ≤ ≥.  As before, you can type C-x 8 C-h to list shorthands.
 
+** New minor mode electric-quote-mode for quoting ‘like this’ and “like this”.
+
 ** New minor mode global-eldoc-mode is enabled by default.
 
 ** Emacs now supports "bracketed paste mode" when running on a terminal
@@ -271,6 +281,10 @@ in the surrounding GUI (using the OSC-52 escape sequence). 
 This only works
 if your xterm supports it and enables the `allowWindowOps' options (disabled
 by default at least in Debian, for security reasons).
 
+Similarly, you can yank the CLIPBOARD/PRIMARY selection (using the OSC-52
+escape sequence) if your xterm has the feature enabled but for that you
+additionally need to add `getSelection' to `xterm-extra-capabilities'.
+
 ** xterm-mouse-mode now supports mouse-tracking (if your xterm supports it).
 
 ** package.el
@@ -516,16 +530,21 @@ alternatives to currently visited manuals.
 ---
 ** ntlm.el has support for NTLM2.
 
----
-** The Rmail commands d, C-d and u now handle repeat counts to delete or
+** Rmail
+
+*** The Rmail commands d, C-d and u take optional repeat counts to delete or
 undelete multiple messages.
 
-** Rmail can now render HTML mail messages if your Emacs was built with
+*** Rmail can now render HTML mail messages if your Emacs was built with
 libxml2 or if you have the Lynx browser installed.  By default, Rmail
 will display the HTML version of a mail message that has both HTML and
 plain text parts, if display of HTML email is possible; customize the
 `rmail-mime-prefer-html' option to `nil' if you don't want that.
 
++++
+*** In the commands that make summaries by subject, recipients, or senders,
+you can no longer use commas to separate regular expressions.
+
 ** SES now supports local printer functions; see `ses-define-local-printer'.
 
 ** In sh-mode, you can now use `sh-shell' as a file-local variable to
@@ -747,6 +766,8 @@ a typographically-correct documents.
 
 * Incompatible Lisp Changes in Emacs 25.1
 
+** `inhibit-point-motion-hooks' now defaults to t and is obsolete.
+
 ** The optional `predicate' argument of `lisp-complete-symbol' no longer
 has any effect.  (This change was made in Emacs 24.4 but was not
 advertised at the time.)
@@ -794,6 +815,12 @@ when signaling a file error.  For example, it now reports 
"Permission
 denied" instead of "permission denied".  The old behavior was problematic
 in languages like German where downcasing rules depend on grammar.
 
+** (substitute-command-keys "`foo'") now returns "‘foo’".
+That is, it replaces grave accents by left single quotation marks, and
+apostrophes that match grave accents by right single quotation marks.
+As before, isolated apostrophes and characters preceded by \= are
+output as-is.
+
 +++
 ** The character classes [:alpha:] and [:alnum:] in regular expressions
 now match multibyte characters using Unicode character properties.
@@ -871,9 +898,6 @@ permissions set to temporary values (e.g., for creating 
private files).
 
 ** You can access the slots of structures using `cl-struct-slot-value'.
 
-** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
-optional repeat-count argument.
-
 ** Function `sort' can deal with vectors.
 
 ** Function `system-name' now returns an updated value if the current
@@ -894,6 +918,12 @@ directory at point.
 *** New macros `thread-first' and `thread-last' allow threading a form
     as the first or last argument of subsequent forms.
 
+** Documentation strings now support quoting with curved single quotes
+‘like-this’ in addition to the old style with grave accent and
+apostrophe `like-this'.  The new style looks better on today's displays.
+When an old-style string is copied to a help buffer it is converted to
+the new style.
+
 +++
 ** Time-related changes:
 
@@ -917,6 +947,12 @@ integers.
 ** New function `set-binary-mode' allows to switch a standard stream
 of the Emacs process to binary I/O mode.
 
+** In locales that cannot display curved quotes, ASCII approximations
+are installed in standard-display-table.
+
+** Standard output and error streams now transliterate characters via
+standard-display-table, and encode output using locale-coding-system.
+
 ** Miscellaneous name change
 
 For consistency with the usual Emacs spelling, the Lisp variable
@@ -981,6 +1017,22 @@ is strongly dedicated to its buffer.
 ** Tearoff menus and detachable toolbars for Gtk+ has been removed.
 Those features have been deprecated in Gtk+ for a long time.
 
+** Miscellaneous
+
+*** etags no longer qualifies class members by default.
+By default, `etags' will not qualify class members for C-like
+object-oriented languages with their class names and namespaces, and
+will remove qualifications used explicitly in the code from the tag
+names it puts in TAGS files.  This is so the etags.el back-end for
+`xref-find-definitions' is more accurate and produces less false
+positives.
+
+Use --class-qualify (-Q) if you want the old default behavior of
+qualifying class members in C++, Java, and Objective C.  Note that
+using -Q might make some class members become "unknown" to `M-.'
+(`xref-find-definitions'); if so, you can use `C-u M-.' to specify the
+qualified names by hand.
+
 
 * Changes in Emacs 25.1 on Non-Free Operating Systems
 
@@ -992,6 +1044,9 @@ of Windows starting with Windows 9X.
 +++
 ** Emacs running on MS-Windows now supports the daemon mode.
 
+** The byte counts in etags-generated TAGS files are now the same on
+MS-Windows as they are on other platforms.
+
 ** OS X 10.5 or older is no longer supported.
 
 ** OS X on PowerPC is no longer supported.
diff --git a/etc/edt-user.el b/etc/edt-user.el
index e0f5b29..2666856 100644
--- a/etc/edt-user.el
+++ b/etc/edt-user.el
@@ -160,7 +160,7 @@ G-C-\\: Split Window
   G-%: Go to Percentage
   G- : Undo  (GOLD Spacebar)
   G-=: Go to Line
-  G-`: What line
+  G-\\=`: What line
   G-/: Query-Replace"
 
   (interactive)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f124d29..8b7f53c 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -6075,16 +6075,7 @@ readline_internal (linebuffer *lbp, FILE *stream, char 
const *filename)
          if (p > buffer && p[-1] == '\r')
            {
              p -= 1;
-#ifdef DOS_NT
-            /* Assume CRLF->LF translation will be performed by Emacs
-               when loading this file, so CRs won't appear in the buffer.
-               It would be cleaner to compensate within Emacs;
-               however, Emacs does not know how many CRs were deleted
-               before any given point in the file.  */
-             chars_deleted = 1;
-#else
              chars_deleted = 2;
-#endif
            }
          else
            {
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index d9bd446..1a2f8c4 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -467,3 +467,34 @@ acl_nontrivial (int count, struct acl *entries)
 }
 
 #endif
+
+void
+free_permission_context (struct permission_context *ctx)
+{
+#ifdef USE_ACL
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+  if (ctx->acl)
+    acl_free (ctx->acl);
+#  if !HAVE_ACL_TYPE_EXTENDED
+  if (ctx->default_acl)
+    acl_free (ctx->default_acl);
+#  endif
+
+# elif defined GETACL /* Solaris, Cygwin */
+  free (ctx->entries);
+#  ifdef ACE_GETACL
+  free (ctx->ace_entries);
+#  endif
+
+# elif HAVE_GETACL /* HP-UX */
+
+#  if HAVE_ACLV_H
+#  endif
+
+# elif HAVE_STATACL /* older AIX */
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+
+# endif
+#endif
+}
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 9b9fae2..11fdea1 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -133,12 +133,9 @@ rpl_acl_set_fd (int fd, acl_t acl)
 #   define acl_from_mode(mode) (NULL)
 #  endif
 
-/* Set to 1 if a file's mode is implicit by the ACL.
-   Set to 0 if a file's mode is stored independently from the ACL.  */
+/* Set to 0 if a file's mode is stored independently from the ACL.  */
 #  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi 
/* Mac OS X, IRIX */
 #   define MODE_INSIDE_ACL 0
-#  else
-#   define MODE_INSIDE_ACL 1
 #  endif
 
 /* Return the number of entries in ACL.
@@ -164,12 +161,9 @@ extern int acl_access_nontrivial (acl_t);
 
 # elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
 
-/* Set to 1 if a file's mode is implicit by the ACL.
-   Set to 0 if a file's mode is stored independently from the ACL.  */
+/* Set to 0 if a file's mode is stored independently from the ACL.  */
 #  if defined __CYGWIN__ /* Cygwin */
 #   define MODE_INSIDE_ACL 0
-#  else /* Solaris */
-#   define MODE_INSIDE_ACL 1
 #  endif
 
 /* Return 1 if the given ACL is non-trivial.
@@ -248,6 +242,53 @@ extern int acl_nontrivial (int count, struct acl *entries);
 
 # endif
 
+/* Set to 1 if a file's mode is implicit by the ACL.  */
+# ifndef MODE_INSIDE_ACL
+#  define MODE_INSIDE_ACL 1
+# endif
+
 #endif
 
+struct permission_context {
+  mode_t mode;
+#ifdef USE_ACL
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+  acl_t acl;
+#  if !HAVE_ACL_TYPE_EXTENDED
+  acl_t default_acl;
+#  endif
+  bool acls_not_supported;
+
+# elif defined GETACL /* Solaris, Cygwin */
+  int count;
+  aclent_t *entries;
+#  ifdef ACE_GETACL
+  int ace_count;
+  ace_t *ace_entries;
+#  endif
+
+# elif HAVE_GETACL /* HP-UX */
+  struct acl_entry entries[NACLENTRIES];
+  int count;
+#  if HAVE_ACLV_H
+  struct acl aclv_entries[NACLVENTRIES];
+  int aclv_count;
+#  endif
+
+# elif HAVE_STATACL /* older AIX */
+  union { struct acl a; char room[4096]; } u;
+  bool have_u;
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+  struct acl entries[NACLENTRIES];
+  int count;
+
+# endif
+#endif
+};
+
+int get_permissions (const char *, int, mode_t, struct permission_context *);
+int set_permissions (struct permission_context *, const char *, int);
+void free_permission_context (struct permission_context *);
+
 _GL_INLINE_HEADER_END
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
new file mode 100644
index 0000000..ccee1f1
--- /dev/null
+++ b/lib/get-permissions.c
@@ -0,0 +1,280 @@
+/* get-permissions.c - get permissions of a file
+
+   Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
+
+   This program 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.
+
+   This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible.  */
+
+#include <config.h>
+
+#include <string.h>
+#include "acl.h"
+
+#include "acl-internal.h"
+
+/* Read the permissions of a file into CTX. If DESC is a valid file descriptor,
+   use file descriptor operations, else use filename based operations on NAME.
+   MODE is the file mode obtained from a previous stat call.
+   Return 0 if successful.  Return -1 and set errno upon failure.  */
+
+int
+get_permissions (const char *name, int desc, mode_t mode,
+                struct permission_context *ctx)
+{
+  memset (ctx, 0, sizeof(*ctx));
+  ctx->mode = mode;
+
+#if USE_ACL && HAVE_ACL_GET_FILE
+  /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
+  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if !HAVE_ACL_TYPE_EXTENDED
+  /* Linux, FreeBSD, IRIX, Tru64 */
+
+  if (HAVE_ACL_GET_FD && desc != -1)
+    ctx->acl = acl_get_fd (desc);
+  else
+    ctx->acl = acl_get_file (name, ACL_TYPE_ACCESS);
+  if (ctx->acl == NULL)
+    return acl_errno_valid (errno) ? -1 : 0;
+
+  /* With POSIX ACLs, a file cannot have "no" acl; a file without
+     extended permissions has a "minimal" acl which is equivalent to the
+     file mode.  */
+
+  if (S_ISDIR (mode))
+    {
+      ctx->default_acl = acl_get_file (name, ACL_TYPE_DEFAULT);
+      if (ctx->default_acl == NULL)
+       return -1;
+    }
+
+#  else /* HAVE_ACL_TYPE_EXTENDED */
+  /* Mac OS X */
+
+  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+     and           acl_get_file (name, ACL_TYPE_DEFAULT)
+     always return NULL / EINVAL.  You have to use
+                   acl_get_file (name, ACL_TYPE_EXTENDED)
+     or            acl_get_fd (open (name, ...))
+     to retrieve an ACL.
+     On the other hand,
+                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
+     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+     have the same effect as
+                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+     Each of these calls sets the file's ACL.  */
+
+  if (HAVE_ACL_GET_FD && desc != -1)
+    ctx->acl = acl_get_fd (desc);
+  else
+    ctx->acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+  if (ctx->acl == NULL)
+    return acl_errno_valid (errno) ? -1 : 0;
+
+# endif
+
+#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+  /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+     of Unixware.  The acl() call returns the access and default ACL both
+     at once.  */
+# ifdef ACE_GETACL
+  /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+     file systems (whereas the other ones are used in UFS file systems).
+     There is an API
+       pathconf (name, _PC_ACL_ENABLED)
+       fpathconf (desc, _PC_ACL_ENABLED)
+     that allows to determine which of the two kinds of ACLs is supported
+     for the given file.  But some file systems may implement this call
+     incorrectly, so better not use it.
+     When fetching the source ACL, we simply fetch both ACL types.
+     When setting the destination ACL, we try either ACL types, assuming
+     that the kernel will translate the ACL from one form to the other.
+     (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
+     the description of ENOTSUP.)  */
+  for (;;)
+    {
+      int ret;
+
+      if (desc != -1)
+       ret = facl (desc, ACE_GETACLCNT, 0, NULL);
+      else
+       ret = acl (name, ACE_GETACLCNT, 0, NULL);
+      if (ret < 0)
+       {
+         if (errno == ENOSYS || errno == EINVAL)
+           ret = 0;
+         else
+           return -1;
+       }
+      ctx->ace_count = ret;
+
+      if (ctx->ace_count == 0)
+        break;
+
+      ctx->ace_entries = (ace_t *) malloc (ctx->ace_count * sizeof (ace_t));
+      if (ctx->ace_entries == NULL)
+        {
+          errno = ENOMEM;
+          return -1;
+        }
+
+      if (desc != -1)
+       ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+      else
+       ret = acl (name, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+      if (ret < 0)
+        {
+          if (errno == ENOSYS || errno == EINVAL)
+            {
+             free (ctx->ace_entries);
+             ctx->ace_entries = NULL;
+              ctx->ace_count = 0;
+              break;
+            }
+          else
+            return -1;
+        }
+      if (ret <= ctx->ace_count)
+       {
+         ctx->ace_count = ret;
+         break;
+       }
+      /* Huh? The number of ACL entries has increased since the last call.
+         Repeat.  */
+      free (ctx->ace_entries);
+      ctx->ace_entries = NULL;
+    }
+# endif
+
+  for (;;)
+    {
+      int ret;
+
+      if (desc != -1)
+       ret = facl (desc, GETACLCNT, 0, NULL);
+      else
+       ret = acl (name, GETACLCNT, 0, NULL);
+      if (ret < 0)
+       {
+         if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
+           ret = 0;
+         else
+           return -1;
+       }
+      ctx->count = ret;
+
+      if (ctx->count == 0)
+       break;
+
+      ctx->entries = (aclent_t *) malloc (ctx->count * sizeof (aclent_t));
+      if (ctx->entries == NULL)
+        {
+          errno = ENOMEM;
+          return -1;
+        }
+
+      if (desc != -1)
+       ret = facl (desc, GETACL, ctx->count, ctx->entries);
+      else
+       ret = acl (name, GETACL, ctx->count, ctx->entries);
+      if (ret < 0)
+       {
+         if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
+           {
+             free (ctx->entries);
+             ctx->entries = NULL;
+             ctx->count = 0;
+             break;
+           }
+         else
+           return -1;
+       }
+      if (ret <= ctx->count)
+       {
+         ctx->count = ret;
+         break;
+       }
+      /* Huh? The number of ACL entries has increased since the last call.
+         Repeat.  */
+      free (ctx->entries);
+      ctx->entries = NULL;
+    }
+
+#elif USE_ACL && HAVE_GETACL /* HP-UX */
+
+  int ret;
+
+  if (desc != -1)
+    ret = fgetacl (desc, NACLENTRIES, ctx->entries);
+  else
+    ret = getacl (name, NACLENTRIES, ctx->entries);
+  if (ret < 0)
+    {
+      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+       ret = 0;
+      else
+        return -1;
+    }
+  else if (ret > NACLENTRIES)
+    /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
+    abort ();
+  ctx->count = ret;
+
+# if HAVE_ACLV_H
+  ret = acl ((char *) name, ACL_GET, NACLVENTRIES, ctx->aclv_entries);
+  if (ret < 0)
+    {
+      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+        ret = 0;
+      else
+        return -2;
+    }
+  else if (ret > NACLVENTRIES)
+    /* If NACLVENTRIES cannot be trusted, use dynamic memory allocation.  */
+      abort ();
+  ctx->aclv_count = ret;
+# endif
+
+#elif USE_ACL && HAVE_ACLX_GET && ACL_AIX_WIP /* AIX */
+
+  /* TODO (see set_permissions). */
+
+#elif USE_ACL && HAVE_STATACL /* older AIX */
+
+  if (desc != -1)
+    ret = fstatacl (desc, STX_NORMAL, &ctx->u.a, sizeof (ctx->u));
+  else
+    ret = statacl (name, STX_NORMAL, &ctx->u.a, sizeof (ctx->u));
+  if (ret == 0)
+    ctx->have_u = true;
+
+#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
+
+  int ret;
+
+  ret = acl ((char *) name, ACL_GET, NACLENTRIES, ctx->entries);
+  if (ret < 0)
+    return -1;
+  else if (ret > NACLENTRIES)
+    /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
+    abort ();
+  ctx->count = ret;
+
+#endif
+
+  return 0;
+
+}
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index bec0d3b..95f2f8b 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix 
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die 
--avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select 
--avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib 
--makefile-name=gnulib.mk --conditional-dependencies --no-libtool --ma [...]
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix 
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die 
--avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select 
--avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib 
--makefile-name=gnulib.mk --conditional-dependencies --no-libtool --ma [...]
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -42,6 +42,17 @@ HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
 
 ## end   gnulib module absolute-header
 
+## begin gnulib module acl-permissions
+
+libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c \
+  get-permissions.c set-permissions.c
+
+EXTRA_DIST += acl-internal.h acl.h acl_entries.c
+
+EXTRA_libgnu_a_SOURCES += acl_entries.c
+
+## end   gnulib module acl-permissions
+
 ## begin gnulib module alloca-opt
 
 BUILT_SOURCES += $(ALLOCA_H)
@@ -696,15 +707,11 @@ EXTRA_libgnu_a_SOURCES += putenv.c
 
 ## end   gnulib module putenv
 
-## begin gnulib module qacl
-
-libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c qcopy-acl.c qset-acl.c
+## begin gnulib module qcopy-acl
 
-EXTRA_DIST += acl-internal.h acl.h acl_entries.c
-
-EXTRA_libgnu_a_SOURCES += acl_entries.c
+libgnu_a_SOURCES += qcopy-acl.c
 
-## end   gnulib module qacl
+## end   gnulib module qcopy-acl
 
 ## begin gnulib module readlink
 
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h
index 13a72be..78846f6 100644
--- a/lib/inttypes.in.h
+++ b/lib/inttypes.in.h
@@ -51,6 +51,10 @@
 #endif
 /* Get CHAR_BIT.  */
 #include <limits.h>
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <stdio.h>
+#endif
 
 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
 # error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index bc258ba..c450742 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -39,534 +39,13 @@ int
 qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
            int dest_desc, mode_t mode)
 {
-#if USE_ACL && HAVE_ACL_GET_FILE
-  /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
-# if !HAVE_ACL_TYPE_EXTENDED
-  /* Linux, FreeBSD, IRIX, Tru64 */
-
-  acl_t acl;
-  int ret;
-
-  if (HAVE_ACL_GET_FD && source_desc != -1)
-    acl = acl_get_fd (source_desc);
-  else
-    acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
-  if (acl == NULL)
-    {
-      if (! acl_errno_valid (errno))
-        return qset_acl (dst_name, dest_desc, mode);
-      else
-        return -2;
-    }
-
-  if (HAVE_ACL_SET_FD && dest_desc != -1)
-    ret = acl_set_fd (dest_desc, acl);
-  else
-    ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
-  if (ret != 0)
-    {
-      int saved_errno = errno;
-
-      if (! acl_errno_valid (errno) && !acl_access_nontrivial (acl))
-        {
-          acl_free (acl);
-          return chmod_or_fchmod (dst_name, dest_desc, mode);
-        }
-      else
-        {
-          acl_free (acl);
-          chmod_or_fchmod (dst_name, dest_desc, mode);
-          errno = saved_errno;
-          return -1;
-        }
-    }
-  else
-    acl_free (acl);
-
-  if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
-    {
-      /* We did not call chmod so far, and either the mode and the ACL are
-         separate or special bits are to be set which don't fit into ACLs.  */
-
-      if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
-        return -1;
-    }
-
-  if (S_ISDIR (mode))
-    {
-      acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
-      if (acl == NULL)
-        return -2;
-
-      if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
-        {
-          int saved_errno = errno;
-
-          acl_free (acl);
-          errno = saved_errno;
-          return -1;
-        }
-      else
-        acl_free (acl);
-    }
-  return 0;
-
-# else /* HAVE_ACL_TYPE_EXTENDED */
-  /* Mac OS X */
-
-  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
-     and           acl_get_file (name, ACL_TYPE_DEFAULT)
-     always return NULL / EINVAL.  You have to use
-                   acl_get_file (name, ACL_TYPE_EXTENDED)
-     or            acl_get_fd (open (name, ...))
-     to retrieve an ACL.
-     On the other hand,
-                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
-     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
-     have the same effect as
-                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
-     Each of these calls sets the file's ACL.  */
-
-  acl_t acl;
+  struct permission_context ctx;
   int ret;
 
-  if (HAVE_ACL_GET_FD && source_desc != -1)
-    acl = acl_get_fd (source_desc);
-  else
-    acl = acl_get_file (src_name, ACL_TYPE_EXTENDED);
-  if (acl == NULL)
-    {
-      if (!acl_errno_valid (errno))
-        return qset_acl (dst_name, dest_desc, mode);
-      else
-        return -2;
-    }
-
-  if (HAVE_ACL_SET_FD && dest_desc != -1)
-    ret = acl_set_fd (dest_desc, acl);
-  else
-    ret = acl_set_file (dst_name, ACL_TYPE_EXTENDED, acl);
+  ret = get_permissions (src_name, source_desc, mode, &ctx);
   if (ret != 0)
-    {
-      int saved_errno = errno;
-
-      if (!acl_errno_valid (saved_errno) && !acl_extended_nontrivial (acl))
-        {
-          acl_free (acl);
-          return chmod_or_fchmod (dst_name, dest_desc, mode);
-        }
-      else
-        {
-          acl_free (acl);
-          chmod_or_fchmod (dst_name, dest_desc, mode);
-          errno = saved_errno;
-          return -1;
-        }
-    }
-  else
-    acl_free (acl);
-
-  /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly.  */
-  return chmod_or_fchmod (dst_name, dest_desc, mode);
-
-# endif
-
-#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-
-  /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
-     of Unixware.  The acl() call returns the access and default ACL both
-     at once.  */
-# ifdef ACE_GETACL
-  int ace_count;
-  ace_t *ace_entries;
-# endif
-  int count;
-  aclent_t *entries;
-  int did_chmod;
-  int saved_errno;
-  int ret;
-
-# ifdef ACE_GETACL
-  /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
-     file systems (whereas the other ones are used in UFS file systems).
-     There is an API
-       pathconf (name, _PC_ACL_ENABLED)
-       fpathconf (desc, _PC_ACL_ENABLED)
-     that allows to determine which of the two kinds of ACLs is supported
-     for the given file.  But some file systems may implement this call
-     incorrectly, so better not use it.
-     When fetching the source ACL, we simply fetch both ACL types.
-     When setting the destination ACL, we try either ACL types, assuming
-     that the kernel will translate the ACL from one form to the other.
-     (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
-     the description of ENOTSUP.)  */
-  for (;;)
-    {
-      ace_count = (source_desc != -1
-                   ? facl (source_desc, ACE_GETACLCNT, 0, NULL)
-                   : acl (src_name, ACE_GETACLCNT, 0, NULL));
-
-      if (ace_count < 0)
-        {
-          if (errno == ENOSYS || errno == EINVAL)
-            {
-              ace_count = 0;
-              ace_entries = NULL;
-              break;
-            }
-          else
-            return -2;
-        }
-
-      if (ace_count == 0)
-        {
-          ace_entries = NULL;
-          break;
-        }
-
-      ace_entries = (ace_t *) malloc (ace_count * sizeof (ace_t));
-      if (ace_entries == NULL)
-        {
-          errno = ENOMEM;
-          return -2;
-        }
-
-      ret = (source_desc != -1
-             ? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
-             : acl (src_name, ACE_GETACL, ace_count, ace_entries));
-      if (ret < 0)
-        {
-          free (ace_entries);
-          if (errno == ENOSYS || errno == EINVAL)
-            {
-              ace_count = 0;
-              ace_entries = NULL;
-              break;
-            }
-          else
-            return -2;
-        }
-      if (ret == ace_count)
-        break;
-      /* Huh? The number of ACL entries changed since the last call.
-         Repeat.  */
-    }
-# endif
-
-  for (;;)
-    {
-      count = (source_desc != -1
-               ? facl (source_desc, GETACLCNT, 0, NULL)
-               : acl (src_name, GETACLCNT, 0, NULL));
-
-      if (count < 0)
-        {
-          if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
-            {
-              count = 0;
-              entries = NULL;
-              break;
-            }
-          else
-            return -2;
-        }
-
-      if (count == 0)
-        {
-          entries = NULL;
-          break;
-        }
-
-      entries = (aclent_t *) malloc (count * sizeof (aclent_t));
-      if (entries == NULL)
-        {
-          errno = ENOMEM;
-          return -2;
-        }
-
-      if ((source_desc != -1
-           ? facl (source_desc, GETACL, count, entries)
-           : acl (src_name, GETACL, count, entries))
-          == count)
-        break;
-      /* Huh? The number of ACL entries changed since the last call.
-         Repeat.  */
-    }
-
-  /* Is there an ACL of either kind?  */
-# ifdef ACE_GETACL
-  if (ace_count == 0)
-# endif
-    if (count == 0)
-      return qset_acl (dst_name, dest_desc, mode);
-
-  did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
-  saved_errno = 0; /* the first non-ignorable error code */
-
-  if (!MODE_INSIDE_ACL)
-    {
-      /* On Cygwin, it is necessary to call chmod before acl, because
-         chmod can change the contents of the ACL (in ways that don't
-         change the allowed accesses, but still visible).  */
-      if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
-        saved_errno = errno;
-      did_chmod = 1;
-    }
-
-  /* If both ace_entries and entries are available, try SETACL before
-     ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
-     can.  */
-
-  if (count > 0)
-    {
-      ret = (dest_desc != -1
-             ? facl (dest_desc, SETACL, count, entries)
-             : acl (dst_name, SETACL, count, entries));
-      if (ret < 0 && saved_errno == 0)
-        {
-          saved_errno = errno;
-          if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-              && !acl_nontrivial (count, entries))
-            saved_errno = 0;
-        }
-      else
-        did_chmod = 1;
-    }
-  free (entries);
-
-# ifdef ACE_GETACL
-  if (ace_count > 0)
-    {
-      ret = (dest_desc != -1
-             ? facl (dest_desc, ACE_SETACL, ace_count, ace_entries)
-             : acl (dst_name, ACE_SETACL, ace_count, ace_entries));
-      if (ret < 0 && saved_errno == 0)
-        {
-          saved_errno = errno;
-          if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
-              && !acl_ace_nontrivial (ace_count, ace_entries))
-            saved_errno = 0;
-        }
-    }
-  free (ace_entries);
-# endif
-
-  if (MODE_INSIDE_ACL
-      && did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
-    {
-      /* We did not call chmod so far, and either the mode and the ACL are
-         separate or special bits are to be set which don't fit into ACLs.  */
-
-      if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
-        {
-          if (saved_errno == 0)
-            saved_errno = errno;
-        }
-    }
-
-  if (saved_errno)
-    {
-      errno = saved_errno;
-      return -1;
-    }
-  return 0;
-
-#elif USE_ACL && HAVE_GETACL /* HP-UX */
-
-  struct acl_entry entries[NACLENTRIES];
-  int count;
-# if HAVE_ACLV_H
-  struct acl aclv_entries[NACLVENTRIES];
-  int aclv_count;
-# endif
-  int did_chmod;
-  int saved_errno;
-  int ret;
-
-  count = (source_desc != -1
-           ? fgetacl (source_desc, NACLENTRIES, entries)
-           : getacl (src_name, NACLENTRIES, entries));
-
-  if (count < 0)
-    {
-      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
-        count = 0;
-      else
-        return -2;
-    }
-  else if (count > 0)
-    {
-      if (count > NACLENTRIES)
-        /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
-        abort ();
-    }
-
-# if HAVE_ACLV_H
-  aclv_count = acl ((char *) src_name, ACL_GET, NACLVENTRIES, aclv_entries);
-
-  if (aclv_count < 0)
-    {
-      if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-        count = 0;
-      else
-        return -2;
-    }
-  else if (aclv_count > 0)
-    {
-      if (aclv_count > NACLVENTRIES)
-        /* If NACLVENTRIES cannot be trusted, use dynamic memory allocation.  
*/
-        abort ();
-    }
-# endif
-
-  if (count == 0)
-# if HAVE_ACLV_H
-    if (aclv_count == 0)
-# endif
-      return qset_acl (dst_name, dest_desc, mode);
-
-  did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
-  saved_errno = 0; /* the first non-ignorable error code */
-
-  if (count > 0)
-    {
-      ret = (dest_desc != -1
-             ? fsetacl (dest_desc, count, entries)
-             : setacl (dst_name, count, entries));
-      if (ret < 0 && saved_errno == 0)
-        {
-          saved_errno = errno;
-          if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP
-             && !acl_nontrivial (count, entries))
-               saved_errno = 0;
-        }
-      else
-        did_chmod = 1;
-    }
-
-# if HAVE_ACLV_H
-  if (aclv_count > 0)
-    {
-      ret = acl ((char *) dst_name, ACL_SET, aclv_count, aclv_entries);
-      if (ret < 0 && saved_errno == 0)
-        {
-          saved_errno = errno;
-          if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-            {
-              if (!aclv_nontrivial (aclv_count, aclv_entries))
-                saved_errno = 0;
-            }
-        }
-      else
-        did_chmod = 1;
-    }
-# endif
-
-  if (did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
-    {
-      /* We did not call chmod so far, and special bits are to be set which
-         don't fit into ACLs.  */
-
-      if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
-        {
-          if (saved_errno == 0)
-            saved_errno = errno;
-        }
-    }
-
-  if (saved_errno)
-    {
-      errno = saved_errno;
-      return -1;
-    }
-  return 0;
-
-#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
-
-  /* TODO */
-
-#elif USE_ACL && HAVE_STATACL /* older AIX */
-
-  union { struct acl a; char room[4096]; } u;
-  int ret;
-
-  if ((source_desc != -1
-       ? fstatacl (source_desc, STX_NORMAL, &u.a, sizeof (u))
-       : statacl (src_name, STX_NORMAL, &u.a, sizeof (u)))
-      < 0)
     return -2;
-
-  ret = (dest_desc != -1
-         ? fchacl (dest_desc, &u.a, u.a.acl_len)
-         : chacl (dst_name, &u.a, u.a.acl_len));
-  if (ret < 0)
-    {
-      int saved_errno = errno;
-
-      chmod_or_fchmod (dst_name, dest_desc, mode);
-      errno = saved_errno;
-      return -1;
-    }
-
-  /* No need to call chmod_or_fchmod at this point, since the mode bits
-     S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL.  */
-
-  return 0;
-
-#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
-
-  struct acl entries[NACLENTRIES];
-  int count;
-  int ret;
-
-  count = acl ((char *) src_name, ACL_GET, NACLENTRIES, entries);
-
-  if (count < 0)
-    {
-      if (0)
-        count = 0;
-      else
-        return -2;
-    }
-  else if (count > 0)
-    {
-      if (count > NACLENTRIES)
-        /* If NACLENTRIES cannot be trusted, use dynamic memory allocation.  */
-        abort ();
-    }
-
-  if (count == 0)
-    return qset_acl (dst_name, dest_desc, mode);
-
-  ret = acl ((char *) dst_name, ACL_SET, count, entries);
-  if (ret < 0)
-    {
-      int saved_errno = errno;
-
-      if (0)
-        {
-          if (!acl_nontrivial (count, entries))
-            return chmod_or_fchmod (dst_name, dest_desc, mode);
-        }
-
-      chmod_or_fchmod (dst_name, dest_desc, mode);
-      errno = saved_errno;
-      return -1;
-    }
-
-  if (mode & (S_ISUID | S_ISGID | S_ISVTX))
-    {
-      /* We did not call chmod so far, and either the mode and the ACL are
-         separate or special bits are to be set which don't fit into ACLs.  */
-
-      return chmod_or_fchmod (dst_name, dest_desc, mode);
-    }
-  return 0;
-
-#else
-
-  return qset_acl (dst_name, dest_desc, mode);
-
-#endif
+  ret = set_permissions (&ctx, dst_name, dest_desc);
+  free_permission_context (&ctx);
+  return ret;
 }
diff --git a/lib/qset-acl.c b/lib/set-permissions.c
similarity index 54%
rename from lib/qset-acl.c
rename to lib/set-permissions.c
index bb4b0b2..ba291f3 100644
--- a/lib/qset-acl.c
+++ b/lib/set-permissions.c
@@ -1,4 +1,4 @@
-/* qset-acl.c - set access control list equivalent to a mode
+/* set-permissions.c - set permissions of a file
 
    Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
 
@@ -15,182 +15,43 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-   Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible.  */
+   Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible.  */
 
 #include <config.h>
 
-#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
-
 #include "acl.h"
 
 #include "acl-internal.h"
 
-
-/* If DESC is a valid file descriptor use fchmod to change the
-   file's mode to MODE on systems that have fchmod. On systems
-   that don't have fchmod and if DESC is invalid, use chmod on
-   NAME instead.
-   Return 0 if successful.  Return -1 and set errno upon failure.  */
-
-int
-chmod_or_fchmod (const char *name, int desc, mode_t mode)
-{
-  if (HAVE_FCHMOD && desc != -1)
-    return fchmod (desc, mode);
-  else
-    return chmod (name, mode);
-}
-
-/* Set the access control lists of a file. If DESC is a valid file
-   descriptor, use file descriptor operations where available, else use
-   filename based operations on NAME.  If access control lists are not
-   available, fchmod the target file to MODE.  Also sets the
-   non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
-   to those from MODE if any are set.
-   Return 0 if successful.  Return -1 and set errno upon failure.  */
-
-int
-qset_acl (char const *name, int desc, mode_t mode)
-{
 #if USE_ACL
-# if HAVE_ACL_GET_FILE
-  /* POSIX 1003.1e draft 17 (abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
-#  if !HAVE_ACL_TYPE_EXTENDED
-  /* Linux, FreeBSD, IRIX, Tru64 */
-
-  /* We must also have acl_from_text and acl_delete_def_file.
-     (acl_delete_def_file could be emulated with acl_init followed
-      by acl_set_file, but acl_set_file with an empty acl is
-      unspecified.)  */
-
-#   ifndef HAVE_ACL_FROM_TEXT
-#    error Must have acl_from_text (see POSIX 1003.1e draft 17).
-#   endif
-#   ifndef HAVE_ACL_DELETE_DEF_FILE
-#    error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
-#   endif
-
-  acl_t acl;
-  int ret;
-
-  if (HAVE_ACL_FROM_MODE) /* Linux */
-    {
-      acl = acl_from_mode (mode);
-      if (!acl)
-        return -1;
-    }
-  else /* FreeBSD, IRIX, Tru64 */
-    {
-      /* If we were to create the ACL using the functions acl_init(),
-         acl_create_entry(), acl_set_tag_type(), acl_set_qualifier(),
-         acl_get_permset(), acl_clear_perm[s](), acl_add_perm(), we
-         would need to create a qualifier.  I don't know how to do this.
-         So create it using acl_from_text().  */
-
-#   if HAVE_ACL_FREE_TEXT /* Tru64 */
-      char acl_text[] = "u::---,g::---,o::---,";
-#   else /* FreeBSD, IRIX */
-      char acl_text[] = "u::---,g::---,o::---";
-#   endif
-
-      if (mode & S_IRUSR) acl_text[ 3] = 'r';
-      if (mode & S_IWUSR) acl_text[ 4] = 'w';
-      if (mode & S_IXUSR) acl_text[ 5] = 'x';
-      if (mode & S_IRGRP) acl_text[10] = 'r';
-      if (mode & S_IWGRP) acl_text[11] = 'w';
-      if (mode & S_IXGRP) acl_text[12] = 'x';
-      if (mode & S_IROTH) acl_text[17] = 'r';
-      if (mode & S_IWOTH) acl_text[18] = 'w';
-      if (mode & S_IXOTH) acl_text[19] = 'x';
-
-      acl = acl_from_text (acl_text);
-      if (!acl)
-        return -1;
-    }
-  if (HAVE_ACL_SET_FD && desc != -1)
-    ret = acl_set_fd (desc, acl);
-  else
-    ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
-  if (ret != 0)
-    {
-      int saved_errno = errno;
-      acl_free (acl);
-      if (! acl_errno_valid (errno))
-        return chmod_or_fchmod (name, desc, mode);
-      errno = saved_errno;
-      return -1;
-    }
-  else
-    acl_free (acl);
-
-  if (S_ISDIR (mode) && acl_delete_def_file (name))
-    return -1;
-
-  if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
-    {
-      /* We did not call chmod so far, and either the mode and the ACL are
-         separate or special bits are to be set which don't fit into ACLs.  */
-      return chmod_or_fchmod (name, desc, mode);
-    }
-  return 0;
-
-#  else /* HAVE_ACL_TYPE_EXTENDED */
-  /* Mac OS X */
-
-  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
-     and           acl_get_file (name, ACL_TYPE_DEFAULT)
-     always return NULL / EINVAL.  You have to use
-                   acl_get_file (name, ACL_TYPE_EXTENDED)
-     or            acl_get_fd (open (name, ...))
-     to retrieve an ACL.
-     On the other hand,
-                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
-     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
-     have the same effect as
-                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
-     Each of these calls sets the file's ACL.  */
-
-  acl_t acl;
-  int ret;
-
-  /* Remove the ACL if the file has ACLs.  */
-  if (HAVE_ACL_GET_FD && desc != -1)
-    acl = acl_get_fd (desc);
-  else
-    acl = acl_get_file (name, ACL_TYPE_EXTENDED);
-  if (acl)
-    {
-      acl_free (acl);
-
-      acl = acl_init (0);
-      if (acl)
-        {
-          if (HAVE_ACL_SET_FD && desc != -1)
-            ret = acl_set_fd (desc, acl);
-          else
-            ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
-          if (ret != 0)
-            {
-              int saved_errno = errno;
-              acl_free (acl);
-              if (! acl_errno_valid (saved_errno))
-                return chmod_or_fchmod (name, desc, mode);
-              errno = saved_errno;
-              return -1;
-            }
-          acl_free (acl);
-        }
-    }
-
-  /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly.  */
-  return chmod_or_fchmod (name, desc, mode);
+# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, 
IRIX, Tru64 */
+static acl_t
+acl_from_mode (mode_t mode)
+{
+#  if HAVE_ACL_FREE_TEXT /* Tru64 */
+  char acl_text[] = "u::---,g::---,o::---,";
+#  else /* FreeBSD, IRIX */
+  char acl_text[] = "u::---,g::---,o::---";
 #  endif
 
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-
-  int done_setacl = 0;
+  if (mode & S_IRUSR) acl_text[ 3] = 'r';
+  if (mode & S_IWUSR) acl_text[ 4] = 'w';
+  if (mode & S_IXUSR) acl_text[ 5] = 'x';
+  if (mode & S_IRGRP) acl_text[10] = 'r';
+  if (mode & S_IWGRP) acl_text[11] = 'w';
+  if (mode & S_IXGRP) acl_text[12] = 'x';
+  if (mode & S_IROTH) acl_text[17] = 'r';
+  if (mode & S_IWOTH) acl_text[18] = 'w';
+  if (mode & S_IXOTH) acl_text[19] = 'x';
+
+  return acl_from_text (acl_text);
+}
+# endif
 
+# if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+static int
+set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
+{
 #  ifdef ACE_GETACL
   /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
      file systems (whereas the other ones are used in UFS file systems).  */
@@ -365,53 +226,53 @@ qset_acl (char const *name, int desc, mode_t mode)
       if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
         {
           if (errno == ENOSYS)
-            return chmod_or_fchmod (name, desc, mode);
+           {
+             *must_chmod = true;
+             return 0;
+           }
           return -1;
         }
       if (ret == 0)
-        done_setacl = 1;
+       return 0;
     }
 #  endif
 
-  if (!done_setacl)
-    {
-      aclent_t entries[3];
-      int ret;
-
-      entries[0].a_type = USER_OBJ;
-      entries[0].a_id = 0; /* irrelevant */
-      entries[0].a_perm = (mode >> 6) & 7;
-      entries[1].a_type = GROUP_OBJ;
-      entries[1].a_id = 0; /* irrelevant */
-      entries[1].a_perm = (mode >> 3) & 7;
-      entries[2].a_type = OTHER_OBJ;
-      entries[2].a_id = 0;
-      entries[2].a_perm = mode & 7;
-
-      if (desc != -1)
-        ret = facl (desc, SETACL,
-                    sizeof (entries) / sizeof (aclent_t), entries);
-      else
-        ret = acl (name, SETACL,
-                   sizeof (entries) / sizeof (aclent_t), entries);
-      if (ret < 0)
-        {
-          if (errno == ENOSYS || errno == EOPNOTSUPP)
-            return chmod_or_fchmod (name, desc, mode);
-          return -1;
-        }
-    }
-
-  if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
-    {
-      /* We did not call chmod so far, so the special bits have not yet
-         been set.  */
-      return chmod_or_fchmod (name, desc, mode);
-    }
-  return 0;
+  {
+    aclent_t entries[3];
+    int ret;
+
+    entries[0].a_type = USER_OBJ;
+    entries[0].a_id = 0; /* irrelevant */
+    entries[0].a_perm = (mode >> 6) & 7;
+    entries[1].a_type = GROUP_OBJ;
+    entries[1].a_id = 0; /* irrelevant */
+    entries[1].a_perm = (mode >> 3) & 7;
+    entries[2].a_type = OTHER_OBJ;
+    entries[2].a_id = 0;
+    entries[2].a_perm = mode & 7;
 
-# elif HAVE_GETACL /* HP-UX */
+    if (desc != -1)
+      ret = facl (desc, SETACL,
+                 sizeof (entries) / sizeof (aclent_t), entries);
+    else
+      ret = acl (name, SETACL,
+                sizeof (entries) / sizeof (aclent_t), entries);
+    if (ret < 0)
+      {
+       if (errno == ENOSYS || errno == EOPNOTSUPP)
+         {
+           *must_chmod = true;
+           return 0;
+         }
+       return -1;
+      }
+  }
+}
 
+#elif HAVE_GETACL /* HP-UX */
+static int
+context_acl_from_mode (struct permission_context *ctx, const char *name, int 
desc)
+{
   struct stat statbuf;
   int ret;
 
@@ -422,87 +283,60 @@ qset_acl (char const *name, int desc, mode_t mode)
   if (ret < 0)
     return -1;
 
-  {
-    struct acl_entry entries[3];
-
-    entries[0].uid = statbuf.st_uid;
-    entries[0].gid = ACL_NSGROUP;
-    entries[0].mode = (mode >> 6) & 7;
-    entries[1].uid = ACL_NSUSER;
-    entries[1].gid = statbuf.st_gid;
-    entries[1].mode = (mode >> 3) & 7;
-    entries[2].uid = ACL_NSUSER;
-    entries[2].gid = ACL_NSGROUP;
-    entries[2].mode = mode & 7;
-
-    if (desc != -1)
-      ret = fsetacl (desc, sizeof (entries) / sizeof (struct acl_entry), 
entries);
-    else
-      ret = setacl (name, sizeof (entries) / sizeof (struct acl_entry), 
entries);
-  }
-  if (ret < 0)
-    {
-      if (!(errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP))
-        return -1;
+  ctx->entries[0].uid = statbuf.st_uid;
+  ctx->entries[0].gid = ACL_NSGROUP;
+  ctx->entries[0].mode = (mode >> 6) & 7;
+  ctx->entries[1].uid = ACL_NSUSER;
+  ctx->entries[1].gid = statbuf.st_gid;
+  ctx->entries[1].mode = (mode >> 3) & 7;
+  ctx->entries[2].uid = ACL_NSUSER;
+  ctx->entries[2].gid = ACL_NSGROUP;
+  ctx->entries[2].mode = mode & 7;
+  ctx->count = 3;
+  return 0;
+}
 
 #  if HAVE_ACLV_H /* HP-UX >= 11.11 */
-      {
-        struct acl entries[4];
-
-        entries[0].a_type = USER_OBJ;
-        entries[0].a_id = 0; /* irrelevant */
-        entries[0].a_perm = (mode >> 6) & 7;
-        entries[1].a_type = GROUP_OBJ;
-        entries[1].a_id = 0; /* irrelevant */
-        entries[1].a_perm = (mode >> 3) & 7;
-        entries[2].a_type = CLASS_OBJ;
-        entries[2].a_id = 0;
-        entries[2].a_perm = (mode >> 3) & 7;
-        entries[3].a_type = OTHER_OBJ;
-        entries[3].a_id = 0;
-        entries[3].a_perm = mode & 7;
-
-        ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
-        if (ret > 0)
-          abort ();
-        if (ret < 0)
-          {
-            if (0)
-              return chmod_or_fchmod (name, desc, mode);
-            return -1;
-          }
+static int
+context_aclv_from_mode (struct permission_context *ctx)
+{
+  int ret;
 
-        ret = acl ((char *) name, ACL_SET,
-                   sizeof (entries) / sizeof (struct acl), entries);
-        if (ret < 0)
-          {
-            if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
-              return chmod_or_fchmod (name, desc, mode);
-            return -1;
-          }
-      }
-#  else
-      return chmod_or_fchmod (name, desc, mode);
-#  endif
-    }
+  ctx->aclv_entries[0].a_type = USER_OBJ;
+  ctx->aclv_entries[0].a_id = 0; /* irrelevant */
+  ctx->aclv_entries[0].a_perm = (mode >> 6) & 7;
+  ctx->aclv_entries[1].a_type = GROUP_OBJ;
+  ctx->aclv_entries[1].a_id = 0; /* irrelevant */
+  ctx->aclv_entries[1].a_perm = (mode >> 3) & 7;
+  ctx->aclv_entries[2].a_type = CLASS_OBJ;
+  ctx->aclv_entries[2].a_id = 0;
+  ctx->aclv_entries[2].a_perm = (mode >> 3) & 7;
+  ctx->aclv_entries[3].a_type = OTHER_OBJ;
+  ctx->aclv_entries[3].a_id = 0;
+  ctx->aclv_entries[3].a_perm = mode & 7;
+  ctx->aclv_count = 4;
 
-  if (mode & (S_ISUID | S_ISGID | S_ISVTX))
-    {
-      /* We did not call chmod so far, so the special bits have not yet
-         been set.  */
-      return chmod_or_fchmod (name, desc, mode);
-    }
-  return 0;
+  ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
+  if (ret > 0)
+    abort ();
+  return ret;
+}
+#endif
 
 # elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
-
+static int
+set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
+{
   acl_type_list_t types;
   size_t types_size = sizeof (types);
   acl_type_t type;
 
   if (aclx_gettypes (name, &types, &types_size) < 0
       || types.num_entries == 0)
-    return chmod_or_fchmod (name, desc, mode);
+    {
+      *must_chmod = true;
+      return 0;
+    }
 
   /* XXX Do we need to clear all types of ACLs for the given file, or is it
      sufficient to clear the first one?  */
@@ -599,78 +433,402 @@ qset_acl (char const *name, int desc, mode_t mode)
         return ret;
     }
 
-  return chmod_or_fchmod (name, desc, mode);
+  *must_chmod = true;
+  return 0;
+}
 
 # elif HAVE_STATACL /* older AIX */
+static int
+context_acl_from_mode (struct permission_context *ctx)
+{
+  ctx->u.a.acl_len = (char *) &ctx->u.a.acl_ext[0] - (char *) &ctx->u.a; /* no 
entries */
+  ctx->u.a.acl_mode = ctx->mode & ~(S_IXACL | 0777);
+  ctx->u.a.u_access = (ctx->mode >> 6) & 7;
+  ctx->u.a.g_access = (ctx->mode >> 3) & 7;
+  ctx->u.a.o_access = ctx->mode & 7;
+  ctx->have_u = true;
+  return 0;
+}
 
-  union { struct acl a; char room[128]; } u;
+# elif HAVE_ACLSORT /* NonStop Kernel */
+static int
+context_acl_from_mode (struct permission_context *ctx)
+{
   int ret;
 
-  u.a.acl_len = (char *) &u.a.acl_ext[0] - (char *) &u.a; /* no entries */
-  u.a.acl_mode = mode & ~(S_IXACL | 0777);
-  u.a.u_access = (mode >> 6) & 7;
-  u.a.g_access = (mode >> 3) & 7;
-  u.a.o_access = mode & 7;
+  ctx->entries[0].a_type = USER_OBJ;
+  ctx->entries[0].a_id = 0; /* irrelevant */
+  ctx->entries[0].a_perm = (mode >> 6) & 7;
+  ctx->entries[1].a_type = GROUP_OBJ;
+  ctx->entries[1].a_id = 0; /* irrelevant */
+  ctx->entries[1].a_perm = (mode >> 3) & 7;
+  ctx->entries[2].a_type = CLASS_OBJ;
+  ctx->entries[2].a_id = 0;
+  ctx->entries[2].a_perm = (mode >> 3) & 7;
+  ctx->entries[3].a_type = OTHER_OBJ;
+  ctx->entries[3].a_id = 0;
+  ctx->entries[3].a_perm = mode & 7;
+  ctx->count = 4;
 
-  if (desc != -1)
-    ret = fchacl (desc, &u.a, u.a.acl_len);
+  ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
+  if (ret > 0)
+    abort ();
+  return ret;
+}
+# endif
+
+static int
+set_acls (struct permission_context *ctx, const char *name, int desc,
+         int from_mode, bool *must_chmod, bool *acls_set)
+{
+  int ret = 0;
+
+#if HAVE_ACL_GET_FILE
+  /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
+  /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+#  if !HAVE_ACL_TYPE_EXTENDED
+  /* Linux, FreeBSD, IRIX, Tru64 */
+
+#    ifndef HAVE_ACL_FROM_TEXT
+#     error Must have acl_from_text (see POSIX 1003.1e draft 17).
+#    endif
+#    ifndef HAVE_ACL_DELETE_DEF_FILE
+#     error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
+#    endif
+
+  if (! ctx->acls_not_supported)
+    {
+      if (ret == 0 && from_mode)
+       {
+         if (ctx->acl)
+           acl_free (ctx->acl);
+         ctx->acl = acl_from_mode (ctx->mode);
+         if (ctx->acl == NULL)
+           ret = -1;
+       }
+
+      if (ret == 0 && ctx->acl)
+       {
+         if (HAVE_ACL_SET_FD && desc != -1)
+           ret = acl_set_fd (desc, ctx->acl);
+         else
+           ret = acl_set_file (name, ACL_TYPE_ACCESS, ctx->acl);
+         if (ret != 0)
+           {
+             if (! acl_errno_valid (errno))
+               {
+                 ctx->acls_not_supported = true;
+                 if (from_mode || acl_access_nontrivial (ctx->acl) == 0)
+                   ret = 0;
+               }
+           }
+         else
+           {
+             *acls_set = true;
+             if (S_ISDIR(ctx->mode))
+               {
+                 if (! from_mode && ctx->default_acl)
+                   ret = acl_set_file (name, ACL_TYPE_DEFAULT,
+                                       ctx->default_acl);
+                 else
+                   ret = acl_delete_def_file (name);
+               }
+           }
+       }
+    }
+
+#  else /* HAVE_ACL_TYPE_EXTENDED */
+  /* Mac OS X */
+
+  /* On Mac OS X,  acl_get_file (name, ACL_TYPE_ACCESS)
+     and           acl_get_file (name, ACL_TYPE_DEFAULT)
+     always return NULL / EINVAL.  You have to use
+                   acl_get_file (name, ACL_TYPE_EXTENDED)
+     or            acl_get_fd (open (name, ...))
+     to retrieve an ACL.
+     On the other hand,
+                   acl_set_file (name, ACL_TYPE_ACCESS, acl)
+     and           acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+     have the same effect as
+                   acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+     Each of these calls sets the file's ACL.  */
+
+  if (ctx->acl == NULL)
+    {
+      acl_t acl;
+
+      /* Remove ACLs if the file has ACLs.  */
+      if (HAVE_ACL_GET_FD && desc != -1)
+       acl = acl_get_fd (desc);
+      else
+       acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+      if (acl)
+       {
+         acl_free (acl);
+
+         acl = acl_init (0);
+         if (acl)
+           {
+             if (HAVE_ACL_SET_FD && desc != -1)
+               ret = acl_set_fd (desc, acl);
+             else
+               ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
+             acl_free (acl);
+           }
+         else
+           ret = -1;
+       }
+    }
   else
-    ret = chacl (name, &u.a, u.a.acl_len);
+    {
+      if (HAVE_ACL_SET_FD && desc != -1)
+       ret = acl_set_fd (desc, ctx->acl);
+      else
+       ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
+      if (ret != 0)
+       {
+         if (! acl_errno_valid (errno)
+             && ! acl_extended_nontrivial (ctx->acl))
+           ret = 0;
+       }
+    }
+  *acls_set = true;
 
-  if (ret < 0 && errno == ENOSYS)
-    return chmod_or_fchmod (name, desc, mode);
+#  endif
 
-  return ret;
+# elif defined GETACL /* Solaris, Cygwin, not HP-UX */
 
-# elif HAVE_ACLSORT /* NonStop Kernel */
+  /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+     of Unixware.  The acl() call returns the access and default ACL both
+     at once.  */
 
-  struct acl entries[4];
-  int ret;
+  /* If both ace_entries and entries are available, try SETACL before
+     ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
+     can.  */
 
-  entries[0].a_type = USER_OBJ;
-  entries[0].a_id = 0; /* irrelevant */
-  entries[0].a_perm = (mode >> 6) & 7;
-  entries[1].a_type = GROUP_OBJ;
-  entries[1].a_id = 0; /* irrelevant */
-  entries[1].a_perm = (mode >> 3) & 7;
-  entries[2].a_type = CLASS_OBJ;
-  entries[2].a_id = 0;
-  entries[2].a_perm = (mode >> 3) & 7;
-  entries[3].a_type = OTHER_OBJ;
-  entries[3].a_id = 0;
-  entries[3].a_perm = mode & 7;
+  if (from_mode)
+    return set_acls_from_mode (name, desc, ctx->mode, must_chmod);
 
-  ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
-  if (ret > 0)
-    abort ();
-  if (ret < 0)
+  if (ret == 0 && ctx->count)
     {
-      if (0)
-        return chmod_or_fchmod (name, desc, mode);
-      return -1;
+      if (desc != -1)
+       ret = facl (desc, SETACL, ctx->count, ctx->entries);
+      else
+       ret = acl (name, SETACL, ctx->count, ctx->entries);
+      if (ret < 0)
+       {
+         if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+             && acl_nontrivial (ctx->count, ctx->entries) == 0)
+           ret = 0;
+       }
+      else
+       *acls_set = true;
     }
 
-  ret = acl ((char *) name, ACL_SET,
-             sizeof (entries) / sizeof (struct acl), entries);
-  if (ret < 0)
+#  ifdef ACE_GETACL
+  if (ret == 0 && ctx->ace_count)
     {
-      if (0)
-        return chmod_or_fchmod (name, desc, mode);
-      return -1;
+      if (desc != -1)
+       ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+      else
+       ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+      if (ret < 0)
+       {
+         if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
+             && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
+           ret = 0;
+       }
+      else
+       *acls_set = true;
     }
+# endif
+
+#elif HAVE_GETACL /* HP-UX */
 
-  if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+  if (from_mode)
+    ret = context_acl_from_mode (ctx, name, desc);
+
+  if (ret == 0 && ctx->count > 0)
     {
-      /* We did not call chmod so far, so the special bits have not yet
-         been set.  */
-      return chmod_or_fchmod (name, desc, mode);
+      if (desc != -1)
+       ret = fsetacl (desc, ctx->count, ctx->entries);
+      else
+       ret = setacl (name, ctx->count, ctx->entries);
+      if (ret < 0)
+       {
+         if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+             && (from_mode || !acl_nontrivial (ctx->count, ctx->entries, 
&source_statbuf)))
+           ret = 0;
+       }
+      else
+       *acls_set = true;
     }
-  return 0;
 
-# else /* Unknown flavor of ACLs */
-  return chmod_or_fchmod (name, desc, mode);
+#  if HAVE_ACLV_H
+  if (from_mode)
+    ret = context_aclv_from_mode (ctx);
+
+  if (ret == 0 && ctx->aclv_count > 0)
+    {
+      ret = acl ((char *) name, ACL_SET, ctx->aclv_count, ctx->aclv_entries);
+      if (ret < 0)
+       {
+         if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+             && (from_mode || !aclv_nontrivial (ctx->aclv_count, 
ctx->aclv_entries)))
+           ret = 0;
+       }
+      else
+       *acls_set = true;
+    }
+#  endif
+
+# elif HAVE_ACLX_GET && ACL_AIX_WIP /* AIX */
+
+  /* TODO: Implement setting ACLs once get_permissions() reads them. */
+
+  if (from_mode)
+    ret = set_acls_from_mode (name, desc, mode, must_chmod);
+
+# elif HAVE_STATACL /* older AIX */
+
+  if (from_mode)
+    ret = context_acl_from_mode (ctx);
+
+  if (ret == 0 && ctx->have_u)
+    {
+      if (desc != -1)
+       ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
+      else
+       ret = chacl (name, &ctx->u.a, ctx->u.a.acl_len);
+      if (ret < 0)
+       {
+         if (errno == ENOSYS && from_mode)
+           ret = 0;
+       }
+      else
+       *acls_set = true;
+    }
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+
+  if (from_mode)
+    ret = context_acl_from_mode (ctx);
+
+  if (ret == 0 && ctx->count)
+    {
+      ret = acl ((char *) name, ACL_SET, ctx->count, ctx->entries);
+      if (ret != 0)
+       {
+         if (!acl_nontrivial (ctx->count, ctx->entries))
+           ret = 0;
+       }
+      else
+       *acls_set = true;
+    }
+
+# else  /* No ACLs */
+
+  /* Nothing to do. */
+
+#endif
+
+  return ret;
+}
+#endif
+
+/* If DESC is a valid file descriptor use fchmod to change the
+   file's mode to MODE on systems that have fchmod. On systems
+   that don't have fchmod and if DESC is invalid, use chmod on
+   NAME instead.
+   Return 0 if successful.  Return -1 and set errno upon failure.  */
+
+int
+chmod_or_fchmod (const char *name, int desc, mode_t mode)
+{
+  if (HAVE_FCHMOD && desc != -1)
+    return fchmod (desc, mode);
+  else
+    return chmod (name, mode);
+}
+
+/* Set the permissions in CTX on a file. If DESC is a valid file descriptor,
+   use file descriptor operations, else use filename based operations on NAME.
+   If access control lists are not available, fchmod the target file to the
+   mode in CTX.  Also sets the non-permission bits of the destination file
+   (S_ISUID, S_ISGID, S_ISVTX) to those from the mode in CTX if any are set.
+   Return 0 if successful.  Return -1 and set errno upon failure.  */
+
+int
+set_permissions (struct permission_context *ctx, const char *name, int desc)
+{
+  bool acls_set _GL_UNUSED = false;
+  bool early_chmod;
+  bool must_chmod = false;
+  int ret = 0;
+
+#if USE_ACL
+# if HAVE_STATACL
+  /* older AIX */
+  /* There is no need to call chmod_or_fchmod, since the mode
+     bits S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL.  */
+
+  early_chmod = false;
+# else
+  /* All other plaforms */
+  /* On Cygwin, it is necessary to call chmod before acl, because
+     chmod can change the contents of the ACL (in ways that don't
+     change the allowed accesses, but still visible).  */
+
+  early_chmod = (! MODE_INSIDE_ACL || (ctx->mode & (S_ISUID | S_ISGID | 
S_ISVTX)));
 # endif
-#else /* !USE_ACL */
-  return chmod_or_fchmod (name, desc, mode);
+#else
+  /* No ACLs */
+
+  early_chmod = true;
 #endif
+
+  if (early_chmod)
+    {
+      ret = chmod_or_fchmod (name, desc, ctx->mode);
+      if (ret != 0)
+       return -1;
+    }
+
+#if USE_ACL
+  ret = set_acls (ctx, name, desc, false, &must_chmod, &acls_set);
+  if (! acls_set)
+    {
+      int saved_errno = ret ? errno : 0;
+
+      /* If we can't set an acl which we expect to be able to set, try setting
+        the permissions to ctx->mode. Doe to possible inherited permissions,
+        we cannot simply chmod.  */
+
+      acls_set = false;
+      ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set);
+      if (! acls_set)
+       must_chmod = true;
+
+      if (saved_errno)
+       {
+         errno = saved_errno;
+         ret = -1;
+       }
+    }
+#endif
+
+  if (must_chmod && ! early_chmod)
+    {
+      int saved_errno = ret ? errno : 0;
+
+      ret = chmod_or_fchmod (name, desc, ctx->mode);
+
+      if (saved_errno)
+       {
+         errno = saved_errno;
+         ret = -1;
+       }
+    }
+
+  return ret;
 }
diff --git a/lib/string.in.h b/lib/string.in.h
index ebd727e..2abd6bc 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -15,16 +15,32 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef address@hidden@_STRING_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#if defined _GL_ALREADY_INCLUDING_STRING_H
+/* Special invocation convention:
+   - On OS X/NetBSD we have a sequence of nested includes
+       <string.h> -> <strings.h> -> "string.h"
+     In this situation system _chk variants due to -D_FORTIFY_SOURCE
+     might be used after any replacements defined here.  */
+
address@hidden@ @NEXT_STRING_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef address@hidden@_STRING_H
+
+#define _GL_ALREADY_INCLUDING_STRING_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STRING_H@
 
+#undef _GL_ALREADY_INCLUDING_STRING_H
+
 #ifndef address@hidden@_STRING_H
 #define address@hidden@_STRING_H
 
@@ -1027,3 +1043,4 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
 
 #endif /* address@hidden@_STRING_H */
 #endif /* address@hidden@_STRING_H */
+#endif
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 063e4ba..5f2fc8f 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1811,11 +1811,38 @@ This doesn't recover lost files, it just undoes changes 
in the buffer itself."
 (defun archive-zip-summarize ()
   (goto-char (- (point-max) (- 22 18)))
   (search-backward-regexp "[P]K\005\006")
-  (let ((p (+ (point-min) (archive-l-e (+ (point) 16) 4)))
+  (let ((p (archive-l-e (+ (point) 16) 4))
         (maxlen 8)
        (totalsize 0)
         files
-       visual)
+       visual
+        emacs-int-has-32bits)
+    (when (= p -1)
+      ;; If the offset of end-of-central-directory is -1, this is a
+      ;; Zip64 extended ZIP file format, and we need to glean the info
+      ;; from Zip64 records instead.
+      ;;
+      ;; First, find the Zip64 end-of-central-directory locator.
+      (search-backward "PK\006\007")
+      ;; Pay attention: the offset of Zip64 end-of-central-directory
+      ;; is a 64-bit field, so it could overflow the Emacs integer
+      ;; even on a 64-bit host, let alone 32-bit one.  But since we've
+      ;; already read the zip file into a buffer, and this is a byte
+      ;; offset into the file we've read, it must be short enough, so
+      ;; such an overflow can never happen, and we can safely read
+      ;; these 8 bytes into an Emacs integer.  Moreover, on host with
+      ;; 32-bit Emacs integer we can only read 4 bytes, since they are
+      ;; stored in little-endian byte order.
+      (setq emacs-int-has-32bits (<= most-positive-fixnum #x1fffffff))
+      (setq p (+ (point-min)
+                 (archive-l-e (+ (point) 8) (if emacs-int-has-32bits 4 8))))
+      (goto-char p)
+      ;; We should be at Zip64 end-of-central-directory record now.
+      (or (string= "PK\006\006" (buffer-substring p (+ p 4)))
+          (error "Unrecognized ZIP file format"))
+      ;; Offset to central directory:
+      (setq p (+ (point-min)
+                 (archive-l-e (+ p 48) (if emacs-int-has-32bits 4 8)))))
     (while (string= "PK\001\002" (buffer-substring p (+ p 4)))
       (let* ((creator (byte-after (+ p 5)))
             ;; (method  (archive-l-e (+ p 10) 2))
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 17e5b0f..aace2a9 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -365,21 +365,23 @@ C-w  Describe how there is no warranty for Calc."
     (let (Info-history)
       (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
     (or (let ((case-fold-search nil))
-         (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target (regexp-quote thing))
-                                         (or target (regexp-quote thing))
-                                         (or target (regexp-quote thing))) nil 
t)
+         (or (re-search-forward
+               (format "\\[[`‘]%s['’]\\]\\|([`‘]%s['’])\\|\\<The[ 
\n][`‘]%s['’]"
+                       (or target (regexp-quote thing))
+                       (or target (regexp-quote thing))
+                       (or target (regexp-quote thing))) nil t)
              (and not-quoted
                   (let ((case-fold-search t))
                     (search-forward (or target thing) nil t)))
-             (search-forward (format "`%s'" (or target thing)) nil t)
+             (search-forward (format "[`‘]%s['’]" (or target thing)) nil t)
              (search-forward (or target thing) nil t)))
        (let ((case-fold-search t))
-         (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target (regexp-quote thing))
-                                         (or target (regexp-quote thing))
-                                         (or target (regexp-quote thing))) nil 
t)
-             (search-forward (format "`%s'" (or target thing)) nil t)
+         (or (re-search-forward
+               (format "\\[[`‘]%s['’]\\]\\|([`‘]%s['’])\\|\\<The[ 
\n][`‘]%s['’]"
+                       (or target (regexp-quote thing))
+                       (or target (regexp-quote thing))
+                       (or target (regexp-quote thing))) nil t)
+             (search-forward (format "[`‘]%s['’]" (or target thing)) nil t)
              (search-forward (or target thing) nil t))))
     (beginning-of-line)
     (message "Found `%s' in %s" thing where)))
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 9c5d718..60c6fb9 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -89,7 +89,7 @@ For use with Embedded mode:
   N  calc-embedded-next.  Advance cursor to next known formula in buffer.
   P  calc-embedded-previous.  Advance cursor to previous known formula.
   U  calc-embedded-update-formula.  Re-evaluate formula at point.
-  `  calc-embedded-edit.  Use calc-edit to edit formula at point.
+  \\=`  calc-embedded-edit.  Use calc-edit to edit formula at point.
 
 Documentation:
   I  calc-info.  Read the Calculator manual in the Emacs Info system.
@@ -225,7 +225,7 @@ Calc user interface as before (either C-x * C or C-x * K; 
initially C-x * C).
           "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
           "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
           "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
-          "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)"
+          "Other keys: ' (alg-entry), = (eval), \\=` (edit); M-RET (last-args)"
           "Other keys: SPC/RET (enter/dup), LFD (over); < > (scroll horiz)"
           "Other keys: DEL (drop), M-DEL (drop-above); { } (scroll vert)"
           "Other keys: TAB (swap/roll-dn), M-TAB (roll-up)"
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 3c176ae..3536333 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -598,15 +598,16 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for 
`completing-read'."
 (defun overload-docstring-extension (overload)
   "Return the doc string that augments the description of OVERLOAD."
   (let ((doc "\n\This function can be overloaded\
- with `define-mode-local-override'.")
+ with ‘define-mode-local-override’.")
         (sym (overload-obsoleted-by overload)))
     (when sym
-      (setq doc (format "%s\nIt has made the overload `%s' obsolete since %s."
+      (setq doc (format "%s\nIt has made the overload ‘%s’ obsolete since %s."
                         doc sym (get sym 'overload-obsoleted-since))))
     (setq sym (overload-that-obsolete overload))
     (when sym
-      (setq doc (format "%s\nThis overload is obsolete since %s;\nUse `%s' 
instead."
-                        doc (get overload 'overload-obsoleted-since) sym)))
+      (setq doc (format
+                 "%s\nThis overload is obsolete since %s;\nuse ‘%s’ instead."
+                 doc (get overload 'overload-obsoleted-since) sym)))
     doc))
 
 (defun mode-local-augment-function-help (symbol)
@@ -629,9 +630,9 @@ SYMBOL is a function that can be overridden."
 (defun mode-local-print-binding (symbol)
   "Print the SYMBOL binding."
   (let ((value (symbol-value symbol)))
-    (princ (format "\n     `%s' value is\n       " symbol))
+    (princ (format "\n     ‘%s’ value is\n       " symbol))
     (if (and value (symbolp value))
-        (princ (format "`%s'" value))
+        (princ (format "‘%s’" value))
       (let ((pt (point)))
         (pp value)
         (save-excursion
@@ -689,7 +690,7 @@ SYMBOL is a function that can be overridden."
       )
      ((symbolp buffer-or-mode)
       (setq mode buffer-or-mode)
-      (princ (format "`%s'\n" buffer-or-mode))
+      (princ (format "‘%s’\n" buffer-or-mode))
       )
      ((signal 'wrong-type-argument
               (list 'buffer-or-mode buffer-or-mode))))
@@ -699,7 +700,7 @@ SYMBOL is a function that can be overridden."
     (while mode
       (setq table (get mode 'mode-local-symbol-table))
       (when table
-        (princ (format "\n- From `%s'\n" mode))
+        (princ (format "\n- From ‘%s’\n" mode))
         (mode-local-print-bindings table))
       (setq mode (get-mode-local-parent mode)))))
 
diff --git a/lisp/cedet/semantic/grammar-wy.el 
b/lisp/cedet/semantic/grammar-wy.el
index fba8adf..4b59e17 100644
--- a/lisp/cedet/semantic/grammar-wy.el
+++ b/lisp/cedet/semantic/grammar-wy.el
@@ -387,12 +387,12 @@
                 (let
                     ((s $1))
                   (if
-                      (string-match "^{[
\n       ]*" s)
+                      (string-match "^{[\r\n\t ]*" s)
                       (setq s
                             (substring s
                                        (match-end 0))))
                   (if
-                      (string-match "[
\n       ]*}$" s)
+                      (string-match "[\r\n\t ]*}$" s)
                       (setq s
                             (substring s 0
                                        (match-beginning 0))))
diff --git a/lisp/cedet/semantic/wisent/wisent.el 
b/lisp/cedet/semantic/wisent/wisent.el
index fd00080..fb77cb3 100644
--- a/lisp/cedet/semantic/wisent/wisent.el
+++ b/lisp/cedet/semantic/wisent/wisent.el
@@ -44,11 +44,11 @@
   "
            /\\_.-^^^-._/\\     The GNU
            \\_         _/
-            (     `o  `      (European ;-) Bison
-             \\      ` /
+            (     \\=`o  \\=`      (European ;-) Bison
+             \\      \\=` /
              (   D  ,\"       for Emacs!
-              ` ~ ,\"
-               `\"\""
+              \\=` ~ ,\"
+               \\=`\"\""
   :group 'semantic)
 
 
diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el
index be75f37..6c8f7a6 100644
--- a/lisp/cedet/srecode/texi.el
+++ b/lisp/cedet/srecode/texi.el
@@ -245,7 +245,7 @@ that class.
  variable   => @code{variable}
  class      => @code{class} @xref{class}
  unknown    => @code{unknown}
- \" text \"   => `` text ''
+ \"text\"     => \\=`\\=`text''
  'quoteme   => @code{quoteme}
  non-nil    => address@hidden
  t          => @code{t}
@@ -253,7 +253,7 @@ that class.
  [ stuff ]  => @code{[ stuff ]}
  Key        => @kbd{Key}     (key is C\\-h, M\\-h, SPC, RET, TAB and the like)
  ...        => @dots{}"
-  (while (string-match "`\\([-a-zA-Z0-9<>.]+\\)'" string)
+  (while (string-match "[`‘]\\([-a-zA-Z0-9<>.]+\\)['’]" string)
     (let* ((vs (substring string (match-beginning 1) (match-end 1)))
           (v (intern-soft vs)))
       (setq string
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 224d2c5..1321fbc 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -492,10 +492,10 @@ It includes all faces in list FACES."
                         '("" "c")))
        doc)
     (when fn
-      (princ " in `")
+      (princ " in ‘")
       (help-insert-xref-button (file-name-nondirectory fn)
                               'help-theme-def fn)
-      (princ "'"))
+      (princ "’"))
     (princ ".\n")
     (if (custom-theme-p theme)
        (progn
@@ -517,7 +517,7 @@ It includes all faces in list FACES."
                 (setq doc (nth 2 sexp)))))))
     (princ "\n\nDocumentation:\n")
     (princ (if (stringp doc)
-              doc
+              (substitute-command-keys doc)
             "No documentation available.")))
   (princ "\n\nYou can ")
   (help-insert-xref-button "customize" 'help-theme-edit theme)
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index d6f64c7..c8641ae 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -161,8 +161,8 @@ otherwise."
       ;; Buttons
       (when (and button (not (widgetp wid-button)))
        (newline)
-       (insert "Here is a `" (format "%S" button-type)
-               "' button labeled `" button-label "'.\n\n"))
+       (insert "Here is a ‘" (format "%S" button-type)
+               "’ button labeled ‘" button-label "’.\n\n"))
       ;; Overlays
       (when overlays
        (newline)
@@ -618,7 +618,14 @@ relevant to POS."
                                    'help-args '(,current-input-method))
                                 "input method")
                         (list
-                         "type \"C-x 8 RET HEX-CODEPOINT\" or \"C-x 8 RET 
NAME\"")))))
+                          (let ((name
+                                 (or (get-char-code-property char 'name)
+                                     (get-char-code-property char 'old-name))))
+                            (if name
+                                (format
+                                 "type \"C-x 8 RET %x\" or \"C-x 8 RET %s\""
+                                 char name)
+                              (format "type \"C-x 8 RET %x\"" char))))))))
               ("buffer code"
                ,(if multibyte-p
                     (encoded-string-description
@@ -731,7 +738,7 @@ relevant to POS."
                       (when face
                         (insert (propertize " " 'display '(space :align-to 5))
                                 "face: ")
-                        (insert (concat "`" (symbol-name face) "'"))
+                        (insert (concat "‘" (symbol-name face) "’"))
                         (insert "\n")))))
               (insert "these terminal codes:\n")
               (dotimes (i (length disp-vector))
diff --git a/lisp/desktop.el b/lisp/desktop.el
index fb803b4..c168f9c 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -83,8 +83,10 @@
 ;;    (add-to-list 'desktop-minor-mode-handlers
 ;;                 '(bar-mode . bar-desktop-restore))
 
-;; in the module itself, and make sure that the mode function is
-;; autoloaded.  See the docstrings of `desktop-buffer-mode-handlers' and
+;; in the module itself.  The mode function must either be autoloaded,
+;; or of the form "foobar-mode" and defined in library "foobar", so that
+;; desktop can guess how to load its definition.
+;; See the docstrings of `desktop-buffer-mode-handlers' and
 ;; `desktop-minor-mode-handlers' for more info.
 
 ;; Minor modes.
@@ -520,7 +522,9 @@ code like
    (add-to-list 'desktop-buffer-mode-handlers
                 '(foo-mode . foo-restore-desktop-buffer))
 
-Furthermore the major mode function must be autoloaded.")
+The major mode function must either be autoloaded, or of the form
+\"foobar-mode\" and defined in library \"foobar\", so that desktop
+can guess how to load the mode's definition.")
 
 ;;;###autoload
 (put 'desktop-buffer-mode-handlers 'risky-local-variable t)
@@ -585,7 +589,9 @@ code like
    (add-to-list 'desktop-minor-mode-handlers
                 '(foo-mode . foo-desktop-restore))
 
-Furthermore the minor mode function must be autoloaded.
+The minor mode function must either be autoloaded, or of the form
+\"foobar-mode\" and defined in library \"foobar\", so that desktop
+can guess how to load the mode's definition.
 
 See also `desktop-minor-mode-table'.")
 
@@ -1352,9 +1358,18 @@ after that many seconds of idle time."
       nil)))
 
 (defun desktop-load-file (function)
-  "Load the file where auto loaded FUNCTION is defined."
-  (when (fboundp function)
-    (autoload-do-load (symbol-function function) function)))
+  "Load the file where auto loaded FUNCTION is defined.
+If FUNCTION is not currently defined, guess the library that defines it
+and try to load that."
+  (if (fboundp function)
+      (autoload-do-load (symbol-function function) function)
+    ;; Guess that foobar-mode is defined in foobar.
+    ;; TODO rather than guessing or requiring an autoload, the desktop
+    ;; file should record the name of the library.
+    (let ((name (symbol-name function)))
+      (if (string-match "\\`\\(.*\\)-mode\\'" name)
+          (with-demoted-errors "Require error in desktop-load-file: %S"
+              (require (intern (match-string 1 name)) nil t))))))
 
 ;; ----------------------------------------------------------------------------
 ;; Create a buffer, load its file, set its mode, ...;
@@ -1572,9 +1587,6 @@ If there are no buffers left to create, kill the timer."
         (desktop-read)
         (setq inhibit-startup-screen t)))))
 
-;; So we can restore vc-dir buffers.
-(autoload 'vc-dir-mode "vc-dir" nil t)
-
 (provide 'desktop)
 
 ;;; desktop.el ends here
diff --git a/lisp/electric.el b/lisp/electric.el
index dd7767f..88b2835 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -413,6 +413,114 @@ The variable `electric-layout-rules' says when and how to 
insert newlines."
          (remove-hook 'post-self-insert-hook
                       #'electric-layout-post-self-insert-function))))
 
+;;; Electric quoting.
+
+(defcustom electric-quote-comment t
+  "Non-nil means to use electric quoting in program comments."
+  :type 'boolean :safe 'booleanp :group 'electricity)
+
+(defcustom electric-quote-string nil
+  "Non-nil means to use electric quoting in program strings."
+  :type 'boolean :safe 'booleanp :group 'electricity)
+
+(defcustom electric-quote-paragraph t
+  "Non-nil means to use electric quoting in text paragraphs."
+  :type 'boolean :safe 'booleanp :group 'electricity)
+
+(defun electric--insertable-p (string)
+  (not (unencodable-char-position nil nil buffer-file-coding-system
+                                  nil string)))
+
+(defun electric-quote-post-self-insert-function ()
+  "Function that ‘electric-quote-mode’ adds to ‘post-self-insert-hook’.
+This requotes when a quoting key is typed."
+  (when (and electric-quote-mode
+             (memq last-command-event '(?\' ?\`)))
+    (let ((start
+           (if comment-start
+               (when (or electric-quote-comment electric-quote-string)
+                 (let ((syntax (syntax-ppss)))
+                   (and (or (and electric-quote-comment (nth 4 syntax))
+                            (and electric-quote-string (nth 3 syntax)))
+                        (nth 8 syntax))))
+             (and electric-quote-paragraph
+                  (derived-mode-p 'text-mode)
+                  (or (eq last-command-event ?\`)
+                      (save-excursion (backward-paragraph) (point)))))))
+      (when start
+        (save-excursion
+          (if (eq last-command-event ?\`)
+              (cond ((and (electric--insertable-p "“")
+                          (re-search-backward "[`‘]`" (- (point) 2) t))
+                     (replace-match "“")
+                     (when (and electric-pair-mode
+                                (eq (cdr-safe
+                                     (assq ?‘ electric-pair-text-pairs))
+                                    (char-after)))
+                       (delete-char 1))
+                     (setq last-command-event ?“))
+                    ((and (electric--insertable-p "‘")
+                          (search-backward "`" (1- (point)) t))
+                     (replace-match "‘")
+                     (setq last-command-event ?‘)))
+            (let ((pos (point)))
+              (if (memq (char-before (1- (point))) '(?\' ?’))
+                  (when (and (search-backward "“" start t)
+                             (eq pos (re-search-forward
+                                      "“\\(\\([^‘”]\\|‘[^‘’”]*’\\)*\\)['’]'"
+                                      pos t)))
+                    (replace-match "“\\1”")
+                    (setq last-command-event ?”))
+                (when (and (search-backward "‘" start t)
+                           (eq pos (re-search-forward
+                                    "‘\\([^’]*\\)'" pos t)))
+                  (replace-match "‘\\1’")
+                  (setq last-command-event ?’))))))))))
+
+(put 'electric-quote-post-self-insert-function 'priority 10)
+
+;;;###autoload
+(define-minor-mode electric-quote-mode
+  "Toggle on-the-fly requoting (Electric Quote mode).
+With a prefix argument ARG, enable Electric Quote mode if
+ARG is positive, and disable it otherwise.  If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+When enabled, this replaces \\=`foo bar' with ‘foo bar’ and replaces
+\\=`\\=`foo bar'' with “foo bar” as you type.  This occurs only in
+comments, strings, and text paragraphs, and these are selectively
+controlled with ‘electric-quote-comment’,
+‘electric-quote-string’, and ‘electric-quote-paragraph’.
+
+This is a global minor mode.  To toggle the mode in a single buffer,
+use ‘electric-quote-local-mode’."
+  :global t :group 'electricity
+  :initialize 'custom-initialize-delay
+  :init-value nil
+  (if (not electric-quote-mode)
+      (unless (catch 'found
+                (dolist (buf (buffer-list))
+                  (with-current-buffer buf
+                    (if electric-quote-mode (throw 'found t)))))
+        (remove-hook 'post-self-insert-hook
+                     #'electric-quote-post-self-insert-function))
+    (add-hook 'post-self-insert-hook
+              #'electric-quote-post-self-insert-function)
+    (electric--sort-post-self-insertion-hook)))
+
+;;;###autoload
+(define-minor-mode electric-quote-local-mode
+  "Toggle ‘electric-quote-mode’ only in this buffer."
+  :variable (buffer-local-value 'electric-quote-mode (current-buffer))
+  (cond
+   ((eq electric-quote-mode (default-value 'electric-quote-mode))
+    (kill-local-variable 'electric-quote-mode))
+   ((not (default-value 'electric-quote-mode))
+    ;; Locally enabled, but globally disabled.
+    (electric-quote-mode 1)                ; Setup the hooks.
+    (setq-default electric-quote-mode nil) ; But keep it globally disabled.
+    )))
+
 (provide 'electric)
 
 ;;; electric.el ends here
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index d5cdca2..dc61e15 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -99,9 +99,9 @@ places where expressions are evaluated and inserted or 
spliced in.
 For example:
 
 b              => (ba bb bc)           ; assume b has this value
-`(a b c)       => (a b c)              ; backquote acts like quote
-`(a ,b c)      => (a (ba bb bc) c)     ; insert the value of b
-`(a ,@b c)     => (a ba bb bc c)       ; splice in the value of b
+\\=`(a b c)       => (a b c)           ; backquote acts like quote
+\\=`(a ,b c)      => (a (ba bb bc) c)  ; insert the value of b
+\\=`(a ,@b c)     => (a ba bb bc c)    ; splice in the value of b
 
 Vectors work just like lists.  Nested backquotes are permitted."
   (cdr (backquote-process structure)))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 18361c8..4761ac5 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1524,7 +1524,7 @@ may require more formatting")
      ;;     Instead, use the `\\[...]' construct to stand for them.
      (save-excursion
        (let ((f nil) (m nil) (start (point))
-            (re "[^`A-Za-z0-9_]\\([CMA]-[a-zA-Z]\\|\\(\\([CMA]-\\)?\
+            (re "[^`‘A-Za-z0-9_]\\([CMA]-[a-zA-Z]\\|\\(\\([CMA]-\\)?\
 mouse-[0-3]\\)\\)\\>"))
         ;; Find the first key sequence not in a sample
         (while (and (not f) (setq m (re-search-forward re e t)))
@@ -1554,7 +1554,8 @@ mouse-[0-3]\\)\\)\\>"))
      (save-excursion
        (let ((case-fold-search t)
             (ret nil) mb me)
-        (while (and (re-search-forward "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'" e t)
+        (while (and (re-search-forward
+                      "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]" e t)
                     (not ret))
           (let* ((ms1 (match-string 1))
                  (sym (intern-soft ms1)))
@@ -1785,16 +1786,17 @@ Replace with \"%s\"? " original replace)
             )))
      ;;* When a documentation string refers to a Lisp symbol, write it as
      ;;  it would be printed (which usually means in lower case), with
-     ;;  single-quotes around it.  For example: `lambda'.  There are two
-     ;;  exceptions: write t and nil without single-quotes.  (In this
-     ;;  manual, we normally do use single-quotes for those symbols.)
+     ;;  single-quotes around it.  For example: ‘lambda’.  There are two
+     ;;  exceptions: write t and nil without single-quotes.  (For
+     ;;  compatibility with an older Emacs style, quoting with ` and '
+     ;;  also works, e.g., `lambda' is treated like ‘lambda’.)
      (save-excursion
        (let ((found nil) (start (point)) (msg nil) (ms nil))
         (while (and (not msg)
                     (re-search-forward
                      ;; Ignore manual page references like
                      ;; git-config(1).
-                     "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^](']"
+                     "[^-([`'‘’:a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^]('’]"
                      e t))
           (setq ms (match-string 1))
           ;; A . is a \s_ char, so we must remove periods from
@@ -1812,7 +1814,7 @@ Replace with \"%s\"? " original replace)
                 (if (checkdoc-autofix-ask-replace
                      (match-beginning 1) (+ (match-beginning 1)
                                             (length ms))
-                     msg (concat "`" ms "'") t)
+                     msg (concat "‘" ms "’") t)
                     (setq msg nil)
                   (setq msg
                         (format "Lisp symbol `%s' should appear in quotes"
@@ -1824,7 +1826,7 @@ Replace with \"%s\"? " original replace)
           nil)))
      ;; t and nil case
      (save-excursion
-       (if (re-search-forward "\\(`\\(t\\|nil\\)'\\)" e t)
+       (if (re-search-forward "\\([`‘]\\(t\\|nil\\)['’]\\)" e t)
           (if (checkdoc-autofix-ask-replace
                (match-beginning 1) (match-end 1)
                (format "%s should not appear in quotes.  Remove? "
@@ -1989,7 +1991,7 @@ If the offending word is in a piece of quoted text, then 
it is skipped."
             (if (and (not (save-excursion
                             (goto-char b)
                             (forward-char -1)
-                            (looking-at "`\\|\"\\|\\.\\|\\\\")))
+                            (looking-at "[`\".‘]\\|\\\\")))
                      ;; surrounded by /, as in a URL or filename: /emacs/
                      (not (and (= ?/ (char-after e))
                                (= ?/ (char-before b))))
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 24a04d4..96b86aa 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -876,11 +876,11 @@ Can only be used from within the lexical body of a 
primary or around method."
                                    (cl--generic-method-specializers method)))
                    (file (find-lisp-object-file-name met-name 'cl-defmethod)))
               (when file
-                (insert " in `")
+                (insert " in ‘")
                 (help-insert-xref-button (help-fns-short-filename file)
                                          'help-function-def met-name file
                                          'cl-defmethod)
-                (insert "'.\n")))
+                (insert "’.\n")))
             (insert "\n" (or (nth 2 info) "Undocumented") "\n\n")))))))
 
 ;;; Support for (head <val>) specializers.
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index 02b89e0..11d9984 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -90,11 +90,11 @@ If CLASS is actually an object, then also display current 
values of that object.
          " class")
   (let ((location (find-lisp-object-file-name class 'eieio-defclass)))
     (when location
-      (insert " in `")
+      (insert " in ‘")
       (help-insert-xref-button
        (help-fns-short-filename location)
        'eieio-class-def class location 'eieio-defclass)
-      (insert "'")))
+      (insert "’")))
   (insert ".\n")
   ;; Parents
   (let ((pl (eieio-class-parents class))
@@ -103,10 +103,10 @@ If CLASS is actually an object, then also display current 
values of that object.
       (insert " Inherits from ")
       (while (setq cur (pop pl))
        (setq cur (eieio--class-name cur))
-       (insert "`")
+       (insert "‘")
        (help-insert-xref-button (symbol-name cur)
                                 'help-function cur)
-       (insert (if pl "', " "'")))
+       (insert (if pl "’, " "’")))
       (insert ".\n")))
   ;; Children
   (let ((ch (eieio-class-children class))
@@ -114,10 +114,10 @@ If CLASS is actually an object, then also display current 
values of that object.
     (when ch
       (insert " Children ")
       (while (setq cur (pop ch))
-       (insert "`")
+       (insert "‘")
        (help-insert-xref-button (symbol-name cur)
                                 'help-function cur)
-       (insert (if ch "', " "'")))
+       (insert (if ch "’, " "’")))
       (insert ".\n")))
   ;; System documentation
   (let ((doc (documentation-property class 'variable-documentation)))
@@ -130,9 +130,9 @@ If CLASS is actually an object, then also display current 
values of that object.
     (when generics
       (insert (propertize "Specialized Methods:\n\n" 'face 'bold))
       (dolist (generic generics)
-        (insert "`")
+        (insert "‘")
         (help-insert-xref-button (symbol-name generic) 'help-function generic)
-        (insert "'")
+        (insert "’")
        (pcase-dolist (`(,qualifiers ,args ,doc)
                        (eieio-method-documentation generic class))
           (insert (format " %s%S\n" qualifiers args)
@@ -245,11 +245,11 @@ are not abstract."
        (setq location
              (find-lisp-object-file-name ctr def)))
       (when location
-       (insert " in `")
+       (insert " in ‘")
        (help-insert-xref-button
         (help-fns-short-filename location)
         'eieio-class-def ctr location 'eieio-defclass)
-       (insert "'"))
+       (insert "’"))
       (insert ".\nCreates an object of class " (symbol-name ctr) ".")
       (goto-char (point-max))
       (if (autoloadp def)
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index f6ffa3d..8387d81 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -978,7 +978,7 @@ Optional argument GROUP is the sub-group of slots to 
display.
 
 ;;;***
 
-;;;### (autoloads nil "eieio-opt" "eieio-opt.el" 
"59cee62a4829ace9bb4a6526442d2b3c")
+;;;### (autoloads nil "eieio-opt" "eieio-opt.el" 
"4b96541a14ecb2ac82ce5da7da79fd88")
 ;;; Generated autoloads from eieio-opt.el
 
 (autoload 'eieio-browse "eieio-opt" "\
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index b678e12..99c5ede 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1849,7 +1849,9 @@ non-nil, returns the face for expected results.."
              (when (ert-test-documentation test)
                (insert "    "
                        (propertize
-                        (ert--string-first-line (ert-test-documentation test))
+                        (ert--string-first-line
+                         (substitute-command-keys
+                          (ert-test-documentation test)))
                         'font-lock-face 'font-lock-doc-face)
                        "\n"))
              (cl-etypecase result
@@ -2063,7 +2065,7 @@ and how to display message."
     "--"
     ["Show backtrace" ert-results-pop-to-backtrace-for-test-at-point]
     ["Show messages" ert-results-pop-to-messages-for-test-at-point]
-    ["Show `should' forms" ert-results-pop-to-should-forms-for-test-at-point]
+    ["Show ‘should’ forms" ert-results-pop-to-should-forms-for-test-at-point]
     ["Describe test" ert-results-describe-test-at-point]
     "--"
     ["Delete test" ert-delete-test]
@@ -2375,9 +2377,9 @@ To be used in the ERT results buffer."
            (ert--print-backtrace backtrace)
            (debugger-make-xrefs)
            (goto-char (point-min))
-           (insert "Backtrace for test `")
+           (insert "Backtrace for test ‘")
            (ert-insert-test-name-button (ert-test-name test))
-           (insert "':\n")))))))
+           (insert "’:\n")))))))
 
 (defun ert-results-pop-to-messages-for-test-at-point ()
   "Display the part of the *Messages* buffer generated during the test at 
point.
@@ -2396,9 +2398,9 @@ To be used in the ERT results buffer."
         (ert-simple-view-mode)
         (insert (ert-test-result-messages result))
         (goto-char (point-min))
-        (insert "Messages for test `")
+        (insert "Messages for test ‘")
         (ert-insert-test-name-button (ert-test-name test))
-        (insert "':\n")))))
+        (insert "’:\n")))))
 
 (defun ert-results-pop-to-should-forms-for-test-at-point ()
   "Display the list of `should' forms executed during the test at point.
@@ -2426,9 +2428,9 @@ To be used in the ERT results buffer."
                      (ert--pp-with-indentation-and-newline form-description)
                      (ert--make-xrefs-region begin (point)))))
         (goto-char (point-min))
-        (insert "`should' forms executed during test `")
+        (insert "‘should’ forms executed during test ‘")
         (ert-insert-test-name-button (ert-test-name test))
-        (insert "':\n")
+        (insert "’:\n")
         (insert "\n")
         (insert (concat "(Values are shallow copies and may have "
                         "looked different during the test if they\n"
@@ -2505,9 +2507,9 @@ To be used in the ERT results buffer."
           (let ((file-name (and test-name
                                 (symbol-file test-name 'ert-deftest))))
             (when file-name
-              (insert " defined in `" (file-name-nondirectory file-name) "'")
+              (insert " defined in ‘" (file-name-nondirectory file-name) "’")
               (save-excursion
-                (re-search-backward "`\\([^`']+\\)'" nil t)
+                (re-search-backward "‘\\([^‘’]+\\)’" nil t)
                 (help-xref-button 1 'help-function-def test-name file-name)))
             (insert ".")
             (fill-region-as-paragraph (point-min) (point))
@@ -2519,8 +2521,9 @@ To be used in the ERT results buffer."
                         "this documentation refers to an old definition.")
                 (fill-region-as-paragraph begin (point)))
               (insert "\n\n"))
-            (insert (or (ert-test-documentation test-definition)
-                        "It is not documented.")
+            (insert (substitute-command-keys
+                     (or (ert-test-documentation test-definition)
+                         "It is not documented."))
                     "\n")))))))
 
 (defun ert-results-describe-test-at-point ()
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 6facf57..ab01a10 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -403,8 +403,8 @@
          ;; Words inside \\[] tend to be for `substitute-command-keys'.
          ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]"
           (1 font-lock-constant-face prepend))
-         ;; Words inside `' tend to be symbol names.
-         ("`\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)'"
+         ;; Words inside ‘’ and `' tend to be symbol names.
+         ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]"
           (1 font-lock-constant-face prepend))
          ;; Constant values.
          ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face)
@@ -452,8 +452,8 @@
          ;; Erroneous structures.
          (,(concat "(" cl-errs-re "\\_>")
            (1 font-lock-warning-face))
-         ;; Words inside `' tend to be symbol names.
-         ("`\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)'"
+         ;; Words inside ‘’ and `' tend to be symbol names.
+         ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]"
           (1 font-lock-constant-face prepend))
          ;; Constant values.
          ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face)
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index f0410f8..05ffa8d 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -343,7 +343,7 @@ definitions to shadow the loaded ones for use in file 
byte-compilation."
 
 (defmacro macroexp-let2 (test var exp &rest exps)
   "Bind VAR to a copyable expression that returns the value of EXP.
-This is like `(let ((v ,EXP)) ,EXPS) except that `v' is a new generated
+This is like \\=`(let ((v ,EXP)) ,EXPS) except that `v' is a new generated
 symbol which EXPS can find in VAR.
 TEST should be the name of a predicate on EXP checking whether the `let' can
 be skipped; if nil, as is usual, `macroexp-const-p' is used."
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b96518d..6fecd9a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -587,9 +587,10 @@ updates `package-alist'."
   (dolist (dir (cons package-user-dir package-directory-list))
     (when (file-directory-p dir)
       (dolist (subdir (directory-files dir))
-        (let ((pkg-dir (expand-file-name subdir dir)))
-          (when (file-directory-p pkg-dir)
-            (package-load-descriptor pkg-dir)))))))
+        (unless (equal subdir "..")
+          (let ((pkg-dir (expand-file-name subdir dir)))
+            (when (file-directory-p pkg-dir)
+              (package-load-descriptor pkg-dir))))))))
 
 (defun define-package (_name-string _version-string
                                     &optional _docstring _requirements
@@ -2137,17 +2138,17 @@ will be deleted."
                                    "Installed"
                                  (capitalize status)) ;FIXME: Why comment-face?
                                'font-lock-face 'font-lock-comment-face))
-           (insert " in `")
+           (insert " in ‘")
            ;; Todo: Add button for uninstalling.
            (help-insert-xref-button (abbreviate-file-name
                                      (file-name-as-directory pkg-dir))
                                     'help-package-def pkg-dir)
            (if (and (package-built-in-p name)
                     (not (package-built-in-p name version)))
-               (insert "',\n             shadowing a "
+               (insert "’,\n             shadowing a "
                        (propertize "built-in package"
                                    'font-lock-face 'font-lock-builtin-face))
-             (insert "'"))
+             (insert "’"))
            (if signed
                (insert ".")
              (insert " (unsigned)."))
@@ -2811,7 +2812,7 @@ The full list of keys can be viewed with 
\\[describe-mode]."
 
 (defun package-menu-get-status ()
   (let* ((id (tabulated-list-get-id))
-         (entry (and id (assq id tabulated-list-entries))))
+         (entry (and id (assoc id tabulated-list-entries))))
     (if entry
         (aref (cadr entry) 2)
       "")))
@@ -2855,15 +2856,15 @@ consideration."
              (push (cons name avail-pkg) upgrades))))
     upgrades))
 
-(defun package-menu-mark-upgrades ()
+(defvar package-menu--mark-upgrades-pending nil
+  "Whether mark-upgrades is waiting for a refresh to finish.")
+
+(defun package-menu--mark-upgrades-1 ()
   "Mark all upgradable packages in the Package Menu.
-For each installed package with a newer version available, place
-an (I)nstall flag on the available version and a (D)elete flag on
-the installed version.  A subsequent \\[package-menu-execute]
-call will upgrade the package."
-  (interactive)
+Implementation of `package-menu-mark-upgrades'."
   (unless (derived-mode-p 'package-menu-mode)
     (error "The current buffer is not a Package Menu"))
+  (setq package-menu--mark-upgrades-pending nil)
   (let ((upgrades (package-menu--find-upgrades)))
     (if (null upgrades)
         (message "No packages to upgrade.")
@@ -2880,8 +2881,24 @@ call will upgrade the package."
                   (t
                    (package-menu-mark-delete))))))
       (message "%d package%s marked for upgrading."
-               (length upgrades)
-               (if (= (length upgrades) 1) "" "s")))))
+        (length upgrades)
+        (if (= (length upgrades) 1) "" "s")))))
+
+(defun package-menu-mark-upgrades ()
+  "Mark all upgradable packages in the Package Menu.
+For each installed package with a newer version available, place
+an (I)nstall flag on the available version and a (D)elete flag on
+the installed version.  A subsequent \\[package-menu-execute]
+call will upgrade the package.
+
+If there's an async refresh operation in progress, the flags will
+be placed as part of `package-menu--post-refresh' instead of
+immediately."
+  (interactive)
+  (if (not package--downloads-in-progress)
+      (package-menu--mark-upgrades-1)
+    (setq package-menu--mark-upgrades-pending t)
+    (message "Waiting for refresh to finish...")))
 
 (defun package-menu--list-to-prompt (packages)
   "Return a string listing PACKAGES that's usable in a prompt.
@@ -3099,8 +3116,11 @@ after `package-menu--perform-transaction'."
   (let ((buf (get-buffer "*Packages*")))
     (when (buffer-live-p buf)
       (with-current-buffer buf
-        (revert-buffer nil 'noconfirm))))
-  (package-menu--find-and-notify-upgrades))
+        (run-hooks 'tabulated-list-revert-hook)
+        (tabulated-list-print 'remember 'update)
+        (if package-menu--mark-upgrades-pending
+            (package-menu--mark-upgrades-1)
+          (package-menu--find-and-notify-upgrades))))))
 
 ;;;###autoload
 (defun list-packages (&optional no-fetch)
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 8c4f4bc..ab82b7e 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -133,8 +133,8 @@ FUN can refer to variables bound earlier in the pattern.
 FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
 and two identical calls can be merged into one.
 E.g. you can match pairs where the cdr is larger than the car with a pattern
-like `(,a . ,(pred (< a))) or, with more checks:
-`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
+like \\=`(,a . ,(pred (< a))) or, with more checks:
+\\=`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
 
 Additional patterns can be defined via `pcase-defmacro'.
 Currently, the following patterns are provided this way:"
diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index 58b8fd6..fb3045d 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -327,7 +327,8 @@ changing `tabulated-list-sort-key'."
         (setq entry-id (tabulated-list-get-id))
         (setq saved-col (current-column)))
     ;; Sort the entries, if necessary.
-    (setq entries (sort entries sorter))
+    (when sorter
+      (setq entries (sort entries sorter)))
     (unless (functionp tabulated-list-entries)
       (setq tabulated-list-entries entries))
     ;; Without a sorter, we have no way to just update.
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 5c91df9..5e1620d 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -4400,7 +4400,7 @@ and regexp replace."
 ;; etc.
 (defun viper-cycle-through-mark-ring ()
   "Visit previous locations on the mark ring.
-One can use `` and '' to temporarily jump 1 step back."
+One can use \\=`\\=` and '' to temporarily jump 1 step back."
   (let* ((sv-pt (point)))
        ;; if repeated `m,' command, pop the previously saved mark.
        ;; Prev saved mark is actually prev saved point.  It is used if the
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index ad5e1a2..a860951 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2474,7 +2474,7 @@ on the given server.")
 (defcustom erc-lurker-trim-nicks t
   "If t, trim trailing `erc-lurker-ignore-chars' from nicks.
 
-This causes e.g. nick and nick` to be considered as the same
+This causes e.g. nick and nick\\=` to be considered as the same
 individual for activity tracking and lurkiness detection
 purposes."
   :group 'erc-lurker
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 84d46dc..8a3b581 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -300,7 +300,7 @@ Thus, this does not include the current directory.")
                 eshell-user-names)))))))
 
 (defun eshell/pwd (&rest args)
-  "Change output from `pwd` to be cleaner."
+  "Change output from ‘pwd’ to be cleaner."
   (let* ((path default-directory)
         (len (length path)))
     (if (and (> len 1)
@@ -348,8 +348,6 @@ in the minibuffer:
                  index (1+ index)))))
     oldpath))
 
-(defvar dired-directory)
-
 (defun eshell/cd (&rest args)           ; all but first ignored
   "Alias to extend the behavior of `cd'."
   (setq args (eshell-flatten-list args))
@@ -394,11 +392,11 @@ in the minibuffer:
      (path
       (setq path (eshell-expand-multiple-dots path))))
     (unless handled
-      (setq dired-directory (or path "~"))
-      (let ((curdir (eshell/pwd)))
-       (unless (equal curdir dired-directory)
+      (let ((curdir (eshell/pwd))
+           (newdir (or path "~")))
+       (unless (equal curdir newdir)
          (eshell-add-to-dir-ring curdir))
-       (let ((result (cd dired-directory)))
+       (let ((result (cd newdir)))
          (and eshell-cd-shows-directory
               (eshell-printn result)))
        (run-hooks 'eshell-directory-change-hook)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 0dac478..22ccf4e 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -344,7 +344,6 @@ and the hook `eshell-exit-hook'."
 
   (setq local-abbrev-table eshell-mode-abbrev-table)
 
-  (set (make-local-variable 'dired-directory) default-directory)
   (set (make-local-variable 'list-buffers-directory)
        (expand-file-name default-directory))
 
diff --git a/lisp/faces.el b/lisp/faces.el
index 9c087c9..4366c0b 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1428,18 +1428,19 @@ If FRAME is omitted or nil, use the selected frame."
                  (when alias
                    (setq face alias)
                    (insert
-                    (format "\n  %s is an alias for the face `%s'.\n%s"
+                    (format "\n  %s is an alias for the face ‘%s’.\n%s"
                             f alias
                             (if (setq obsolete (get f 'obsolete-face))
-                                (format "  This face is obsolete%s; use `%s' 
instead.\n"
+                                (format "  This face is obsolete%s; use ‘%s’ 
instead.\n"
                                         (if (stringp obsolete)
                                             (format " since %s" obsolete)
                                           "")
                                         alias)
                               ""))))
                  (insert "\nDocumentation:\n"
-                         (or (face-documentation face)
-                             "Not documented as a face.")
+                          (substitute-command-keys
+                           (or (face-documentation face)
+                               "Not documented as a face."))
                          "\n\n"))
                (with-current-buffer standard-output
                  (save-excursion
@@ -1448,12 +1449,12 @@ If FRAME is omitted or nil, use the selected frame."
                    (help-xref-button 1 'help-customize-face f)))
                (setq file-name (find-lisp-object-file-name f 'defface))
                (when file-name
-                 (princ "Defined in `")
+                 (princ "Defined in ‘")
                  (princ (file-name-nondirectory file-name))
-                 (princ "'")
+                 (princ "’")
                  ;; Make a hyperlink to the library.
                  (save-excursion
-                   (re-search-backward "`\\([^`']+\\)'" nil t)
+                   (re-search-backward "‘\\([^‘’]+\\)’" nil t)
                    (help-xref-button 1 'help-face-def f file-name))
                  (princ ".")
                  (terpri)
@@ -1937,8 +1938,9 @@ Return nil if there is no face."
              (dolist (face faceprop)
                (if (facep face)
                    (push face faces))))))
-    (setq faces (delete-dups (nreverse faces)))
-    (if multiple faces (car faces))))
+    (if multiple
+        (delete-dups (nreverse faces))
+      (car (last faces)))))
 
 (defun foreground-color-at-point ()
   "Return the foreground color of the character after point."
diff --git a/lisp/files.el b/lisp/files.el
index d82ff5e..6939f2b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -55,7 +55,7 @@ FROM with TO when it appears in a directory name.  This 
replacement is
 done when setting up the default directory of a newly visited file.
 
 FROM is matched against directory names anchored at the first
-character, so it should start with a \"\\\\`\", or, if directory
+character, so it should start with a \"\\\\\\=`\", or, if directory
 names cannot have embedded newlines, with a \"^\".
 
 FROM and TO should be equivalent names, which refer to the
@@ -4077,80 +4077,75 @@ on the original file; this means that the caller, after 
saving
 the buffer, should change the extended attributes of the new file
 to agree with the old attributes.
 BACKUPNAME is the backup file name, which is the old file renamed."
-  (if (and make-backup-files (not backup-inhibited)
-          (not buffer-backed-up)
-          (file-exists-p buffer-file-name)
-          (memq (aref (elt (file-attributes buffer-file-name) 8) 0)
-                '(?- ?l)))
-      (let ((real-file-name buffer-file-name)
-           backup-info backupname targets setmodes)
+  (when (and make-backup-files (not backup-inhibited) (not buffer-backed-up))
+    (let ((attributes (file-attributes buffer-file-name)))
+      (when (and attributes (memq (aref (elt attributes 8) 0) '(?- ?l)))
        ;; If specified name is a symbolic link, chase it to the target.
-       ;; Thus we make the backups in the directory where the real file is.
-       (setq real-file-name (file-chase-links real-file-name))
-       (setq backup-info (find-backup-file-name real-file-name)
-             backupname (car backup-info)
-             targets (cdr backup-info))
-       ;; (if (file-directory-p buffer-file-name)
-       ;;     (error "Cannot save buffer in directory %s" buffer-file-name))
-       (if backup-info
-           (condition-case ()
-               (let ((delete-old-versions
-                      ;; If have old versions to maybe delete,
-                      ;; ask the user to confirm now, before doing anything.
-                      ;; But don't actually delete til later.
-                      (and targets
-                           (or (eq delete-old-versions t) (eq 
delete-old-versions nil))
-                           (or delete-old-versions
-                               (y-or-n-p (format "Delete excess backup 
versions of %s? "
-                                                 real-file-name)))))
-                     (modes (file-modes buffer-file-name))
-                     (extended-attributes
-                      (file-extended-attributes buffer-file-name)))
-                 ;; Actually write the back up file.
-                 (condition-case ()
-                     (if (or file-precious-flag
-    ;                        (file-symlink-p buffer-file-name)
-                             backup-by-copying
-                             ;; Don't rename a suid or sgid file.
-                             (and modes (< 0 (logand modes #o6000)))
-                             (not (file-writable-p (file-name-directory 
real-file-name)))
-                             (and backup-by-copying-when-linked
-                                  (> (file-nlinks real-file-name) 1))
-                             (and (or backup-by-copying-when-mismatch
-                                      (integerp 
backup-by-copying-when-privileged-mismatch))
-                                  (let ((attr (file-attributes 
real-file-name)))
-                                    (and (or backup-by-copying-when-mismatch
-                                             (and (integerp (nth 2 attr))
-                                                  (integerp 
backup-by-copying-when-privileged-mismatch)
-                                                  (<= (nth 2 attr) 
backup-by-copying-when-privileged-mismatch)))
-                                         (not (file-ownership-preserved-p
-                                               real-file-name t))))))
-                         (backup-buffer-copy real-file-name
-                                             backupname modes
-                                             extended-attributes)
-                       ;; rename-file should delete old backup.
-                       (rename-file real-file-name backupname t)
-                       (setq setmodes (list modes extended-attributes
-                                            backupname)))
-                   (file-error
-                    ;; If trouble writing the backup, write it in
-                    ;; .emacs.d/%backup%.
-                    (setq backupname (locate-user-emacs-file "%backup%~"))
-                    (message "Cannot write backup file; backing up in %s"
-                             backupname)
-                    (sleep-for 1)
-                    (backup-buffer-copy real-file-name backupname
-                                        modes extended-attributes)))
-                 (setq buffer-backed-up t)
-                 ;; Now delete the old versions, if desired.
-                 (if delete-old-versions
-                     (while targets
-                       (condition-case ()
-                           (delete-file (car targets))
-                         (file-error nil))
-                       (setq targets (cdr targets))))
-                 setmodes)
-           (file-error nil))))))
+       ;; This makes backups in the directory where the real file is.
+       (let* ((real-file-name (file-chase-links buffer-file-name))
+              (backup-info (find-backup-file-name real-file-name)))
+         (when backup-info
+           (let* ((backupname (car backup-info))
+                  (targets (cdr backup-info))
+                  (old-versions
+                   ;; If have old versions to maybe delete,
+                   ;; ask the user to confirm now, before doing anything.
+                   ;; But don't actually delete til later.
+                   (and targets
+                        (booleanp delete-old-versions)
+                        (or delete-old-versions
+                            (y-or-n-p
+                             (format "Delete excess backup versions of %s? "
+                                     real-file-name)))
+                        targets))
+                  (modes (file-modes buffer-file-name))
+                  (extended-attributes
+                   (file-extended-attributes buffer-file-name))
+                  (copy-when-priv-mismatch
+                   backup-by-copying-when-privileged-mismatch)
+                  (make-copy
+                   (or file-precious-flag backup-by-copying
+                       ;; Don't rename a suid or sgid file.
+                       (and modes (< 0 (logand modes #o6000)))
+                       (not (file-writable-p
+                             (file-name-directory real-file-name)))
+                       (and backup-by-copying-when-linked
+                            (< 1 (file-nlinks real-file-name)))
+                       (and (or backup-by-copying-when-mismatch
+                                (and (integerp copy-when-priv-mismatch)
+                                     (let ((attr (file-attributes
+                                                  real-file-name
+                                                  'integer)))
+                                       (<= (nth 2 attr)
+                                           copy-when-priv-mismatch))))
+                            (not (file-ownership-preserved-p real-file-name
+                                                             t)))))
+                  setmodes)
+             (condition-case ()
+                 (progn
+                   ;; Actually make the backup file.
+                   (if make-copy
+                       (backup-buffer-copy real-file-name backupname
+                                           modes extended-attributes)
+                     ;; rename-file should delete old backup.
+                     (rename-file real-file-name backupname t)
+                     (setq setmodes (list modes extended-attributes
+                                          backupname)))
+                   (setq buffer-backed-up t)
+                   ;; Now delete the old versions, if desired.
+                   (dolist (old-version old-versions)
+                     (delete-file old-version)))
+               (file-error nil))
+             ;; If trouble writing the backup, write it in .emacs.d/%backup%.
+             (when (not buffer-backed-up)
+               (setq backupname (locate-user-emacs-file "%backup%~"))
+               (message "Cannot write backup file; backing up in %s"
+                        backupname)
+               (sleep-for 1)
+               (backup-buffer-copy real-file-name backupname
+                                   modes extended-attributes)
+               (setq buffer-backed-up t))
+             setmodes)))))))
 
 (defun backup-buffer-copy (from-name to-name modes extended-attributes)
   ;; Create temp files with strict access rights.  It's easy to
diff --git a/lisp/finder.el b/lisp/finder.el
index 47fab3c..306f2e2 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -115,7 +115,7 @@ Each element has the form (KEYWORD . DESCRIPTION).")
   "Syntax table used while in `finder-mode'.")
 
 (defvar finder-font-lock-keywords
-  '(("`\\([^'`]+\\)'" 1 font-lock-constant-face prepend))
+  '(("[`‘]\\([^'`‘’]+\\)['’]" 1 font-lock-constant-face prepend))
   "Font-lock keywords for Finder mode.")
 
 (defvar finder-headmark nil
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 7630afb..0ac9fb5 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7827,11 +7827,11 @@ positives are possible."
     ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]"
      ;; Exclude [.?] for URLs in gmane.emacs.cvs
      1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
-    ("`\\([a-z][-a-z0-9]+\\.el\\)'"
+    ("[`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]"
      1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
-    
("`\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)'"
+    
("[`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]"
      0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1)
-    ("`\\([a-z][a-z0-9]+-[a-z]+\\)'"
+    ("[`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]"
      0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1)
     ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)"
      1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1)
@@ -7841,7 +7841,7 @@ positives are possible."
      0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2)
     ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
      0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2)
-    ("`\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'"
+    ("[`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^'’]+\\)\\)['’]"
      ;; Unlike the other regexps we really have to require quoting
      ;; here to determine where it ends.
      1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index c476be6..208fd07 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1266,7 +1266,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
                    (progn (skip-chars-forward " \"")
                           (point))
                    (progn (end-of-line)
-                          (skip-chars-backward " 
\"")
+                          (skip-chars-backward " \r\"")
                           (point)))))
        (unless (member '%NoSelect flags)
          (push (utf7-decode (if (stringp group)
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 6f043df..76d58f7 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -158,7 +158,7 @@ certificates to be sent with every message to each address."
 Directory should contain files (in PEM format) named to the X.509
 hash of the certificate.  This can be done using OpenSSL such as:
 
-$ ln -s ca.pem `openssl x509 -noout -hash -in ca.pem`.0
+$ ln -s ca.pem \\=`openssl x509 -noout -hash -in ca.pem\\=`.0
 
 where `ca.pem' is the file containing a PEM encoded X.509 CA
 certificate."
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 4982ee5..346e1e1 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -135,7 +135,7 @@ if the variable `help-downcase-arguments' is non-nil."
                          "\\)"
                          "\\(?:es\\|s\\|th\\)?"  ; for ARGth, ARGs
                          "\\(?:-[a-z0-9-]+\\)?"  ; for ARG-xxx, ARG-n
-                         "\\(?:-[{([<`\"].*?\\)?"; for ARG-{x}, (x), <x>, [x], 
`x'
+                         "\\(?:-[{([<`\"‘].*?\\)?"; for ARG-{x}, (x), <x>, 
[x], `x', ‘x’
                          "\\>")                  ; end of word
                  (help-highlight-arg arg)
                  doc t t 1)))
@@ -306,7 +306,7 @@ suitable file is found, return nil."
             (when remapped
               (princ "Its keys are remapped to ")
               (princ (if (symbolp remapped)
-                        (concat "`" (symbol-name remapped) "'")
+                        (concat "‘" (symbol-name remapped) "’")
                       "an anonymous command"))
               (princ ".\n"))
 
@@ -340,16 +340,16 @@ suitable file is found, return nil."
       (insert "\nThis function has a compiler macro")
       (if (symbolp handler)
           (progn
-            (insert (format " `%s'" handler))
+            (insert (format " ‘%s’" handler))
             (save-excursion
-              (re-search-backward "`\\([^`']+\\)'" nil t)
+              (re-search-backward "‘\\([^‘’]+\\)’" nil t)
               (help-xref-button 1 'help-function handler)))
         ;; FIXME: Obsolete since 24.4.
         (let ((lib (get function 'compiler-macro-file)))
           (when (stringp lib)
-            (insert (format " in `%s'" lib))
+            (insert (format " in ‘%s’" lib))
             (save-excursion
-              (re-search-backward "`\\([^`']+\\)'" nil t)
+              (re-search-backward "‘\\([^‘’]+\\)’" nil t)
               (help-xref-button 1 'help-function-cmacro function lib)))))
       (insert ".\n"))))
 
@@ -393,13 +393,13 @@ suitable file is found, return nil."
                           (get function
                                'derived-mode-parent))))
     (when parent-mode
-      (insert "\nParent mode: `")
+      (insert "\nParent mode: ‘")
       (let ((beg (point)))
         (insert (format "%s" parent-mode))
         (make-text-button beg (point)
                           'type 'help-function
                           'help-args (list parent-mode)))
-      (insert "'.\n"))))
+      (insert "’.\n"))))
 
 (defun help-fns--obsolete (function)
   ;; Ignore lambda constructs, keyboard macros, etc.
@@ -415,7 +415,7 @@ suitable file is found, return nil."
       (when (nth 2 obsolete)
         (insert (format " since %s" (nth 2 obsolete))))
       (insert (cond ((stringp use) (concat ";\n" use))
-                    (use (format ";\nuse `%s' instead." use))
+                    (use (format ";\nuse ‘%s’ instead." use))
                     (t "."))
               "\n"))))
 
@@ -451,7 +451,7 @@ FILE is the file where FUNCTION was probably defined."
                           (format ";\nin Lisp code %s" interactive-only))
                          ((and (symbolp 'interactive-only)
                                (not (eq interactive-only t)))
-                          (format ";\nin Lisp code use `%s' instead."
+                          (format ";\nin Lisp code use ‘%s’ instead."
                                   interactive-only))
                          (t "."))
                    "\n")))))
@@ -520,7 +520,7 @@ FILE is the file where FUNCTION was probably defined."
                 ;; Aliases are Lisp functions, so we need to check
                 ;; aliases before functions.
                 (aliased
-                 (format "an alias for `%s'" real-def))
+                 (format "an alias for ‘%s’" real-def))
                 ((autoloadp def)
                  (format "%s autoloaded %s"
                          (if (commandp def) "an interactive" "an")
@@ -554,21 +554,21 @@ FILE is the file where FUNCTION was probably defined."
       (with-current-buffer standard-output
        (save-excursion
          (save-match-data
-           (when (re-search-backward "alias for `\\([^`']+\\)'" nil t)
+           (when (re-search-backward "alias for ‘\\([^‘’]+\\)’" nil t)
              (help-xref-button 1 'help-function real-def)))))
 
       (when file-name
-       (princ " in `")
+       (princ " in ‘")
        ;; We used to add .el to the file name,
        ;; but that's completely wrong when the user used load-file.
        (princ (if (eq file-name 'C-source)
                   "C source code"
                 (help-fns-short-filename file-name)))
-       (princ "'")
+       (princ "’")
        ;; Make a hyperlink to the library.
        (with-current-buffer standard-output
          (save-excursion
-           (re-search-backward "`\\([^`']+\\)'" nil t)
+           (re-search-backward "‘\\([^‘’]+\\)’" nil t)
            (help-xref-button 1 'help-function-def function file-name))))
       (princ ".")
       (with-current-buffer (help-buffer)
@@ -702,14 +702,14 @@ it is displayed along with the global value."
 
              (if file-name
                  (progn
-                   (princ " is a variable defined in `")
+                   (princ " is a variable defined in ‘")
                    (princ (if (eq file-name 'C-source)
                               "C source code"
                             (file-name-nondirectory file-name)))
-                   (princ "'.\n")
+                   (princ "’.\n")
                    (with-current-buffer standard-output
                      (save-excursion
-                       (re-search-backward "`\\([^`']+\\)'" nil t)
+                       (re-search-backward "‘\\([^‘’]+\\)’" nil t)
                        (help-xref-button 1 'help-variable-def
                                          variable file-name)))
                    (if valvoid
@@ -839,7 +839,8 @@ if it is given a local binding.\n")))
              ;; Mention if it's an alias.
               (unless (eq alias variable)
                 (setq extra-line t)
-                (princ (format "  This variable is an alias for `%s'.\n" 
alias)))
+                (princ (format "  This variable is an alias for ‘%s’.\n"
+                               alias)))
 
               (when obsolete
                 (setq extra-line t)
@@ -847,7 +848,8 @@ if it is given a local binding.\n")))
                 (if (nth 2 obsolete)
                     (princ (format " since %s" (nth 2 obsolete))))
                (princ (cond ((stringp use) (concat ";\n  " use))
-                            (use (format ";\n  use `%s' instead." (car 
obsolete)))
+                            (use (format ";\n  use ‘%s’ instead."
+                                          (car obsolete)))
                             (t ".")))
                 (terpri))
 
@@ -878,13 +880,13 @@ if it is given a local binding.\n")))
                               (setq file (car file)
                                     dir-file nil)))
                        (princ (if dir-file
-                                  "by the file\n  `"
-                                "for the directory\n  `"))
+                                  "by the file\n  ‘"
+                                "for the directory\n  ‘"))
                        (with-current-buffer standard-output
                          (insert-text-button
                           file 'type 'help-dir-local-var-def
                           'help-args (list variable file)))
-                       (princ "'.\n")))
+                       (princ "’.\n")))
                  (princ "  This variable's value is file-local.\n")))
 
              (when (memq variable ignored-local-variables)
@@ -899,7 +901,7 @@ variable.\n"))
 file-local variable.\n")
                (when (assq variable safe-local-variable-values)
                  (princ "  However, you have added it to \
-`safe-local-variable-values'.\n")))
+‘safe-local-variable-values’.\n")))
 
              (when safe-var
                 (setq extra-line t)
@@ -907,7 +909,7 @@ file-local variable.\n")
                (princ "if its value\n  satisfies the predicate ")
                (princ (if (byte-code-function-p safe-var)
                           "which is a byte-compiled expression.\n"
-                        (format "`%s'.\n" safe-var))))
+                        (format "‘%s’.\n" safe-var))))
 
               (if extra-line (terpri))
              (princ "Documentation:\n")
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index f99e916..3fc0ad2 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -322,7 +322,7 @@ Commands:
                    "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"
                    "[ \t\n]+\\)?"
                    ;; Note starting with word-syntax character:
-                   "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'"))
+                   "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]"))
   "Regexp matching doc string references to symbols.
 
 The words preceding the quoted symbol can be used in doc strings to
@@ -337,11 +337,12 @@ when help commands related to multilingual environment 
(e.g.,
 
 
 (defconst help-xref-info-regexp
-  (purecopy "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`\\([^']+\\)'")
+  (purecopy
+   "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+[`‘]\\([^'’]+\\)['’]")
   "Regexp matching doc string references to an Info node.")
 
 (defconst help-xref-url-regexp
-  (purecopy "\\<[Uu][Rr][Ll][ \t\n]+`\\([^']+\\)'")
+  (purecopy "\\<[Uu][Rr][Ll][ \t\n]+[`‘]\\([^'’]+\\)['’]")
   "Regexp matching doc string references to a URL.")
 
 ;;;###autoload
diff --git a/lisp/help.el b/lisp/help.el
index 2b8f642..1411c1a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -964,11 +964,12 @@ documentation for the major and minor modes of that 
buffer."
        (let* ((mode major-mode)
               (file-name (find-lisp-object-file-name mode nil)))
          (when file-name
-           (princ (concat " defined in `" (file-name-nondirectory file-name) 
"'"))
+           (princ (concat " defined in ‘" (file-name-nondirectory file-name)
+                           "’"))
            ;; Make a hyperlink to the library.
            (with-current-buffer standard-output
              (save-excursion
-               (re-search-backward "`\\([^`']+\\)'" nil t)
+               (re-search-backward "‘\\([^‘’]+\\)’" nil t)
                (help-xref-button 1 'help-function-def mode file-name)))))
        (princ ":\n")
        (princ (documentation major-mode)))))
diff --git a/lisp/ido.el b/lisp/ido.el
index b97f72c..5995fcd 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -377,7 +377,7 @@ use either \\[customize] or the function `ido-mode'."
   '("\\` ")
   "List of regexps or functions matching buffer names to ignore.
 For example, traditional behavior is not to list buffers whose names begin
-with a space, for which the regexp is ‘\\` ’.  See the source file for
+with a space, for which the regexp is ‘\\\\=` ’.  See the source file for
 example functions that filter buffer names."
   :type '(repeat (choice regexp function))
   :group 'ido)
@@ -386,7 +386,7 @@ example functions that filter buffer names."
   '("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./")
   "List of regexps or functions matching file names to ignore.
 For example, traditional behavior is not to list files whose names begin
-with a #, for which the regexp is ‘\\`#’.  See the source file for
+with a #, for which the regexp is ‘\\\\=`#’.  See the source file for
 example functions that filter filenames."
   :type '(repeat (choice regexp function))
   :group 'ido)
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 8a86dc8..6168a0c 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -613,8 +613,8 @@ Return nil if there is nothing appropriate in the buffer 
near point."
   (condition-case nil
       (save-excursion
        (let ((case-fold-search t)
-             (ignored-chars "][()`',:.\" \t\n")
-             (significant-chars "^][()`',:.\" \t\n")
+             (ignored-chars "][()`'‘’,:.\" \t\n")
+             (significant-chars "^][()`'‘’,:.\" \t\n")
              beg end)
          (cond
           ((and (memq (get-char-property (point) 'face)
@@ -899,7 +899,7 @@ Return nil if there is nothing appropriate in the buffer 
near point."
 
 (info-lookup-maybe-add-help
  :mode 'emacs-lisp-mode
- :regexp "[^][()`',\" \t\n]+"
+ :regexp "[^][()`'‘’,\" \t\n]+"
  :doc-spec '(;; Commands with key sequences appear in nodes as `foo' and
              ;; those without as `M-x foo'.
              ("(emacs)Command Index"  nil "['`‘]\\(M-x[ \t\n]+\\)?" "['’]")
@@ -917,24 +917,24 @@ Return nil if there is nothing appropriate in the buffer 
near point."
 ;; docstrings talk about elisp, so have apropos-mode follow emacs-lisp-mode
 (info-lookup-maybe-add-help
  :mode 'apropos-mode
- :regexp "[^][()`',\" \t\n]+" ;; same as emacs-lisp-mode above
+ :regexp "[^][()`'‘’,\" \t\n]+" ;; same as emacs-lisp-mode above
  :other-modes '(emacs-lisp-mode))
 
 (info-lookup-maybe-add-help
  :mode 'lisp-interaction-mode
- :regexp "[^][()`',\" \t\n]+"
+ :regexp "[^][()`'‘’,\" \t\n]+"
  :parse-rule 'ignore
  :other-modes '(emacs-lisp-mode))
 
 (info-lookup-maybe-add-help
  :mode 'lisp-mode
- :regexp "[^()`',\" \t\n]+"
+ :regexp "[^()`'‘’,\" \t\n]+"
  :parse-rule 'ignore
  :other-modes '(emacs-lisp-mode))
 
 (info-lookup-maybe-add-help
  :mode 'scheme-mode
- :regexp "[^()`',\" \t\n]+"
+ :regexp "[^()`'‘’,\" \t\n]+"
  :ignore-case t
  ;; Aubrey Jaffer's rendition from <URL:ftp://ftp-swiss.ai.mit.edu/pub/scm>
  :doc-spec '(("(r5rs)Index" nil
@@ -1041,13 +1041,13 @@ Return nil if there is nothing appropriate in the 
buffer near point."
 (info-lookup-maybe-add-help
  :mode 'Custom-mode
  :ignore-case t
- :regexp "[^][()`',:\" \t\n]+"
+ :regexp "[^][()`'‘’,:\" \t\n]+"
  :parse-rule 'info-lookup-guess-custom-symbol
  :other-modes '(emacs-lisp-mode))
 
 (info-lookup-maybe-add-help
  :mode 'help-mode
- :regexp "[^][()`',:\" \t\n]+"
+ :regexp "[^][()`'‘’,:\" \t\n]+"
  :other-modes '(emacs-lisp-mode))
 
 (provide 'info-look)
diff --git a/lisp/info.el b/lisp/info.el
index d635819..80428e7 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3378,10 +3378,10 @@ Give an empty topic name to go to the Index node 
itself."
            (re-search-forward (format
                                 "[a-zA-Z]+: [a-zA-Z0-9_ *&]+ %s\\( \\|$\\)"
                                 (regexp-quote name)) nil t)
-           (search-forward (format "`%s'" name) nil t)
+           (search-forward (format "[`‘]%s['’]" name) nil t)
            (and (string-match "\\`.*\\( (.*)\\)\\'" name)
                 (search-forward
-                 (format "`%s'" (substring name 0 (match-beginning 1)))
+                 (format "[`‘]%s['’]" (substring name 0 (match-beginning 1)))
                  nil t))
            (search-forward name nil t)
            ;; Try again without the " <1>" makeinfo can append
@@ -3406,7 +3406,7 @@ MATCHES is a list of index matches found by 
`Info-index'.")
 (defun Info-virtual-index-find-node (filename nodename &optional 
_no-going-back)
   "Index-specific implementation of `Info-find-node-2'."
   ;; Generate Index-like menu of matches
-  (if (string-match "^\\*Index for `\\(.+\\)'\\*$" nodename)
+  (if (string-match "^\\*Index for ‘\\(.+\\)’\\*$" nodename)
       ;; Generate Index-like menu of matches
       (let* ((topic (match-string 1 nodename))
             (matches (cdr (assoc (cons (or filename Info-current-file) topic)
@@ -3415,7 +3415,7 @@ MATCHES is a list of index matches found by 
`Info-index'.")
                        (or filename Info-current-file) nodename))
        (insert "Info Virtual Index\n")
        (insert "******************\n\n")
-       (insert "Index entries that match `" topic "':\n\n")
+       (insert "Index entries that match ‘" topic "’:\n\n")
        (insert "\0\b[index\0\b]\n")
        (if (null matches)
            (insert "No matches found.\n")
@@ -3434,13 +3434,13 @@ MATCHES is a list of index matches found by 
`Info-index'.")
       (insert "Info Virtual Index\n")
       (insert "******************\n\n")
       (insert "This is a list of search results produced by\n"
-             "`Info-virtual-index' for the current manual.\n\n")
+             "‘Info-virtual-index’ for the current manual.\n\n")
       (insert "* Menu:\n\n")
       (dolist (nodeinfo nodes)
        (when (equal (car (nth 0 nodeinfo)) (or filename Info-current-file))
          (insert
           (format "* %-20s %s.\n"
-                  (format "*Index for `%s'*::" (cdr (nth 0 nodeinfo)))
+                  (format "*Index for ‘%s’*::" (cdr (nth 0 nodeinfo)))
                   (cdr (nth 0 nodeinfo)))))))))
 
 (defun Info-virtual-index (topic)
@@ -3475,7 +3475,7 @@ search results."
        (setq Info-history-list ohist-list)
        (Info-goto-node orignode)
        (message "")))
-    (Info-find-node Info-current-file (format "*Index for `%s'*" topic))))
+    (Info-find-node Info-current-file (format "*Index for ‘%s’*" topic))))
 
 (add-to-list 'Info-virtual-files
             '("\\`\\*Apropos\\*\\'"
@@ -3515,7 +3515,7 @@ MATCHES is a list of index matches found by 
`Info-apropos-matches'.")
                        Info-apropos-file nodename))
        (insert "Apropos Index\n")
        (insert "*************\n\n")
-       (insert "This is a list of search results produced by 
`info-apropos'.\n\n")
+       (insert "This is a list of search results produced by 
‘info-apropos’.\n\n")
        (insert "* Menu:\n\n")
        (dolist (nodeinfo nodes)
          (insert (format "* %-20s %s.\n"
@@ -3529,7 +3529,7 @@ MATCHES is a list of index matches found by 
`Info-apropos-matches'.")
                        Info-apropos-file nodename))
        (insert "Apropos Index\n")
        (insert "*************\n\n")
-       (insert "Index entries that match `" (nth 1 nodeinfo) "':\n\n")
+       (insert "Index entries that match ‘" (nth 1 nodeinfo) "’:\n\n")
        (insert "\0\b[index\0\b]\n")
        (if (eq matches t)
            (insert "No matches found.\n")
@@ -3614,7 +3614,7 @@ Build a menu of the possible matches."
        (setq nodes (cdr nodes)))
       (if nodes
          (Info-find-node Info-apropos-file (car (car nodes)))
-       (setq nodename (format "Index for `%s'" string))
+       (setq nodename (format "Index for ‘%s’" string))
        (push (list nodename string (Info-apropos-matches string))
              Info-apropos-nodes)
        (Info-find-node Info-apropos-file nodename)))))
@@ -3894,7 +3894,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
   (let (node)
     (cond
      ((setq node (Info-get-token (point) "[hf]t?tps?://"
-                                "\\([hf]t?tps?://[^ \t\n\"`({<>})']+\\)"))
+                                "\\([hf]t?tps?://[^ \t\n\"`‘({<>})’']+\\)"))
       (browse-url node)
       (setq node t))
      ((setq node (Info-get-token (point) "\\*note[ \n\t]+"
@@ -4979,7 +4979,7 @@ first line or header line, and for breadcrumb links.")
       ;; Fontify http and ftp references
       (goto-char (point-min))
       (when not-fontified-p
-        (while (re-search-forward "\\(https?\\|ftp\\)://[^ \t\n\"`({<>})']+"
+        (while (re-search-forward "\\(https?\\|ftp\\)://[^ \t\n\"`‘({<>})’']+"
                                   nil t)
           (add-text-properties (match-beginning 0) (match-end 0)
                                '(font-lock-face info-xref
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 4b63cb8..474806d 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -177,7 +177,7 @@
                    "\\(charset\\)"
                    "\\)\\s-+\\)?"
                    ;; Note starting with word-syntax character:
-                   "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'")))
+                   "[`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]")))
 
 (defun coding-system-change-eol-conversion (coding-system eol-type)
   "Return a coding system which differs from CODING-SYSTEM in EOL conversion.
@@ -1588,7 +1588,7 @@ which marks the variable `default-input-method' as set 
for Custom buffers."
         (with-output-to-temp-buffer (help-buffer)
           (let ((elt (assoc input-method input-method-alist)))
             (princ (format
-                    "Input method: %s (`%s' in mode line) for %s\n  %s\n"
+                    "Input method: %s (‘%s’ in mode line) for %s\n  %s\n"
                     input-method (nth 3 elt) (nth 1 elt) (nth 4 elt))))))))))
 
 (defun describe-current-input-method ()
@@ -2173,10 +2173,11 @@ See `set-language-info-alist' for use in programs."
              (search-backward (symbol-name (car l)))
              (help-xref-button 0 'help-coding-system (car l))
              (goto-char (point-max))
-             (insert " (`"
+             (insert " (‘"
                      (coding-system-mnemonic (car l))
-                     "' in mode line):\n\t"
-                     (coding-system-doc-string (car l))
+                     "’ in mode line):\n\t"
+                      (substitute-command-keys
+                       (coding-system-doc-string (car l)))
                      "\n")
              (let ((aliases (coding-system-aliases (car l))))
                (when aliases
@@ -2687,14 +2688,22 @@ See also `locale-charset-language-names', 
`locale-language-names',
 
     ;; On Windows, override locale-coding-system,
     ;; default-file-name-coding-system, keyboard-coding-system,
-    ;; terminal-coding-system with system codepage.
+    ;; terminal-coding-system with the ANSI or console codepage.
     (when (and (eq system-type 'windows-nt)
                (boundp 'w32-ansi-code-page))
-      (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page))))
+      (let* ((code-page-coding
+              (intern (format "cp%d" (if noninteractive
+                                         (w32-get-console-codepage)
+                                       w32-ansi-code-page))))
+             (output-coding
+              (if noninteractive
+                  (intern (format "cp%d" (w32-get-console-output-codepage)))
+                code-page-coding)))
        (when (coding-system-p code-page-coding)
+          (or output-coding (setq output-coding code-page-coding))
          (unless frame (setq locale-coding-system code-page-coding))
          (set-keyboard-coding-system code-page-coding frame)
-         (set-terminal-coding-system code-page-coding frame)
+         (set-terminal-coding-system output-coding frame)
          (setq default-file-name-coding-system code-page-coding))))
 
     (when (eq system-type 'darwin)
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index 42e78f9..7ef758b 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -332,7 +332,7 @@ meanings of these arguments."
       (let ((char (charset-iso-final-char charset)))
        (when (> char 0)
          (insert "Final char of ISO2022 designation sequence: ")
-         (insert (format "`%c'\n" char))))
+         (insert (format "‘%c’\n" char))))
       (let (aliases)
        (dolist (c charset-list)
          (if (and (not (eq c charset))
@@ -581,7 +581,7 @@ docstring, and print only the first line of the docstring."
            (if (string-match "\n" doc)
                (setq doc (substring doc 0 (match-beginning 0))))
            (setq doc (concat "  " doc)))
-         (princ (format "%s\n" doc))))))
+         (princ (format "%s\n" (substitute-command-keys doc)))))))
 
 ;;;###autoload
 (defun describe-current-coding-system ()
@@ -1038,7 +1038,7 @@ see the function `describe-fontset' for the format of the 
list."
       (save-excursion
        (goto-char (point-min))
        (while (re-search-forward
-               "^  \\([^ ]+\\) (`.*' in mode line)$" nil t)
+               "^  \\([^ ]+\\) (‘.*’ in mode line)$" nil t)
          (help-xref-button 1 'help-input-method (match-string 1)))))))
 
 (defun list-input-methods-1 ()
@@ -1046,7 +1046,7 @@ see the function `describe-fontset' for the format of the 
list."
       (princ "
 No input method is available, perhaps because you have not
 installed LEIM (Libraries of Emacs Input Methods).")
-    (princ "LANGUAGE\n  NAME (`TITLE' in mode line)\n")
+    (princ "LANGUAGE\n  NAME (‘TITLE’ in mode line)\n")
     (princ "    SHORT-DESCRIPTION\n------------------------------\n")
     (setq input-method-alist
          (sort input-method-alist
@@ -1058,7 +1058,7 @@ installed LEIM (Libraries of Emacs Input Methods).")
          (setq language (nth 1 elt))
          (princ language)
          (terpri))
-       (princ (format "  %s (`%s' in mode line)\n    %s\n"
+       (princ (format "  %s (‘%s’ in mode line)\n    %s\n"
                       (car elt)
                       (let ((title (nth 3 elt)))
                         (if (and (consp title) (stringp (car title)))
@@ -1066,8 +1066,9 @@ installed LEIM (Libraries of Emacs Input Methods).")
                           title))
                       ;; If the doc is multi-line, indent all
                       ;; non-blank lines. (Bug#8066)
-                      (replace-regexp-in-string "\n\\(.\\)" "\n    \\1"
-                                                (or (nth 4 elt) ""))))))))
+                      (replace-regexp-in-string
+                        "\n\\(.\\)" "\n    \\1"
+                        (substitute-command-keys (or (nth 4 elt) "")))))))))
 
 ;;; DIAGNOSIS
 
diff --git a/lisp/isearch.el b/lisp/isearch.el
index dc10502..d1b92bd 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -932,12 +932,6 @@ convert the search string to a regexp used by regexp 
search functions."
   (add-hook 'post-command-hook 'isearch-post-command-hook)
   (add-hook 'mouse-leave-buffer-hook 'isearch-done)
   (add-hook 'kbd-macro-termination-hook 'isearch-done)
-  (make-local-variable 'cursor-sensor-inhibit)
-  (unless (boundp 'cursor-sensor-inhibit)
-    (setq cursor-sensor-inhibit nil))
-  ;; Suspend things like cursor-intangible during Isearch so we can search even
-  ;; within intangible text.
-  (push 'isearch cursor-sensor-inhibit)
 
   ;; isearch-mode can be made modal (in the sense of not returning to
   ;; the calling function until searching is completed) by entering
@@ -949,10 +943,23 @@ convert the search string to a regexp used by regexp 
search functions."
 
 
 ;; Some high level utilities.  Others below.
+(defvar isearch--current-buffer nil)
 
 (defun isearch-update ()
   "This is called after every isearch command to update the display.
 The last thing it does is to run `isearch-update-post-hook'."
+  (unless (eq (current-buffer) isearch--current-buffer)
+    (when isearch--current-buffer
+      (with-current-buffer isearch--current-buffer
+        (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit))))
+    (setq isearch--current-buffer (current-buffer))
+    (make-local-variable 'cursor-sensor-inhibit)
+    (unless (boundp 'cursor-sensor-inhibit)
+      (setq cursor-sensor-inhibit nil))
+    ;; Suspend things like cursor-intangible during Isearch so we can search
+    ;; even within intangible text.
+    (push 'isearch cursor-sensor-inhibit))
+
   (if (and (null unread-command-events)
           (null executing-kbd-macro))
       (progn
@@ -1026,7 +1033,9 @@ NOPUSH is t and EDIT is t."
   (remove-hook 'mouse-leave-buffer-hook 'isearch-done)
   (remove-hook 'kbd-macro-termination-hook 'isearch-done)
   (setq isearch-lazy-highlight-start nil)
-  (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit))
+  (with-current-buffer isearch--current-buffer
+    (setq isearch--current-buffer nil)
+    (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))
 
   ;; Called by all commands that terminate isearch-mode.
   ;; If NOPUSH is non-nil, we don't push the string on the search ring.
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index a27f749..1278657 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -129,9 +129,9 @@ isolated vowel.")
   "Degree of reduction in converting Ethiopic digits into Arabic digits.
 Should be 0, 1 or 2.
 For example, ({10}{9}{100}{80}{7}) is converted into:
-    `10`9`100`80`7  if `ethio-numeric-reduction' is 0,
-    `109100807     if `ethio-numeric-reduction' is 1,
-    `10900807      if `ethio-numeric-reduction' is 2.")
+    \\=`10\\=`9\\=`100\\=`80\\=`7  if `ethio-numeric-reduction' is 0,
+    \\=`109100807          if `ethio-numeric-reduction' is 1,
+    \\=`10900807           if `ethio-numeric-reduction' is 2.")
 
 (defvar ethio-java-save-lowercase nil
   "Non-nil means save Ethiopic characters in lowercase hex numbers to Java 
files.
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index a52a19e..0559f4c 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file.
 
 ;;;***
 
-;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21855 577
+;;;;;;  357945 168000))
 ;;; Generated autoloads from progmodes/ada-xref.el
 
 (autoload 'ada-find-file "ada-xref" "\
@@ -238,8 +238,8 @@ old-style time formats for entries are supported.
 
 ;;;***
 
-;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21670 32330
-;;;;;;  885624 725000))
+;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21853 45243
+;;;;;;  381515 341000))
 ;;; Generated autoloads from emacs-lisp/advice.el
 
 (defvar ad-redefinition-action 'warn "\
@@ -477,7 +477,7 @@ A replacement function for `newline-and-indent', aligning 
as it goes.
 
 ;;;***
 
-;;;### (autoloads nil "allout" "allout.el" (21670 32330 885624 725000))
+;;;### (autoloads nil "allout" "allout.el" (21855 576 477946 398000))
 ;;; Generated autoloads from allout.el
 (push (purecopy '(allout 2 3)) package--builtin-versions)
 
@@ -837,8 +837,8 @@ for details on preparing Emacs for automatic allout 
activation.
 
 ;;;***
 
-;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21670
-;;;;;;  32330 885624 725000))
+;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21855
+;;;;;;  576 417950 874000))
 ;;; Generated autoloads from allout-widgets.el
 (push (purecopy '(allout-widgets 1 0)) package--builtin-versions)
 
@@ -896,8 +896,8 @@ outline hot-spot navigation (see `allout-mode').
 
 ;;;***
 
-;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21696 56380 925320
-;;;;;;  624000))
+;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21855 577 137948
+;;;;;;  458000))
 ;;; Generated autoloads from net/ange-ftp.el
 
 (defalias 'ange-ftp-re-read-dir 'ange-ftp-reread-dir)
@@ -1153,8 +1153,8 @@ Returns list of symbols and documentation found.
 
 ;;;***
 
-;;;### (autoloads nil "arc-mode" "arc-mode.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "arc-mode" "arc-mode.el" (21862 60209 608658
+;;;;;;  477000))
 ;;; Generated autoloads from arc-mode.el
 
 (autoload 'archive-mode "arc-mode" "\
@@ -1245,8 +1245,8 @@ Entering array mode calls the function `array-mode-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "artist" "textmodes/artist.el" (21750 59840
-;;;;;;  704617 663000))
+;;;### (autoloads nil "artist" "textmodes/artist.el" (21852 24382
+;;;;;;  57264 475000))
 ;;; Generated autoloads from textmodes/artist.el
 (push (purecopy '(artist 1 2 6)) package--builtin-versions)
 
@@ -1328,7 +1328,7 @@ Drawing with the mouse:
                * Cut copies, then clears the rectangle/square.
 
                * When drawing lines or poly-lines, you can set arrows.
-                 See below under ``Arrows'' for more info.
+                 See below under \"Arrows\" for more info.
 
                * The mode line shows the currently selected drawing operation.
                  In addition, if it has an asterisk (*) at the end, you
@@ -1436,8 +1436,8 @@ Variables
  artist-vaporize-fuzziness      Tolerance when recognizing lines
  artist-spray-interval          Seconds between repeated sprayings
  artist-spray-radius            Size of the spray-area
- artist-spray-chars             The spray-``color''
- artist-spray-new-chars         Initial spray-``color''
+ artist-spray-chars             The spray-\"color\"
+ artist-spray-new-chars         Initial spray-\"color\"
 
 Hooks
 
@@ -1604,8 +1604,8 @@ insert a template for the file depending on the mode of 
the buffer.
 
 ;;;***
 
-;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21802
-;;;;;;  17960 382855 287000))
+;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21853
+;;;;;;  45243 381515 341000))
 ;;; Generated autoloads from emacs-lisp/autoload.el
 
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -1656,8 +1656,8 @@ should be non-nil).
 
 ;;;***
 
-;;;### (autoloads nil "autorevert" "autorevert.el" (21752 15166 568176
-;;;;;;  278000))
+;;;### (autoloads nil "autorevert" "autorevert.el" (21855 576 477946
+;;;;;;  398000))
 ;;; Generated autoloads from autorevert.el
 
 (autoload 'auto-revert-mode "autorevert" "\
@@ -1680,7 +1680,7 @@ without being changed in the part that is already in the 
buffer.
 Turn on Auto-Revert Mode.
 
 This function is designed to be added to hooks, for example:
-  (add-hook 'c-mode-hook 'turn-on-auto-revert-mode)
+  (add-hook 'c-mode-hook #'turn-on-auto-revert-mode)
 
 \(fn)" nil nil)
 
@@ -1708,7 +1708,7 @@ Use `auto-revert-mode' for changes other than appends!
 Turn on Auto-Revert Tail mode.
 
 This function is designed to be added to hooks, for example:
-  (add-hook 'my-logfile-mode-hook 'turn-on-auto-revert-tail-mode)
+  (add-hook 'my-logfile-mode-hook #'turn-on-auto-revert-tail-mode)
 
 \(fn)" nil nil)
 
@@ -1875,8 +1875,8 @@ For non-interactive use see also `benchmark-run' and
 
 ;;;***
 
-;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21822 37176
-;;;;;;  700494 564000))
+;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21855 577 517944
+;;;;;;  90000))
 ;;; Generated autoloads from textmodes/bibtex.el
 
 (autoload 'bibtex-initialize "bibtex" "\
@@ -2742,8 +2742,8 @@ Like `bug-reference-mode', but only buttonize in comments 
and strings.
 
 ;;;***
 
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21824
-;;;;;;  44973 370497 114000))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21855
+;;;;;;  576 747949 136000))
 ;;; Generated autoloads from emacs-lisp/bytecomp.el
 (put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
 (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -2762,7 +2762,7 @@ else the global value will be modified.
 
 (autoload 'byte-compile-enable-warning "bytecomp" "\
 Change `byte-compile-warnings' to enable WARNING.
-If `byte-compile-warnings' is `t', do nothing.  Otherwise, if the
+If `byte-compile-warnings' is t, do nothing.  Otherwise, if the
 first element is `not', remove WARNING, else add it.
 Normally you should let-bind `byte-compile-warnings' before calling this,
 else the global value will be modified.
@@ -2898,7 +2898,7 @@ from the cursor position.
 
 ;;;***
 
-;;;### (autoloads nil "calc" "calc/calc.el" (21670 32330 885624 725000))
+;;;### (autoloads nil "calc" "calc/calc.el" (21855 576 517945 858000))
 ;;; Generated autoloads from calc/calc.el
  (define-key ctl-x-map "*" 'calc-dispatch)
 
@@ -2995,8 +2995,8 @@ See Info node `(calc)Defining Functions'.
 
 ;;;***
 
-;;;### (autoloads nil "calculator" "calculator.el" (21702 8774 274627
-;;;;;;  813000))
+;;;### (autoloads nil "calculator" "calculator.el" (21850 35126 597287
+;;;;;;  693000))
 ;;; Generated autoloads from calculator.el
 
 (autoload 'calculator "calculator" "\
@@ -3007,8 +3007,8 @@ See the documentation for `calculator-mode' for more 
information.
 
 ;;;***
 
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (21670 32330
-;;;;;;  885624 725000))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (21852 24381
+;;;;;;  457257 198000))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3051,8 +3051,8 @@ This function is suitable for execution in an init file.
 
 ;;;***
 
-;;;### (autoloads nil "canlock" "gnus/canlock.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "canlock" "gnus/canlock.el" (21852 24381 567240
+;;;;;;  49000))
 ;;; Generated autoloads from gnus/canlock.el
 
 (autoload 'canlock-insert-header "canlock" "\
@@ -3069,8 +3069,8 @@ it fails.
 
 ;;;***
 
-;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21743
-;;;;;;  190 195328 729000))
+;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21855
+;;;;;;  577 387944 393000))
 ;;; Generated autoloads from progmodes/cc-engine.el
 
 (autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3080,8 +3080,8 @@ Return the syntactic context of the current line.
 
 ;;;***
 
-;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21855 577
+;;;;;;  397944 786000))
 ;;; Generated autoloads from progmodes/cc-guess.el
 
 (defvar c-guess-guessed-offsets-alist nil "\
@@ -3179,8 +3179,8 @@ the absolute file name of the file if STYLE-NAME is nil.
 
 ;;;***
 
-;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21814 50992
-;;;;;;  820503 761000))
+;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21861 39358
+;;;;;;  537945 535000))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3749,15 +3749,15 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer 
contents.
 
 ;;;***
 
-;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21679 47292
-;;;;;;  556033 759000))
+;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21841 54062
+;;;;;;  162628 940000))
 ;;; Generated autoloads from emacs-lisp/chart.el
 (push (purecopy '(chart 0 2)) package--builtin-versions)
 
 ;;;***
 
 ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
-;;;;;;  (21826 50092 650494 96000))
+;;;;;;  (21855 576 747949 136000))
 ;;; Generated autoloads from emacs-lisp/check-declare.el
 
 (autoload 'check-declare-file "check-declare" "\
@@ -3774,8 +3774,8 @@ Returns non-nil if any false statements are found.
 
 ;;;***
 
-;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21779
-;;;;;;  56495 106033 935000))
+;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21862
+;;;;;;  60209 647465 565000))
 ;;; Generated autoloads from emacs-lisp/checkdoc.el
 (push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)
 (put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp)
@@ -4053,8 +4053,8 @@ and runs the normal hook `command-history-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21765
-;;;;;;  23600 805241 145000))
+;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21855
+;;;;;;  576 767950 442000))
 ;;; Generated autoloads from emacs-lisp/cl-indent.el
 
 (autoload 'common-lisp-indent-function "cl-indent" "\
@@ -4137,8 +4137,8 @@ instead.
 
 ;;;***
 
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21799 41766
-;;;;;;  961230 875000))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21843 55159
+;;;;;;  639401 629000))
 ;;; Generated autoloads from emacs-lisp/cl-lib.el
 (push (purecopy '(cl-lib 1 0)) package--builtin-versions)
 
@@ -4156,8 +4156,8 @@ a future Emacs interpreter will be able to use it.")
 
 ;;;***
 
-;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21828 42028
+;;;;;;  650494 471000))
 ;;; Generated autoloads from progmodes/cmacexp.el
 
 (autoload 'c-macro-expand "cmacexp" "\
@@ -4318,8 +4318,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to 
use.
 
 ;;;***
 
-;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21855 577 527945
+;;;;;;  248000))
 ;;; Generated autoloads from vc/compare-w.el
 
 (autoload 'compare-windows "compare-w" "\
@@ -4355,8 +4355,8 @@ on third call it again advances points to the next 
difference and so on.
 
 ;;;***
 
-;;;### (autoloads nil "compile" "progmodes/compile.el" (21798 49947
-;;;;;;  262665 54000))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (21850 34915
+;;;;;;  107315 406000))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -4784,8 +4784,8 @@ If FIX is non-nil, run `copyright-fix-years' instead.
 
 ;;;***
 
-;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21771
-;;;;;;  62389 36768 739000))
+;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21862
+;;;;;;  60209 828658 75000))
 ;;; Generated autoloads from progmodes/cperl-mode.el
 (put 'cperl-indent-level 'safe-local-variable 'integerp)
 (put 'cperl-brace-offset 'safe-local-variable 'integerp)
@@ -5125,8 +5125,8 @@ entering the area covered by the text-property property 
or leaving it.
 
 ;;;***
 
-;;;### (autoloads nil "cus-edit" "cus-edit.el" (21815 59890 571208
-;;;;;;  933000))
+;;;### (autoloads nil "cus-edit" "cus-edit.el" (21855 576 647952
+;;;;;;  330000))
 ;;; Generated autoloads from cus-edit.el
 
 (defvar custom-browse-sort-alphabetically nil "\
@@ -5445,8 +5445,8 @@ The format is suitable for use with `easy-menu-define'.
 
 ;;;***
 
-;;;### (autoloads nil "cus-theme" "cus-theme.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "cus-theme" "cus-theme.el" (21862 60209 618658
+;;;;;;  448000))
 ;;; Generated autoloads from cus-theme.el
 
 (autoload 'customize-create-theme "cus-theme" "\
@@ -5622,7 +5622,7 @@ Create a new data-debug buffer with NAME.
 
 ;;;***
 
-;;;### (autoloads nil "dbus" "net/dbus.el" (21799 41767 11212 472000))
+;;;### (autoloads nil "dbus" "net/dbus.el" (21855 577 147947 107000))
 ;;; Generated autoloads from net/dbus.el
 
 (autoload 'dbus-handle-event "dbus" "\
@@ -5762,8 +5762,8 @@ There is some minimal font-lock support (see vars
 
 ;;;***
 
-;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21777 14770
-;;;;;;  397461 322000))
+;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21855 576 767950
+;;;;;;  442000))
 ;;; Generated autoloads from emacs-lisp/debug.el
 
 (setq debugger 'debug)
@@ -5958,8 +5958,8 @@ the first time the mode is used.
 
 ;;;***
 
-;;;### (autoloads nil "descr-text" "descr-text.el" (21695 35516 595262
-;;;;;;  313000))
+;;;### (autoloads nil "descr-text" "descr-text.el" (21862 60209 618658
+;;;;;;  448000))
 ;;; Generated autoloads from descr-text.el
 
 (autoload 'describe-text-properties "descr-text" "\
@@ -6008,8 +6008,7 @@ This function is meant to be used as a value of
 
 ;;;***
 
-;;;### (autoloads nil "desktop" "desktop.el" (21799 41766 961230
-;;;;;;  875000))
+;;;### (autoloads nil "desktop" "desktop.el" (21860 18496 17962 857000))
 ;;; Generated autoloads from desktop.el
 
 (defvar desktop-save-mode nil "\
@@ -6100,7 +6099,9 @@ code like
    (add-to-list 'desktop-buffer-mode-handlers
                 '(foo-mode . foo-restore-desktop-buffer))
 
-Furthermore the major mode function must be autoloaded.")
+The major mode function must either be autoloaded, or of the form
+\"foobar-mode\" and defined in library \"foobar\", so that desktop
+can guess how to load the mode's definition.")
 
 (put 'desktop-buffer-mode-handlers 'risky-local-variable t)
 
@@ -6142,7 +6143,9 @@ code like
    (add-to-list 'desktop-minor-mode-handlers
                 '(foo-mode . foo-desktop-restore))
 
-Furthermore the minor mode function must be autoloaded.
+The minor mode function must either be autoloaded, or of the form
+\"foobar-mode\" and defined in library \"foobar\", so that desktop
+can guess how to load the mode's definition.
 
 See also `desktop-minor-mode-table'.")
 
@@ -6214,8 +6217,8 @@ Revert to the last loaded desktop.
 
 ;;;***
 
-;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21795 44704
-;;;;;;  920702 722000))
+;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21855 576 877944
+;;;;;;  285000))
 ;;; Generated autoloads from gnus/deuglify.el
 
 (autoload 'gnus-article-outlook-unwrap-lines "deuglify" "\
@@ -6247,8 +6250,8 @@ Deuglify broken Outlook (Express) articles and redisplay.
 
 ;;;***
 
-;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21670
-;;;;;;  32330 885624 725000))
+;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21855
+;;;;;;  576 517945 858000))
 ;;; Generated autoloads from calendar/diary-lib.el
 
 (autoload 'diary "diary-lib" "\
@@ -6382,7 +6385,7 @@ Optional arguments are passed to `dig-invoke'.
 
 ;;;***
 
-;;;### (autoloads nil "dired" "dired.el" (21757 29489 158925 687000))
+;;;### (autoloads nil "dired" "dired.el" (21855 576 727950 398000))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6502,8 +6505,8 @@ Keybindings:
 
 ;;;***
 
-;;;### (autoloads nil "dirtrack" "dirtrack.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "dirtrack" "dirtrack.el" (21855 576 727950
+;;;;;;  398000))
 ;;; Generated autoloads from dirtrack.el
 
 (autoload 'dirtrack-mode "dirtrack" "\
@@ -6805,8 +6808,8 @@ strings when pressed twice.  See `double-map' for details.
 
 ;;;***
 
-;;;### (autoloads nil "dunnet" "play/dunnet.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "dunnet" "play/dunnet.el" (21841 54062 172628
+;;;;;;  227000))
 ;;; Generated autoloads from play/dunnet.el
 (push (purecopy '(dunnet 2 1)) package--builtin-versions)
 
@@ -7572,7 +7575,7 @@ With prefix arg NOCONFIRM, execute current line as-is 
without editing.
 
 ;;;***
 
-;;;### (autoloads nil "ede" "cedet/ede.el" (21715 20800 626041 761000))
+;;;### (autoloads nil "ede" "cedet/ede.el" (21834 29303 521933 754000))
 ;;; Generated autoloads from cedet/ede.el
 (push (purecopy '(ede 1 2)) package--builtin-versions)
 
@@ -7598,8 +7601,8 @@ an EDE controlled project.
 
 ;;;***
 
-;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21803 38822
-;;;;;;  934065 207000))
+;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21857 42300
+;;;;;;  387957 585000))
 ;;; Generated autoloads from emacs-lisp/edebug.el
 
 (defvar edebug-all-defs nil "\
@@ -7935,8 +7938,8 @@ With optional NODE, goes to that node.
 
 ;;;***
 
-;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21861 5946
+;;;;;;  771514 868000))
 ;;; Generated autoloads from vc/ediff-help.el
 
 (autoload 'ediff-customize "ediff-help" "\
@@ -7959,8 +7962,8 @@ Display Ediff's registry.
 
 ;;;***
 
-;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21852 24382
+;;;;;;  97237 703000))
 ;;; Generated autoloads from vc/ediff-util.el
 
 (autoload 'ediff-toggle-multiframe "ediff-util" "\
@@ -8083,15 +8086,15 @@ BUFFER is put back into its original major mode.
 
 ;;;***
 
-;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21803 38822
-;;;;;;  944058 719000))
+;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21862 60482
+;;;;;;  430808 412000))
 ;;; Generated autoloads from emacs-lisp/eieio.el
 (push (purecopy '(eieio 1 4)) package--builtin-versions)
 
 ;;;***
 
-;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21822
-;;;;;;  42786 590507 895000))
+;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21827
+;;;;;;  47608 610495 897000))
 ;;; Generated autoloads from emacs-lisp/eieio-core.el
 (push (purecopy '(eieio-core 1 4)) package--builtin-versions)
 
@@ -8165,8 +8168,8 @@ This is suitable as an entry on `find-file-hook' or 
appropriate mode hooks.
 
 ;;;***
 
-;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21814 9129 240503
-;;;;;;  291000))
+;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21853 45243
+;;;;;;  381515 341000))
 ;;; Generated autoloads from emacs-lisp/elint.el
 
 (autoload 'elint-file "elint" "\
@@ -8720,7 +8723,7 @@ Look at CONFIG and try to expand GROUP.
 
 ;;;***
 
-;;;### (autoloads nil "erc" "erc/erc.el" (21779 56495 106033 935000))
+;;;### (autoloads nil "erc" "erc/erc.el" (21862 60209 688658 322000))
 ;;; Generated autoloads from erc/erc.el
 (push (purecopy '(erc 5 3)) package--builtin-versions)
 
@@ -8834,8 +8837,8 @@ that subcommand.
 
 ;;;***
 
-;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21670
-;;;;;;  32330 885624 725000))
+;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21855
+;;;;;;  576 787951 155000))
 ;;; Generated autoloads from erc/erc-ezbounce.el
 
 (autoload 'erc-cmd-ezb "erc-ezbounce" "\
@@ -8846,7 +8849,7 @@ Send EZB commands to the EZBouncer verbatim.
 (autoload 'erc-ezb-get-login "erc-ezbounce" "\
 Return an appropriate EZBounce login for SERVER and PORT.
 Look up entries in `erc-ezb-login-alist'. If the username or password
-in the alist is `nil', prompt for the appropriate values.
+in the alist is nil, prompt for the appropriate values.
 
 \(fn SERVER PORT)" nil nil)
 
@@ -9097,8 +9100,8 @@ with args, toggle notify status of people.
 
 ;;;***
 
-;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21808
-;;;;;;  56742 451927 765000))
+;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21855
+;;;;;;  576 787951 155000))
 ;;; Generated autoloads from erc/erc-pcomplete.el
  (autoload 'erc-completion-mode "erc-pcomplete" nil t)
 
@@ -9162,8 +9165,8 @@ This will add a speedbar major display mode.
 
 ;;;***
 
-;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21804 59688
-;;;;;;  164807 902000))
+;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21860 18496
+;;;;;;  27951 644000))
 ;;; Generated autoloads from erc/erc-stamp.el
  (autoload 'erc-timestamp-mode "erc-stamp" nil t)
 
@@ -9227,8 +9230,8 @@ Add a file to `erc-xdcc-files'.
 
 ;;;***
 
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21826 54340 400495
-;;;;;;  677000))
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21843 54898 597238
+;;;;;;  876000))
 ;;; Generated autoloads from emacs-lisp/ert.el
 
 (autoload 'ert-deftest "ert" "\
@@ -9310,8 +9313,8 @@ Kill all test buffers that are still live.
 
 ;;;***
 
-;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21812 53800
-;;;;;;  114093 251000))
+;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21861 39358
+;;;;;;  497944 643000))
 ;;; Generated autoloads from eshell/esh-mode.el
 
 (autoload 'eshell-mode "esh-mode" "\
@@ -9357,8 +9360,8 @@ corresponding to a successful execution.
 
 ;;;***
 
-;;;### (autoloads nil "etags" "progmodes/etags.el" (21826 300 610486
-;;;;;;  122000))
+;;;### (autoloads nil "etags" "progmodes/etags.el" (21866 57262 677944
+;;;;;;  752000))
 ;;; Generated autoloads from progmodes/etags.el
 
 (defvar tags-file-name nil "\
@@ -9505,6 +9508,8 @@ See documentation of variable `tags-file-name'.
 
 \(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil)
 
+(make-obsolete 'find-tag 'xref-find-definitions '"25.1")
+
 (autoload 'find-tag-other-window "etags" "\
 Find tag (in current tags table) whose name contains TAGNAME.
 Select the buffer containing the tag's definition in another window, and
@@ -9673,8 +9678,8 @@ for \\[find-tag] (which see).
 
 ;;;***
 
-;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21824
-;;;;;;  5851 711914 99000))
+;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21862
+;;;;;;  60209 768658 443000))
 ;;; Generated autoloads from language/ethio-util.el
 
 (autoload 'setup-ethiopic-environment-internal "ethio-util" "\
@@ -10125,8 +10130,8 @@ This is used only in conjunction with 
`expand-add-abbrevs'.
 
 ;;;***
 
-;;;### (autoloads nil "f90" "progmodes/f90.el" (21740 23998 526747
-;;;;;;  884000))
+;;;### (autoloads nil "f90" "progmodes/f90.el" (21862 60209 828658
+;;;;;;  75000))
 ;;; Generated autoloads from progmodes/f90.el
 
 (autoload 'f90-mode "f90" "\
@@ -10137,7 +10142,7 @@ For fixed format code, use `fortran-mode'.
 \\[f90-indent-new-line] indents current line and creates a new indented line.
 \\[f90-indent-subprogram] indents the current subprogram.
 
-Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 
keywords.
+Type \\=`? or \\=`\\[help-command] to display a list of built-in abbrevs for 
F90 keywords.
 
 Key definitions:
 \\{f90-mode-map}
@@ -10193,8 +10198,8 @@ with no args, if that value is non-nil.
 
 ;;;***
 
-;;;### (autoloads nil "face-remap" "face-remap.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "face-remap" "face-remap.el" (21855 576 807944
+;;;;;;  863000))
 ;;; Generated autoloads from face-remap.el
 
 (autoload 'face-remap-add-relative "face-remap" "\
@@ -10239,7 +10244,7 @@ of face attribute/value pairs, like in a `face' text 
property.
 
 If SPECS is empty, call `face-remap-reset-base' to use the normal
 definition of FACE as the base remapping; note that this is
-different from SPECS containing a single value `nil', which means
+different from SPECS containing a single value nil, which means
 not to inherit from the global definition of FACE at all.
 
 \(fn FACE &rest SPECS)" nil nil)
@@ -10408,7 +10413,7 @@ you can set `feedmail-queue-reminder-alist' to nil.
 
 ;;;***
 
-;;;### (autoloads nil "ffap" "ffap.el" (21797 36 690506 232000))
+;;;### (autoloads nil "ffap" "ffap.el" (21837 20508 21231 579000))
 ;;; Generated autoloads from ffap.el
 
 (autoload 'ffap-next "ffap" "\
@@ -10956,7 +10961,7 @@ Change the filter on a `find-lisp-find-dired' buffer to 
REGEXP.
 
 ;;;***
 
-;;;### (autoloads nil "finder" "finder.el" (21670 32330 885624 725000))
+;;;### (autoloads nil "finder" "finder.el" (21862 60209 708661 34000))
 ;;; Generated autoloads from finder.el
 (push (purecopy '(finder 1 0)) package--builtin-versions)
 
@@ -11213,7 +11218,7 @@ play around with the following keys:
 
 ;;;***
 
-;;;### (autoloads nil "forms" "forms.el" (21804 59688 164807 902000))
+;;;### (autoloads nil "forms" "forms.el" (21852 24381 567240 49000))
 ;;; Generated autoloads from forms.el
 
 (autoload 'forms-mode "forms" "\
@@ -11570,8 +11575,8 @@ Interactively, reads the register using 
`register-read-with-preview'.
 
 ;;;***
 
-;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21724 35774
-;;;;;;  954622 790000))
+;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21852 24381
+;;;;;;  917233 10000))
 ;;; Generated autoloads from progmodes/gdb-mi.el
 
 (defvar gdb-enable-debug nil "\
@@ -11940,8 +11945,8 @@ CLEAN is obsolete and ignored.
 
 ;;;***
 
-;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21804 59688
-;;;;;;  184805 112000))
+;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21864 15535
+;;;;;;  27945 734000))
 ;;; Generated autoloads from gnus/gnus-art.el
 
 (autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -12175,8 +12180,8 @@ If gravatars are already displayed, remove them.
 
 ;;;***
 
-;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21804 59688
-;;;;;;  184805 112000))
+;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21852 24381
+;;;;;;  597233 80000))
 ;;; Generated autoloads from gnus/gnus-group.el
 
 (autoload 'gnus-fetch-group "gnus-group" "\
@@ -12550,8 +12555,8 @@ Declare back end NAME with ABILITIES as a Gnus back end.
 
 ;;;***
 
-;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21804 59688
-;;;;;;  194794 158000))
+;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21855 576 897951
+;;;;;;  62000))
 ;;; Generated autoloads from gnus/gnus-sum.el
 
 (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12562,8 +12567,8 @@ BOOKMARK is a bookmark name or a bookmark record.
 
 ;;;***
 
-;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21670 32330
-;;;;;;  885624 725000))
+;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21832 3452
+;;;;;;  581913 198000))
 ;;; Generated autoloads from gnus/gnus-sync.el
 
 (autoload 'gnus-sync-initialize "gnus-sync" "\
@@ -13069,8 +13074,8 @@ binding mode.
 
 ;;;***
 
-;;;### (autoloads nil "handwrite" "play/handwrite.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "handwrite" "play/handwrite.el" (21852 24381
+;;;;;;  887244 288000))
 ;;; Generated autoloads from play/handwrite.el
 
 (autoload 'handwrite "handwrite" "\
@@ -13286,8 +13291,8 @@ different regions.  With numeric argument ARG, behaves 
like
 
 ;;;***
 
-;;;### (autoloads nil "help-fns" "help-fns.el" (21818 36533 711220
-;;;;;;  766000))
+;;;### (autoloads nil "help-fns" "help-fns.el" (21862 60209 718658
+;;;;;;  824000))
 ;;; Generated autoloads from help-fns.el
 
 (autoload 'describe-function "help-fns" "\
@@ -13388,8 +13393,8 @@ gives the window that lists the options.")
 
 ;;;***
 
-;;;### (autoloads nil "help-mode" "help-mode.el" (21733 50750 334730
-;;;;;;  5000))
+;;;### (autoloads nil "help-mode" "help-mode.el" (21862 60209 718658
+;;;;;;  824000))
 ;;; Generated autoloads from help-mode.el
 
 (autoload 'help-mode "help-mode" "\
@@ -14016,8 +14021,8 @@ See `highlight-changes-mode' for more information on 
Highlight-Changes mode.
 
 ;;;***
 
-;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21850 34968 457268
+;;;;;;  630000))
 ;;; Generated autoloads from hippie-exp.el
 (push (purecopy '(hippie-exp 1 6)) package--builtin-versions)
 
@@ -14358,7 +14363,7 @@ bound to the current value of the filter.
 
 ;;;***
 
-;;;### (autoloads nil "ibuffer" "ibuffer.el" (21799 41767 11212 472000))
+;;;### (autoloads nil "ibuffer" "ibuffer.el" (21855 577 47945 133000))
 ;;; Generated autoloads from ibuffer.el
 
 (autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14451,8 +14456,8 @@ buffer `*icalendar-errors*'.
 
 ;;;***
 
-;;;### (autoloads nil "icomplete" "icomplete.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "icomplete" "icomplete.el" (21852 24381 607274
+;;;;;;  219000))
 ;;; Generated autoloads from icomplete.el
 
 (defvar icomplete-mode nil "\
@@ -14532,8 +14537,8 @@ with no args, if that value is non-nil.
 
 ;;;***
 
-;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21826
-;;;;;;  49523 450500 879000))
+;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21855
+;;;;;;  577 397944 786000))
 ;;; Generated autoloads from progmodes/idlw-shell.el
 
 (autoload 'idlwave-shell "idlw-shell" "\
@@ -14558,8 +14563,8 @@ See also the variable `idlwave-shell-prompt-pattern'.
 
 ;;;***
 
-;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21862 60209
+;;;;;;  838658 475000))
 ;;; Generated autoloads from progmodes/idlwave.el
 (push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
 
@@ -14631,7 +14636,7 @@ The main features of this mode are
 5. Code Templates and Abbreviations
    --------------------------------
    Many Abbreviations are predefined to expand to code fragments and templates.
-   The abbreviations start generally with a `\\`.  Some examples:
+   The abbreviations start generally with a `\\'.  Some examples:
 
    \\pr        PROCEDURE template
    \\fu        FUNCTION template
@@ -14688,7 +14693,7 @@ The main features of this mode are
 
 ;;;***
 
-;;;### (autoloads nil "ido" "ido.el" (21767 65327 504606 256000))
+;;;### (autoloads nil "ido" "ido.el" (21862 60209 728658 929000))
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
@@ -14950,7 +14955,7 @@ DEF, if non-nil, is the default value.
 
 ;;;***
 
-;;;### (autoloads nil "ielm" "ielm.el" (21695 35516 595262 313000))
+;;;### (autoloads nil "ielm" "ielm.el" (21855 577 47945 133000))
 ;;; Generated autoloads from ielm.el
 
 (autoload 'ielm "ielm" "\
@@ -15608,7 +15613,7 @@ of `inferior-lisp-program').  Runs the hooks from
 
 ;;;***
 
-;;;### (autoloads nil "info" "info.el" (21822 3243 710497 966000))
+;;;### (autoloads nil "info" "info.el" (21862 60209 738095 873000))
 ;;; Generated autoloads from info.el
 
 (defcustom Info-default-directory-list (let* ((config-dir 
(file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name 
"../info" data-directory))) (if (file-directory-p dir) dir))) 
configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" 
"/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" 
"gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply 
#'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx 
[...]
@@ -15820,8 +15825,8 @@ completion alternatives to currently visited manuals.
 
 ;;;***
 
-;;;### (autoloads nil "info-look" "info-look.el" (21814 9129 270507
-;;;;;;  521000))
+;;;### (autoloads nil "info-look" "info-look.el" (21862 60209 738095
+;;;;;;  873000))
 ;;; Generated autoloads from info-look.el
 
 (autoload 'info-lookup-reset "info-look" "\
@@ -16154,15 +16159,15 @@ Add submenus to the File menu, to convert to and from 
various formats.
 ;;;***
 
 ;;;### (autoloads nil "iso-transl" "international/iso-transl.el"
-;;;;;;  (21670 32331 385639 720000))
+;;;;;;  (21840 19142 552627 956000))
 ;;; Generated autoloads from international/iso-transl.el
  (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map)
  (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 
'keymap)
 
 ;;;***
 
-;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21824 5851
-;;;;;;  721914 174000))
+;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21855 577 527945
+;;;;;;  248000))
 ;;; Generated autoloads from textmodes/ispell.el
 
 (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t 
exclusive))))
@@ -16497,8 +16502,8 @@ by `jka-compr-installed'.
 
 ;;;***
 
-;;;### (autoloads nil "js" "progmodes/js.el" (21790 26797 438891
-;;;;;;  674000))
+;;;### (autoloads nil "js" "progmodes/js.el" (21833 59993 694773
+;;;;;;  201000))
 ;;; Generated autoloads from progmodes/js.el
 (push (purecopy '(js 9)) package--builtin-versions)
 
@@ -16954,7 +16959,7 @@ generations (this defaults to 1).
 
 ;;;***
 
-;;;### (autoloads nil "linum" "linum.el" (21670 32331 385639 720000))
+;;;### (autoloads nil "linum" "linum.el" (21855 577 57945 485000))
 ;;; Generated autoloads from linum.el
 (push (purecopy '(linum 0 9 24)) package--builtin-versions)
 
@@ -17075,8 +17080,8 @@ except that FILTER is not optional.
 
 ;;;***
 
-;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21800 62630 983381
-;;;;;;  721000))
+;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21852 24382 97237
+;;;;;;  703000))
 ;;; Generated autoloads from vc/log-edit.el
 
 (autoload 'log-edit "log-edit" "\
@@ -17107,8 +17112,8 @@ done.  Otherwise, it uses the current buffer.
 
 ;;;***
 
-;;;### (autoloads nil "log-view" "vc/log-view.el" (21814 9129 450497
-;;;;;;  666000))
+;;;### (autoloads nil "log-view" "vc/log-view.el" (21850 34915 117255
+;;;;;;  375000))
 ;;; Generated autoloads from vc/log-view.el
 
 (autoload 'log-view-mode "log-view" "\
@@ -17213,8 +17218,7 @@ for further customization of the printer command.
 
 ;;;***
 
-;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21855 577 57945 485000))
 ;;; Generated autoloads from ls-lisp.el
 
 (defvar ls-lisp-support-shell-wildcards t "\
@@ -17474,8 +17478,8 @@ matches may be returned from the message body.
 
 ;;;***
 
-;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21850 35149
+;;;;;;  497265 880000))
 ;;; Generated autoloads from mail/mailabbrev.el
 
 (defvar mail-abbrevs-mode nil "\
@@ -17524,13 +17528,13 @@ double-quotes.
 
 ;;;***
 
-;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21855 577
+;;;;;;  57945 485000))
 ;;; Generated autoloads from mail/mailalias.el
 
 (defvar mail-complete-style 'angles "\
 Specifies how \\[mail-complete] formats the full name when it completes.
-If `nil', they contain just the return address like:
+If nil, they contain just the return address like:
        address@hidden
 If `parens', they look like:
        address@hidden (Elvis Parsley)
@@ -17834,8 +17838,8 @@ recursion depth in the minibuffer prompt.  This is only 
useful if
 
 ;;;***
 
-;;;### (autoloads nil "message" "gnus/message.el" (21822 37322 690488
-;;;;;;  175000))
+;;;### (autoloads nil "message" "gnus/message.el" (21855 576 917950
+;;;;;;  620000))
 ;;; Generated autoloads from gnus/message.el
 
 (define-mail-user-agent 'message-user-agent 'message-mail 
'message-send-and-exit 'message-kill-buffer 'message-send-hook)
@@ -18613,8 +18617,8 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 
-;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21670 32330
-;;;;;;  885624 725000))
+;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21862 60209
+;;;;;;  618658 448000))
 ;;; Generated autoloads from cedet/mode-local.el
 
 (put 'define-overloadable-function 'doc-string-elt 3)
@@ -18774,8 +18778,8 @@ different buffer menu using the function `msb'.
 
 ;;;***
 
-;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21862
+;;;;;;  60209 748658 481000))
 ;;; Generated autoloads from international/mule-diag.el
 
 (autoload 'list-character-sets "mule-diag" "\
@@ -19147,8 +19151,8 @@ listed in the PORTS list.
 
 ;;;***
 
-;;;### (autoloads nil "network-stream" "net/network-stream.el" (21716
-;;;;;;  41663 456033 27000))
+;;;### (autoloads nil "network-stream" "net/network-stream.el" (21855
+;;;;;;  577 147947 107000))
 ;;; Generated autoloads from net/network-stream.el
 
 (autoload 'open-network-stream "network-stream" "\
@@ -19221,7 +19225,7 @@ values:
 
 :client-certificate should either be a list where the first
   element is the certificate key file name, and the second
-  element is the certificate file name itself, or `t', which
+  element is the certificate file name itself, or t, which
   means that `auth-source' will be queried for the key and the
   certificate.  This parameter will only be used when doing TLS
   or STARTTLS connections.
@@ -19331,8 +19335,7 @@ Generate NOV databases in all nndiary directories.
 
 ;;;***
 
-;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21855 576 927958 586000))
 ;;; Generated autoloads from gnus/nndoc.el
 
 (autoload 'nndoc-add-type "nndoc" "\
@@ -19582,7 +19585,7 @@ Coloring:
 
 ;;;***
 
-;;;### (autoloads nil "org" "org/org.el" (21814 9129 360494 26000))
+;;;### (autoloads nil "org" "org/org.el" (21866 57262 677944 752000))
 ;;; Generated autoloads from org/org.el
 
 (autoload 'org-babel-do-load-languages "org" "\
@@ -19803,8 +19806,8 @@ Call the customize function with org as argument.
 
 ;;;***
 
-;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21862 60209
+;;;;;;  818658 502000))
 ;;; Generated autoloads from org/org-agenda.el
 
 (autoload 'org-toggle-sticky-agenda "org-agenda" "\
@@ -20077,8 +20080,8 @@ to override `appt-message-warning-time'.
 
 ;;;***
 
-;;;### (autoloads nil "org-capture" "org/org-capture.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "org-capture" "org/org-capture.el" (21855 577
+;;;;;;  287944 835000))
 ;;; Generated autoloads from org/org-capture.el
 
 (autoload 'org-capture-string "org-capture" "\
@@ -20184,8 +20187,8 @@ Turn on or update column view in the agenda.
 
 ;;;***
 
-;;;### (autoloads nil "org-compat" "org/org-compat.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "org-compat" "org/org-compat.el" (21852 24381
+;;;;;;  787238 943000))
 ;;; Generated autoloads from org/org-compat.el
 
 (autoload 'org-check-version "org-compat" "\
@@ -20195,8 +20198,8 @@ Try very hard to provide sensible version strings.
 
 ;;;***
 
-;;;### (autoloads nil "org-macs" "org/org-macs.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "org-macs" "org/org-macs.el" (21855 577 287944
+;;;;;;  835000))
 ;;; Generated autoloads from org/org-macs.el
 
 (autoload 'org-load-noerror-mustsuffix "org-macs" "\
@@ -20268,8 +20271,8 @@ See the command `outline-mode' for more information on 
this mode.
 
 ;;;***
 
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (21826 49900
-;;;;;;  450489 321000))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (21865 36399
+;;;;;;  18126 278000))
 ;;; Generated autoloads from emacs-lisp/package.el
 (push (purecopy '(package 1 0 1)) package--builtin-versions)
 
@@ -20315,14 +20318,11 @@ in an archive in `package-archives'.  Interactively, 
prompt for its name.
 
 If called interactively or if DONT-SELECT nil, add PKG to
 `package-selected-packages'.
-If ASYNC is non-nil, perform the downloads asynchronously.
-If CALLBACK is non-nil, call it with no arguments once the
-entire operation is done.
 
 If PKG is a package-desc and it is already installed, don't try
 to install it but still mark it as selected.
 
-\(fn PKG &optional DONT-SELECT ASYNC CALLBACK)" t nil)
+\(fn PKG &optional DONT-SELECT)" t nil)
 
 (autoload 'package-install-from-buffer "package" "\
 Install a package from the current buffer.
@@ -20495,25 +20495,25 @@ Check if KEY is in the cache.
 
 ;;;***
 
-;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21804 59688
-;;;;;;  164807 902000))
+;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21862 60209
+;;;;;;  658658 512000))
 ;;; Generated autoloads from emacs-lisp/pcase.el
 
 (autoload 'pcase "pcase" "\
 Perform ML-style pattern matching on EXP.
-CASES is a list of elements of the form (UPATTERN CODE...).
+CASES is a list of elements of the form (PATTERN CODE...).
 
-UPatterns can take the following forms:
+Patterns can take the following forms:
   _            matches anything.
   SELFQUOTING  matches itself.  This includes keywords, numbers, and strings.
   SYMBOL       matches anything and binds it to SYMBOL.
-  (or UPAT...) matches if any of the patterns matches.
-  (and UPAT...)        matches if all the patterns match.
+  (or PAT...)  matches if any of the patterns matches.
+  (and PAT...) matches if all the patterns match.
   'VAL         matches if the object is `equal' to VAL
   (pred FUN)   matches if FUN applied to the object returns non-nil.
   (guard BOOLEXP)      matches if BOOLEXP evaluates to non-nil.
-  (let UPAT EXP)       matches if EXP matches UPAT.
-  (app FUN UPAT)       matches if FUN applied to the object matches UPAT.
+  (let PAT EXP)        matches if EXP matches PAT.
+  (app FUN PAT)        matches if FUN applied to the object matches PAT.
 If a SYMBOL is used twice in the same pattern (i.e. the pattern is
 \"non-linear\"), then the second occurrence is turned into an `eq'uality test.
 
@@ -20526,8 +20526,8 @@ FUN can refer to variables bound earlier in the pattern.
 FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
 and two identical calls can be merged into one.
 E.g. you can match pairs where the cdr is larger than the car with a pattern
-like `(,a . ,(pred (< a))) or, with more checks:
-`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
+like \\=`(,a . ,(pred (< a))) or, with more checks:
+\\=`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
 
 Additional patterns can be defined via `pcase-defmacro'.
 Currently, the following patterns are provided this way:
@@ -20544,7 +20544,7 @@ The exhaustive version of `pcase' (which see).
 (function-put 'pcase-exhaustive 'lisp-indent-function '1)
 
 (autoload 'pcase-lambda "pcase" "\
-Like `lambda' but allow each argument to be a UPattern.
+Like `lambda' but allow each argument to be a pattern.
 I.e. accepts the usual &optional and &rest keywords, but every
 formal argument can be any pattern accepted by `pcase' (a mere
 variable name being but a special case of it).
@@ -20558,7 +20558,7 @@ variable name being but a special case of it).
 (autoload 'pcase-let* "pcase" "\
 Like `let*' but where you can use `pcase' patterns for bindings.
 BODY should be an expression, and BINDINGS should be a list of bindings
-of the form (UPAT EXP).
+of the form (PAT EXP).
 
 \(fn BINDINGS &rest BODY)" nil t)
 
@@ -20567,7 +20567,10 @@ of the form (UPAT EXP).
 (autoload 'pcase-let "pcase" "\
 Like `let' but where you can use `pcase' patterns for bindings.
 BODY should be a list of expressions, and BINDINGS should be a list of bindings
-of the form (UPAT EXP).
+of the form (PAT EXP).
+The macro is expanded and optimized under the assumption that those
+patterns *will* match, so a mismatch may go undetected or may cause
+any kind of error.
 
 \(fn BINDINGS &rest BODY)" nil t)
 
@@ -20581,7 +20584,9 @@ of the form (UPAT EXP).
 (function-put 'pcase-dolist 'lisp-indent-function '1)
 
 (autoload 'pcase-defmacro "pcase" "\
-Define a pcase UPattern macro.
+Define a new kind of pcase PATTERN, by macro expansion.
+Patterns of the form (NAME ...) will be expanded according
+to this macro.
 
 \(fn NAME ARGS &rest BODY)" nil t)
 
@@ -20591,8 +20596,8 @@ Define a pcase UPattern macro.
 
 ;;;***
 
-;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21857 42300 397266
+;;;;;;  599000))
 ;;; Generated autoloads from pcmpl-cvs.el
 
 (autoload 'pcomplete/cvs "pcmpl-cvs" "\
@@ -21862,8 +21867,8 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when 
the cursor is at the number
 
 ;;;***
 
-;;;### (autoloads nil "ps-print" "ps-print.el" (21670 32624 385626
-;;;;;;  484000))
+;;;### (autoloads nil "ps-print" "ps-print.el" (21855 577 457945
+;;;;;;  244000))
 ;;; Generated autoloads from ps-print.el
 (push (purecopy '(ps-print 7 3 5)) package--builtin-versions)
 
@@ -22060,15 +22065,27 @@ If EXTENSION is any other symbol, it is ignored.
 
 ;;;***
 
-;;;### (autoloads nil "pulse" "cedet/pulse.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "pulse" "cedet/pulse.el" (21834 32653 960520
+;;;;;;  248000))
 ;;; Generated autoloads from cedet/pulse.el
 (push (purecopy '(pulse 1 0)) package--builtin-versions)
 
+(autoload 'pulse-momentary-highlight-one-line "pulse" "\
+Highlight the line around POINT, unhighlighting before next command.
+Optional argument FACE specifies the face to do the highlighting.
+
+\(fn POINT &optional FACE)" nil nil)
+
+(autoload 'pulse-momentary-highlight-region "pulse" "\
+Highlight between START and END, unhighlighting before next command.
+Optional argument FACE specifies the face to do the highlighting.
+
+\(fn START END &optional FACE)" nil nil)
+
 ;;;***
 
-;;;### (autoloads nil "python" "progmodes/python.el" (21826 300 630487
-;;;;;;  331000))
+;;;### (autoloads nil "python" "progmodes/python.el" (21855 577 407510
+;;;;;;  166000))
 ;;; Generated autoloads from progmodes/python.el
 (push (purecopy '(python 0 24 5)) package--builtin-versions)
 
@@ -22124,8 +22141,8 @@ them into characters should be done separately.
 
 ;;;***
 
-;;;### (autoloads nil "quail" "international/quail.el" (21761 26543
-;;;;;;  734945 674000))
+;;;### (autoloads nil "quail" "international/quail.el" (21829 62890
+;;;;;;  321199 861000))
 ;;; Generated autoloads from international/quail.el
 
 (autoload 'quail-title "quail" "\
@@ -22455,7 +22472,7 @@ Display `quickurl-list' as a formatted list using 
`quickurl-list-mode'.
 
 ;;;***
 
-;;;### (autoloads nil "rcirc" "net/rcirc.el" (21826 300 570503 812000))
+;;;### (autoloads nil "rcirc" "net/rcirc.el" (21855 577 167944 784000))
 ;;; Generated autoloads from net/rcirc.el
 
 (autoload 'rcirc "rcirc" "\
@@ -22512,8 +22529,8 @@ matching parts of the target buffer will be highlighted.
 
 ;;;***
 
-;;;### (autoloads nil "recentf" "recentf.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "recentf" "recentf.el" (21852 24381 997231
+;;;;;;  450000))
 ;;; Generated autoloads from recentf.el
 
 (defvar recentf-mode nil "\
@@ -22700,8 +22717,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' 
instead.
 
 ;;;***
 
-;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21823 24169
-;;;;;;  100485 529000))
+;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21833 60086
+;;;;;;  84775 646000))
 ;;; Generated autoloads from textmodes/reftex.el
 (autoload 'reftex-citation "reftex-cite" nil t)
 (autoload 'reftex-all-document-files "reftex-parse")
@@ -22989,8 +23006,8 @@ Make a ring that can contain SIZE elements.
 
 ;;;***
 
-;;;### (autoloads nil "rlogin" "net/rlogin.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "rlogin" "net/rlogin.el" (21852 24381 727234
+;;;;;;  912000))
 ;;; Generated autoloads from net/rlogin.el
 
 (autoload 'rlogin "rlogin" "\
@@ -23034,8 +23051,8 @@ variable.
 
 ;;;***
 
-;;;### (autoloads nil "rmail" "mail/rmail.el" (21824 45139 490498
-;;;;;;  458000))
+;;;### (autoloads nil "rmail" "mail/rmail.el" (21862 60482 540812
+;;;;;;  493000))
 ;;; Generated autoloads from mail/rmail.el
 
 (defvar rmail-file-name (purecopy "~/RMAIL") "\
@@ -23451,8 +23468,8 @@ Toggle the use of ROT13 encoding for the current window.
 
 ;;;***
 
-;;;### (autoloads nil "rst" "textmodes/rst.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "rst" "textmodes/rst.el" (21852 24382 77263
+;;;;;;  112000))
 ;;; Generated autoloads from textmodes/rst.el
  (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
 
@@ -23482,8 +23499,8 @@ for modes derived from Text mode, like Mail mode.
 
 ;;;***
 
-;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21814
-;;;;;;  9129 410518 16000))
+;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21855
+;;;;;;  577 437945 800000))
 ;;; Generated autoloads from progmodes/ruby-mode.el
 (push (purecopy '(ruby-mode 1 2)) package--builtin-versions)
 
@@ -23990,8 +24007,8 @@ vertically fixed relative to window boundaries during 
scrolling.
 
 ;;;***
 
-;;;### (autoloads nil "secrets" "net/secrets.el" (21824 44973 380509
-;;;;;;  24000))
+;;;### (autoloads nil "secrets" "net/secrets.el" (21855 577 177946
+;;;;;;  739000))
 ;;; Generated autoloads from net/secrets.el
 (when (featurep 'dbusbind)
  (autoload 'secrets-show-secrets "secrets" nil t))
@@ -24078,14 +24095,14 @@ Major mode for editing Wisent grammars.
 
 ;;;***
 
-;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21786 29744
-;;;;;;  368212 633000))
+;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21861 39358
+;;;;;;  517945 150000))
 ;;; Generated autoloads from mail/sendmail.el
 
 (defvar mail-from-style 'default "\
 Specifies how \"From:\" fields look.
 
-If `nil', they contain just the return address like:
+If nil, they contain just the return address like:
        address@hidden
 If `parens', they look like:
        address@hidden (Elvis Parsley)
@@ -24360,14 +24377,14 @@ Like `mail' command, but display mail buffer in 
another frame.
 
 ;;;***
 
-;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21822 58098 20521
-;;;;;;  61000))
+;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21843 54898 597238
+;;;;;;  876000))
 ;;; Generated autoloads from emacs-lisp/seq.el
-(push (purecopy '(seq 1 5)) package--builtin-versions)
+(push (purecopy '(seq 1 7)) package--builtin-versions)
 
 ;;;***
 
-;;;### (autoloads nil "server" "server.el" (21818 36774 564783 146000))
+;;;### (autoloads nil "server" "server.el" (21857 42300 487735 894000))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -24434,7 +24451,7 @@ only these files will be asked to be saved.
 
 ;;;***
 
-;;;### (autoloads nil "ses" "ses.el" (21804 59688 264800 604000))
+;;;### (autoloads nil "ses" "ses.el" (21855 577 487945 652000))
 ;;; Generated autoloads from ses.el
 
 (autoload 'ses-mode "ses" "\
@@ -24478,8 +24495,8 @@ formula:
 
 ;;;***
 
-;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21804
-;;;;;;  59688 284811 0))
+;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21839
+;;;;;;  43859 371195 279000))
 ;;; Generated autoloads from textmodes/sgml-mode.el
 
 (autoload 'sgml-mode "sgml-mode" "\
@@ -24544,8 +24561,8 @@ To work around that, do:
 
 ;;;***
 
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21814
-;;;;;;  9129 410518 16000))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21862
+;;;;;;  60209 888659 15000))
 ;;; Generated autoloads from progmodes/sh-script.el
 (push (purecopy '(sh-script 2 0 6)) package--builtin-versions)
 (put 'sh-shell 'safe-local-variable 'symbolp)
@@ -24745,7 +24762,7 @@ Otherwise, one argument `-i' is passed to the shell.
 
 ;;;***
 
-;;;### (autoloads nil "shr" "net/shr.el" (21826 49834 1206 441000))
+;;;### (autoloads nil "shr" "net/shr.el" (21837 20530 521200 565000))
 ;;; Generated autoloads from net/shr.el
 
 (autoload 'shr-render-region "shr" "\
@@ -24853,8 +24870,8 @@ with no arguments, if that value is non-nil.
 
 ;;;***
 
-;;;### (autoloads nil "skeleton" "skeleton.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "skeleton" "skeleton.el" (21862 60209 898658
+;;;;;;  614000))
 ;;; Generated autoloads from skeleton.el
 
 (defvar skeleton-filter-function 'identity "\
@@ -24965,8 +24982,9 @@ Pairing is also prohibited if we are right after a 
quoting character
 such as backslash.
 
 If a match is found in `skeleton-pair-alist', that is inserted, else
-the defaults are used.  These are (), [], {}, <> and `' for the
-symmetrical ones, and the same character twice for the others.
+the defaults are used.  These are (), [], {}, <> and (grave
+accent, apostrophe) for the paired ones, and the same character
+twice for the others.
 
 \(fn ARG)" t nil)
 
@@ -25088,8 +25106,8 @@ then `snmpv2-mode-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "solar" "calendar/solar.el" (21735 6077 666769
-;;;;;;  364000))
+;;;### (autoloads nil "solar" "calendar/solar.el" (21849 48176 337264
+;;;;;;  443000))
 ;;; Generated autoloads from calendar/solar.el
 
 (autoload 'sunrise-sunset "solar" "\
@@ -25355,7 +25373,7 @@ is non-nil, it also prints a message describing the 
number of deletions.
 
 ;;;***
 
-;;;### (autoloads nil "spam" "gnus/spam.el" (21670 32331 385639 720000))
+;;;### (autoloads nil "spam" "gnus/spam.el" (21832 3464 481922 546000))
 ;;; Generated autoloads from gnus/spam.el
 
 (autoload 'spam-initialize "spam" "\
@@ -26192,8 +26210,8 @@ See `superword-mode' for more information on Superword 
mode.
 
 ;;;***
 
-;;;### (autoloads nil "supercite" "mail/supercite.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "supercite" "mail/supercite.el" (21852 24381
+;;;;;;  697240 10000))
 ;;; Generated autoloads from mail/supercite.el
 
 (autoload 'sc-cite-original "supercite" "\
@@ -26894,8 +26912,8 @@ See also: variables `tar-update-datestamp' and 
`tar-anal-blocksize'.
 
 ;;;***
 
-;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21842 42581 539414
+;;;;;;  570000))
 ;;; Generated autoloads from progmodes/tcl.el
 
 (autoload 'tcl-mode "tcl" "\
@@ -26943,8 +26961,8 @@ Prefix argument means invert sense of 
`tcl-use-smart-word-finder'.
 
 ;;;***
 
-;;;### (autoloads nil "telnet" "net/telnet.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "telnet" "net/telnet.el" (21852 24381 767239
+;;;;;;  782000))
 ;;; Generated autoloads from net/telnet.el
 
 (autoload 'telnet "telnet" "\
@@ -27011,8 +27029,8 @@ use in that buffer.
 
 ;;;***
 
-;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21670
-;;;;;;  32330 885624 725000))
+;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21834
+;;;;;;  29303 521933 754000))
 ;;; Generated autoloads from emacs-lisp/testcover.el
 
 (autoload 'testcover-this-defun "testcover" "\
@@ -27048,8 +27066,8 @@ tetris-mode keybindings:
 
 ;;;***
 
-;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21822 3243
-;;;;;;  760493 958000))
+;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21862 60209
+;;;;;;  908658 140000))
 ;;; Generated autoloads from textmodes/tex-mode.el
 
 (defvar tex-shell-file-name nil "\
@@ -27211,7 +27229,7 @@ says which mode to use.
 (autoload 'plain-tex-mode "tex-mode" "\
 Major mode for editing files of input for plain TeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run TeX on the current region, plus a \"header\"
@@ -27254,7 +27272,7 @@ special subshell is initiated, the hook 
`tex-shell-hook' is run.
 (autoload 'latex-mode "tex-mode" "\
 Major mode for editing files of input for LaTeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run LaTeX on the current region, plus the preamble
@@ -27297,7 +27315,7 @@ subshell is initiated, `tex-shell-hook' is run.
 (autoload 'slitex-mode "tex-mode" "\
 Major mode for editing files of input for SliTeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run SliTeX on the current region, plus the preamble
@@ -27350,8 +27368,8 @@ Major mode to edit DocTeX files.
 
 ;;;***
 
-;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21862 60209
+;;;;;;  928657 362000))
 ;;; Generated autoloads from textmodes/texinfmt.el
 
 (autoload 'texinfo-format-buffer "texinfmt" "\
@@ -27390,8 +27408,8 @@ if large.  You can use `Info-split' to do this manually.
 
 ;;;***
 
-;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21862 60209
+;;;;;;  928657 362000))
 ;;; Generated autoloads from textmodes/texinfo.el
 
 (defvar texinfo-open-quote (purecopy "``") "\
@@ -27676,8 +27694,8 @@ See also docstring of the function 
tibetan-compose-region.
 
 ;;;***
 
-;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21695 35516
-;;;;;;  595262 313000))
+;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21852 24382
+;;;;;;  87256 328000))
 ;;; Generated autoloads from textmodes/tildify.el
 (push (purecopy '(tildify 4 6 1)) package--builtin-versions)
 
@@ -28125,8 +28143,8 @@ Its value should be an event that has a binding in MENU.
 
 ;;;***
 
-;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21814
-;;;;;;  9129 220497 835000))
+;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21855
+;;;;;;  576 567563 758000))
 ;;; Generated autoloads from calendar/todo-mode.el
 
 (autoload 'todo-show "todo-mode" "\
@@ -28324,8 +28342,7 @@ the output buffer or changing the window configuration.
 
 ;;;***
 
-;;;### (autoloads nil "tramp" "net/tramp.el" (21766 44463 655319
-;;;;;;  936000))
+;;;### (autoloads nil "tramp" "net/tramp.el" (21865 36399 47685 802000))
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -28476,8 +28493,8 @@ resumed later.
 
 ;;;***
 
-;;;### (autoloads nil "tv-util" "language/tv-util.el" (21607 54478
-;;;;;;  300138 641000))
+;;;### (autoloads nil "tv-util" "language/tv-util.el" (21855 577
+;;;;;;  57945 485000))
 ;;; Generated autoloads from language/tv-util.el
 
 (autoload 'tai-viet-composition-function "tv-util" "\
@@ -28535,8 +28552,8 @@ First column's text    sSs  Second column's text
 
 ;;;***
 
-;;;### (autoloads nil "type-break" "type-break.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "type-break" "type-break.el" (21855 577 527945
+;;;;;;  248000))
 ;;; Generated autoloads from type-break.el
 
 (defvar type-break-mode nil "\
@@ -28992,8 +29009,8 @@ overriding the value of `url-gateway-method'.
 
 ;;;***
 
-;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21766
-;;;;;;  44463 655319 936000))
+;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21841
+;;;;;;  54062 172628 227000))
 ;;; Generated autoloads from url/url-handlers.el
 
 (defvar url-handler-mode nil "\
@@ -29047,8 +29064,8 @@ accessible.
 
 ;;;***
 
-;;;### (autoloads nil "url-http" "url/url-http.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "url-http" "url/url-http.el" (21837 20526 641128
+;;;;;;  711000))
 ;;; Generated autoloads from url/url-http.el
  (autoload 'url-default-expander "url-expand")
 
@@ -29521,8 +29538,8 @@ Encode UTF-7 STRING.  Use IMAP modification if FOR-IMAP 
is non-nil.
 
 ;;;***
 
-;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21855 577 67944
+;;;;;;  554000))
 ;;; Generated autoloads from mail/uudecode.el
 
 (autoload 'uudecode-decode-region-external "uudecode" "\
@@ -29546,7 +29563,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
 
 ;;;***
 
-;;;### (autoloads nil "vc" "vc/vc.el" (21748 18111 534605 274000))
+;;;### (autoloads nil "vc" "vc/vc.el" (21850 34915 137255 549000))
 ;;; Generated autoloads from vc/vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -29784,6 +29801,16 @@ tip revision are merged into the working file.
 
 (defalias 'vc-update 'vc-pull)
 
+(autoload 'vc-push "vc" "\
+Push the current branch.
+You must be visiting a version controlled file, or in a `vc-dir' buffer.
+On a distributed version control system, this runs a \"push\"
+operation on the current branch, prompting for the precise command
+if required.  Optional prefix ARG non-nil forces a prompt.
+On a non-distributed version control system, this signals an error.
+
+\(fn &optional ARG)" t nil)
+
 (autoload 'vc-switch-backend "vc" "\
 Make BACKEND the current version control system for FILE.
 FILE must already be registered in BACKEND.  The change is not
@@ -29843,8 +29870,8 @@ Return the branch part of a revision number REV.
 
 ;;;***
 
-;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21670 32331
-;;;;;;  885635 586000))
+;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21850 34915
+;;;;;;  127238 802000))
 ;;; Generated autoloads from vc/vc-annotate.el
 
 (autoload 'vc-annotate "vc-annotate" "\
@@ -29883,8 +29910,8 @@ should be applied to the background or to the 
foreground.
 
 ;;;***
 
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21826 49705 100508
-;;;;;;  896000))
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21852 24382 97237
+;;;;;;  703000))
 ;;; Generated autoloads from vc/vc-bzr.el
 
 (defconst vc-bzr-admin-dirname ".bzr" "\
@@ -29912,8 +29939,8 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21694 14651 747488
-;;;;;;  989000))
+;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21842 40083 319216
+;;;;;;  272000))
 ;;; Generated autoloads from vc/vc-dir.el
 
 (autoload 'vc-dir "vc-dir" "\
@@ -29937,8 +29964,8 @@ These are the commands available for use in the file 
status buffer:
 
 ;;;***
 
-;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21800
-;;;;;;  62631 12543 671000))
+;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21862
+;;;;;;  60209 928657 362000))
 ;;; Generated autoloads from vc/vc-dispatcher.el
 
 (autoload 'vc-do-command "vc-dispatcher" "\
@@ -29961,8 +29988,8 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21826 49709 140509
-;;;;;;  237000))
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21850 34915 127238
+;;;;;;  802000))
 ;;; Generated autoloads from vc/vc-git.el
  (defun vc-git-registered (file)
   "Return non-nil if FILE is registered with git."
@@ -29973,7 +30000,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21826 49710 734782 20000))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21842 40086 557968 381000))
 ;;; Generated autoloads from vc/vc-hg.el
  (defun vc-hg-registered (file)
   "Return non-nil if FILE is registered with hg."
@@ -30122,7 +30149,7 @@ Key bindings:
 ;;;***
 
 ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
-;;;;;;  (21735 54828 874639 640000))
+;;;;;;  (21862 60209 898658 614000))
 ;;; Generated autoloads from progmodes/verilog-mode.el
 
 (autoload 'verilog-mode "verilog-mode" "\
@@ -30157,7 +30184,7 @@ Variables controlling indentation/edit style:
    Set to 0 to get such code to lined up underneath the task or
    function keyword.
  `verilog-indent-level-directive'     (default 1)
-   Indentation of `ifdef/`endif blocks.
+   Indentation of \\=`ifdef/\\=`endif blocks.
  `verilog-cexp-indent'              (default 1)
    Indentation of Verilog statements broken across lines i.e.:
       if (a)
@@ -30261,8 +30288,8 @@ Key bindings specific to `verilog-mode-map' are:
 
 ;;;***
 
-;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21799
-;;;;;;  41767 71224 187000))
+;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21866
+;;;;;;  57262 717944 751000))
 ;;; Generated autoloads from progmodes/vhdl-mode.el
 
 (autoload 'vhdl-mode "vhdl-mode" "\
@@ -31292,8 +31319,8 @@ in certain major modes.
 
 ;;;***
 
-;;;### (autoloads nil "whitespace" "whitespace.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "whitespace" "whitespace.el" (21828 42028 670509
+;;;;;;  602000))
 ;;; Generated autoloads from whitespace.el
 (push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
 
@@ -31690,8 +31717,8 @@ if ARG is omitted or nil.
 
 ;;;***
 
-;;;### (autoloads nil "wid-edit" "wid-edit.el" (21816 50862 20497
-;;;;;;  333000))
+;;;### (autoloads nil "wid-edit" "wid-edit.el" (21862 60209 928657
+;;;;;;  362000))
 ;;; Generated autoloads from wid-edit.el
 
 (autoload 'widgetp "wid-edit" "\
@@ -31733,8 +31760,8 @@ Setup current buffer so editing string widgets works.
 
 ;;;***
 
-;;;### (autoloads nil "windmove" "windmove.el" (21733 50750 334730
-;;;;;;  5000))
+;;;### (autoloads nil "windmove" "windmove.el" (21852 24382 97237
+;;;;;;  703000))
 ;;; Generated autoloads from windmove.el
 
 (autoload 'windmove-left "windmove" "\
@@ -31809,7 +31836,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG 
is `toggle'.
 
 ;;;***
 
-;;;### (autoloads nil "woman" "woman.el" (21670 32331 885635 586000))
+;;;### (autoloads nil "woman" "woman.el" (21855 577 547944 710000))
 ;;; Generated autoloads from woman.el
 (push (purecopy '(woman 0 551)) package--builtin-versions)
 
@@ -31933,8 +31960,8 @@ If LIMIT is non-nil, then do not consider characters 
beyond LIMIT.
 
 ;;;***
 
-;;;### (autoloads nil "xref" "progmodes/xref.el" (21826 300 640488
-;;;;;;  815000))
+;;;### (autoloads nil "xref" "progmodes/xref.el" (21861 5946 771514
+;;;;;;  868000))
 ;;; Generated autoloads from progmodes/xref.el
 
 (autoload 'xref-pop-marker-stack "xref" "\
@@ -31970,6 +31997,11 @@ With prefix argument, prompt for the identifier.
 
 \(fn IDENTIFIER)" t nil)
 
+(autoload 'xref-find-regexp "xref" "\
+Find all matches for REGEXP.
+
+\(fn REGEXP)" t nil)
+
 (autoload 'xref-find-apropos "xref" "\
 Find all meaningful symbols that match PATTERN.
 The argument has the same meaning as in `apropos'.
@@ -31983,8 +32015,8 @@ The argument has the same meaning as in `apropos'.
 
 ;;;***
 
-;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21779 56495 106033
-;;;;;;  935000))
+;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21852 24382 117243
+;;;;;;  951000))
 ;;; Generated autoloads from xt-mouse.el
 
 (defvar xterm-mouse-mode nil "\
@@ -32111,49 +32143,48 @@ Zone out, completely.
 ;;;;;;  "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el"
 ;;;;;;  "dos-vars.el" "dos-w32.el" "dynamic-setting.el" 
"emacs-lisp/avl-tree.el"
 ;;;;;;  "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" 
"emacs-lisp/cl-extra.el"
-;;;;;;  "emacs-lisp/cl-generic.el" "emacs-lisp/cl-loaddefs.el" 
"emacs-lisp/cl-macs.el"
-;;;;;;  "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el"
-;;;;;;  "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el"
-;;;;;;  "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el"
-;;;;;;  "emacs-lisp/eieio-speedbar.el" "emacs-lisp/generator.el"
-;;;;;;  "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el"
-;;;;;;  "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" 
"emacs-lisp/tcover-unsafep.el"
-;;;;;;  "emulation/cua-gmrk.el" "emulation/edt-lk201.el" 
"emulation/edt-mapper.el"
-;;;;;;  "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/viper-cmd.el"
-;;;;;;  "emulation/viper-ex.el" "emulation/viper-init.el" 
"emulation/viper-keym.el"
-;;;;;;  "emulation/viper-macs.el" "emulation/viper-mous.el" 
"emulation/viper-util.el"
-;;;;;;  "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el"
-;;;;;;  "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el"
-;;;;;;  "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el"
-;;;;;;  "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el"
-;;;;;;  "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el"
-;;;;;;  "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el"
-;;;;;;  "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el"
-;;;;;;  "eshell/esh-arg.el" "eshell/esh-cmd.el" "eshell/esh-ext.el"
-;;;;;;  "eshell/esh-groups.el" "eshell/esh-io.el" "eshell/esh-module.el"
-;;;;;;  "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el"
-;;;;;;  "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el"
-;;;;;;  "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" 
"gnus/gnus-bcklg.el"
-;;;;;;  "gnus/gnus-cite.el" "gnus/gnus-cloud.el" "gnus/gnus-cus.el"
-;;;;;;  "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el"
-;;;;;;  "gnus/gnus-ems.el" "gnus/gnus-icalendar.el" "gnus/gnus-int.el"
-;;;;;;  "gnus/gnus-logic.el" "gnus/gnus-mh.el" "gnus/gnus-salt.el"
-;;;;;;  "gnus/gnus-score.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
-;;;;;;  "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
-;;;;;;  "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" 
"gnus/legacy-gnus-agent.el"
-;;;;;;  "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
-;;;;;;  "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
-;;;;;;  "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
-;;;;;;  "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" 
"gnus/nnagent.el"
-;;;;;;  "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
-;;;;;;  "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
-;;;;;;  "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmairix.el" 
"gnus/nnmbox.el"
-;;;;;;  "gnus/nnmh.el" "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el"
-;;;;;;  "gnus/nnrss.el" "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el"
-;;;;;;  "gnus/nnweb.el" "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el"
-;;;;;;  "gnus/rfc2047.el" "gnus/rfc2231.el" "gnus/rtree.el" 
"gnus/sieve-manage.el"
-;;;;;;  "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
-;;;;;;  "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" 
"international/eucjp-ms.el"
+;;;;;;  "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" 
"emacs-lisp/cl-seq.el"
+;;;;;;  "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" 
"emacs-lisp/eieio-compat.el"
+;;;;;;  "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el"
+;;;;;;  "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el"
+;;;;;;  "emacs-lisp/generator.el" "emacs-lisp/lisp-mnt.el" 
"emacs-lisp/package-x.el"
+;;;;;;  "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el"
+;;;;;;  "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" 
"emulation/edt-lk201.el"
+;;;;;;  "emulation/edt-mapper.el" "emulation/edt-pc.el" 
"emulation/edt-vt100.el"
+;;;;;;  "emulation/viper-cmd.el" "emulation/viper-ex.el" 
"emulation/viper-init.el"
+;;;;;;  "emulation/viper-keym.el" "emulation/viper-macs.el" 
"emulation/viper-mous.el"
+;;;;;;  "emulation/viper-util.el" "erc/erc-backend.el" "erc/erc-goodies.el"
+;;;;;;  "erc/erc-ibuffer.el" "erc/erc-lang.el" "eshell/em-alias.el"
+;;;;;;  "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el"
+;;;;;;  "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el"
+;;;;;;  "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
+;;;;;;  "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
+;;;;;;  "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
+;;;;;;  "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
+;;;;;;  "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el"
+;;;;;;  "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el"
+;;;;;;  "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "format-spec.el"
+;;;;;;  "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el"
+;;;;;;  "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cloud.el"
+;;;;;;  "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el"
+;;;;;;  "gnus/gnus-eform.el" "gnus/gnus-ems.el" "gnus/gnus-icalendar.el"
+;;;;;;  "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
+;;;;;;  "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-srvr.el"
+;;;;;;  "gnus/gnus-topic.el" "gnus/gnus-undo.el" "gnus/gnus-util.el"
+;;;;;;  "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" 
"gnus/ietf-drums.el"
+;;;;;;  "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" "gnus/mail-prsvr.el"
+;;;;;;  "gnus/mail-source.el" "gnus/mailcap.el" "gnus/messcompat.el"
+;;;;;;  "gnus/mm-archive.el" "gnus/mm-bodies.el" "gnus/mm-decode.el"
+;;;;;;  "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" 
"gnus/mml-smime.el"
+;;;;;;  "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el"
+;;;;;;  "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el"
+;;;;;;  "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" "gnus/nnmaildir.el"
+;;;;;;  "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
+;;;;;;  "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
+;;;;;;  "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
+;;;;;;  "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2231.el"
+;;;;;;  "gnus/rtree.el" "gnus/sieve-manage.el" "gnus/smime.el" 
"gnus/spam-stat.el"
+;;;;;;  "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el"
 ;;;;;;  "international/fontset.el" "international/iso-ascii.el" 
"international/ja-dic-cnv.el"
 ;;;;;;  "international/ja-dic-utl.el" "international/ogonek.el" "kermit.el"
 ;;;;;;  "language/hanja-util.el" "language/thai-word.el" "ldefs-boot.el"
@@ -32245,7 +32276,7 @@ Zone out, completely.
 ;;;;;;  "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" 
"vc/pcvs-parse.el"
 ;;;;;;  "vc/pcvs-util.el" "vc/vc-dav.el" "vc/vc-filewise.el" "vcursor.el"
 ;;;;;;  "vt-control.el" "vt100-led.el" "w32-fns.el" "w32-vars.el"
-;;;;;;  "x-dnd.el") (21827 21192 518044 532000))
+;;;;;;  "x-dnd.el") (21868 12847 464673 840000))
 
 ;;;***
 
diff --git a/lisp/leim/quail/cyrillic.el b/lisp/leim/quail/cyrillic.el
index 7caa5ec..ecee243 100644
--- a/lisp/leim/quail/cyrillic.el
+++ b/lisp/leim/quail/cyrillic.el
@@ -1245,7 +1245,7 @@ This phonetic layout replaces all the Latin letters with 
Bulgarian
 \(Cyrillic) letters based on similarities in their pronunciation or look.
 
 Note that, since the letters ‘щ’, ‘ь’, ‘ю’ and ‘я’ are attached to the
-‘]’, ‘\’, ‘`’ and ‘[’ keys respectively, Caps Lock does not affect them."
+‘]’, ‘\’, ‘\\=`’ and ‘[’ keys respectively, Caps Lock does not affect them."
 nil t t t t nil nil nil nil nil t)
 
 ;;  Ю  1! 2@ 3№ 4$ 5% 6€ 7§ 8* 9( 0) -– =+ ьѝ
@@ -1412,7 +1412,7 @@ The letters Ц, М, Ч, Р, Л, Б and Ы are not affected by 
Caps Lock.
 In addition to original Bulgarian typewriter layout, keys \\ and |
 are transformed into ' and Ы respectively.  Some keyboards mark these
 keys as being transformed into ( and ) respectively.  For ( and ), use
-` and ~ respectively.  This input method follows XKB."
+\\=` and ~ respectively.  This input method follows XKB."
  nil t t t t nil nil nil nil nil t)
 
 ;;  () 1! 2? 3+ 4" 5% 6= 7: 8/ 9_ 0№ -I .V
diff --git a/lisp/leim/quail/greek.el b/lisp/leim/quail/greek.el
index 5c5ead7..cf99150 100644
--- a/lisp/leim/quail/greek.el
+++ b/lisp/leim/quail/greek.el
@@ -179,7 +179,7 @@ mark                key
 ------------------------
 ypogegrammeni  J
 psili          '  or  v
-dasia          `  or  V
+dasia          \\=`  or  V
 oxia           /
 varia          ?
 perispomeni    \\  or  ^
diff --git a/lisp/leim/quail/hebrew.el b/lisp/leim/quail/hebrew.el
index 5d63e40..1601e1e 100644
--- a/lisp/leim/quail/hebrew.el
+++ b/lisp/leim/quail/hebrew.el
@@ -113,8 +113,8 @@ Only Hebrew-related characters are considered.
 
 Based on latest draft of SI-1452 keyboard layout.
 Only Hebrew-related characters are considered.
- ‘`’ is used to switch levels instead of Alt-Gr.
-Geresh is mapped to ‘`k’.
+ ‘\\=`’ is used to switch levels instead of Alt-Gr.
+Geresh is mapped to ‘\\=`k’.
 " nil t t t t nil nil nil nil nil t)
 
 (quail-define-rules
@@ -603,7 +603,7 @@ Not suitable for modern Hebrew input.
 
 Based on Society of Biblical Literature's SIL keyboard layout.
 Phonetic and not suitable for modern Hebrew input.
- ‘`’ is used to switch levels instead of Alt-Gr.
+ ‘\\=`’ is used to switch levels instead of Alt-Gr.
  Euro Sign (€) is mapped to ‘Z’.
 " nil t t t t nil nil nil nil nil t)
 
diff --git a/lisp/leim/quail/latin-alt.el b/lisp/leim/quail/latin-alt.el
index 4c886fa..0614ecb 100644
--- a/lisp/leim/quail/latin-alt.el
+++ b/lisp/leim/quail/latin-alt.el
@@ -49,7 +49,7 @@ special (so you can use that to enter a slash).
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
@@ -209,20 +209,20 @@ Doubling the postfix separates the letter and postfix: 
e.g. a'' -> a'
  "latin-2-alt-postfix" "Latin-2" "2<" t
  "Latin-2 character input method with postfix modifiers
 This input method differs from `latin-2-postfix' in that
-comma and period are not special (use ` instead).
+comma and period are not special (use \\=` instead).
 
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  ogonek     |    `    | a` -> ą
+  ogonek     |    \\=`    | a\\=` -> ą
   diaeresis  |    \"    | a\" -> ä
   circumflex |    ^    | a^ -> â
   breve      |    ~    | a~ -> ă
-  cedilla    |    `    | c` -> ç
+  cedilla    |    \\=`    | c\\=` -> ç
   caron      |    ~    | c~ -> č
   dbl. acute |    :    | o: -> ő
-  ring       |    `    | u` -> ů
-  dot        |    `    | z` -> ż
+  ring       |    \\=`    | u\\=` -> ů
+  dot        |    \\=`    | z\\=` -> ż
   stroke     |    /    | d/ -> đ
   others     |    /    | s/ -> ß
 
@@ -403,17 +403,17 @@ Doubling the postfix separates the letter and postfix: 
e.g. a'' -> a'
  "latin-3-alt-postfix" "Latin-3" "3<" t
  "Latin-3 character input method with postfix modifiers
 This input method differs from `latin-3-postfix' in that
-comma is not special (use ` instead), and period is not
+comma is not special (use \\=` instead), and period is not
 special (use slash instead).
 
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   dot        |    /    | c/ -> ċ   i/ -> ı   I/ -> İ
-  cedilla    |    `    | c` -> ç
+  cedilla    |    \\=`    | c\\=` -> ç
   breve      |    ~    | g~ -> ğ
   tilde      |    ~    | n~ -> ñ
   stroke     |    /    | h/ -> ħ
@@ -576,7 +576,7 @@ Doubling the postfix separates the letter and postfix: e.g. 
a'' -> a'
  "latin-4-alt-postfix" "Latin-4" "4<" t
  "Latin-4 characters input method with postfix modifiers
 This input method differs from `latin-4-postfix' in that
-comma is not special (use ` instead), and period is not
+comma is not special (use \\=` instead), and period is not
 special (use ~ instead).
 
              | postfix | examples
@@ -584,12 +584,12 @@ special (use ~ instead).
   acute      |    '    | a' -> á
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
-  ogonek     |    `    | a` -> ą
+  ogonek     |    \\=`    | a\\=` -> ą
   macron     |    -    | a- -> ā
   tilde      |    ~    | a~ -> ã
   caron      |    ~    | c~ -> č
   dot        |    ~    | e~ -> ė
-  cedilla    |    `    | k` -> ķ   g` -> ģ
+  cedilla    |    \\=`    | k\\=` -> ķ   g\\=` -> ģ
   stroke     |    /    | d/ -> đ
   nordic     |    /    | a/ -> å   e/ -> æ   o/ -> ø
   others     |    /    | s/ -> ß   n/ -> ŋ   k/ -> ĸ
@@ -773,18 +773,18 @@ Doubling the postfix separates the letter and postfix: 
e.g. a'' -> a'
  "latin-5-alt-postfix" "Latin-5" "5<" t
  "Latin-5 characters input method with postfix modifiers
 This input method differs from `latin-5-postfix' in that
-comma is not special (use ` instead), and period is not
+comma is not special (use \\=` instead), and period is not
 special (use / instead).
 
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
   breve      |    ~    | g~ -> ğ
-  cedilla    |    `    | c` -> ç
+  cedilla    |    \\=`    | c\\=` -> ç
   dot        |    /    | i/ -> ı   I/ -> İ
   nordic     |    /    | a/ -> å   e/ -> æ   o/ -> ø
   others     |    /    | s/ -> ß
@@ -930,8 +930,8 @@ Doubling the postfix separates the letter and postfix: e.g. 
a'' -> a'
  "french-alt-postfix" "French" "FR<" t
  "French (Français) input method with postfix modifiers
 
-` pour grave, ' pour aigu, ^ pour circonflexe, et \" pour tréma.
-Par exemple: a` -> à   e' -> é.
+\\=` pour grave, ' pour aigu, ^ pour circonflexe, et \" pour tréma.
+Par exemple: a\\=` -> à   e' -> é.
 
 Ç, «, et » sont produits par C/, <<, et >>.
 
@@ -1011,15 +1011,15 @@ Par exemple: e'' -> e'
  "italian-alt-postfix" "Latin-1" "IT<" t
  "Italian (Italiano) input method with postfix modifiers
 
-a' -> á    A' -> Á    a` -> à    A` -> À    i^ -> î    << -> «
-e' -> é    E' -> É    e` -> è    E` -> È    I^ -> Î    >> -> »
-i' -> í    I' -> Í    i` -> ì    I` -> Ì               o_ -> º
-o' -> ó    O' -> Ó    o` -> ò    O` -> Ò               a_ -> ª
-u' -> ú    U' -> Ú    u` -> ù    U` -> Ù
+a' -> á    A' -> Á    a\\=` -> à    A\\=` -> À    i^ -> î    << -> «
+e' -> é    E' -> É    e\\=` -> è    E\\=` -> È    I^ -> Î    >> -> »
+i' -> í    I' -> Í    i\\=` -> ì    I\\=` -> Ì               o_ -> º
+o' -> ó    O' -> Ó    o\\=` -> ò    O\\=` -> Ò               a_ -> ª
+u' -> ú    U' -> Ú    u\\=` -> ù    U\\=` -> Ù
 
 This method is for purists who like accents the old way.
 
-Doubling the postfix separates the letter and postfix: e.g. a`` -> a`
+Doubling the postfix separates the letter and postfix: e.g. a\\=`\\=` -> a\\=`
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -1083,21 +1083,21 @@ Doubling the postfix separates the letter and postfix: 
e.g. a`` -> a`
  "turkish-alt-postfix" "Turkish" "TR«" t
  "Turkish (Türkçe) input method with postfix modifiers.
 This input method differs from `turkish-postfix' in that
-comma is not special (use ` instead).
+comma is not special (use \\=` instead).
 
 turkish-latin-3-alt-postfix is an obsolete alias for turkish-alt-postfix.
 
 Note for I, ı, İ, i.
 
 A^ -> Â
-C` -> Ç
+C\\=` -> Ç
 G^ -> Ğ
 I  -> I
 i  -> ı
 I/ -> İ
 i/ -> i
 O\" -> Ö
-S` -> Ş
+S\\=` -> Ş
 U\" -> Ü
 U^ -> Û
 
@@ -1161,7 +1161,7 @@ Caters for French and Turkish as well as Dutch.
              | postfix |
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   Turkish    | various | i/ -> ı  s, -> ş  g^ -> ğ   I/ -> İ
              |         |  S, -> Ş  G^ -> Ğ
@@ -1180,61 +1180,61 @@ Doubling the postfix separates the letter and postfix: 
e.g. a'' -> a'
  ("ij" ?ij) ;; LATIN SMALL LIGATURE IJ
  ("IJ" ?IJ) ;; LATIN CAPITAL LIGATURE IJ
  ;; “Trema on the second letter of vowel pair.”  Yudit uses `:', not `"'.
- ("\"a" ?ä) ;; LATIN SMALL LETTER A WITH DIAERESIS 
- ("\"e" ?ë) ;; LATIN SMALL LETTER E WITH DIAERESIS 
- ("\"i" ?ï) ;; LATIN SMALL LETTER I WITH DIAERESIS 
- ("\"o" ?ö) ;; LATIN SMALL LETTER O WITH DIAERESIS 
- ("\"u" ?ü) ;; LATIN SMALL LETTER U WITH DIAERESIS 
- ("\"A" ?Ä) ;; LATIN CAPITAL LETTER A WITH DIAERESIS 
- ("\"E" ?Ë) ;; LATIN CAPITAL LETTER E WITH DIAERESIS 
- ("\"I" ?Ï) ;; LATIN CAPITAL LETTER I WITH DIAERESIS 
- ("\"O" ?Ö) ;; LATIN CAPITAL LETTER O WITH DIAERESIS 
- ("\"U" ?Ü) ;; LATIN CAPITAL LETTER U WITH DIAERESIS 
+ ("\"a" ?ä) ;; LATIN SMALL LETTER A WITH DIAERESIS
+ ("\"e" ?ë) ;; LATIN SMALL LETTER E WITH DIAERESIS
+ ("\"i" ?ï) ;; LATIN SMALL LETTER I WITH DIAERESIS
+ ("\"o" ?ö) ;; LATIN SMALL LETTER O WITH DIAERESIS
+ ("\"u" ?ü) ;; LATIN SMALL LETTER U WITH DIAERESIS
+ ("\"A" ?Ä) ;; LATIN CAPITAL LETTER A WITH DIAERESIS
+ ("\"E" ?Ë) ;; LATIN CAPITAL LETTER E WITH DIAERESIS
+ ("\"I" ?Ï) ;; LATIN CAPITAL LETTER I WITH DIAERESIS
+ ("\"O" ?Ö) ;; LATIN CAPITAL LETTER O WITH DIAERESIS
+ ("\"U" ?Ü) ;; LATIN CAPITAL LETTER U WITH DIAERESIS
  ;; “Acute, marking emphasis on long vowels”:
- ("a'" ?á) ;; LATIN SMALL LETTER A WITH ACUTE 
- ("e'" ?é) ;; LATIN SMALL LETTER E WITH ACUTE 
- ("i'" ?í) ;; LATIN SMALL LETTER I WITH ACUTE 
- ("o'" ?ó) ;; LATIN SMALL LETTER O WITH ACUTE 
- ("u'" ?ú) ;; LATIN SMALL LETTER U WITH ACUTE 
- ("A'" ?Á) ;; LATIN CAPITAL LETTER A WITH ACUTE 
- ("E'" ?É) ;; LATIN CAPITAL LETTER E WITH ACUTE 
- ("I'" ?Í) ;; LATIN CAPITAL LETTER I WITH ACUTE 
- ("O'" ?Ó) ;; LATIN CAPITAL LETTER O WITH ACUTE 
- ("U'" ?Ú) ;; LATIN CAPITAL LETTER U WITH ACUTE 
+ ("a'" ?á) ;; LATIN SMALL LETTER A WITH ACUTE
+ ("e'" ?é) ;; LATIN SMALL LETTER E WITH ACUTE
+ ("i'" ?í) ;; LATIN SMALL LETTER I WITH ACUTE
+ ("o'" ?ó) ;; LATIN SMALL LETTER O WITH ACUTE
+ ("u'" ?ú) ;; LATIN SMALL LETTER U WITH ACUTE
+ ("A'" ?Á) ;; LATIN CAPITAL LETTER A WITH ACUTE
+ ("E'" ?É) ;; LATIN CAPITAL LETTER E WITH ACUTE
+ ("I'" ?Í) ;; LATIN CAPITAL LETTER I WITH ACUTE
+ ("O'" ?Ó) ;; LATIN CAPITAL LETTER O WITH ACUTE
+ ("U'" ?Ú) ;; LATIN CAPITAL LETTER U WITH ACUTE
  ;; “Grave, marking emphasis on short vowels”:
  ("a`" ?à) ;; LATIN SMALL LETTER A WITH GRAVE
- ("e`" ?è) ;; LATIN SMALL LETTER E WITH GRAVE 
- ("i`" ?ì) ;; LATIN SMALL LETTER I WITH GRAVE 
- ("o`" ?ò) ;; LATIN SMALL LETTER O WITH GRAVE 
- ("u`" ?ù) ;; LATIN SMALL LETTER U WITH GRAVE 
- ("A`" ?À) ;; LATIN CAPITAL LETTER A WITH GRAVE 
- ("E`" ?È) ;; LATIN CAPITAL LETTER E WITH GRAVE 
- ("I`" ?Ì) ;; LATIN CAPITAL LETTER I WITH GRAVE 
- ("O`" ?Ò) ;; LATIN CAPITAL LETTER O WITH GRAVE 
+ ("e`" ?è) ;; LATIN SMALL LETTER E WITH GRAVE
+ ("i`" ?ì) ;; LATIN SMALL LETTER I WITH GRAVE
+ ("o`" ?ò) ;; LATIN SMALL LETTER O WITH GRAVE
+ ("u`" ?ù) ;; LATIN SMALL LETTER U WITH GRAVE
+ ("A`" ?À) ;; LATIN CAPITAL LETTER A WITH GRAVE
+ ("E`" ?È) ;; LATIN CAPITAL LETTER E WITH GRAVE
+ ("I`" ?Ì) ;; LATIN CAPITAL LETTER I WITH GRAVE
+ ("O`" ?Ò) ;; LATIN CAPITAL LETTER O WITH GRAVE
  ("U`" ?Ù) ;; LATIN CAPITAL LETTER U WITH GRAVE
  ;; “Cater for the use of many French words and use of the circumflex
  ;; in Frisian.”  Yudit used `;' for cedilla.
- ("c," ?ç) ;; LATIN SMALL LETTER C WITH CEDILLA 
- ("C," ?Ç) ;; LATIN CAPITAL LETTER C WITH CEDILLA 
- ("a^" ?â) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX 
- ("e^" ?ê) ;; LATIN SMALL LETTER E WITH CIRCUMFLEX 
- ("i^" ?î) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX 
- ("o^" ?ô) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX 
- ("u^" ?û) ;; LATIN SMALL LETTER U WITH CIRCUMFLEX 
- ("A^" ?Â) ;; LATIN CAPITAL LETTER A WITH CIRCUMFLEX 
- ("E^" ?Ê) ;; LATIN CAPITAL LETTER E WITH CIRCUMFLEX 
- ("I^" ?Î) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX 
- ("O^" ?Ô) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX 
+ ("c," ?ç) ;; LATIN SMALL LETTER C WITH CEDILLA
+ ("C," ?Ç) ;; LATIN CAPITAL LETTER C WITH CEDILLA
+ ("a^" ?â) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX
+ ("e^" ?ê) ;; LATIN SMALL LETTER E WITH CIRCUMFLEX
+ ("i^" ?î) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX
+ ("o^" ?ô) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX
+ ("u^" ?û) ;; LATIN SMALL LETTER U WITH CIRCUMFLEX
+ ("A^" ?Â) ;; LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+ ("E^" ?Ê) ;; LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+ ("I^" ?Î) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+ ("O^" ?Ô) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX
  ("U^" ?Û) ;; LATIN CAPITAL LETTER U WITH CIRCUMFLEX
  ;; “Follow the example of the Dutch POSIX locale, using ISO-8859-9 to
  ;; cater to the many Turks in Dutch society.”  Perhaps German methods
  ;; should do so too.  Follow turkish-alt-postfix here.
  ("i/" ?ı) ;; LATIN SMALL LETTER I WITH NO DOT
- ("s," ?ş) ;; LATIN SMALL LETTER S WITH CEDILLA 
- ("g^" ?ğ) ;; LATIN SMALL LETTER G WITH BREVE 
+ ("s," ?ş) ;; LATIN SMALL LETTER S WITH CEDILLA
+ ("g^" ?ğ) ;; LATIN SMALL LETTER G WITH BREVE
  ("I/" ?İ) ;; LATIN CAPITAL LETTER I WITH DOT ABOVE
- ("S," ?Ş) ;; LATIN CAPITAL LETTER S WITH CEDILLA 
- ("G^" ?Ğ) ;; LATIN CAPITAL LETTER G WITH BREVE 
+ ("S," ?Ş) ;; LATIN CAPITAL LETTER S WITH CEDILLA
+ ("G^" ?Ğ) ;; LATIN CAPITAL LETTER G WITH BREVE
  )
 
 ;; Originally from Yudit, discussed with Albertas Agejevas
@@ -1339,17 +1339,17 @@ of characters from a single Latin-N charset.
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
-  cedilla    |    /`   | c/ -> ç   c` -> ç
-  ogonek     |    `    | a` -> ą
+  cedilla    |    /\\=`   | c/ -> ç   c\\=` -> ç
+  ogonek     |    \\=`    | a\\=` -> ą
   breve      |    ~    | a~ -> ă
   caron      |    ~    | c~ -> č
   dbl. acute |    :    | o: -> ő
-  ring       |    `    | u` -> ů
-  dot        |    `    | z` -> ż
+  ring       |    \\=`    | u\\=` -> ů
+  dot        |    \\=`    | z\\=` -> ż
   stroke     |    /    | d/ -> đ
   nordic     |    /    | d/ -> ð   t/ -> þ   a/ -> å   e/ -> æ   o/ -> ø
   others     |   /<>   | s/ -> ß   ?/ -> ¿   !/ -> ¡
diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el
index e8957eb..5106bd2 100644
--- a/lisp/leim/quail/latin-post.el
+++ b/lisp/leim/quail/latin-post.el
@@ -41,7 +41,7 @@
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
@@ -390,7 +390,7 @@ Doubling the postfix separates the letter and postfix: e.g. 
a'' -> a'
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   dot        |    .    | c. -> ċ   i. -> ı   I. -> İ
@@ -746,7 +746,7 @@ Doubling the postfix separates the letter and postfix: e.g. 
a'' -> a'
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
@@ -1005,8 +1005,8 @@ OEE -> OE
  "french-postfix" "French" "FR<" t
  "French (Français) input method with postfix modifiers
 
-` pour grave, ' pour aigu, ^ pour circonflexe, et \" pour tréma.
-Par exemple: a` -> à   e' -> é.
+\\=` pour grave, ' pour aigu, ^ pour circonflexe, et \" pour tréma.
+Par exemple: a\\=` -> à   e' -> é.
 
 Ç, «, et » sont produits par C,, <<, et >>.
 
@@ -1117,7 +1117,7 @@ szz -> sz
  ("aue" ["aue"])
  ("Aue" ["Aue"])
  ("que" ["que"])
- ("Que" ["Que"]) 
+ ("Que" ["Que"])
 )
 
 (quail-define-package
@@ -1186,15 +1186,15 @@ Doubling the postfix separates the letter and postfix: 
e.g. a'' -> a'
  "italian-postfix" "Latin-1" "IT<" t
  "Italian (Italiano) input method with postfix modifiers
 
-a` -> à    A` -> À    e' -> é    << -> «
-e` -> è    E` -> È    E' -> É    >> -> »
-i` -> ì    I` -> Ì               o_ -> º
-o` -> ò    O` -> Ò               a_ -> ª
-u` -> ù    U` -> Ù
+a\\=` -> à    A\\=` -> À    e' -> é    << -> «
+e\\=` -> è    E\\=` -> È    E' -> É    >> -> »
+i\\=` -> ì    I\\=` -> Ì               o_ -> º
+o\\=` -> ò    O\\=` -> Ò               a_ -> ª
+u\\=` -> ù    U\\=` -> Ù
 
 Typewriter-style italian characters.
 
-Doubling the postfix separates the letter and postfix: e.g. a`` -> a`
+Doubling the postfix separates the letter and postfix: e.g. a\\=`\\=` -> a\\=`
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -2090,7 +2090,7 @@ of characters from a single Latin-N charset.
              | postfix | examples
  ------------+---------+----------
   acute      |    '    | a' -> á
-  grave      |    `    | a` -> à
+  grave      |    \\=`    | a\\=` -> à
   circumflex |    ^    | a^ -> â
   diaeresis  |    \"    | a\" -> ä
   tilde      |    ~    | a~ -> ã
diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el
index 41552b5..4e60d9c 100644
--- a/lisp/leim/quail/latin-pre.el
+++ b/lisp/leim/quail/latin-pre.el
@@ -53,7 +53,7 @@
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á, '' -> ´
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"a -> ä  \"\" -> ¨
     tilde    |   ~    | ~a -> ã
@@ -184,7 +184,7 @@
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á   '' -> ´
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   diaeresis  |   \"    | \"i -> ï   \"\" -> ¨
     tilde    |   ~    | ~n -> ñ
    cedilla   |   ~    | ~c -> ç
@@ -259,7 +259,7 @@ Key translation rules are:
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'e -> é
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"i -> ï
    cedilla   | ~ or , | ~c -> ç   ,c -> ç
@@ -398,7 +398,7 @@ Key translation rules are:
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á   '' -> ´
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"u -> ü
     tilde    |   ~    | ~a -> ã
@@ -489,9 +489,9 @@ Key translation rules are:
   diaeresis  |   \"    | \"a -> ä   \"\" -> ¨
     breve    |   ~    | ~a -> ă
     caron    |   ~    | ~c -> č
-   cedilla   |   `    | `c -> ç   `e -> ?ę
-    misc     | ' ` ~  | 'd -> đ   `l -> ł   `z -> ż   ~o -> ő   ~u -> ű
-   symbol    |   ~    | `. -> ˙   ~~ -> ˘   ~. -> ?¸
+   cedilla   |   \\=`    | \\=`c -> ç   \\=`e -> ?ę
+    misc     | ' \\=` ~  | 'd -> đ   \\=`l -> ł   \\=`z -> ż   ~o -> ő   ~u -> 
ű
+   symbol    |   ~    | \\=`. -> ˙   ~~ -> ˘   ~. -> ?¸
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -596,13 +596,13 @@ Key translation rules are:
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á   '' -> ?´
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"a -> ä   \"\" -> ¨
    cedilla   |   ~    | ~c -> ç   ~s -> ş   ~~ -> ¸
   dot above  |   / .  | /g -> ġ   .o -> ġ
     misc     | \" ~ /  | \"s -> ß   ~g -> ğ   ~u -> ŭ   /h -> ħ   /i -> ı
-   symbol    |   ~    | ~` -> ˘   /# -> £   /$ -> ¤   // -> °
+   symbol    |   ~    | ~\\=` -> ˘   /# -> £   /$ -> ¤   // -> °
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
@@ -737,7 +737,7 @@ For example, the character named `aogonek' is obtained by 
`/a'."
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"a -> ä, \"Y -> Ÿ
     tilde    |   ~    | ~a -> ã
@@ -872,7 +872,7 @@ For example, the character named `aogonek' is obtained by 
`/a'."
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^w -> ŵ
   diaeresis  |   \"    | \"a -> ä
   dot above  |   .    | .b -> ḃ
@@ -997,7 +997,7 @@ of characters from a single Latin-N charset.
     effect   | prefix | examples
  ------------+--------+----------
     acute    |   '    | 'a -> á, '' -> ´
-    grave    |   `    | `a -> à
+    grave    |   \\=`    | \\=`a -> à
   circumflex |   ^    | ^a -> â
   diaeresis  |   \"    | \"a -> ä  \"\" -> ¨
     tilde    |   ~    | ~a -> ã
diff --git a/lisp/leim/quail/thai.el b/lisp/leim/quail/thai.el
index 2554686..72e5020 100644
--- a/lisp/leim/quail/thai.el
+++ b/lisp/leim/quail/thai.el
@@ -47,7 +47,7 @@
 
 The difference from the ordinal Thai keyboard:
     ‘฿’ and ‘๏’ are assigned to ‘\\’ and ‘|’ respectively,
-    ‘ฃ’ and ‘ฅ’ are assigned to ‘`’ and ‘~’ respectively,
+    ‘ฃ’ and ‘ฅ’ are assigned to ‘\\=`’ and ‘~’ respectively,
     Don't know where to assign characters ‘๚’ and ‘๛’."
  nil t t t t nil nil nil nil nil t)
 
diff --git a/lisp/leim/quail/tibetan.el b/lisp/leim/quail/tibetan.el
index a54cbdc..1313f56 100644
--- a/lisp/leim/quail/tibetan.el
+++ b/lisp/leim/quail/tibetan.el
@@ -141,7 +141,7 @@
 
   NOT SPECIFIED IN EXT. WYLIE:
     +--------------------------------------------------------+
-    |ྂ = ~ |ྃ = ` |྄ = , |྅ = @ |༷ = _o|༵ = _O|༆ = ^|
+    |ྂ = ~ |ྃ = \\=` |྄ = , |྅ = @ |༷ = _o|༵ = _O|༆ = ^|
     +--------------------------------------------------------+
     |ྈ = x |ྉ = X |྆ = v |྇ = V |ྊ = q |ྋ = Q |
     +-----------------------------------------------+
diff --git a/lisp/leim/quail/viqr.el b/lisp/leim/quail/viqr.el
index c5c1c94..570a16b 100644
--- a/lisp/leim/quail/viqr.el
+++ b/lisp/leim/quail/viqr.el
@@ -53,7 +53,7 @@
     horn     |    +    | o+ -> ơ
  ------------+---------+----------
     acute    |    '    | a' -> á
-    grave    |    `    | a` -> à
+    grave    |    \\=`    | a\\=` -> à
   hook above |    ?    | a? -> ả
     tilde    |    ~    | a~ -> ã
    dot below |    .    | a. -> ạ
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index f0c6d87..26c91bb 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4843,7 +4843,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse 
order.
 
 ;;;***
 
-;;;### (autoloads nil "rmailsum" "rmailsum.el" 
"b34aec2c31535804e2731992a64c8cdf")
+;;;### (autoloads nil "rmailsum" "rmailsum.el" 
"4bc0d1a65aede332348200e1937c84d4")
 ;;; Generated autoloads from rmailsum.el
 
 (autoload 'rmail-summary "rmailsum" "\
@@ -4862,7 +4862,7 @@ 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 string of regexps separated by commas.
+RECIPIENTS is a regular expression.
 
 \(fn RECIPIENTS &optional PRIMARY-ONLY)" t nil)
 
@@ -4878,13 +4878,13 @@ Emacs will list the message in the summary.
 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 string of regexps separated by commas.
+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 string of regexps separated by commas.
+SENDERS is a regular expression.
 
 \(fn SENDERS)" t nil)
 
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7097fef..eeb42e8 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -287,23 +287,18 @@ LABELS should be a string containing the desired labels, 
separated by commas."
                             (mail-comma-list-regexp labels)
                             "\\)\\(,\\|\\'\\)")))
 
-;; FIXME "a string of regexps separated by commas" makes no sense because:
-;;  i) it's pointless (you can just use \\|)
-;; ii) it's broken (you can't specify a literal comma)
-;; rmail-summary-by-topic and rmail-summary-by-senders have the same issue.
 ;;;###autoload
 (defun rmail-summary-by-recipients (recipients &optional primary-only)
   "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 string of regexps separated by commas."
+RECIPIENTS is a regular expression."
   (interactive "sRecipients to summarize by: \nP")
   (rmail-new-summary
    (concat "recipients " recipients)
    (list 'rmail-summary-by-recipients recipients primary-only)
-   'rmail-message-recipients-p
-   (mail-comma-list-regexp recipients) primary-only))
+   'rmail-message-recipients-p recipients primary-only))
 
 (defun rmail-message-recipients-p (msg recipients &optional primary-only)
   (rmail-apply-in-message msg 'rmail-message-recipients-p-1
@@ -370,7 +365,7 @@ Emacs will list the message in the summary."
   "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 string of regexps separated by commas."
+SUBJECT is a regular expression."
   (interactive
    ;; We quote the default subject, because if it contains regexp
    ;; special characters (eg "?"), it can fail to match itself.  (Bug#2333)
@@ -382,8 +377,7 @@ SUBJECT is a string of regexps separated by commas."
   (rmail-new-summary
    (concat "about " subject)
    (list 'rmail-summary-by-topic subject whole-message)
-   'rmail-message-subject-p
-   (mail-comma-list-regexp subject) whole-message))
+   'rmail-message-subject-p subject whole-message))
 
 (defun rmail-message-subject-p (msg subject &optional whole-message)
   (if whole-message
@@ -395,13 +389,11 @@ SUBJECT is a string of regexps separated by commas."
 ;;;###autoload
 (defun rmail-summary-by-senders (senders)
   "Display a summary of all messages whose \"From\" field matches SENDERS.
-SENDERS is a string of regexps separated by commas."
+SENDERS is a regular expression."
   (interactive "sSenders to summarize by: ")
   (rmail-new-summary
    (concat "senders " senders)
-   (list 'rmail-summary-by-senders senders)
-   'rmail-message-senders-p
-   (mail-comma-list-regexp senders)))
+   (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders))
 
 (defun rmail-message-senders-p (msg senders)
   (string-match senders (or (rmail-get-header "From" msg) "")))
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index ddd8697..2b9d8fa 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1500,9 +1500,10 @@ just append to the file, in Babyl format if necessary."
            (insert "\nMail-Followup-To: "))))
 
 (defun mail-position-on-field (field &optional soft)
-  "Move to the start of the contents of header field FIELD.
-If there is none, insert one, unless SOFT is non-nil.
-If there are multiple FIELD fields, this goes to the first."
+  "Move to the end of the contents of header field FIELD.
+If there is no such header, insert one, unless SOFT is non-nil.
+If there are multiple FIELD fields, this goes to the first.
+Returns non-nil if FIELD was originally present."
   (let (end
        (case-fold-search t))
     (setq end (mail-header-end))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f2d7d86..fda5945 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -67,7 +67,7 @@ files conditionalize this setup based on the TERM environment 
variable."
   :type 'string)
 
 ;;;###tramp-autoload
-(defcustom tramp-histfile-override t
+(defcustom tramp-histfile-override ".tramp_history"
   "When invoking a shell, override the HISTFILE with this value.
 When setting to a string, it redirects the shell history to that
 file.  Be careful when setting to \"/dev/null\"; this might
@@ -1459,12 +1459,14 @@ be non-negative integers."
                  (tramp-shell-quote-argument localname))))))
 
       ;; We handle also the local part, because there doesn't exist
-      ;; `set-file-uid-gid'.  On W32 "chown" might not work.
-      (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
-           (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
-       (tramp-call-process
-        nil "chown" nil nil nil
-         (format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
+      ;; `set-file-uid-gid'.  On W32 "chown" might not work.  We add a
+      ;; timeout for this.
+      (with-timeout (5 nil)
+       (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
+             (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
+         (tramp-call-process
+          nil "chown" nil nil nil
+          (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))))
 
 (defun tramp-remote-selinux-p (vec)
   "Check, whether SELINUX is enabled on the remote host."
@@ -2129,9 +2131,10 @@ KEEP-DATE is non-nil if NEWNAME should have the same 
timestamp as FILENAME."
   (let ((coding-system-for-read 'binary)
        (coding-system-for-write 'binary)
        (jka-compr-inhibit t)
+       (inhibit-file-name-operation 'write-region)
        (inhibit-file-name-handlers
-        (cons epa-file-handler
-               (remq 'tramp-file-name-handler inhibit-file-name-handlers))))
+        (cons 'epa-file-handler
+              (remq 'tramp-file-name-handler inhibit-file-name-handlers))))
     (with-temp-file newname
       (set-buffer-multibyte nil)
       (insert-file-contents-literally filename)))
@@ -3753,17 +3756,6 @@ Only send the definition if it has not already been 
done."
        (tramp-set-connection-property
         (tramp-get-connection-process vec) "scripts" (cons name scripts))))))
 
-(defun tramp-set-auto-save ()
-  (when (and ;; ange-ftp has its own auto-save mechanism
-            (eq (tramp-find-foreign-file-name-handler (buffer-file-name))
-                'tramp-sh-file-name-handler)
-             auto-save-default)
-    (auto-save-mode 1)))
-(add-hook 'find-file-hooks 'tramp-set-auto-save t)
-(add-hook 'tramp-unload-hook
-         (lambda ()
-           (remove-hook 'find-file-hooks 'tramp-set-auto-save)))
-
 (defun tramp-run-test (switch filename)
   "Run `test' on the remote system, given a SWITCH and a FILENAME.
 Returns the exit code of the `test' program."
@@ -5589,7 +5581,7 @@ function cell is returned to be applied on a buffer."
                       (default-directory
                         (tramp-compat-temporary-file-directory)))
                   (apply
-                   'call-process-region (point-min) (point-max)
+                   'tramp-call-process-region ,vec (point-min) (point-max)
                    (car (split-string ,compress)) t t nil
                    (cdr (split-string ,compress)))))
            `(lambda (beg end)
@@ -5598,7 +5590,7 @@ function cell is returned to be applied on a buffer."
                     (default-directory
                       (tramp-compat-temporary-file-directory)))
                 (apply
-                 'call-process-region beg end
+                 'tramp-call-process-region ,vec beg end
                  (car (split-string ,compress)) t t nil
                  (cdr (split-string ,compress))))
               (,coding (point-min) (point-max)))))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 22adbd9..fc23a0b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -147,9 +147,11 @@ policy for local files."
 
 (defcustom tramp-auto-save-directory nil
   "Put auto-save files in this directory, if set.
-The idea is to use a local directory so that auto-saving is faster."
+The idea is to use a local directory so that auto-saving is faster.
+This setting has precedence over `auto-save-file-name-transforms'."
   :group 'tramp
-  :type '(choice (const nil) string))
+  :type '(choice (const :tag "Use default" nil)
+                (directory :tag "Auto save directory name")))
 
 (defcustom tramp-encoding-shell
   (if (memq system-type '(windows-nt))
@@ -1431,7 +1433,12 @@ ARGUMENTS to actually emit the message (if applicable)."
        (format
        ";; %sEmacs: %s Tramp: %s -*- mode: outline; -*-"
        (if (featurep 'sxemacs) "SX" (if (featurep 'xemacs) "X" "GNU "))
-       emacs-version tramp-version)))
+       emacs-version tramp-version))
+      (when (>= tramp-verbose 10)
+       (insert
+        (format
+         "\n;; Location: %s Git: %s"
+         (locate-library "tramp") (tramp-repository-get-version)))))
     (unless (bolp)
       (insert "\n"))
     ;; Timestamp.
@@ -1523,6 +1530,12 @@ applicable)."
            (let ((tramp-verbose 0))
              (setq vec-or-proc
                    (tramp-get-connection-property vec-or-proc "vector" nil))))
+         ;; Append connection buffer for error messages.
+         (when (= level 1)
+           (let ((tramp-verbose 0))
+             (with-current-buffer (tramp-get-connection-buffer vec-or-proc)
+               (setq fmt-string (concat fmt-string "\n%s")
+                     arguments (append arguments (list (buffer-string)))))))
          ;; Do it.
          (when (vectorp vec-or-proc)
            (apply 'tramp-debug-message
@@ -4006,35 +4019,31 @@ Return the local name of the temporary file."
 
 (defun tramp-handle-make-auto-save-file-name ()
   "Like `make-auto-save-file-name' for Tramp files.
-Returns a file name in `tramp-auto-save-directory' for autosaving this file."
-  (let ((tramp-auto-save-directory tramp-auto-save-directory)
+Returns a file name in `tramp-auto-save-directory' for autosaving
+this file, if that variable is non-nil."
+  ;; Create directory.
+  (unless (or (null tramp-auto-save-directory)
+             (file-exists-p tramp-auto-save-directory))
+    (make-directory tramp-auto-save-directory t))
+
+  (let ((system-type 'not-windows)
+       (auto-save-file-name-transforms
+        (if (and (null tramp-auto-save-directory)
+                 (boundp 'auto-save-file-name-transforms))
+            (symbol-value 'auto-save-file-name-transforms)))
        (buffer-file-name
-        (tramp-subst-strs-in-string
-         '(("_" . "|")
-           ("/" . "_a")
-           (":" . "_b")
-           ("|" . "__")
-           ("[" . "_l")
-           ("]" . "_r"))
-         (buffer-file-name))))
-    ;; File name must be unique.  This is ensured with Emacs 22 (see
-    ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
-    ;; all other cases we must do it ourselves.
-    (when (boundp 'auto-save-file-name-transforms)
-      (mapc
-       (lambda (x)
-        (when (and (string-match (car x) buffer-file-name)
-                   (not (car (cddr x))))
-          (setq tramp-auto-save-directory
-                (or tramp-auto-save-directory
-                    (tramp-compat-temporary-file-directory)))))
-       (symbol-value 'auto-save-file-name-transforms)))
-    ;; Create directory.
-    (when tramp-auto-save-directory
-      (setq buffer-file-name
-           (expand-file-name buffer-file-name tramp-auto-save-directory))
-      (unless (file-exists-p tramp-auto-save-directory)
-       (make-directory tramp-auto-save-directory t)))
+        (if (null tramp-auto-save-directory)
+            buffer-file-name
+          (expand-file-name
+           (tramp-subst-strs-in-string
+            '(("_" . "|")
+              ("/" . "_a")
+              (":" . "_b")
+              ("|" . "__")
+              ("[" . "_l")
+              ("]" . "_r"))
+            (buffer-file-name))
+           tramp-auto-save-directory))))
     ;; Run plain `make-auto-save-file-name'.  There might be an advice when
     ;; it is not a magic file name operation (since Emacs 22).
     ;; We must deactivate it temporarily.
@@ -4043,8 +4052,8 @@ Returns a file name in `tramp-auto-save-directory' for 
autosaving this file."
       ;; else
       (ad-deactivate 'make-auto-save-file-name)
       (prog1
-       (tramp-run-real-handler 'make-auto-save-file-name nil)
-       (ad-activate 'make-auto-save-file-name)))))
+         (tramp-run-real-handler 'make-auto-save-file-name nil)
+       (ad-activate 'make-auto-save-file-name)))))
 
 (unless (tramp-exists-file-name-handler 'make-auto-save-file-name)
   (defadvice make-auto-save-file-name
@@ -4136,6 +4145,38 @@ are written with verbosity of 6."
        (tramp-message v 6 "%d\n%s" result (error-message-string err))))
     result))
 
+(defun tramp-call-process-region
+  (vec start end program &optional delete buffer display &rest args)
+  "Calls `call-process-region' on the local host.
+It always returns a return code.  The Lisp error raised when
+PROGRAM is nil is trapped also, returning 1.  Furthermore, traces
+are written with verbosity of 6."
+  (let ((v (or vec
+              (vector tramp-current-method tramp-current-user
+                      tramp-current-host nil nil)))
+       (buffer (if (eq buffer t) (current-buffer) buffer))
+       result)
+    (tramp-message
+     v 6 "`%s %s' %s %s %s %s"
+     program (mapconcat 'identity args " ") start end delete buffer)
+    (condition-case err
+       (progn
+         (setq result
+               (apply
+                'call-process-region
+                start end program delete buffer display args))
+         ;; `result' could also be an error string.
+         (when (stringp result)
+           (signal 'file-error (list result)))
+         (with-current-buffer (if (bufferp buffer) buffer (current-buffer))
+            (if (zerop result)
+                (tramp-message v 6 "%d" result)
+              (tramp-message v 6 "%d\n%s" result (buffer-string)))))
+      (error
+       (setq result 1)
+       (tramp-message v 6 "%d\n%s" result (error-message-string err))))
+    result))
+
 ;;;###tramp-autoload
 (defun tramp-read-passwd (proc &optional prompt)
   "Read a password from user (compat function).
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 226ec9f..eb22b60 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -38,6 +38,20 @@
 (defconst tramp-bug-report-address "address@hidden"
   "Email address to send bug reports to.")
 
+(defun tramp-repository-get-version ()
+  "Try to return as a string the repository revision of the Tramp sources."
+  (unless (featurep 'xemacs)
+    (let ((dir
+          (funcall 'locate-dominating-file (locate-library "tramp") ".git")))
+      (when dir
+       (with-temp-buffer
+         (let ((default-directory (file-name-as-directory dir)))
+           (and (zerop
+                 (ignore-errors
+                   (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
+                (not (zerop (buffer-size)))
+                (replace-regexp-in-string "\n" "" (buffer-string)))))))))
+
 ;; Check for (X)Emacs version.
 (let ((x (if (or (>= emacs-major-version 22)
                 (and (featurep 'xemacs)
diff --git a/lisp/obsolete/iso-acc.el b/lisp/obsolete/iso-acc.el
index eaf732e..499a9da 100644
--- a/lisp/obsolete/iso-acc.el
+++ b/lisp/obsolete/iso-acc.el
@@ -272,7 +272,7 @@ See the function `iso-accents-mode'."
 
 (defcustom iso-accents-enable '(?' ?` ?^ ?\" ?~ ?/)
   "List of accent keys that become prefixes in ISO Accents mode.
-The default is (?' ?` ?^ ?\" ?~ ?/), which contains all the supported
+The default is (?' ?\\=` ?^ ?\" ?~ ?/), which contains all the supported
 accent keys.  If you set this variable to a list in which some of those
 characters are missing, the missing ones do not act as accents.
 
@@ -346,7 +346,7 @@ the language you choose)."
   "Toggle ISO Accents mode, in which accents modify the following letter.
 This permits easy insertion of accented characters according to ISO-8859-1.
 When Iso-accents mode is enabled, accent character keys
-\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
+\(\\=`, ', \", ^, / and ~) do not self-insert; instead, they modify the 
following
 letter key so that it inserts an ISO accented letter.
 
 You can customize ISO Accents mode to a particular language
diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el
index 122b1bf..68b2208 100644
--- a/lisp/obsolete/scribe.el
+++ b/lisp/obsolete/scribe.el
@@ -50,7 +50,7 @@
   :group 'scribe)
 
 (defcustom scribe-electric-quote nil
-  "Non-nil makes insert of double quote use `` or '' depending on context."
+  "Non-nil makes insert of double quote use \\=`\\=` or '' depending on 
context."
   :type 'boolean
   :group 'scribe)
 
@@ -124,7 +124,7 @@ Interesting variables:
   Non-nil makes Scribe mode use a different style of paragraph separation.
 
 `scribe-electric-quote'
-  Non-nil makes insert of double quote use `` or '' depending on context.
+  Non-nil makes insert of double quote use \\=`\\=` or '' depending on context.
 
 `scribe-electric-parenthesis'
   Non-nil makes an open-parenthesis char (one of `([<{')
@@ -265,8 +265,8 @@ to skip backward."
   (forward-char -1))
 
 (defun scribe-insert-quote (count)
-  "Insert ``, '' or \" according to preceding character.
-If `scribe-electric-quote' is non-nil, insert ``, '' or \" according
+  "Insert \\=`\\=`, '' or \" according to preceding character.
+If `scribe-electric-quote' is non-nil, insert \\=`\\=`, '' or \" according
 to preceding character.  With numeric arg N, always insert N \" characters.
 Else just insert \"."
   (interactive "P")
diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el
index 4959072..80b2c92 100644
--- a/lisp/obsolete/sregex.el
+++ b/lisp/obsolete/sregex.el
@@ -416,7 +416,7 @@ Here are the clauses allowed in an `sregex' or `sregexq' 
expression:
   given set.  See below for how to construct a CHAR-CLAUSE.
 
 - the symbol `bot'
-  Stands for \"\\\\`\", matching the empty string at the beginning of
+  Stands for \"\\\\\\=`\", matching the empty string at the beginning of
   text (beginning of a string or of a buffer).
 
 - the symbol `eot'
diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el
index c5959d1..9814265 100644
--- a/lisp/obsolete/tpu-edt.el
+++ b/lisp/obsolete/tpu-edt.el
@@ -648,7 +648,7 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
 (make-variable-buffer-local 'tpu-mark-flag)
 
 (defun tpu-set-mode-line (for-tpu)
-  "Set ``minor-mode-alist'' for TPU-edt, or reset it to default Emacs."
+  "Set `minor-mode-alist' for TPU-edt, or reset it to default Emacs."
   (let ((entries '((tpu-newline-and-indent-p tpu-newline-and-indent-string)
                    (tpu-rectangular-p tpu-rectangle-string)
                    (tpu-direction-string tpu-direction-string)
diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el
index 4c5ea13..3115038 100644
--- a/lisp/obsolete/tpu-mapper.el
+++ b/lisp/obsolete/tpu-mapper.el
@@ -81,7 +81,7 @@ suit your tastes (or to cope with those silly Sun and PC 
keypads).
 Finally, you will be prompted for the name of the file to store the key
 definitions.  If you chose the default, TPU-edt will find it and load it
 automatically.  If you specify a different file name, you will need to
-set the variable ``tpu-xkeys-file'' before starting TPU-edt.  Here's how
+set the variable `tpu-xkeys-file' before starting TPU-edt.  Here's how
 you might go about doing that in your init file.
 
   (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\"))
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index fd14462..f767a4e 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -2583,7 +2583,7 @@ block but are passed literally to the \"example-block\"."
 (defun org-babel-read (cell &optional inhibit-lisp-eval)
   "Convert the string value of CELL to a number if appropriate.
 Otherwise if cell looks like lisp (meaning it starts with a
-\"(\", \"'\", \"`\" or a \"[\") then read it as lisp,
+\"(\", \"'\", \"\\=`\" or a \"[\") then read it as lisp,
 otherwise return it unmodified as a string.  Optional argument
 NO-LISP-EVAL inhibits lisp evaluation for situations in which is
 it not appropriate."
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 65696b2..3df9fb6 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -5712,7 +5712,7 @@ This function is invoked if 
`org-agenda-todo-ignore-deadlines',
    (let ((calendar-date-style 'european)       (european-calendar-style t))
      (diary-date day month year mark))))
 
-;; Define the` org-class' function
+;; Define the `org-class' function
 (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
   "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
 DAYNAME is a number between 0 (Sunday) and 6 (Saturday).
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 29ef8ef..e9dae19 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -16955,12 +16955,12 @@ Allowed values for TYPE are:
 
 When TYPE is nil, fall back on returning a regexp that matches
 both scheduled and deadline timestamps."
-  (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
+[^]+0-9>
\n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)")
+  (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
+[^]+0-9>\r\n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)")
        ((eq type 'active) org-ts-regexp)
-       ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^
\n>]*?\\)\\]")
+       ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} 
?[^\r\n>]*?\\)\\]")
        ((eq type 'scheduled) (concat "\\<" org-scheduled-string " 
*<\\([^>]+\\)>"))
        ((eq type 'deadline) (concat "\\<" org-deadline-string " 
*<\\([^>]+\\)>"))
-       ((eq type 'closed) (concat org-closed-string " 
\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^
\n>]*?\\)\\]"))
+       ((eq type 'closed) (concat org-closed-string " 
\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)\\]"))
        ((eq type 'scheduled-or-deadline)
         (concat "\\<\\(?:" org-deadline-string "\\|" org-scheduled-string "\\) 
*<\\([^>]+\\)>"))))
 
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index ee5a5a6..07f5ef4 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2400,7 +2400,7 @@ This construct is \"<keyword> <expression> :\"."
            "false" "true")             ; Defined in C99.
   c++     (append
            '("nullptr")
-           (c-lang-const c-constant-kwds))
+           (c-lang-const c-constant-kwds c))
   objc    '("nil" "Nil" "YES" "NO" "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
   idl     '("TRUE" "FALSE")
   java    '("true" "false" "null") ; technically "literals", not keywords
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 3c1aec4..8365702 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1823,7 +1823,7 @@ Key bindings:
 ;; bug reporting
 
 (defconst c-mode-help-address
-  "address@hidden"
+  "address@hidden"
   "Address(es) for CC Mode bug reports.")
 
 (defun c-version ()
@@ -1840,6 +1840,13 @@ Key bindings:
 (defvar reporter-prompt-for-summary-p)
 (defvar reporter-dont-compact-list)
 
+;; This could be "emacs,cc-mode" in the version included in Emacs.
+(defconst c-mode-bug-package "cc-mode"
+  "The package to use in the bug submission.")
+
+;; reporter-submit-bug-report requires sendmail.
+(declare-function mail-position-on-field "sendmail" (field &optional soft))
+
 (defun c-submit-bug-report ()
   "Submit via mail a bug report on CC Mode."
   (interactive)
@@ -1903,6 +1910,9 @@ Key bindings:
        vars)
       (lambda ()
        (run-hooks 'c-prepare-bug-report-hook)
+       (save-excursion
+         (or (mail-position-on-field "X-Debbugs-Package")
+             (insert c-mode-bug-package)))
        (insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
                        style c-features)))))))
 
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index d6f6f3b..7d2f3fc 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -7631,7 +7631,7 @@ $8        Match of the 8th set of parentheses in the last 
match (auto-local).
 $9     Match of the 9th set of parentheses in the last match (auto-local).
 $&     The string matched by the last pattern match (auto-local).
 $'     The string after what was matched by the last match (auto-local).
-$`     The string before what was matched by the last match (auto-local).
+$\\=`  The string before what was matched by the last match (auto-local).
 
 $(     The real gid of this process.
 $)     The effective gid of this process.
@@ -7647,7 +7647,7 @@ $;        Subscript separator for multi-dim array 
emulation.  Default \"\\034\".
 $<     The real uid of this process.
 $=     The page length of the current output channel.  Default is 60 lines.
 $>     The effective uid of this process.
-$?     The status returned by the last ``, pipe close or `system'.
+$?     The status returned by the last \\=`\\=`, pipe close or `system'.
 $@     The perl error message from the last eval or do @var{EXPR} command.
 $ARGV  The name of the current file used with <> .
 $[     Deprecated: The index of the first element/char in an array/string.
@@ -7888,7 +7888,7 @@ printf [FILEHANDLE] (FORMAT,LIST)
 push(ARRAY,LIST)
 q/STRING/      Synonym for 'STRING'
 qq/STRING/     Synonym for \"STRING\"
-qx/STRING/     Synonym for `STRING`
+qx/STRING/     Synonym for \\=`STRING\\=`
 rand[(EXPR)]
 read(FILEHANDLE,SCALAR,LENGTH[,OFFSET])
 readdir(DIRHANDLE)
@@ -8007,7 +8007,7 @@ pos STRING    Set/Get end-position of the last match over 
this string, see \\G.
 quotemeta [ EXPR ]     Quote regexp metacharacters.
 qw/WORD1 .../          Synonym of split('', 'WORD1 ...')
 readline FH    Synonym of <FH>.
-readpipe CMD   Synonym of `CMD`.
+readpipe CMD   Synonym of \\=`CMD\\=`.
 ref [ EXPR ]   Type of EXPR when dereferenced.
 sysopen FH, FILENAME, MODE [, PERM]    (MODE is numeric, see Fcntl.)
 tie VAR, PACKAGE, LIST Hide an object behind a simple Perl variable.
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index e06b920..61709c3 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -231,7 +231,8 @@ Blank lines separate paragraphs.  Semicolons start comments.
   (lisp-mode-variables nil nil 'elisp)
   (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
   (setq-local electric-pair-text-pairs
-              (cons '(?\` . ?\') electric-pair-text-pairs))
+              (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
+  (setq-local electric-quote-string t)
   (setq imenu-case-fold-search nil)
   (add-function :before-until (local 'eldoc-documentation-function)
                 #'elisp-eldoc-documentation-function)
@@ -394,7 +395,7 @@ It can be quoted, or be inside a quoted form."
                ((or (eq (char-after) ?\[)
                     (progn
                       (skip-chars-backward " ")
-                      (memq (char-before) '(?' ?`))))
+                      (memq (char-before) '(?' ?` ?‘))))
                 (setq res t))
                ((eq (char-before) ?,)
                 (setq nesting nil))))
@@ -459,7 +460,7 @@ It can be quoted, or be inside a quoted form."
           (beg (condition-case nil
                    (save-excursion
                      (backward-sexp 1)
-                     (skip-syntax-forward "'")
+                     (skip-chars-forward "`',‘")
                      (point))
                  (scan-error pos)))
           (end
@@ -470,7 +471,7 @@ It can be quoted, or be inside a quoted form."
                  (save-excursion
                    (goto-char beg)
                    (forward-sexp 1)
-                    (skip-chars-backward "'")
+                    (skip-chars-backward "'’")
                    (when (>= (point) pos)
                      (point)))
                (scan-error pos))))
@@ -478,7 +479,7 @@ It can be quoted, or be inside a quoted form."
            (funpos (eq (char-before beg) ?\())
            (quoted (elisp--form-quoted-p beg)))
       (when (and end (or (not (nth 8 (syntax-ppss)))
-                         (eq (char-before beg) ?`)))
+                         (memq (char-before beg) '(?` ?‘))))
         (let ((table-etc
                (if (or (not funpos) quoted)
                    ;; FIXME: We could look at the first element of the list and
@@ -578,7 +579,6 @@ It can be quoted, or be inside a quoted form."
 
 ;;; Xref backend
 
-(declare-function xref-make-elisp-location "xref" (symbol type file))
 (declare-function xref-make-bogus-location "xref" (message))
 (declare-function xref-make "xref" (description location))
 (declare-function xref-collect-matches "xref" (input dir &optional kind))
@@ -591,9 +591,9 @@ It can be quoted, or be inside a quoted form."
         (when sym
           (elisp--xref-find-definitions sym))))
     (`references
-     (elisp--xref-find-matches id 'symbol))
+     (elisp--xref-find-matches id #'xref-collect-references))
     (`matches
-     (elisp--xref-find-matches id 'regexp))
+     (elisp--xref-find-matches id #'xref-collect-matches))
     (`apropos
      (elisp--xref-find-apropos id))))
 
@@ -654,7 +654,7 @@ It can be quoted, or be inside a quoted form."
 
 (defvar package-user-dir)
 
-(defun elisp--xref-find-matches (symbol kind)
+(defun elisp--xref-find-matches (symbol fun)
   (let* ((dirs (sort
                 (mapcar
                  (lambda (dir)
@@ -673,7 +673,7 @@ It can be quoted, or be inside a quoted form."
     (cl-mapcan
      (lambda (dir)
        (and (file-exists-p dir)
-            (xref-collect-matches symbol dir kind)))
+            (funcall fun symbol dir)))
      dirs)))
 
 (defun elisp--xref-find-apropos (regexp)
@@ -696,6 +696,24 @@ It can be quoted, or be inside a quoted form."
 (defun elisp--xref-identifier-completion-table ()
   elisp--xref-identifier-completion-table)
 
+(cl-defstruct (xref-elisp-location
+               (:constructor xref-make-elisp-location (symbol type file)))
+  "Location of an Emacs Lisp symbol definition."
+  symbol type file)
+
+(cl-defmethod xref-location-marker ((l xref-elisp-location))
+  (pcase-let (((cl-struct xref-elisp-location symbol type file) l))
+    (let ((buffer-point
+           (pcase type
+             (`defun (find-function-search-for-symbol symbol nil file))
+             ((or `defvar `defface)
+              (find-function-search-for-symbol symbol type file))
+             (`feature
+              (cons (find-file-noselect file) 1)))))
+      (with-current-buffer (car buffer-point)
+        (goto-char (or (cdr buffer-point) (point-min)))
+        (point-marker)))))
+
 ;;; Elisp Interaction mode
 
 (defvar lisp-interaction-mode-map
@@ -901,15 +919,17 @@ If CHAR is not a character, return nil."
 (defun elisp--preceding-sexp ()
   "Return sexp before the point."
   (let ((opoint (point))
-       ignore-quotes
+       (left-quote ?‘)
        expr)
     (save-excursion
       (with-syntax-table emacs-lisp-mode-syntax-table
-       ;; If this sexp appears to be enclosed in `...'
+       ;; If this sexp appears to be enclosed in `...' or ‘...’
        ;; then ignore the surrounding quotes.
-       (setq ignore-quotes
-             (or (eq (following-char) ?\')
-                 (eq (preceding-char) ?\')))
+       (cond ((eq (preceding-char) ?’)
+              (progn (forward-char -1) (setq opoint (point))))
+             ((or (eq (following-char) ?\')
+                  (eq (preceding-char) ?\'))
+              (setq left-quote ?\`)))
        (forward-sexp -1)
        ;; If we were after `?\e' (or similar case),
        ;; use the whole thing, not just the `e'.
@@ -933,7 +953,7 @@ If CHAR is not a character, return nil."
              (forward-sexp -1))))
 
        (save-restriction
-         (if (and ignore-quotes (eq (following-char) ?`))
+         (if (eq (following-char) left-quote)
               ;; address@hidden 30-Jul-1997: Skip ` in `variable' so
               ;; that the value is returned, not the name.
              (forward-char))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 60ea456..bf57770 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -204,7 +204,7 @@ nil means it has not yet been computed;
 use function `tags-table-files' to do so.")
 
 (defvar tags-completion-table nil
-  "Obarray of tag names defined in current tags table.")
+  "List of tag names defined in current tags table.")
 
 (defvar tags-included-tables nil
   "List of tags tables included by the current tags table.")
@@ -759,23 +759,19 @@ tags table and its (recursively) included tags tables."
   (or tags-completion-table
       ;; No cached value for this buffer.
       (condition-case ()
-         (let (current-table combined-table)
+         (let (tables cont)
            (message "Making tags completion table for %s..." buffer-file-name)
            (save-excursion
              ;; Iterate over the current list of tags tables.
-             (while (visit-tags-table-buffer (and combined-table t))
+             (while (visit-tags-table-buffer cont)
                ;; Find possible completions in this table.
-               (setq current-table (funcall tags-completion-table-function))
-               ;; Merge this buffer's completions into the combined table.
-               (if combined-table
-                   (mapatoms
-                    (lambda (sym) (intern (symbol-name sym) combined-table))
-                    current-table)
-                 (setq combined-table current-table))))
+                (push (funcall tags-completion-table-function) tables)
+                (setq cont t)))
            (message "Making tags completion table for %s...done"
                     buffer-file-name)
            ;; Cache the result in a buffer-local variable.
-           (setq tags-completion-table combined-table))
+           (setq tags-completion-table
+                  (nreverse (delete-dups (apply #'nconc tables)))))
        (quit (message "Tags completion table construction aborted.")
              (setq tags-completion-table nil)))))
 
@@ -1256,7 +1252,7 @@ buffer-local values of tags table format variables."
 
 
 (defun etags-tags-completion-table () ; Doc string?
-  (let ((table (make-vector 511 0))
+  (let (table
        (progress-reporter
         (make-progress-reporter
          (format "Making tags completion table for %s..." buffer-file-name)
@@ -1276,7 +1272,7 @@ buffer-local values of tags table format variables."
 \\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\
 \\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n"
              nil t)
-       (intern (prog1 (if (match-beginning 5)
+       (push   (prog1 (if (match-beginning 5)
                           ;; There is an explicit tag name.
                           (buffer-substring (match-beginning 5) (match-end 5))
                         ;; No explicit tag name.  Best guess.
@@ -1355,9 +1351,16 @@ hits the start of file."
            pat (concat (if (eq selective-display t)
                            "\\(^\\|\^m\\)" "^")
                        (regexp-quote (car tag-info))))
-      ;; The character position in the tags table is 0-origin.
+      ;; The character position in the tags table is 0-origin and counts CRs.
       ;; Convert it to a 1-origin Emacs character position.
-      (if startpos (setq startpos (1+ startpos)))
+      (when startpos
+        (setq startpos (1+ startpos))
+        (when (and line
+                   (eq 1 (coding-system-eol-type buffer-file-coding-system)))
+          ;; Act as if CRs were elided from all preceding lines.
+          ;; Although this doesn't always give exactly the correct position,
+          ;; it does typically improve the guess.
+          (setq startpos (- startpos (1- line)))))
       ;; If no char pos was given, try the given line number.
       (or startpos
          (if line
@@ -1625,7 +1628,8 @@ Point should be just after a string that matches TAG."
   ;; Look at the comment of the make_tag function in lib-src/etags.c for
   ;; a textual description of the four rules.
   (and (string-match "^[^ \t()=,;]+$" tag) ;rule #1
-       (looking-at "[ \t()=,;]?\177")  ;rules #2 and #4
+       ;; Rules #2 and #4, and a check that there's no explicit name.
+       (looking-at "[ \t()=,;]?\177\\(?:[0-9]+\\)?,\\(?:[0-9]+\\)?$")
        (save-excursion
         (backward-char (1+ (length tag)))
         (looking-at "[\n \t()=,;]")))) ;rule #3
@@ -2083,19 +2087,18 @@ for \\[find-tag] (which see)."
 (defun etags-xref-find (action id)
   (pcase action
     (`definitions (etags--xref-find-definitions id))
-    (`references (etags--xref-find-matches id 'symbol))
-    (`matches (etags--xref-find-matches id 'regexp))
+    (`references
+     (etags--xref-find-matches id #'xref-collect-references))
+    (`matches
+     (etags--xref-find-matches id #'xref-collect-matches))
     (`apropos (etags--xref-find-definitions id t))))
 
-(defun etags--xref-find-matches (input kind)
+(defun etags--xref-find-matches (input fun)
   (let ((dirs (if tags-table-list
                   (mapcar #'file-name-directory tags-table-list)
                 ;; If no tags files are loaded, prompt for the dir.
                 (list (read-directory-name "In directory: " nil nil t)))))
-    (cl-mapcan
-     (lambda (dir)
-       (xref-collect-matches input dir kind))
-     dirs)))
+    (cl-mapcan (lambda (dir) (funcall fun input dir)) dirs)))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
   ;; This emulates the behaviour of `find-tag-in-order' but instead of
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 6264d3b..0fde4f4 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -900,9 +900,11 @@ Can be overridden by the value of 
`font-lock-maximum-decoration'.")
   ;; type :: word
   ;; type, stuff :: word
   ;; type, bind(c) :: word
+  ;; type, extends(stuff) :: word
   ;; NOT "type ("
   "\\_<\\(type\\)\\_>\\(?:\\(?:[^()\n]*\\|\
-.*,[ \t]*bind[ \t]*([ \t]*c[ \t]*)[ \t]*\\)::\\)?[ 
\t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
+.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*)[ \t]*\\)::\\)?\
+[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
   "Regexp matching the definition of a derived type.")
 
 (defconst f90-typeis-re
@@ -1113,7 +1115,7 @@ For fixed format code, use `fortran-mode'.
  indented line.
 \\[f90-indent-subprogram] indents the current subprogram.
 
-Type `? or `\\[help-command] to display a list of built-in\
+Type \\=`? or \\=`\\[help-command] to display a list of built-in\
  abbrevs for F90 keywords.
 
 Key definitions:
@@ -1450,7 +1452,7 @@ if all else fails."
     (not (or (looking-at "end")
              (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
 \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
-block\\|critical\\)\\_>")
+block\\|critical\\|enum\\)\\_>")
              (looking-at "\\(program\\|\\(?:sub\\)?module\\|\
 \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>")
              (looking-at "\\(contains\\|\\(?:\\sw\\|\\s_\\)+[ \t]*:\\)")
@@ -2267,7 +2269,7 @@ Leave point at the end of line."
 ;; Abbrevs and keywords.
 
 (defun f90-abbrev-start ()
-  "Typing `\\[help-command] or `? lists all the F90 abbrevs.
+  "Typing \\=`\\[help-command] or \\=`? lists all the F90 abbrevs.
 Any other key combination is executed normally."
   (interactive "*")
   (self-insert-command 1)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 048fa11..6981d38 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -992,58 +992,7 @@ to specify a command to run."
                                   grep-find-command)))
            (compilation-start regexp 'grep-mode))
       (setq dir (file-name-as-directory (expand-file-name dir)))
-      (require 'find-dired)            ; for `find-name-arg'
-      (let ((command (grep-expand-template
-                     grep-find-template
-                     regexp
-                     (concat (shell-quote-argument "(")
-                             " " find-name-arg " "
-                             (mapconcat
-                              #'shell-quote-argument
-                              (split-string files)
-                              (concat " -o " find-name-arg " "))
-                             " "
-                             (shell-quote-argument ")"))
-                     dir
-                     (concat
-                      (and grep-find-ignored-directories
-                           (concat "-type d "
-                                   (shell-quote-argument "(")
-                                   ;; we should use shell-quote-argument here
-                                   " -path "
-                                   (mapconcat
-                                    #'(lambda (ignore)
-                                        (cond ((stringp ignore)
-                                               (shell-quote-argument
-                                                (concat "*/" ignore)))
-                                              ((consp ignore)
-                                               (and (funcall (car ignore) dir)
-                                                    (shell-quote-argument
-                                                     (concat "*/"
-                                                             (cdr ignore)))))))
-                                    grep-find-ignored-directories
-                                    " -o -path ")
-                                   " "
-                                   (shell-quote-argument ")")
-                                   " -prune -o "))
-                      (and grep-find-ignored-files
-                           (concat (shell-quote-argument "!") " -type d "
-                                   (shell-quote-argument "(")
-                                   ;; we should use shell-quote-argument here
-                                   " -name "
-                                   (mapconcat
-                                    #'(lambda (ignore)
-                                        (cond ((stringp ignore)
-                                               (shell-quote-argument ignore))
-                                              ((consp ignore)
-                                               (and (funcall (car ignore) dir)
-                                                    (shell-quote-argument
-                                                     (cdr ignore))))))
-                                    grep-find-ignored-files
-                                    " -o -name ")
-                                   " "
-                                   (shell-quote-argument ")")
-                                   " -prune -o "))))))
+      (let ((command (rgrep-default-command regexp files dir)))
        (when command
          (if confirm
              (setq command
@@ -1056,6 +1005,61 @@ to specify a command to run."
          (if (eq next-error-last-buffer (current-buffer))
              (setq default-directory dir)))))))
 
+(defun rgrep-default-command (regexp files dir)
+  "Compute the command for \\[rgrep] to use by default."
+  (require 'find-dired)      ; for `find-name-arg'
+  (grep-expand-template
+   grep-find-template
+   regexp
+   (concat (shell-quote-argument "(")
+           " " find-name-arg " "
+           (mapconcat
+            #'shell-quote-argument
+            (split-string files)
+            (concat " -o " find-name-arg " "))
+           " "
+           (shell-quote-argument ")"))
+   dir
+   (concat
+    (and grep-find-ignored-directories
+         (concat "-type d "
+                 (shell-quote-argument "(")
+                 ;; we should use shell-quote-argument here
+                 " -path "
+                 (mapconcat
+                  #'(lambda (ignore)
+                      (cond ((stringp ignore)
+                             (shell-quote-argument
+                              (concat "*/" ignore)))
+                            ((consp ignore)
+                             (and (funcall (car ignore) dir)
+                                  (shell-quote-argument
+                                   (concat "*/"
+                                           (cdr ignore)))))))
+                  grep-find-ignored-directories
+                  " -o -path ")
+                 " "
+                 (shell-quote-argument ")")
+                 " -prune -o "))
+    (and grep-find-ignored-files
+         (concat (shell-quote-argument "!") " -type d "
+                 (shell-quote-argument "(")
+                 ;; we should use shell-quote-argument here
+                 " -name "
+                 (mapconcat
+                  #'(lambda (ignore)
+                      (cond ((stringp ignore)
+                             (shell-quote-argument ignore))
+                            ((consp ignore)
+                             (and (funcall (car ignore) dir)
+                                  (shell-quote-argument
+                                   (cdr ignore))))))
+                  grep-find-ignored-files
+                  " -o -name ")
+                 " "
+                 (shell-quote-argument ")")
+                 " -prune -o ")))))
+
 ;;;###autoload
 (defun zrgrep (regexp &optional files dir confirm template)
   "Recursively grep for REGEXP in gzipped FILES in tree rooted at DIR.
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 44d84d6..8e30aa2 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -742,8 +742,8 @@ The actions that can be performed are listed in 
`idlwave-indent-action-table'."
 
 (defcustom idlwave-abbrev-start-char "\\"
   "A single character string used to start abbreviations in abbrev mode.
-Possible characters to chose from: ~`\%
-or even '?'.  '.' is not a good choice because it can make structure
+Possible characters to choose from: ~\\=`\%
+or even ‘?’.  ‘.’ is not a good choice because it can make structure
 field names act like abbrevs in certain circumstances.
 
 Changes to this in `idlwave-mode-hook' will have no effect.  Instead a user
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index e4d16eb..537b180 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -921,7 +921,7 @@ See `sh-feature'.")
      (:foreground "magenta"))
     (t
      (:weight bold)))
-  "Face to show quoted execs like `blabla`."
+  "Face to show quoted execs like \\=`blabla\\=`."
   :group 'sh-indentation)
 (define-obsolete-face-alias 'sh-heredoc-face 'sh-heredoc "22.1")
 (defvar sh-heredoc-face 'sh-heredoc)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 4b0cb0f..11b7561 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -597,11 +597,11 @@ Set to 0 to get them list right under containing block."
   "How to treat macro expansions in a declaration.
 If nil, indent as:
        input [31:0] a;
-       input        `CP;
+       input        \\=`CP;
        output       c;
 If non nil, treat as:
        input [31:0] a;
-       input `CP    ;
+       input \\=`CP    ;
        output       c;"
   :group 'verilog-mode-indent
   :type 'boolean)
@@ -628,7 +628,7 @@ Set to 0 to get such code to start at the left side of the 
screen."
 (put 'verilog-indent-level-behavioral 'safe-local-variable 'integerp)
 
 (defcustom verilog-indent-level-directive 1
-  "Indentation to add to each level of `ifdef declarations.
+  "Indentation to add to each level of \\=`ifdef declarations.
 Set to 0 to have all directives start at the left side of the screen."
   :group 'verilog-mode-indent
   :type 'integer)
@@ -733,8 +733,8 @@ file referenced.  If false, this is not supported."
 
 (defcustom verilog-auto-declare-nettype nil
   "Non-nil specifies the data type to use with `verilog-auto-input' etc.
-Set this to \"wire\" if the Verilog code uses \"`default_nettype
-none\".  Note using `default_nettype none isn't recommended practice; this
+Set this to \"wire\" if the Verilog code uses \"\\=`default_nettype
+none\".  Note using \\=`default_nettype none isn't recommended practice; this
 mode is experimental."
   :version "24.1"  ;; rev670
   :group 'verilog-mode-actions
@@ -3670,7 +3670,7 @@ Variables controlling indentation/edit style:
    Set to 0 to get such code to lined up underneath the task or
    function keyword.
  `verilog-indent-level-directive'     (default 1)
-   Indentation of `ifdef/`endif blocks.
+   Indentation of \\=`ifdef/\\=`endif blocks.
  `verilog-cexp-indent'              (default 1)
    Indentation of Verilog statements broken across lines i.e.:
       if (a)
@@ -9235,9 +9235,9 @@ Optionally associate it with the specified enumeration 
ENUMNAME."
           (add-to-list (make-local-variable enumvar) defname)))))
 
 (defun verilog-read-defines (&optional filename recurse subcall)
-  "Read `defines and parameters for the current file, or optional FILENAME.
+  "Read \\=`defines and parameters for the current file, or optional FILENAME.
 If the filename is provided, `verilog-library-flags' will be used to
-resolve it.  If optional RECURSE is non-nil, recurse through `includes.
+resolve it.  If optional RECURSE is non-nil, recurse through \\=`includes.
 
 Parameters must be simple assignments to constants, or have their own
 \"parameter\" label rather than a list of parameters.  Thus:
@@ -9320,8 +9320,8 @@ warning message, you need to add to your init file:
            (forward-comment 99999)))))))
 
 (defun verilog-read-includes ()
-  "Read `includes for the current file.
-This will find all of the `includes which are at the beginning of lines,
+  "Read \\=`includes for the current file.
+This will find all of the \\=`includes which are at the beginning of lines,
 ignoring any ifdefs or multiline comments around them.
 `verilog-read-defines' is then performed on the current and each included
 file.
@@ -9343,11 +9343,11 @@ variable over and over when many modules are compiled 
together, put a test
 around the inside each include file:
 
 foo.v (an include file):
-       `ifdef _FOO_V   // include if not already included
-       `else
-       `define _FOO_V
+       \\=`ifdef _FOO_V        // include if not already included
+       \\=`else
+       \\=`define _FOO_V
        ... contents of file
-       `endif // _FOO_V"
+       \\=`endif // _FOO_V"
   ;;slow:  (verilog-read-defines nil t)
   (save-excursion
     (verilog-getopt-flags)
@@ -11184,7 +11184,7 @@ Limitations:
   `verilog-library-extensions', and being found in the same directory, or
   by changing the variable `verilog-library-flags' or
   `verilog-library-directories'.  Macros `modname are translated through the
-  vh-{name} Emacs variable, if that is not found, it just ignores the `.
+  vh-{name} Emacs variable, if that is not found, it just ignores the \\=`.
 
   In templates you must have one signal per line, ending in a ), or ));,
   and have proper () nesting, including a final ); to end the template.
@@ -12754,8 +12754,8 @@ Limitations:
   lists.  AUTOSENSE will thus exclude them, and add a /*memory or*/ comment.
 
 Constant signals:
-  AUTOSENSE cannot always determine if a `define is a constant or a signal
-  (it could be in an include file for example).  If a `define or other signal
+  AUTOSENSE cannot always determine if a \\=`define is a constant or a signal
+  (it could be in an include file for example).  If a \\=`define or other 
signal
   is put into the AUTOSENSE list and is not desired, use the AUTO_CONSTANT
   declaration anywhere in the module (parenthesis are required):
 
@@ -12870,8 +12870,8 @@ them to a one.
 AUTORESET may try to reset arrays or structures that cannot be
 reset by a simple assignment, resulting in compile errors.  This
 is a feature to be taken as a hint that you need to reset these
-signals manually (or put them into a \"`ifdef NEVER signal<=`0;
-`endif\" so Verilog-Mode ignores them.)
+signals manually (or put them into a \"\\=`ifdef NEVER signal<=\\=`0;
+\\=`endif\" so Verilog-Mode ignores them.)
 
 An example:
 
@@ -13041,27 +13041,27 @@ Typing \\[verilog-auto] will make this into:
 
 (defun verilog-auto-undef ()
   "Expand AUTOUNDEF statements, as part of \\[verilog-auto].
-Take any `defines since the last AUTOUNDEF in the current file
-and create `undefs for them.  This is used to insure that
-file-local defines do not pollute the global `define name space.
+Take any \\=`defines since the last AUTOUNDEF in the current file
+and create \\=`undefs for them.  This is used to insure that
+file-local defines do not pollute the global \\=`define name space.
 
 Limitations:
-  AUTOUNDEF presumes any identifier following `define is the
-  name of a define.  Any `ifdefs are ignored.
+  AUTOUNDEF presumes any identifier following \\=`define is the
+  name of a define.  Any \\=`ifdefs are ignored.
 
-  AUTOUNDEF suppresses creating an `undef for any define that was
-  `undefed before the AUTOUNDEF.  This may be used to work around
-  the ignoring of `ifdefs as shown below.
+  AUTOUNDEF suppresses creating an \\=`undef for any define that was
+  \\=`undefed before the AUTOUNDEF.  This may be used to work around
+  the ignoring of \\=`ifdefs as shown below.
 
 An example:
 
-       `define XX_FOO
-       `define M_BAR(x)
-       `define M_BAZ
+       \\=`define XX_FOO
+       \\=`define M_BAR(x)
+       \\=`define M_BAZ
        ...
-       `ifdef NEVER
-         `undef M_BAZ  // Emacs will see this and not `undef M_BAZ
-       `endif
+       \\=`ifdef NEVER
+         \\=`undef M_BAZ       // Emacs will see this and not \\=`undef M_BAZ
+       \\=`endif
        ...
        /*AUTOUNDEF*/
 
@@ -13070,8 +13070,8 @@ Typing \\[verilog-auto] will make this into:
        ...
        /*AUTOUNDEF*/
        // Beginning of automatic undefs
-       `undef XX_FOO
-       `undef M_BAR
+       \\=`undef XX_FOO
+       \\=`undef M_BAR
        // End of automatics
 
 You may also provide an optional regular expression, in which case only
@@ -13466,12 +13466,12 @@ Using \\[describe-function], see also:
     `verilog-auto-reset'        for AUTORESET flop resets
     `verilog-auto-sense'        for AUTOSENSE or AS always sensitivity lists
     `verilog-auto-tieoff'       for AUTOTIEOFF output tieoffs
-    `verilog-auto-undef'        for AUTOUNDEF `undef of local `defines
+    `verilog-auto-undef'        for AUTOUNDEF \\=`undef of local \\=`defines
     `verilog-auto-unused'       for AUTOUNUSED unused inputs/inouts
     `verilog-auto-wire'         for AUTOWIRE instantiation wires
 
-    `verilog-read-defines'      for reading `define values
-    `verilog-read-includes'     for reading `includes
+    `verilog-read-defines'      for reading \\=`define values
+    `verilog-read-includes'     for reading \\=`includes
 
 If you have bugs with these autos, please file an issue at
 URL `http://www.veripool.org/verilog-mode' or contact the AUTOAUTHOR
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index eb23494..f85f4c4 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8270,7 +8270,7 @@ case fixing to a region.  Calls functions 
`vhdl-indent-buffer',
   (setq end (save-excursion (goto-char end) (point-marker)))
   (save-excursion ; remove DOS EOL characters in UNIX file
     (goto-char beg)
-    (while (search-forward "
" nil t)
+    (while (search-forward "\r" nil t)
       (replace-match "" nil t)))
   (when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t))
   (when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end))
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 3bb4fde..d6f6ba8 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -143,38 +143,13 @@ actual location is not known.")
 
 (cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)")
 
-;; This should be in elisp-mode.el, but it's preloaded, and we can't
-;; preload defclass and defmethod (at least, not yet).
-(defclass xref-elisp-location (xref-location)
-  ((symbol :type symbol :initarg :symbol)
-   (type   :type symbol :initarg :type)
-   (file   :type string :initarg :file
-           :reader xref-location-group))
-  :documentation "Location of an Emacs Lisp symbol definition.")
-
-(defun xref-make-elisp-location (symbol type file)
-  (make-instance 'xref-elisp-location :symbol symbol :type type :file file))
-
-(cl-defmethod xref-location-marker ((l xref-elisp-location))
-  (with-slots (symbol type file) l
-    (let ((buffer-point
-           (pcase type
-             (`defun (find-function-search-for-symbol symbol nil file))
-             ((or `defvar `defface)
-              (find-function-search-for-symbol symbol type file))
-             (`feature
-              (cons (find-file-noselect file) 1)))))
-      (with-current-buffer (car buffer-point)
-        (goto-char (or (cdr buffer-point) (point-min)))
-        (point-marker)))))
-
 
 ;;; Cross-reference
 
 (defclass xref--xref ()
   ((description :type string :initarg :description
                 :reader xref--xref-description)
-   (location :type xref-location :initarg :location
+   (location :initarg :location
              :reader xref--xref-location))
   :comment "An xref is used to display and locate constructs like
 variables or functions.")
@@ -283,13 +258,25 @@ backward."
   :type 'integer
   :version "25.1")
 
-(defcustom xref-prompt-for-identifier nil
-  "When non-nil, always prompt for the identifier name.
+(defcustom xref-prompt-for-identifier '(not xref-find-definitions
+                                            xref-find-definitions-other-window
+                                            xref-find-definitions-other-frame)
+  "When t, always prompt for the identifier name.
+
+When nil, prompt only when there's no value at point we can use,
+or when the command has been called with the prefix argument.
 
-Otherwise, only prompt when there's no value at point we can use,
-or when the command has been called with the prefix argument."
+Otherwise, it's a list of xref commands which will prompt
+anyway (the value at point, if any, will be used as the default).
+
+If the list starts with `not', the meaning of the rest of the
+elements is negated."
   :type '(choice (const :tag "always" t)
-                 (const :tag "auto" nil))
+                 (const :tag "auto" nil)
+                 (set :menu-tag "command specific" :tag "commands"
+                     :value (not)
+                     (const :tag "Except" not)
+                     (repeat :inline t (symbol :tag "command"))))
   :version "25.1")
 
 (defcustom xref-pulse-on-jump t
@@ -621,10 +608,18 @@ Return an alist of the form ((FILENAME . (XREF ...)) 
...)."
                `((window . ,window)
                  (temporary-buffers . ,tb)))))))
 
+(defun xref--prompt-p (command)
+  (or (eq xref-prompt-for-identifier t)
+      (if (eq (car xref-prompt-for-identifier) 'not)
+          (not (memq command (cdr xref-prompt-for-identifier)))
+        (memq command xref-prompt-for-identifier))))
+
 (defun xref--read-identifier (prompt)
   "Return the identifier at point or read it from the minibuffer."
   (let ((id (funcall xref-identifier-at-point-function)))
-    (cond ((or current-prefix-arg xref-prompt-for-identifier (not id))
+    (cond ((or current-prefix-arg
+               (not id)
+               (xref--prompt-p this-command))
            (completing-read prompt
                             (funcall xref-identifier-completion-table-function)
                             nil nil nil
@@ -667,6 +662,7 @@ With prefix argument, prompt for the identifier."
 ;;;###autoload
 (defun xref-find-regexp (regexp)
   "Find all matches for REGEXP."
+  ;; FIXME: Prompt for directory.
   (interactive (list (xref--read-identifier "Find regexp: ")))
   (xref--show-xrefs regexp 'matches regexp nil))
 
@@ -724,29 +720,59 @@ and just use etags."
 (declare-function semantic-symref-find-references-by-name "semantic/symref")
 (declare-function semantic-symref-find-text "semantic/symref")
 (declare-function semantic-find-file-noselect "semantic/fw")
+(declare-function rgrep-default-command "grep")
 
-(defun xref-collect-matches (input dir &optional kind)
-  "Collect KIND matches for INPUT inside DIR according.
-KIND can be `symbol', `regexp' or nil, the last of which means
-literal matches.  This function uses the Semantic Symbol
-Reference API, see `semantic-symref-find-references-by-name' for
-details on which tools are used, and when."
+(defun xref-collect-references (symbol dir)
+  "Collect references to SYMBOL inside DIR.
+This function uses the Semantic Symbol Reference API, see
+`semantic-symref-find-references-by-name' for details on which
+tools are used, and when."
+  (cl-assert (directory-name-p dir))
   (require 'semantic/symref)
   (defvar semantic-symref-tool)
-  (cl-assert (directory-name-p dir))
-  (when (null kind)
-    (setq input (regexp-quote input)))
   (let* ((default-directory dir)
          (semantic-symref-tool 'detect)
-         (res (if (eq kind 'symbol)
-                  (semantic-symref-find-references-by-name input 'subdirs)
-                (semantic-symref-find-text (xref--regexp-to-extended input)
-                                           'subdirs)))
+         (res (semantic-symref-find-references-by-name symbol 'subdirs))
          (hits (and res (oref res :hit-lines)))
          (orig-buffers (buffer-list)))
     (unwind-protect
         (delq nil
-              (mapcar (lambda (hit) (xref--collect-match hit input kind)) 
hits))
+              (mapcar (lambda (hit) (xref--collect-match
+                                hit (format "\\_<%s\\_>" (regexp-quote 
symbol))))
+                      hits))
+      (mapc #'kill-buffer
+            (cl-set-difference (buffer-list) orig-buffers)))))
+
+(defun xref-collect-matches (regexp dir)
+  "Collect matches for REGEXP inside DIR using rgrep."
+  (cl-assert (directory-name-p dir))
+  (require 'semantic/fw)
+  (grep-compute-defaults)
+  (defvar grep-find-template)
+  (let* ((grep-find-template (replace-regexp-in-string "-e " "-E "
+                                                       grep-find-template t t))
+         (command (rgrep-default-command (xref--regexp-to-extended regexp)
+                                         "*.*" dir))
+         (orig-buffers (buffer-list))
+         (buf (get-buffer-create " *xref-grep*"))
+         (grep-re (caar grep-regexp-alist))
+         hits)
+    ;; http://debbugs.gnu.org/20719
+    ;; We want to pass the exact directory to `find', because then
+    ;; `grep' output features absolute file names.
+    (when (string-match "find \\(\\.\\)" command)
+      (setq command (replace-match (shell-quote-argument dir) t t command 1)))
+    (with-current-buffer buf
+      (erase-buffer)
+      (when (eq (call-process-shell-command command nil t) 0)
+        (goto-char (point-min))
+        (while (re-search-forward grep-re nil t)
+          (push (cons (string-to-number (match-string 2))
+                      (match-string 1))
+                hits))))
+    (unwind-protect
+        (delq nil
+              (mapcar (lambda (hit) (xref--collect-match hit regexp)) hits))
       (mapc #'kill-buffer
             (cl-set-difference (buffer-list) orig-buffers)))))
 
@@ -768,18 +794,15 @@ details on which tools are used, and when."
                (match-string 1 str)))))
    str t t))
 
-(defun xref--collect-match (hit input kind)
+(defun xref--collect-match (hit regexp)
   (pcase-let* ((`(,line . ,file) hit)
                (buf (or (find-buffer-visiting file)
-                        (semantic-find-file-noselect file)))
-               (input (if (eq kind 'symbol)
-                          (format "\\_<%s\\_>" (regexp-quote input))
-                        input)))
+                        (semantic-find-file-noselect file))))
     (with-current-buffer buf
       (save-excursion
         (goto-char (point-min))
         (forward-line (1- line))
-        (when (re-search-forward input (line-end-position) t)
+        (when (re-search-forward regexp (line-end-position) t)
           (goto-char (match-beginning 0))
           (xref-make (buffer-substring
                       (line-beginning-position)
diff --git a/lisp/replace.el b/lisp/replace.el
index 8e71615..1bf1343 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -136,6 +136,16 @@ See `replace-regexp' and `query-replace-regexp-eval'.")
 (defun query-replace-descr (string)
   (mapconcat 'isearch-text-char-description string ""))
 
+(defun query-replace--split-string (string)
+  "Split string STRING at a character with property `separator'"
+  (let* ((length (length string))
+         (split-pos (text-property-any 0 length 'separator t string)))
+    (if (not split-pos)
+        (substring-no-properties string)
+      (cl-assert (not (text-property-any (1+ split-pos) length 'separator t 
string)))
+      (cons (substring-no-properties string 0 split-pos)
+            (substring-no-properties string (1+ split-pos) length)))))
+
 (defun query-replace-read-from (prompt regexp-flag)
   "Query and return the `from' argument of a query-replace operation.
 The return value can also be a pair (FROM . TO) indicating that the user
@@ -174,32 +184,30 @@ wants to replace FROM with TO."
                  (read-regexp prompt nil 'query-replace-from-to-history)
                (read-from-minibuffer
                 prompt nil nil nil 'query-replace-from-to-history
-                (car (if regexp-flag regexp-search-ring search-ring)) t)))))
+                (car (if regexp-flag regexp-search-ring search-ring)) t))))
+           (to))
       (if (and (zerop (length from)) query-replace-defaults)
          (cons (caar query-replace-defaults)
                (query-replace-compile-replacement
                 (cdar query-replace-defaults) regexp-flag))
-       (let* ((to (if (and (string-match separator from)
-                           (get-text-property (match-beginning 0) 'separator 
from))
-                      (substring-no-properties from (match-end 0))))
-              (from (if to (substring-no-properties from 0 (match-beginning 0))
-                      (substring-no-properties from))))
-         (add-to-history query-replace-from-history-variable from nil t)
-         ;; Warn if user types \n or \t, but don't reject the input.
-         (and regexp-flag
-              (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" 
from)
-              (let ((match (match-string 3 from)))
-                (cond
-                 ((string= match "\\n")
-                  (message "Note: `\\n' here doesn't match a newline; to do 
that, type C-q C-j instead"))
-                 ((string= match "\\t")
-                  (message "Note: `\\t' here doesn't match a tab; to do that, 
just type TAB")))
-                (sit-for 2)))
-         (if (not to)
-             from
-           (add-to-history query-replace-to-history-variable to nil t)
-           (add-to-history 'query-replace-defaults (cons from to) nil t)
-           (cons from (query-replace-compile-replacement to regexp-flag))))))))
+        (setq from (query-replace--split-string from))
+        (when (consp from) (setq to (cdr from) from (car from)))
+        (add-to-history query-replace-from-history-variable from nil t)
+        ;; Warn if user types \n or \t, but don't reject the input.
+        (and regexp-flag
+             (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" 
from)
+             (let ((match (match-string 3 from)))
+               (cond
+                ((string= match "\\n")
+                 (message "Note: `\\n' here doesn't match a newline; to do 
that, type C-q C-j instead"))
+                ((string= match "\\t")
+                 (message "Note: `\\t' here doesn't match a tab; to do that, 
just type TAB")))
+               (sit-for 2)))
+        (if (not to)
+            from
+          (add-to-history query-replace-to-history-variable to nil t)
+          (add-to-history 'query-replace-defaults (cons from to) nil t)
+          (cons from (query-replace-compile-replacement to regexp-flag)))))))
 
 (defun query-replace-compile-replacement (to regexp-flag)
   "Maybe convert a regexp replacement TO to Lisp.
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 1363422..d23488b 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -481,7 +481,7 @@ This allows for context-sensitive checking whether pairing 
is appropriate.")
 Each alist element, which looks like (ELEMENT ...), is passed to
 `skeleton-insert' with no interactor.  Variable `str' does nothing.
 
-Elements might be (?` ?` _ \"''\"), (?\\( ?  _ \" )\") or (?{ \\n > _ \\n ?} 
>).")
+Elements might be (?\\=` ?\\=` _ \"''\"), (?\\( ?  _ \" )\") or (?{ \\n > _ 
\\n ?} >).")
 
 (defvar skeleton-pair-default-alist '((?( _ ?)) (?\))
                                      (?[ _ ?]) (?\])
diff --git a/lisp/startup.el b/lisp/startup.el
index a24198b..3c9ada6 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -47,6 +47,9 @@ visiting the file or directory that the string specifies.  If 
the
 value is a function, call it with no arguments and switch to the buffer
 that it returns.  If t, open the `*scratch*' buffer.
 
+When `initial-buffer-choice' is non-nil, the startup screen is
+inhibited.
+
 If you use `emacsclient' with no target file, then it obeys any
 string or function value that this variable has."
   :type '(choice
@@ -2146,238 +2149,238 @@ A fancy display is used on graphic displays, normal 
otherwise."
   (See the node Pure Storage in the Lisp manual for details.)"
      :warning))
 
-  (let ((file-count 0)
-        (command-line-args-left args-left)
-       first-file-buffer)
-    (when command-line-args-left
-      ;; We have command args; process them.
-      (let ((dir command-line-default-directory)
-           tem
-           ;; This approach loses for "-batch -L DIR --eval "(require foo)",
-           ;; if foo is intended to be found in DIR.
-           ;;
-           ;; The directories listed in --directory/-L options will *appear*
-           ;; at the front of `load-path' in the order they appear on the
-           ;; command-line.  We cannot do this by *placing* them at the front
-           ;; in the order they appear, so we need this variable to hold them,
-           ;; temporarily.
-           ;;
-           ;; To DTRT we keep track of the splice point and modify `load-path'
-           ;; straight away upon any --directory/-L option.
-           splice
-           just-files ;; t if this follows the magic -- option.
-           ;; This includes our standard options' long versions
-           ;; and long versions of what's on command-switch-alist.
-           (longopts
-           (append '("--funcall" "--load" "--insert" "--kill"
-                     "--directory" "--eval" "--execute" "--no-splash"
-                     "--find-file" "--visit" "--file" "--no-desktop")
-                   (mapcar (lambda (elt) (concat "-" (car elt)))
-                            command-switch-alist)))
-           (line 0)
-           (column 0))
-
-       ;; Add the long X options to longopts.
-       (dolist (tem command-line-x-option-alist)
-         (if (string-match "^--" (car tem))
-            (push (car tem) longopts)))
-
-       ;; Add the long NS options to longopts.
-       (dolist (tem command-line-ns-option-alist)
-         (if (string-match "^--" (car tem))
-             (push (list (car tem)) longopts)))
-
-       ;; Loop, processing options.
-       (while command-line-args-left
-         (let* ((argi (car command-line-args-left))
-                (orig-argi argi)
-                argval completion)
-           (setq command-line-args-left (cdr command-line-args-left))
-
-           ;; Do preliminary decoding of the option.
-           (if just-files
-               ;; After --, don't look for options; treat all args as files.
-               (setq argi "")
-             ;; Convert long options to ordinary options
-             ;; and separate out an attached option argument into argval.
-             (when (string-match "\\`\\(--[^=]*\\)=" argi)
-               (setq argval (substring argi (match-end 0))
-                     argi (match-string 1 argi)))
-             (when (string-match "\\`--?[^-]" orig-argi)
-               (setq completion (try-completion argi longopts))
-               (if (eq completion t)
-                   (setq argi (substring argi 1))
-                 (if (stringp completion)
-                  (let ((elt (member completion longopts)))
-                       (or elt
-                           (error "Option `%s' is ambiguous" argi))
-                       (setq argi (substring (car elt) 1)))
-                   (setq argval nil
-                         argi orig-argi)))))
-
-           ;; Execute the option.
-           (cond ((setq tem (assoc argi command-switch-alist))
-                  (if argval
-                      (let ((command-line-args-left
-                             (cons argval command-line-args-left)))
-                        (funcall (cdr tem) argi))
-                    (funcall (cdr tem) argi)))
-
-                 ((equal argi "-no-splash")
-                  (setq inhibit-startup-screen t))
-
-                 ((member argi '("-f"  ; what the manual claims
-                                 "-funcall"
-                                 "-e"))  ; what the source used to say
-                  (setq inhibit-startup-screen t)
-                  (setq tem (intern (or argval (pop command-line-args-left))))
-                  (if (commandp tem)
-                      (command-execute tem)
-                    (funcall tem)))
-
-                 ((member argi '("-eval" "-execute"))
-                  (setq inhibit-startup-screen t)
-                  (eval (read (or argval (pop command-line-args-left)))))
-
-                 ((member argi '("-L" "-directory"))
-                  ;; -L :/foo adds /foo to the _end_ of load-path.
-                  (let (append)
-                    (if (string-match-p
-                         (format "\\`%s" path-separator)
-                         (setq tem (or argval (pop command-line-args-left))))
-                        (setq tem (substring tem 1)
-                              append t))
-                    (setq tem (expand-file-name
-                               (command-line-normalize-file-name tem)))
-                    (cond (append (setq load-path
-                                        (append load-path (list tem)))
-                                  (if splice (setq splice load-path)))
-                          (splice (setcdr splice (cons tem (cdr splice)))
-                                  (setq splice (cdr splice)))
-                          (t (setq load-path (cons tem load-path)
-                                   splice load-path)))))
-
-                 ((member argi '("-l" "-load"))
-                  (let* ((file (command-line-normalize-file-name
-                                (or argval (pop command-line-args-left))))
-                         ;; Take file from default dir if it exists there;
-                         ;; otherwise let `load' search for it.
-                         (file-ex (expand-file-name file)))
-                    (when (file-exists-p file-ex)
-                      (setq file file-ex))
-                    (load file nil t)))
-
-                 ;; This is used to handle -script.  It's not clear
-                 ;; we need to document it (it is totally internal).
-                 ((member argi '("-scriptload"))
-                  (let* ((file (command-line-normalize-file-name
-                                (or argval (pop command-line-args-left))))
-                         ;; Take file from default dir.
-                         (file-ex (expand-file-name file)))
-                    (load file-ex nil t t)))
-
-                 ((equal argi "-insert")
-                  (setq inhibit-startup-screen t)
-                  (setq tem (or argval (pop command-line-args-left)))
-                  (or (stringp tem)
-                      (error "File name omitted from `-insert' option"))
-                  (insert-file-contents (command-line-normalize-file-name 
tem)))
-
-                 ((equal argi "-kill")
-                  (kill-emacs t))
-
-                 ;; This is for when they use --no-desktop with -q, or
-                 ;; don't load Desktop in their .emacs.  If desktop.el
-                 ;; _is_ loaded, it will handle this switch, and we
-                 ;; won't see it by the time we get here.
-                 ((equal argi "-no-desktop")
-                  (message "\"--no-desktop\" ignored because the Desktop 
package is not loaded"))
-
-                 ((string-match "^\\+[0-9]+\\'" argi)
-                  (setq line (string-to-number argi)))
-
-                 ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi)
-                  (setq line (string-to-number (match-string 1 argi))
-                        column (string-to-number (match-string 2 argi))))
-
-                 ((setq tem (assoc orig-argi command-line-x-option-alist))
-                  ;; Ignore X-windows options and their args if not using X.
-                  (setq command-line-args-left
-                        (nthcdr (nth 1 tem) command-line-args-left)))
-
-                 ((setq tem (assoc orig-argi command-line-ns-option-alist))
-                  ;; Ignore NS-windows options and their args if not using NS.
-                  (setq command-line-args-left
-                        (nthcdr (nth 1 tem) command-line-args-left)))
-
-                 ((member argi '("-find-file" "-file" "-visit"))
-                  (setq inhibit-startup-screen t)
-                  ;; An explicit option to specify visiting a file.
-                  (setq tem (or argval (pop command-line-args-left)))
-                  (unless (stringp tem)
-                    (error "File name omitted from `%s' option" argi))
-                  (setq file-count (1+ file-count))
-                  (let ((file (expand-file-name
-                               (command-line-normalize-file-name tem)
-                               dir)))
-                    (if (= file-count 1)
-                        (setq first-file-buffer (find-file file))
-                      (find-file-other-window file)))
-                  (unless (zerop line)
-                    (goto-char (point-min))
-                    (forward-line (1- line)))
-                  (setq line 0)
-                  (unless (< column 1)
-                    (move-to-column (1- column)))
-                  (setq column 0))
-
-                 ;; These command lines now have no effect.
-                 ((string-match "\\`--?\\(no-\\)?\\(uni\\|multi\\)byte$" argi)
-                  (display-warning 'initialization
-                                   (format "Ignoring obsolete arg %s" argi)))
-
-                 ((equal argi "--")
-                  (setq just-files t))
-                 (t
-                  ;; We have almost exhausted our options. See if the
-                  ;; user has made any other command-line options available
-                  (let ((hooks command-line-functions)
-                        (did-hook nil))
-                    (while (and hooks
-                                (not (setq did-hook (funcall (car hooks)))))
-                      (setq hooks (cdr hooks)))
-                    (if (not did-hook)
-                        ;; Presume that the argument is a file name.
-                        (progn
-                          (if (string-match "\\`-" argi)
-                              (error "Unknown option `%s'" argi))
-                          (unless initial-window-system
-                            (setq inhibit-startup-screen t))
-                          (setq file-count (1+ file-count))
-                          (let ((file
-                                 (expand-file-name
-                                  (command-line-normalize-file-name orig-argi)
-                                  dir)))
-                            (cond ((= file-count 1)
-                                   (setq first-file-buffer (find-file file)))
-                                  (inhibit-startup-screen
-                                   (find-file-other-window file))
-                                  (t (find-file file))))
-                          (unless (zerop line)
-                            (goto-char (point-min))
-                            (forward-line (1- line)))
-                          (setq line 0)
-                          (unless (< column 1)
-                            (move-to-column (1- column)))
-                          (setq column 0))))))
-           ;; In unusual circumstances, the execution of Lisp code due
-           ;; to command-line options can cause the last visible frame
-           ;; to be deleted.  In this case, kill emacs to avoid an
-           ;; abort later.
-           (unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
+  ;; `displayable-buffers' is a list of buffers that may be displayed,
+  ;; which includes files parsed from the command line arguments and
+  ;; `initial-buffer-choice'.  All of the display logic happens at the
+  ;; end of this `let'.  As files as processed from the command line
+  ;; arguments, their buffers are prepended to `displayable-buffers'
+  ;; but they are not displayed until command line parsing has
+  ;; finished.
+  (let ((displayable-buffers nil))
+    ;; This `let' processes the command line arguments.
+    (let ((command-line-args-left args-left))
+      (when command-line-args-left
+        ;; We have command args; process them.
+        (let* ((dir command-line-default-directory)
+               tem
+               ;; This approach loses for "-batch -L DIR --eval "(require 
foo)",
+               ;; if foo is intended to be found in DIR.
+               ;;
+               ;; The directories listed in --directory/-L options will 
*appear*
+               ;; at the front of `load-path' in the order they appear on the
+               ;; command-line.  We cannot do this by *placing* them at the 
front
+               ;; in the order they appear, so we need this variable to hold 
them,
+               ;; temporarily.
+               ;;
+               ;; To DTRT we keep track of the splice point and modify 
`load-path'
+               ;; straight away upon any --directory/-L option.
+               splice
+               just-files ;; t if this follows the magic -- option.
+               ;; This includes our standard options' long versions
+               ;; and long versions of what's on command-switch-alist.
+               (longopts
+                (append '("--funcall" "--load" "--insert" "--kill"
+                          "--directory" "--eval" "--execute" "--no-splash"
+                          "--find-file" "--visit" "--file" "--no-desktop")
+                        (mapcar (lambda (elt) (concat "-" (car elt)))
+                                command-switch-alist)))
+               (line 0)
+               (column 0)
+               ;; `process-file-arg' opens a file buffer for `name'
+               ;; without switching to the buffer, adds the buffer to
+               ;; `displayable-buffers', and puts the point at
+               ;; `line':`column'. `line' and `column' are both reset
+               ;; to zero when `process-file-arg' returns.
+               (process-file-arg
+                (lambda (name)
+                  (let* ((file (expand-file-name
+                                (command-line-normalize-file-name name)
+                                dir))
+                         (buf (find-file-noselect file)))
+                    (setq displayable-buffers (cons buf displayable-buffers))
+                    (with-current-buffer buf
+                      (unless (zerop line)
+                        (goto-char (point-min))
+                        (forward-line (1- line)))
+                      (setq line 0)
+                      (unless (< column 1)
+                        (move-to-column (1- column)))
+                      (setq column 0))))))
+
+          ;; Add the long X options to longopts.
+          (dolist (tem command-line-x-option-alist)
+            (if (string-match "^--" (car tem))
+                (push (car tem) longopts)))
+
+          ;; Add the long NS options to longopts.
+          (dolist (tem command-line-ns-option-alist)
+            (if (string-match "^--" (car tem))
+                (push (list (car tem)) longopts)))
+
+          ;; Loop, processing options.
+          (while command-line-args-left
+            (let* ((argi (car command-line-args-left))
+                   (orig-argi argi)
+                   argval completion)
+              (setq command-line-args-left (cdr command-line-args-left))
+
+              ;; Do preliminary decoding of the option.
+              (if just-files
+                  ;; After --, don't look for options; treat all args as files.
+                  (setq argi "")
+                ;; Convert long options to ordinary options
+                ;; and separate out an attached option argument into argval.
+                (when (string-match "\\`\\(--[^=]*\\)=" argi)
+                  (setq argval (substring argi (match-end 0))
+                        argi (match-string 1 argi)))
+                (when (string-match "\\`--?[^-]" orig-argi)
+                  (setq completion (try-completion argi longopts))
+                  (if (eq completion t)
+                      (setq argi (substring argi 1))
+                    (if (stringp completion)
+                        (let ((elt (member completion longopts)))
+                          (or elt
+                              (error "Option `%s' is ambiguous" argi))
+                          (setq argi (substring (car elt) 1)))
+                      (setq argval nil
+                            argi orig-argi)))))
+
+              ;; Execute the option.
+              (cond ((setq tem (assoc argi command-switch-alist))
+                     (if argval
+                         (let ((command-line-args-left
+                                (cons argval command-line-args-left)))
+                           (funcall (cdr tem) argi))
+                       (funcall (cdr tem) argi)))
+
+                    ((equal argi "-no-splash")
+                     (setq inhibit-startup-screen t))
+
+                    ((member argi '("-f"       ; what the manual claims
+                                    "-funcall"
+                                    "-e"))  ; what the source used to say
+                     (setq inhibit-startup-screen t)
+                     (setq tem (intern (or argval (pop 
command-line-args-left))))
+                     (if (commandp tem)
+                         (command-execute tem)
+                       (funcall tem)))
+
+                    ((member argi '("-eval" "-execute"))
+                     (setq inhibit-startup-screen t)
+                     (eval (read (or argval (pop command-line-args-left)))))
+
+                    ((member argi '("-L" "-directory"))
+                     ;; -L :/foo adds /foo to the _end_ of load-path.
+                     (let (append)
+                       (if (string-match-p
+                            (format "\\`%s" path-separator)
+                            (setq tem (or argval (pop 
command-line-args-left))))
+                           (setq tem (substring tem 1)
+                                 append t))
+                       (setq tem (expand-file-name
+                                  (command-line-normalize-file-name tem)))
+                       (cond (append (setq load-path
+                                           (append load-path (list tem)))
+                                     (if splice (setq splice load-path)))
+                             (splice (setcdr splice (cons tem (cdr splice)))
+                                     (setq splice (cdr splice)))
+                             (t (setq load-path (cons tem load-path)
+                                      splice load-path)))))
+
+                    ((member argi '("-l" "-load"))
+                     (let* ((file (command-line-normalize-file-name
+                                   (or argval (pop command-line-args-left))))
+                            ;; Take file from default dir if it exists there;
+                            ;; otherwise let `load' search for it.
+                            (file-ex (expand-file-name file)))
+                       (when (file-exists-p file-ex)
+                         (setq file file-ex))
+                       (load file nil t)))
+
+                    ;; This is used to handle -script.  It's not clear
+                    ;; we need to document it (it is totally internal).
+                    ((member argi '("-scriptload"))
+                     (let* ((file (command-line-normalize-file-name
+                                   (or argval (pop command-line-args-left))))
+                            ;; Take file from default dir.
+                            (file-ex (expand-file-name file)))
+                       (load file-ex nil t t)))
+
+                    ((equal argi "-insert")
+                     (setq inhibit-startup-screen t)
+                     (setq tem (or argval (pop command-line-args-left)))
+                     (or (stringp tem)
+                         (error "File name omitted from `-insert' option"))
+                     (insert-file-contents (command-line-normalize-file-name 
tem)))
+
+                    ((equal argi "-kill")
+                     (kill-emacs t))
+
+                    ;; This is for when they use --no-desktop with -q, or
+                    ;; don't load Desktop in their .emacs.  If desktop.el
+                    ;; _is_ loaded, it will handle this switch, and we
+                    ;; won't see it by the time we get here.
+                    ((equal argi "-no-desktop")
+                     (message "\"--no-desktop\" ignored because the Desktop 
package is not loaded"))
+
+                    ((string-match "^\\+[0-9]+\\'" argi)
+                     (setq line (string-to-number argi)))
+
+                    ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi)
+                     (setq line (string-to-number (match-string 1 argi))
+                           column (string-to-number (match-string 2 argi))))
+
+                    ((setq tem (assoc orig-argi command-line-x-option-alist))
+                     ;; Ignore X-windows options and their args if not using X.
+                     (setq command-line-args-left
+                           (nthcdr (nth 1 tem) command-line-args-left)))
+
+                    ((setq tem (assoc orig-argi command-line-ns-option-alist))
+                     ;; Ignore NS-windows options and their args if not using 
NS.
+                     (setq command-line-args-left
+                           (nthcdr (nth 1 tem) command-line-args-left)))
+
+                    ((member argi '("-find-file" "-file" "-visit"))
+                     (setq inhibit-startup-screen t)
+                     ;; An explicit option to specify visiting a file.
+                     (setq tem (or argval (pop command-line-args-left)))
+                     (unless (stringp tem)
+                       (error "File name omitted from `%s' option" argi))
+                     (funcall process-file-arg tem))
+
+                    ;; These command lines now have no effect.
+                    ((string-match "\\`--?\\(no-\\)?\\(uni\\|multi\\)byte$" 
argi)
+                     (display-warning 'initialization
+                                      (format "Ignoring obsolete arg %s" 
argi)))
+
+                    ((equal argi "--")
+                     (setq just-files t))
+                    (t
+                     ;; We have almost exhausted our options. See if the
+                     ;; user has made any other command-line options available
+                     (let ((hooks command-line-functions)
+                           (did-hook nil))
+                       (while (and hooks
+                                   (not (setq did-hook (funcall (car hooks)))))
+                         (setq hooks (cdr hooks)))
+                       (unless did-hook
+                         ;; Presume that the argument is a file name.
+                         (if (string-match "\\`-" argi)
+                             (error "Unknown option `%s'" argi))
+                         ;; FIXME: Why do we only inhibit the startup
+                         ;; screen for -nw?
+                         (unless initial-window-system
+                           (setq inhibit-startup-screen t))
+                         (funcall process-file-arg orig-argi)))))
+
+              ;; In unusual circumstances, the execution of Lisp code due
+              ;; to command-line options can cause the last visible frame
+              ;; to be deleted.  In this case, kill emacs to avoid an
+              ;; abort later.
+              (unless (frame-live-p (selected-frame)) (kill-emacs nil)))))))
 
     (when (eq initial-buffer-choice t)
-      ;; When initial-buffer-choice equals t make sure that *scratch*
+      ;; When `initial-buffer-choice' equals t make sure that *scratch*
       ;; exists.
       (get-buffer-create "*scratch*"))
 
@@ -2390,59 +2393,81 @@ A fancy display is used on graphic displays, normal 
otherwise."
             (insert initial-scratch-message)
             (set-buffer-modified-p nil))))
 
+    ;; Prepend `initial-buffer-choice' to `displayable-buffers'.
     (when initial-buffer-choice
       (let ((buf
              (cond ((stringp initial-buffer-choice)
                    (find-file-noselect initial-buffer-choice))
                   ((functionp initial-buffer-choice)
-                   (funcall initial-buffer-choice)))))
-       (switch-to-buffer
-        (if (buffer-live-p buf) buf (get-buffer-create "*scratch*"))
-        'norecord)))
-
-    (if (or inhibit-startup-screen
-           initial-buffer-choice
-           noninteractive
-            (daemonp)
-           inhibit-x-resources)
-
-       ;; Not displaying a startup screen.  If 3 or more files
-       ;; visited, and not all visible, show user what they all are.
-       (and (> file-count 2)
-            (not noninteractive)
-            (not inhibit-startup-buffer-menu)
-            (or (get-buffer-window first-file-buffer)
-                (list-buffers)))
-
-      ;; Display a startup screen, after some preparations.
-
-      ;; If there are no switches to process, we might as well
-      ;; run this hook now, and there may be some need to do it
-      ;; before doing any output.
-      (run-hooks 'emacs-startup-hook 'term-setup-hook)
-
-      ;; It's important to notice the user settings before we
-      ;; display the startup message; otherwise, the settings
-      ;; won't take effect until the user gives the first
-      ;; keystroke, and that's distracting.
-      (when (fboundp 'frame-notice-user-settings)
-       (frame-notice-user-settings))
-
-      ;; If there are no switches to process, we might as well
-      ;; run this hook now, and there may be some need to do it
-      ;; before doing any output.
-      (run-hooks 'window-setup-hook)
-
-      (setq inhibit-startup-hooks t)
-
-      ;; ;; Do this now to avoid an annoying delay if the user
-      ;; ;; clicks the menu bar during the sit-for.
-      ;; (when (display-popup-menus-p)
-      ;;       (precompute-menubar-bindings))
-      ;; (with-no-warnings
-      ;;       (setq menubar-bindings-done t))
-
-      (display-startup-screen (> file-count 0)))))
+                   (funcall initial-buffer-choice))
+                   ((eq initial-buffer-choice t)
+                    (get-buffer-create "*scratch*"))
+                   (t
+                    (error "initial-buffer-choice must be a string, a 
function, or t.")))))
+        (unless (buffer-live-p buf)
+          (error "initial-buffer-choice is not a live buffer."))
+        (setq displayable-buffers (cons buf displayable-buffers))))
+
+    ;; Display the first two buffers in `displayable-buffers'.  If
+    ;; `initial-buffer-choice' is non-nil, its buffer will be the
+    ;; first buffer in `displayable-buffers'.  The first buffer will
+    ;; be focused.
+    (let ((displayable-buffers-len (length displayable-buffers))
+          ;; `nondisplayed-buffers-p' is true if there exist buffers
+          ;; in `displayable-buffers' that were not displayed to the
+          ;; user.
+          (nondisplayed-buffers-p nil))
+      (when (> displayable-buffers-len 0)
+        (switch-to-buffer (car displayable-buffers)))
+      (when (> displayable-buffers-len 1)
+        (switch-to-buffer-other-window (car (cdr displayable-buffers)))
+        ;; Focus on the first buffer.
+        (other-window -1))
+      (when (> displayable-buffers-len 2)
+        (setq nondisplayed-buffers-p t))
+
+      (if (or inhibit-startup-screen
+              initial-buffer-choice
+              noninteractive
+              (daemonp)
+              inhibit-x-resources)
+
+          ;; Not displaying a startup screen.  Display *Buffer List* if
+          ;; there exist buffers that were not displayed.
+          (when (and nondisplayed-buffers-p
+                     (not noninteractive)
+                     (not inhibit-startup-buffer-menu))
+            (list-buffers))
+
+        ;; Display a startup screen, after some preparations.
+
+        ;; If there are no switches to process, we might as well
+        ;; run this hook now, and there may be some need to do it
+        ;; before doing any output.
+        (run-hooks 'emacs-startup-hook 'term-setup-hook)
+
+        ;; It's important to notice the user settings before we
+        ;; display the startup message; otherwise, the settings
+        ;; won't take effect until the user gives the first
+        ;; keystroke, and that's distracting.
+        (when (fboundp 'frame-notice-user-settings)
+          (frame-notice-user-settings))
+
+        ;; If there are no switches to process, we might as well
+        ;; run this hook now, and there may be some need to do it
+        ;; before doing any output.
+        (run-hooks 'window-setup-hook)
+
+        (setq inhibit-startup-hooks t)
+
+        ;; ;; Do this now to avoid an annoying delay if the user
+        ;; ;; clicks the menu bar during the sit-for.
+        ;; (when (display-popup-menus-p)
+        ;;     (precompute-menubar-bindings))
+        ;; (with-no-warnings
+        ;;     (setq menubar-bindings-done t))
+
+        (display-startup-screen (> displayable-buffers-len 0))))))
 
 (defun command-line-normalize-file-name (file)
   "Collapse multiple slashes to one, to handle non-Emacs file names."
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 4e48e80..f7f8007 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -34,6 +34,7 @@
   ;; `terminal-init-xterm' as well.
   '(set (const :tag "modifyOtherKeys support" modifyOtherKeys)
         (const :tag "report background" reportBackground)
+        (const :tag "get X selection" getSelection)
         (const :tag "set X selection" setSelection)))
 
 (defcustom xterm-extra-capabilities 'check
@@ -45,7 +46,8 @@ If a list, assume that the listed features are supported, 
without checking.
 The relevant features are:
   modifyOtherKeys  -- if supported, more key bindings work (e.g., \"\\C-,\")
   reportBackground -- if supported, Xterm reports its background color
-  setSelection     -- if supported, Xterm saves yanked text to the X selection"
+  getSelection     -- if supported, Xterm yanks text from the X selection
+  setSelection     -- if supported, Xterm saves killed text to the X selection"
   :version "24.1"
   :type `(choice (const :tag "Check" check)
                  ,xterm--extra-capabilities-type))
@@ -674,15 +676,19 @@ string bytes that can be copied is 3/4 of this value."
         ;; introduced) or higher, initialize the
         ;; modifyOtherKeys support.
         (when (>= version 216)
-          (terminal-init-xterm-modify-other-keys))
+          (xterm--init-modify-other-keys))
         ;; In version 203 support for accessing the X selection was
         ;; added.  Hterm reports itself as version 256 and supports it
         ;; as well.  gnome-terminal doesn't and is excluded by this
         ;; test.
         (when (>= version 203)
-          (terminal-init-xterm-activate-set-selection))))))
+          ;; Most xterms seem to have it disabled by default, and if it's
+          ;; disabled, C-y will incur a timeout, so we only use it if the user
+          ;; explicitly requests it.
+          ;;(xterm--init-activate-get-selection)
+          (xterm--init-activate-set-selection))))))
 
-(defun xterm--query (query handlers)
+(defun xterm--query (query handlers &optional no-async)
   "Send QUERY string to the terminal and watch for a response.
 HANDLERS is an alist with elements of the form (STRING . FUNCTION).
 We run the first FUNCTION whose STRING matches the input events."
@@ -690,7 +696,7 @@ We run the first FUNCTION whose STRING matches the input 
events."
   ;; rather annoying (bug#6758).  Maybe we could always use the asynchronous
   ;; approach, but it's less tested.
   ;; FIXME: Merge the two branches.
-  (if (input-pending-p)
+  (if (and (input-pending-p) (not no-async))
       (progn
         (dolist (handler handlers)
           (define-key input-decode-map (car handler)
@@ -758,36 +764,73 @@ We run the first FUNCTION whose STRING matches the input 
events."
                     '(("\e]11;" .  xterm--report-background-handler))))
 
     (when (memq 'modifyOtherKeys xterm-extra-capabilities)
-      (terminal-init-xterm-modify-other-keys))
+      (xterm--init-modify-other-keys))
 
+    (when (memq 'getSelection xterm-extra-capabilities)
+      (xterm--init-activate-get-selection))
     (when (memq 'setSelection xterm-extra-capabilities)
-      (terminal-init-xterm-activate-set-selection)))
+      (xterm--init-activate-set-selection)))
 
   ;; Unconditionally enable bracketed paste mode: terminals that don't
   ;; support it just ignore the sequence.
-  (terminal-init-xterm-bracketed-paste-mode)
+  (xterm--init-bracketed-paste-mode)
 
   (run-hooks 'terminal-init-xterm-hook))
 
-(defun terminal-init-xterm-modify-other-keys ()
+(defun xterm--init-modify-other-keys ()
   "Terminal initialization for xterm's modifyOtherKeys support."
   (send-string-to-terminal "\e[>4;1m")
   (push "\e[>4m" (terminal-parameter nil 'tty-mode-reset-strings))
   (push "\e[>4;1m" (terminal-parameter nil 'tty-mode-set-strings)))
 
-(defun terminal-init-xterm-bracketed-paste-mode ()
+(defun xterm--init-bracketed-paste-mode ()
   "Terminal initialization for bracketed paste mode."
   (send-string-to-terminal "\e[?2004h")
   (push "\e[?2004l" (terminal-parameter nil 'tty-mode-reset-strings))
   (push "\e[?2004h" (terminal-parameter nil 'tty-mode-set-strings)))
 
-(defun terminal-init-xterm-activate-set-selection ()
+(defun xterm--init-activate-get-selection ()
+  "Terminal initialization for `gui-get-selection'."
+  (set-terminal-parameter nil 'xterm--get-selection t))
+
+(defun xterm--init-activate-set-selection ()
   "Terminal initialization for `gui-set-selection'."
   (set-terminal-parameter nil 'xterm--set-selection t))
 
-;; FIXME: This defines the gui method for all terminals, even tho it only
-;; supports a subset of them.
-(cl-defmethod gui-backend-set-selection (type data &context (window-system 
(eql nil)))
+(defun xterm--selection-char (type)
+  (pcase type
+    ('PRIMARY "p")
+    ('CLIPBOARD "c")
+    (_ (error "Invalid selection type: %S" type))))
+
+(cl-defmethod gui-backend-get-selection
+    (type data-type
+     &context (window-system (eql nil))
+              ;; Only applies to terminals which have it enabled.
+              ((terminal-parameter nil 'xterm--get-selection) (eql t)))
+  (unless (eq data-type 'STRING)
+    (error "Unsupported data type %S" data-type))
+  (let* ((screen (eq (terminal-parameter nil 'terminal-initted)
+                     'terminal-init-screen))
+         (query (concat "\e]52;" (xterm--selection-char type) ";")))
+    (with-temp-buffer
+      (set-buffer-multibyte nil)
+      (xterm--query
+       (concat (when screen "\eP") query "?\a" (when screen "\e\\"))
+       (list (cons query (lambda ()
+                           (while (let ((char (read-char)))
+                                    (unless (eq char ?\a)
+                                      (insert char)
+                                      t))))))
+       'no-async)
+      (base64-decode-region (point-min) (point-max))
+      (decode-coding-region (point-min) (point-max) 'utf-8-unix t))))
+
+(cl-defmethod gui-backend-set-selection
+    (type data
+     &context (window-system (eql nil))
+              ;; Only applies to terminals which have it enabled.
+              ((terminal-parameter nil 'xterm--set-selection) (eql t)))
   "Copy DATA to the X selection using the OSC 52 escape sequence.
 
 TYPE specifies which selection to set; it must be either
@@ -808,34 +851,24 @@ program.  When inside the screen program, this function 
also
 chops long DCS sequences into multiple smaller ones to avoid
 hitting screen's max DCS length."
   (let* ((screen (eq (terminal-parameter nil 'terminal-initted)
-                     'terminal-init-screen)))
-    ;; Only do something if the current terminal is actually an XTerm
-    ;; or screen.
-    (when (terminal-parameter nil 'xterm--set-selection)
-      (let* ((bytes (encode-coding-string data 'utf-8-unix))
-             (base-64 (if screen
-                          (replace-regexp-in-string
-                           "\n" "\e\\\eP"
-                           (base64-encode-string bytes)
-                           :fixedcase :literal)
-                        (base64-encode-string bytes :no-line-break)))
-             (length (length base-64)))
-        (if (> length xterm-max-cut-length)
-            (progn
-              (warn "Selection too long to send to terminal: %d bytes" length)
-              (sit-for 2))
-          (send-string-to-terminal
-           (concat
-            (when screen "\eP")
-            "\e]52;"
-            (pcase type
-              ('PRIMARY "p")
-              ('CLIPBOARD "c")
-              (_ (error "Invalid selection type: %S" type)))
-            ";"
-            base-64
-            "\a"
-            (when screen "\e\\"))))))))
+                     'terminal-init-screen))
+         (bytes (encode-coding-string data 'utf-8-unix))
+         (base-64 (if screen
+                      (replace-regexp-in-string
+                       "\n" "\e\\\eP"
+                       (base64-encode-string bytes)
+                       :fixedcase :literal)
+                    (base64-encode-string bytes :no-line-break)))
+         (length (length base-64)))
+    (if (> length xterm-max-cut-length)
+        (progn
+          (warn "Selection too long to send to terminal: %d bytes" length)
+          (sit-for 2))
+      (send-string-to-terminal
+       (concat
+        (when screen "\eP")
+        "\e]52;" (xterm--selection-char type) ";" base-64 "\a"
+        (when screen "\e\\"))))))
 
 (defun xterm-rgb-convert-to-16bit (prim)
   "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value."
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 274cb4a..535b885 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1034,7 +1034,7 @@ says which mode to use."
 (define-derived-mode plain-tex-mode tex-mode "TeX"
   "Major mode for editing files of input for plain TeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run TeX on the current region, plus a \"header\"
@@ -1080,7 +1080,7 @@ special subshell is initiated, the hook `tex-shell-hook' 
is run."
 (define-derived-mode latex-mode tex-mode "LaTeX"
   "Major mode for editing files of input for LaTeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run LaTeX on the current region, plus the preamble
@@ -1162,7 +1162,7 @@ subshell is initiated, `tex-shell-hook' is run."
 (define-derived-mode slitex-mode latex-mode "SliTeX"
   "Major mode for editing files of input for SliTeX.
 Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
+Makes \" insert \\=`\\=` when it seems to be the beginning of a quotation,
 and '' when it appears to be the end; it inserts \" only after a \\.
 
 Use \\[tex-region] to run SliTeX on the current region, plus the preamble
@@ -1296,7 +1296,7 @@ Entering SliTeX mode runs the hook `text-mode-hook', then 
the hook
 
 (defun tex-insert-quote (arg)
   "Insert the appropriate quote marks for TeX.
-Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote'
+Inserts the value of `tex-open-quote' (normally \\=`\\=`) or `tex-close-quote'
 \(normally '') depending on the context.  With prefix argument, always
 inserts \" characters."
   (interactive "*P")
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index e7b6835..cab4f77 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -1287,7 +1287,7 @@ Leave point after argument."
 (put 'uref 'texinfo-format 'texinfo-format-uref)
 (defun texinfo-format-uref ()
   "Format URL and optional URL-TITLE.
-Insert ` ... ' around URL if no URL-TITLE argument;
+Insert \\=` ... ' around URL if no URL-TITLE argument;
 otherwise, insert URL-TITLE followed by URL in parentheses."
   (let ((args (texinfo-format-parse-args)))
     (texinfo-discard-command)
@@ -2447,7 +2447,7 @@ Use only the FILENAME arg; for Info, ignore the other 
arguments to @image."
 ;; not lead to inserted ` ... ' in a table, but does elsewhere.
 (put 'option 'texinfo-format 'texinfo-format-option)
 (defun texinfo-format-option ()
-  "Insert ` ... ' around arg unless inside a table; in that case, no quotes."
+  "Insert \\=` ... ' around arg unless inside a table; in that case, no 
quotes."
   ;; `looking-at-backward' not available in v. 18.57, 20.2
   (if (not (search-backward ""    ; searched-for character is a control-H
                     (line-beginning-position)
@@ -2494,7 +2494,7 @@ Enclose the verbatim text, including the delimiters, in 
braces.  Print
 text exactly as written (but not the delimiters) in a fixed-width.
 
 For example, @verb\{|@|\} results in @ and
address@hidden@'e?`!`+} results in @'e?`!`."
address@hidden@'e?\\=`!\\=`+} results in @'e?\\=`!\\=`."
 
   (let ((delimiter (buffer-substring-no-properties
                    (1+ texinfo-command-end) (+ 2 texinfo-command-end))))
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 895adbf..6b28249 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -689,7 +689,7 @@ Puts point on a blank line between them."
   '("example\\>" "smallexample\\>" "lisp\\>"))
 (defun texinfo-insert-quote (&optional arg)
   "Insert the appropriate quote mark for Texinfo.
-Usually inserts the value of `texinfo-open-quote' (normally ``) or
+Usually inserts the value of `texinfo-open-quote' (normally \\=`\\=`) or
 `texinfo-close-quote' (normally ''), depending on the context.
 With prefix argument or inside @code or @example, inserts a plain \"."
   (interactive "*P")
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el
index c981d89..67acc66 100644
--- a/lisp/vc/ediff-help.el
+++ b/lisp/vc/ediff-help.el
@@ -195,47 +195,47 @@ the value of this variable and the variables 
`ediff-help-message-*' in
     (ediff-documentation "Quick Help Commands")
 
     (let (case-fold-search)
-      (cond ((string= cmd "?") (re-search-forward "^`\\?'"))
-           ((string= cmd "G") (re-search-forward "^`G'"))
-           ((string= cmd "E") (re-search-forward "^`E'"))
-           ((string= cmd "wd") (re-search-forward "^`wd'"))
-           ((string= cmd "wx") (re-search-forward "^`wa'"))
-           ((string= cmd "a/b") (re-search-forward "^`a'"))
-           ((string= cmd "x") (re-search-forward "^`a'"))
-           ((string= cmd "xy") (re-search-forward "^`ab'"))
-           ((string= cmd "p,DEL") (re-search-forward "^`p'"))
-           ((string= cmd "n,SPC") (re-search-forward "^`n'"))
-           ((string= cmd "j") (re-search-forward "^`j'"))
-           ((string= cmd "gx") (re-search-forward "^`ga'"))
-           ((string= cmd "!") (re-search-forward "^`!'"))
-           ((string= cmd "*") (re-search-forward "^`\\*'"))
-           ((string= cmd "m") (re-search-forward "^`m'"))
-           ((string= cmd "|") (re-search-forward "^`|'"))
-           ((string= cmd "@") (re-search-forward "^`@'"))
-           ((string= cmd "h") (re-search-forward "^`h'"))
-           ((string= cmd "r") (re-search-forward "^`r'"))
-           ((string= cmd "rx") (re-search-forward "^`ra'"))
-           ((string= cmd "##") (re-search-forward "^`##'"))
-           ((string= cmd "#c") (re-search-forward "^`#c'"))
-           ((string= cmd "#f/#h") (re-search-forward "^`#f'"))
-           ((string= cmd "X") (re-search-forward "^`A'"))
-           ((string= cmd "v/V") (re-search-forward "^`v'"))
-           ((string= cmd "</>") (re-search-forward "^`<'"))
-           ((string= cmd "~") (re-search-forward "^`~'"))
-           ((string= cmd "i") (re-search-forward "^`i'"))
-           ((string= cmd "D") (re-search-forward "^`D'"))
-           ((string= cmd "R") (re-search-forward "^`R'"))
-           ((string= cmd "M") (re-search-forward "^`M'"))
-           ((string= cmd "z/q") (re-search-forward "^`z'"))
-           ((string= cmd "%") (re-search-forward "^`%'"))
-           ((string= cmd "C-l") (re-search-forward "^`C-l'"))
-           ((string= cmd "$$") (re-search-forward "^`\\$\\$'"))
-           ((string= cmd "$*") (re-search-forward "^`\\$\\*'"))
-           ((string= cmd "/") (re-search-forward "^`/'"))
-           ((string= cmd "&") (re-search-forward "^`&'"))
-           ((string= cmd "s") (re-search-forward "^`s'"))
-           ((string= cmd "+") (re-search-forward "^`\\+'"))
-           ((string= cmd "=") (re-search-forward "^`='"))
+      (cond ((string= cmd "?") (re-search-forward "^[`‘]\\?['’]"))
+           ((string= cmd "G") (re-search-forward "^[`‘]G['’]"))
+           ((string= cmd "E") (re-search-forward "^[`‘]E['’]"))
+           ((string= cmd "wd") (re-search-forward "^[`‘]wd['’]"))
+           ((string= cmd "wx") (re-search-forward "^[`‘]wa['’]"))
+           ((string= cmd "a/b") (re-search-forward "^[`‘]a['’]"))
+           ((string= cmd "x") (re-search-forward "^[`‘]a['’]"))
+           ((string= cmd "xy") (re-search-forward "^[`‘]ab['’]"))
+           ((string= cmd "p,DEL") (re-search-forward "^[`‘]p['’]"))
+           ((string= cmd "n,SPC") (re-search-forward "^[`‘]n['’]"))
+           ((string= cmd "j") (re-search-forward "^[`‘]j['’]"))
+           ((string= cmd "gx") (re-search-forward "^[`‘]ga['’]"))
+           ((string= cmd "!") (re-search-forward "^[`‘]!['’]"))
+           ((string= cmd "*") (re-search-forward "^[`‘]\\*['’]"))
+           ((string= cmd "m") (re-search-forward "^[`‘]m['’]"))
+           ((string= cmd "|") (re-search-forward "^[`‘]|['’]"))
+           ((string= cmd "@") (re-search-forward "address@hidden'’]"))
+           ((string= cmd "h") (re-search-forward "^[`‘]h['’]"))
+           ((string= cmd "r") (re-search-forward "^[`‘]r['’]"))
+           ((string= cmd "rx") (re-search-forward "^[`‘]ra['’]"))
+           ((string= cmd "##") (re-search-forward "^[`‘]##['’]"))
+           ((string= cmd "#c") (re-search-forward "^[`‘]#c['’]"))
+           ((string= cmd "#f/#h") (re-search-forward "^[`‘]#f['’]"))
+           ((string= cmd "X") (re-search-forward "^[`‘]A['’]"))
+           ((string= cmd "v/V") (re-search-forward "^[`‘]v['’]"))
+           ((string= cmd "</>") (re-search-forward "^[`‘]<['’]"))
+           ((string= cmd "~") (re-search-forward "^[`‘]~['’]"))
+           ((string= cmd "i") (re-search-forward "^[`‘]i['’]"))
+           ((string= cmd "D") (re-search-forward "^[`‘]D['’]"))
+           ((string= cmd "R") (re-search-forward "^[`‘]R['’]"))
+           ((string= cmd "M") (re-search-forward "^[`‘]M['’]"))
+           ((string= cmd "z/q") (re-search-forward "^[`‘]z['’]"))
+           ((string= cmd "%") (re-search-forward "^[`‘]%['’]"))
+           ((string= cmd "C-l") (re-search-forward "^[`‘]C-l['’]"))
+           ((string= cmd "$$") (re-search-forward "^[`‘]\\$\\$['’]"))
+           ((string= cmd "$*") (re-search-forward "^[`‘]\\$\\*['’]"))
+           ((string= cmd "/") (re-search-forward "^[`‘]/['’]"))
+           ((string= cmd "&") (re-search-forward "^[`‘]&['’]"))
+           ((string= cmd "s") (re-search-forward "^[`‘]s['’]"))
+           ((string= cmd "+") (re-search-forward "^[`‘]\\+['’]"))
+           ((string= cmd "=") (re-search-forward "^[`‘]=['’]"))
            (t (error "Undocumented command! Type `G' in Ediff Control Panel to 
drop a note to the Ediff maintainer")))
       ) ; let case-fold-search
     ))
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index a2c1cba..ec55867 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -171,6 +171,12 @@ Another is that undo information is not kept."
   (let ((camefrom (current-buffer))
        (olddir default-directory))
     (set-buffer (get-buffer-create buf))
+    (let ((oldproc (get-buffer-process (current-buffer))))
+      ;; If we wanted to wait for oldproc to finish before doing
+      ;; something, we'd have used vc-eval-after.
+      ;; Use `delete-process' rather than `kill-process' because we don't
+      ;; want any of its output to appear from now on.
+      (when oldproc (delete-process oldproc)))
     (kill-all-local-variables)
     (set (make-local-variable 'vc-parent-buffer) camefrom)
     (set (make-local-variable 'vc-parent-buffer-name)
@@ -302,12 +308,6 @@ case, and the process object in the asynchronous case."
                  (eq buffer (current-buffer)))
        (vc-setup-buffer buffer))
       ;; If there's some previous async process still running, just kill it.
-      (let ((oldproc (get-buffer-process (current-buffer))))
-        ;; If we wanted to wait for oldproc to finish before doing
-        ;; something, we'd have used vc-eval-after.
-        ;; Use `delete-process' rather than `kill-process' because we don't
-        ;; want any of its output to appear from now on.
-        (when oldproc (delete-process oldproc)))
       (let ((squeezed (remq nil flags))
            (inhibit-read-only t)
            (status 0))
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index d09214b..295e2aa 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2863,7 +2863,7 @@ The following properties have special meanings for this 
widget:
   :type 'boolean
   :group 'widget-documentation)
 
-(defcustom widget-documentation-link-regexp "`\\([^\n`' ]+\\)'"
+(defcustom widget-documentation-link-regexp "[`‘]\\([^\n `'‘’]+\\)['’]"
   "Regexp for matching potential links in documentation strings.
 The first group should be the link itself."
   :type 'regexp
diff --git a/m4/acl.m4 b/m4/acl.m4
index b8f4660..5da6a43 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
-# serial 19
+# serial 20
 
 # Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -181,26 +181,12 @@ AC_DEFUN([gl_FILE_HAS_ACL],
 [
   AC_REQUIRE([gl_FUNC_ACL_ARG])
   if test "$enable_acl" != no; then
-    AC_CACHE_CHECK([for getxattr with XATTR_NAME_POSIX_ACL macros],
-      [gl_cv_getxattr_with_posix_acls],
-      [gl_cv_getxattr_with_posix_acls=no
-       AC_LINK_IFELSE(
-         [AC_LANG_PROGRAM(
-            [[#include <sys/types.h>
-              #include <sys/xattr.h>
-              #include <linux/xattr.h>
-            ]],
-            [[ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
-              ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
-              return a < 0 || b < 0;
-            ]])],
-         [gl_cv_getxattr_with_posix_acls=yes])])
+    AC_CHECK_HEADERS([linux/xattr.h])
+    AC_CHECK_HEADERS([sys/xattr.h],
+      [AC_CHECK_FUNCS([getxattr])])
   fi
-  if test "$gl_cv_getxattr_with_posix_acls" = yes; then
+  if test "$ac_cv_header_sys_xattr_h,$ac_cv_func_getxattr" = yes,yes; then
     LIB_HAS_ACL=
-    AC_DEFINE([GETXATTR_WITH_POSIX_ACLS], 1,
-      [Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS
-       and XATTR_NAME_POSIX_ACL_DEFAULT.])
   else
     dnl Set gl_need_lib_has_acl to a nonempty value, so that any
     dnl later gl_FUNC_ACL call will set LIB_HAS_ACL=$LIB_ACL.
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 06636cf..0425d02 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -39,6 +39,7 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([gl_PROG_AR_RANLIB])
   # Code from module absolute-header:
+  # Code from module acl-permissions:
   # Code from module alloca-opt:
   # Code from module allocator:
   # Code from module at-internal:
@@ -105,7 +106,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module pselect:
   # Code from module pthread_sigmask:
   # Code from module putenv:
-  # Code from module qacl:
+  # Code from module qcopy-acl:
   # Code from module readlink:
   # Code from module readlinkat:
   # Code from module root-uid:
@@ -172,6 +173,7 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='lib'
+  gl_FUNC_ACL
   gl_FUNC_ALLOCA
   gl_BYTESWAP
   AC_CHECK_FUNCS_ONCE([readlinkat])
@@ -317,7 +319,6 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_PUTENV
   fi
   gl_STDLIB_MODULE_INDICATOR([putenv])
-  gl_FUNC_ACL
   gl_FUNC_READLINK
   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
     AC_LIBOBJ([readlink])
@@ -865,6 +866,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fsync.c
   lib/ftoastr.c
   lib/ftoastr.h
+  lib/get-permissions.c
   lib/getdtablesize.c
   lib/getgroups.c
   lib/getloadavg.c
@@ -895,11 +897,11 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/pthread_sigmask.c
   lib/putenv.c
   lib/qcopy-acl.c
-  lib/qset-acl.c
   lib/readlink.c
   lib/readlinkat.c
   lib/root-uid.h
   lib/secure_getenv.c
+  lib/set-permissions.c
   lib/sha1.c
   lib/sha1.h
   lib/sha256.c
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index e0c4bde..f60cc21 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 44
+# stdio_h.m4 serial 46
 dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,15 +15,21 @@ AC_DEFUN([gl_STDIO_H],
   dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
   dnl inttypes.h behave like gnu instead of system; we must give our
   dnl printf wrapper the right attribute to match.
-  AC_CACHE_CHECK([whether inttypes macros match system or gnu printf],
+  AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
     [gl_cv_func_printf_attribute_flavor],
-    [AC_EGREP_CPP([findme .(ll|j)d. findme],
-      [#define __STDC_FORMAT_MACROS 1
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+       #define __STDC_FORMAT_MACROS 1
        #include <stdio.h>
        #include <inttypes.h>
-       findme PRIdMAX findme
-      ], [gl_cv_func_printf_attribute_flavor=gnu],
-      [gl_cv_func_printf_attribute_flavor=system])])
+       /* For non-mingw systems, compilation will trivially succeed.
+          For mingw, compilation will succeed for older mingw (system
+          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+       #endif
+      ]])], [gl_cv_func_printf_attribute_flavor=system],
+      [gl_cv_func_printf_attribute_flavor=gnu])])
   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
     AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
       [Define to 1 if printf and friends should be labeled with
diff --git a/nt/emacs-x64.manifest b/nt/emacs-x64.manifest
index 5434e29..3cf56dd 100644
--- a/nt/emacs-x64.manifest
+++ b/nt/emacs-x64.manifest
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" 
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
   <dependency>
     <dependentAssembly>
       <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
@@ -30,4 +30,9 @@
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
       </application> 
     </compatibility>
+  <asmv3:application>
+    <asmv3:windowsSettings 
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings";>
+      <dpiAware>true</dpiAware>
+    </asmv3:windowsSettings>
+  </asmv3:application>
 </assembly>
diff --git a/nt/emacs-x86.manifest b/nt/emacs-x86.manifest
index 7f09c56..d7053be 100644
--- a/nt/emacs-x86.manifest
+++ b/nt/emacs-x86.manifest
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" 
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
   <dependency>
     <dependentAssembly>
       <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
@@ -30,4 +30,9 @@
         <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
       </application> 
     </compatibility>
+  <asmv3:application>
+    <asmv3:windowsSettings 
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings";>
+      <dpiAware>true</dpiAware>
+    </asmv3:windowsSettings>
+  </asmv3:application>
 </assembly>
diff --git a/nt/gnulib.mk b/nt/gnulib.mk
index 26a9ea9..0c2b786 100644
--- a/nt/gnulib.mk
+++ b/nt/gnulib.mk
@@ -43,7 +43,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix 
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die 
--avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select 
--avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib 
--makefile-name=gnulib.mk --conditional-dependencies --no-libtool --ma [...]
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix 
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die 
--avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select 
--avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib 
--makefile-name=gnulib.mk --conditional-dependencies --no-libtool --ma [...]
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -64,6 +64,17 @@ HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
 
 ## end   gnulib module absolute-header
 
+## begin gnulib module acl-permissions
+
+libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c \
+  get-permissions.c
+
+EXTRA_DIST += acl-internal.h acl.h acl_entries.c
+
+EXTRA_libgnu_a_SOURCES += acl_entries.c
+
+## end   gnulib module acl-permissions
+
 ## begin gnulib module alloca-opt
 
 BUILT_SOURCES += $(ALLOCA_H)
@@ -521,15 +532,11 @@ EXTRA_libgnu_a_SOURCES += putenv.c
 
 ## end   gnulib module putenv
 
-## begin gnulib module qacl
-
-libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c qcopy-acl.c
+## begin gnulib module qcopy-acl
 
-EXTRA_DIST += acl-internal.h acl.h acl_entries.c
-
-EXTRA_libgnu_a_SOURCES += acl_entries.c
+libgnu_a_SOURCES += qcopy-acl.c
 
-## end   gnulib module qacl
+## end   gnulib module qcopy-acl
 
 ## begin gnulib module readlink
 
diff --git a/src/alloc.c b/src/alloc.c
index 030c6e0..a956e95 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4542,9 +4542,9 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
   Lisp_Object zombie_list = Qnil;
   for (int i = 0; i < min (MAX_ZOMBIES, nzombies); i++)
     zombie_list = Fcons (zombies[i], zombie_list);
-  return CALLN (Fmessage,
-               build_string ("%d GCs, avg live/zombies = %.2f/%.2f"
-                             " (%f%%), max %d/%d\nzombies: %S"),
+  AUTO_STRING (format, ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%),"
+                       " max %d/%d\nzombies: %S"));
+  return CALLN (Fmessage, format,
                make_number (ngcs), make_float (avg_live),
                make_float (avg_zombies),
                make_float (avg_zombies / avg_live / 100),
@@ -4775,7 +4775,7 @@ mark_memory (void *start, void *end)
        Lisp_Object obj = build_string ("test");
        struct Lisp_String *s = XSTRING (obj);
        Fgarbage_collect ();
-       fprintf (stderr, "test `%s'\n", s->data);
+       fprintf (stderr, "test '%s'\n", s->data);
        return Qnil;
      }
 
diff --git a/src/buffer.c b/src/buffer.c
index 5c32603..27e1130 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1669,8 +1669,8 @@ cleaning up all windows currently displaying the buffer 
to be killed. */)
        && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
       {
         GCPRO1 (buffer);
-        tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ",
-                                      BVAR (b, name), make_number (0)));
+       AUTO_STRING (format, "Buffer %s modified; kill anyway? ");
+       tem = do_yes_or_no_p (CALLN (Fformat, format, BVAR (b, name)));
        UNGCPRO;
        if (NILP (tem))
          return unbind_to (count, Qnil);
@@ -5293,7 +5293,7 @@ init_buffer (int initialized)
   pwd = get_current_dir_name ();
 
   if (!pwd)
-    fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
+    fatal ("get_current_dir_name: %s\n", strerror (errno));
 
   /* Maybe this should really use some standard subroutine
      whose definition is filename syntax dependent.  */
@@ -5303,7 +5303,7 @@ init_buffer (int initialized)
       /* Grow buffer to add directory separator and '\0'.  */
       pwd = realloc (pwd, len + 2);
       if (!pwd)
-       fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
+       fatal ("get_current_dir_name: %s\n", strerror (errno));
       pwd[len] = DIRECTORY_SEP;
       pwd[len + 1] = '\0';
       len++;
diff --git a/src/callint.c b/src/callint.c
index cf50e0c..2ff2f80 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -904,7 +904,6 @@ syms_of_callint (void)
   DEFSYM (Qhandle_shift_selection, "handle-shift-selection");
   DEFSYM (Qread_number, "read-number");
   DEFSYM (Qfuncall_interactively, "funcall-interactively");
-  DEFSYM (Qcommand_debug_status, "command-debug-status");
   DEFSYM (Qenable_recursive_minibuffers, "enable-recursive-minibuffers");
   DEFSYM (Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook");
 
diff --git a/src/ccl.c b/src/ccl.c
index 88307a3..bf2aa12 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2283,10 +2283,6 @@ syms_of_ccl (void)
   DEFSYM (Qccl, "ccl");
   DEFSYM (Qcclp, "cclp");
 
-  /* This symbol is a property which associates with ccl program vector.
-     Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector.  */
-  DEFSYM (Qccl_program, "ccl-program");
-
   /* Symbols of ccl program have this property, a value of the property
      is an index for Vccl_program_table. */
   DEFSYM (Qccl_program_idx, "ccl-program-idx");
diff --git a/src/charset.c b/src/charset.c
index f1aa074..b19e344 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2339,10 +2339,6 @@ syms_of_charset (void)
   DEFSYM (Qeight_bit, "eight-bit");
   DEFSYM (Qiso_8859_1, "iso-8859-1");
 
-  /* Value of charset attribute `charset-iso-plane'.  */
-  DEFSYM (Qgl, "gl");
-  DEFSYM (Qgr, "gr");
-
   staticpro (&Vcharset_ordered_list);
   Vcharset_ordered_list = Qnil;
 
diff --git a/src/cmds.c b/src/cmds.c
index 6f9982e..a975a8e 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -526,7 +526,6 @@ internal_self_insert (int c, EMACS_INT n)
 void
 syms_of_cmds (void)
 {
-  DEFSYM (Qkill_backward_chars, "kill-backward-chars");
   DEFSYM (Qkill_forward_chars, "kill-forward-chars");
 
   /* A possible value for a buffer's overwrite-mode variable.  */
diff --git a/src/coding.c b/src/coding.c
index 4b41355..9342c38 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10828,18 +10828,11 @@ syms_of_coding (void)
   /* Target SERVICE is the fourth argument.  */
   Fput (Qopen_network_stream, Qtarget_idx, make_number (3));
 
-  DEFSYM (Qcoding_system, "coding-system");
-  DEFSYM (Qcoding_aliases, "coding-aliases");
-
-  DEFSYM (Qeol_type, "eol-type");
   DEFSYM (Qunix, "unix");
   DEFSYM (Qdos, "dos");
   DEFSYM (Qmac, "mac");
 
   DEFSYM (Qbuffer_file_coding_system, "buffer-file-coding-system");
-  DEFSYM (Qpost_read_conversion, "post-read-conversion");
-  DEFSYM (Qpre_write_conversion, "pre-write-conversion");
-  DEFSYM (Qdefault_char, "default-char");
   DEFSYM (Qundecided, "undecided");
   DEFSYM (Qno_conversion, "no-conversion");
   DEFSYM (Qraw_text, "raw-text");
@@ -10873,10 +10866,6 @@ syms_of_coding (void)
   DEFSYM (Qtranslation_table, "translation-table");
   Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (2));
   DEFSYM (Qtranslation_table_id, "translation-table-id");
-  DEFSYM (Qtranslation_table_for_decode, "translation-table-for-decode");
-  DEFSYM (Qtranslation_table_for_encode, "translation-table-for-encode");
-
-  DEFSYM (Qvalid_codes, "valid-codes");
 
   /* Coding system emacs-mule and raw-text are for converting only
      end-of-line format.  */
@@ -11132,7 +11121,8 @@ See also the function `find-operation-coding-system'.  
*/);
 
   DEFVAR_LISP ("locale-coding-system", Vlocale_coding_system,
               doc: /* Coding system to use with system messages.
-Also used for decoding keyboard input on X Window system.  */);
+Also used for decoding keyboard input on X Window system, and for
+encoding standard output and error streams.  */);
   Vlocale_coding_system = Qnil;
 
   /* The eol mnemonics are reset in startup.el system-dependently.  */
diff --git a/src/composite.c b/src/composite.c
index 577b979..1c9c62b 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1930,7 +1930,6 @@ The default value is the function `compose-chars-after'.  
*/);
   Vcompose_chars_after_function = intern_c_string ("compose-chars-after");
 
   DEFSYM (Qauto_composed, "auto-composed");
-  DEFSYM (Qauto_composition_function, "auto-composition-function");
 
   DEFVAR_LISP ("auto-composition-mode", Vauto_composition_mode,
               doc: /* Non-nil if Auto-Composition mode is enabled.
diff --git a/src/data.c b/src/data.c
index c96841a..9b1c12a 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1647,8 +1647,10 @@ The function `default-value' gets the default value and 
`set-default' sets it.
        Lisp_Object symbol;
        XSETSYMBOL (symbol, sym); /* In case `variable' is aliased.  */
        if (let_shadows_global_binding_p (symbol))
-         message ("Making %s buffer-local while let-bound!",
-                  SDATA (SYMBOL_NAME (variable)));
+         {
+           AUTO_STRING (format, "Making %s buffer-local while let-bound!");
+           CALLN (Fmessage, format, SYMBOL_NAME (variable));
+         }
       }
     }
 
@@ -1730,9 +1732,11 @@ Instead, use `add-hook' and specify t for the LOCAL 
argument.  */)
        Lisp_Object symbol;
        XSETSYMBOL (symbol, sym); /* In case `variable' is aliased.  */
        if (let_shadows_global_binding_p (symbol))
-         message ("Making %s local to %s while let-bound!",
-                  SDATA (SYMBOL_NAME (variable)),
-                  SDATA (BVAR (current_buffer, name)));
+         {
+           AUTO_STRING (format, "Making %s local to %s while let-bound!");
+           CALLN (Fmessage, format, SYMBOL_NAME (variable),
+                  BVAR (current_buffer, name));
+         }
       }
     }
 
@@ -1742,8 +1746,11 @@ Instead, use `add-hook' and specify t for the LOCAL 
argument.  */)
   if (NILP (tem))
     {
       if (let_shadows_buffer_binding_p (sym))
-       message ("Making %s buffer-local while locally let-bound!",
-                SDATA (SYMBOL_NAME (variable)));
+       {
+         AUTO_STRING (format,
+                      "Making %s buffer-local while locally let-bound!");
+         CALLN (Fmessage, format, SYMBOL_NAME (variable));
+       }
 
       /* Swap out any local binding for some other buffer, and make
         sure the current value is permanently recorded, if it's the
@@ -1908,8 +1915,10 @@ frame-local bindings).  */)
     Lisp_Object symbol;
     XSETSYMBOL (symbol, sym); /* In case `variable' is aliased.  */
     if (let_shadows_global_binding_p (symbol))
-      message ("Making %s frame-local while let-bound!",
-              SDATA (SYMBOL_NAME (variable)));
+      {
+       AUTO_STRING (format, "Making %s frame-local while let-bound!");
+       CALLN (Fmessage, format, SYMBOL_NAME (variable));
+      }
   }
   return variable;
 }
@@ -3442,7 +3451,6 @@ syms_of_data (void)
   DEFSYM (Qlistp, "listp");
   DEFSYM (Qconsp, "consp");
   DEFSYM (Qsymbolp, "symbolp");
-  DEFSYM (Qkeywordp, "keywordp");
   DEFSYM (Qintegerp, "integerp");
   DEFSYM (Qnatnump, "natnump");
   DEFSYM (Qwholenump, "wholenump");
@@ -3456,7 +3464,6 @@ syms_of_data (void)
   DEFSYM (Qmarkerp, "markerp");
   DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p");
   DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p");
-  DEFSYM (Qboundp, "boundp");
   DEFSYM (Qfboundp, "fboundp");
 
   DEFSYM (Qfloatp, "floatp");
@@ -3472,10 +3479,6 @@ syms_of_data (void)
 
   DEFSYM (Qcdr, "cdr");
 
-  /* Handle automatic advice activation.  */
-  DEFSYM (Qad_advice_info, "ad-advice-info");
-  DEFSYM (Qad_activate_internal, "ad-activate-internal");
-
   error_tail = pure_cons (Qerror, Qnil);
 
   /* ERROR is used as a signaler for random errors for which nothing else is
@@ -3561,7 +3564,6 @@ syms_of_data (void)
   DEFSYM (Qchar_table, "char-table");
   DEFSYM (Qbool_vector, "bool-vector");
   DEFSYM (Qhash_table, "hash-table");
-  DEFSYM (Qmisc, "misc");
 
   DEFSYM (Qdefun, "defun");
 
diff --git a/src/dbusbind.c b/src/dbusbind.c
index fa26f9e..be1b890 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -233,8 +233,12 @@ xd_symbol_to_dbus_type (Lisp_Object object)
 
 /* Transform the object to its string representation for debug
    messages.  */
-#define XD_OBJECT_TO_STRING(object)                                    \
-  SDATA (format2 ("%s", object, Qnil))
+static char *
+XD_OBJECT_TO_STRING (Lisp_Object object)
+{
+  AUTO_STRING (format, "%s");
+  return SSDATA (CALLN (Fformat, format, object));
+}
 
 #define XD_DBUS_VALIDATE_BUS_ADDRESS(bus)                              \
   do {                                                                 \
@@ -1714,11 +1718,7 @@ init_dbusbind (void)
 void
 syms_of_dbusbind (void)
 {
-
-  DEFSYM (Qdbus__init_bus, "dbus--init-bus");
   defsubr (&Sdbus__init_bus);
-
-  DEFSYM (Qdbus_get_unique_name, "dbus-get-unique-name");
   defsubr (&Sdbus_get_unique_name);
 
   DEFSYM (Qdbus_message_internal, "dbus-message-internal");
diff --git a/src/decompress.c b/src/decompress.c
index b14f0a2..460d4fe 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -209,7 +209,6 @@ This function can be called only in unibyte buffers.  */)
 void
 syms_of_decompress (void)
 {
-  DEFSYM (Qzlib_dll, "zlib");
   defsubr (&Szlib_decompress_region);
   defsubr (&Szlib_available_p);
 }
diff --git a/src/dispnew.c b/src/dispnew.c
index c3cd890..0ac30ab 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6048,10 +6048,10 @@ init_display (void)
     {
 #ifdef HAVE_WINDOW_SYSTEM
       if (! inhibit_window_system)
-       fprintf (stderr, "Please set the environment variable DISPLAY or TERM 
(see `tset').\n");
+       fprintf (stderr, "Please set the environment variable DISPLAY or TERM 
(see 'tset').\n");
       else
 #endif /* HAVE_WINDOW_SYSTEM */
-       fprintf (stderr, "Please set the environment variable TERM; see 
`tset'.\n");
+       fprintf (stderr, "Please set the environment variable TERM; see 
'tset'.\n");
       exit (1);
     }
 
@@ -6257,6 +6257,7 @@ Each element can be:
 
   DEFVAR_LISP ("standard-display-table", Vstandard_display_table,
               doc: /* Display table to use for buffers that specify none.
+It is also used for standard output and error streams.
 See `buffer-display-table' for more information.  */);
   Vstandard_display_table = Qnil;
 
diff --git a/src/doc.c b/src/doc.c
index 8b18fb0..f1ba643 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -516,8 +516,13 @@ store_function_docstring (Lisp_Object obj, ptrdiff_t 
offset)
       if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_DOC_STRING)
        ASET (fun, COMPILED_DOC_STRING, make_number (offset));
       else
-       message ("No docstring slot for %s",
-                SYMBOLP (obj) ? SSDATA (SYMBOL_NAME (obj)) : "<anonymous>");
+       {
+         AUTO_STRING (format, "No docstring slot for %s");
+         CALLN (Fmessage, format,
+                (SYMBOLP (obj)
+                 ? SYMBOL_NAME (obj)
+                 : build_string ("<anonymous>")));
+       }
     }
 }
 
@@ -693,15 +698,21 @@ summary).
 
 Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR
 as the keymap for future \\=\\[COMMAND] substrings.
-\\=\\= quotes the following character and is discarded;
-thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ 
into the output.
+
+Each \\=` is replaced by ‘.  Each ' preceded by \\=` and without
+intervening ' is replaced by ’.
+
+\\=\\= quotes the following character and is discarded; thus,
+\\=\\=\\=\\= puts \\=\\= into the output, \\=\\=\\=\\[ puts \\=\\[ into the 
output, and
+\\=\\=\\=` puts \\=` into the output.
 
 Return the original STRING if no substitutions are made.
 Otherwise, return a new string.  */)
   (Lisp_Object string)
 {
   char *buf;
-  bool changed = 0;
+  bool changed = false;
+  bool in_quote = false;
   unsigned char *strp;
   char *bufp;
   ptrdiff_t idx;
@@ -734,6 +745,12 @@ Otherwise, return a new string.  */)
   keymap = Voverriding_local_map;
 
   bsize = SBYTES (string);
+
+  /* Add some room for expansion due to quote replacement.  */
+  enum { EXTRA_ROOM = 20 };
+  if (bsize <= STRING_BYTES_BOUND - EXTRA_ROOM)
+    bsize += EXTRA_ROOM;
+
   bufp = buf = xmalloc (bsize);
 
   strp = SDATA (string);
@@ -743,7 +760,7 @@ Otherwise, return a new string.  */)
        {
          /* \= quotes the next character;
             thus, to put in \[ without its special meaning, use \=\[.  */
-         changed = 1;
+         changed = true;
          strp += 2;
          if (multibyte)
            {
@@ -766,7 +783,6 @@ Otherwise, return a new string.  */)
          ptrdiff_t start_idx;
          bool follow_remap = 1;
 
-         changed = 1;
          strp += 2;            /* skip \[ */
          start = strp;
          start_idx = start - SDATA (string);
@@ -833,7 +849,6 @@ Otherwise, return a new string.  */)
          Lisp_Object earlier_maps;
          ptrdiff_t count = SPECPDL_INDEX ();
 
-         changed = 1;
          strp += 2;            /* skip \{ or \< */
          start = strp;
          start_idx = start - SDATA (string);
@@ -903,6 +918,7 @@ Otherwise, return a new string.  */)
          length = SCHARS (tem);
          length_byte = SBYTES (tem);
        subst:
+         changed = true;
          {
            ptrdiff_t offset = bufp - buf;
            if (STRING_BYTES_BOUND - length_byte < bsize)
@@ -916,6 +932,22 @@ Otherwise, return a new string.  */)
            strp = SDATA (string) + idx;
          }
        }
+      else if (strp[0] == '`')
+       {
+         in_quote = true;
+         start = (unsigned char *) "\xE2\x80\x98"; /* ‘ */
+       subst_quote:
+         length = 1;
+         length_byte = 3;
+         idx = strp - SDATA (string) + 1;
+         goto subst;
+       }
+      else if (strp[0] == '\'' && in_quote)
+       {
+         in_quote = false;
+         start = (unsigned char *) "\xE2\x80\x99"; /* ’ */
+         goto subst_quote;
+       }
       else if (! multibyte)            /* just copy other chars */
        *bufp++ = *strp++, nchars++;
       else
diff --git a/src/editfns.c b/src/editfns.c
index cddb0d4..c387dc7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4500,13 +4500,6 @@ usage: (format STRING &rest OBJECTS)  */)
 
   return val;
 }
-
-Lisp_Object
-format2 (const char *string1, Lisp_Object arg0, Lisp_Object arg1)
-{
-  AUTO_STRING (format, string1);
-  return CALLN (Fformat, format, arg0, arg1);
-}
 
 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,
        doc: /* Return t if two characters match, optionally ignoring case.
diff --git a/src/emacs.c b/src/emacs.c
index c5ed78e..9990798 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -779,12 +779,12 @@ main (int argc, char **argv)
          tem2 = Fsymbol_value (intern_c_string ("emacs-copyright"));
          if (!STRINGP (tem))
            {
-             fprintf (stderr, "Invalid value of `emacs-version'\n");
+             fprintf (stderr, "Invalid value of 'emacs-version'\n");
              exit (1);
            }
          if (!STRINGP (tem2))
            {
-             fprintf (stderr, "Invalid value of `emacs-copyright'\n");
+             fprintf (stderr, "Invalid value of 'emacs-copyright'\n");
              exit (1);
            }
          else
@@ -1802,7 +1802,7 @@ sort_args (int argc, char **argv)
                options[from] = standard_args[i].nargs;
                priority[from] = standard_args[i].priority;
                if (from + standard_args[i].nargs >= argc)
-                 fatal ("Option `%s' requires an argument\n", argv[from]);
+                 fatal ("Option '%s' requires an argument\n", argv[from]);
                from += standard_args[i].nargs;
                goto done;
              }
@@ -1839,7 +1839,7 @@ sort_args (int argc, char **argv)
                  if (equals != 0)
                    options[from] = 0;
                  if (from + options[from] >= argc)
-                   fatal ("Option `%s' requires an argument\n", argv[from]);
+                   fatal ("Option '%s' requires an argument\n", argv[from]);
                  from += options[from];
                }
              /* FIXME When match < 0, shouldn't there be some error,
@@ -2440,7 +2440,10 @@ hpux, irix, usg-unix-v) indicates some sort of Unix 
system.  */);
   DEFVAR_LISP ("system-configuration-features", Vsystem_configuration_features,
               doc: /* String listing some of the main features this Emacs was 
compiled with.
 An element of the form \"FOO\" generally means that HAVE_FOO was
-defined during the build.  */);
+defined during the build.
+
+This is mainly intended for diagnostic purposes in bug reports.
+Don't rely on it for testing whether a feature you want to use is available.  
*/);
   Vsystem_configuration_features = build_string (EMACS_CONFIG_FEATURES);
 
   DEFVAR_BOOL ("noninteractive", noninteractive1,
diff --git a/src/eval.c b/src/eval.c
index 4902261..4655095 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3670,7 +3670,6 @@ before making `inhibit-quit' nil.  */);
   DEFSYM (Qautoload, "autoload");
   DEFSYM (Qinhibit_debugger, "inhibit-debugger");
   DEFSYM (Qmacro, "macro");
-  DEFSYM (Qdeclare, "declare");
 
   /* Note that the process handling also uses Qexit, but we don't want
      to staticpro it twice, so we just do it here.  */
diff --git a/src/fileio.c b/src/fileio.c
index 796f08d..aad0270 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1811,8 +1811,8 @@ barf_or_query_if_file_exists (Lisp_Object absname, bool 
known_to_exist,
        xsignal2 (Qfile_already_exists,
                  build_string ("File already exists"), absname);
       GCPRO1 (absname);
-      tem = format2 ("File %s already exists; %s anyway? ",
-                    absname, build_string (querystring));
+      AUTO_STRING (format, "File %s already exists; %s anyway? ");
+      tem = CALLN (Fformat, format, absname, build_string (querystring));
       if (quick)
        tem = call1 (intern ("y-or-n-p"), tem);
       else
@@ -1871,8 +1871,6 @@ permissions.  */)
   bool already_exists = false;
   mode_t new_mask;
   int ifd, ofd;
-  int n;
-  char buf[16 * 1024];
   struct stat st;
 #endif
 
@@ -1974,6 +1972,8 @@ permissions.  */)
 
   record_unwind_protect_int (close_file_unwind, ofd);
 
+  off_t oldsize = 0, newsize = 0;
+
   if (already_exists)
     {
       struct stat out_st;
@@ -1982,15 +1982,31 @@ permissions.  */)
       if (st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino)
        report_file_errno ("Input and output files are the same",
                           list2 (file, newname), 0);
-      if (ftruncate (ofd, 0) != 0)
-       report_file_error ("Truncating output file", newname);
+      if (S_ISREG (out_st.st_mode))
+       oldsize = out_st.st_size;
     }
 
   immediate_quit = 1;
   QUIT;
-  while ((n = emacs_read (ifd, buf, sizeof buf)) > 0)
-    if (emacs_write_sig (ofd, buf, n) != n)
-      report_file_error ("Write error", newname);
+  while (true)
+    {
+      char buf[MAX_ALLOCA];
+      ptrdiff_t n = emacs_read (ifd, buf, sizeof buf);
+      if (n < 0)
+       report_file_error ("Read error", file);
+      if (n == 0)
+       break;
+      if (emacs_write_sig (ofd, buf, n) != n)
+       report_file_error ("Write error", newname);
+      newsize += n;
+    }
+
+  /* Truncate any existing output file after writing the data.  This
+     is more likely to work than truncation before writing, if the
+     file system is out of space or the user is over disk quota.  */
+  if (newsize < oldsize && ftruncate (ofd, newsize) != 0)
+    report_file_error ("Truncating output file", newname);
+
   immediate_quit = 0;
 
 #ifndef MSDOS
@@ -5803,7 +5819,6 @@ syms_of_fileio (void)
   DEFSYM (Qcopy_file, "copy-file");
   DEFSYM (Qmake_directory_internal, "make-directory-internal");
   DEFSYM (Qmake_directory, "make-directory");
-  DEFSYM (Qdelete_directory_internal, "delete-directory-internal");
   DEFSYM (Qdelete_file, "delete-file");
   DEFSYM (Qrename_file, "rename-file");
   DEFSYM (Qadd_name_to_file, "add-name-to-file");
diff --git a/src/fns.c b/src/fns.c
index 51f61d2..235a4f6 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3954,8 +3954,7 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
 #ifdef ENABLE_CHECKING
       if (HASH_TABLE_P (Vpurify_flag)
          && XHASH_TABLE (Vpurify_flag) == h)
-       CALLN (Fmessage, build_string ("Growing hash table to: %d"),
-              make_number (new_size));
+       message ("Growing hash table to: %"pI"d", new_size);
 #endif
 
       set_hash_key_and_value (h, larger_vector (h->key_and_value,
@@ -5074,8 +5073,6 @@ syms_of_fns (void)
   defsubr (&Sdefine_hash_table_test);
 
   DEFSYM (Qstring_lessp, "string-lessp");
-  DEFSYM (Qstring_collate_lessp, "string-collate-lessp");
-  DEFSYM (Qstring_collate_equalp, "string-collate-equalp");
   DEFSYM (Qprovide, "provide");
   DEFSYM (Qrequire, "require");
   DEFSYM (Qyes_or_no_p_history, "yes-or-no-p-history");
diff --git a/src/font.c b/src/font.c
index 2ccfd15..1405d43 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5133,10 +5133,6 @@ syms_of_font (void)
   DEFSYM (Qiso8859_1, "iso8859-1");
   DEFSYM (Qiso10646_1, "iso10646-1");
   DEFSYM (Qunicode_bmp, "unicode-bmp");
-  DEFSYM (Qunicode_sip, "unicode-sip");
-
-  /* Unicode category `Cf'.  */
-  DEFSYM (QCf, "Cf");
 
   /* Symbols representing keys of font extra info.  */
   DEFSYM (QCotf, ":otf");
@@ -5151,7 +5147,6 @@ syms_of_font (void)
   DEFSYM (QCscalable, ":scalable");
   DEFSYM (QCavgwidth, ":avgwidth");
   DEFSYM (QCfont_entity, ":font-entity");
-  DEFSYM (QCfc_unknown_spec, ":fc-unknown-spec");
 
   /* Symbols representing values of font spacing property.  */
   DEFSYM (Qc, "c");
diff --git a/src/fontset.c b/src/fontset.c
index 763d846..e957c38 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -2143,7 +2143,6 @@ syms_of_fontset (void)
   DEFSYM (Qfontset_info, "fontset-info");
   Fput (Qfontset_info, Qchar_table_extra_slots, make_number (1));
 
-  DEFSYM (Qprepend, "prepend");
   DEFSYM (Qappend, "append");
   DEFSYM (Qlatin, "latin");
 
diff --git a/src/frame.c b/src/frame.c
index 478bb00..e3ad82f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4905,7 +4905,6 @@ syms_of_frame (void)
   DEFSYM (Qframe_inhibit_resize, "frame-inhibit-resize");
   DEFSYM (Qx_set_fullscreen, "x-set-fullscreen");
   DEFSYM (Qx_check_fullscreen, "x-check-fullscreen");
-  DEFSYM (Qx_set_window_size_1, "x-set-window-size-1");
   DEFSYM (Qxg_frame_resized, "xg-frame-resized");
   DEFSYM (Qxg_frame_set_char_size_1, "xg-frame-set-char-size-1");
   DEFSYM (Qxg_frame_set_char_size_2, "xg-frame-set-char-size-2");
@@ -4922,7 +4921,6 @@ syms_of_frame (void)
   DEFSYM (Qset_window_configuration, "set-window-configuration");
   DEFSYM (Qx_create_frame_1, "x-create-frame-1");
   DEFSYM (Qx_create_frame_2, "x-create-frame-2");
-  DEFSYM (Qtip_frame, "tip-frame");
   DEFSYM (Qterminal_frame, "terminal-frame");
 
 #ifdef HAVE_NS
@@ -5074,12 +5072,10 @@ The pointer becomes visible again when the mouse is 
moved.  */);
   DEFVAR_LISP ("focus-in-hook", Vfocus_in_hook,
                doc: /* Normal hook run when a frame gains input focus.  */);
   Vfocus_in_hook = Qnil;
-  DEFSYM (Qfocus_in_hook, "focus-in-hook");
 
   DEFVAR_LISP ("focus-out-hook", Vfocus_out_hook,
                doc: /* Normal hook run when a frame loses input focus.  */);
   Vfocus_out_hook = Qnil;
-  DEFSYM (Qfocus_out_hook, "focus-out-hook");
 
   DEFVAR_LISP ("delete-frame-functions", Vdelete_frame_functions,
               doc: /* Functions run before deleting a frame.
diff --git a/src/ftfont.c b/src/ftfont.c
index f19933c..afeaeca 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2674,7 +2674,6 @@ syms_of_ftfont (void)
   /* Fontconfig's generic families and their aliases.  */
   DEFSYM (Qmonospace, "monospace");
   DEFSYM (Qsans_serif, "sans-serif");
-  DEFSYM (Qserif, "serif");
   DEFSYM (Qsans, "sans");
   DEFSYM (Qsans__serif, "sans serif");
 
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index e03bec9..08713a8 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -236,10 +236,7 @@ globals_of_gfilenotify (void)
 void
 syms_of_gfilenotify (void)
 {
-  DEFSYM (Qgfile_add_watch, "gfile-add-watch");
   defsubr (&Sgfile_add_watch);
-
-  DEFSYM (Qgfile_rm_watch, "gfile-rm-watch");
   defsubr (&Sgfile_rm_watch);
 
   /* Filter objects.  */
diff --git a/src/gnutls.c b/src/gnutls.c
index 9c2d86e..cab2404 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1658,7 +1658,6 @@ syms_of_gnutls (void)
 #ifdef HAVE_GNUTLS
   gnutls_global_initialized = 0;
 
-  DEFSYM (Qgnutls_dll, "gnutls");
   DEFSYM (Qgnutls_code, "gnutls-code");
   DEFSYM (Qgnutls_anon, "gnutls-anon");
   DEFSYM (Qgnutls_x509pki, "gnutls-x509pki");
@@ -1669,7 +1668,6 @@ syms_of_gnutls (void)
   DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles");
   DEFSYM (QCgnutls_bootprop_keylist, ":keylist");
   DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles");
-  DEFSYM (QCgnutls_bootprop_callbacks, ":callbacks");
   DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits");
   DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel");
   DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags");
diff --git a/src/image.c b/src/image.c
index 87029bf..dfa8941 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9773,7 +9773,6 @@ non-numeric, there is no explicit limit on the size of 
images.  */);
   DEFSYM (QCcolor_symbols, ":color-symbols");
   DEFSYM (QCheuristic_mask, ":heuristic-mask");
   DEFSYM (QCindex, ":index");
-  DEFSYM (QCgeometry, ":geometry");
   DEFSYM (QCcrop, ":crop");
   DEFSYM (QCrotation, ":rotation");
   DEFSYM (QCmatrix, ":matrix");
@@ -9792,7 +9791,6 @@ non-numeric, there is no explicit limit on the size of 
images.  */);
 #ifdef HAVE_GHOSTSCRIPT
   ADD_IMAGE_TYPE (Qpostscript);
   DEFSYM (QCloader, ":loader");
-  DEFSYM (QCbounding_box, ":bounding-box");
   DEFSYM (QCpt_width, ":pt-width");
   DEFSYM (QCpt_height, ":pt-height");
 #endif /* HAVE_GHOSTSCRIPT */
diff --git a/src/keyboard.c b/src/keyboard.c
index 16f10de..3ee039d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11089,10 +11089,6 @@ syms_of_keyboard (void)
   tool_bar_items_vector = Qnil;
 
   DEFSYM (Qtimer_event_handler, "timer-event-handler");
-  DEFSYM (Qdisabled_command_function, "disabled-command-function");
-  DEFSYM (Qself_insert_command, "self-insert-command");
-  DEFSYM (Qforward_char, "forward-char");
-  DEFSYM (Qbackward_char, "backward-char");
 
   /* Non-nil disable property on a command means do not execute it;
      call disabled-command-function's value instead.  */
@@ -11204,7 +11200,6 @@ syms_of_keyboard (void)
   DEFSYM (Qhandle_switch_frame, "handle-switch-frame");
   DEFSYM (Qhandle_select_window, "handle-select-window");
 
-  DEFSYM (Qinput_method_function, "input-method-function");
   DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char");
   DEFSYM (Qinput_method_use_echo_area, "input-method-use-echo-area");
 
diff --git a/src/keymap.c b/src/keymap.c
index e989805..8f4ac0d 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3739,9 +3739,6 @@ be preferred.  */);
                         intern_c_string ("mouse-4"),
                         intern_c_string ("mouse-5"));
 
-  DEFSYM (Qsingle_key_description, "single-key-description");
-  DEFSYM (Qkey_description, "key-description");
-
   /* Keymap used for minibuffers when doing completion.  */
   /* Keymap used for minibuffers when doing completion and require a match.  */
   DEFSYM (Qkeymapp, "keymapp");
diff --git a/src/lisp.h b/src/lisp.h
index 14baec6..9839cfd 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4059,7 +4059,6 @@ extern bool let_shadows_global_binding_p (Lisp_Object 
symbol);
 
 /* Defined in editfns.c.  */
 extern void insert1 (Lisp_Object);
-extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
 extern Lisp_Object save_excursion_save (void);
 extern Lisp_Object save_restriction_save (void);
 extern void save_excursion_restore (Lisp_Object);
diff --git a/src/lread.c b/src/lread.c
index 26c19d8..11c8d00 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4418,9 +4418,10 @@ init_lread (void)
 void
 dir_warning (char const *use, Lisp_Object dirname)
 {
-  static char const format[] = "Warning: %s `%s': %s\n";
+  static char const format[] = "Warning: %s '%s': %s\n";
   int access_errno = errno;
-  fprintf (stderr, format, use, SSDATA (dirname), strerror (access_errno));
+  fprintf (stderr, format, use, SSDATA (ENCODE_SYSTEM (dirname)),
+          strerror (access_errno));
 
   /* Don't log the warning before we've initialized!!  */
   if (initialized)
diff --git a/src/macros.c b/src/macros.c
index e5b8ab7..79ed5b5 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -358,8 +358,6 @@ init_macros (void)
 void
 syms_of_macros (void)
 {
-  DEFSYM (Qexecute_kbd_macro, "execute-kbd-macro");
-
   DEFVAR_LISP ("kbd-macro-termination-hook", Vkbd_macro_termination_hook,
                doc: /* Normal hook run whenever a keyboard macro terminates.
 This is run whether the macro ends normally or prematurely due to an error.  
*/);
diff --git a/src/minibuf.c b/src/minibuf.c
index c033169..03be8d1 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1910,13 +1910,10 @@ syms_of_minibuf (void)
   staticpro (&minibuf_save_list);
 
   DEFSYM (Qcompletion_ignore_case, "completion-ignore-case");
-  DEFSYM (Qread_file_name_internal, "read-file-name-internal");
   DEFSYM (Qminibuffer_default, "minibuffer-default");
   Fset (Qminibuffer_default, Qnil);
 
   DEFSYM (Qminibuffer_completion_table, "minibuffer-completion-table");
-  DEFSYM (Qminibuffer_completion_confirm, "minibuffer-completion-confirm");
-  DEFSYM (Qminibuffer_completion_predicate, "minibuffer-completion-predicate");
 
   staticpro (&last_minibuf_string);
   last_minibuf_string = Qnil;
@@ -1944,8 +1941,6 @@ syms_of_minibuf (void)
 For example, `eval-expression' uses this.  */);
   Vread_expression_history = Qnil;
 
-  DEFSYM (Qread_expression_history, "read-expression-history");
-
   DEFVAR_LISP ("read-buffer-function", Vread_buffer_function,
               doc: /* If this is non-nil, `read-buffer' does its work by 
calling this function.
 The function is called with the arguments passed to `read-buffer'.  */);
diff --git a/src/nsfont.m b/src/nsfont.m
index 683ab17..d450df3 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1528,7 +1528,6 @@ syms_of_nsfont (void)
   DEFSYM (Qcondensed, "condensed");
   DEFSYM (Qexpanded, "expanded");
   DEFSYM (Qapple, "apple");
-  DEFSYM (Qroman, "roman");
   DEFSYM (Qmedium, "medium");
   DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script,
                doc: /* Internal use: maps font registry to Unicode script. */);
diff --git a/src/print.c b/src/print.c
index 8b31f2c..e1cf7c0 100644
--- a/src/print.c
+++ b/src/print.c
@@ -31,6 +31,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "window.h"
 #include "process.h"
 #include "dispextern.h"
+#include "disptab.h"
 #include "termchar.h"
 #include "intervals.h"
 #include "blockinput.h"
@@ -199,6 +200,61 @@ print_unwind (Lisp_Object saved_text)
   memcpy (print_buffer, SDATA (saved_text), SCHARS (saved_text));
 }
 
+/* Print character CH to the stdio stream STREAM.  */
+
+static void
+printchar_to_stream (unsigned int ch, FILE *stream)
+{
+  Lisp_Object dv IF_LINT (= Qnil);
+  ptrdiff_t i = 0, n = 1;
+
+  if (CHAR_VALID_P (ch) && DISP_TABLE_P (Vstandard_display_table))
+    {
+      dv = DISP_CHAR_VECTOR (XCHAR_TABLE (Vstandard_display_table), ch);
+      if (VECTORP (dv))
+       {
+         n = ASIZE (dv);
+         goto next_char;
+       }
+    }
+
+  while (true)
+    {
+      if (ASCII_CHAR_P (ch))
+       {
+         putc (ch, stream);
+#ifdef WINDOWSNT
+         /* Send the output to a debugger (nothing happens if there
+            isn't one).  */
+         if (print_output_debug_flag && stream == stderr)
+           OutputDebugString ((char []) {ch, '\0'});
+#endif
+       }
+      else
+       {
+         unsigned char mbstr[MAX_MULTIBYTE_LENGTH];
+         int len = CHAR_STRING (ch, mbstr);
+         Lisp_Object encoded_ch =
+           ENCODE_SYSTEM (make_multibyte_string ((char *) mbstr, 1, len));
+
+         fwrite (SSDATA (encoded_ch), 1, SBYTES (encoded_ch), stream);
+#ifdef WINDOWSNT
+         if (print_output_debug_flag && stream == stderr)
+           OutputDebugString (SSDATA (encoded_ch));
+#endif
+       }
+
+      i++;
+
+    next_char:
+      for (; i < n; i++)
+       if (CHARACTERP (AREF (dv, i)))
+         break;
+      if (! (i < n))
+       break;
+      ch = XFASTINT (AREF (dv, i));
+    }
+}
 
 /* Print character CH using method FUN.  FUN nil means print to
    print_buffer.  FUN t means print to echo area or stdout if
@@ -230,7 +286,10 @@ printchar (unsigned int ch, Lisp_Object fun)
       else if (noninteractive)
        {
          printchar_stdout_last = ch;
-         fwrite (str, 1, len, stdout);
+         if (DISP_TABLE_P (Vstandard_display_table))
+           printchar_to_stream (ch, stdout);
+         else
+           fwrite (str, 1, len, stdout);
          noninteractive_need_newline = 1;
        }
       else
@@ -271,7 +330,19 @@ strout (const char *ptr, ptrdiff_t size, ptrdiff_t 
size_byte,
     }
   else if (noninteractive && EQ (printcharfun, Qt))
     {
-      fwrite (ptr, 1, size_byte, stdout);
+      if (DISP_TABLE_P (Vstandard_display_table))
+       {
+         int len;
+         for (ptrdiff_t i = 0; i < size_byte; i += len)
+           {
+             int ch = STRING_CHAR_AND_LENGTH ((const unsigned char *) ptr + i,
+                                              len);
+             printchar_to_stream (ch, stdout);
+           }
+       }
+      else
+       fwrite (ptr, 1, size_byte, stdout);
+
       noninteractive_need_newline = 1;
     }
   else if (EQ (printcharfun, Qt))
@@ -692,37 +763,8 @@ You can call print while debugging emacs, and pass it this 
function
 to make it write to the debugging output.  */)
   (Lisp_Object character)
 {
-  unsigned int ch;
-
   CHECK_NUMBER (character);
-  ch = XINT (character);
-  if (ASCII_CHAR_P (ch))
-    {
-      putc (ch, stderr);
-#ifdef WINDOWSNT
-      /* Send the output to a debugger (nothing happens if there isn't
-        one).  */
-      if (print_output_debug_flag)
-       {
-         char buf[2] = {(char) XINT (character), '\0'};
-         OutputDebugString (buf);
-       }
-#endif
-    }
-  else
-    {
-      unsigned char mbstr[MAX_MULTIBYTE_LENGTH];
-      ptrdiff_t len = CHAR_STRING (ch, mbstr);
-      Lisp_Object encoded_ch =
-       ENCODE_SYSTEM (make_multibyte_string ((char *) mbstr, 1, len));
-
-      fwrite (SSDATA (encoded_ch), SBYTES (encoded_ch), 1, stderr);
-#ifdef WINDOWSNT
-      if (print_output_debug_flag)
-       OutputDebugString (SSDATA (encoded_ch));
-#endif
-    }
-
+  printchar_to_stream (XINT (character), stderr);
   return character;
 }
 
@@ -2190,7 +2232,6 @@ decimal point.  0 is not allowed with `e' or `g'.
 A value of nil means to use the shortest notation
 that represents the number without losing information.  */);
   Vfloat_output_format = Qnil;
-  DEFSYM (Qfloat_output_format, "float-output-format");
 
   DEFVAR_LISP ("print-length", Vprint_length,
               doc: /* Maximum length of list to print before abbreviating.
diff --git a/src/process.c b/src/process.c
index ce78d81..17fe708 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3292,8 +3292,7 @@ usage: (make-network-process &rest ARGS)  */)
     {
       if (!NILP (host))
        {
-         message (":family local ignores the :host \"%s\" property",
-                  SDATA (host));
+         message (":family local ignores the :host property");
          contact = Fplist_put (contact, QChost, Qnil);
          host = Qnil;
        }
@@ -7575,7 +7574,6 @@ syms_of_process (void)
   DEFSYM (QClog, ":log");
   DEFSYM (QCnoquery, ":noquery");
   DEFSYM (QCstop, ":stop");
-  DEFSYM (QCoptions, ":options");
   DEFSYM (QCplist, ":plist");
   DEFSYM (QCcommand, ":command");
   DEFSYM (QCconnection_type, ":connection-type");
diff --git a/src/term.c b/src/term.c
index d2a9c3d..8ebb620 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4028,12 +4028,12 @@ init_tty (const char *name, const char *terminal_type, 
bool must_succeed)
                    "Terminal type %s is not defined",
                    "Terminal type %s is not defined.\n\
 If that is not the actual type of terminal you have,\n\
-use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n"
+use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
+'setenv TERM ...') to specify the correct type.  It may be necessary\n"
 #ifdef TERMINFO
-"to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
+"to do 'unset TERMINFO' (C-shell: 'unsetenv TERMINFO') as well.",
 #else
-"to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
+"to do 'unset TERMCAP' (C-shell: 'unsetenv TERMCAP') as well.",
 #endif
                    terminal_type);
     }
@@ -4307,12 +4307,12 @@ use the Bourne shell command `TERM=... export TERM' 
(C-shell:\n\
                    "Terminal type \"%s\" is not powerful enough to run 
Emacs.\n\
 It lacks the ability to position the cursor.\n\
 If that is not the actual type of terminal you have,\n\
-use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n"
+use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
+'setenv TERM ...') to specify the correct type.  It may be necessary\n"
 # ifdef TERMINFO
-"to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
+"to do 'unset TERMINFO' (C-shell: 'unsetenv TERMINFO') as well.",
 # else /* TERMCAP */
-"to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
+"to do 'unset TERMCAP' (C-shell: 'unsetenv TERMCAP') as well.",
 # endif /* TERMINFO */
                    terminal_type);
     }
diff --git a/src/textprop.c b/src/textprop.c
index 0a591d0..f6dbab0 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2344,8 +2344,16 @@ returned. */);
 
   DEFVAR_LISP ("inhibit-point-motion-hooks", Vinhibit_point_motion_hooks,
               doc: /* If non-nil, don't run `point-left' and `point-entered' 
text properties.
-This also inhibits the use of the `intangible' text property.  */);
-  Vinhibit_point_motion_hooks = Qnil;
+This also inhibits the use of the `intangible' text property.
+
+This variable is obsolete since Emacs-25.1.  Use `cursor-intangible-mode'
+or `cursor-sensor-mode' instead.  */);
+  /* FIXME: We should make-obsolete-variable, but that signals too many
+     warnings in code which does (let ((inhibit-point-motion-hooks t)) ...)
+     Ideally, make-obsolete-variable should let us specify that only the nil
+     value is obsolete, but that requires too many changes in bytecomp.el,
+     so for now we'll keep it "obsolete via the docstring".  */
+  Vinhibit_point_motion_hooks = Qt;
 
   DEFVAR_LISP ("text-property-default-nonsticky",
               Vtext_property_default_nonsticky,
@@ -2369,12 +2377,8 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' 
and
 
   /* Common attributes one might give text.  */
 
-  DEFSYM (Qforeground, "foreground");
-  DEFSYM (Qbackground, "background");
   DEFSYM (Qfont, "font");
   DEFSYM (Qface, "face");
-  DEFSYM (Qstipple, "stipple");
-  DEFSYM (Qunderline, "underline");
   DEFSYM (Qread_only, "read-only");
   DEFSYM (Qinvisible, "invisible");
   DEFSYM (Qintangible, "intangible");
@@ -2387,8 +2391,6 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' 
and
 
   /* Properties that text might use to specify certain actions.  */
 
-  DEFSYM (Qmouse_left, "mouse-left");
-  DEFSYM (Qmouse_entered, "mouse-entered");
   DEFSYM (Qpoint_left, "point-left");
   DEFSYM (Qpoint_entered, "point-entered");
 
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index fe6637e..319ec79 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -99,6 +99,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "unexec.h"
 #include "lisp.h"
 
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -1264,14 +1265,14 @@ unexec (const char *outfile, const char *infile)
   infd = emacs_open (infile, O_RDONLY, 0);
   if (infd < 0)
     {
-      unexec_error ("cannot open input file `%s'", infile);
+      unexec_error ("%s: %s", infile, strerror (errno));
     }
 
   outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0777);
   if (outfd < 0)
     {
       emacs_close (infd);
-      unexec_error ("cannot open output file `%s'", outfile);
+      unexec_error ("%s: %s", outfile, strerror (errno));
     }
 
   build_region_list ();
diff --git a/src/w32fns.c b/src/w32fns.c
index 3a6fa62..c247a9b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -8347,6 +8347,14 @@ syms_of_w32fns (void)
   DEFSYM (Qworkarea, "workarea");
   DEFSYM (Qmm_size, "mm-size");
   DEFSYM (Qframes, "frames");
+  DEFSYM (Qtip_frame, "tip-frame");
+  DEFSYM (Qunicode_sip, "unicode-sip");
+
+  /* Symbols used elsewhere, but only in MS-Windows-specific code.  */
+  DEFSYM (Qgnutls_dll, "gnutls");
+  DEFSYM (Qlibxml2_dll, "libxml2");
+  DEFSYM (Qserif, "serif");
+  DEFSYM (Qzlib_dll, "zlib");
 
   Fput (Qundefined_color, Qerror_conditions,
        listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
diff --git a/src/w32font.c b/src/w32font.c
index 7799459..6306a84 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -439,14 +439,13 @@ w32font_text_extents (struct font *font, unsigned *code,
   int total_width = 0;
   WORD *wcode;
   SIZE size;
+  bool first;
 
   struct w32font_info *w32_font = (struct w32font_info *) font;
 
   memset (metrics, 0, sizeof (struct font_metrics));
-  metrics->ascent = font->ascent;
-  metrics->descent = font->descent;
 
-  for (i = 0; i < nglyphs; i++)
+  for (i = 0, first = true; i < nglyphs; i++)
     {
       struct w32_metric_cache *char_metric;
       int block = *(code + i) / CACHE_BLOCKSIZE;
@@ -495,11 +494,24 @@ w32font_text_extents (struct font *font, unsigned *code,
 
       if (char_metric->status == W32METRIC_SUCCESS)
        {
-         metrics->lbearing = min (metrics->lbearing,
-                                  metrics->width + char_metric->lbearing);
-         metrics->rbearing = max (metrics->rbearing,
-                                  metrics->width + char_metric->rbearing);
+         if (first)
+           {
+             metrics->lbearing = char_metric->lbearing;
+             metrics->rbearing = char_metric->rbearing;
+             metrics->width    = 0;
+             metrics->ascent   = char_metric->ascent;
+             metrics->descent  = char_metric->descent;
+             first = false;
+           }
+         if (metrics->lbearing > char_metric->lbearing)
+           metrics->lbearing = char_metric->lbearing;
+         if (metrics->rbearing < char_metric->rbearing)
+           metrics->rbearing = char_metric->rbearing;
          metrics->width += char_metric->width;
+         if (metrics->ascent < char_metric->ascent)
+           metrics->ascent = char_metric->ascent;
+         if (metrics->descent < char_metric->descent)
+           metrics->descent = char_metric->descent;
        }
       else
        /* If we couldn't get metrics for a char,
@@ -574,6 +586,8 @@ w32font_text_extents (struct font *font, unsigned *code,
   metrics->width = total_width - w32_font->metrics.tmOverhang;
   metrics->lbearing = 0;
   metrics->rbearing = total_width;
+  metrics->ascent = font->ascent;
+  metrics->descent = font->descent;
 
   /* Restore state and release DC.  */
   SelectObject (dc, old_font);
@@ -2415,6 +2429,8 @@ compute_metrics (HDC dc, struct w32font_info *w32_font, 
unsigned int code,
       metrics->lbearing = gm.gmptGlyphOrigin.x;
       metrics->rbearing = gm.gmptGlyphOrigin.x + gm.gmBlackBoxX;
       metrics->width = gm.gmCellIncX;
+      metrics->ascent = gm.gmptGlyphOrigin.y;
+      metrics->descent = gm.gmBlackBoxY - gm.gmptGlyphOrigin.y;
       metrics->status = W32METRIC_SUCCESS;
     }
   else if (get_char_width_32_w (dc, code, code, &width) != 0)
@@ -2422,6 +2438,8 @@ compute_metrics (HDC dc, struct w32font_info *w32_font, 
unsigned int code,
       metrics->lbearing = 0;
       metrics->rbearing = width;
       metrics->width = width;
+      metrics->ascent = w32_font->font.ascent;
+      metrics->descent = w32_font->font.descent;
       metrics->status = W32METRIC_SUCCESS;
     }
   else
diff --git a/src/w32font.h b/src/w32font.h
index 0ad0125..6365cb3 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -37,7 +37,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 struct w32_metric_cache
 {
-  short lbearing, rbearing, width;
+  short lbearing, rbearing, width, ascent, descent;
   unsigned char status;
 };
 
diff --git a/src/w32term.c b/src/w32term.c
index 089c43c..0bc2e98 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -401,7 +401,13 @@ w32_draw_rectangle (HDC hdc, XGCValues *gc, int x, int y,
   oldhb = SelectObject (hdc, hb);
   oldhp = SelectObject (hdc, hp);
 
-  Rectangle (hdc, x, y, x + width, y + height);
+  /* We enlarge WIDTH and HEIGHT by 1 to be bug-compatible to the
+     brain-dead design of XDrawRectangle, which draws a rectangle that
+     is 1 pixel wider and higher than its arguments WIDTH and HEIGHT.
+     This allows us to keep the code that calls this function similar
+     to the corresponding code in xterm.c.  For the details, see
+     http://lists.gnu.org/archives/html/emacs-devel/2014-10/msg00546.html.  */
+  Rectangle (hdc, x, y, x + width + 1, y + height + 1);
 
   SelectObject (hdc, oldhb);
   SelectObject (hdc, oldhp);
diff --git a/src/window.c b/src/window.c
index fae4522..c1e82ec 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7335,7 +7335,6 @@ syms_of_window (void)
   DEFSYM (Qwindow_size, "window-size");
   DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook");
   DEFSYM (Qabove, "above");
-  DEFSYM (Qbelow, "below");
   DEFSYM (Qclone_of, "clone-of");
   DEFSYM (Qfloor, "floor");
   DEFSYM (Qceiling, "ceiling");
diff --git a/src/xdisp.c b/src/xdisp.c
index 4cf620e..58f2c34 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10274,7 +10274,11 @@ message_with_string (const char *m, Lisp_Object 
string, bool log)
 
 
 /* Dump an informative message to the minibuf.  If M is 0, clear out
-   any existing message, and let the mini-buffer text show through.  */
+   any existing message, and let the mini-buffer text show through.
+
+   The message must be safe ASCII only.  If strings may contain escape
+   sequences or non-ASCII characters, convert them to Lisp strings and
+   use Fmessage.  */
 
 static void ATTRIBUTE_FORMAT_PRINTF (1, 0)
 vmessage (const char *m, va_list ap)
@@ -10342,24 +10346,6 @@ message (const char *m, ...)
 }
 
 
-#if false
-/* The non-logging version of message.  */
-
-void
-message_nolog (const char *m, ...)
-{
-  Lisp_Object old_log_max;
-  va_list ap;
-  va_start (ap, m);
-  old_log_max = Vmessage_log_max;
-  Vmessage_log_max = Qnil;
-  vmessage (m, ap);
-  Vmessage_log_max = old_log_max;
-  va_end (ap);
-}
-#endif
-
-
 /* Display the current message in the current mini-buffer.  This is
    only called from error handlers in process.c, and is not time
    critical.  */
@@ -30788,9 +30774,7 @@ They are still logged to the *Messages* buffer.  */);
   DEFSYM (Qcircle, "circle");
   DEFSYM (Qpoly, "poly");
 
-  /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable.  */
   DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update");
-  DEFSYM (Qmessage_truncate_lines, "message-truncate-lines");
 
   DEFSYM (Qgrow_only, "grow-only");
   DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay");
diff --git a/src/xfaces.c b/src/xfaces.c
index d198c4b..f0b6d39 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6378,7 +6378,6 @@ syms_of_xfaces (void)
   /* Names of basic faces.  */
   DEFSYM (Qdefault, "default");
   DEFSYM (Qtool_bar, "tool-bar");
-  DEFSYM (Qregion, "region");
   DEFSYM (Qfringe, "fringe");
   DEFSYM (Qheader_line, "header-line");
   DEFSYM (Qscroll_bar, "scroll-bar");
@@ -6400,13 +6399,6 @@ syms_of_xfaces (void)
   /* The name of the function used to compute colors on TTYs.  */
   DEFSYM (Qtty_color_alist, "tty-color-alist");
 
-  /* Allowed scalable fonts.  A value of nil means don't allow any
-     scalable fonts.  A value of t means allow the use of any scalable
-     font.  Otherwise, value must be a list of regular expressions.  A
-     font may be scaled if its name matches a regular expression in the
-     list.  */
-  DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed");
-
   Vparam_value_alist = list1 (Fcons (Qnil, Qnil));
   staticpro (&Vparam_value_alist);
   Vface_alternative_font_family_alist = Qnil;
diff --git a/src/xfns.c b/src/xfns.c
index 5ac58e9..634881d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1084,8 +1084,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, 
Lisp_Object oldval)
          y = FRAME_TOP_MARGIN_HEIGHT (f);
 
          block_input ();
-         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       0, y, width, height);
+         x_clear_area (f, 0, y, width, height);
          unblock_input ();
        }
 
@@ -1095,8 +1094,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, 
Lisp_Object oldval)
          height = nlines * FRAME_LINE_HEIGHT (f) - y;
 
          block_input ();
-         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       0, y, width, height);
+         x_clear_area (f, 0, y, width, height);
          unblock_input ();
        }
 
@@ -4521,7 +4519,8 @@ select_visual (struct x_display_info *dpyinfo)
       if (class == -1
          || !XMatchVisualInfo (dpy, XScreenNumberOfScreen (screen),
                                dpyinfo->n_planes, class, &vinfo))
-       fatal ("Invalid visual specification `%s'", SDATA (value));
+       fatal ("Invalid visual specification '%s'",
+              SSDATA (ENCODE_SYSTEM (value)));
 
       dpyinfo->visual = vinfo.visual;
     }
diff --git a/src/xml.c b/src/xml.c
index a3f9239..9e68fff 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -287,8 +287,6 @@ syms_of_xml (void)
 {
   defsubr (&Slibxml_parse_html_region);
   defsubr (&Slibxml_parse_xml_region);
-
-  DEFSYM (Qlibxml2_dll, "libxml2");
 }
 
 #endif /* HAVE_LIBXML2 */
diff --git a/src/xselect.c b/src/xselect.c
index 1570c4f..19ace06 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -2208,8 +2208,7 @@ x_clipboard_manager_save_all (void)
       local_frame = XCAR (XCDR (XCDR (XCDR (local_selection))));
       if (FRAME_LIVE_P (XFRAME (local_frame)))
        {
-         AUTO_STRING (saving, "Saving clipboard to X clipboard manager...");
-         Fmessage (1, &saving);
+         message ("Saving clipboard to X clipboard manager...");
          internal_condition_case_1 (x_clipboard_manager_save, local_frame,
                                     Qt, x_clipboard_manager_error_2);
        }
@@ -2688,11 +2687,9 @@ A value of 0 means wait as long as necessary.  This is 
initialized from the
   DEFSYM (QEMACS_TMP, "_EMACS_TMP_");
   DEFSYM (QTARGETS, "TARGETS");
   DEFSYM (QATOM, "ATOM");
-  DEFSYM (QATOM_PAIR, "ATOM_PAIR");
   DEFSYM (QCLIPBOARD_MANAGER, "CLIPBOARD_MANAGER");
   DEFSYM (QSAVE_TARGETS, "SAVE_TARGETS");
   DEFSYM (QNULL, "NULL");
-  DEFSYM (Qcompound_text_with_extensions, "compound-text-with-extensions");
   DEFSYM (Qforeign_selection, "foreign-selection");
   DEFSYM (Qx_lost_selection_functions, "x-lost-selection-functions");
   DEFSYM (Qx_sent_selection_functions, "x-sent-selection-functions");
diff --git a/src/xterm.c b/src/xterm.c
index d63790e..5733e44 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2094,7 +2094,7 @@ cvt_string_to_pixel (Display *dpy, XrmValue *args, 
Cardinal *nargs,
       params[0] = color_name;
       XtAppWarningMsg (XtDisplayToApplicationContext (dpy),
                       "badValue", "cvt_string_to_pixel",
-                      "XtToolkitError", "Invalid color `%s'",
+                      "XtToolkitError", "Invalid color '%s'",
                       params, &nparams);
       return False;
     }
@@ -9402,7 +9402,7 @@ x_io_error_quitter (Display *display)
 {
   char buf[256];
 
-  snprintf (buf, sizeof buf, "Connection lost to X server `%s'",
+  snprintf (buf, sizeof buf, "Connection lost to X server '%s'",
            DisplayString (display));
   x_connection_closed (display, buf, true);
   return 0;
diff --git a/test/automated/ert-x-tests.el b/test/automated/ert-x-tests.el
index 81d0f7c..6172133 100644
--- a/test/automated/ert-x-tests.el
+++ b/test/automated/ert-x-tests.el
@@ -195,8 +195,9 @@
           (let ((case-fold-search nil))
             (should (string-match (concat
                                    "\\`ert-test-describe-test is a test"
-                                   " defined in `ert-x-tests.elc?'\\.\n\n"
-                                   "Tests `ert-describe-test'\\.\n\\'")
+                                   " defined in"
+                                   " [`‘]ert-x-tests.elc?['’]\\.\n\n"
+                                   "Tests [`‘]ert-describe-test['’]\\.\n\\'")
                                   (buffer-string)))))))))
 
 (ert-deftest ert-test-message-log-truncation ()
diff --git a/test/automated/f90.el b/test/automated/f90.el
index 1cb2f03..4c1abc3 100644
--- a/test/automated/f90.el
+++ b/test/automated/f90.el
@@ -188,5 +188,30 @@ end program prog")
     (f90-end-of-subprogram)
     (should (= (point) (point-max)))))
 
+(ert-deftest f90-test-bug20680 ()
+  "Test for http://debbugs.gnu.org/20680 ."
+  (with-temp-buffer
+    (f90-mode)
+    (insert "module modname
+type, extends ( sometype ) :: type1
+integer :: part1
+end type type1
+end module modname")
+    (f90-indent-subprogram)
+    (forward-line -1)
+    (should (= 2 (current-indentation)))))
+
+(ert-deftest f90-test-bug20680b ()
+  "Test for http://debbugs.gnu.org/20680 ."
+  (with-temp-buffer
+    (f90-mode)
+    (insert "module modname
+enum, bind(c)
+enumerator :: e1 = 0
+end enum
+end module modname")
+    (f90-indent-subprogram)
+    (forward-line -1)
+    (should (= 2 (current-indentation)))))
 
 ;;; f90.el ends here
diff --git a/test/automated/file-notify-tests.el 
b/test/automated/file-notify-tests.el
index 46d287f..a45eff7 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -57,6 +57,7 @@
 
 (defvar file-notify--test-tmpfile nil)
 (defvar file-notify--test-tmpfile1 nil)
+(defvar file-notify--test-desc nil)
 (defvar file-notify--test-results nil)
 (defvar file-notify--test-event nil)
 
@@ -84,20 +85,21 @@ being the result.")
 (defun file-notify--test-remote-enabled ()
   "Whether remote file notification is enabled."
   (unless (consp file-notify--test-remote-enabled-checked)
-    (let (desc)
-      (unwind-protect
-         (ignore-errors
-           (and
-            (file-remote-p file-notify-test-remote-temporary-file-directory)
-            (file-directory-p file-notify-test-remote-temporary-file-directory)
-            (file-writable-p file-notify-test-remote-temporary-file-directory)
-            (setq desc
-                  (file-notify-add-watch
-                   file-notify-test-remote-temporary-file-directory
-                   '(change) 'ignore))))
-       ;; Unwind forms.
-       (setq file-notify--test-remote-enabled-checked (cons t desc))
-       (when desc (file-notify-rm-watch desc)))))
+    (unwind-protect
+        (ignore-errors
+          (and
+           (file-remote-p file-notify-test-remote-temporary-file-directory)
+           (file-directory-p file-notify-test-remote-temporary-file-directory)
+           (file-writable-p file-notify-test-remote-temporary-file-directory)
+           (setq file-notify--test-desc
+                 (file-notify-add-watch
+                  file-notify-test-remote-temporary-file-directory
+                  '(change) 'ignore))))
+      ;; Unwind forms.
+      (setq file-notify--test-remote-enabled-checked
+            (cons t file-notify--test-desc))
+      (when file-notify--test-desc
+        (file-notify-rm-watch file-notify--test-desc))))
   ;; Return result.
   (cdr file-notify--test-remote-enabled-checked))
 
@@ -116,11 +118,11 @@ being the result.")
 (ert-deftest file-notify-test00-availability ()
   "Test availability of `file-notify'."
   (skip-unless (file-notify--test-local-enabled))
-  (let (desc)
-    ;; Check, that different valid parameters are accepted.
-    (should (setq desc (file-notify-add-watch
-                       temporary-file-directory '(change) 'ignore)))
-    (file-notify-rm-watch desc)))
+  ;; Check, that different valid parameters are accepted.
+  (should
+   (setq file-notify--test-desc
+         (file-notify-add-watch temporary-file-directory '(change) 'ignore)))
+  (file-notify-rm-watch file-notify--test-desc))
 
 (file-notify--deftest-remote file-notify-test00-availability
   "Test availability of `file-notify' for remote files.")
@@ -128,34 +130,37 @@ being the result.")
 (ert-deftest file-notify-test01-add-watch ()
   "Check `file-notify-add-watch'."
   (skip-unless (file-notify--test-local-enabled))
-  (let (desc)
-    ;; Check, that different valid parameters are accepted.
-    (should (setq desc (file-notify-add-watch
-                       temporary-file-directory '(change) 'ignore)))
-    (file-notify-rm-watch desc)
-    (should (setq desc (file-notify-add-watch
-                       temporary-file-directory
-                       '(attribute-change) 'ignore)))
-    (file-notify-rm-watch desc)
-    (should (setq desc (file-notify-add-watch
-                       temporary-file-directory
-                       '(change attribute-change) 'ignore)))
-    (file-notify-rm-watch desc)
-
-    ;; Check error handling.
-    (should-error (file-notify-add-watch 1 2 3 4)
-                 :type 'wrong-number-of-arguments)
-    (should
-     (equal (should-error (file-notify-add-watch 1 2 3))
-           '(wrong-type-argument 1)))
-    (should
-     (equal (should-error (file-notify-add-watch
-                          temporary-file-directory 2 3))
-           '(wrong-type-argument 2)))
-    (should
-     (equal (should-error (file-notify-add-watch
-                          temporary-file-directory '(change) 3))
-           '(wrong-type-argument 3)))))
+  ;; Check, that different valid parameters are accepted.
+  (should
+   (setq file-notify--test-desc
+         (file-notify-add-watch temporary-file-directory '(change) 'ignore)))
+  (file-notify-rm-watch file-notify--test-desc)
+  (should
+   (setq file-notify--test-desc
+         (file-notify-add-watch
+          temporary-file-directory '(attribute-change) 'ignore)))
+  (file-notify-rm-watch file-notify--test-desc)
+  (should
+   (setq file-notify--test-desc
+         (file-notify-add-watch
+          temporary-file-directory '(change attribute-change) 'ignore)))
+  (file-notify-rm-watch file-notify--test-desc)
+
+  ;; Check error handling.
+  (should-error (file-notify-add-watch 1 2 3 4)
+                :type 'wrong-number-of-arguments)
+  (should
+   (equal (should-error
+           (file-notify-add-watch 1 2 3))
+          '(wrong-type-argument 1)))
+  (should
+   (equal (should-error
+           (file-notify-add-watch temporary-file-directory 2 3))
+          '(wrong-type-argument 2)))
+  (should
+   (equal (should-error
+           (file-notify-add-watch temporary-file-directory '(change) 3))
+          '(wrong-type-argument 3))))
 
 (file-notify--deftest-remote file-notify-test01-add-watch
   "Check `file-notify-add-watch' for remote files.")
@@ -165,6 +170,8 @@ being the result.")
 We cannot pass arguments, so we assume that `file-notify--test-event'
 is bound somewhere."
   ;(message "Event %S" file-notify--test-event)
+  ;; Check the descriptor.
+  (should (equal (car file-notify--test-event) file-notify--test-desc))
   ;; Check the file name.
   (should
    (string-equal (file-notify--event-file-name file-notify--test-event)
@@ -199,42 +206,42 @@ TIMEOUT is the maximum time to wait for, in seconds."
 (ert-deftest file-notify-test02-events ()
   "Check file creation/removal notifications."
   (skip-unless (file-notify--test-local-enabled))
-  (let (desc)
-    (unwind-protect
-       (progn
-         (setq file-notify--test-results nil
-               file-notify--test-tmpfile (file-notify--test-make-temp-name)
-               file-notify--test-tmpfile1 (file-notify--test-make-temp-name)
-               desc
-               (file-notify-add-watch
-                file-notify--test-tmpfile
-                '(change) 'file-notify--test-event-handler))
-
-         ;; Check creation and removal.
-         (write-region
-          "any text" nil file-notify--test-tmpfile nil 'no-message)
-         (delete-file file-notify--test-tmpfile)
-         (sleep-for 0.1)
-
-         ;; Check copy and rename.
-         (write-region
-          "any text" nil file-notify--test-tmpfile nil 'no-message)
-         (copy-file file-notify--test-tmpfile file-notify--test-tmpfile1)
-         (delete-file file-notify--test-tmpfile)
-         (delete-file file-notify--test-tmpfile1)
-         (sleep-for 0.1)
-
-         (write-region
-          "any text" nil file-notify--test-tmpfile nil 'no-message)
-         (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1)
-         (delete-file file-notify--test-tmpfile1)
-         (sleep-for 0.1))
-
-      ;; Wait for events, and exit.
-      (file-notify--wait-for-events 5 file-notify--test-results)
-      (file-notify-rm-watch desc)
-      (ignore-errors (delete-file file-notify--test-tmpfile))
-      (ignore-errors (delete-file file-notify--test-tmpfile1))))
+  (unwind-protect
+      (progn
+        (setq file-notify--test-results nil
+              file-notify--test-tmpfile (file-notify--test-make-temp-name)
+              file-notify--test-tmpfile1 (file-notify--test-make-temp-name)
+              file-notify--test-desc
+              (file-notify-add-watch
+               file-notify--test-tmpfile
+               '(change) 'file-notify--test-event-handler))
+        (should file-notify--test-desc)
+
+        ;; Check creation and removal.
+        (write-region
+         "any text" nil file-notify--test-tmpfile nil 'no-message)
+        (delete-file file-notify--test-tmpfile)
+        (sleep-for 0.1)
+
+        ;; Check copy and rename.
+        (write-region
+         "any text" nil file-notify--test-tmpfile nil 'no-message)
+        (copy-file file-notify--test-tmpfile file-notify--test-tmpfile1)
+        (delete-file file-notify--test-tmpfile)
+        (delete-file file-notify--test-tmpfile1)
+        (sleep-for 0.1)
+
+        (write-region
+         "any text" nil file-notify--test-tmpfile nil 'no-message)
+        (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1)
+        (delete-file file-notify--test-tmpfile1)
+        (sleep-for 0.1))
+
+    ;; Wait for events, and exit.
+    (file-notify--wait-for-events 5 file-notify--test-results)
+    (file-notify-rm-watch file-notify--test-desc)
+    (ignore-errors (delete-file file-notify--test-tmpfile))
+    (ignore-errors (delete-file file-notify--test-tmpfile1)))
 
   (should file-notify--test-results)
   (dolist (result file-notify--test-results)
@@ -245,11 +252,10 @@ TIMEOUT is the maximum time to wait for, in seconds."
 (file-notify--deftest-remote file-notify-test02-events
   "Check file creation/removal notifications for remote files.")
 
-(defvar auto-revert-remote-files)
-(defvar auto-revert-stop-on-user-input)
-(setq auto-revert-remote-files t
-      auto-revert-stop-on-user-input nil)
 (require 'autorevert)
+(setq auto-revert-notify-exclude-dir-regexp "nothing-to-be-excluded"
+      auto-revert-remote-files t
+      auto-revert-stop-on-user-input nil)
 
 (ert-deftest file-notify-test03-autorevert ()
   "Check autorevert via file notification.
@@ -257,9 +263,8 @@ This test is skipped in batch mode."
   (skip-unless (file-notify--test-local-enabled))
   ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
   ;; file has been reverted.
-  (let* ((remote (file-remote-p temporary-file-directory))
-        (timeout (if remote 60 10))
-        buf)
+  (let ((timeout (if (file-remote-p temporary-file-directory) 60 10))
+        buf)
     (unwind-protect
        (progn
          (setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
@@ -269,6 +274,10 @@ This test is skipped in batch mode."
          (setq buf (find-file-noselect file-notify--test-tmpfile))
          (with-current-buffer buf
            (should (string-equal (buffer-string) "any text"))
+            ;; `buffer-stale--default-function' checks for
+            ;; `verify-visited-file-modtime'.  We must ensure that it
+            ;; returns nil.
+            (sleep-for 1)
            (auto-revert-mode 1)
 
            ;; `auto-revert-buffers' runs every 5".
@@ -284,10 +293,8 @@ This test is skipped in batch mode."
            ;; Modify file.  We wait for a second, in order to
            ;; have another timestamp.
            (sleep-for 1)
-           (shell-command
-            (format "echo -n 'another text' >%s"
-                    (or (file-remote-p file-notify--test-tmpfile 'localname)
-                        file-notify--test-tmpfile)))
+            (write-region
+             "another text" nil file-notify--test-tmpfile nil 'no-message)
 
            ;; Check, that the buffer has been reverted.
            (with-current-buffer (get-buffer-create "*Messages*")
diff --git a/test/automated/package-test.el b/test/automated/package-test.el
index 677bfa6..e908635 100644
--- a/test/automated/package-test.el
+++ b/test/automated/package-test.el
@@ -393,8 +393,8 @@ Must called from within a `tar-mode' buffer."
      (describe-package 'simple-single)
      (goto-char (point-min))
      (should (search-forward "simple-single is an installed package." nil t))
-     (should (search-forward
-              "Status: Installed in `~/simple-single-1.3/' (unsigned)."
+     (should (re-search-forward
+              "Status: Installed in [`‘]~/simple-single-1.3/['’] (unsigned)."
               nil t))
      (should (search-forward "Version: 1.3" nil t))
      (should (search-forward "Summary: A single-file package with no 
dependencies"
@@ -466,8 +466,8 @@ Must called from within a `tar-mode' buffer."
        (goto-char (point-min))
        (should (re-search-forward "signed-good is an? \\(\\S-+\\) package." 
nil t))
        (should (string-equal (match-string-no-properties 1) "installed"))
-       (should (search-forward
-               "Status: Installed in `~/signed-good-1.0/'."
+       (should (re-search-forward
+               "Status: Installed in [`‘]~/signed-good-1.0/['’]."
                nil t))))))
 
 
diff --git a/test/automated/replace-tests.el b/test/automated/replace-tests.el
new file mode 100644
index 0000000..f4e474b
--- /dev/null
+++ b/test/automated/replace-tests.el
@@ -0,0 +1,35 @@
+;;; replace-tests.el --- tests for replace.el.
+
+;; 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)
+
+(ert-deftest query-replace--split-string-tests ()
+  (let ((sep (propertize "\0" 'separator t)))
+    (dolist (before '("" "b"))
+      (dolist (after '("" "a"))
+        (should (equal
+                 (query-replace--split-string (concat before sep after))
+                 (cons before after)))
+        (should (equal
+                 (query-replace--split-string (concat before "\0" after))
+                 (concat before "\0" after)))))))
+
+;;; replace-tests.el ends here
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index 5bb05dc..84b2ab8 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1523,6 +1523,89 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
 
        (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
+(ert-deftest tramp-test30-make-auto-save-file-name ()
+  "Check `make-auto-save-file-name'."
+  (skip-unless (tramp--test-enabled))
+
+  (let ((tmp-name1 (tramp--test-make-temp-name))
+       (tmp-name2 (tramp--test-make-temp-name)))
+
+    (unwind-protect
+       (progn
+         ;; Use default `auto-save-file-name-transforms' mechanism.
+         (let (tramp-auto-save-directory)
+           (with-temp-buffer
+             (setq buffer-file-name tmp-name1)
+             (should
+              (string-equal
+               (make-auto-save-file-name)
+               ;; This is taken from original `make-auto-save-file-name'.
+               (expand-file-name
+                (format
+                 "#%s#"
+                 (subst-char-in-string
+                  ?/ ?! (replace-regexp-in-string "!" "!!" tmp-name1)))
+                temporary-file-directory)))))
+
+         ;; No mapping.
+         (let (tramp-auto-save-directory auto-save-file-name-transforms)
+           (with-temp-buffer
+             (setq buffer-file-name tmp-name1)
+             (should
+              (string-equal
+               (make-auto-save-file-name)
+               (expand-file-name
+                (format "#%s#" (file-name-nondirectory tmp-name1))
+                tramp-test-temporary-file-directory)))))
+
+         ;; Use default `tramp-auto-save-directory' mechanism.
+         (let ((tramp-auto-save-directory tmp-name2))
+           (with-temp-buffer
+             (setq buffer-file-name tmp-name1)
+             (should
+              (string-equal
+               (make-auto-save-file-name)
+               ;; This is taken from Tramp.
+               (expand-file-name
+                (format
+                 "#%s#"
+                 (tramp-subst-strs-in-string
+                  '(("_" . "|")
+                    ("/" . "_a")
+                    (":" . "_b")
+                    ("|" . "__")
+                    ("[" . "_l")
+                    ("]" . "_r"))
+                  tmp-name1))
+                tmp-name2)))
+             (should (file-directory-p tmp-name2))))
+
+         ;; Relative file names shall work, too.
+         (let ((tramp-auto-save-directory "."))
+           (with-temp-buffer
+             (setq buffer-file-name tmp-name1
+                   default-directory tmp-name2)
+             (should
+              (string-equal
+               (make-auto-save-file-name)
+               ;; This is taken from Tramp.
+               (expand-file-name
+                (format
+                 "#%s#"
+                 (tramp-subst-strs-in-string
+                  '(("_" . "|")
+                    ("/" . "_a")
+                    (":" . "_b")
+                    ("|" . "__")
+                    ("[" . "_l")
+                    ("]" . "_r"))
+                  tmp-name1))
+                tmp-name2)))
+             (should (file-directory-p tmp-name2)))))
+
+      (ignore-errors (delete-file tmp-name1))
+      (ignore-errors (delete-directory tmp-name2 'recursive)))))
+
 (defun tramp--test-adb-p ()
   "Check, whether the remote host runs Android.
 This requires restrictions of file name syntax."
@@ -1701,13 +1784,13 @@ This requires restrictions of file name syntax."
    "{foo}bar{baz}"))
 
 ;; These tests are inspired by Bug#17238.
-(ert-deftest tramp-test30-special-characters ()
+(ert-deftest tramp-test31-special-characters ()
   "Check special characters in file names."
   (skip-unless (tramp--test-enabled))
 
   (tramp--test-special-characters))
 
-(ert-deftest tramp-test30-special-characters-with-stat ()
+(ert-deftest tramp-test31-special-characters-with-stat ()
   "Check special characters in file names.
 Use the `stat' command."
   (skip-unless (tramp--test-enabled))
@@ -1726,7 +1809,7 @@ Use the `stat' command."
     (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
       (tramp-set-connection-property v "perl" 'undef))))
 
-(ert-deftest tramp-test30-special-characters-with-perl ()
+(ert-deftest tramp-test31-special-characters-with-perl ()
   "Check special characters in file names.
 Use the `perl' command."
   (skip-unless (tramp--test-enabled))
@@ -1745,7 +1828,7 @@ Use the `perl' command."
     (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
       (tramp-set-connection-property v "stat" 'undef))))
 
-(ert-deftest tramp-test30-special-characters-with-ls ()
+(ert-deftest tramp-test31-special-characters-with-ls ()
   "Check special characters in file names.
 Use the `ls' command."
   (skip-unless (tramp--test-enabled))
@@ -1775,13 +1858,13 @@ Use the `ls' command."
      "银河系漫游指南系列"
      "Автостопом по гала́ктике")))
 
-(ert-deftest tramp-test31-utf8 ()
+(ert-deftest tramp-test32-utf8 ()
   "Check UTF8 encoding in file names and file contents."
   (skip-unless (tramp--test-enabled))
 
   (tramp--test-utf8))
 
-(ert-deftest tramp-test31-utf8-with-stat ()
+(ert-deftest tramp-test32-utf8-with-stat ()
   "Check UTF8 encoding in file names and file contents.
 Use the `stat' command."
   (skip-unless (tramp--test-enabled))
@@ -1800,7 +1883,7 @@ Use the `stat' command."
     (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
       (tramp-set-connection-property v "perl" 'undef))))
 
-(ert-deftest tramp-test31-utf8-with-perl ()
+(ert-deftest tramp-test32-utf8-with-perl ()
   "Check UTF8 encoding in file names and file contents.
 Use the `perl' command."
   (skip-unless (tramp--test-enabled))
@@ -1819,7 +1902,7 @@ Use the `perl' command."
     (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
       (tramp-set-connection-property v "stat" 'undef))))
 
-(ert-deftest tramp-test31-utf8-with-ls ()
+(ert-deftest tramp-test32-utf8-with-ls ()
   "Check UTF8 encoding in file names and file contents.
 Use the `ls' command."
   (skip-unless (tramp--test-enabled))
@@ -1839,7 +1922,7 @@ Use the `ls' command."
       (tramp-set-connection-property v "perl" 'undef))))
 
 ;; This test is inspired by Bug#16928.
-(ert-deftest tramp-test32-asynchronous-requests ()
+(ert-deftest tramp-test33-asynchronous-requests ()
   "Check parallel asynchronous requests.
 Such requests could arrive from timers, process filters and
 process sentinels.  They shall not disturb each other."
@@ -1928,7 +2011,7 @@ process sentinels.  They shall not disturb each other."
       (dolist (buf buffers)
        (ignore-errors (kill-buffer buf)))))))
 
-(ert-deftest tramp-test33-recursive-load ()
+(ert-deftest tramp-test34-recursive-load ()
   "Check that Tramp does not fail due to recursive load."
   (skip-unless (tramp--test-enabled))
 
@@ -1951,7 +2034,7 @@ process sentinels.  They shall not disturb each other."
        (mapconcat 'shell-quote-argument load-path " -L ")
        (shell-quote-argument code)))))))
 
-(ert-deftest tramp-test34-unload ()
+(ert-deftest tramp-test35-unload ()
   "Check that Tramp and its subpackages unload completely.
 Since it unloads Tramp, it shall be the last test to run."
   ;; Mark as failed until all symbols are unbound.
@@ -1991,7 +2074,6 @@ Since it unloads Tramp, it shall be the last test to run."
 ;; * file-ownership-preserved-p
 ;; * file-selinux-context
 ;; * find-backup-file-name
-;; * make-auto-save-file-name
 ;; * set-file-acl
 ;; * set-file-selinux-context
 
diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el
index 44f2572..58d2237 100644
--- a/test/automated/vc-tests.el
+++ b/test/automated/vc-tests.el
@@ -527,73 +527,69 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
 (defun vc-test--arch-enabled ()
   (executable-find vc-arch-program))
 
-;; There are too many failed test cases yet.  We suppress them on hydra.
-(if (getenv "NIX_STORE")
-    (ert-deftest vc-test ()
-      "Dummy test case for hydra."
-      (ert-pass))
-
-  ;; Create the test cases.
-  (dolist (backend vc-handled-backends)
-    (let ((backend-string (downcase (symbol-name backend))))
-      (require (intern (format "vc-%s" backend-string)))
-      (eval
-       ;; Check, whether the backend is supported.
-       `(when (funcall ',(intern (format "vc-test--%s-enabled" 
backend-string)))
-
-         (ert-deftest
-             ,(intern (format "vc-test-%s00-create-repo" backend-string)) ()
-           ,(format "Check `vc-create-repo' for the %s backend."
-                    backend-string)
-           (vc-test--create-repo ',backend))
-
-         (ert-deftest
-             ,(intern (format "vc-test-%s01-register" backend-string)) ()
-           ,(format
-             "Check `vc-register' and `vc-registered' for the %s backend."
-             backend-string)
-           (skip-unless
-            (ert-test-passed-p
-             (ert-test-most-recent-result
-              (ert-get-test
-               ',(intern
-                  (format "vc-test-%s00-create-repo" backend-string))))))
-           (vc-test--register ',backend))
-
-         (ert-deftest
-             ,(intern (format "vc-test-%s02-state" backend-string)) ()
-           ,(format "Check `vc-state' for the %s backend." backend-string)
-           (skip-unless
-            (ert-test-passed-p
-             (ert-test-most-recent-result
-              (ert-get-test
-               ',(intern
-                  (format "vc-test-%s01-register" backend-string))))))
-           (vc-test--state ',backend))
-
-         (ert-deftest
-             ,(intern (format "vc-test-%s03-working-revision" backend-string)) 
()
-           ,(format "Check `vc-working-revision' for the %s backend."
-                    backend-string)
-           (skip-unless
-            (ert-test-passed-p
-             (ert-test-most-recent-result
-              (ert-get-test
-               ',(intern
-                  (format "vc-test-%s01-register" backend-string))))))
-           (vc-test--working-revision ',backend))
-
-         (ert-deftest
-             ,(intern (format "vc-test-%s04-checkout-model" backend-string)) ()
-           ,(format "Check `vc-checkout-model' for the %s backend."
-                    backend-string)
-           (skip-unless
-            (ert-test-passed-p
-             (ert-test-most-recent-result
-              (ert-get-test
-               ',(intern
-                  (format "vc-test-%s01-register" backend-string))))))
-           (vc-test--checkout-model ',backend)))))))
+;; Create the test cases.
+(dolist (backend vc-handled-backends)
+  (let ((backend-string (downcase (symbol-name backend))))
+    (require (intern (format "vc-%s" backend-string)))
+    (eval
+     ;; Check, whether the backend is supported.
+     `(when (funcall ',(intern (format "vc-test--%s-enabled" backend-string)))
+
+       (ert-deftest
+           ,(intern (format "vc-test-%s00-create-repo" backend-string)) ()
+         ,(format "Check `vc-create-repo' for the %s backend."
+                  backend-string)
+         (vc-test--create-repo ',backend))
+
+       (ert-deftest
+           ,(intern (format "vc-test-%s01-register" backend-string)) ()
+         ,(format
+           "Check `vc-register' and `vc-registered' for the %s backend."
+           backend-string)
+         (skip-unless
+          (ert-test-passed-p
+           (ert-test-most-recent-result
+            (ert-get-test
+             ',(intern
+                (format "vc-test-%s00-create-repo" backend-string))))))
+         (vc-test--register ',backend))
+
+       (ert-deftest
+           ,(intern (format "vc-test-%s02-state" backend-string)) ()
+         ,(format "Check `vc-state' for the %s backend." backend-string)
+         (skip-unless
+          (ert-test-passed-p
+           (ert-test-most-recent-result
+            (ert-get-test
+             ',(intern
+                (format "vc-test-%s01-register" backend-string))))))
+         (vc-test--state ',backend))
+
+       (ert-deftest
+           ,(intern (format "vc-test-%s03-working-revision" backend-string)) ()
+         ,(format "Check `vc-working-revision' for the %s backend."
+                  backend-string)
+         (skip-unless
+          (ert-test-passed-p
+           (ert-test-most-recent-result
+            (ert-get-test
+             ',(intern
+                (format "vc-test-%s01-register" backend-string))))))
+         (vc-test--working-revision ',backend))
+
+       (ert-deftest
+           ,(intern (format "vc-test-%s04-checkout-model" backend-string)) ()
+         ,(format "Check `vc-checkout-model' for the %s backend."
+                  backend-string)
+         ;; FIXME make this pass.
+         :expected-result ,(if (equal backend 'RCS) :failed :passed)
+         (skip-unless
+          (ert-test-passed-p
+           (ert-test-most-recent-result
+            (ert-get-test
+             ',(intern
+                (format "vc-test-%s01-register" backend-string))))))
+         (vc-test--checkout-model ',backend))))))
 
 (provide 'vc-tests)
 ;;; vc-tests.el ends here
diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good
index 2cfadb9..9291d34 100644
--- a/test/etags/CTAGS.good
+++ b/test/etags/CTAGS.good
@@ -931,6 +931,7 @@ MoveLayerAfter      lua-src/allegro.lua     /^function 
MoveLayerAfter (this_one)$/
 MoveLayerBefore        lua-src/allegro.lua     /^function MoveLayerBefore 
(this_one)$/
 MoveLayerBottom        lua-src/allegro.lua     /^function MoveLayerBottom ()$/
 MoveLayerTop   lua-src/allegro.lua     /^function MoveLayerTop ()$/
+Mx.cc  cp-src/x.cc     /^main(int argc, char *argv[])$/
 NAME   y-src/cccp.c    8
 NATNUMP        c-src/emacs/src/lisp.h  /^NATNUMP (Lisp_Object x)$/
 NDEBUG c-src/etags.c   88
@@ -1508,6 +1509,7 @@ XTYPE     c-src/emacs/src/lisp.h  /^XTYPE (Lisp_Object 
a)$/
 XUNTAG c-src/emacs/src/lisp.h  /^#  define XUNTAG(a, type) lisp_h_XUNTAG (a, 
type)$/
 XUNTAG c-src/emacs/src/lisp.h  /^XUNTAG (Lisp_Object a, int type)$/
 XWINDOW        c-src/emacs/src/lisp.h  /^XWINDOW (Lisp_Object a)$/
+XX     cp-src/x.cc     1
 Y      c-src/h.h       100
 YACC   c-src/etags.c   2199
 YELLOW cp-src/screen.hpp       26
@@ -2486,6 +2488,7 @@ backslash=0       tex-src/texinfo.tex     
/^\\let\\indexbackslash=0  %overridden during \\
 bar    c-src/c.c       /^void bar() {while(0) {}}$/
 bar    c.c     143
 bar    c-src/h.h       19
+bar    cp-src/x.cc     /^XX::bar()$/
 bas_syn        prol-src/natded.prolog  /^bas_syn(n(_)).$/
 base   c-src/emacs/src/lisp.h  2188
 base   cp-src/c.C      /^double base (void) const { return rng_base;  }$/
@@ -2923,6 +2926,7 @@ foo       c-src/h.h       18
 foo    cp-src/c.C      68
 foo    cp-src/c.C      79
 foo    cp-src/c.C      /^    foo() {$/
+foo    cp-src/x.cc     /^XX::foo()$/
 foo    f-src/entry.for /^       character*(*) function foo()$/
 foo    f-src/entry.strange_suffix      /^       character*(*) function foo()$/
 foo    f-src/entry.strange     /^       character*(*) function foo()$/
@@ -3544,7 +3548,9 @@ not_bol   c-src/emacs/src/regex.h 391
 not_eol        c-src/emacs/src/regex.h 394
 not_single_kboard_state        c-src/emacs/src/keyboard.c      
/^not_single_kboard_state (KBOARD *kboard)$/
 notag2 c-src/torture.c 26
+notag2 c-src/dostorture.c      26
 notag4 c-src/torture.c 45
+notag4 c-src/dostorture.c      45
 notinname      c-src/etags.c   /^#define notinname(c)  (_nin[CHAR (c)]) \/* c 
is not /
 npending       c-src/emacs/src/keyboard.c      7244
 ntool_bar_items        c-src/emacs/src/keyboard.c      7974
@@ -3715,8 +3721,11 @@ post     pyt-src/server.py       /^    def post(self):$/
 post   pyt-src/server.py       /^    def post(self):$/
 pot_etags_version      c-src/etags.c   81
 pp1    c-src/torture.c /^int pp1($/
+pp1    c-src/dostorture.c      /^int pp1($/
 pp2    c-src/torture.c /^pp2$/
+pp2    c-src/dostorture.c      /^pp2$/
 pp3    c-src/torture.c /^pp3(int bar)$/
+pp3    c-src/dostorture.c      /^pp3(int bar)$/
 pp_bas_cat     prol-src/natded.prolog  /^pp_bas_cat(Cat):-$/
 pp_cat prol-src/natded.prolog  /^pp_cat(Syn:Sem):-$/
 pp_exp prol-src/natded.prolog  /^pp_exp('NIL'):-$/
@@ -4097,12 +4106,18 @@ tag-re-match-p  el-src/emacs/lisp/progmodes/etags.el    
/^(defun tag-re-match-p (re)
 tag-symbol-match-p     el-src/emacs/lisp/progmodes/etags.el    /^(defun 
tag-symbol-match-p (tag)$/
 tag-word-match-p       el-src/emacs/lisp/progmodes/etags.el    /^(defun 
tag-word-match-p (tag)$/
 tag1   c-src/torture.c /^(*tag1 (sig, handler)) ()$/
+tag1   c-src/dostorture.c      /^(*tag1 (sig, handler)) ()$/
 tag1   c-src/h.h       110
 tag2   c-src/torture.c /^(*tag2 (sig, handler)) ()$/
+tag2   c-src/dostorture.c      /^(*tag2 (sig, handler)) ()$/
 tag3   c-src/torture.c /^(*tag3 (int sig, void (*handler) (int))) (int)$/
+tag3   c-src/dostorture.c      /^(*tag3 (int sig, void (*handler) (int))) 
(int)$/
 tag4   c-src/torture.c /^(*tag4 (int sig, void (*handler) (int))) (int)$/
+tag4   c-src/dostorture.c      /^(*tag4 (int sig, void (*handler) (int))) 
(int)$/
 tag5   c-src/torture.c /^tag5 (handler, arg)$/
+tag5   c-src/dostorture.c      /^tag5 (handler, arg)$/
 tag6   c-src/torture.c /^tag6 (void (*handler) (void *), void *arg)$/
+tag6   c-src/dostorture.c      /^tag6 (void (*handler) (void *), void *arg)$/
 tag_or_ch      c-src/emacs/src/lisp.h  3026
 taggedfname    c-src/etags.c   207
 tags-add-tables        el-src/emacs/lisp/progmodes/etags.el    /^(defcustom 
tags-add-tables 'ask-user$/
diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1
index ebd079f..e1e0daf 100644
--- a/test/etags/ETAGS.good_1
+++ b/test/etags/ETAGS.good_1
@@ -579,6 +579,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,3539
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -1896,46 +1909,52 @@ template <class C, int n> class AT 52,1668
 class AU 53,1716
 class B<B54,1735
 class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A 57,1826
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct B 74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    foo(133,2954
-    Boo(137,2995
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B 56,1792
+class A 57,1827
+  A operator+(59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(69,1969
+void A::A(A72,1990
+struct A 73,2005
+struct B 74,2023
+void B::B(B75,2042
+void BE_Node::BE_Node(BE_Node76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+class test 86,2157
+  int f(87,2170
+  int ff(89,2232
+  int g(90,2255
+class  AST_Root 92,2279
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(115,2734
+struct A 117,2754
+A::~A(~A120,2778
+struct B 122,2790
+    ~B(123,2801
+enum {dog,dog126,2818
+enum {dog, cat}cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,dog130,2881
+    enum {dog, cat}cat130,2881
+    foo(133,2955
+    Boo(137,2996
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,63
+class XX1,0
+XX::foo(foo9,60
+XX::bar(bar15,95
+main(21,126
 
 cp-src/burton.cpp,124
 ::dummy::dummy test::dummy1(dummy11,0
@@ -2278,15 +2297,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2
index 12554bd..8b07422 100644
--- a/test/etags/ETAGS.good_2
+++ b/test/etags/ETAGS.good_2
@@ -646,6 +646,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,6643
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -2402,53 +2415,61 @@ template <class C, int n> class AT 52,1668
 class AU 53,1716
 class B<B54,1735
 class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A { class B { int f(56,1791
-class A 57,1826
-  int get_data(58,1836
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct A { A(73,2004
-struct B 74,2022
-struct B { B(74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-class  AST_Root;96,2327
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-    ~A(118,2764
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    foo(133,2954
-    Boo(137,2995
-    Boo(138,3052
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B 56,1792
+class A { class B { int f(56,1792
+class A 57,1827
+  int get_data(58,1837
+  A operator+(59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(69,1969
+void A::A(A72,1990
+struct A 73,2005
+struct A { A(73,2005
+struct B 74,2023
+struct B { B(74,2023
+void B::B(B75,2042
+void BE_Node::BE_Node(BE_Node76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+class test 86,2157
+  int f(87,2170
+  int ff(89,2232
+  int g(90,2255
+class  AST_Root 92,2279
+class  AST_Root;96,2328
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(115,2734
+struct A 117,2754
+    ~A(118,2765
+A::~A(~A120,2778
+struct B 122,2790
+    ~B(123,2801
+enum {dog,dog126,2818
+enum {dog, cat}cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,dog130,2881
+    enum {dog, cat}cat130,2881
+    foo(133,2955
+    Boo(137,2996
+    Boo(138,3053
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,102
+class XX1,0
+     int foo(4,19
+     void bar(5,35
+XX::foo(foo9,60
+XX::bar(bar15,95
+main(21,126
 
 cp-src/burton.cpp,124
 ::dummy::dummy test::dummy1(dummy11,0
@@ -2845,15 +2866,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3
index 714903c..37eaafb 100644
--- a/test/etags/ETAGS.good_3
+++ b/test/etags/ETAGS.good_3
@@ -648,6 +648,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,4207
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -2186,54 +2199,60 @@ class AU 53,1716
 class AU { T x;53,1716
 class B<B54,1735
 class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A 57,1826
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct B 74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-  int x;80,2115
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;127,2842
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    enum {dog, cat} animals;130,2880
-    struct {int treats;131,2909
-    struct {int treats;} cow;131,2909
-    int i,132,2939
-    int i,a,132,2939
-    int i,a,b;132,2939
-    foo(133,2954
-    Boo(137,2995
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B 56,1792
+class A 57,1827
+  A operator+(59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(69,1969
+void A::A(A72,1990
+struct A 73,2005
+struct B 74,2023
+void B::B(B75,2042
+void BE_Node::BE_Node(BE_Node76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+  int x;80,2116
+class test 86,2157
+  int f(87,2170
+  int ff(89,2232
+  int g(90,2255
+class  AST_Root 92,2279
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(115,2734
+struct A 117,2754
+A::~A(~A120,2778
+struct B 122,2790
+    ~B(123,2801
+enum {dog,dog126,2818
+enum {dog, cat}cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;127,2843
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,dog130,2881
+    enum {dog, cat}cat130,2881
+    enum {dog, cat} animals;130,2881
+    struct {int treats;131,2910
+    struct {int treats;} cow;131,2910
+    int i,132,2940
+    int i,a,132,2940
+    int i,a,b;132,2940
+    foo(133,2955
+    Boo(137,2996
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,63
+class XX1,0
+XX::foo(foo9,60
+XX::bar(bar15,95
+main(21,126
 
 cp-src/burton.cpp,124
 ::dummy::dummy test::dummy1(dummy11,0
@@ -2595,15 +2614,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4
index 5dd8d55..2b631d1 100644
--- a/test/etags/ETAGS.good_4
+++ b/test/etags/ETAGS.good_4
@@ -603,6 +603,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,3539
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -2060,46 +2073,52 @@ template <class C, int n> class AT 52,1668
 class AU 53,1716
 class B<B54,1735
 class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A 57,1826
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct B 74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    foo(133,2954
-    Boo(137,2995
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B 56,1792
+class A 57,1827
+  A operator+(59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(69,1969
+void A::A(A72,1990
+struct A 73,2005
+struct B 74,2023
+void B::B(B75,2042
+void BE_Node::BE_Node(BE_Node76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+class test 86,2157
+  int f(87,2170
+  int ff(89,2232
+  int g(90,2255
+class  AST_Root 92,2279
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(115,2734
+struct A 117,2754
+A::~A(~A120,2778
+struct B 122,2790
+    ~B(123,2801
+enum {dog,dog126,2818
+enum {dog, cat}cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,dog130,2881
+    enum {dog, cat}cat130,2881
+    foo(133,2955
+    Boo(137,2996
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,63
+class XX1,0
+XX::foo(foo9,60
+XX::bar(bar15,95
+main(21,126
 
 cp-src/burton.cpp,124
 ::dummy::dummy test::dummy1(dummy11,0
@@ -2442,15 +2461,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5
index 526ad40..544a166 100644
--- a/test/etags/ETAGS.good_5
+++ b/test/etags/ETAGS.good_5
@@ -739,6 +739,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,7311
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -2856,61 +2869,69 @@ class AU 53,1716
 class AU { T x;53,1716
 class B<B54,1735
 class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A { class B { int f(56,1791
-class A 57,1826
-  int get_data(58,1836
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct A { A(73,2004
-struct B 74,2022
-struct B { B(74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-  int x;80,2115
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-class  AST_Root;96,2327
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-    ~A(118,2764
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;127,2842
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    enum {dog, cat} animals;130,2880
-    struct {int treats;131,2909
-    struct {int treats;} cow;131,2909
-    int i,132,2939
-    int i,a,132,2939
-    int i,a,b;132,2939
-    foo(133,2954
-    Boo(137,2995
-    Boo(138,3052
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B 56,1792
+class A { class B { int f(56,1792
+class A 57,1827
+  int get_data(58,1837
+  A operator+(59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(69,1969
+void A::A(A72,1990
+struct A 73,2005
+struct A { A(73,2005
+struct B 74,2023
+struct B { B(74,2023
+void B::B(B75,2042
+void BE_Node::BE_Node(BE_Node76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+  int x;80,2116
+class test 86,2157
+  int f(87,2170
+  int ff(89,2232
+  int g(90,2255
+class  AST_Root 92,2279
+class  AST_Root;96,2328
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(115,2734
+struct A 117,2754
+    ~A(118,2765
+A::~A(~A120,2778
+struct B 122,2790
+    ~B(123,2801
+enum {dog,dog126,2818
+enum {dog, cat}cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;127,2843
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,dog130,2881
+    enum {dog, cat}cat130,2881
+    enum {dog, cat} animals;130,2881
+    struct {int treats;131,2910
+    struct {int treats;} cow;131,2910
+    int i,132,2940
+    int i,a,132,2940
+    int i,a,b;132,2940
+    foo(133,2955
+    Boo(137,2996
+    Boo(138,3053
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,102
+class XX1,0
+     int foo(4,19
+     void bar(5,35
+XX::foo(foo9,60
+XX::bar(bar15,95
+main(21,126
 
 cp-src/burton.cpp,124
 ::dummy::dummy test::dummy1(dummy11,0
@@ -3326,15 +3347,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_6
similarity index 94%
copy from test/etags/ETAGS.good_5
copy to test/etags/ETAGS.good_6
index 526ad40..f3d17b1 100644
--- a/test/etags/ETAGS.good_5
+++ b/test/etags/ETAGS.good_6
@@ -739,6 +739,19 @@ char                       **tab_fill(tab_fill70,1129
 int                    tab_delete_first(91,1638
 int                    tab_count_words(103,1820
 
+c-src/dostorture.c,198
+(*tag1 tag118,468
+#define notag2 26,577
+(*tag2 tag229,657
+(*tag3 tag339,809
+#define notag4 45,904
+(*tag4 tag448,1001
+tag5 57,1136
+tag6 66,1272
+int pp1(74,1389
+pp287,1504
+pp3(100,1616
+
 c-src/emacs/src/gmalloc.c,7311
 #define USE_PTHREAD25,1002
 #undef get_current_dir_name33,1126
@@ -2812,37 +2825,37 @@ int extvar;109,2053
 struct re_pattern_buffer 119,2277
 struct re_pattern_buffer { unsigned char *buffer;buffer119,2277
 
-cp-src/c.C,3133
+cp-src/c.C,3629
 template <typename ipc3dIslandHierarchy,1,0
 template <typename ipc3dIslandHierarchy, typename ipc3dChannelType,1,0
 template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
numOfChannels,1,0
 template <typename ipc3dIslandHierarchy, typename ipc3dChannelType, unsigned 
numOfChannels, typename ipc3dLinkControl,1,0
 class CMultiChannelCSC19_3D2,151
-        ipc3dLinkControlSetup setup;5,190
-        ipc3dCSC19<ipc3dCSC196,227
-        
ipc3dCSC19<ipc3dIslandHierarchy,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipc3dLinkControl>
 mcCSC;6,227
-        advTimer cscInitTime;7,388
-        advTimer cscSegmentationTime;8,418
-        advTimer outputTime;9,456
-        void execute(11,493
+        ipc3dLinkControlSetup setup;CMultiChannelCSC19_3D::setup5,190
+        ipc3dCSC19<CMultiChannelCSC19_3D::ipc3dCSC196,227
+        
ipc3dCSC19<ipc3dIslandHierarchy,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipcMultiChannel<ipc3dChannelType,numOfChannels>,ipc3dLinkControl>
 mcCSC;CMultiChannelCSC19_3D::mcCSC6,227
+        advTimer cscInitTime;CMultiChannelCSC19_3D::cscInitTime7,388
+        advTimer 
cscSegmentationTime;CMultiChannelCSC19_3D::cscSegmentationTime8,418
+        advTimer outputTime;CMultiChannelCSC19_3D::outputTime9,456
+        void execute(CMultiChannelCSC19_3D::execute11,493
 static void my_function1(24,984
 int main 25,1026
 double base 26,1088
 operator += operator +=29,1174
 class TestRecord;31,1233
 typedef struct s1 32,1251
-   int counter;33,1271
+   int counter;s1::counter33,1271
 } t1;34,1287
 struct s2 35,1293
-   int counter;36,1305
+   int counter;s2::counter36,1305
 typedef struct s2 t2;38,1324
 class A 39,1346
-  enum { rosso,40,1356
-  enum { rosso, giallo,40,1356
-  enum { rosso, giallo, verde 40,1356
-  enum { rosso, giallo, verde } colori;40,1356
-  const A& operator+(41,1396
-const A& A::operator+(operator+43,1431
+  enum { rosso,A::rosso40,1356
+  enum { rosso, giallo,A::giallo40,1356
+  enum { rosso, giallo, verde A::verde40,1356
+  enum { rosso, giallo, verde } colori;A::colori40,1356
+  const A& operator+(A::operator+41,1396
+const A& A::operator+(43,1431
 void operator+(44,1467
 void operator -(operator -45,1495
 void operator int(operator int46,1524
@@ -2851,86 +2864,94 @@ int f(49,1571
 int A<int>::f(f50,1590
 A<float,B<int> > A<B<float>,int>::f(f51,1618
 template <class C, int n> class AT 52,1668
-template <class C, int n> class AT { C t[t52,1668
+template <class C, int n> class AT { C t[AT::t52,1668
 class AU 53,1716
-class AU { T x;53,1716
+class AU { T x;AU::x53,1716
 class B<B54,1735
-class B<int> { void f(54,1735
-const A::B::T& abt 55,1765
-class A 56,1791
-class A { class B 56,1791
-class A { class B { int f(56,1791
-class A 57,1826
-  int get_data(58,1836
-  A operator+(59,1860
-is_muldiv_operation(61,1887
-domain foo 68,1955
-     void f(69,1968
-void A::A(A72,1989
-struct A 73,2004
-struct A { A(73,2004
-struct B 74,2022
-struct B { B(74,2022
-void B::B(B75,2041
-void BE_Node::BE_Node(BE_Node76,2056
-class BE_Node 77,2083
-struct foo 79,2102
-  int x;80,2115
-class test 86,2156
-  int f(87,2169
-  int ff(89,2231
-  int g(90,2254
-class  AST_Root 92,2278
-class  AST_Root;96,2327
-AST_ConcreteType::AST_ConcreteType(99,2393
-AST_Array::AST_Array(107,2532
-     void f(115,2733
-struct A 117,2753
-    ~A(118,2764
-A::~A(~A120,2777
-struct B 122,2789
-    ~B(123,2800
-enum {dog,dog126,2817
-enum {dog, cat}cat126,2817
-enum {dog, cat} animals;126,2817
-struct {int teats;127,2842
-struct {int teats;} cow;127,2842
-class Boo 129,2868
-    enum {dog,dog130,2880
-    enum {dog, cat}cat130,2880
-    enum {dog, cat} animals;130,2880
-    struct {int treats;131,2909
-    struct {int treats;} cow;131,2909
-    int i,132,2939
-    int i,a,132,2939
-    int i,a,b;132,2939
-    foo(133,2954
-    Boo(137,2995
-    Boo(138,3052
-Boo::Boo(141,3070
-typedef int should_see_this_one_enclosed_in_extern_C;149,3155
-typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3228
-typedef int should_see_this_array_type[should_see_this_array_type156,3310
+class B<int> { void f(B::f54,1735
+const A::B::T& abt 55,1766
+class A 56,1792
+class A { class B A::B56,1792
+class A { class B { int f(A::B::f56,1792
+class A 57,1827
+  int get_data(A::get_data58,1837
+  A operator+(A::operator+59,1861
+is_muldiv_operation(61,1888
+domain foo 68,1956
+     void f(foo::f69,1969
+void A::A(72,1990
+struct A 73,2005
+struct A { A(A::A73,2005
+struct B 74,2023
+struct B { B(B::B74,2023
+void B::B(75,2042
+void BE_Node::BE_Node(76,2057
+class BE_Node 77,2084
+struct foo 79,2103
+  int x;foo::x80,2116
+class test 86,2157
+  int f(test::f87,2170
+  int ff(test::ff89,2232
+  int g(test::g90,2255
+class  AST_Root 92,2279
+class  AST_Root;96,2328
+AST_ConcreteType::AST_ConcreteType(99,2394
+AST_Array::AST_Array(107,2533
+     void f(::f115,2734
+struct A 117,2754
+    ~A(A::~A118,2765
+A::~A(120,2778
+struct B 122,2790
+    ~B(B::~B123,2801
+enum {dog,::dog126,2818
+enum {dog, cat}::cat126,2818
+enum {dog, cat} animals;126,2818
+struct {int teats;::teats127,2843
+struct {int teats;} cow;127,2843
+class Boo 129,2869
+    enum {dog,Boo::dog130,2881
+    enum {dog, cat}Boo::cat130,2881
+    enum {dog, cat} animals;Boo::animals130,2881
+    struct {int treats;Boo::treats131,2910
+    struct {int treats;} cow;Boo::cow131,2910
+    int i,Boo::i132,2940
+    int i,a,Boo::a132,2940
+    int i,a,b;Boo::b132,2940
+    foo(Boo::foo133,2955
+    Boo(Boo::Boo137,2996
+    Boo(Boo::Boo138,3053
+Boo::Boo(141,3071
+typedef int should_see_this_one_enclosed_in_extern_C;149,3156
+typedef int 
(*should_see_this_function_pointer)should_see_this_function_pointer153,3229
+typedef int should_see_this_array_type[should_see_this_array_type156,3311
+
+cp-src/x.cc,110
+class XX1,0
+     int foo(XX::foo4,19
+     void bar(XX::bar5,35
+XX::foo(9,60
+XX::bar(15,95
+main(21,126
 
-cp-src/burton.cpp,124
-::dummy::dummy test::dummy1(dummy11,0
-::dummy::dummy test::dummy2(dummy26,64
-::dummy::dummy test::dummy3(dummy311,143
+cp-src/burton.cpp,103
+::dummy::dummy test::dummy1(1,0
+::dummy::dummy test::dummy2(6,64
+::dummy::dummy test::dummy3(11,143
 
-cp-src/functions.cpp,778
-void Date::setDate setDate5,148
-void Date::plus plus32,939
-void Date::minus minus42,1229
-void Date::shift shift52,1407
-Date & Date::operator = operator =62,1628
-Date & Date::operator += operator +=69,1789
-Date & Date::operator -= operator -=78,1939
-Date & Date::operator ++ operator ++87,2080
-Date & Date::operator -- operator --96,2216
-int Date::operator - operator -104,2331
-int Date::operator < operator <112,2483
-int Date::operator > operator >116,2557
-int Date::operator == operator ==120,2631
+cp-src/functions.cpp,807
+void Date::setDate 5,148
+void Date::plus 32,939
+void Date::minus 42,1229
+void Date::shift 52,1407
+Date & Date::operator = Date::operator =62,1628
+Date & Date::operator += Date::operator +=69,1789
+Date & Date::operator -= Date::operator -=78,1939
+Date & Date::operator ++ Date::operator ++87,2080
+Date & Date::operator -- Date::operator --96,2216
+int Date::operator - Date::operator -104,2331
+int Date::operator < Date::operator <112,2483
+int Date::operator > Date::operator >116,2557
+int Date::operator == Date::operator ==120,2631
 ostream& operator << operator <<124,2707
 istream& operator >> operator >>133,2943
 bool isLeap 159,3543
@@ -2941,7 +2962,7 @@ void Debug 201,4523
 int WorkingDays(211,4867
 Date StartDay(226,5129
 
-cp-src/MDiagArray2.h,1194
+cp-src/MDiagArray2.h,1538
 #define octave_MDiagArray2_h 29,870
 #undef LTGT35,967
 #define LTGT39,1031
@@ -2957,58 +2978,58 @@ operator - operator -66,1707
 product 69,1808
 operator - operator -72,1907
 class MDiagArray2 78,2022
-  MDiagArray2 82,2077
-  MDiagArray2 86,2154
-  MDiagArray2 87,2198
-  MDiagArray2 88,2254
-  MDiagArray2 89,2329
-  MDiagArray2 90,2387
-  MDiagArray2 91,2450
-  ~MDiagArray2 93,2515
-  MDiagArray2<T>& operator = operator =95,2542
-      DiagArray2<T>::operator = operator =97,2603
-  operator MArray2<T> operator MArray2<T>101,2667
-  operator += operator +=116,2966
-  operator -= operator -=119,3057
-  friend MDiagArray2<T> operator * operator *123,3174
-  friend MDiagArray2<T> operator / operator /124,3253
-  friend MDiagArray2<T> operator * operator *128,3384
-  operator + operator +133,3544
-  operator - operator -136,3640
-  friend MDiagArray2<T> operator - operator -141,3803
+  MDiagArray2 MDiagArray2::MDiagArray282,2077
+  MDiagArray2 MDiagArray2::MDiagArray286,2154
+  MDiagArray2 MDiagArray2::MDiagArray287,2198
+  MDiagArray2 MDiagArray2::MDiagArray288,2254
+  MDiagArray2 MDiagArray2::MDiagArray289,2329
+  MDiagArray2 MDiagArray2::MDiagArray290,2387
+  MDiagArray2 MDiagArray2::MDiagArray291,2450
+  ~MDiagArray2 MDiagArray2::~MDiagArray293,2515
+  MDiagArray2<T>& operator = MDiagArray2::operator =95,2542
+      DiagArray2<T>::operator = MDiagArray2::operator =97,2603
+  operator MArray2<T> MDiagArray2::operator MArray2<T>101,2667
+  operator += MDiagArray2::operator +=116,2966
+  operator -= MDiagArray2::operator -=119,3057
+  friend MDiagArray2<T> operator * MDiagArray2::operator *123,3174
+  friend MDiagArray2<T> operator / MDiagArray2::operator /124,3253
+  friend MDiagArray2<T> operator * MDiagArray2::operator *128,3384
+  operator + MDiagArray2::operator +133,3544
+  operator - MDiagArray2::operator -136,3640
+  friend MDiagArray2<T> operator - MDiagArray2::operator -141,3803
 #undef LTGT144,3874
 #define INSTANTIATE_MDIAGARRAY_FRIENDS(146,3887
 
-cp-src/Range.h,784
+cp-src/Range.h,1136
 #define octave_Range_h 24,765
 class istream;30,840
 class ostream;31,855
 class Matrix;32,870
 Range35,891
-  Range 39,909
-  Range 42,995
-  Range 46,1130
-  Range 50,1248
-  double base 54,1376
-  double limit 55,1425
-  double inc 56,1475
-  int nelem 57,1523
-  bool all_elements_are_ints 59,1571
-  Matrix matrix_value 61,1615
-  double min 63,1652
-  double max 64,1679
-  void sort 66,1707
-  void set_base 68,1728
-  void set_limit 69,1774
-  void set_inc 70,1821
-  friend ostream& operator << operator <<72,1867
-  friend istream& operator >> operator >>73,1928
-  void print_range 75,1984
-  double rng_base;79,2023
-  double rng_limit;80,2042
-  double rng_inc;81,2062
-  int rng_nelem;83,2081
-  int nelem_internal 85,2099
+  Range Range::Range39,909
+  Range Range::Range42,995
+  Range Range::Range46,1130
+  Range Range::Range50,1248
+  double base Range::base54,1376
+  double limit Range::limit55,1425
+  double inc Range::inc56,1475
+  int nelem Range::nelem57,1523
+  bool all_elements_are_ints Range::all_elements_are_ints59,1571
+  Matrix matrix_value Range::matrix_value61,1615
+  double min Range::min63,1652
+  double max Range::max64,1679
+  void sort Range::sort66,1707
+  void set_base Range::set_base68,1728
+  void set_limit Range::set_limit69,1774
+  void set_inc Range::set_inc70,1821
+  friend ostream& operator << Range::operator <<72,1867
+  friend istream& operator >> Range::operator >>73,1928
+  void print_range Range::print_range75,1984
+  double rng_base;Range::rng_base79,2023
+  double rng_limit;Range::rng_limit80,2042
+  double rng_inc;Range::rng_inc81,2062
+  int rng_nelem;Range::rng_nelem83,2081
+  int nelem_internal Range::nelem_internal85,2099
 extern Range operator - operator -88,2138
 
 cp-src/screen.cpp,228
@@ -3021,25 +3042,25 @@ void cursor_position(32,836
 void clear_screen(41,997
 void write_xyc(55,1247
 
-cp-src/screen.hpp,538
+cp-src/screen.hpp,791
 #define __COLORS9,401
 enum COLORS 11,419
-    BLACK,12,433
-    BLUE,13,471
-    GREEN,14,481
-    CYAN,15,492
-    RED,16,502
-    MAGENTA,17,511
-    BROWN,18,524
-    LIGHTGRAY,19,535
-    DARKGRAY,20,550
-    LIGHTBLUE,21,589
-    LIGHTGREEN,22,604
-    LIGHTCYAN,23,620
-    LIGHTRED,24,635
-    LIGHTMAGENTA,25,649
-    YELLOW,26,667
-    WHITE27,679
+    BLACK,COLORS::BLACK12,433
+    BLUE,COLORS::BLUE13,471
+    GREEN,COLORS::GREEN14,481
+    CYAN,COLORS::CYAN15,492
+    RED,COLORS::RED16,502
+    MAGENTA,COLORS::MAGENTA17,511
+    BROWN,COLORS::BROWN18,524
+    LIGHTGRAY,COLORS::LIGHTGRAY19,535
+    DARKGRAY,COLORS::DARKGRAY20,550
+    LIGHTBLUE,COLORS::LIGHTBLUE21,589
+    LIGHTGREEN,COLORS::LIGHTGREEN22,604
+    LIGHTCYAN,COLORS::LIGHTCYAN23,620
+    LIGHTRED,COLORS::LIGHTRED24,635
+    LIGHTMAGENTA,COLORS::LIGHTMAGENTA25,649
+    YELLOW,COLORS::YELLOW26,667
+    WHITECOLORS::WHITE27,679
 #define SCREEN_FP(31,700
 #define SCREEN_START 33,795
 void goto_xy(35,835
@@ -3048,96 +3069,96 @@ void cursor_position(37,907
 void clear_screen(38,935
 void write_xyc(39,960
 
-cp-src/conway.cpp,288
+cp-src/conway.cpp,270
 #define max(12,357
 #define min(13,393
 const int num_rows 15,430
 const int num_columns 16,470
 class site *field_of_play[field_of_play18,499
-int site::total_surrounding(total_surrounding20,550
+int site::total_surrounding(20,550
 void display(37,958
 void glider(50,1239
 void traffic_light(59,1478
 void main(67,1633
 
-cp-src/conway.hpp,322
+cp-src/conway.hpp,483
 class site:site5,235
-    char x,7,269
-    char x, y,7,269
-    char x, y, alive,7,269
-    char x, y, alive, next_alive;7,269
-    int total_surrounding(8,303
-    site(10,344
-    ~site(11,397
-    char read(12,410
-    void set(13,444
-    void clear(14,478
-    void compute_next_state(15,514
-    void step(22,717
+    char x,site::x7,269
+    char x, y,site::y7,269
+    char x, y, alive,site::alive7,269
+    char x, y, alive, next_alive;site::next_alive7,269
+    int total_surrounding(site::total_surrounding8,303
+    site(site::site10,344
+    ~site(site::~site11,397
+    char read(site::read12,410
+    void set(site::set13,444
+    void clear(site::clear14,478
+    void compute_next_state(site::compute_next_state15,514
+    void step(site::step22,717
 
-cp-src/clheir.cpp,359
+cp-src/clheir.cpp,307
 const int max_num_generic_objects 9,298
 generic_object * object_registry[object_registry10,340
 void init_registry(12,400
 void step_everybody(19,527
-void discrete_location::clear_neighbors(clear_neighbors31,852
-generic_object::generic_object(generic_object36,981
-generic_object::~generic_object(~generic_object48,1255
-void agent::move(move53,1353
+void discrete_location::clear_neighbors(31,852
+generic_object::generic_object(36,981
+generic_object::~generic_object(48,1255
+void agent::move(53,1353
 
-cp-src/clheir.hpp,990
+cp-src/clheir.hpp,1600
 extern void init_registry(10,452
 extern void step_everybody(11,485
 class generic_object13,520
-    int where_in_registry;15,547
-    generic_object(17,582
-    ~generic_object(19,724
-    virtual void compute_next_state(21,842
-    virtual void step(22,888
+    int where_in_registry;generic_object::where_in_registry15,547
+    generic_object(generic_object::generic_object17,582
+    ~generic_object(generic_object::~generic_object19,724
+    virtual void compute_next_state(generic_object::compute_next_state21,842
+    virtual void step(generic_object::step22,888
 const int max_num_directions 31,1219
 class location:location33,1289
-    location(43,1642
-    ~location(44,1661
+    location(location::location43,1642
+    ~location(location::~location44,1661
 class irregular_location:irregular_location47,1686
-    double x,49,1734
-    double x, y,49,1734
-    double x, y, z;49,1734
-    irregular_location(51,1762
-    ~irregular_location(53,1854
+    double x,irregular_location::x49,1734
+    double x, y,irregular_location::y49,1734
+    double x, y, z;irregular_location::z49,1734
+    irregular_location(irregular_location::irregular_location51,1762
+    ~irregular_location(irregular_location::~irregular_location53,1854
 class discrete_location:discrete_location56,1889
-    int x,58,1936
-    int x, y,58,1936
-    int x, y, z;58,1936
-    class location *neighbors[neighbors59,1953
-    void clear_neighbors(60,2004
-    discrete_location(62,2044
-    ~discrete_location(65,2154
-    void assign_neighbor(66,2184
+    int x,discrete_location::x58,1936
+    int x, y,discrete_location::y58,1936
+    int x, y, z;discrete_location::z58,1936
+    class location *neighbors[discrete_location::neighbors59,1953
+    void clear_neighbors(discrete_location::clear_neighbors60,2004
+    discrete_location(discrete_location::discrete_location62,2044
+    ~discrete_location(discrete_location::~discrete_location65,2154
+    void assign_neighbor(discrete_location::assign_neighbor66,2184
 class agent:agent75,2508
-    location *where;where77,2549
-    agent(79,2578
-    ~agent(80,2591
-    void move(81,2605
+    location *where;agent::where77,2549
+    agent(agent::agent79,2578
+    ~agent(agent::~agent80,2591
+    void move(agent::move81,2605
 
-cp-src/fail.C,351
+cp-src/fail.C,438
 struct A 7,263
-          struct B 8,274
-                  struct C 9,289
-                          int x;10,305
-                          C(11,318
-                          operator int(operator int12,342
-                  typedef C T;14,389
-          typedef B T2;16,414
+          struct B A::B8,274
+                  struct C A::B::C9,289
+                          int x;A::B::C::x10,305
+                          C(A::B::C::C11,318
+                          operator int(A::B::C::operator int12,342
+                  typedef C T;A::B::T14,389
+          typedef B T2;A::T216,414
 class String;20,437
 class A 23,453
-       class B 24,463
-               class C 25,474
-               int f(26,488
-int A::B::f(f31,521
+       class B A::B24,463
+               class C A::B::C25,474
+               int f(A::B::f26,488
+int A::B::f(31,521
 main(37,571
        class D 41,622
-               D(43,659
-               int x;44,694
+               D(D::D43,659
+               int x;D::x44,694
 
 el-src/TAGTEST.EL,148
 (foo::defmumble bletch 1,0
@@ -3326,15 +3347,15 @@ Comunicati e iniziative32,976
 Ultime notizie dall'associazione63,2030
 
 html-src/algrthms.html,467
-Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,271
-Descriptionalgorithms10,472
-Generating the Datagenalgorithm48,1948
-Convolutionallyconalgorithm55,2458
-Nextstatetable262,11326
-Outputoutputtable350,13566
-Mapping the Channel Symbolsmapping433,15781
-Adding Noise to theaddnoise439,16169
-Quantizing the Receivedquantizing469,18632
+Tutorial on Convolutional Coding with Viterbi Decoding--Description of the 
Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms7,277
+Descriptionalgorithms10,481
+Generating the Datagenalgorithm48,1995
+Convolutionallyconalgorithm55,2512
+Nextstatetable262,11587
+Outputoutputtable350,13915
+Mapping the Channel Symbolsmapping433,16213
+Adding Noise to theaddnoise439,16607
+Quantizing the Receivedquantizing469,19100
 
 html-src/software.html,439
 Francesco Potortì Software Page9,280
@@ -3415,23 +3436,23 @@ objc-src/Subprocess.h,98
 #define BUFFERSIZE 43,1267
 @interface Subprocess:Subprocess45,1292
 
-objc-src/Subprocess.m,476
+objc-src/Subprocess.m,505
 #define        PTY_TEMPLATE 20,494
 #define        PTY_LENGTH 21,528
 static void showError(23,551
address@hidden Subprocess(Private)32,737
address@hidden Subprocess(Private)Subprocess(Private)32,737
 - childDidExit39,851
-- fdHandler:fdHandler67,1589
+- fdHandler:67,1589
 showError 98,2360
 fdHandler 112,2785
 getptys 119,2907
-- init:init183,4815
-    andStdErr:init197,5147
-- send:(const char *)string withNewline:send300,7436
-- send:send308,7599
+- init:183,4815
+    andStdErr:init:withDelegate:andPtySupport:andStdErr:197,5147
+- send:(const char *)string withNewline:send:withNewline:300,7436
+- send:308,7599
 - terminateInput314,7689
-- terminate:terminate321,7810
-- setDelegate:setDelegate332,7961
+- terminate:321,7810
+- setDelegate:332,7961
 - delegate338,8031
 
 objc-src/PackInsp.h,109
@@ -3439,7 +3460,7 @@ objc-src/PackInsp.h,109
 #define TYPESTOSTAT    37,1120
 @interface PackageInspector:PackageInspector39,1172
 
-objc-src/PackInsp.m,1322
+objc-src/PackInsp.m,1360
 static const char RCSid[RCSid30,1032
 #define VERSION        34,1116
 #   define DEBUG 37,1155
@@ -3456,46 +3477,46 @@ static const char RCSid[RCSid30,1032
 #define LOCALIZE(61,2585
 #define LOCALIZE_ARCH(62,2668
 +newnew67,2802
--showInfo:showInfo93,3417
--revert:revert107,3737
--ok:ok136,4297
+-showInfo:showInfo:93,3417
+-revert:revert:107,3737
+-ok:ok:136,4297
 -loadload143,4424
 #define LOOKUP(156,4826
 #undef LOOKUP176,5694
--loadKeyValuesFrom:(const char *)type inTable:loadKeyValuesFrom186,5852
--loadContentsOf:(const char *)type inTable:loadContentsOf238,7079
+-loadKeyValuesFrom:(const char *)type 
inTable:loadKeyValuesFrom:inTable:186,5852
+-loadContentsOf:(const char *)type inTable:loadContentsOf:inTable:238,7079
 -loadImageloadImage257,7552
 #define STAT_EQ(275,7940
 -(BOOL)shouldLoad280,8116
 -toggleDescriptiontoggleDescription301,8626
--(const char *)getPath:(char *)buf forType:getPath317,8899
+-(const char *)getPath:(char *)buf forType:getPath:forType:317,8899
 -setRevertButtonTitlesetRevertButtonTitle333,9320
--(const char *)formatSize:(const char *)size inBuf:formatSize344,9525
+-(const char *)formatSize:(const char *)size inBuf:formatSize:inBuf:344,9525
 #define WORKING        368,10045
 -(void)getArchs370,10100
--(void)addArchs:addArchs385,10520
--subprocess:(Subprocess *)sender output:subprocess428,11351
--subprocessDone:subprocessDone436,11484
+-(void)addArchs:385,10520
+-subprocess:(Subprocess *)sender output:subprocess:output:428,11351
+-subprocessDone:subprocessDone:436,11484
 static void openInWorkspace(446,11634
--open:open464,12063
+-open:open:464,12063
 
 objcpp-src/SimpleCalc.H,41
 @interface SimpleCalc:SimpleCalc14,400
 
-objcpp-src/SimpleCalc.M,445
+objcpp-src/SimpleCalc.M,300
 - init52,1747
-- appendToDisplay:appendToDisplay60,1933
-- registerAction:registerAction70,2210
-- decimalKey:decimalKey77,2348
-- numberKeys:numberKeys91,2661
-- equalsKey:equalsKey112,3192
-- operationKeys:operationKeys131,3680
-- clearKey:clearKey153,4301
-- clearAllKey:clearAllKey160,4410
-- appDidInit:appDidInit168,4591
-- windowWillClose:windowWillClose178,4882
-- infoPanel:infoPanel186,5132
-- helpPanel:helpPanel198,5482
+- appendToDisplay:60,1933
+- registerAction:70,2210
+- decimalKey:77,2348
+- numberKeys:91,2661
+- equalsKey:112,3192
+- operationKeys:131,3680
+- clearKey:153,4301
+- clearAllKey:160,4410
+- appDidInit:168,4591
+- windowWillClose:178,4882
+- infoPanel:186,5132
+- helpPanel:198,5482
 
 pas-src/common.pas,1875
 procedure InitializeStringPackage;26,527
diff --git a/test/etags/Makefile b/test/etags/Makefile
index 99ad41e..f326c90 100644
--- a/test/etags/Makefile
+++ b/test/etags/Makefile
@@ -1,10 +1,10 @@
 ADASRC=$(addprefix ./ada-src/,etags-test-for.ada 2ataspri.adb 2ataspri.ads 
waroquiers.ada)
 ASRC=$(addprefix ./a-src/,empty.zz empty.zz.gz)
 CSRC=$(addprefix ./c-src/,abbrev.c .//c.c torture.c getopt.h etags.c\
- exit.c exit.strange_suffix sysdep.h tab.c\
+ exit.c exit.strange_suffix sysdep.h tab.c dostorture.c\
  emacs/src/gmalloc.c emacs/src/regex.h emacs/src/keyboard.c emacs/src/lisp.h\
  machsyscalls.c machsyscalls.h fail.c a/b/b.c) ../etags/c-src/h.h
-CPSRC=$(addprefix ./cp-src/,c.C burton.cpp burton.cpp\
+CPSRC=$(addprefix ./cp-src/,c.C x.cc burton.cpp burton.cpp\
  functions.cpp MDiagArray2.h Range.h\
  screen.cpp screen.hpp conway.cpp conway.hpp clheir.cpp.gz clheir.hpp.gz 
fail.C)
 ELSRC=$(addprefix ./el-src/,TAGTEST.EL emacs/lisp/progmodes/etags.el)
@@ -53,6 +53,7 @@ check:
        @$(MAKE) OPTIONS='--members' ediff_3
        @$(MAKE) OPTIONS='address@hidden --no-members' ediff_4
        @$(MAKE) OPTIONS='nonexistent --members --declarations address@hidden' 
ediff_5
+       @$(MAKE) OPTIONS='--class-qualify --members --declarations 
address@hidden' ediff_6
        @$(MAKE) cdiff
 
 ediff%: ETAGS.good% ETAGS ${infiles}
diff --git a/test/etags/c-src/dostorture.c b/test/etags/c-src/dostorture.c
new file mode 100644
index 0000000..5190734
--- /dev/null
+++ b/test/etags/c-src/dostorture.c
@@ -0,0 +1,107 @@
+/* Date: Thu, 05 Aug 1993 20:28:03 +0200
+   From: "Tom R.Hageman" <address@hidden>
+   Subject: more etags torture;-) [etags 7.3 patch#3]
+   To: address@hidden
+
+   Hi,
+
+   This test file illustrates some more problems with etags (7.3):
+
+
+   1. parentheses are confusing,
+   2. preprocessor directives can disrupt other state machines. */
+
+/* A small torture test for etags. */
+
+/* The classic parenthesis nightmare, based on signal(). */
+void
+(*tag1 (sig, handler)) ()
+  int sig;
+  void (*handler) ();
+{
+  (*handler)(sig);
+  return handler;
+}
+
+#define notag2 void
+/* The classic, with user-defined return type. */
+notag2
+(*tag2 (sig, handler)) ()
+  int sig;
+  void (*handler) ();
+{
+  (*handler)(sig);
+  return handler;
+}
+
+/* The classic, in ANSI C style. */
+void
+(*tag3 (int sig, void (*handler) (int))) (int)
+{
+  (*handler)(sig);
+  return handler;
+}
+
+#define notag4 void
+/* The classic, with user-defined return type, in ANSI C style. */
+notag4
+(*tag4 (int sig, void (*handler) (int))) (int)
+{
+  (*handler)(sig);
+  return handler;
+}
+
+
+/* A less tortuous example. */
+void
+tag5 (handler, arg)
+void (*handler)();
+void *arg;
+{
+  (*handler)(arg);
+}
+
+/* A less tortuous example, in ANSI C style. */
+void
+tag6 (void (*handler) (void *), void *arg)
+{
+  (*handler)(arg);
+}
+
+
+/* Interfering preprocessing torture */
+
+int pp1(
+#if (__STDC__)
+       int
+#endif
+       bar)
+#if (!__STDC__)
+     int bar;
+#endif
+{
+  return bar;
+}
+
+int
+pp2
+#if __STDC__
+  (int bar)
+#else
+  (bar)
+    int bar;
+#endif
+{
+  return bar;
+}
+
+int
+#if __STDC__
+pp3(int bar)
+#else
+pp3(bar)
+  int bar;
+#endif
+{
+  return bar;
+}
diff --git a/test/etags/cp-src/c.C b/test/etags/cp-src/c.C
index dae933a..2c5f7e0 100644
--- a/test/etags/cp-src/c.C
+++ b/test/etags/cp-src/c.C
@@ -51,7 +51,7 @@ int A<int>::f(A<int>* x) {}
 A<float,B<int> > A<B<float>,int>::f(A<int>* x) {}
 template <class C, int n> class AT { C t[n]; };
 class AU { T x; };
-class B<int> { void f() {} };
+class B<int> { void f() {} };
 const A::B::T& abt = abc;
 class A { class B { int f(); }; };
 class A {
diff --git a/test/etags/cp-src/x.cc b/test/etags/cp-src/x.cc
new file mode 100644
index 0000000..a236060
--- /dev/null
+++ b/test/etags/cp-src/x.cc
@@ -0,0 +1,26 @@
+class XX
+{
+public:
+     int foo();
+     void bar();
+};
+
+int
+XX::foo()
+{
+     return 1;
+}
+
+void
+XX::bar()
+{
+     foo();
+}
+
+int
+main(int argc, char *argv[])
+{
+     XX xx;
+     xx.bar();
+     return 0;
+}
diff --git a/test/etags/html-src/algrthms.html 
b/test/etags/html-src/algrthms.html
index f051505..becd93a 100644
--- a/test/etags/html-src/algrthms.html
+++ b/test/etags/html-src/algrthms.html
@@ -1,519 +1,519 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-   <meta name="Author" content="Chip Fleming">
-   <meta name="GENERATOR" content="Mozilla/4.7 [en] (Win95; U) [Netscape]">
-   <title>Tutorial on Convolutional Coding with Viterbi Decoding--Description 
of the Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms</title>
-</head>
-<body>
-<a NAME="algorithms"></a><b><font face="Arial"><font size=+1>Description
-of the Algorithms&nbsp; (Part 1)</font></font></b>
-<p>&nbsp;The steps involved in simulating a communication channel using
-convolutional encoding and Viterbi decoding are as follows:
-<ul>
-<li>
-<a href="#genalgorithm">Generate the data</a> to be transmitted through
-the channel-result is binary data bits</li>
-
-<li>
-<a href="#conalgorithm">Convolutionally encode</a> the data-result is channel
-symbols</li>
-
-<li>
-<a href="#mapping">Map the one/zero channel symbols</a> onto an antipodal
-baseband signal, producing transmitted channel symbols</li>
-
-<li>
-<a href="#addnoise">Add noise</a> to the transmitted channel symbols-result
-is received channel symbols</li>
-
-<li>
-<a href="#quantizing">Quantize</a> the received channel levels-one bit
-quantization is called hard-decision, and two to n bit quantization is
-called soft-decision (n is usually three or four)</li>
-
-<li>
-<a href="algrthms2.html">Perform Viterbi decoding</a> on the quantized
-received channel symbols-result is again binary data bits</li>
-
-<li>
-Compare the decoded data bits to the transmitted data bits and count the
-number of errors.</li>
-</ul>
-<i>Many of you will notice that I left out the steps of modulating the
-channel symbols onto a transmitted carrier, and then demodulating the received
-carrier to recover the channel symbols. You're right, but we can accurately
-model the effects of AWGN even though we bypass those steps.</i>
-<p><a NAME="genalgorithm"></a><b><i><font face="Arial">Generating the 
Data</font></i></b>
-<p>Generating the data to be transmitted through the channel can be 
accomplished
-quite simply by using a random number generator. One that produces a uniform
-distribution of numbers on the interval 0 to a maximum value is provided
-in C: <tt>rand ()</tt>. Using this function, we can say that any value
-less than half of the maximum value is a zero; any value greater than or
-equal to half of the maximum value is a one.
-<p><a NAME="conalgorithm"></a><b><i><font face="Arial">Convolutionally
-Encoding the Data</font></i></b>
-<p>Convolutionally encoding the data is accomplished using a shift register
-and associated combinatorial logic that performs modulo-two addition. (A
-shift register is merely a chain of flip-flops wherein the output of the
-nth flip-flop is tied to the input of the (n+1)th flip-flop. Every time
-the active edge of the clock occurs, the input to the flip-flop is clocked
-through to the output, and thus the data are shifted over one stage.) The
-combinatorial logic is often in the form of cascaded exclusive-or gates.
-As a reminder, exclusive-or gates are two-input, one-output gates often
-represented by the logic symbol shown below,
-<center>
-<p><img SRC="figs/xor_gate.gif" ALT="exclusive-or gate symbol" height=64 
width=93></center>
-
-<p>that implement the following truth-table:
-<br>&nbsp;
-<br>&nbsp;
-<center><table BORDER CELLPADDING=7 WIDTH="218" >
-<tr>
-<td VALIGN=TOP WIDTH="28%">
-<center><b><tt>Input A</tt></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="27%">
-<center><b><tt>Input B</tt></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="45%">
-<center><b><tt>Output</tt></b>
-<p><b><tt>(A xor B)</tt></b></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="28%">
-<center><tt>0</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="27%">
-<center><tt>0</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="45%">
-<center><tt>0</tt></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="28%">
-<center><tt>0</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="27%">
-<center><tt>1</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="45%">
-<center><tt>1</tt></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="28%">
-<center><tt>1</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="27%">
-<center><tt>0</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="45%">
-<center><tt>1</tt></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="28%">
-<center><tt>1</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="27%">
-<center><tt>1</tt></center>
-</td>
-
-<td VALIGN=TOP WIDTH="45%">
-<center><tt>0</tt></center>
-</td>
-</tr>
-</table></center>
-
-<p>The exclusive-or gate performs modulo-two addition of its inputs. When
-you cascade q two-input exclusive-or gates, with the output of the first
-one feeding one of the inputs of the second one, the output of the second
-one feeding one of the inputs of the third one, etc., the output of the
-last one in the chain is the modulo-two sum of the q + 1 inputs.
-<p>Another way to illustrate the modulo-two adder, and the way that is
-most commonly used in textbooks, is as a circle with a + symbol inside,
-thus:
-<center>
-<p><img SRC="figs/ringsum.gif" ALT="modulo-two adder symbol" height=48 
width=48></center>
-
-<p>Now that we have the two basic components of the convolutional encoder
-(flip-flops comprising the shift register and exclusive-or gates comprising
-the associated modulo-two adders) defined, let's look at a picture of a
-convolutional encoder for a rate 1/2, K = 3, m = 2 code:
-<br>&nbsp;
-<br>&nbsp;
-<br>
-<center>
-<p><img SRC="figs/ce_7_5_a.gif" ALT="rate 1/2 K = 3 (7, 5) convolutional 
encoder" height=232 width=600></center>
-
-<p>In this encoder, data bits are provided at a rate of k bits per second.
-Channel symbols are output at a rate of n = 2k symbols per second. The
-input bit is stable during the encoder cycle. The encoder cycle starts
-when an input clock edge occurs. When the input clock edge occurs, the
-output of the left-hand flip-flop is clocked into the right-hand flip-flop,
-the previous input bit is clocked into the left-hand flip-flop, and a new
-input bit becomes available. Then the outputs of the upper and lower modulo-two
-adders become stable. The output selector (SEL A/B block) cycles through
-two states-in the first state, it selects and outputs the output of the
-upper modulo-two adder; in the second state, it selects and outputs the
-output of the lower modulo-two adder.
-<p>The encoder shown above encodes the K = 3, (7, 5) convolutional code.
-The octal numbers 7 and 5 represent the code generator polynomials, which
-when read in binary (111<sub>2</sub> and 101<sub>2</sub>) correspond to
-the shift register connections to the upper and lower modulo-two adders,
-respectively. This code has been determined to be the "best" code for rate
-1/2, K = 3. It is the code I will use for the remaining discussion and
-examples, for reasons that will become readily apparent when we get into
-the Viterbi decoder algorithm.
-<p>Let's look at an example input data stream, and the corresponding output
-data stream:
-<p>Let the input sequence be 010111001010001<sub>2</sub>.
-<p>Assume that the outputs of both of the flip-flops in the shift register
-are initially cleared, i.e. their outputs are zeroes. The first clock cycle
-makes the first input bit, a zero, available to the encoder. The flip-flop
-outputs are both zeroes. The inputs to the modulo-two adders are all zeroes,
-so the output of the encoder is 00<sub>2</sub>.
-<p>The second clock cycle makes the second input bit available to the encoder.
-The left-hand flip-flop clocks in the previous bit, which was a zero, and
-the right-hand flip-flop clocks in the zero output by the left-hand flip-flop.
-The inputs to the top modulo-two adder are 100<sub>2</sub>, so the output
-is a one. The inputs to the bottom modulo-two adder are 10<sub>2</sub>,
-so the output is also a one. So the encoder outputs 11<sub>2</sub> for
-the channel symbols.
-<p>The third clock cycle makes the third input bit, a zero, available to
-the encoder. The left-hand flip-flop clocks in the previous bit, which
-was a one, and the right-hand flip-flop clocks in the zero from two bit-times
-ago. The inputs to the top modulo-two adder are 010<sub>2</sub>, so the
-output is a one. The inputs to the bottom modulo-two adder are 00<sub>2</sub>,
-so the output is zero. So the encoder outputs 10<sub>2</sub> for the channel
-symbols.
-<p>And so on. The timing diagram shown below illustrates the process:
-<br>&nbsp;
-<br>&nbsp;
-<br>
-<center>
-<p><img SRC="figs/ce_td.gif" ALT="timing diagram for rate 1/2 convolutional 
encoder" height=322 width=600></center>
-
-<p><br>
-<br>
-<br>
-<p>After all of the inputs have been presented to the encoder, the output
-sequence will be:
-<p>00 11 10 00 01 10 01 11 11 10 00 10 11 00 11<sub>2</sub>.
-<p>Notice that I have paired the encoder outputs-the first bit in each
-pair is the output of the upper modulo-two adder; the second bit in each
-pair is the output of the lower modulo-two adder.
-<p>You can see from the structure of the rate 1/2 K = 3 convolutional encoder
-and from the example given above that each input bit has an effect on three
-successive pairs of output symbols. That is an extremely important point
-and that is what gives the convolutional code its error-correcting power.
-The reason why will become evident when we get into the Viterbi decoder
-algorithm.
-<p>Now if we are only going to send the 15 data bits given above, in order
-for the last bit to affect three pairs of output symbols, we need to output
-two more pairs of symbols. This is accomplished in our example encoder
-by clocking the convolutional encoder flip-flops two ( = m) more times,
-while holding the input at zero. This is called "flushing" the encoder,
-and results in two more pairs of output symbols. The final binary output
-of the encoder is thus 00 11 10 00 01 10 01 11 11 10 00 10 11 00 11 10
-11<sub>2</sub>. If we don't perform the flushing operation, the last m
-bits of the message have less error-correction capability than the first
-through (m - 1)th bits had. This is a pretty important thing to remember
-if you're going to use this FEC technique in a burst-mode environment.
-So's the step of clearing the shift register at the beginning of each burst.
-The encoder must start in a known state and end in a known state for the
-decoder to be able to reconstruct the input data sequence properly.
-<p>Now, let's look at the encoder from another perspective. You can think
-of the encoder as a simple state machine. The example encoder has two bits
-of memory, so there are four possible states. Let's give the left-hand
-flip-flop a binary weight of 2<sup>1</sup>, and the right-hand flip-flop
-a binary weight of 2<sup>0</sup>. Initially, the encoder is in the all-zeroes
-state. If the first input bit is a zero, the encoder stays in the all zeroes
-state at the next clock edge. But if the input bit is a one, the encoder
-transitions to the 10<sub>2</sub> state at the next clock edge. Then, if
-the next input bit is zero, the encoder transitions to the 01<sub>2</sub>
-state, otherwise, it transitions to the 11<sub>2</sub> state. The following
-table gives the next state given the current state and the input, with
-the states given in binary:
-<br>&nbsp;
-<br>&nbsp;
-<center><table BORDER CELLSPACING=2 CELLPADDING=7 WIDTH="282" >
-<tr>
-<td VALIGN=TOP WIDTH="33%"><font face="Arial"><font 
size=-1>&nbsp;</font></font></td>
-
-<td VALIGN=TOP COLSPAN="2" WIDTH="67%">
-<center><a NAME="statetable"></a><b><font face="Arial"><font size=-1>Next
-State, if&nbsp;</font></font></b></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Current 
State</font></font></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Input = 
0:</font></font></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Input = 
1:</font></font></b></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-</tr>
-</table></center>
-
-<br>&nbsp;
-<p>The above table is often called a state transition table. We'll refer
-to it as the <tt>next state</tt> table.<tt> </tt>Now let us look at a table
-that lists the channel output symbols, given the current state and the
-input data, which we'll refer to as the <tt>output</tt> table:
-<br>&nbsp;
-<br>&nbsp;
-<center><table BORDER CELLSPACING=2 CELLPADDING=7 WIDTH="282" >
-<tr>
-<td VALIGN=TOP WIDTH="33%"></td>
-
-<td VALIGN=TOP COLSPAN="2" WIDTH="67%">
-<center><a NAME="outputtable"></a><b><font face="Arial"><font size=-1>Output
-Symbols, if</font></font></b></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Current 
State</font></font></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Input = 
0:</font></font></b></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><b><font face="Arial"><font size=-1>Input = 
1:</font></font></b></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>00</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-</tr>
-
-<tr>
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>11</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>01</font></font></center>
-</td>
-
-<td VALIGN=TOP WIDTH="33%">
-<center><font face="Arial"><font size=-1>10</font></font></center>
-</td>
-</tr>
-</table></center>
-
-<br>&nbsp;
-<p>You should now see that with these two tables, you can completely describe
-the behavior of the example rate 1/2, K = 3 convolutional encoder. Note
-that both of these tables have 2<sup>(K - 1)</sup> rows, and 2<sup>k</sup>
-columns, where K is the constraint length and k is the number of bits input
-to the encoder for each cycle. These two tables will come in handy when
-we start discussing the Viterbi decoder algorithm.
-<p><a NAME="mapping"></a><b><i><font face="Arial">Mapping the Channel Symbols
-to Signal Levels</font></i></b>
-<p>Mapping the one/zero output of the convolutional encoder onto an antipodal
-baseband signaling scheme is simply a matter of translating zeroes to +1s
-and ones to -1s. This can be accomplished by performing the operation y
-= 1 - 2x on each convolutional encoder output symbol.
-<p><a NAME="addnoise"></a><b><i><font face="Arial">Adding Noise to the
-Transmitted Symbols</font></i></b>
-<p>Adding noise to the transmitted channel symbols produced by the 
convolutional
-encoder involves generating Gaussian random numbers, scaling the numbers
-according to the desired energy per symbol to noise density ratio, 
E<sub>s</sub>/N<sub>0</sub>,
-and adding the scaled Gaussian random numbers to the channel symbol values.
-<p>For the uncoded channel, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>,
-since there is one channel symbol per bit.&nbsp; However, for the coded
-channel, E<sub>s</sub>/N<sub>0 </sub>= E<sub>b</sub>/N<sub>0</sub> + 
10log<sub>10</sub>(k/n).&nbsp;
-For example, for rate 1/2 coding, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>
-+ 10log<sub>10</sub>(1/2) = E<sub>b</sub>/N<sub>0</sub> - 3.01 dB.&nbsp;
-Similarly, for rate 2/3 coding, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>
-+ 10log<sub>10</sub>(2/3) = E<sub>b</sub>/N<sub>0</sub> - 1.76 dB.
-<p>The Gaussian random number generator is the only interesting part of
-this task. C only provides a uniform random number generator, <tt>rand()</tt>.
-In order to obtain Gaussian random numbers, we take advantage of relationships
-between uniform, Rayleigh, and Gaussian distributions:
-<p>Given a uniform random variable U, a Rayleigh random variable R can
-be obtained by:
-<p><img SRC="figs/eqn01.gif" ALT="equation for Rayleigh random deviate given 
uniform random deviate" height=30 width=297 align=ABSCENTER>
-<p>where&nbsp;<img SRC="figs/eqn02.gif" height=24 width=24 align=ABSCENTER>is
-the variance of the Rayleigh random variable, and given R and a second
-uniform random variable V, two Gaussian random variables G and H can be
-obtained by
-<p><i>G</i> = <i>R</i> cos <i>U</i> and <i>H</i> = <i>R</i> sin <i>V</i>.
-<p>In the AWGN channel, the signal is corrupted by additive noise, n(t),
-which has the power spectrum <i>No</i>/2 watts/Hz. The variance&nbsp;<img 
SRC="figs/eqn02.gif" ALT="variance" height=24 width=24 align=ABSBOTTOM>of
-this noise is equal to&nbsp;<img SRC="figs/eqn03.gif" ALT="noise density div 
by two" height=22 width=38 align=TEXTTOP>.
-If we set the energy per symbol <i>E<sub>s</sub></i> equal to 1, 
then&nbsp;<img SRC="figs/eqn04.gif" ALT="equation relating variance to SNR" 
height=28 width=110 align=ABSBOTTOM>.
-So&nbsp;<img SRC="figs/eqn05.gif" ALT="equation for AWGN st dev given SNR" 
height=28 width=139 align=ABSCENTER>.
-<p><a NAME="quantizing"></a><b><i><font face="Arial">Quantizing the Received
-Channel Symbols</font></i></b>
-<p>An ideal Viterbi decoder would work with infinite precision, or at least
-with floating-point numbers. In practical systems, we quantize the received
-channel symbols with one or a few bits of precision in order to reduce
-the complexity of the Viterbi decoder, not to mention the circuits that
-precede it. If the received channel symbols are quantized to one-bit precision
-(&lt; 0V = 1, <u>></u> 0V = 0), the result is called hard-decision data.
-If the received channel symbols are quantized with more than one bit of
-precision, the result is called soft-decision data. A Viterbi decoder with
-soft decision data inputs quantized to three or four bits of precision
-can perform about 2 dB better than one working with hard-decision inputs.
-The usual quantization precision is three bits. More bits provide little
-additional improvement.
-<p>The selection of the quantizing levels is an important design decision
-because it can have a significant effect on the performance of the link.
-The following is a very brief explanation of one way to set those levels.
-Let's assume our received signal levels in the absence of noise are -1V
-= 1, +1V = 0. With noise, our received signal has mean +/- 1 and standard
-deviation&nbsp;<img SRC="figs/eqn05.gif" ALT="equation for AWGN st dev given 
SNR" height=28 width=139 align=ABSCENTER>.
-Let's use a uniform, three-bit quantizer having the input/output relationship
-shown in the figure below, where D is a decision level that we will calculate
-shortly:
-<center>
-<p><img SRC="figs/quantize.gif" ALT="8-level quantizer function plot" 
height=342 width=384></center>
-
-<p>The decision level, D, can be calculated according to the formula&nbsp;<img 
SRC="figs/eqn06.gif" ALT="equation for quantizer decision level" height=28 
width=228 align=ABSCENTER>,
-where E<sub>s</sub>/N<sub>0</sub> is the energy per symbol to noise density
-ratio<i>. (The above figure was redrawn from Figure 2 of Advanced Hardware
-Architecture's ANRS07-0795, "Soft Decision Thresholds and Effects on Viterbi
-Performance". See the </i><a href="fecbiblio.html">bibliography</a><i>&nbsp;
-for a link to their web pages.)</i>
-<p>Click <a href="algrthms2.html">here</a> to proceed to the description
-of the Viterbi decoding algorithm itself...
-<p>Or click on one of the links below to go to the beginning of that section:
-<p>&nbsp;<a href="tutorial.html">Introduction</a>
-<br>&nbsp;<a href="algrthms2.html">Description of the Algorithms&nbsp;
-(Part 2)</a>
-<br>&nbsp;<a href="examples.html">Simulation Source Code Examples</a>
-<br>&nbsp;<a href="simrslts.html">Example Simulation Results</a>
-<br>&nbsp;<a href="fecbiblio.html">Bibliography</a>
-<br>&nbsp;<a href="tutorial.html#specapps">About Spectrum Applications...</a>
-<br>&nbsp;
-<br>&nbsp;
-<br>
-<br>
-<center>
-<p><img SRC="figs/stripe.gif" height=6 width=600></center>
-
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   <meta name="Author" content="Chip Fleming">
+   <meta name="GENERATOR" content="Mozilla/4.7 [en] (Win95; U) [Netscape]">
+   <title>Tutorial on Convolutional Coding with Viterbi Decoding--Description 
of the Data Generation, Convolutional Encoding, Channel Mapping and AWGN, and 
Quantizing Algorithms</title>
+</head>
+<body>
+<a NAME="algorithms"></a><b><font face="Arial"><font size=+1>Description
+of the Algorithms&nbsp; (Part 1)</font></font></b>
+<p>&nbsp;The steps involved in simulating a communication channel using
+convolutional encoding and Viterbi decoding are as follows:
+<ul>
+<li>
+<a href="#genalgorithm">Generate the data</a> to be transmitted through
+the channel-result is binary data bits</li>
+
+<li>
+<a href="#conalgorithm">Convolutionally encode</a> the data-result is channel
+symbols</li>
+
+<li>
+<a href="#mapping">Map the one/zero channel symbols</a> onto an antipodal
+baseband signal, producing transmitted channel symbols</li>
+
+<li>
+<a href="#addnoise">Add noise</a> to the transmitted channel symbols-result
+is received channel symbols</li>
+
+<li>
+<a href="#quantizing">Quantize</a> the received channel levels-one bit
+quantization is called hard-decision, and two to n bit quantization is
+called soft-decision (n is usually three or four)</li>
+
+<li>
+<a href="algrthms2.html">Perform Viterbi decoding</a> on the quantized
+received channel symbols-result is again binary data bits</li>
+
+<li>
+Compare the decoded data bits to the transmitted data bits and count the
+number of errors.</li>
+</ul>
+<i>Many of you will notice that I left out the steps of modulating the
+channel symbols onto a transmitted carrier, and then demodulating the received
+carrier to recover the channel symbols. You're right, but we can accurately
+model the effects of AWGN even though we bypass those steps.</i>
+<p><a NAME="genalgorithm"></a><b><i><font face="Arial">Generating the 
Data</font></i></b>
+<p>Generating the data to be transmitted through the channel can be 
accomplished
+quite simply by using a random number generator. One that produces a uniform
+distribution of numbers on the interval 0 to a maximum value is provided
+in C: <tt>rand ()</tt>. Using this function, we can say that any value
+less than half of the maximum value is a zero; any value greater than or
+equal to half of the maximum value is a one.
+<p><a NAME="conalgorithm"></a><b><i><font face="Arial">Convolutionally
+Encoding the Data</font></i></b>
+<p>Convolutionally encoding the data is accomplished using a shift register
+and associated combinatorial logic that performs modulo-two addition. (A
+shift register is merely a chain of flip-flops wherein the output of the
+nth flip-flop is tied to the input of the (n+1)th flip-flop. Every time
+the active edge of the clock occurs, the input to the flip-flop is clocked
+through to the output, and thus the data are shifted over one stage.) The
+combinatorial logic is often in the form of cascaded exclusive-or gates.
+As a reminder, exclusive-or gates are two-input, one-output gates often
+represented by the logic symbol shown below,
+<center>
+<p><img SRC="figs/xor_gate.gif" ALT="exclusive-or gate symbol" height=64 
width=93></center>
+
+<p>that implement the following truth-table:
+<br>&nbsp;
+<br>&nbsp;
+<center><table BORDER CELLPADDING=7 WIDTH="218" >
+<tr>
+<td VALIGN=TOP WIDTH="28%">
+<center><b><tt>Input A</tt></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="27%">
+<center><b><tt>Input B</tt></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="45%">
+<center><b><tt>Output</tt></b>
+<p><b><tt>(A xor B)</tt></b></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="28%">
+<center><tt>0</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="27%">
+<center><tt>0</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="45%">
+<center><tt>0</tt></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="28%">
+<center><tt>0</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="27%">
+<center><tt>1</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="45%">
+<center><tt>1</tt></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="28%">
+<center><tt>1</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="27%">
+<center><tt>0</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="45%">
+<center><tt>1</tt></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="28%">
+<center><tt>1</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="27%">
+<center><tt>1</tt></center>
+</td>
+
+<td VALIGN=TOP WIDTH="45%">
+<center><tt>0</tt></center>
+</td>
+</tr>
+</table></center>
+
+<p>The exclusive-or gate performs modulo-two addition of its inputs. When
+you cascade q two-input exclusive-or gates, with the output of the first
+one feeding one of the inputs of the second one, the output of the second
+one feeding one of the inputs of the third one, etc., the output of the
+last one in the chain is the modulo-two sum of the q + 1 inputs.
+<p>Another way to illustrate the modulo-two adder, and the way that is
+most commonly used in textbooks, is as a circle with a + symbol inside,
+thus:
+<center>
+<p><img SRC="figs/ringsum.gif" ALT="modulo-two adder symbol" height=48 
width=48></center>
+
+<p>Now that we have the two basic components of the convolutional encoder
+(flip-flops comprising the shift register and exclusive-or gates comprising
+the associated modulo-two adders) defined, let's look at a picture of a
+convolutional encoder for a rate 1/2, K = 3, m = 2 code:
+<br>&nbsp;
+<br>&nbsp;
+<br>
+<center>
+<p><img SRC="figs/ce_7_5_a.gif" ALT="rate 1/2 K = 3 (7, 5) convolutional 
encoder" height=232 width=600></center>
+
+<p>In this encoder, data bits are provided at a rate of k bits per second.
+Channel symbols are output at a rate of n = 2k symbols per second. The
+input bit is stable during the encoder cycle. The encoder cycle starts
+when an input clock edge occurs. When the input clock edge occurs, the
+output of the left-hand flip-flop is clocked into the right-hand flip-flop,
+the previous input bit is clocked into the left-hand flip-flop, and a new
+input bit becomes available. Then the outputs of the upper and lower modulo-two
+adders become stable. The output selector (SEL A/B block) cycles through
+two states-in the first state, it selects and outputs the output of the
+upper modulo-two adder; in the second state, it selects and outputs the
+output of the lower modulo-two adder.
+<p>The encoder shown above encodes the K = 3, (7, 5) convolutional code.
+The octal numbers 7 and 5 represent the code generator polynomials, which
+when read in binary (111<sub>2</sub> and 101<sub>2</sub>) correspond to
+the shift register connections to the upper and lower modulo-two adders,
+respectively. This code has been determined to be the "best" code for rate
+1/2, K = 3. It is the code I will use for the remaining discussion and
+examples, for reasons that will become readily apparent when we get into
+the Viterbi decoder algorithm.
+<p>Let's look at an example input data stream, and the corresponding output
+data stream:
+<p>Let the input sequence be 010111001010001<sub>2</sub>.
+<p>Assume that the outputs of both of the flip-flops in the shift register
+are initially cleared, i.e. their outputs are zeroes. The first clock cycle
+makes the first input bit, a zero, available to the encoder. The flip-flop
+outputs are both zeroes. The inputs to the modulo-two adders are all zeroes,
+so the output of the encoder is 00<sub>2</sub>.
+<p>The second clock cycle makes the second input bit available to the encoder.
+The left-hand flip-flop clocks in the previous bit, which was a zero, and
+the right-hand flip-flop clocks in the zero output by the left-hand flip-flop.
+The inputs to the top modulo-two adder are 100<sub>2</sub>, so the output
+is a one. The inputs to the bottom modulo-two adder are 10<sub>2</sub>,
+so the output is also a one. So the encoder outputs 11<sub>2</sub> for
+the channel symbols.
+<p>The third clock cycle makes the third input bit, a zero, available to
+the encoder. The left-hand flip-flop clocks in the previous bit, which
+was a one, and the right-hand flip-flop clocks in the zero from two bit-times
+ago. The inputs to the top modulo-two adder are 010<sub>2</sub>, so the
+output is a one. The inputs to the bottom modulo-two adder are 00<sub>2</sub>,
+so the output is zero. So the encoder outputs 10<sub>2</sub> for the channel
+symbols.
+<p>And so on. The timing diagram shown below illustrates the process:
+<br>&nbsp;
+<br>&nbsp;
+<br>
+<center>
+<p><img SRC="figs/ce_td.gif" ALT="timing diagram for rate 1/2 convolutional 
encoder" height=322 width=600></center>
+
+<p><br>
+<br>
+<br>
+<p>After all of the inputs have been presented to the encoder, the output
+sequence will be:
+<p>00 11 10 00 01 10 01 11 11 10 00 10 11 00 11<sub>2</sub>.
+<p>Notice that I have paired the encoder outputs-the first bit in each
+pair is the output of the upper modulo-two adder; the second bit in each
+pair is the output of the lower modulo-two adder.
+<p>You can see from the structure of the rate 1/2 K = 3 convolutional encoder
+and from the example given above that each input bit has an effect on three
+successive pairs of output symbols. That is an extremely important point
+and that is what gives the convolutional code its error-correcting power.
+The reason why will become evident when we get into the Viterbi decoder
+algorithm.
+<p>Now if we are only going to send the 15 data bits given above, in order
+for the last bit to affect three pairs of output symbols, we need to output
+two more pairs of symbols. This is accomplished in our example encoder
+by clocking the convolutional encoder flip-flops two ( = m) more times,
+while holding the input at zero. This is called "flushing" the encoder,
+and results in two more pairs of output symbols. The final binary output
+of the encoder is thus 00 11 10 00 01 10 01 11 11 10 00 10 11 00 11 10
+11<sub>2</sub>. If we don't perform the flushing operation, the last m
+bits of the message have less error-correction capability than the first
+through (m - 1)th bits had. This is a pretty important thing to remember
+if you're going to use this FEC technique in a burst-mode environment.
+So's the step of clearing the shift register at the beginning of each burst.
+The encoder must start in a known state and end in a known state for the
+decoder to be able to reconstruct the input data sequence properly.
+<p>Now, let's look at the encoder from another perspective. You can think
+of the encoder as a simple state machine. The example encoder has two bits
+of memory, so there are four possible states. Let's give the left-hand
+flip-flop a binary weight of 2<sup>1</sup>, and the right-hand flip-flop
+a binary weight of 2<sup>0</sup>. Initially, the encoder is in the all-zeroes
+state. If the first input bit is a zero, the encoder stays in the all zeroes
+state at the next clock edge. But if the input bit is a one, the encoder
+transitions to the 10<sub>2</sub> state at the next clock edge. Then, if
+the next input bit is zero, the encoder transitions to the 01<sub>2</sub>
+state, otherwise, it transitions to the 11<sub>2</sub> state. The following
+table gives the next state given the current state and the input, with
+the states given in binary:
+<br>&nbsp;
+<br>&nbsp;
+<center><table BORDER CELLSPACING=2 CELLPADDING=7 WIDTH="282" >
+<tr>
+<td VALIGN=TOP WIDTH="33%"><font face="Arial"><font 
size=-1>&nbsp;</font></font></td>
+
+<td VALIGN=TOP COLSPAN="2" WIDTH="67%">
+<center><a NAME="statetable"></a><b><font face="Arial"><font size=-1>Next
+State, if&nbsp;</font></font></b></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Current 
State</font></font></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Input = 
0:</font></font></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Input = 
1:</font></font></b></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+</tr>
+</table></center>
+
+<br>&nbsp;
+<p>The above table is often called a state transition table. We'll refer
+to it as the <tt>next state</tt> table.<tt> </tt>Now let us look at a table
+that lists the channel output symbols, given the current state and the
+input data, which we'll refer to as the <tt>output</tt> table:
+<br>&nbsp;
+<br>&nbsp;
+<center><table BORDER CELLSPACING=2 CELLPADDING=7 WIDTH="282" >
+<tr>
+<td VALIGN=TOP WIDTH="33%"></td>
+
+<td VALIGN=TOP COLSPAN="2" WIDTH="67%">
+<center><a NAME="outputtable"></a><b><font face="Arial"><font size=-1>Output
+Symbols, if</font></font></b></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Current 
State</font></font></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Input = 
0:</font></font></b></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><b><font face="Arial"><font size=-1>Input = 
1:</font></font></b></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>00</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+</tr>
+
+<tr>
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>11</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>01</font></font></center>
+</td>
+
+<td VALIGN=TOP WIDTH="33%">
+<center><font face="Arial"><font size=-1>10</font></font></center>
+</td>
+</tr>
+</table></center>
+
+<br>&nbsp;
+<p>You should now see that with these two tables, you can completely describe
+the behavior of the example rate 1/2, K = 3 convolutional encoder. Note
+that both of these tables have 2<sup>(K - 1)</sup> rows, and 2<sup>k</sup>
+columns, where K is the constraint length and k is the number of bits input
+to the encoder for each cycle. These two tables will come in handy when
+we start discussing the Viterbi decoder algorithm.
+<p><a NAME="mapping"></a><b><i><font face="Arial">Mapping the Channel Symbols
+to Signal Levels</font></i></b>
+<p>Mapping the one/zero output of the convolutional encoder onto an antipodal
+baseband signaling scheme is simply a matter of translating zeroes to +1s
+and ones to -1s. This can be accomplished by performing the operation y
+= 1 - 2x on each convolutional encoder output symbol.
+<p><a NAME="addnoise"></a><b><i><font face="Arial">Adding Noise to the
+Transmitted Symbols</font></i></b>
+<p>Adding noise to the transmitted channel symbols produced by the 
convolutional
+encoder involves generating Gaussian random numbers, scaling the numbers
+according to the desired energy per symbol to noise density ratio, 
E<sub>s</sub>/N<sub>0</sub>,
+and adding the scaled Gaussian random numbers to the channel symbol values.
+<p>For the uncoded channel, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>,
+since there is one channel symbol per bit.&nbsp; However, for the coded
+channel, E<sub>s</sub>/N<sub>0 </sub>= E<sub>b</sub>/N<sub>0</sub> + 
10log<sub>10</sub>(k/n).&nbsp;
+For example, for rate 1/2 coding, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>
++ 10log<sub>10</sub>(1/2) = E<sub>b</sub>/N<sub>0</sub> - 3.01 dB.&nbsp;
+Similarly, for rate 2/3 coding, E<sub>s</sub>/N<sub>0 </sub>= 
E<sub>b</sub>/N<sub>0</sub>
++ 10log<sub>10</sub>(2/3) = E<sub>b</sub>/N<sub>0</sub> - 1.76 dB.
+<p>The Gaussian random number generator is the only interesting part of
+this task. C only provides a uniform random number generator, <tt>rand()</tt>.
+In order to obtain Gaussian random numbers, we take advantage of relationships
+between uniform, Rayleigh, and Gaussian distributions:
+<p>Given a uniform random variable U, a Rayleigh random variable R can
+be obtained by:
+<p><img SRC="figs/eqn01.gif" ALT="equation for Rayleigh random deviate given 
uniform random deviate" height=30 width=297 align=ABSCENTER>
+<p>where&nbsp;<img SRC="figs/eqn02.gif" height=24 width=24 align=ABSCENTER>is
+the variance of the Rayleigh random variable, and given R and a second
+uniform random variable V, two Gaussian random variables G and H can be
+obtained by
+<p><i>G</i> = <i>R</i> cos <i>U</i> and <i>H</i> = <i>R</i> sin <i>V</i>.
+<p>In the AWGN channel, the signal is corrupted by additive noise, n(t),
+which has the power spectrum <i>No</i>/2 watts/Hz. The variance&nbsp;<img 
SRC="figs/eqn02.gif" ALT="variance" height=24 width=24 align=ABSBOTTOM>of
+this noise is equal to&nbsp;<img SRC="figs/eqn03.gif" ALT="noise density div 
by two" height=22 width=38 align=TEXTTOP>.
+If we set the energy per symbol <i>E<sub>s</sub></i> equal to 1, 
then&nbsp;<img SRC="figs/eqn04.gif" ALT="equation relating variance to SNR" 
height=28 width=110 align=ABSBOTTOM>.
+So&nbsp;<img SRC="figs/eqn05.gif" ALT="equation for AWGN st dev given SNR" 
height=28 width=139 align=ABSCENTER>.
+<p><a NAME="quantizing"></a><b><i><font face="Arial">Quantizing the Received
+Channel Symbols</font></i></b>
+<p>An ideal Viterbi decoder would work with infinite precision, or at least
+with floating-point numbers. In practical systems, we quantize the received
+channel symbols with one or a few bits of precision in order to reduce
+the complexity of the Viterbi decoder, not to mention the circuits that
+precede it. If the received channel symbols are quantized to one-bit precision
+(&lt; 0V = 1, <u>></u> 0V = 0), the result is called hard-decision data.
+If the received channel symbols are quantized with more than one bit of
+precision, the result is called soft-decision data. A Viterbi decoder with
+soft decision data inputs quantized to three or four bits of precision
+can perform about 2 dB better than one working with hard-decision inputs.
+The usual quantization precision is three bits. More bits provide little
+additional improvement.
+<p>The selection of the quantizing levels is an important design decision
+because it can have a significant effect on the performance of the link.
+The following is a very brief explanation of one way to set those levels.
+Let's assume our received signal levels in the absence of noise are -1V
+= 1, +1V = 0. With noise, our received signal has mean +/- 1 and standard
+deviation&nbsp;<img SRC="figs/eqn05.gif" ALT="equation for AWGN st dev given 
SNR" height=28 width=139 align=ABSCENTER>.
+Let's use a uniform, three-bit quantizer having the input/output relationship
+shown in the figure below, where D is a decision level that we will calculate
+shortly:
+<center>
+<p><img SRC="figs/quantize.gif" ALT="8-level quantizer function plot" 
height=342 width=384></center>
+
+<p>The decision level, D, can be calculated according to the formula&nbsp;<img 
SRC="figs/eqn06.gif" ALT="equation for quantizer decision level" height=28 
width=228 align=ABSCENTER>,
+where E<sub>s</sub>/N<sub>0</sub> is the energy per symbol to noise density
+ratio<i>. (The above figure was redrawn from Figure 2 of Advanced Hardware
+Architecture's ANRS07-0795, "Soft Decision Thresholds and Effects on Viterbi
+Performance". See the </i><a href="fecbiblio.html">bibliography</a><i>&nbsp;
+for a link to their web pages.)</i>
+<p>Click <a href="algrthms2.html">here</a> to proceed to the description
+of the Viterbi decoding algorithm itself...
+<p>Or click on one of the links below to go to the beginning of that section:
+<p>&nbsp;<a href="tutorial.html">Introduction</a>
+<br>&nbsp;<a href="algrthms2.html">Description of the Algorithms&nbsp;
+(Part 2)</a>
+<br>&nbsp;<a href="examples.html">Simulation Source Code Examples</a>
+<br>&nbsp;<a href="simrslts.html">Example Simulation Results</a>
+<br>&nbsp;<a href="fecbiblio.html">Bibliography</a>
+<br>&nbsp;<a href="tutorial.html#specapps">About Spectrum Applications...</a>
+<br>&nbsp;
+<br>&nbsp;
+<br>
+<br>
+<center>
+<p><img SRC="figs/stripe.gif" height=6 width=600></center>
+
+</body>
+</html>



reply via email to

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